![]() |
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, int nThreads=-1, MatbudGeomBackend backend=MatbudGeomBackend::ROOT) |
| 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 MatLayerCylSet *toAdd=nullptr) const |
| void | finalizeStructures () |
| MatBudget | getMatBudget (const math_utils::Point3D< float > &point0, const math_utils::Point3D< float > &point1) const |
| void | scaleLayersByID (int lrFrom, int lrTo, float factor, bool _x2x0=true, bool _rho=true) |
| void | scaleLayersByR (float rFrom, float rTo, float factor, bool _x2x0=true, bool _rho=true) |
| 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 | |
| GPUd () int resolveLayerRange(float r2 | |
| resolves a layer from an already loaded lookup-table entry | |
| GPUd () int voxelIndex(float r2) const | |
| voxel holding this radius; the caller must have checked that r2 is inside the LUT | |
| GPUd () static const expr float voxelRMin(int voxel) | |
| Radial boundaries of a voxel. | |
| GPUd () static const expr float voxelRMax(int voxel) | |
| 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 | |
| FlatObject & | operator= (const FlatObject &)=delete |
| template<typename T > | |
| T * | resizeArray (T *&ptr, int32_t oldSize, int32_t newSize, T *newPtr=nullptr) |
| template<typename T > | |
| T ** | resizeArray (T **&ptr, int32_t oldSize, int32_t newSize, T **newPtr=nullptr) |
| void | destroy () |
| _______________ Utilities _______________________________________________ | |
| GPUdi () size_t getFlatBufferSize() const | |
| Gives size of the flat buffer. | |
| GPUdi () 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 int | getNThreadsFromEnv () |
| 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 Public Member Functions inherited from o2::gpu::FlatObject | |
| static constexpr 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 |
| int | voxel |
| int uint16_t entry | const |
| uint16_t | mLayerVoxelLU [NumVoxels] |
| bool | mInitializedLayerVoxelLU = false |
| first interval based on known radius, plus the ambiguity flag (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) |
| static constexpr uint16_t | VoxelAmbiguousBit = 0x8000u |
| static constexpr uint16_t | VoxelSegmentMask = 0x7fffu |
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) |
| 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 Protected Member Functions inherited from o2::gpu::FlatObject | |
| static constexpr size_t | getClassAlignmentBytes () |
| GPUCA_GPUCODE. | |
| 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 | |
| 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 41 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 730 of file MatLayerCylSet.cxx.
dump per cell info to the tree
Definition at line 258 of file MatLayerCylSet.cxx.
| std::size_t MatLayerCylSet::estimateFlatBufferSize | ( | ) | const |
GPUCA_ALIGPUCODE.
Definition at line 426 of file MatLayerCylSet.cxx.
| MatLayerCylSet * MatLayerCylSet::extractCopy | ( | float | rmin, |
| float | rmax, | ||
| float | tol = 1e-3, |
||
| const MatLayerCylSet * | toAdd = nullptr |
||
| ) | const |
Definition at line 777 of file MatLayerCylSet.cxx.
| void MatLayerCylSet::finalizeStructures | ( | ) |
Definition at line 228 of file MatLayerCylSet.cxx.
Definition at line 743 of file MatLayerCylSet.cxx.
Definition at line 758 of file MatLayerCylSet.cxx.
| void o2::base::MatLayerCylSet::flatten | ( | ) |
|
inlinestaticconstexpr |
Gives minimal alignment in bytes required for the flat buffer.
Definition at line 145 of file MatLayerCylSet.h.
|
inlinestaticconstexpr |
Gives minimal alignment in bytes required for the class object.
Definition at line 143 of file MatLayerCylSet.h.
|
inline |
Definition at line 94 of file MatLayerCylSet.h.
|
inline |
Definition at line 101 of file MatLayerCylSet.h.
|
static |
< number of threads requested via NTHREADS_MATBUD, or 1 if unset/invalid
Definition at line 81 of file MatLayerCylSet.cxx.
| 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 | ( | ) |
resolves a layer from an already loaded lookup-table entry
| o2::base::MatLayerCylSet::GPUd | ( | ) |
searches a layer based on r2 input, using a lookup table
| o2::base::MatLayerCylSet::GPUd | ( | ) |
|
inline |
voxel holding this radius; the caller must have checked that r2 is inside the LUT
Definition at line 122 of file MatLayerCylSet.h.
| o2::base::MatLayerCylSet::GPUd | ( | ) |
|
inline |
Definition at line 61 of file MatLayerCylSet.h.
|
inline |
Definition at line 126 of file MatLayerCylSet.h.
|
inline |
Radial boundaries of a voxel.
Definition at line 125 of file MatLayerCylSet.h.
| void MatLayerCylSet::initLayerVoxelLU | ( | ) |
Definition at line 311 of file MatLayerCylSet.cxx.
|
static |
Definition at line 338 of file MatLayerCylSet.cxx.
sets buffer pointer to the new address, move the buffer content there.
Definition at line 704 of file MatLayerCylSet.cxx.
| void MatLayerCylSet::optimizePhiSlices | ( | float | maxRelDiff = 0.05 | ) |
Definition at line 366 of file MatLayerCylSet.cxx.
| void MatLayerCylSet::populateFromTGeo | ( | int | ntrPerCel = 10, |
| int | nThreads = -1, |
||
| MatbudGeomBackend | backend = MatbudGeomBackend::ROOT |
||
| ) |
Populate the LUT from TGeo or VecGeom. nThreads > 1 fills cells in parallel (one TGeoNavigator per thread for ROOT; VecGeom navigation is thread-safe on its own); nThreads < 0 takes the count from NTHREADS_MATBUD. VECGEOM requires O2 built against TGeo2VecGeom, see GeometryManager::isVecGeomAvailable().
< populate layers, using ntrPerCell test tracks per cell. nThreads < 0 takes the number of threads from the NTHREADS_MATBUD environment variable.
Definition at line 97 of file MatLayerCylSet.cxx.
| void MatLayerCylSet::print | ( | bool | data = false | ) | const |
< print layer data
Definition at line 377 of file MatLayerCylSet.cxx.
|
static |
Definition at line 355 of file MatLayerCylSet.cxx.
| void MatLayerCylSet::scaleLayersByID | ( | int | lrFrom, |
| int | lrTo, | ||
| float | factor, | ||
| bool | _x2x0 = true, |
||
| bool | _rho = true |
||
| ) |
Definition at line 396 of file MatLayerCylSet.cxx.
| void MatLayerCylSet::scaleLayersByR | ( | float | rFrom, |
| float | rTo, | ||
| float | factor, | ||
| bool | _x2x0 = true, |
||
| bool | _rho = true |
||
| ) |
Definition at line 408 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 723 of file MatLayerCylSet.cxx.
Sets the actual location of the external flat buffer before it was created
Definition at line 714 of file MatLayerCylSet.cxx.
store to file
Definition at line 299 of file MatLayerCylSet.cxx.
| short short& lmax o2::base::MatLayerCylSet::const |
Definition at line 66 of file MatLayerCylSet.h.
| float float float float float z1 o2::base::MatLayerCylSet::const |
Definition at line 111 of file MatLayerCylSet.h.
Definition at line 119 of file MatLayerCylSet.h.
Definition at line 113 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 150 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 148 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 113 of file MatLayerCylSet.h.
| bool o2::base::MatLayerCylSet::mInitializedLayerVoxelLU = false |
first interval based on known radius, plus the ambiguity flag (static dimension for easy copy to GPU)
Definition at line 156 of file MatLayerCylSet.h.
| uint16_t o2::base::MatLayerCylSet::mLayerVoxelLU[NumVoxels] |
Definition at line 155 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 151 of file MatLayerCylSet.h.
| int o2::base::MatLayerCylSet::voxel |
Definition at line 119 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 152 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 149 of file MatLayerCylSet.h.
|
staticconstexpr |
Definition at line 153 of file MatLayerCylSet.h.
| float float float o2::base::MatLayerCylSet::x1 |
Definition at line 111 of file MatLayerCylSet.h.
| float o2::base::MatLayerCylSet::y0 |
Definition at line 111 of file MatLayerCylSet.h.
| float float float float o2::base::MatLayerCylSet::y1 |
Definition at line 111 of file MatLayerCylSet.h.
| float float o2::base::MatLayerCylSet::z0 |
Definition at line 111 of file MatLayerCylSet.h.