![]() |
Project
|
#include <MatLayerCyl.h>
Inherits o2::gpu::FlatObject.
Public Types | |
| enum | RangeStatus : short { Below = -1 , Within = 0 , Above = 1 } |
Public Member Functions | |
| MatLayerCyl () | |
| MatLayerCyl (const MatLayerCyl &src)=delete | |
| ~MatLayerCyl ()=default | |
| MatLayerCyl (float rMin, float rMax, float zHalfSpan, float dzMin, float drphiMin) | |
| void | initSegmentation (float rMin, float rMax, float zHalfSpan, int nz, int nphi) |
| void | initSegmentation (float rMin, float rMax, float zHalfSpan, float dzMin, float drphiMin) |
| void | populateFromTGeo (int ntrPerCell=10, MatbudGeomBackend backend=MatbudGeomBackend::ROOT) |
| void | populateFromTGeo (int ip, int iz, int ntrPerCell, TGeoNavigator *nav=nullptr, MatbudGeomBackend backend=MatbudGeomBackend::ROOT) |
| void | print (bool data=false) const |
| GPUd () float getRMin() const | |
| GPUd () float getRMax() const | |
| GPUd () float getZMin() const | |
| GPUd () float getZMax() const | |
| GPUd () int getNZBins() const | |
| GPUd () int getNPhiBins() const | |
| GPUd () int getNPhiSlices() const | |
| GPUd () int getNPhiBinsInSlice(int iSlice | |
| GPUd () float getRMin2() const | |
| GPUd () float getRMax2() const | |
| GPUd () float getDZ() const | |
| GPUd () float getDPhi() const | |
| GPUd () const MatCell &getCellPhiBin(int iphi | |
| GPUd () const MatCell &getCell(int iphiSlice | |
| MatCell & | getCellPhiBin (int iphi, int iz) |
| void | scale (float factor, bool _x2x0=true, bool _rho=true) |
| GPUd () RangeStatus isZOutside(float z) const | |
| GPUd () int getZBinID(float z) const | |
| GPUd () float getZBinMin(int id) const | |
| GPUd () float getZBinMax(int id) const | |
| GPUd () int phiBin2Slice(int i) const | |
| GPUd () int getPhiSliceID(float phi) const | |
| GPUd () float getPhiBinMin(int id) const | |
| GPUd () float getPhiBinMax(int id) const | |
| GPUd () float getSliceCos(int i) const | |
| GPUd () float getSliceSin(int i) const | |
| void | getMeanRMS (MatCell &mean, MatCell &rms) const |
| bool | cellsDiffer (const MatCell &cellA, const MatCell &cellB, float maxRelDiff) const |
| bool | canMergePhiSlices (int i, int j, float maxRelDiff=0.05, int maxDifferent=1) const |
| void | optimizePhiSlices (float maxRelDiff=0.05) |
| void | flatten (char *newPtr) |
| std::size_t | estimateFlatBufferSize () const |
| void | fixPointers (char *oldPtr, char *newPtr) |
| void | setFlatPointer (char *ptr) |
| GPUd () int getCellIDPhiBin(int iphi | |
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 std::size_t | estimateFlatBufferSize (int nPhiBins, int nPhiSlices, int nZBins) |
| 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 | |
| int & | binMin |
| int int &binMax | const { return mCells[getCellID(iphiSlice, iz)] |
| int iz | const { return mCells[getCellIDPhiBin(iphi, iz)] |
Protected Member Functions | |
| GPUd () int getNCells() const | |
| GPUd () float getDZInv() const | |
| GPUd () float getDPhiInv() const | |
| GPUd () int getCellID(int iphi | |
| GPUd () int getPhiBinID(float phi) const | |
| GPUd () int getEdgePhiBinOfSlice(int phiBin | |
| while (slice==phiBin2Slice((phiBin+=dir))) | |
| ClassDefNV (MatLayerCyl, 1) | |
| mat.budget per cell | |
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. | |
Protected Attributes | |
| int dir | const |
| return phiBin | dir |
| short | mNZBins |
| number of Z bins | |
| short | mNPhiBins |
| number of phi bins (logical) | |
| short | mNPhiSlices |
| actual number of phi slices | |
| float | mZHalf |
| Z half span. | |
| float | mRMin2 |
| squared min r | |
| float | mRMax2 |
| squared max r | |
| float | mDZ |
| Z slice thickness. | |
| float | mDZInv |
| Z slice thickness inverse. | |
| float | mDPhi |
| phi slice thickness | |
| float | mDPhiInv |
| phi slice thickness inverse | |
| short * | mPhiBin2Slice |
| float * | mSliceCos |
| mapping from analytical phi bin ID to real slice ID | |
| float * | mSliceSin |
| cached cos each phi slice | |
| MatCell * | mCells |
| cached sin each phi slice | |
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 |
Additional Inherited Members | |
Protected Types inherited from o2::gpu::FlatObject | |
| enum | ConstructionState : uint32_t { NotConstructed = 0x0 , Constructed = 0x1 , InProgress = 0x2 } |
| GPUCA_GPUCODE. More... | |
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. | |
Definition at line 54 of file MatLayerCyl.h.
| enum o2::base::MatLayerCyl::RangeStatus : short |
| Enumerator | |
|---|---|
| Below | |
| Within | |
| Above | |
Definition at line 58 of file MatLayerCyl.h.
| MatLayerCyl::MatLayerCyl | ( | ) |
Definition at line 28 of file MatLayerCyl.cxx.
|
delete |
|
default |
| MatLayerCyl::MatLayerCyl | ( | float | rMin, |
| float | rMax, | ||
| float | zHalfSpan, | ||
| float | dzMin, | ||
| float | drphiMin | ||
| ) |
Definition at line 35 of file MatLayerCyl.cxx.
| bool MatLayerCyl::canMergePhiSlices | ( | int | i, |
| int | j, | ||
| float | maxRelDiff = 0.05, |
||
| int | maxDifferent = 1 |
||
| ) | const |
Definition at line 164 of file MatLayerCyl.cxx.
| bool MatLayerCyl::cellsDiffer | ( | const MatCell & | cellA, |
| const MatCell & | cellB, | ||
| float | maxRelDiff | ||
| ) | const |
check if the cells content is different within the tolerance
Definition at line 184 of file MatLayerCyl.cxx.
|
protected |
mat.budget per cell
|
inline |
Definition at line 147 of file MatLayerCyl.h.
|
inlinestatic |
Definition at line 151 of file MatLayerCyl.h.
Definition at line 350 of file MatLayerCyl.cxx.
Definition at line 320 of file MatLayerCyl.cxx.
|
inlinestaticconstexpr |
Gives minimal alignment in bytes required for the flat buffer.
Definition at line 173 of file MatLayerCyl.h.
Definition at line 101 of file MatLayerCyl.h.
|
inlinestaticconstexpr |
Gives minimal alignment in bytes required for the class object.
Definition at line 171 of file MatLayerCyl.h.
Definition at line 266 of file MatLayerCyl.cxx.
| o2::base::MatLayerCyl::GPUd | ( | ) | const & |
| o2::base::MatLayerCyl::GPUd | ( | ) | const & |
|
inline |
Definition at line 94 of file MatLayerCyl.h.
|
inlineprotected |
Definition at line 181 of file MatLayerCyl.h.
|
inline |
Definition at line 93 of file MatLayerCyl.h.
|
inlineprotected |
Definition at line 180 of file MatLayerCyl.h.
|
inline |
Definition at line 132 of file MatLayerCyl.h.
|
inline |
Definition at line 129 of file MatLayerCyl.h.
|
inline |
Definition at line 82 of file MatLayerCyl.h.
|
inline |
Definition at line 92 of file MatLayerCyl.h.
|
inline |
Definition at line 78 of file MatLayerCyl.h.
|
inline |
Definition at line 91 of file MatLayerCyl.h.
|
inline |
Definition at line 135 of file MatLayerCyl.h.
|
inline |
Definition at line 136 of file MatLayerCyl.h.
|
inline |
Definition at line 122 of file MatLayerCyl.h.
|
inline |
Definition at line 119 of file MatLayerCyl.h.
|
inline |
Definition at line 84 of file MatLayerCyl.h.
|
inline |
Definition at line 83 of file MatLayerCyl.h.
|
protected |
| o2::base::MatLayerCyl::GPUd | ( | ) |
|
protected |
|
inlineprotected |
Definition at line 179 of file MatLayerCyl.h.
|
inline |
Definition at line 87 of file MatLayerCyl.h.
| o2::base::MatLayerCyl::GPUd | ( | ) |
|
inline |
Definition at line 88 of file MatLayerCyl.h.
|
inline |
Definition at line 86 of file MatLayerCyl.h.
|
inlineprotected |
Definition at line 187 of file MatLayerCyl.h.
|
inline |
Definition at line 126 of file MatLayerCyl.h.
|
inline |
Definition at line 112 of file MatLayerCyl.h.
|
inline |
Definition at line 125 of file MatLayerCyl.h.
|
inline |
Definition at line 111 of file MatLayerCyl.h.
| void MatLayerCyl::initSegmentation | ( | float | rMin, |
| float | rMax, | ||
| float | zHalfSpan, | ||
| float | dzMin, | ||
| float | drphiMin | ||
| ) |
Definition at line 42 of file MatLayerCyl.cxx.
Definition at line 57 of file MatLayerCyl.cxx.
| void MatLayerCyl::optimizePhiSlices | ( | float | maxRelDiff = 0.05 | ) |
Definition at line 199 of file MatLayerCyl.cxx.
| void MatLayerCyl::populateFromTGeo | ( | int | ip, |
| int | iz, | ||
| int | ntrPerCell, | ||
| TGeoNavigator * | nav = nullptr, |
||
| MatbudGeomBackend | backend = MatbudGeomBackend::ROOT |
||
| ) |
populate cell with info extracted from TGeometry, using ntrPerCell test tracks per cell
Definition at line 126 of file MatLayerCyl.cxx.
| void MatLayerCyl::populateFromTGeo | ( | int | ntrPerCell = 10, |
| MatbudGeomBackend | backend = MatbudGeomBackend::ROOT |
||
| ) |
populate layer with info extracted from TGeometry, using ntrPerCell test tracks per cell
Definition at line 112 of file MatLayerCyl.cxx.
| void MatLayerCyl::print | ( | bool | data = false | ) | const |
< print layer data
Definition at line 292 of file MatLayerCyl.cxx.
| void MatLayerCyl::scale | ( | float | factor, |
| bool | _x2x0 = true, |
||
| bool | _rho = true |
||
| ) |
Definition at line 332 of file MatLayerCyl.cxx.
Definition at line 161 of file MatLayerCyl.h.
|
inlineprotected |
Definition at line 198 of file MatLayerCyl.h.
| int& o2::base::MatLayerCyl::binMin |
Definition at line 89 of file MatLayerCyl.h.
Definition at line 89 of file MatLayerCyl.h.
Definition at line 97 of file MatLayerCyl.h.
Definition at line 193 of file MatLayerCyl.h.
|
protected |
Definition at line 201 of file MatLayerCyl.h.
|
protected |
cached sin each phi slice
Definition at line 223 of file MatLayerCyl.h.
|
protected |
phi slice thickness
Definition at line 215 of file MatLayerCyl.h.
|
protected |
phi slice thickness inverse
Definition at line 216 of file MatLayerCyl.h.
|
protected |
Z slice thickness.
Definition at line 213 of file MatLayerCyl.h.
|
protected |
Z slice thickness inverse.
Definition at line 214 of file MatLayerCyl.h.
|
protected |
number of phi bins (logical)
Definition at line 207 of file MatLayerCyl.h.
|
protected |
actual number of phi slices
Definition at line 208 of file MatLayerCyl.h.
|
protected |
number of Z bins
Definition at line 206 of file MatLayerCyl.h.
|
protected |
Definition at line 218 of file MatLayerCyl.h.
|
protected |
squared max r
Definition at line 212 of file MatLayerCyl.h.
|
protected |
squared min r
Definition at line 211 of file MatLayerCyl.h.
|
protected |
mapping from analytical phi bin ID to real slice ID
Definition at line 220 of file MatLayerCyl.h.
|
protected |
cached cos each phi slice
Definition at line 221 of file MatLayerCyl.h.
|
protected |
Z half span.
Definition at line 210 of file MatLayerCyl.h.