Skip to content

Commit 7a97a7c

Browse files
TPC: move disable-IDC-scalers to CorrectionMapsOptions
1 parent 792c0d0 commit 7a97a7c

4 files changed

Lines changed: 6 additions & 11 deletions

File tree

Detectors/TPC/calibration/src/CorrectionMapsOptions.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ 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");
3738
tpcopt.requestCTPLumi = !opts.get<bool>("disable-ctp-lumi-request");
3839
tpcopt.checkCTPIDCconsistency = !opts.get<bool>("disable-lumi-type-consistency-check");
3940
if (!tpcopt.requestCTPLumi && tpcopt.lumiType == LumiScaleType::CTPLumi) {
@@ -51,6 +52,7 @@ void CorrectionMapsOptions::addGlobalOptions(std::vector<ConfigParamSpec>& optio
5152
addOption(options, ConfigParamSpec{"disable-ctp-lumi-request", o2::framework::VariantType::Bool, false, {"do not request CTP lumi (regardless what is used for corrections)"}});
5253
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"}});
5354
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"}});
5456
}
5557

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

Detectors/TPC/workflow/src/tpc-refitter-workflow.cxx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
4444
{"track-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of track sources to use"}},
4545
{"cluster-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of cluster sources to use"}},
4646
{"disable-root-input", VariantType::Bool, false, {"disable root-files input reader"}},
47-
{"enable-M-shape-correction", VariantType::Bool, false, {"Enable M-shape distortion correction"}},
48-
{"disable-IDC-scalers", VariantType::Bool, false, {"Disable TPC scalers for space-charge distortion fluctuation correction"}},
4947
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
5048
o2::tpc::CorrectionMapsOptions::addGlobalOptions(options);
5149
o2::raw::HBFUtilsInitializer::addConfigOption(options);
@@ -76,9 +74,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
7674
srcCls = srcCls | GID::getSourcesMask("CTP");
7775
}
7876

79-
const auto enableMShape = configcontext.options().get<bool>("enable-M-shape-correction");
80-
const auto enableIDCs = !configcontext.options().get<bool>("disable-IDC-scalers");
81-
specs.emplace_back(o2::tpc::getTPCScalerSpec(enableIDCs, enableMShape, sclOpt));
77+
specs.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.enableIDCScalers, sclOpt.enableMShapeCorrection, sclOpt));
8278

8379
o2::globaltracking::InputHelper::addInputSpecs(configcontext, specs, srcCls, srcTrc, srcTrc, useMC);
8480
o2::globaltracking::InputHelper::addInputSpecsPVertex(configcontext, specs, useMC); // P-vertex is always needed

Detectors/TPC/workflow/src/tpc-scaler.cxx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
2323
{
2424
// option allowing to set parameters
2525
std::vector<ConfigParamSpec> options{
26-
ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}},
27-
{"enable-M-shape-correction", VariantType::Bool, false, {"Enable M-shape distortion correction"}},
28-
{"disable-IDC-scalers", VariantType::Bool, false, {"Disable TPC scalers for space-charge distortion fluctuation correction"}}};
26+
ConfigParamSpec{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings"}}};
2927
o2::tpc::CorrectionMapsOptions::addGlobalOptions(options);
3028
std::swap(workflowOptions, options);
3129
}
@@ -36,9 +34,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& config)
3634
{
3735
WorkflowSpec workflow;
3836
o2::conf::ConfigurableParam::updateFromString(config.options().get<std::string>("configKeyValues"));
39-
const auto enableMShape = config.options().get<bool>("enable-M-shape-correction");
40-
const auto enableIDCs = !config.options().get<bool>("disable-IDC-scalers");
4137
auto sclOpt = o2::tpc::CorrectionMapsOptions::parseGlobalOptions(config.options());
42-
workflow.emplace_back(o2::tpc::getTPCScalerSpec(enableIDCs, enableMShape, sclOpt));
38+
workflow.emplace_back(o2::tpc::getTPCScalerSpec(sclOpt.enableIDCScalers, sclOpt.enableMShapeCorrection, sclOpt));
4339
return workflow;
4440
}

GPU/TPCFastTransformation/CorrectionMapsTypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ struct CorrectionMapsGloOpts {
4343
bool requestCTPLumi = true; ///< request CTP Lumi regardless of what is used for corrections scaling
4444
bool checkCTPIDCconsistency = true; ///< check the selected CTP or IDC scaling source being consistent with mean scaler of the map
4545
bool enableSecEdgeFlucCorrection = true; ///< enable correction of sector edge fluctuations
46+
bool enableIDCScalers = true; ///< enable TPC scalers for space-charge distortion fluctuation correction
4647
};
4748
} // namespace o2::tpc
4849
#endif

0 commit comments

Comments
 (0)