17#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
24#if !defined(GPUCA_GPUCODE)
28#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
33#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
40 :
FlatObject(), mTimeStamp(0), mCorrection(), mApplyCorrection(1), mT0(0.f), mVdrift(0.f), mVdriftCorrY(0.f), mLdriftCorr(0.f), mTOFcorr(0.f), mPrimVtxZ(0.f), mLumi(0.f), mLumiError(0.f), mLumiScaleFactor(1.0f)
53 mTimeStamp = obj.mTimeStamp;
54 mApplyCorrection = obj.mApplyCorrection;
56 mVdrift = obj.mVdrift;
57 mVdriftCorrY = obj.mVdriftCorrY;
58 mLdriftCorr = obj.mLdriftCorr;
59 mTOFcorr = obj.mTOFcorr;
60 mPrimVtxZ = obj.mPrimVtxZ;
62 mLumiError = obj.mLumiError;
63 mLumiScaleFactor = obj.mLumiScaleFactor;
104 mApplyCorrection = 1;
113 mLumiScaleFactor = 1.f;
127 mTimeStamp = timeStamp;
130 mVdriftCorrY = vDriftCorrY;
131 mLdriftCorr = lDriftCorr;
133 mPrimVtxZ = primVtxZ;
151#if !defined(GPUCA_GPUCODE)
152 LOG(info) <<
"TPC Fast Transformation: ";
153 LOG(info) <<
"mTimeStamp = " << mTimeStamp;
154 LOG(info) <<
"mApplyCorrection = " << mApplyCorrection;
155 LOG(info) <<
"mT0 = " << mT0;
156 LOG(info) <<
"mVdrift = " << mVdrift;
157 LOG(info) <<
"mVdriftCorrY = " << mVdriftCorrY;
158 LOG(info) <<
"mLdriftCorr = " << mLdriftCorr;
159 LOG(info) <<
"mTOFcorr = " << mTOFcorr;
160 LOG(info) <<
"mPrimVtxZ = " << mPrimVtxZ;
161 LOG(info) <<
"mLumi = " << mLumi;
162 LOG(info) <<
"mLumiError = " << mLumiError;
163 LOG(info) <<
"mLumiScaleFactor = " << mLumiScaleFactor;
168#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
175 if (outFName.empty()) {
176 outFName =
"tpcFastTransform.root";
179 name =
"TPCFastTransform";
181 TFile outf(outFName.data(),
"recreate");
182 if (outf.IsZombie()) {
183 LOG(error) <<
"Failed to open output file " << outFName;
188 if (isBufferExternal) {
191 outf.WriteObjectAny(
this, Class(),
name.data());
193 if (isBufferExternal) {
208 if (inpFName.empty()) {
209 inpFName =
"tpcFastTransform.root";
212 name =
"TPCFastTransform";
214 TFile inpf(inpFName.data());
215 if (inpf.IsZombie()) {
216 LOG(error) <<
"Failed to open input file " << inpFName;
221 LOG(error) <<
"Failed to load " <<
name <<
" from " << inpFName;
225 LOG(error) <<
"Failed to load " <<
name <<
" from " << inpFName <<
": empty flat buffer container";
234#if !defined(GPUCA_GPUCODE) && !defined(GPUCA_STANDALONE)
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()
size_t getFlatBufferSize() const
Gives size of the flat buffer.
@ InProgress
construction started: temporary memory is reserved
const char * getFlatBufferPtr() const
Gives pointer to the flat buffer.
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
constexpr unsigned char SECTORSPERSIDE
simple struct to hold the space charge object which can be used for CPU reconstruction only
~TPCSlowSpaceChargeCorrection()
destructor
o2::tpc::SpaceCharge< float > * mCorr
reference space charge corrections
void getCorrections(const float gx, const float gy, const float gz, const int32_t slice, float &gdxC, float &gdyC, float &gdzC) const
getting the corrections for global coordinates
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"