![]() |
Project
|
#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 () |
MatLayerCyl & | getLayer (int i) |
MatLayerCylSet * | extractCopy (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 | |
![]() | |
FlatObject ()=default | |
_____________ Constructors / destructors __________________________ | |
~FlatObject () | |
FlatObject (const FlatObject &)=delete | |
FlatObject & | operator= (const FlatObject &)=delete |
void | destroy () |
_______________ Utilities _______________________________________________ | |
size_t | getFlatBufferSize () const |
Gives size of the flat buffer. | |
const char * | getFlatBufferPtr () 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 MatLayerCylSet * | loadFromFile (const std::string &inpFName="matbud.root") |
static MatLayerCylSet * | rectifyPtrFromFile (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 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 | |
short & | lmin |
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 | |
![]() | |
enum | ConstructionState : uint32_t { NotConstructed = 0x0 , Constructed = 0x1 , InProgress = 0x2 } |
GPUCA_GPUCODE. More... | |
![]() | |
void | startConstruction () |
_____________ Construction _________ | |
void | finishConstruction (int32_t flatBufferSize) |
void | cloneFromObject (const FlatObject &obj, char *newFlatBufferPtr) |
char * | releaseInternalBuffer () |
_____________ 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 constexpr size_t | getClassAlignmentBytes () |
_____________ Memory alignment __________________________ | |
static constexpr size_t | getBufferAlignmentBytes () |
Gives minimal alignment in bytes required for the flat buffer. | |
![]() | |
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 | |
char * | mFlatBufferContainer = nullptr |
char * | mFlatBufferPtr = nullptr |
Definition at line 50 of file MatLayerCylSet.h.
|
default |
|
default |
|
delete |
void MatLayerCylSet::addLayer | ( | float | rmin, |
float | rmax, | ||
float | zmax, | ||
float | dz, | ||
float | drphi | ||
) |
Definition at line 32 of file MatLayerCylSet.cxx.
o2::base::MatLayerCylSet::ClassDefNV | ( | MatLayerCylSet | , |
1 | |||
) |
if the voxels have been initialized
void MatLayerCylSet::cloneFromObject | ( | const MatLayerCylSet & | obj, |
char * | newFlatBufferPtr | ||
) |
Initializes from another object, copies data to newBufferPtr
Definition at line 542 of file MatLayerCylSet.cxx.
dump per cell info to the tree
Definition at line 125 of file MatLayerCylSet.cxx.
std::size_t MatLayerCylSet::estimateFlatBufferSize | ( | ) | const |
GPUCA_ALIGPUCODE.
Definition at line 263 of file MatLayerCylSet.cxx.
MatLayerCylSet * MatLayerCylSet::extractCopy | ( | float | rmin, |
float | rmax, | ||
float | tol = 1e-3 |
||
) | const |
Definition at line 584 of file MatLayerCylSet.cxx.
void MatLayerCylSet::finalizeStructures | ( | ) |
Definition at line 95 of file MatLayerCylSet.cxx.
Definition at line 550 of file MatLayerCylSet.cxx.
Definition at line 565 of file MatLayerCylSet.cxx.
void o2::base::MatLayerCylSet::flatten | ( | ) |
|
inlinestaticconstexpr |
Gives minimal alignment in bytes required for the flat buffer.
Definition at line 126 of file MatLayerCylSet.h.
|
inlinestaticconstexpr |
Gives minimal alignment in bytes required for the class object.
Definition at line 124 of file MatLayerCylSet.h.
|
inline |
Definition at line 89 of file MatLayerCylSet.h.
|
inline |
Definition at line 96 of file MatLayerCylSet.h.
o2::base::MatLayerCylSet::GPUd | ( | ) | const & |
|
inline |
Definition at line 64 of file MatLayerCylSet.h.
|
inline |
Definition at line 60 of file MatLayerCylSet.h.
|
inline |
Definition at line 68 of file MatLayerCylSet.h.
|
inline |
Definition at line 71 of file MatLayerCylSet.h.
|
inline |
Definition at line 67 of file MatLayerCylSet.h.
|
inline |
Definition at line 70 of file MatLayerCylSet.h.
|
inline |
Definition at line 69 of file MatLayerCylSet.h.
|
inline |
Definition at line 63 of file MatLayerCylSet.h.
o2::base::MatLayerCylSet::GPUd | ( | ) |
searches a layer based on r2 input, using a lookup table
o2::base::MatLayerCylSet::GPUd | ( | ) |
o2::base::MatLayerCylSet::GPUd | ( | ) |
|
inline |
Definition at line 61 of file MatLayerCylSet.h.
void MatLayerCylSet::initLayerVoxelLU | ( | ) |
Definition at line 178 of file MatLayerCylSet.cxx.
|
static |
Definition at line 202 of file MatLayerCylSet.cxx.
sets buffer pointer to the new address, move the buffer content there.
Definition at line 516 of file MatLayerCylSet.cxx.
void MatLayerCylSet::optimizePhiSlices | ( | float | maxRelDiff = 0.05 | ) |
Definition at line 230 of file MatLayerCylSet.cxx.
< populate layers, using ntrPerCell test tracks per cell
Definition at line 72 of file MatLayerCylSet.cxx.
void MatLayerCylSet::print | ( | bool | data = false | ) | const |
< print layer data
Definition at line 241 of file MatLayerCylSet.cxx.
|
static |
Definition at line 219 of file MatLayerCylSet.cxx.
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.
Sets the actual location of the external flat buffer before it was created
Definition at line 526 of file MatLayerCylSet.cxx.
store to file
Definition at line 166 of file MatLayerCylSet.cxx.
Definition at line 66 of file MatLayerCylSet.h.
float float float float float z1 o2::base::MatLayerCylSet::const |
Definition at line 102 of file MatLayerCylSet.h.
Definition at line 104 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 131 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 129 of file MatLayerCylSet.h.
short& o2::base::MatLayerCylSet::lmin |
Definition at line 66 of file MatLayerCylSet.h.
int o2::base::MatLayerCylSet::low = -1 |
Definition at line 104 of file MatLayerCylSet.h.
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.
uint16_t o2::base::MatLayerCylSet::mLayerVoxelLU[2 *NumVoxels] |
Definition at line 134 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 132 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 130 of file MatLayerCylSet.h.
float float float o2::base::MatLayerCylSet::x1 |
Definition at line 102 of file MatLayerCylSet.h.
float o2::base::MatLayerCylSet::y0 |
Definition at line 102 of file MatLayerCylSet.h.
float float float float o2::base::MatLayerCylSet::y1 |
Definition at line 102 of file MatLayerCylSet.h.
float float o2::base::MatLayerCylSet::z0 |
Definition at line 102 of file MatLayerCylSet.h.