Skip to content

Commit ad5c282

Browse files
TPC: move disable-IDC-scalers to CorrectionMapsOptions (#15754)
* TPC: move disable-IDC-scalers to CorrectionMapsOptions * TPC: derive enableIDCs from lumiType==TPCScaler in getTPCScalerSpec Unify getTPCScalerSpec() across all 13 call sites to take just CorrectionMapsGloOpts and derive enableIDCs/enableMShape internally, instead of passing them as separate bools. This removes the disable-IDC-scalers CLI flag and enableIDCScalers field added in the previous commit: tpc-scaler.cxx/tpc-refitter-workflow.cxx now derive enableIDCs the same way as every other caller already did (sclOpts.lumiType == LumiScaleType::TPCScaler), instead of a separate manual override. dpl-workflow.sh's parse_TPC_CORR_SCALING() previously hand-replicated this exact lumiType==TPCScaler logic externally (IGNOREIDC) just to synthesize --disable-IDC-scalers for o2-tpc-scaler-workflow; that workaround is now unnecessary and removed.
1 parent 1d64083 commit ad5c282

16 files changed

Lines changed: 21 additions & 29 deletions

Detectors/Align/Workflow/src/barrel-alignment-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
151151
}
152152

153153
if (!configcontext.options().get<bool>("disable-root-input")) {
154-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
154+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt));
155155
}
156156

157157
specs.emplace_back(o2::align::getBarrelAlignmentSpec(srcMP, src, dets, skipDetClusters, enableCosmic, postprocess, useMC));

Detectors/GlobalTrackingWorkflow/src/cosmics-match-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
107107
GID::mask_t srcCl = src;
108108
GID::mask_t dummy;
109109
if (!configcontext.options().get<bool>("disable-root-input")) {
110-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
110+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt));
111111
}
112112
bool usePV = configcontext.options().get<bool>("use-pv-info");
113113
specs.emplace_back(o2::globaltracking::getCosmicsMatchingSpec(src, usePV, useMC));

Detectors/GlobalTrackingWorkflow/src/secondary-vertexing-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
102102
}
103103
WorkflowSpec specs;
104104
if (!configcontext.options().get<bool>("disable-root-input")) {
105-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
105+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt));
106106
}
107107
specs.emplace_back(o2::vertexing::getSecondaryVertexingSpec(src, enableCasc, enable3body, enableStrTr, enableCCDBParams, useMC, useGeom));
108108

Detectors/GlobalTrackingWorkflow/src/tof-matcher-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
169169
}
170170
}
171171
if (!configcontext.options().get<bool>("disable-root-input")) {
172-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
172+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt));
173173
}
174174
specs.emplace_back(o2::globaltracking::getTOFMatcherSpec(src, useMC, useFIT, refitTPCTOF, strict, extratolerancetrd, writeMatchable, sclOpt.requestCTPLumi, nLanes)); // doTPCrefit not yet supported (need to load TPC clusters?)
175175

Detectors/GlobalTrackingWorkflow/src/tpcits-match-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ WorkflowSpec defineDataProcessing(o2::framework::ConfigContext const& configcont
9494

9595
o2::framework::WorkflowSpec specs;
9696
if (!configcontext.options().get<bool>("disable-root-input")) {
97-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
97+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt));
9898
}
9999
specs.emplace_back(o2::globaltracking::getTPCITSMatchingSpec(srcL, useFT0, calib, !GID::includesSource(GID::TPC, src), useGeom, useMC, sclOpt.requestCTPLumi));
100100

Detectors/GlobalTrackingWorkflow/study/src/tpc-track-study-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
7272
o2::globaltracking::InputHelper::addInputSpecs(configcontext, specs, srcCls, srcTrc, srcTrc, useMC);
7373
o2::globaltracking::InputHelper::addInputSpecsPVertex(configcontext, specs, useMC); // P-vertex is always needed
7474
if (!configcontext.options().get<bool>("disable-root-input")) {
75-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
75+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt));
7676
}
7777
specs.emplace_back(o2::trackstudy::getTPCTrackStudySpec(srcTrc, srcCls, useMC));
7878

Detectors/GlobalTrackingWorkflow/study/src/trackMCStudy-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
8383
o2::globaltracking::InputHelper::addInputSpecsSVertex(configcontext, specs);
8484
}
8585
if (!configcontext.options().get<bool>("disable-root-input")) {
86-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
86+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt));
8787
}
8888

8989
specs.emplace_back(o2::trackstudy::getTrackMCStudySpec(srcTrc, srcCls, checkSV));

Detectors/GlobalTrackingWorkflow/study/src/tracking-study-workflow.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
7272
srcCls = srcCls | GID::getSourcesMask("CTP");
7373
}
7474
if (!configcontext.options().get<bool>("disable-root-input")) {
75-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpt.enableMShapeCorrection, sclOpt));
75+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt));
7676
}
7777
o2::globaltracking::InputHelper::addInputSpecs(configcontext, specs, srcCls, srcTrc, srcTrc, useMC);
7878
o2::globaltracking::InputHelper::addInputSpecsPVertex(configcontext, specs, useMC); // P-vertex is always needed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace o2
2020
namespace tpc
2121
{
2222

23-
o2::framework::DataProcessorSpec getTPCScalerSpec(bool enableIDCs, bool enableMShape, const o2::tpc::CorrectionMapsGloOpts& sclOpts);
23+
o2::framework::DataProcessorSpec getTPCScalerSpec(const o2::tpc::CorrectionMapsGloOpts& sclOpts);
2424

2525
} // end namespace tpc
2626
} // end namespace o2

Detectors/TPC/workflow/src/RecoWorkflow.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
201201
laneConfiguration,
202202
&hook},
203203
propagateMC));
204-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpts.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpts.enableMShapeCorrection, sclOpts));
204+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpts));
205205
if (produceTracks && sclOpts.requestCTPLumi) { // need CTP digits (lumi) reader
206206
specs.emplace_back(o2::ctp::getDigitsReaderSpec(false));
207207
}
@@ -223,7 +223,7 @@ framework::WorkflowSpec getWorkflow(CompletionPolicyData* policyData, std::vecto
223223
if (!getenv("DPL_DISABLE_TPC_TRIGGER_READER") || atoi(getenv("DPL_DISABLE_TPC_TRIGGER_READER")) != 1) {
224224
specs.emplace_back(o2::tpc::getTPCTriggerReaderSpec());
225225
}
226-
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpts.lumiType == o2::tpc::LumiScaleType::TPCScaler, sclOpts.enableMShapeCorrection, sclOpts));
226+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpts));
227227
if (sclOpts.requestCTPLumi) { // need CTP digits (lumi) reader
228228
specs.emplace_back(o2::ctp::getDigitsReaderSpec(false));
229229
}

0 commit comments

Comments
 (0)