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

#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)
 
void populateFromTGeo (int ip, int iz, int ntrPerCell)
 
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
 
 GPUd () MatCell &getCellPhiBin(int iphi
 
 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
 
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 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 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

intbinMin
 
int int &binMax const { return mCells[getCellID(iphiSlice, iz)]
 
int iz const { return mCells[getCellIDPhiBin(iphi, iz)]
 
int 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)
 
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.
 

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
 
shortmPhiBin2Slice
 
float * mSliceCos
 mapping from analytical phi bin ID to real slice ID
 
float * mSliceSin
 cached cos each phi slice
 
MatCellmCells
 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
 
charmFlatBufferContainer = nullptr
 
charmFlatBufferPtr = 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 ()
 _____________ Memory alignment __________________________
 
static constexpr size_t getBufferAlignmentBytes ()
 Gives minimal alignment in bytes required for the flat buffer.
 

Detailed Description

Definition at line 49 of file MatLayerCyl.h.

Member Enumeration Documentation

◆ RangeStatus

Enumerator
Below 
Within 
Above 

Definition at line 53 of file MatLayerCyl.h.

Constructor & Destructor Documentation

◆ MatLayerCyl() [1/3]

MatLayerCyl::MatLayerCyl ( )

Definition at line 28 of file MatLayerCyl.cxx.

◆ MatLayerCyl() [2/3]

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

◆ ~MatLayerCyl()

o2::base::MatLayerCyl::~MatLayerCyl ( )
default

◆ MatLayerCyl() [3/3]

MatLayerCyl::MatLayerCyl ( float  rMin,
float  rMax,
float  zHalfSpan,
float  dzMin,
float  drphiMin 
)

Definition at line 35 of file MatLayerCyl.cxx.

Member Function Documentation

◆ canMergePhiSlices()

bool MatLayerCyl::canMergePhiSlices ( int  i,
int  j,
float  maxRelDiff = 0.05,
int  maxDifferent = 1 
) const

Definition at line 155 of file MatLayerCyl.cxx.

◆ cellsDiffer()

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 175 of file MatLayerCyl.cxx.

◆ ClassDefNV()

o2::base::MatLayerCyl::ClassDefNV ( MatLayerCyl  ,
 
)
protected

mat.budget per cell

◆ estimateFlatBufferSize() [1/2]

std::size_t o2::base::MatLayerCyl::estimateFlatBufferSize ( ) const
inline

Definition at line 140 of file MatLayerCyl.h.

◆ estimateFlatBufferSize() [2/2]

static std::size_t o2::base::MatLayerCyl::estimateFlatBufferSize ( int  nPhiBins,
int  nPhiSlices,
int  nZBins 
)
inlinestatic

Definition at line 144 of file MatLayerCyl.h.

◆ fixPointers()

void MatLayerCyl::fixPointers ( char oldPtr,
char newPtr 
)

Definition at line 326 of file MatLayerCyl.cxx.

◆ flatten()

void MatLayerCyl::flatten ( char newPtr)

Definition at line 311 of file MatLayerCyl.cxx.

◆ getBufferAlignmentBytes()

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

Gives minimal alignment in bytes required for the flat buffer.

Definition at line 166 of file MatLayerCyl.h.

◆ getClassAlignmentBytes()

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

Gives minimal alignment in bytes required for the class object.

Definition at line 164 of file MatLayerCyl.h.

◆ getMeanRMS()

void MatLayerCyl::getMeanRMS ( MatCell mean,
MatCell rms 
) const

Definition at line 257 of file MatLayerCyl.cxx.

◆ GPUd() [1/32]

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

◆ GPUd() [2/32]

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

◆ GPUd() [3/32]

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

Definition at line 89 of file MatLayerCyl.h.

◆ GPUd() [4/32]

o2::base::MatLayerCyl::GPUd ( ) const
inlineprotected

Definition at line 174 of file MatLayerCyl.h.

◆ GPUd() [5/32]

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

Definition at line 88 of file MatLayerCyl.h.

◆ GPUd() [6/32]

o2::base::MatLayerCyl::GPUd ( ) const
inlineprotected

Definition at line 173 of file MatLayerCyl.h.

◆ GPUd() [7/32]

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

Definition at line 125 of file MatLayerCyl.h.

◆ GPUd() [8/32]

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

Definition at line 122 of file MatLayerCyl.h.

◆ GPUd() [9/32]

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

Definition at line 77 of file MatLayerCyl.h.

◆ GPUd() [10/32]

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

Definition at line 87 of file MatLayerCyl.h.

◆ GPUd() [11/32]

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

Definition at line 73 of file MatLayerCyl.h.

◆ GPUd() [12/32]

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

Definition at line 86 of file MatLayerCyl.h.

◆ GPUd() [13/32]

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

Definition at line 128 of file MatLayerCyl.h.

◆ GPUd() [14/32]

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

Definition at line 129 of file MatLayerCyl.h.

◆ GPUd() [15/32]

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

Definition at line 115 of file MatLayerCyl.h.

◆ GPUd() [16/32]

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

Definition at line 112 of file MatLayerCyl.h.

◆ GPUd() [17/32]

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

Definition at line 79 of file MatLayerCyl.h.

◆ GPUd() [18/32]

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

Definition at line 78 of file MatLayerCyl.h.

◆ GPUd() [19/32]

o2::base::MatLayerCyl::GPUd ( )
protected

◆ GPUd() [20/32]

o2::base::MatLayerCyl::GPUd ( )

◆ GPUd() [21/32]

o2::base::MatLayerCyl::GPUd ( )
protected

◆ GPUd() [22/32]

o2::base::MatLayerCyl::GPUd ( ) const
inlineprotected

Definition at line 172 of file MatLayerCyl.h.

◆ GPUd() [23/32]

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

Definition at line 82 of file MatLayerCyl.h.

◆ GPUd() [24/32]

o2::base::MatLayerCyl::GPUd ( )

◆ GPUd() [25/32]

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

Definition at line 83 of file MatLayerCyl.h.

◆ GPUd() [26/32]

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

Definition at line 81 of file MatLayerCyl.h.

◆ GPUd() [27/32]

o2::base::MatLayerCyl::GPUd ( ) const
inlineprotected

Definition at line 180 of file MatLayerCyl.h.

◆ GPUd() [28/32]

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

Definition at line 119 of file MatLayerCyl.h.

◆ GPUd() [29/32]

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

Definition at line 105 of file MatLayerCyl.h.

◆ GPUd() [30/32]

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

Definition at line 118 of file MatLayerCyl.h.

◆ GPUd() [31/32]

o2::base::MatLayerCyl::GPUd ( ) &

◆ GPUd() [32/32]

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

Definition at line 104 of file MatLayerCyl.h.

◆ initSegmentation() [1/2]

void MatLayerCyl::initSegmentation ( float  rMin,
float  rMax,
float  zHalfSpan,
float  dzMin,
float  drphiMin 
)

Definition at line 42 of file MatLayerCyl.cxx.

◆ initSegmentation() [2/2]

void MatLayerCyl::initSegmentation ( float  rMin,
float  rMax,
float  zHalfSpan,
int  nz,
int  nphi 
)

Definition at line 57 of file MatLayerCyl.cxx.

◆ optimizePhiSlices()

void MatLayerCyl::optimizePhiSlices ( float  maxRelDiff = 0.05)

Definition at line 190 of file MatLayerCyl.cxx.

◆ populateFromTGeo() [1/2]

void MatLayerCyl::populateFromTGeo ( int  ip,
int  iz,
int  ntrPerCell 
)

populate cell with info extracted from TGeometry, using ntrPerCell test tracks per cell

Definition at line 126 of file MatLayerCyl.cxx.

◆ populateFromTGeo() [2/2]

void MatLayerCyl::populateFromTGeo ( int  ntrPerCell = 10)

populate layer with info extracted from TGeometry, using ntrPerCell test tracks per cell

Definition at line 112 of file MatLayerCyl.cxx.

◆ print()

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

< print layer data

Definition at line 283 of file MatLayerCyl.cxx.

◆ setFlatPointer()

void o2::base::MatLayerCyl::setFlatPointer ( char ptr)
inline

Definition at line 154 of file MatLayerCyl.h.

◆ while()

o2::base::MatLayerCyl::while ( slice  = = phiBin2Slice((phiBin += dir)))
inlineprotected

Definition at line 191 of file MatLayerCyl.h.

Member Data Documentation

◆ binMin

int& o2::base::MatLayerCyl::binMin

Definition at line 84 of file MatLayerCyl.h.

◆ const [1/3]

int iz o2::base::MatLayerCyl::const { return mCells[getCellID(iphiSlice, iz)]

Definition at line 84 of file MatLayerCyl.h.

◆ const [2/3]

int iz o2::base::MatLayerCyl::const { return mCells[getCellIDPhiBin(iphi, iz)]

Definition at line 92 of file MatLayerCyl.h.

◆ const [3/3]

int dir o2::base::MatLayerCyl::const
protected
Initial value:
{
auto slice = phiBin2Slice(phiBin)

Definition at line 186 of file MatLayerCyl.h.

◆ dir

return phiBin o2::base::MatLayerCyl::dir
protected

Definition at line 194 of file MatLayerCyl.h.

◆ iz

int o2::base::MatLayerCyl::iz
Initial value:
{
return mCells[getCellIDPhiBin(iphi, iz)]
MatCell * mCells
cached sin each phi slice

Definition at line 96 of file MatLayerCyl.h.

◆ mCells

MatCell* o2::base::MatLayerCyl::mCells
protected

cached sin each phi slice

Definition at line 216 of file MatLayerCyl.h.

◆ mDPhi

float o2::base::MatLayerCyl::mDPhi
protected

phi slice thickness

Definition at line 208 of file MatLayerCyl.h.

◆ mDPhiInv

float o2::base::MatLayerCyl::mDPhiInv
protected

phi slice thickness inverse

Definition at line 209 of file MatLayerCyl.h.

◆ mDZ

float o2::base::MatLayerCyl::mDZ
protected

Z slice thickness.

Definition at line 206 of file MatLayerCyl.h.

◆ mDZInv

float o2::base::MatLayerCyl::mDZInv
protected

Z slice thickness inverse.

Definition at line 207 of file MatLayerCyl.h.

◆ mNPhiBins

short o2::base::MatLayerCyl::mNPhiBins
protected

number of phi bins (logical)

Definition at line 200 of file MatLayerCyl.h.

◆ mNPhiSlices

short o2::base::MatLayerCyl::mNPhiSlices
protected

actual number of phi slices

Definition at line 201 of file MatLayerCyl.h.

◆ mNZBins

short o2::base::MatLayerCyl::mNZBins
protected

number of Z bins

Definition at line 199 of file MatLayerCyl.h.

◆ mPhiBin2Slice

short* o2::base::MatLayerCyl::mPhiBin2Slice
protected

Definition at line 211 of file MatLayerCyl.h.

◆ mRMax2

float o2::base::MatLayerCyl::mRMax2
protected

squared max r

Definition at line 205 of file MatLayerCyl.h.

◆ mRMin2

float o2::base::MatLayerCyl::mRMin2
protected

squared min r

Definition at line 204 of file MatLayerCyl.h.

◆ mSliceCos

float* o2::base::MatLayerCyl::mSliceCos
protected

mapping from analytical phi bin ID to real slice ID

Definition at line 213 of file MatLayerCyl.h.

◆ mSliceSin

float* o2::base::MatLayerCyl::mSliceSin
protected

cached cos each phi slice

Definition at line 214 of file MatLayerCyl.h.

◆ mZHalf

float o2::base::MatLayerCyl::mZHalf
protected

Z half span.

Definition at line 203 of file MatLayerCyl.h.


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