Project
Loading...
Searching...
No Matches
o2::base::MatLayerCylSet Class Reference

#include <MatLayerCylSet.h>

Inherits o2::gpu::FlatObject.

Public Member Functions

 MatLayerCylSet ()=default
 
 ~MatLayerCylSet ()=default
 
 MatLayerCylSet (const MatLayerCylSet &src)=delete
 
 GPUd () const MatLayerCylSetLayout *get() const
 
 GPUd () MatLayerCylSetLayout *get()
 
 GPUd () int getNLayers() const
 
 GPUd () const MatLayerCyl &getLayer(int i) const
 
 GPUd () bool getLayersRange(const Ray &ray
 
 GPUd () float getRMin() const
 
 GPUd () float getRMax() const
 
 GPUd () float getZMax() const
 
 GPUd () float getRMin2() const
 
 GPUd () float getRMax2() const
 
void print (bool data=false) const
 
void addLayer (float rmin, float rmax, float zmax, float dz, float drphi)
 
void populateFromTGeo (int ntrPerCel=10)
 
void optimizePhiSlices (float maxRelDiff=0.05)
 
void dumpToTree (const std::string &outName="matbudTree.root") const
 
void writeToFile (const std::string &outFName="matbud.root")
 
void initLayerVoxelLU ()
 
void flatten ()
 
MatLayerCylgetLayer (int i)
 
MatLayerCylSetextractCopy (float rmin, float rmax, float tol=1e-3) const
 
void finalizeStructures ()
 
MatBudget getMatBudget (const math_utils::Point3D< float > &point0, const math_utils::Point3D< float > &point1) const
 
 GPUd () MatBudget getMatBudget(float x0
 
 GPUd () int searchSegment(float val
 
 GPUd () int searchLayerFast(float r2
 searches a layer based on r2 input, using a lookup table
 
std::size_t estimateFlatBufferSize () const
 GPUCA_ALIGPUCODE.
 
void moveBufferTo (char *newFlatBufferPtr)
 
void setActualBufferAddress (char *actualFlatBufferPtr)
 
void setFutureBufferAddress (char *futureFlatBufferPtr)
 
void cloneFromObject (const MatLayerCylSet &obj, char *newFlatBufferPtr)
 
void fixPointers (char *newPtr=nullptr)
 
void fixPointers (char *oldPtr, char *newPtr, bool newPtrValid=true)
 
 ClassDefNV (MatLayerCylSet, 1)
 if the voxels have been initialized
 
- Public Member Functions inherited from o2::gpu::FlatObject
 FlatObject ()=default
 _____________ Constructors / destructors __________________________
 
 ~FlatObject ()
 
 FlatObject (const FlatObject &)=delete
 
FlatObjectoperator= (const FlatObject &)=delete
 
void destroy ()
 _______________ Utilities _______________________________________________
 
size_t getFlatBufferSize () const
 Gives size of the flat buffer.
 
const chargetFlatBufferPtr () const
 Gives pointer to the flat buffer.
 
bool isConstructed () const
 Tells if the object is constructed.
 
bool isBufferInternal () const
 Tells if the buffer is internal.
 
void adoptInternalBuffer (char *buf)
 
void clearInternalBufferPtr ()
 
void printC () const
 Print the content of the flat buffer.
 

Static Public Member Functions

static MatLayerCylSetloadFromFile (const std::string &inpFName="matbud.root")
 
static MatLayerCylSetrectifyPtrFromFile (MatLayerCylSet *ptr)
 
static constexpr size_t getClassAlignmentBytes ()
 Gives minimal alignment in bytes required for the class object.
 
static constexpr size_t getBufferAlignmentBytes ()
 Gives minimal alignment in bytes required for the flat buffer.
 
- Static Public Member Functions inherited from o2::gpu::FlatObject
static size_t alignSize (size_t sizeBytes, size_t alignmentBytes)
 _______________ Generic utilities _______________________________________________
 
template<class T >
static T * relocatePointer (const char *oldBase, char *newBase, const T *ptr)
 Relocates a pointer inside a buffer to the new buffer address.
 
template<class T , class TFile >
static int32_t writeToFile (T &obj, TFile &outf, const char *name)
 write a child class object to the file
 
template<class T , class TFile >
static T * readFromFile (TFile &inpf, const char *name)
 read a child class object from the file
 
template<class T >
static std::string stressTest (T &obj)
 Test the flat object functionality for a child class T.
 

Public Attributes

shortlmin
 
short short &lmax const
 
float y0
 
float float z0
 
float float float x1
 
float float float float y1
 
float float float float float z1 const
 
int low = -1
 
int int high = -1) const
 
uint16_t mLayerVoxelLU [2 *NumVoxels]
 
bool mInitializedLayerVoxelLU = false
 helper structure to lookup a layer based on known radius (static dimension for easy copy to GPU)
 

Static Public Attributes

static constexpr float LayerRMax = 500
 
static constexpr float VoxelRDelta = 0.05
 
static constexpr float InvVoxelRDelta = 1.f / VoxelRDelta
 
static constexpr int NumVoxels = int(LayerRMax / VoxelRDelta)
 

Additional Inherited Members

- Protected Types inherited from o2::gpu::FlatObject
enum  ConstructionState : uint32_t { NotConstructed = 0x0 , Constructed = 0x1 , InProgress = 0x2 }
 GPUCA_GPUCODE. More...
 
- Protected Member Functions inherited from o2::gpu::FlatObject
void startConstruction ()
 _____________ Construction _________
 
void finishConstruction (int32_t flatBufferSize)
 
void cloneFromObject (const FlatObject &obj, char *newFlatBufferPtr)
 
charreleaseInternalBuffer ()
 _____________ Methods for making the data buffer external __________________________
 
void moveBufferTo (char *newBufferPtr)
 
void setActualBufferAddress (char *actualFlatBufferPtr)
 _____________ Methods for moving the class with its external buffer to another location __________________________
 
void setFutureBufferAddress (char *futureFlatBufferPtr)
 
 ClassDefNV (FlatObject, 1)
 Pointer to the flat buffer.
 
- Static Protected Member Functions inherited from o2::gpu::FlatObject
static constexpr size_t getClassAlignmentBytes ()
 _____________ Memory alignment __________________________
 
static constexpr size_t getBufferAlignmentBytes ()
 Gives minimal alignment in bytes required for the flat buffer.
 
- Protected Attributes inherited from o2::gpu::FlatObject
int32_t mFlatBufferSize = 0
 size of the flat buffer
 
uint32_t mConstructionMask = ConstructionState::NotConstructed
 mask for constructed object members, first two bytes are used by this class
 
charmFlatBufferContainer = nullptr
 
charmFlatBufferPtr = nullptr
 

Detailed Description

Definition at line 50 of file MatLayerCylSet.h.

Constructor & Destructor Documentation

◆ MatLayerCylSet() [1/2]

o2::base::MatLayerCylSet::MatLayerCylSet ( )
default

◆ ~MatLayerCylSet()

o2::base::MatLayerCylSet::~MatLayerCylSet ( )
default

◆ MatLayerCylSet() [2/2]

o2::base::MatLayerCylSet::MatLayerCylSet ( const MatLayerCylSet src)
delete

Member Function Documentation

◆ addLayer()

void MatLayerCylSet::addLayer ( float  rmin,
float  rmax,
float  zmax,
float  dz,
float  drphi 
)

Definition at line 32 of file MatLayerCylSet.cxx.

◆ ClassDefNV()

o2::base::MatLayerCylSet::ClassDefNV ( MatLayerCylSet  ,
 
)

if the voxels have been initialized

◆ cloneFromObject()

void MatLayerCylSet::cloneFromObject ( const MatLayerCylSet obj,
char newFlatBufferPtr 
)

Initializes from another object, copies data to newBufferPtr

Definition at line 542 of file MatLayerCylSet.cxx.

◆ dumpToTree()

void MatLayerCylSet::dumpToTree ( const std::string &  outName = "matbudTree.root") const

dump per cell info to the tree

Definition at line 125 of file MatLayerCylSet.cxx.

◆ estimateFlatBufferSize()

std::size_t MatLayerCylSet::estimateFlatBufferSize ( ) const

GPUCA_ALIGPUCODE.

Definition at line 263 of file MatLayerCylSet.cxx.

◆ extractCopy()

MatLayerCylSet * MatLayerCylSet::extractCopy ( float  rmin,
float  rmax,
float  tol = 1e-3 
) const

Definition at line 584 of file MatLayerCylSet.cxx.

◆ finalizeStructures()

void MatLayerCylSet::finalizeStructures ( )

Definition at line 95 of file MatLayerCylSet.cxx.

◆ fixPointers() [1/2]

void MatLayerCylSet::fixPointers ( char newPtr = nullptr)

Definition at line 550 of file MatLayerCylSet.cxx.

◆ fixPointers() [2/2]

void MatLayerCylSet::fixPointers ( char oldPtr,
char newPtr,
bool  newPtrValid = true 
)

Definition at line 565 of file MatLayerCylSet.cxx.

◆ flatten()

void o2::base::MatLayerCylSet::flatten ( )

◆ getBufferAlignmentBytes()

static constexpr size_t o2::base::MatLayerCylSet::getBufferAlignmentBytes ( )
inlinestaticconstexpr

Gives minimal alignment in bytes required for the flat buffer.

Definition at line 126 of file MatLayerCylSet.h.

◆ getClassAlignmentBytes()

static constexpr size_t o2::base::MatLayerCylSet::getClassAlignmentBytes ( )
inlinestaticconstexpr

Gives minimal alignment in bytes required for the class object.

Definition at line 124 of file MatLayerCylSet.h.

◆ getLayer()

MatLayerCyl & o2::base::MatLayerCylSet::getLayer ( int  i)
inline

Definition at line 89 of file MatLayerCylSet.h.

◆ getMatBudget()

MatBudget o2::base::MatLayerCylSet::getMatBudget ( const math_utils::Point3D< float > &  point0,
const math_utils::Point3D< float > &  point1 
) const
inline

Definition at line 96 of file MatLayerCylSet.h.

◆ GPUd() [1/13]

o2::base::MatLayerCylSet::GPUd ( ) const &

◆ GPUd() [2/13]

o2::base::MatLayerCylSet::GPUd ( ) const &
inline

Definition at line 64 of file MatLayerCylSet.h.

◆ GPUd() [3/13]

o2::base::MatLayerCylSet::GPUd ( ) const
inline

Definition at line 60 of file MatLayerCylSet.h.

◆ GPUd() [4/13]

o2::base::MatLayerCylSet::GPUd ( ) const
inline

Definition at line 68 of file MatLayerCylSet.h.

◆ GPUd() [5/13]

o2::base::MatLayerCylSet::GPUd ( ) const
inline

Definition at line 71 of file MatLayerCylSet.h.

◆ GPUd() [6/13]

o2::base::MatLayerCylSet::GPUd ( ) const
inline

Definition at line 67 of file MatLayerCylSet.h.

◆ GPUd() [7/13]

o2::base::MatLayerCylSet::GPUd ( ) const
inline

Definition at line 70 of file MatLayerCylSet.h.

◆ GPUd() [8/13]

o2::base::MatLayerCylSet::GPUd ( ) const
inline

Definition at line 69 of file MatLayerCylSet.h.

◆ GPUd() [9/13]

o2::base::MatLayerCylSet::GPUd ( ) const
inline

Definition at line 63 of file MatLayerCylSet.h.

◆ GPUd() [10/13]

o2::base::MatLayerCylSet::GPUd ( )

searches a layer based on r2 input, using a lookup table

◆ GPUd() [11/13]

o2::base::MatLayerCylSet::GPUd ( )

◆ GPUd() [12/13]

o2::base::MatLayerCylSet::GPUd ( )

◆ GPUd() [13/13]

o2::base::MatLayerCylSet::GPUd ( )
inline

Definition at line 61 of file MatLayerCylSet.h.

◆ initLayerVoxelLU()

void MatLayerCylSet::initLayerVoxelLU ( )

Definition at line 178 of file MatLayerCylSet.cxx.

◆ loadFromFile()

MatLayerCylSet * MatLayerCylSet::loadFromFile ( const std::string &  inpFName = "matbud.root")
static

Definition at line 202 of file MatLayerCylSet.cxx.

◆ moveBufferTo()

void MatLayerCylSet::moveBufferTo ( char newFlatBufferPtr)

sets buffer pointer to the new address, move the buffer content there.

Definition at line 516 of file MatLayerCylSet.cxx.

◆ optimizePhiSlices()

void MatLayerCylSet::optimizePhiSlices ( float  maxRelDiff = 0.05)

Definition at line 230 of file MatLayerCylSet.cxx.

◆ populateFromTGeo()

void MatLayerCylSet::populateFromTGeo ( int  ntrPerCel = 10)

< populate layers, using ntrPerCell test tracks per cell

Definition at line 72 of file MatLayerCylSet.cxx.

◆ print()

void MatLayerCylSet::print ( bool  data = false) const

< print layer data

Definition at line 241 of file MatLayerCylSet.cxx.

◆ rectifyPtrFromFile()

MatLayerCylSet * MatLayerCylSet::rectifyPtrFromFile ( MatLayerCylSet ptr)
static

Definition at line 219 of file MatLayerCylSet.cxx.

◆ setActualBufferAddress()

void MatLayerCylSet::setActualBufferAddress ( char actualFlatBufferPtr)

Sets the actual location of the external flat buffer after it has been moved (i.e. to another machine)

Definition at line 535 of file MatLayerCylSet.cxx.

◆ setFutureBufferAddress()

void MatLayerCylSet::setFutureBufferAddress ( char futureFlatBufferPtr)

Sets the actual location of the external flat buffer before it was created

Definition at line 526 of file MatLayerCylSet.cxx.

◆ writeToFile()

void MatLayerCylSet::writeToFile ( const std::string &  outFName = "matbud.root")

store to file

Definition at line 166 of file MatLayerCylSet.cxx.

Member Data Documentation

◆ const [1/2]

short short& lmax o2::base::MatLayerCylSet::const

Definition at line 66 of file MatLayerCylSet.h.

◆ const [2/2]

float float float float float z1 o2::base::MatLayerCylSet::const

Definition at line 102 of file MatLayerCylSet.h.

◆ high

int int o2::base::MatLayerCylSet::high = -1) const

Definition at line 104 of file MatLayerCylSet.h.

◆ InvVoxelRDelta

constexpr float o2::base::MatLayerCylSet::InvVoxelRDelta = 1.f / VoxelRDelta
staticconstexpr

Definition at line 131 of file MatLayerCylSet.h.

◆ LayerRMax

constexpr float o2::base::MatLayerCylSet::LayerRMax = 500
staticconstexpr

Definition at line 129 of file MatLayerCylSet.h.

◆ lmin

short& o2::base::MatLayerCylSet::lmin

Definition at line 66 of file MatLayerCylSet.h.

◆ low

int o2::base::MatLayerCylSet::low = -1

Definition at line 104 of file MatLayerCylSet.h.

◆ mInitializedLayerVoxelLU

bool o2::base::MatLayerCylSet::mInitializedLayerVoxelLU = false

helper structure to lookup a layer based on known radius (static dimension for easy copy to GPU)

Definition at line 135 of file MatLayerCylSet.h.

◆ mLayerVoxelLU

uint16_t o2::base::MatLayerCylSet::mLayerVoxelLU[2 *NumVoxels]

Definition at line 134 of file MatLayerCylSet.h.

◆ NumVoxels

constexpr int o2::base::MatLayerCylSet::NumVoxels = int(LayerRMax / VoxelRDelta)
staticconstexpr

Definition at line 132 of file MatLayerCylSet.h.

◆ VoxelRDelta

constexpr float o2::base::MatLayerCylSet::VoxelRDelta = 0.05
staticconstexpr

Definition at line 130 of file MatLayerCylSet.h.

◆ x1

float float float o2::base::MatLayerCylSet::x1

Definition at line 102 of file MatLayerCylSet.h.

◆ y0

float o2::base::MatLayerCylSet::y0

Definition at line 102 of file MatLayerCylSet.h.

◆ y1

float float float float o2::base::MatLayerCylSet::y1

Definition at line 102 of file MatLayerCylSet.h.

◆ z0

float float o2::base::MatLayerCylSet::z0

Definition at line 102 of file MatLayerCylSet.h.


The documentation for this class was generated from the following files: