Project
Loading...
Searching...
No Matches
o2::tpc::CalibdEdxContainer Class Reference

#include <CalibdEdxContainer.h>

Inherits o2::gpu::FlatObject.

Public Member Functions

 CalibdEdxContainer ()=default
 Default constructor: creates an empty uninitialized object.
 
 CalibdEdxContainer (const CalibdEdxContainer &)=delete
 Copy constructor: disabled to avoid ambiguity. Use cloneFromObject() instead.
 
CalibdEdxContaineroperator= (const CalibdEdxContainer &)=delete
 Assignment operator: disabled to avoid ambiguity. Use cloneFromObject() instead.
 
 ~CalibdEdxContainer ()=default
 Destructor.
 
 GPUd () float getTopologyCorrection(const int32_t region
 
 GPUd () float getTopologyCorrection(const int32_t region
 
 GPUd () float getDefaultTopologyCorrection(const float tanTheta
 
float getMinZeroSupresssionThreshold () const
 
float getMaxZeroSupresssionThreshold () const
 
 GPUd () float getZeroSupressionThreshold(const int32_t sector
 
 GPUd () float getGain(const int32_t sector
 
 GPUd () float getResidualGain(const int32_t sector
 
 GPUd () bool isDead(const int32_t sector
 
 GPUd () float getResidualCorrection(const StackID &stack
 
void moveBufferTo (char *newBufferPtr)
 
void destroy ()
 destroy the object (release internal flat buffer)
 
void setActualBufferAddress (char *actualFlatBufferPtr)
 set location of external flat buffer
 
void setFutureBufferAddress (char *futureFlatBufferPtr)
 set future location of the flat buffer
 
void loadPolTopologyCorrectionFromFile (std::string_view fileName)
 ================================================================================================
 
void loadSplineTopologyCorrectionFromFile (std::string_view fileName)
 
void setPolTopologyCorrection (const CalibdEdxTrackTopologyPol &calibTrackTopology)
 
void setDefaultPolTopologyCorrection ()
 setting a default topology correction which just returns 1
 
void setSplineTopologyCorrection (const CalibdEdxTrackTopologySpline &calibTrackTopology)
 
void loadResidualCorrectionFromFile (std::string_view fileName)
 
void setResidualCorrection (const CalibdEdxCorrection &residualCorr)
 
void loadZeroSupresssionThresholdFromFile (std::string_view fileName, std::string_view objName, const float minCorrectionFactor, const float maxCorrectionFactor)
 
void setZeroSupresssionThreshold (const CalDet< float > &thresholdMap)
 
void setZeroSupresssionThreshold (const CalDet< float > &thresholdMap, const float minCorrectionFactor, const float maxCorrectionFactor)
 
void setDeadChannelMap (const CalDet< bool > &deadMap)
 setting the gain map map from a CalDet
 
void setGainMap (const CalDet< float > &gainMap, const float minGain, const float maxGain)
 setting the gain map map from a CalDet
 
void setGainMapResidual (const CalDet< float > &gainMapResidual, const float minResidualGain=0.7f, const float maxResidualGain=1.3f)
 setting the gain map map from a CalDet
 
void setDefaultZeroSupresssionThreshold ()
 
bool isTopologyCorrectionSplinesSet () const
 returns status if the spline correction is set
 
bool isTopologyCorrectionPolynomialsSet () const
 returns status if the polynomials correction is set
 
void setCorrectionCCDB (const CalibsdEdx calib)
 
void disableCorrectionCCDB (const CalibsdEdx calib)
 
bool isCorrectionCCDB (const CalibsdEdx calib) const
 
void setUsageOfFullGainMap (const bool applyFullGainMap)
 
- 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.
 

Public Attributes

const ChargeType chargeT
 
const ChargeType const float tanTheta
 
const ChargeType const float const float sinPhi
 
const ChargeType const float const float const float z
 
const ChargeType const float const float const float const float relPad
 
const ChargeType const float const float const float const float const float relTime
 
const ChargeType const float const float const float const float const float const float threshold
 
const ChargeType const float const float const float const float const float const float const float charge const
 
const ChargeType float x[] const
 
const float sinPhi const { return gpu::CAMath::Sqrt(tanTheta * tanTheta + 1 / (1 - sinPhi * sinPhi))
 
const gpu::tpccf::Row row
 
const gpu::tpccf::Row const gpu::tpccf::Pad pad const { return mThresholdMap.getGainCorrection(sector, row, pad)
 
const ChargeType charge
 
const ChargeType const float tgl = 0
 
const ChargeType const float const float snp
 

Additional Inherited Members

- 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.
 
- 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)
 
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.
 
- 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.
 
- 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
 

Detailed Description

This container class contains all necessary corrections for the dE/dx Currently it holds the residual dE/dx correction and the track topology correction, which can be either provided by 2D-splines or by 5D-polynomials. To be able to correctly use the flat buffer functionality only one of the topology corrections should be set: 2D-splines or by 5D-polynomials! The track topology corrections are set as a nullptr for default as a member. By loading only one of them memory overhead for the classes are avoided and appropriate flat buffer sizes are used.

Definition at line 59 of file CalibdEdxContainer.h.

Constructor & Destructor Documentation

◆ CalibdEdxContainer() [1/2]

o2::tpc::CalibdEdxContainer::CalibdEdxContainer ( )
default

Default constructor: creates an empty uninitialized object.

◆ CalibdEdxContainer() [2/2]

o2::tpc::CalibdEdxContainer::CalibdEdxContainer ( const CalibdEdxContainer )
delete

Copy constructor: disabled to avoid ambiguity. Use cloneFromObject() instead.

◆ ~CalibdEdxContainer()

o2::tpc::CalibdEdxContainer::~CalibdEdxContainer ( )
default

Destructor.

Member Function Documentation

◆ destroy()

void CalibdEdxContainer::destroy ( )

destroy the object (release internal flat buffer)

Definition at line 63 of file CalibdEdxContainer.cxx.

◆ disableCorrectionCCDB()

void o2::tpc::CalibdEdxContainer::disableCorrectionCCDB ( const CalibsdEdx  calib)
inline

disable loading of a correction from CCDB

Parameters
calibcalibration which will not be loaded from CCDB

Definition at line 227 of file CalibdEdxContainer.h.

◆ getMaxZeroSupresssionThreshold()

float CalibdEdxContainer::getMaxZeroSupresssionThreshold ( ) const
Returns
the maximum zero supression threshold for which the track topology correction is valid

Definition at line 136 of file CalibdEdxContainer.cxx.

◆ getMinZeroSupresssionThreshold()

float CalibdEdxContainer::getMinZeroSupresssionThreshold ( ) const
Returns
the minimum zero supression threshold for which the track topology correction is valid

Definition at line 125 of file CalibdEdxContainer.cxx.

◆ GPUd() [1/8]

o2::tpc::CalibdEdxContainer::GPUd ( ) const
Returns
returns if channel is tagged by the dead map
Parameters
sectortpc sector
rowglobal pad row

◆ GPUd() [2/8]

o2::tpc::CalibdEdxContainer::GPUd ( ) const
Returns
returns analytical default correction Correction corresponds to: "sqrt((dz/dx)^2 + (dy/dx)^2 + (dx/dx)^2) / padlength" simple track length correction (ToDo add division by pad length)

◆ GPUd() [3/8]

o2::tpc::CalibdEdxContainer::GPUd ( ) const
Returns
returns gain from the full gain map
Parameters
sectortpc sector
rowglobal pad row

◆ GPUd() [4/8]

o2::tpc::CalibdEdxContainer::GPUd ( ) const &
Returns
returns the residual dE/dx correction for the cluster charge
Parameters
stackID of the GEM stack
chargetype of the charge (qMax or qTot)
zz position
tgltracking parameter tgl

◆ GPUd() [5/8]

o2::tpc::CalibdEdxContainer::GPUd ( ) const
Returns
returns gain from residual gain map
Parameters
sectortpc sector
rowglobal pad row

◆ GPUd() [6/8]

o2::tpc::CalibdEdxContainer::GPUd ( ) const
Returns
returns the topology correction for the cluster charge
Parameters
regionregion of the TPC
chargeTtype of the charge (qMax or qTot)
tanThetalocal inclination angle tanTheta
sinPhisnp track parameter
zz position
relPadrelative pad position of the cluster
relTimerelative time position of the cluster
thresholdzero supression threshold
chargecharge of the cluster

◆ GPUd() [7/8]

o2::tpc::CalibdEdxContainer::GPUd ( ) const
Returns
returns the topology correction for the cluster charge
Parameters
regionregion of the TPC
chargeTtype of the charge (qMax or qTot)
xcoordinates where the correction is evaluated

◆ GPUd() [8/8]

o2::tpc::CalibdEdxContainer::GPUd ( ) const
Returns
returns zero supression threshold
Parameters
sectortpc sector
rowglobal pad row

◆ isCorrectionCCDB()

bool o2::tpc::CalibdEdxContainer::isCorrectionCCDB ( const CalibsdEdx  calib) const
inline

check if a correction will be loaded from CCDB

Parameters
calibcalibration which will be loaded from CCDB

Definition at line 231 of file CalibdEdxContainer.h.

◆ isTopologyCorrectionPolynomialsSet()

bool o2::tpc::CalibdEdxContainer::isTopologyCorrectionPolynomialsSet ( ) const
inline

returns status if the polynomials correction is set

Definition at line 219 of file CalibdEdxContainer.h.

◆ isTopologyCorrectionSplinesSet()

bool o2::tpc::CalibdEdxContainer::isTopologyCorrectionSplinesSet ( ) const
inline

returns status if the spline correction is set

Definition at line 216 of file CalibdEdxContainer.h.

◆ loadPolTopologyCorrectionFromFile()

void CalibdEdxContainer::loadPolTopologyCorrectionFromFile ( std::string_view  fileName)

================================================================================================

Parameters
fileNameinput file containing the correction

Definition at line 147 of file CalibdEdxContainer.cxx.

◆ loadResidualCorrectionFromFile()

void o2::tpc::CalibdEdxContainer::loadResidualCorrectionFromFile ( std::string_view  fileName)
inline
Parameters
fileNameinput file containing the correction

Definition at line 184 of file CalibdEdxContainer.h.

◆ loadSplineTopologyCorrectionFromFile()

void CalibdEdxContainer::loadSplineTopologyCorrectionFromFile ( std::string_view  fileName)
Parameters
fileNameinput file containing the correction

Definition at line 152 of file CalibdEdxContainer.cxx.

◆ loadZeroSupresssionThresholdFromFile()

void CalibdEdxContainer::loadZeroSupresssionThresholdFromFile ( std::string_view  fileName,
std::string_view  objName,
const float  minCorrectionFactor,
const float  maxCorrectionFactor 
)
Parameters
fileNameinput file containing the CalDet map

Definition at line 177 of file CalibdEdxContainer.cxx.

◆ moveBufferTo()

void CalibdEdxContainer::moveBufferTo ( char newBufferPtr)

move flat buffer to new location

Parameters
newBufferPtrnew buffer location

Definition at line 54 of file CalibdEdxContainer.cxx.

◆ operator=()

CalibdEdxContainer & o2::tpc::CalibdEdxContainer::operator= ( const CalibdEdxContainer )
delete

Assignment operator: disabled to avoid ambiguity. Use cloneFromObject() instead.

◆ setActualBufferAddress()

void CalibdEdxContainer::setActualBufferAddress ( char actualFlatBufferPtr)

set location of external flat buffer

Definition at line 76 of file CalibdEdxContainer.cxx.

◆ setCorrectionCCDB()

void o2::tpc::CalibdEdxContainer::setCorrectionCCDB ( const CalibsdEdx  calib)
inline

set loading of a correction from CCDB

Parameters
calibcalibration which will be loaded from CCDB

Definition at line 223 of file CalibdEdxContainer.h.

◆ setDeadChannelMap()

void CalibdEdxContainer::setDeadChannelMap ( const CalDet< bool > &  deadMap)

setting the gain map map from a CalDet

Definition at line 245 of file CalibdEdxContainer.cxx.

◆ setDefaultPolTopologyCorrection()

void CalibdEdxContainer::setDefaultPolTopologyCorrection ( )

setting a default topology correction which just returns 1

Definition at line 163 of file CalibdEdxContainer.cxx.

◆ setDefaultZeroSupresssionThreshold()

void CalibdEdxContainer::setDefaultZeroSupresssionThreshold ( )

setting default zero supression threshold map (all values are set to getMinZeroSupresssionThreshold())

Parameters
fileNameinput file containing the CalDet map

Definition at line 262 of file CalibdEdxContainer.cxx.

◆ setFutureBufferAddress()

void CalibdEdxContainer::setFutureBufferAddress ( char futureFlatBufferPtr)

set future location of the flat buffer

Definition at line 99 of file CalibdEdxContainer.cxx.

◆ setGainMap()

void CalibdEdxContainer::setGainMap ( const CalDet< float > &  gainMap,
const float  minGain,
const float  maxGain 
)

setting the gain map map from a CalDet

Definition at line 250 of file CalibdEdxContainer.cxx.

◆ setGainMapResidual()

void CalibdEdxContainer::setGainMapResidual ( const CalDet< float > &  gainMapResidual,
const float  minResidualGain = 0.7f,
const float  maxResidualGain = 1.3f 
)

setting the gain map map from a CalDet

Definition at line 256 of file CalibdEdxContainer.cxx.

◆ setPolTopologyCorrection()

void CalibdEdxContainer::setPolTopologyCorrection ( const CalibdEdxTrackTopologyPol calibTrackTopology)

set the polynomial track topology

Parameters
calibTrackTopologypolynomial track topology correction

Definition at line 157 of file CalibdEdxContainer.cxx.

◆ setResidualCorrection()

void o2::tpc::CalibdEdxContainer::setResidualCorrection ( const CalibdEdxCorrection residualCorr)
inline

setting the residual dEdx correction

Parameters
residualCorrresidual gain calibration object

Definition at line 188 of file CalibdEdxContainer.h.

◆ setSplineTopologyCorrection()

void CalibdEdxContainer::setSplineTopologyCorrection ( const CalibdEdxTrackTopologySpline calibTrackTopology)

set the spline track topology

Parameters
calibTrackTopologyspline track topology correction

Definition at line 171 of file CalibdEdxContainer.cxx.

◆ setUsageOfFullGainMap()

void o2::tpc::CalibdEdxContainer::setUsageOfFullGainMap ( const bool  applyFullGainMap)
inline
Parameters
applyFullGainMapif set to true the cluster charge will be corrected with the full gain map

Definition at line 234 of file CalibdEdxContainer.h.

◆ setZeroSupresssionThreshold() [1/2]

void o2::tpc::CalibdEdxContainer::setZeroSupresssionThreshold ( const CalDet< float > &  thresholdMap)
inline

setting the zero supression threshold map from a CalDet

Parameters
thresholdMapCalDet containing the zero supression threshold

Definition at line 196 of file CalibdEdxContainer.h.

◆ setZeroSupresssionThreshold() [2/2]

void CalibdEdxContainer::setZeroSupresssionThreshold ( const CalDet< float > &  thresholdMap,
const float  minCorrectionFactor,
const float  maxCorrectionFactor 
)

setting the zero supression threshold map from a CalDet

Parameters
thresholdMapCalDet containing the zero supression threshold

Definition at line 186 of file CalibdEdxContainer.cxx.

Member Data Documentation

◆ charge

const ChargeType o2::tpc::CalibdEdxContainer::charge

Definition at line 137 of file CalibdEdxContainer.h.

◆ chargeT

const ChargeType o2::tpc::CalibdEdxContainer::chargeT

Definition at line 86 of file CalibdEdxContainer.h.

◆ const [1/4]

const gpu::tpccf::Row const gpu::tpccf::Pad pad o2::tpc::CalibdEdxContainer::const
Initial value:
{
return mCalibTrackTopologyPol ? mCalibTrackTopologyPol->getCorrection(region, chargeT, tanTheta, sinPhi, z, relPad, relTime, threshold, charge) : (mCalibTrackTopologySpline ? mCalibTrackTopologySpline->getCorrection(region, chargeT, tanTheta, sinPhi, z) : getDefaultTopologyCorrection(tanTheta, sinPhi))
const ChargeType const float const float const float const float relPad
const ChargeType const float tanTheta
const ChargeType const float const float const float const float const float const float threshold
const ChargeType const float const float const float const float const float relTime
const ChargeType const float const float sinPhi
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843

Definition at line 86 of file CalibdEdxContainer.h.

◆ const [2/4]

const ChargeType float x [] o2::tpc::CalibdEdxContainer::const
Initial value:
{
return mCalibTrackTopologyPol ? mCalibTrackTopologyPol->getCorrection(region, chargeT, x) : (mCalibTrackTopologySpline ? mCalibTrackTopologySpline->getCorrection(region, chargeT, x) : getDefaultTopologyCorrection(x[0], x[1]))
GLint GLenum GLint x
Definition glcorearb.h:403

Definition at line 95 of file CalibdEdxContainer.h.

◆ const [3/4]

const float sinPhi o2::tpc::CalibdEdxContainer::const { return gpu::CAMath::Sqrt(tanTheta * tanTheta + 1 / (1 - sinPhi * sinPhi))

Definition at line 102 of file CalibdEdxContainer.h.

◆ const [4/4]

const gpu::tpccf::Row const gpu::tpccf::Pad pad o2::tpc::CalibdEdxContainer::const { return mThresholdMap.getGainCorrection(sector, row, pad)

Definition at line 115 of file CalibdEdxContainer.h.

◆ relPad

const ChargeType const float const float const float const float o2::tpc::CalibdEdxContainer::relPad

Definition at line 86 of file CalibdEdxContainer.h.

◆ relTime

const ChargeType const float const float const float const float const float o2::tpc::CalibdEdxContainer::relTime

Definition at line 86 of file CalibdEdxContainer.h.

◆ row

const gpu::tpccf::Row o2::tpc::CalibdEdxContainer::row

Definition at line 115 of file CalibdEdxContainer.h.

◆ sinPhi

const ChargeType const float const float o2::tpc::CalibdEdxContainer::sinPhi

Definition at line 86 of file CalibdEdxContainer.h.

◆ snp

const ChargeType const float const float o2::tpc::CalibdEdxContainer::snp
Initial value:
= 0) const { return mCalibResidualdEdx.getCorrection(stack, charge, tgl, snp); }
GPUd() bool isUsageOfFullGainMap() const { return mApplyFullGainMap; }
void cloneFromObject(const CalibdEdxContainer& obj, char* newFlatBufferPtr)
uint32_t stack
Definition RawData.h:1
void cloneFromObject(const FlatObject &obj, char *newFlatBufferPtr)
Definition FlatObject.h:373
const ChargeType const float tgl
GPUd() float getTopologyCorrection(const int32_t region
const ChargeType const float const float snp

Definition at line 137 of file CalibdEdxContainer.h.

◆ tanTheta

const ChargeType const float o2::tpc::CalibdEdxContainer::tanTheta

Definition at line 86 of file CalibdEdxContainer.h.

◆ tgl

const ChargeType const float o2::tpc::CalibdEdxContainer::tgl = 0

Definition at line 137 of file CalibdEdxContainer.h.

◆ threshold

const ChargeType const float const float const float const float const float const float o2::tpc::CalibdEdxContainer::threshold

Definition at line 86 of file CalibdEdxContainer.h.

◆ z

const ChargeType const float const float const float o2::tpc::CalibdEdxContainer::z

Definition at line 86 of file CalibdEdxContainer.h.


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