![]() |
Project
|
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 | |
![]() | |
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::string | getPolyName (const int32_t region, const ChargeType charge) |
![]() | |
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 | |
![]() | |
enum | ConstructionState : uint32_t { NotConstructed = 0x0 , Constructed = 0x1 , InProgress = 0x2 } |
GPUCA_GPUCODE. More... | |
![]() | |
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. | |
![]() | |
static constexpr size_t | getClassAlignmentBytes () |
_____________ Memory alignment __________________________ | |
static constexpr size_t | getBufferAlignmentBytes () |
Gives minimal alignment in bytes required for the flat buffer. | |
![]() | |
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 |
calibration class for the track topology correction of the dE/dx using multvariate polynomials
Definition at line 46 of file CalibdEdxTrackTopologyPol.h.
|
inline |
constructor constructs an object Initialized from file
fileName | name of the input file containing the object \parma name name of the object |
Definition at line 53 of file CalibdEdxTrackTopologyPol.h.
|
default |
Default constructor: creates an empty uninitialized object.
|
default |
destructor
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.
void CalibdEdxTrackTopologyPol::destroy | ( | ) |
destroy the object (release internal flat buffer)
Definition at line 71 of file CalibdEdxTrackTopologyPol.cxx.
void CalibdEdxTrackTopologyPol::dumpToTree | ( | const uint32_t | nSamplingPoints[], |
const char * | outName = "track_topology_corr_debug.root" |
||
) | const |
dump the correction to a tree for visualisation
nSamplingPoints | number of sampling points per dimension |
outName | name of the output file |
Definition at line 27 of file CalibdEdxTrackTopologyPol.cxx.
|
static |
region | region of the TPC |
charge | correction for maximum or total charge |
Definition at line 236 of file CalibdEdxTrackTopologyPol.cxx.
region | region of the TPC |
Definition at line 134 of file CalibdEdxTrackTopologyPol.h.
region | region of the TPC |
Definition at line 130 of file CalibdEdxTrackTopologyPol.h.
o2::tpc::CalibdEdxTrackTopologyPol::GPUd | ( | ) | const |
region | region of the TPC |
charge | correction for maximum or total charge |
x | coordinates where the correction is evaluated |
o2::tpc::CalibdEdxTrackTopologyPol::GPUd | ( | ) | const |
region | region of the TPC |
chargeT | correction for maximum or total charge |
tanTheta | tan of local inclination angle theta |
sinPhi | track parameter sinphi |
z | z position of the cluster |
relPad | absolute relative pad position of the track |
relTime | relative time position of the track |
threshold | zero supression threshold |
charge | charge of the cluster |
o2::tpc::CalibdEdxTrackTopologyPol::GPUd | ( | ) | const |
region | region of the TPC |
tanTheta | tan of local inclination angle theta |
sinPhi | track parameter sinphi |
z | z position of the cluster |
relPad | absolute relative pad position of the track |
relTime | relative time position of the track |
o2::tpc::CalibdEdxTrackTopologyPol::GPUd | ( | ) | const |
region | region of the TPC |
tanTheta | tan of local inclination angle theta |
sinPhi | track parameter sinphi |
z | z position of the cluster |
threshold | zero supression threshold |
charge | charge of the cluster |
|
inlinepure virtual |
returns the maximum zero supression threshold for which the polynomials are valid
region | region of the TPC |
Definition at line 117 of file CalibdEdxTrackTopologyPol.h.
|
inlinepure virtual |
returns the minimum zero supression threshold for which the polynomials are valid
region | region of the TPC |
Definition at line 113 of file CalibdEdxTrackTopologyPol.h.
|
inline |
region | region of the scaling factor |
Definition at line 125 of file CalibdEdxTrackTopologyPol.h.
|
inline |
region | region of the scaling factor |
Definition at line 121 of file CalibdEdxTrackTopologyPol.h.
load members from a file
fileName | file where the object will be read from |
name | name of the object in the output file |
Definition at line 212 of file CalibdEdxTrackTopologyPol.cxx.
move flat buffer to new location
newBufferPtr | new buffer location |
Definition at line 62 of file CalibdEdxTrackTopologyPol.cxx.
set location of external flat buffer
Definition at line 80 of file CalibdEdxTrackTopologyPol.cxx.
void CalibdEdxTrackTopologyPol::setDefaultPolynomials | ( | ) |
setting a default topology correction which just returns 1
Definition at line 140 of file CalibdEdxTrackTopologyPol.cxx.
void CalibdEdxTrackTopologyPol::setFromContainer | ( | const CalibdEdxTrackTopologyPolContainer & | container | ) |
init parameters from CalibdEdxTrackTopologyPolContainer
container | container for the members |
Definition at line 184 of file CalibdEdxTrackTopologyPol.cxx.
set future location of the flat buffer
Definition at line 96 of file CalibdEdxTrackTopologyPol.cxx.
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
inpf | file where the polynomials are stored |
Definition at line 225 of file CalibdEdxTrackTopologyPol.cxx.
|
inline |
set the the scaling factors for the polynomials for qMax
factor | scaling factor |
region | region of the scaling factor |
Definition at line 145 of file CalibdEdxTrackTopologyPol.h.
|
inline |
set the the scaling factors for the polynomials for qTot
factor | scaling factor |
region | region of the scaling factor |
Definition at line 140 of file CalibdEdxTrackTopologyPol.h.
void CalibdEdxTrackTopologyPol::writeToFile | ( | TFile & | outf, |
const char * | name = "CalibdEdxTrackTopologyPol" |
||
) | const |
write a class object to the file
outf | file where the object will be written to |
name | name of the object in the output file |
Definition at line 160 of file CalibdEdxTrackTopologyPol.cxx.
const ChargeType o2::tpc::CalibdEdxTrackTopologyPol::charge |
Definition at line 65 of file CalibdEdxTrackTopologyPol.h.
const ChargeType o2::tpc::CalibdEdxTrackTopologyPol::chargeT |
Definition at line 77 of file CalibdEdxTrackTopologyPol.h.
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 ChargeType const float const float const float const float const float const float const float charge o2::tpc::CalibdEdxTrackTopologyPol::const |
Definition at line 77 of file CalibdEdxTrackTopologyPol.h.
const float const float const float const float const float charge o2::tpc::CalibdEdxTrackTopologyPol::const |
Definition at line 90 of file CalibdEdxTrackTopologyPol.h.
const float const float const float const float const float relTime o2::tpc::CalibdEdxTrackTopologyPol::const |
return o2::tpc::CalibdEdxTrackTopologyPol::corr = mScalingFactorsqMax[region] * mCalibPolsqMax[region].eval(x) |
Definition at line 80 of file CalibdEdxTrackTopologyPol.h.
const float o2::tpc::CalibdEdxTrackTopologyPol::corr = mScalingFactorsqTot[region] * mCalibPolsqTot[region].eval(x) |
Definition at line 93 of file CalibdEdxTrackTopologyPol.h.
const ChargeType const float const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::relPad |
Definition at line 77 of file CalibdEdxTrackTopologyPol.h.
Definition at line 104 of file CalibdEdxTrackTopologyPol.h.
const ChargeType const float const float const float const float const float o2::tpc::CalibdEdxTrackTopologyPol::relTime |
Definition at line 77 of file CalibdEdxTrackTopologyPol.h.
Definition at line 77 of file CalibdEdxTrackTopologyPol.h.
Definition at line 90 of file CalibdEdxTrackTopologyPol.h.
const float o2::tpc::CalibdEdxTrackTopologyPol::tanTheta |
Definition at line 77 of file CalibdEdxTrackTopologyPol.h.
const float o2::tpc::CalibdEdxTrackTopologyPol::tanTheta |
Definition at line 90 of file CalibdEdxTrackTopologyPol.h.
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.
Definition at line 90 of file CalibdEdxTrackTopologyPol.h.
Definition at line 77 of file CalibdEdxTrackTopologyPol.h.
Definition at line 90 of file CalibdEdxTrackTopologyPol.h.