Project
Loading...
Searching...
No Matches
o2::tpc::CalibdEdxTrackTopologyPol Class Referenceabstract

calibration class for the track topology correction of the dE/dx using multvariate polynomials More...

#include <CalibdEdxTrackTopologyPol.h>

Inherits o2::gpu::FlatObject.

Public Member Functions

 CalibdEdxTrackTopologyPol (std::string_view fileName, std::string_view name="CalibdEdxTrackTopologyPol")
 
 CalibdEdxTrackTopologyPol ()=default
 Default constructor: creates an empty uninitialized object.
 
 ~CalibdEdxTrackTopologyPol ()=default
 destructor
 
 GPUd () float getCorrection(const int32_t region
 
 GPUd () float getCorrection(const int32_t region
 
 GPUd () float getCorrectionqTot(const int32_t region
 
 GPUd () float getCorrectionqMax(const int32_t region
 
 GPUd () float getMinThreshold(const int32_t region=0) const
 
 GPUd () float getMaxThreshold(const int32_t region=0) const
 
 GPUd () float getScalingFactorqTot(const int32_t region) const
 
 GPUd () float getScalingFactorqMax(const int32_t region) const
 
const auto & getPolyqTot (const int32_t region) const
 
const auto & getPolyqMax (const int32_t region) const
 
void setScalingFactorqTot (const float factor, const int32_t region)
 
void setScalingFactorqMax (const float factor, const int32_t region)
 
void writeToFile (TFile &outf, const char *name="CalibdEdxTrackTopologyPol") const
 
void setFromContainer (const CalibdEdxTrackTopologyPolContainer &container)
 
void loadFromFile (const char *fileName, const char *name)
 
void dumpToTree (const uint32_t nSamplingPoints[], const char *outName="track_topology_corr_debug.root") const
 
void setPolynomialsFromFile (TFile &inpf)
 
void setDefaultPolynomials ()
 setting a default topology correction which just returns 1
 
void cloneFromObject (const CalibdEdxTrackTopologyPol &obj, char *newFlatBufferPtr)
 ========== FlatObject functionality, see FlatObject class for description =================
 
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
 
- 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::string getPolyName (const int32_t region, const ChargeType charge)
 
- 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

const ChargeType charge
 
const ChargeType float x[] const { return (charge == ChargeType::Tot) ? mCalibPolsqTot[region].eval(x) : mCalibPolsqMax[region].eval(x)
 
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
 
return corr = mScalingFactorsqMax[region] * mCalibPolsqMax[region].eval(x)
 
const float tanTheta
 
const float const float sinPhi
 
const float const float const float z
 
const float const float const float const float threshold
 
const float const float const float const float const float charge const
 
const float corr = mScalingFactorsqTot[region] * mCalibPolsqTot[region].eval(x)
 
const float const float const float const float relPad
 
const float const float const float const float const float relTime const
 

Additional Inherited Members

- 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

calibration class for the track topology correction of the dE/dx using multvariate polynomials

Definition at line 46 of file CalibdEdxTrackTopologyPol.h.

Constructor & Destructor Documentation

◆ CalibdEdxTrackTopologyPol() [1/2]

o2::tpc::CalibdEdxTrackTopologyPol::CalibdEdxTrackTopologyPol ( std::string_view  fileName,
std::string_view  name = "CalibdEdxTrackTopologyPol" 
)
inline

constructor constructs an object Initialized from file

Parameters
fileNamename of the input file containing the object \parma name name of the object

Definition at line 53 of file CalibdEdxTrackTopologyPol.h.

◆ CalibdEdxTrackTopologyPol() [2/2]

o2::tpc::CalibdEdxTrackTopologyPol::CalibdEdxTrackTopologyPol ( )
default

Default constructor: creates an empty uninitialized object.

◆ ~CalibdEdxTrackTopologyPol()

o2::tpc::CalibdEdxTrackTopologyPol::~CalibdEdxTrackTopologyPol ( )
default

destructor

Member Function Documentation

◆ cloneFromObject()

void CalibdEdxTrackTopologyPol::cloneFromObject ( const CalibdEdxTrackTopologyPol obj,
char newFlatBufferPtr 
)

========== FlatObject functionality, see FlatObject class for description =================

cloning a container object (use newFlatBufferPtr=nullptr for simple copy)

Definition at line 41 of file CalibdEdxTrackTopologyPol.cxx.

◆ destroy()

void CalibdEdxTrackTopologyPol::destroy ( )

destroy the object (release internal flat buffer)

Definition at line 71 of file CalibdEdxTrackTopologyPol.cxx.

◆ dumpToTree()

void CalibdEdxTrackTopologyPol::dumpToTree ( const uint32_t  nSamplingPoints[],
const char outName = "track_topology_corr_debug.root" 
) const

dump the correction to a tree for visualisation

Parameters
nSamplingPointsnumber of sampling points per dimension
outNamename of the output file

Definition at line 27 of file CalibdEdxTrackTopologyPol.cxx.

◆ getPolyName()

std::string CalibdEdxTrackTopologyPol::getPolyName ( const int32_t  region,
const ChargeType  charge 
)
static
Returns
returns the name of the polynomial object which can be read in with the setPolynomialsFromFile() function
Parameters
regionregion of the TPC
chargecorrection for maximum or total charge

Definition at line 236 of file CalibdEdxTrackTopologyPol.cxx.

◆ getPolyqMax()

const auto & o2::tpc::CalibdEdxTrackTopologyPol::getPolyqMax ( const int32_t  region) const
inline
Returns
returns polynomial for qMax
Parameters
regionregion of the TPC

Definition at line 134 of file CalibdEdxTrackTopologyPol.h.

◆ getPolyqTot()

const auto & o2::tpc::CalibdEdxTrackTopologyPol::getPolyqTot ( const int32_t  region) const
inline
Returns
returns polynomial for qTot
Parameters
regionregion of the TPC

Definition at line 130 of file CalibdEdxTrackTopologyPol.h.

◆ GPUd() [1/8]

o2::tpc::CalibdEdxTrackTopologyPol::GPUd ( ) const
Returns
returns the track topology correction
Parameters
regionregion of the TPC
chargecorrection for maximum or total charge
xcoordinates where the correction is evaluated

◆ GPUd() [2/8]

o2::tpc::CalibdEdxTrackTopologyPol::GPUd ( ) const
Returns
returns the track topology correction
Parameters
regionregion of the TPC
chargeTcorrection for maximum or total charge
tanThetatan of local inclination angle theta
sinPhitrack parameter sinphi
zz position of the cluster
relPadabsolute relative pad position of the track
relTimerelative time position of the track
thresholdzero supression threshold
chargecharge of the cluster

◆ GPUd() [3/8]

o2::tpc::CalibdEdxTrackTopologyPol::GPUd ( ) const
Returns
returns the track topology correction for qMax
Parameters
regionregion of the TPC
tanThetatan of local inclination angle theta
sinPhitrack parameter sinphi
zz position of the cluster
relPadabsolute relative pad position of the track
relTimerelative time position of the track

◆ GPUd() [4/8]

o2::tpc::CalibdEdxTrackTopologyPol::GPUd ( ) const
Returns
returns the track topology correction for qTot
Parameters
regionregion of the TPC
tanThetatan of local inclination angle theta
sinPhitrack parameter sinphi
zz position of the cluster
thresholdzero supression threshold
chargecharge of the cluster

◆ GPUd() [5/8]

o2::tpc::CalibdEdxTrackTopologyPol::GPUd ( ) const
inlinepure virtual

returns the maximum zero supression threshold for which the polynomials are valid

Parameters
regionregion of the TPC

Definition at line 117 of file CalibdEdxTrackTopologyPol.h.

◆ GPUd() [6/8]

o2::tpc::CalibdEdxTrackTopologyPol::GPUd ( ) const
inlinepure virtual

returns the minimum zero supression threshold for which the polynomials are valid

Parameters
regionregion of the TPC

Definition at line 113 of file CalibdEdxTrackTopologyPol.h.

◆ GPUd() [7/8]

o2::tpc::CalibdEdxTrackTopologyPol::GPUd ( ) const
inline
Returns
returns the the scaling factors for the polynomials for qMax
Parameters
regionregion of the scaling factor

Definition at line 125 of file CalibdEdxTrackTopologyPol.h.

◆ GPUd() [8/8]

o2::tpc::CalibdEdxTrackTopologyPol::GPUd ( ) const
inline
Returns
returns the the scaling factors for the polynomials for qTot
Parameters
regionregion of the scaling factor

Definition at line 121 of file CalibdEdxTrackTopologyPol.h.

◆ loadFromFile()

void CalibdEdxTrackTopologyPol::loadFromFile ( const char fileName,
const char name 
)

load members from a file

Parameters
fileNamefile where the object will be read from
namename of the object in the output file

Definition at line 212 of file CalibdEdxTrackTopologyPol.cxx.

◆ moveBufferTo()

void CalibdEdxTrackTopologyPol::moveBufferTo ( char newBufferPtr)

move flat buffer to new location

Parameters
newBufferPtrnew buffer location

Definition at line 62 of file CalibdEdxTrackTopologyPol.cxx.

◆ setActualBufferAddress()

void CalibdEdxTrackTopologyPol::setActualBufferAddress ( char actualFlatBufferPtr)

set location of external flat buffer

Definition at line 80 of file CalibdEdxTrackTopologyPol.cxx.

◆ setDefaultPolynomials()

void CalibdEdxTrackTopologyPol::setDefaultPolynomials ( )

setting a default topology correction which just returns 1

Definition at line 140 of file CalibdEdxTrackTopologyPol.cxx.

◆ setFromContainer()

void CalibdEdxTrackTopologyPol::setFromContainer ( const CalibdEdxTrackTopologyPolContainer container)

init parameters from CalibdEdxTrackTopologyPolContainer

Parameters
containercontainer for the members

Definition at line 184 of file CalibdEdxTrackTopologyPol.cxx.

◆ setFutureBufferAddress()

void CalibdEdxTrackTopologyPol::setFutureBufferAddress ( char futureFlatBufferPtr)

set future location of the flat buffer

Definition at line 96 of file CalibdEdxTrackTopologyPol.cxx.

◆ setPolynomialsFromFile()

void CalibdEdxTrackTopologyPol::setPolynomialsFromFile ( TFile &  inpf)

sets the polynomials from an input file. The names of the objects have to be the same as in the getPolyName() function

Parameters
inpffile where the polynomials are stored

Definition at line 225 of file CalibdEdxTrackTopologyPol.cxx.

◆ setScalingFactorqMax()

void o2::tpc::CalibdEdxTrackTopologyPol::setScalingFactorqMax ( const float  factor,
const int32_t  region 
)
inline

set the the scaling factors for the polynomials for qMax

Parameters
factorscaling factor
regionregion of the scaling factor

Definition at line 145 of file CalibdEdxTrackTopologyPol.h.

◆ setScalingFactorqTot()

void o2::tpc::CalibdEdxTrackTopologyPol::setScalingFactorqTot ( const float  factor,
const int32_t  region 
)
inline

set the the scaling factors for the polynomials for qTot

Parameters
factorscaling factor
regionregion of the scaling factor

Definition at line 140 of file CalibdEdxTrackTopologyPol.h.

◆ writeToFile()

void CalibdEdxTrackTopologyPol::writeToFile ( TFile &  outf,
const char name = "CalibdEdxTrackTopologyPol" 
) const

write a class object to the file

Parameters
outffile where the object will be written to
namename of the object in the output file

Definition at line 160 of file CalibdEdxTrackTopologyPol.cxx.

Member Data Documentation

◆ charge

const ChargeType o2::tpc::CalibdEdxTrackTopologyPol::charge

Definition at line 65 of file CalibdEdxTrackTopologyPol.h.

◆ chargeT

const ChargeType o2::tpc::CalibdEdxTrackTopologyPol::chargeT

Definition at line 77 of file CalibdEdxTrackTopologyPol.h.

◆ const [1/4]

const ChargeType float x [] o2::tpc::CalibdEdxTrackTopologyPol::const { return (charge == ChargeType::Tot) ? mCalibPolsqTot[region].eval(x) : mCalibPolsqMax[region].eval(x)

Definition at line 65 of file CalibdEdxTrackTopologyPol.h.

◆ const [2/4]

const ChargeType const float const float const float const float const float const float const float charge o2::tpc::CalibdEdxTrackTopologyPol::const
Initial value:
{
const float corr = (chargeT == ChargeType::Tot) ? getCorrectionqTot(region, tanTheta, sinPhi, z, threshold, charge) : getCorrectionqMax(region, tanTheta, sinPhi, z, relPad, relTime)
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 sinPhi
const ChargeType const float const float const float const float relPad
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
@ Tot
Definition Defs.h:72

Definition at line 77 of file CalibdEdxTrackTopologyPol.h.

◆ const [3/4]

const float const float const float const float const float charge o2::tpc::CalibdEdxTrackTopologyPol::const
Initial value:
{
const ChargeType const float const float const float z
GLint GLenum GLint x
Definition glcorearb.h:403

Definition at line 90 of file CalibdEdxTrackTopologyPol.h.

◆ const [4/4]

const float const float const float const float const float relTime o2::tpc::CalibdEdxTrackTopologyPol::const
Initial value:
{

Definition at line 104 of file CalibdEdxTrackTopologyPol.h.

◆ corr [1/2]

return o2::tpc::CalibdEdxTrackTopologyPol::corr = mScalingFactorsqMax[region] * mCalibPolsqMax[region].eval(x)

Definition at line 80 of file CalibdEdxTrackTopologyPol.h.

◆ corr [2/2]

const float o2::tpc::CalibdEdxTrackTopologyPol::corr = mScalingFactorsqTot[region] * mCalibPolsqTot[region].eval(x)

Definition at line 93 of file CalibdEdxTrackTopologyPol.h.

◆ relPad [1/2]

const ChargeType const float const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::relPad

Definition at line 77 of file CalibdEdxTrackTopologyPol.h.

◆ relPad [2/2]

const float const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::relPad

Definition at line 104 of file CalibdEdxTrackTopologyPol.h.

◆ relTime

const ChargeType const float const float const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::relTime

Definition at line 77 of file CalibdEdxTrackTopologyPol.h.

◆ sinPhi [1/2]

const float const float o2::tpc::CalibdEdxTrackTopologyPol::sinPhi

Definition at line 77 of file CalibdEdxTrackTopologyPol.h.

◆ sinPhi [2/2]

const float const float o2::tpc::CalibdEdxTrackTopologyPol::sinPhi

Definition at line 90 of file CalibdEdxTrackTopologyPol.h.

◆ tanTheta [1/2]

const float o2::tpc::CalibdEdxTrackTopologyPol::tanTheta

Definition at line 77 of file CalibdEdxTrackTopologyPol.h.

◆ tanTheta [2/2]

const float o2::tpc::CalibdEdxTrackTopologyPol::tanTheta

Definition at line 90 of file CalibdEdxTrackTopologyPol.h.

◆ threshold [1/2]

const ChargeType const float const float const float const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::threshold

Definition at line 77 of file CalibdEdxTrackTopologyPol.h.

◆ threshold [2/2]

const float const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::threshold

Definition at line 90 of file CalibdEdxTrackTopologyPol.h.

◆ z [1/2]

const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::z

Definition at line 77 of file CalibdEdxTrackTopologyPol.h.

◆ z [2/2]

const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::z

Definition at line 90 of file CalibdEdxTrackTopologyPol.h.


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