Skip to content

Commit da99199

Browse files
TPC: apply sector edge correction on default
1 parent 573c45b commit da99199

5 files changed

Lines changed: 13 additions & 22 deletions

File tree

Detectors/TPC/calibration/src/CorrectionMapsLoader.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void CorrectionMapsLoader::extractCCDBInputs(ProcessingContext& pc, float tpcSca
3838

3939
if (mApplySecEdgeFlucCorr) {
4040
pc.inputs().get<o2::gpu::TPCFastTransform*>("tpcCorrMapSecFluc");
41-
pc.inputs().get<TTree*>("tpSecFlucInfo");
41+
pc.inputs().get<TTree*>("tpcSecFlucInfo");
4242
}
4343

4444
const int maxDumRep = 5;
@@ -119,7 +119,7 @@ void CorrectionMapsLoader::requestCCDBInputs(std::vector<InputSpec>& inputs, con
119119
// load sector edge fluctuation correction only for data
120120
if (gloOpts.enableSecEdgeFlucCorrection) {
121121
addInput(inputs, {"tpcCorrMapSecFluc", o2::header::gDataOriginTPC, "CorrMapSecFluc", 0, Lifetime::Condition, ccdbParamSpec(CDBTypeMap.at(CDBType::CalSecEdgeCorrection), {}, 1)}); // time-dependent
122-
addInput(inputs, {"tpSecFlucInfo", o2::header::gDataOriginTPC, "InfoMapSecFluc", 0, Lifetime::Condition, ccdbParamSpec(CDBTypeMap.at(CDBType::CalSecEdgeInfo), {}, 1)}); // time-dependent
122+
addInput(inputs, {"tpcSecFlucInfo", o2::header::gDataOriginTPC, "InfoMapSecFluc", 0, Lifetime::Condition, ccdbParamSpec(CDBTypeMap.at(CDBType::CalSecEdgeInfo), {}, 1)}); // time-dependent
123123
}
124124

125125
if (gloOpts.requestCTPLumi) {

Detectors/TPC/calibration/src/CorrectionMapsOptions.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ CorrectionMapsGloOpts CorrectionMapsOptions::parseGlobalOptions(const o2::framew
3333
tpcopt.lumiMode = static_cast<LumiScaleMode>(lumiModeVal);
3434

3535
tpcopt.enableMShapeCorrection = opts.get<bool>("enable-M-shape-correction");
36-
tpcopt.enableSecEdgeFlucCorrection = opts.get<bool>("enable-sec-edge-fluc-correction");
36+
tpcopt.enableSecEdgeFlucCorrection = !opts.get<bool>("disable-sec-edge-fluc-correction");
3737
tpcopt.requestCTPLumi = !opts.get<bool>("disable-ctp-lumi-request");
3838
tpcopt.checkCTPIDCconsistency = !opts.get<bool>("disable-lumi-type-consistency-check");
3939
if (!tpcopt.requestCTPLumi && tpcopt.lumiType == LumiScaleType::CTPLumi) {
@@ -50,7 +50,7 @@ void CorrectionMapsOptions::addGlobalOptions(std::vector<ConfigParamSpec>& optio
5050
addOption(options, ConfigParamSpec{"enable-M-shape-correction", o2::framework::VariantType::Bool, false, {"Enable M-shape distortion correction"}});
5151
addOption(options, ConfigParamSpec{"disable-ctp-lumi-request", o2::framework::VariantType::Bool, false, {"do not request CTP lumi (regardless what is used for corrections)"}});
5252
addOption(options, ConfigParamSpec{"disable-lumi-type-consistency-check", o2::framework::VariantType::Bool, false, {"disable check of selected CTP or IDC scaling source being consistent with the map"}});
53-
addOption(options, ConfigParamSpec{"enable-sec-edge-fluc-correction", o2::framework::VariantType::Bool, false, {"Enable sector edge fluctuation correction"}});
53+
addOption(options, ConfigParamSpec{"disable-sec-edge-fluc-correction", o2::framework::VariantType::Bool, false, {"Disable sector edge fluctuation correction"}});
5454
}
5555

5656
void CorrectionMapsOptions::addOption(std::vector<ConfigParamSpec>& options, ConfigParamSpec&& osp)

Detectors/TPC/workflow/include/TPCWorkflow/TPCTimeSeriesSpec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace tpc
2323
static constexpr header::DataDescription getDataDescriptionTimeSeries() { return header::DataDescription{"TIMESERIES"}; }
2424
static constexpr header::DataDescription getDataDescriptionTPCTimeSeriesTFId() { return header::DataDescription{"ITPCTSTFID"}; }
2525

26-
o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, o2::dataformats::GlobalTrackID::mask_t src, const bool enableSecEdgeFluc);
26+
o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, o2::dataformats::GlobalTrackID::mask_t src);
2727

2828
} // end namespace tpc
2929
} // end namespace o2

Detectors/TPC/workflow/src/TPCTimeSeriesSpec.cxx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class TPCTimeSeries : public Task
6464
{
6565
public:
6666
/// \constructor
67-
TPCTimeSeries(std::shared_ptr<o2::base::GRPGeomRequest> req, const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, const bool tpcOnly, std::shared_ptr<o2::globaltracking::DataRequest> dr, const bool enableSecEdgeFluc) : mCCDBRequest(req), mDisableWriter(disableWriter), mMatType(matType), mUnbinnedWriter(enableUnbinnedWriter), mTPCOnly(tpcOnly), mDataRequest(dr), mEnableSecEdgeFluc(enableSecEdgeFluc) {};
67+
TPCTimeSeries(std::shared_ptr<o2::base::GRPGeomRequest> req, const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, const bool tpcOnly, std::shared_ptr<o2::globaltracking::DataRequest> dr) : mCCDBRequest(req), mDisableWriter(disableWriter), mMatType(matType), mUnbinnedWriter(enableUnbinnedWriter), mTPCOnly(tpcOnly), mDataRequest(dr) {};
6868

6969
void init(framework::InitContext& ic) final
7070
{
@@ -135,18 +135,14 @@ class TPCTimeSeries : public Task
135135
mVDrift = mTPCVDriftHelper.getVDriftObject().getVDrift();
136136
LOGP(info, "Updated reference drift velocity to: {}", mVDrift);
137137
}
138-
if (mEnableSecEdgeFluc) {
139-
pc.inputs().get<TTree*>("tpcSecFlucInfo");
140-
}
138+
pc.inputs().get<TTree*>("tpcSecFlucInfo");
141139
mBufferDCA.mVDrift = mVDrift;
142140

143141
const int nBins = getNBins();
144142

145143
mTimeMS = o2::base::GRPGeomHelper::instance().getOrbitResetTimeMS() + processing_helpers::getFirstTForbit(pc) * o2::constants::lhc::LHCOrbitMUS / 1000;
146144
mRun = processing_helpers::getRunNumber(pc);
147-
if (mEnableSecEdgeFluc) {
148-
mBufferDCA.mSecEdgeFlucCorr = mSecEdgeFlucInfo.getSectorsAtTime(mRun, static_cast<long>(mTimeMS));
149-
}
145+
mBufferDCA.mSecEdgeFlucCorr = mSecEdgeFlucInfo.getSectorsAtTime(mRun, static_cast<long>(mTimeMS));
150146
mBufferDCA.mTemperature = mPTHelper.getMeanTemperature(mTimeMS);
151147
mBufferDCA.mPressure = mPTHelper.getPressure(mTimeMS);
152148

@@ -1053,7 +1049,6 @@ class TPCTimeSeries : public Task
10531049
const bool mUnbinnedWriter{false}; /// write out additional unbinned data
10541050
const bool mTPCOnly{false}; ///< produce only TPC variables
10551051
std::shared_ptr<o2::globaltracking::DataRequest> mDataRequest; ///< steers the input
1056-
bool mEnableSecEdgeFluc{false}; ///< enable write out of sector edge fluctuations
10571052
int mPhiBins = SECTORSPERSIDE; ///< number of phi bins
10581053
int mTglBins{3}; ///< number of tgl bins
10591054
int mQPtBins{20}; ///< number of qPt bins
@@ -1836,7 +1831,7 @@ class TPCTimeSeries : public Task
18361831
}
18371832
};
18381833

1839-
o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, GTrackID::mask_t src, const bool enableSecEdgeFluc)
1834+
o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter, const o2::base::Propagator::MatCorrType matType, const bool enableUnbinnedWriter, GTrackID::mask_t src)
18401835
{
18411836
auto dataRequest = std::make_shared<DataRequest>();
18421837
bool useMC = false;
@@ -1865,9 +1860,7 @@ o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter,
18651860

18661861
o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);
18671862
PressureTemperatureHelper::requestCCDBInputs(dataRequest->inputs);
1868-
if (enableSecEdgeFluc) {
1869-
dataRequest->inputs.emplace_back("tpcSecFlucInfo", o2::header::gDataOriginTPC, "InfoMapSecFluc", 0, Lifetime::Condition, ccdbParamSpec(CDBTypeMap.at(CDBType::CalSecEdgeInfo), {}, 1));
1870-
}
1863+
dataRequest->inputs.emplace_back("tpcSecFlucInfo", o2::header::gDataOriginTPC, "InfoMapSecFluc", 0, Lifetime::Condition, ccdbParamSpec(CDBTypeMap.at(CDBType::CalSecEdgeInfo), {}, 1));
18711864

18721865
std::vector<OutputSpec> outputs;
18731866
outputs.emplace_back(o2::header::gDataOriginTPC, getDataDescriptionTimeSeries(), 0, Lifetime::Sporadic);
@@ -1879,7 +1872,7 @@ o2::framework::DataProcessorSpec getTPCTimeSeriesSpec(const bool disableWriter,
18791872
"tpc-time-series",
18801873
dataRequest->inputs,
18811874
outputs,
1882-
AlgorithmSpec{adaptFromTask<TPCTimeSeries>(ccdbRequest, disableWriter, matType, enableUnbinnedWriter, tpcOnly, dataRequest, enableSecEdgeFluc)},
1875+
AlgorithmSpec{adaptFromTask<TPCTimeSeries>(ccdbRequest, disableWriter, matType, enableUnbinnedWriter, tpcOnly, dataRequest)},
18831876
Options{
18841877
{"min-momentum", VariantType::Float, 0.2f, {"Minimum momentum of the tracks"}},
18851878
{"min-cluster", VariantType::Int, 80, {"Minimum number of clusters of the tracks"}},

Detectors/TPC/workflow/src/tpc-time-series.cxx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
2929
{"disable-root-output", VariantType::Bool, false, {"disable root-files output writers"}},
3030
{"enable-unbinned-root-output", VariantType::Bool, false, {"writing out unbinned track data"}},
3131
{"track-sources", VariantType::String, std::string{o2::dataformats::GlobalTrackID::ALL}, {"comma-separated list of sources to use"}},
32-
{"material-type", VariantType::Int, 2, {"Type for the material budget during track propagation: 0=None, 1=Geo, 2=LUT"}},
33-
{"enable-sec-edge-fluc-correction", VariantType::Bool, false, {"Enable sector edge fluctuation correction output"}}};
32+
{"material-type", VariantType::Int, 2, {"Type for the material budget during track propagation: 0=None, 1=Geo, 2=LUT"}}};
3433

3534
std::swap(workflowOptions, options);
3635
}
@@ -45,8 +44,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& config)
4544
const bool enableUnbinnedWriter = config.options().get<bool>("enable-unbinned-root-output");
4645
auto src = o2::dataformats::GlobalTrackID::getSourcesMask(config.options().get<std::string>("track-sources"));
4746
auto materialType = static_cast<o2::base::Propagator::MatCorrType>(config.options().get<int>("material-type"));
48-
const bool enableSecEdgeFluc = config.options().get<bool>("enable-sec-edge-fluc-correction");
49-
workflow.emplace_back(o2::tpc::getTPCTimeSeriesSpec(disableWriter, materialType, enableUnbinnedWriter, src, enableSecEdgeFluc));
47+
workflow.emplace_back(o2::tpc::getTPCTimeSeriesSpec(disableWriter, materialType, enableUnbinnedWriter, src));
5048
if (!disableWriter) {
5149
workflow.emplace_back(o2::tpc::getTPCTimeSeriesWriterSpec());
5250
}

0 commit comments

Comments
 (0)