![]() |
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) |
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 | |
![]() | |
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 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 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)] |
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 | |
![]() | |
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 | |
![]() | |
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 | |
![]() | |
enum | ConstructionState : uint32_t { NotConstructed = 0x0 , Constructed = 0x1 , InProgress = 0x2 } |
GPUCA_GPUCODE. More... | |
![]() | |
static constexpr size_t | getClassAlignmentBytes () |
_____________ Memory alignment __________________________ | |
static constexpr size_t | getBufferAlignmentBytes () |
Gives minimal alignment in bytes required for the flat buffer. | |
Definition at line 49 of file MatLayerCyl.h.
Enumerator | |
---|---|
Below | |
Within | |
Above |
Definition at line 53 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 155 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 175 of file MatLayerCyl.cxx.
|
protected |
mat.budget per cell
|
inline |
Definition at line 140 of file MatLayerCyl.h.
|
inlinestatic |
Definition at line 144 of file MatLayerCyl.h.
Definition at line 326 of file MatLayerCyl.cxx.
Definition at line 311 of file MatLayerCyl.cxx.
|
inlinestaticconstexpr |
Gives minimal alignment in bytes required for the flat buffer.
Definition at line 166 of file MatLayerCyl.h.
|
inlinestaticconstexpr |
Gives minimal alignment in bytes required for the class object.
Definition at line 164 of file MatLayerCyl.h.
Definition at line 257 of file MatLayerCyl.cxx.
o2::base::MatLayerCyl::GPUd | ( | ) | const & |
o2::base::MatLayerCyl::GPUd | ( | ) | const & |
|
inline |
Definition at line 89 of file MatLayerCyl.h.
|
inlineprotected |
Definition at line 174 of file MatLayerCyl.h.
|
inline |
Definition at line 88 of file MatLayerCyl.h.
|
inlineprotected |
Definition at line 173 of file MatLayerCyl.h.
|
inline |
Definition at line 125 of file MatLayerCyl.h.
|
inline |
Definition at line 122 of file MatLayerCyl.h.
|
inline |
Definition at line 77 of file MatLayerCyl.h.
|
inline |
Definition at line 87 of file MatLayerCyl.h.
|
inline |
Definition at line 73 of file MatLayerCyl.h.
|
inline |
Definition at line 86 of file MatLayerCyl.h.
|
inline |
Definition at line 128 of file MatLayerCyl.h.
|
inline |
Definition at line 129 of file MatLayerCyl.h.
|
inline |
Definition at line 115 of file MatLayerCyl.h.
|
inline |
Definition at line 112 of file MatLayerCyl.h.
|
inline |
Definition at line 79 of file MatLayerCyl.h.
|
inline |
Definition at line 78 of file MatLayerCyl.h.
|
protected |
o2::base::MatLayerCyl::GPUd | ( | ) |
|
protected |
|
inlineprotected |
Definition at line 172 of file MatLayerCyl.h.
|
inline |
Definition at line 82 of file MatLayerCyl.h.
o2::base::MatLayerCyl::GPUd | ( | ) |
|
inline |
Definition at line 83 of file MatLayerCyl.h.
|
inline |
Definition at line 81 of file MatLayerCyl.h.
|
inlineprotected |
Definition at line 180 of file MatLayerCyl.h.
|
inline |
Definition at line 119 of file MatLayerCyl.h.
|
inline |
Definition at line 105 of file MatLayerCyl.h.
|
inline |
Definition at line 118 of file MatLayerCyl.h.
o2::base::MatLayerCyl::GPUd | ( | ) | & |
|
inline |
Definition at line 104 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 190 of file MatLayerCyl.cxx.
populate cell with info extracted from TGeometry, using ntrPerCell test tracks per cell
Definition at line 126 of file MatLayerCyl.cxx.
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 283 of file MatLayerCyl.cxx.
Definition at line 154 of file MatLayerCyl.h.
|
inlineprotected |
Definition at line 191 of file MatLayerCyl.h.
int& o2::base::MatLayerCyl::binMin |
Definition at line 84 of file MatLayerCyl.h.
Definition at line 84 of file MatLayerCyl.h.
Definition at line 92 of file MatLayerCyl.h.
Definition at line 186 of file MatLayerCyl.h.
|
protected |
Definition at line 194 of file MatLayerCyl.h.
int o2::base::MatLayerCyl::iz |
Definition at line 96 of file MatLayerCyl.h.
|
protected |
cached sin each phi slice
Definition at line 216 of file MatLayerCyl.h.
|
protected |
phi slice thickness
Definition at line 208 of file MatLayerCyl.h.
|
protected |
phi slice thickness inverse
Definition at line 209 of file MatLayerCyl.h.
|
protected |
Z slice thickness.
Definition at line 206 of file MatLayerCyl.h.
|
protected |
Z slice thickness inverse.
Definition at line 207 of file MatLayerCyl.h.
|
protected |
number of phi bins (logical)
Definition at line 200 of file MatLayerCyl.h.
|
protected |
actual number of phi slices
Definition at line 201 of file MatLayerCyl.h.
|
protected |
number of Z bins
Definition at line 199 of file MatLayerCyl.h.
|
protected |
Definition at line 211 of file MatLayerCyl.h.
|
protected |
squared max r
Definition at line 205 of file MatLayerCyl.h.
|
protected |
squared min r
Definition at line 204 of file MatLayerCyl.h.
|
protected |
mapping from analytical phi bin ID to real slice ID
Definition at line 213 of file MatLayerCyl.h.
|
protected |
cached cos each phi slice
Definition at line 214 of file MatLayerCyl.h.
|
protected |
Z half span.
Definition at line 203 of file MatLayerCyl.h.