17#if !defined(GPUCA_STANDALONE)
26#if !defined(GPUCA_STANDALONE)
31#if !defined(GPUCA_STANDALONE)
38 :
FlatObject(), mTimeStamp(0), mCorrection(), mApplyCorrection(1), mT0(0.f), mVdrift(0.f), mLumi(
TPCFastTransform::DEFLUMI), mLumiError(0.f), mLumiScaleFactor(1.0f), mIDC(
TPCFastTransform::DEFIDC), mIDCError(0.f), mCTP2IDCFallBackThreshold(30.f)
51 mTimeStamp = obj.mTimeStamp;
52 mApplyCorrection = obj.mApplyCorrection;
54 mVdrift = obj.mVdrift;
56 mLumiError = obj.mLumiError;
58 mIDCError = obj.mIDCError;
59 mCTP2IDCFallBackThreshold = obj.mCTP2IDCFallBackThreshold;
60 mLumiScaleFactor = obj.mLumiScaleFactor;
101 mApplyCorrection = 1;
108 mCTP2IDCFallBackThreshold = 30.f;
109 mLumiScaleFactor = 1.f;
123 mTimeStamp = timeStamp;
143 LOG(info) <<
"TPC Fast Transformation: ";
144 LOG(info) <<
"mTimeStamp = " << mTimeStamp;
145 LOG(info) <<
"mApplyCorrection = " << mApplyCorrection;
146 LOG(info) <<
"mT0 = " << mT0;
147 LOG(info) <<
"mVdrift = " << mVdrift;
148 LOG(info) <<
"mLumi = " << mLumi;
149 LOG(info) <<
"mLumiError = " << mLumiError;
150 LOG(info) <<
"mIDC = " << mIDC;
151 LOG(info) <<
"mIDCError = " << mIDCError;
152 LOG(info) <<
"mCTP2IDCFallBackThreshold = " << mCTP2IDCFallBackThreshold;
153 LOG(info) <<
"mLumiScaleFactor = " << mLumiScaleFactor;
157#if !defined(GPUCA_STANDALONE)
164 if (outFName.empty()) {
165 outFName =
"tpcFastTransform.root";
168 name =
"TPCFastTransform";
170 TFile outf(outFName.data(),
"recreate");
171 if (outf.IsZombie()) {
172 LOG(error) <<
"Failed to open output file " << outFName;
177 if (isBufferExternal) {
180 outf.WriteObjectAny(
this, Class(),
name.data());
182 if (isBufferExternal) {
197 if (inpFName.empty()) {
198 inpFName =
"tpcFastTransform.root";
201 name =
"TPCFastTransform";
203 TFile inpf(inpFName.data());
204 if (inpf.IsZombie()) {
205 LOG(error) <<
"Failed to open input file " << inpFName;
210 LOG(error) <<
"Failed to load " <<
name <<
" from " << inpFName;
214 LOG(error) <<
"Failed to load " <<
name <<
" from " << inpFName <<
": empty flat buffer container";
223#if !defined(GPUCA_STANDALONE)
244float TPCFastTransform::getIDC()
const
248 if (mLumi < mCTP2IDCFallBackThreshold) {
249 bool static report =
true;
252 LOG(warn) <<
"IDC scaling is requested but map IDC record is empty. Since map Lumi " << mLumi <<
" is less than fall-back threshold " << mCTP2IDCFallBackThreshold <<
", interpret Lumi record as IDC";
256#if !defined(GPUCA_STANDALONE)
257 LOG(fatal) <<
"IDC scaling is requested but map IDC record is empty. The map Lumi " << mLumi <<
" exceeds Lumi->IDC fall-back threshold " << mCTP2IDCFallBackThreshold;
This class contains the algorithms for calculation the distortions and corrections.
void setFutureBufferAddress(char *futureFlatBufferPtr)
uint32_t mConstructionMask
mask for constructed object members, first two bytes are used by this class
int32_t mFlatBufferSize
size of the flat buffer
void adoptInternalBuffer(char *buf)
char * mFlatBufferContainer
bool isConstructed() const
Tells if the object is constructed.
static T * relocatePointer(const char *oldBase, char *newBase, const T *ptr)
Relocates a pointer inside a buffer to the new buffer address.
void setActualBufferAddress(char *actualFlatBufferPtr)
_____________ Methods for moving the class with its external buffer to another location _____________...
void startConstruction()
_____________ Construction _________
void moveBufferTo(char *newBufferPtr)
void finishConstruction(int32_t flatBufferSize)
bool isBufferInternal() const
Tells if the buffer is internal.
void cloneFromObject(const FlatObject &obj, char *newFlatBufferPtr)
void clearInternalBufferPtr()
@ InProgress
construction started: temporary memory is reserved
void moveBufferTo(char *newBufferPtr)
void print() const
Print method.
void setFutureBufferAddress(char *futureFlatBufferPtr)
void setActualBufferAddress(char *actualFlatBufferPtr)
Moving the class with its external buffer to another location.
void cloneFromObject(const TPCFastSpaceChargeCorrection &obj, char *newFlatBufferPtr)
Construction interface.
void setGlobalCorrectionsFromFile(std::string_view file, const Side side)
void getCorrections(const DataT x, const DataT y, const DataT z, const Side side, DataT &corrX, DataT &corrY, DataT &corrZ) const
GLuint const GLchar * name
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t0
void report(gsl::span< o2::InteractionTimeRecord > irs, int threshold, bool verbose)
constexpr unsigned char SECTORSPERSIDE
simple struct to hold the space charge object which can be used for CPU reconstruction only
~TPCSlowSpaceChargeCorrection()
destructor
void getCorrections(const float gx, const float gy, const float gz, const int32_t sector, float &gdxC, float &gdyC, float &gdzC) const
getting the corrections for global coordinates
o2::tpc::SpaceCharge< float > * mCorr
reference space charge corrections
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"