Skip to content

Commit a83f05b

Browse files
committed
Revert "TPC: Add lumi source to CorrMapParam"
This reverts commit 9bd758e.
1 parent b6d3618 commit a83f05b

File tree

6 files changed

+7
-37
lines changed

6 files changed

+7
-37
lines changed

DataFormats/Detectors/TPC/include/DataFormatsTPC/Defs.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,6 @@ inline PadFlags operator&(PadFlags a, PadFlags b) { return static_cast<PadFlags>
114114
inline PadFlags operator~(PadFlags a) { return static_cast<PadFlags>(~static_cast<int>(a)); }
115115
inline PadFlags operator|(PadFlags a, PadFlags b) { return static_cast<PadFlags>(static_cast<int>(a) | static_cast<int>(b)); }
116116

117-
/// luminosity type used for scaling of the correction or distortions
118-
enum LumiType {
119-
None = 0, ///< default undefined
120-
CTP = 1, ///< CTP
121-
IDC = 2 ///< IDCs from TPC
122-
};
123-
124117
// default point definitions for PointND, PointNDlocal, PointNDglobal are in
125118
// MathUtils/CartesianND.h
126119

Detectors/TPC/calibration/include/TPCCalibration/CorrMapParam.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
#include "CommonUtils/ConfigurableParam.h"
2020
#include "CommonUtils/ConfigurableParamHelper.h"
21-
#include "DataFormatsTPC/Defs.h"
2221

2322
namespace o2
2423
{
@@ -31,7 +30,6 @@ struct CorrMapParam : public o2::conf::ConfigurableParamHelper<CorrMapParam> {
3130
float lumiMeanRef = 0.; // override TPC corr.mapRef mean lumi (if > 0)"
3231
float lumiInstFactor = 1.; // scaling to apply to instantaneous lumi from CTP (but not corrmap-lumi-inst)
3332
int ctpLumiSource = 0; // CTP lumi source: 0 = LumiInfo.getLumi(), 1 = LumiInfo.getLumiAlt()
34-
LumiType lumiSource{}; // source of luminosity
3533

3634
O2ParamDef(CorrMapParam, "TPCCorrMap");
3735
};

Detectors/TPC/calibration/src/CorrectionMapsLoader.cxx

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,6 @@ bool CorrectionMapsLoader::accountCCDBInputs(const ConcreteDataMatcher& matcher,
139139
setCorrMap((o2::gpu::TPCFastTransform*)obj);
140140
mCorrMap->rectifyAfterReadingFromFile();
141141
if (getMeanLumiOverride() == 0 && mCorrMap->getLumi() > 0.) {
142-
// check if the specified scale type is the same as the lumi from the provided map
143-
if (mCorrMap->getLumiSource() == LumiType::None) {
144-
LOGP(warning, "Lumi type not set in correction map");
145-
} else if (mCorrMap->getLumiSource() != getLumiScaleType()) {
146-
LOGP(error, "Lumi scale type {} and lumi source {} for correction map do not match", getLumiScaleType(), int(mCorrMap->getLumiSource()));
147-
}
148142
setMeanLumi(mCorrMap->getLumi());
149143
}
150144
LOGP(debug, "MeanLumiOverride={} MeanLumiMap={} -> meanLumi = {}", getMeanLumiOverride(), mCorrMap->getLumi(), getMeanLumi());
@@ -155,13 +149,6 @@ bool CorrectionMapsLoader::accountCCDBInputs(const ConcreteDataMatcher& matcher,
155149
setCorrMapRef((o2::gpu::TPCFastTransform*)obj);
156150
mCorrMapRef->rectifyAfterReadingFromFile();
157151
if (getMeanLumiRefOverride() == 0 && mCorrMapRef->getLumi() > 0.) {
158-
// check if the specified scale type is the same as the lumi from the provided map
159-
if (mCorrMapRef->getLumiSource() == LumiType::None) {
160-
LOGP(warning, "Lumi type not set in reference correction map");
161-
} else if ((getLumiScaleMode() != 0) && (mCorrMapRef->getLumiSource() != getLumiScaleType())) {
162-
// check only when using derivative map, since for scalemode=0 the lumi of the reference map is not used for scaling
163-
LOGP(error, "Lumi scale type {} and lumi source {} for reference correction map do not match", getLumiScaleType(), int(mCorrMapRef->getLumiSource()));
164-
}
165152
setMeanLumiRef(mCorrMapRef->getLumi());
166153
}
167154
LOGP(debug, "MeanLumiRefOverride={} MeanLumiMap={} -> meanLumi = {}", getMeanLumiRefOverride(), mCorrMapRef->getLumi(), getMeanLumiRef());
@@ -188,12 +175,6 @@ bool CorrectionMapsLoader::accountCCDBInputs(const ConcreteDataMatcher& matcher,
188175
setUpdatedLumi();
189176
int scaleType = getLumiScaleType();
190177
const std::array<std::string, 3> lumiS{"OFF", "CTP", "TPC scaler"};
191-
const auto lumiSource = par.lumiSource;
192-
if (lumiSource == LumiType::None) {
193-
LOGP(warning, "Lumi type not set in CorrMapParam");
194-
} else if (lumiSource != scaleType) {
195-
LOGP(error, "Lumi scale type {} and lumi source {} from CorrMapParam do not match", scaleType, int(lumiSource));
196-
}
197178
if (scaleType >= lumiS.size()) {
198179
LOGP(fatal, "Wrong lumi-scale-type provided!");
199180
}

Detectors/TPC/spacecharge/include/TPCSpaceCharge/SpaceChargeHelpers.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ namespace tpc
3131
{
3232

3333
struct SCMetaData {
34+
35+
enum LumiType {
36+
CTP = 0,
37+
IDC = 1
38+
};
39+
3440
void print() const
3541
{
3642
const std::array<std::string, 2> collisionTypes{"PP", "Pb-Pb"};

GPU/TPCFastTransformation/TPCFastTransform.cxx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ void TPCFastTransform::cloneFromObject(const TPCFastTransform& obj, char* newFla
6161
mLumi = obj.mLumi;
6262
mLumiError = obj.mLumiError;
6363
mLumiScaleFactor = obj.mLumiScaleFactor;
64-
mLumiSource = obj.mLumiSource;
6564
// variable-size data
6665

6766
char* distBuffer = FlatObject::relocatePointer(oldFlatBufferPtr, mFlatBufferPtr, obj.mCorrection.getFlatBufferPtr());

GPU/TPCFastTransformation/TPCFastTransform.h

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "TPCFastSpaceChargeCorrection.h"
2323
#include "GPUCommonMath.h"
2424
#include "GPUDebugStreamer.h"
25-
#include "DataFormatsTPC/Defs.h"
2625

2726
#if !defined(GPUCA_GPUCODE)
2827
#include <string>
@@ -159,7 +158,6 @@ class TPCFastTransform : public FlatObject
159158
void setLumi(float l) { mLumi = l; }
160159
void setLumiError(float e) { mLumiError = e; }
161160
void setLumiScaleFactor(float s) { mLumiScaleFactor = s; }
162-
void setLumiSource(o2::tpc::LumiType l) { mLumiSource = l; }
163161

164162
/// Sets the time stamp of the current calibaration
165163
void setTimeStamp(long int v) { mTimeStamp = v; }
@@ -255,9 +253,6 @@ class TPCFastTransform : public FlatObject
255253
/// Return map user defined lumi scale factor
256254
GPUd() float getLumiScaleFactor() const { return mLumiScaleFactor; }
257255

258-
/// Return map lumi source type
259-
o2::tpc::LumiType getLumiSource() const { return mLumiSource; }
260-
261256
/// maximal possible drift time of the active area
262257
GPUd() float getMaxDriftTime(int slice, int row, float pad) const;
263258

@@ -335,15 +330,13 @@ class TPCFastTransform : public FlatObject
335330
float mLumiError; ///< error on luminosity
336331
float mLumiScaleFactor; ///< user correction factor for lumi (e.g. normalization, efficiency correction etc.)
337332

338-
o2::tpc::LumiType mLumiSource{o2::tpc::LumiType::CTP}; ///< source of luminosity
339-
340333
/// Correction of (x,u,v) with tricubic interpolator on a regular grid
341334
TPCSlowSpaceChargeCorrection* mCorrectionSlow{nullptr}; ///< reference space charge corrections
342335

343336
GPUd() void TransformInternal(int slice, int row, float& u, float& v, float& x, const TPCFastTransform* ref, float scale, int scaleMode) const;
344337

345338
#ifndef GPUCA_ALIROOT_LIB
346-
ClassDefNV(TPCFastTransform, 4);
339+
ClassDefNV(TPCFastTransform, 3);
347340
#endif
348341
};
349342

0 commit comments

Comments
 (0)