16#ifndef ALICEO2_TPC_CALIBDEDXCONTAINER_H_
17#define ALICEO2_TPC_CALIBDEDXCONTAINER_H_
29#ifndef GPUCA_ALIGPUCODE
88 return mCalibTrackTopologyPol ? mCalibTrackTopologyPol->getCorrection(region,
chargeT,
tanTheta,
sinPhi,
z,
relPad,
relTime,
threshold,
charge) : (mCalibTrackTopologySpline ? mCalibTrackTopologySpline->getCorrection(region,
chargeT,
tanTheta,
sinPhi,
z) : getDefaultTopologyCorrection(
tanTheta,
sinPhi));
97 return mCalibTrackTopologyPol ? mCalibTrackTopologyPol->getCorrection(region,
chargeT,
x) : (mCalibTrackTopologySpline ? mCalibTrackTopologySpline->getCorrection(region,
chargeT,
x) : getDefaultTopologyCorrection(
x[0],
x[1]));
104#if !defined(GPUCA_GPUCODE)
115 GPUd() float getZeroSupressionThreshold(
const int32_t sector,
const gpu::tpccf::Row
row,
const gpu::tpccf::Pad pad)
const {
return mThresholdMap.getGainCorrection(sector,
row, pad); }
120 GPUd() float getGain(
const int32_t sector,
const gpu::tpccf::Row
row,
const gpu::tpccf::Pad pad)
const {
return mGainMap.getGainCorrection(sector,
row, pad); }
125 GPUd() float getResidualGain(
const int32_t sector,
const gpu::tpccf::Row
row,
const gpu::tpccf::Pad pad)
const {
return mGainMapResidual.getGainCorrection(sector,
row, pad); }
130 GPUd() bool isDead(
const int32_t sector,
const gpu::tpccf::Row
row,
const gpu::tpccf::Pad pad)
const {
return mDeadChannelMap.isSet(sector,
row, pad); }
140 GPUd() bool isUsageOfFullGainMap()
const {
return mApplyFullGainMap; }
143#if !defined(GPUCA_GPUCODE)
162#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
239 CalibdEdxTrackTopologyPol* mCalibTrackTopologyPol{
nullptr};
244 CalibdEdxCorrection mCalibResidualdEdx{};
245 bool mApplyFullGainMap{
false};
250#if !defined(GPUCA_GPUCODE)
251 template <
class Type>
252 std::size_t sizeOfCalibdEdxTrackTopologyObj()
const
257 template <
class Type>
258 void loadTopologyCorrectionFromFile(std::string_view fileName, Type*& obj);
260 template <
class Type>
261 void setTopologyCorrection(
const Type& calibTrackTopologyTmp, Type*& obj);
264 template <
class Type>
267 template <
class Type>
270#if !defined(GPUCA_GPUCODE)
271 template <
class Type>
272 void subobjectCloneFromObject(Type*& obj,
const Type* objOld);
280 CalDet<float> processThresholdMap(
const CalDet<float>& thresholdMap,
const float maxThreshold,
const int32_t nPadsInRowCl = 2,
const int32_t nPadsInPadCl = 2)
const;
Definition of FlatObject class.
static size_t alignSize(size_t sizeBytes, size_t alignmentBytes)
_______________ Generic utilities _______________________________________________
void cloneFromObject(const FlatObject &obj, char *newFlatBufferPtr)
static constexpr size_t getClassAlignmentBytes()
_____________ Memory alignment __________________________
CalibdEdxContainer(const CalibdEdxContainer &)=delete
Copy constructor: disabled to avoid ambiguity. Use cloneFromObject() instead.
void disableCorrectionCCDB(const CalibsdEdx calib)
void loadSplineTopologyCorrectionFromFile(std::string_view fileName)
void setDefaultZeroSupresssionThreshold()
void setGainMap(const CalDet< float > &gainMap, const float minGain, const float maxGain)
setting the gain map map from a CalDet
void loadPolTopologyCorrectionFromFile(std::string_view fileName)
================================================================================================
const gpu::tpccf::Row row
const ChargeType const float const float const float const float relPad
const ChargeType const float tanTheta
void setPolTopologyCorrection(const CalibdEdxTrackTopologyPol &calibTrackTopology)
GPUd() bool isDead(const int32_t sector
const ChargeType const float const float const float const float const float const float threshold
bool isCorrectionCCDB(const CalibsdEdx calib) const
void setActualBufferAddress(char *actualFlatBufferPtr)
set location of external flat buffer
bool isTopologyCorrectionPolynomialsSet() const
returns status if the polynomials correction is set
void setSplineTopologyCorrection(const CalibdEdxTrackTopologySpline &calibTrackTopology)
float getMinZeroSupresssionThreshold() const
void setDeadChannelMap(const CalDet< bool > &deadMap)
setting the gain map map from a CalDet
CalibdEdxContainer & operator=(const CalibdEdxContainer &)=delete
Assignment operator: disabled to avoid ambiguity. Use cloneFromObject() instead.
~CalibdEdxContainer()=default
Destructor.
void setZeroSupresssionThreshold(const CalDet< float > &thresholdMap)
const ChargeType const float const float const float const float const float const float const float charge const
void setFutureBufferAddress(char *futureFlatBufferPtr)
set future location of the flat buffer
CalibdEdxContainer()=default
Default constructor: creates an empty uninitialized object.
const ChargeType const float const float const float const float const float relTime
void setResidualCorrection(const CalibdEdxCorrection &residualCorr)
bool isTopologyCorrectionSplinesSet() const
returns status if the spline correction is set
GPUd() float getGain(const int32_t sector
const ChargeType const float tgl
void setDefaultPolTopologyCorrection()
setting a default topology correction which just returns 1
void loadResidualCorrectionFromFile(std::string_view fileName)
float getMaxZeroSupresssionThreshold() const
void moveBufferTo(char *newBufferPtr)
void setGainMapResidual(const CalDet< float > &gainMapResidual, const float minResidualGain=0.7f, const float maxResidualGain=1.3f)
setting the gain map map from a CalDet
GPUd() float getTopologyCorrection(const int32_t region
void loadZeroSupresssionThresholdFromFile(std::string_view fileName, std::string_view objName, const float minCorrectionFactor, const float maxCorrectionFactor)
void setCorrectionCCDB(const CalibsdEdx calib)
const ChargeType const float const float sinPhi
const ChargeType const float const float snp
void setUsageOfFullGainMap(const bool applyFullGainMap)
void destroy()
destroy the object (release internal flat buffer)
GPUd() float getResidualGain(const int32_t sector
void loadFromFile(std::string_view fileName, std::string_view objName="ccdb_object")
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
GLdouble GLdouble GLdouble z
Global TPC definitions and constants.
CalibsdEdx
flags to set which corrections will be loaded from the CCDB
@ CalTimeGain
flag for residual dE/dx time dependent gain correction
@ CalTopologyPol
flag for a topology correction using polynomials
@ CalResidualGainMap
flag for applying residual gain map
@ CalThresholdMap
flag for using threshold map
@ CalTopologySpline
flag for a topology correction using splines
@ CalGainMap
flag for using the gain map to get the correct cluster charge
PadFlags operator|(PadFlags a, PadFlags b)
PadFlags operator&(PadFlags a, PadFlags b)
@ CalTimeGain
Gain variation over time.
PadFlags operator~(PadFlags a)
GEM stack identification.