Skip to content

Commit cd73feb

Browse files
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 7a97a7c commit cd73feb

18 files changed

Lines changed: 20 additions & 23 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/calibration/src/CorrectionMapsOptions.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ CorrectionMapsGloOpts CorrectionMapsOptions::parseGlobalOptions(const o2::framew
3434

3535
tpcopt.enableMShapeCorrection = opts.get<bool>("enable-M-shape-correction");
3636
tpcopt.enableSecEdgeFlucCorrection = !opts.get<bool>("disable-sec-edge-fluc-correction");
37-
tpcopt.enableIDCScalers = !opts.get<bool>("disable-IDC-scalers");
3837
tpcopt.requestCTPLumi = !opts.get<bool>("disable-ctp-lumi-request");
3938
tpcopt.checkCTPIDCconsistency = !opts.get<bool>("disable-lumi-type-consistency-check");
4039
if (!tpcopt.requestCTPLumi && tpcopt.lumiType == LumiScaleType::CTPLumi) {
@@ -52,7 +51,6 @@ void CorrectionMapsOptions::addGlobalOptions(std::vector<ConfigParamSpec>& optio
5251
addOption(options, ConfigParamSpec{"disable-ctp-lumi-request", o2::framework::VariantType::Bool, false, {"do not request CTP lumi (regardless what is used for corrections)"}});
5352
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"}});
5453
addOption(options, ConfigParamSpec{"disable-sec-edge-fluc-correction", o2::framework::VariantType::Bool, false, {"Disable sector edge fluctuation correction"}});
55-
addOption(options, ConfigParamSpec{"disable-IDC-scalers", o2::framework::VariantType::Bool, false, {"Disable TPC scalers for space-charge distortion fluctuation correction"}});
5654
}
5755

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

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

0 commit comments

Comments
 (0)