Skip to content

Commit

Permalink
TPC: Fix usage of derivative map for scaling of space-charge correcti…
Browse files Browse the repository at this point in the history
…ons (AliceO2Group#12264)

* TPC: Fix usage of derivative map for scaling of space-charge corrections

- add option to override lumi of reference map (reference map can be the
derivative map)

- changing definition of scaling when using the derivative map: The
derivative map is defined as "map_high_IR - map_low_IR".
The stored lumi of the derivative map should correspond to
"<Lumi_high_IR> - <Lumi_low_IR>"

- Changing condition when scaling is used: for the derivative map the
scaling is negative, when the inst_lumi < mean_lumi

* Helper to handle global scaling options, extend to all wfs with TPC corrections

* Move CorrectionMapsLoader device options to TPCCorrMap.. configurable

Former options --corrmap-lumi-mean, --corrmap-lumi-inst, --corrmap-lumi-ref, --ctp-lumi-factor, --ctp-lumi-source
are moved to new configurable param CorrMapParam as TPCCorrMap.lumiMean, lumiInst, lumiMeanRef, lumiInstFactor and ctpLumiSource
respectively. The object is not loaded from the CCDB (default uploaded) and can be modified from the command line
as a usial configurable param.
The dpl-workflow.sh parses TPC_CORR_SCALING env var. which is now a mix of options --lumi-type <0,1,2>, --corrmap-lumi-mode <0,1> abd
TPCCorrMap... settings, e.g. TPCCorrMap=--lumi-type 2 --corrmap-lumi-mode 1 TPCCorrMap.lumiInstFactor=3.141

---------

Co-authored-by: shahoian <[email protected]>
  • Loading branch information
matthias-kleiner and shahor02 authored Nov 18, 2023
1 parent 1170977 commit 0b3fa30
Show file tree
Hide file tree
Showing 39 changed files with 320 additions and 133 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,17 @@ using namespace o2::framework;

namespace o2
{
namespace tpc
{
struct CorrectionMapsLoaderGloOpts;
}

namespace align
{

/// create a processor spec
framework::DataProcessorSpec getBarrelAlignmentSpec(o2::dataformats::GlobalTrackID::mask_t srcMP, o2::dataformats::GlobalTrackID::mask_t src,
o2::detectors::DetID::mask_t dets, o2::detectors::DetID::mask_t skipDetClusters, bool enableCosmic, int postproc, bool useMC, int lumiType);
o2::detectors::DetID::mask_t dets, o2::detectors::DetID::mask_t skipDetClusters, bool enableCosmic, int postproc, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts);

} // namespace align
} // namespace o2
Expand Down
4 changes: 2 additions & 2 deletions Detectors/Align/Workflow/src/BarrelAlignmentSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ void BarrelAlignmentSpec::endOfStream(EndOfStreamContext& ec)
mDBGOut.reset();
}

DataProcessorSpec getBarrelAlignmentSpec(GTrackID::mask_t srcMP, GTrackID::mask_t src, DetID::mask_t dets, DetID::mask_t skipDetClusters, bool enableCosmic, int postprocess, bool useMC, int lumiType)
DataProcessorSpec getBarrelAlignmentSpec(GTrackID::mask_t srcMP, GTrackID::mask_t src, DetID::mask_t dets, DetID::mask_t skipDetClusters, bool enableCosmic, int postprocess, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts)
{
std::vector<OutputSpec> outputs;
auto dataRequest = std::make_shared<DataRequest>();
Expand All @@ -383,7 +383,7 @@ DataProcessorSpec getBarrelAlignmentSpec(GTrackID::mask_t srcMP, GTrackID::mask_
}
if (src[DetID::TPC] && !skipDetClusters[DetID::TPC]) {
o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, lumiType);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, sclOpts);
loadTPCCalib = true;
}
}
Expand Down
10 changes: 5 additions & 5 deletions Detectors/Align/Workflow/src/barrel-alignment-workflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "TPCReaderWorkflow/TrackReaderSpec.h"
#include "TPCReaderWorkflow/ClusterReaderSpec.h"
#include "TPCWorkflow/ClusterSharingMapSpec.h"
#include "TPCCalibration/CorrectionMapsLoader.h"
#include "TOFWorkflowIO/ClusterReaderSpec.h"
#include "TOFWorkflowIO/TOFMatchedReaderSpec.h"
#include "TOFWorkflowIO/ClusterReaderSpec.h"
Expand Down Expand Up @@ -55,9 +56,9 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{"enable-tpc-tracks", VariantType::Bool, false, {"allow reading TPC tracks"}},
{"enable-tpc-clusters", VariantType::Bool, false, {"allow reading TPC clusters (will trigger TPC tracks reading)"}},
{"enable-cosmic", VariantType::Bool, false, {"enable cosmic tracks)"}},
{"lumi-type", o2::framework::VariantType::Int, 0, {"1 = require CTP lumi for TPC correction scaling, 2 = require TPC scalers for TPC correction scaling"}},
{"postprocessing", VariantType::Int, 0, {"postprocessing bits: 1 - extract alignment objects, 2 - check constraints, 4 - print mpParams/Constraints, 8 - relabel pede results"}},
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
o2::tpc::CorrectionMapsLoader::addGlobalOptions(options);
o2::raw::HBFUtilsInitializer::addConfigOption(options);
std::swap(workflowOptions, options);
}
Expand Down Expand Up @@ -91,7 +92,6 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
bool loadTPCTracks = configcontext.options().get<bool>("enable-tpc-tracks");
bool enableCosmic = configcontext.options().get<bool>("enable-cosmic");
bool useMC = configcontext.options().get<bool>("enable-mc");
auto lumiType = configcontext.options().get<int>("lumi-type");

DetID::mask_t dets = allowedDets & DetID::getMask(configcontext.options().get<std::string>("detectors"));
DetID::mask_t skipDetClusters; // optionally skip automatically loaded clusters
Expand All @@ -101,7 +101,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
if (dets[DetID::TPC]) {
loadTPCClusters = loadTPCTracks = true;
}

auto sclOpt = o2::tpc::CorrectionMapsLoader::parseGlobalOptions(configcontext.options());
if (!postprocess) { // this part is needed only if the data should be read
if (GID::includesDet(DetID::ITS, src)) {
src |= GID::getSourceMask(GID::ITS);
Expand Down Expand Up @@ -140,14 +140,14 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
}
LOG(info) << "adding TOF request";
}
if (lumiType == 1) {
if (sclOpt.lumiType == 1) {
src = src | GID::getSourcesMask("CTP");
}
// write the configuration used for the workflow
o2::conf::ConfigurableParam::writeINI("o2_barrel_alignment_configuration.ini");
}

specs.emplace_back(o2::align::getBarrelAlignmentSpec(srcMP, src, dets, skipDetClusters, enableCosmic, postprocess, useMC, lumiType));
specs.emplace_back(o2::align::getBarrelAlignmentSpec(srcMP, src, dets, skipDetClusters, enableCosmic, postprocess, useMC, sclOpt));
// RS FIXME: check which clusters are really needed
if (!postprocess) {
GID::mask_t dummy;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@ using namespace o2::framework;

namespace o2
{
namespace tpc
{
struct CorrectionMapsLoaderGloOpts;
}

namespace globaltracking
{

/// create a processor spec
framework::DataProcessorSpec getCosmicsMatchingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, int lumiType);
framework::DataProcessorSpec getCosmicsMatchingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts);

} // namespace globaltracking
} // namespace o2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,16 @@

namespace o2
{
namespace tpc
{
struct CorrectionMapsLoaderGloOpts;
}

namespace vertexing
{

/// create a processor spec
o2::framework::DataProcessorSpec getSecondaryVertexingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool enableCasc, bool enable3body, bool enableStrangenesTracking, bool useMC, int lumiType);
o2::framework::DataProcessorSpec getSecondaryVertexingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool enableCasc, bool enable3body, bool enableStrangenesTracking, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts);

} // namespace vertexing
} // namespace o2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ using namespace o2::framework;

namespace o2
{
namespace tpc
{
struct CorrectionMapsLoaderGloOpts;
}
namespace globaltracking
{

/// create a processor spec
framework::DataProcessorSpec getTOFMatcherSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, bool useFIT, bool tpcRefit, bool strict, float extratolerancetrd, bool pushMatchable, int lumiType);
framework::DataProcessorSpec getTOFMatcherSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, bool useFIT, bool tpcRefit, bool strict, float extratolerancetrd, bool pushMatchable, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts);

} // namespace globaltracking
} // namespace o2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ using namespace o2::framework;

namespace o2
{
namespace tpc
{
struct CorrectionMapsLoaderGloOpts;
}
namespace globaltracking
{
/// create a processor spec
framework::DataProcessorSpec getTPCITSMatchingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useFT0, bool calib, bool skipTPCOnly, bool useMC, int lumiType);
framework::DataProcessorSpec getTPCITSMatchingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useFT0, bool calib, bool skipTPCOnly, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts);

} // namespace globaltracking
} // namespace o2
Expand Down
4 changes: 2 additions & 2 deletions Detectors/GlobalTrackingWorkflow/src/CosmicsMatchingSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void CosmicsMatchingSpec::endOfStream(EndOfStreamContext& ec)
mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
}

DataProcessorSpec getCosmicsMatchingSpec(GTrackID::mask_t src, bool useMC, int lumiType)
DataProcessorSpec getCosmicsMatchingSpec(GTrackID::mask_t src, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts)
{
std::vector<OutputSpec> outputs;
Options opts{
Expand All @@ -198,7 +198,7 @@ DataProcessorSpec getCosmicsMatchingSpec(GTrackID::mask_t src, bool useMC, int l
dataRequest->inputs,
true);
o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, lumiType);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, sclOpts);

return DataProcessorSpec{
"cosmics-matcher",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "TPCCalibration/CorrectionMapsLoader.h"
#include "Framework/ConfigParamRegistry.h"
#include "Framework/DeviceSpec.h"
#include "TPCCalibration/CorrectionMapsLoader.h"

using namespace o2::framework;

Expand Down Expand Up @@ -201,7 +202,7 @@ void SecondaryVertexingSpec::updateTimeDependentParams(ProcessingContext& pc)
pc.inputs().get<o2::dataformats::MeanVertexObject*>("meanvtx");
}

DataProcessorSpec getSecondaryVertexingSpec(GTrackID::mask_t src, bool enableCasc, bool enable3body, bool enableStrangenesTracking, bool useMC, int lumiType)
DataProcessorSpec getSecondaryVertexingSpec(GTrackID::mask_t src, bool enableCasc, bool enable3body, bool enableStrangenesTracking, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts)
{
std::vector<OutputSpec> outputs;
Options opts{
Expand Down Expand Up @@ -231,7 +232,7 @@ DataProcessorSpec getSecondaryVertexingSpec(GTrackID::mask_t src, bool enableCas
true);
if (src[GTrackID::TPC]) {
o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, lumiType);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, sclOpts);
}
outputs.emplace_back("GLO", "V0S_IDX", 0, Lifetime::Timeframe); // found V0s indices
outputs.emplace_back("GLO", "V0S", 0, Lifetime::Timeframe); // found V0s
Expand Down
4 changes: 2 additions & 2 deletions Detectors/GlobalTrackingWorkflow/src/TOFMatcherSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void TOFMatcherSpec::endOfStream(EndOfStreamContext& ec)
mTimer.CpuTime(), mTimer.RealTime(), mTimer.Counter() - 1);
}

DataProcessorSpec getTOFMatcherSpec(GID::mask_t src, bool useMC, bool useFIT, bool tpcRefit, bool strict, float extratolerancetrd, bool pushMatchable, int lumiType)
DataProcessorSpec getTOFMatcherSpec(GID::mask_t src, bool useMC, bool useFIT, bool tpcRefit, bool strict, float extratolerancetrd, bool pushMatchable, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts)
{
uint32_t ss = o2::globaltracking::getSubSpec(strict ? o2::globaltracking::MatchingType::Strict : o2::globaltracking::MatchingType::Standard);
Options opts;
Expand All @@ -260,7 +260,7 @@ DataProcessorSpec getTOFMatcherSpec(GID::mask_t src, bool useMC, bool useFIT, bo
dataRequest->inputs,
true);
o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, lumiType);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, sclOpts);
std::vector<OutputSpec> outputs;
if (GID::includesSource(GID::TPC, src)) {
outputs.emplace_back(o2::header::gDataOriginTOF, "MTC_TPC", ss, Lifetime::Timeframe);
Expand Down
4 changes: 2 additions & 2 deletions Detectors/GlobalTrackingWorkflow/src/TPCITSMatchingSpec.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void TPCITSMatchingDPL::updateTimeDependentParams(ProcessingContext& pc)
}
}

DataProcessorSpec getTPCITSMatchingSpec(GTrackID::mask_t src, bool useFT0, bool calib, bool skipTPCOnly, bool useMC, int lumiType)
DataProcessorSpec getTPCITSMatchingSpec(GTrackID::mask_t src, bool useFT0, bool calib, bool skipTPCOnly, bool useMC, const o2::tpc::CorrectionMapsLoaderGloOpts& sclOpts)
{
std::vector<OutputSpec> outputs;
auto dataRequest = std::make_shared<DataRequest>();
Expand Down Expand Up @@ -239,7 +239,7 @@ DataProcessorSpec getTPCITSMatchingSpec(GTrackID::mask_t src, bool useFT0, bool
{"debug-tree-flags", VariantType::Int, 0, {"DebugFlagTypes bit-pattern for debug tree"}}};

o2::tpc::VDriftHelper::requestCCDBInputs(dataRequest->inputs);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, lumiType);
o2::tpc::CorrectionMapsLoader::requestCCDBInputs(dataRequest->inputs, opts, sclOpts);

return DataProcessorSpec{
"itstpc-track-matcher",
Expand Down
10 changes: 5 additions & 5 deletions Detectors/GlobalTrackingWorkflow/src/cosmics-match-workflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "DetectorsRaw/HBFUtilsInitializer.h"
#include "Framework/CallbacksPolicy.h"
#include "GlobalTrackingWorkflowHelpers/InputHelper.h"
#include "TPCCalibration/CorrectionMapsLoader.h"

using namespace o2::framework;
using DetID = o2::detectors::DetID;
Expand All @@ -49,8 +50,8 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{"disable-root-input", o2::framework::VariantType::Bool, false, {"disable root-files input reader"}},
{"disable-root-output", o2::framework::VariantType::Bool, false, {"disable root-files output writer"}},
{"track-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of sources to use"}},
{"lumi-type", o2::framework::VariantType::Int, 0, {"1 = require CTP lumi for TPC correction scaling, 2 = require TPC scalers for TPC correction scaling"}},
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
o2::tpc::CorrectionMapsLoader::addGlobalOptions(options);
o2::raw::HBFUtilsInitializer::addConfigOption(options);
std::swap(workflowOptions, options);
}
Expand Down Expand Up @@ -81,10 +82,9 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
o2::conf::ConfigurableParam::updateFromString(configcontext.options().get<std::string>("configKeyValues"));
// write the configuration used for the workflow
o2::conf::ConfigurableParam::writeINI("o2match-cosmics-workflow_configuration.ini");

auto sclOpt = o2::tpc::CorrectionMapsLoader::parseGlobalOptions(configcontext.options());
auto useMC = !configcontext.options().get<bool>("disable-mc");
auto disableRootOut = configcontext.options().get<bool>("disable-root-output");
auto lumiType = configcontext.options().get<int>("lumi-type");

GID::mask_t src = alowedSources & GID::getSourcesMask(configcontext.options().get<std::string>("track-sources"));
if (GID::includesDet(DetID::TPC, src)) {
Expand All @@ -96,12 +96,12 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
if (GID::includesDet(DetID::TOF, src)) {
src |= GID::getSourceMask(GID::TOF);
}
if (lumiType == 1) {
if (sclOpt.lumiType == 1) {
src = src | GID::getSourcesMask("CTP");
}
GID::mask_t srcCl = src;
GID::mask_t dummy;
specs.emplace_back(o2::globaltracking::getCosmicsMatchingSpec(src, useMC, lumiType));
specs.emplace_back(o2::globaltracking::getCosmicsMatchingSpec(src, useMC, sclOpt));

o2::globaltracking::InputHelper::addInputSpecs(configcontext, specs, src, src, src, useMC, dummy); // clusters MC is not needed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "Framework/ConfigParamSpec.h"
#include "Framework/CompletionPolicyHelpers.h"
#include "DetectorsBase/DPLWorkflowUtils.h"
#include "TPCCalibration/CorrectionMapsLoader.h"

using namespace o2::framework;
using GID = o2::dataformats::GlobalTrackID;
Expand Down Expand Up @@ -56,10 +57,9 @@ void customize(std::vector<ConfigParamSpec>& workflowOptions)
{"disable-cascade-finder", o2::framework::VariantType::Bool, false, {"do not run cascade finder"}},
{"disable-3body-finder", o2::framework::VariantType::Bool, false, {"do not run 3 body finder"}},
{"disable-strangeness-tracker", o2::framework::VariantType::Bool, false, {"do not run strangeness tracker"}},

{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}},
{"lumi-type", o2::framework::VariantType::Int, 0, {"1 = require CTP lumi for TPC correction scaling, 2 = require TPC scalers for TPC correction scaling"}},
{"combine-source-devices", o2::framework::VariantType::Bool, false, {"merge DPL source devices"}}};
o2::tpc::CorrectionMapsLoader::addGlobalOptions(options);
o2::raw::HBFUtilsInitializer::addConfigOption(options);
std::swap(workflowOptions, options);
}
Expand All @@ -81,8 +81,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
auto enableCasc = !configcontext.options().get<bool>("disable-cascade-finder");
auto enable3body = !configcontext.options().get<bool>("disable-3body-finder");
auto enableStrTr = !configcontext.options().get<bool>("disable-strangeness-tracker");
auto lumiType = configcontext.options().get<int>("lumi-type");

auto sclOpt = o2::tpc::CorrectionMapsLoader::parseGlobalOptions(configcontext.options());
GID::mask_t src = allowedSources & GID::getSourcesMask(configcontext.options().get<std::string>("vertexing-sources"));
GID::mask_t dummy, srcClus = GID::includesDet(DetID::TOF, src) ? GID::getSourceMask(GID::TOF) : dummy; // eventually, TPC clusters will be needed for refit
if (enableStrTr) {
Expand All @@ -91,12 +90,12 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
if (src[GID::TPC]) {
srcClus |= GID::getSourceMask(GID::TPC);
}
if (lumiType == 1) {
if (sclOpt.lumiType == 1) {
src = src | GID::getSourcesMask("CTP");
}
WorkflowSpec specs;

specs.emplace_back(o2::vertexing::getSecondaryVertexingSpec(src, enableCasc, enable3body, enableStrTr, useMC, lumiType));
specs.emplace_back(o2::vertexing::getSecondaryVertexingSpec(src, enableCasc, enable3body, enableStrTr, useMC, sclOpt));

// only TOF clusters are needed if TOF is involved, no clusters MC needed
WorkflowSpec inputspecs;
Expand Down
9 changes: 5 additions & 4 deletions Detectors/GlobalTrackingWorkflow/src/tof-matcher-workflow.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "Steer/MCKinematicsReader.h"
#include "TSystem.h"
#include "DetectorsBase/DPLWorkflowUtils.h"
#include "TPCCalibration/CorrectionMapsLoader.h"

using namespace o2::framework;
using DetID = o2::detectors::DetID;
Expand Down Expand Up @@ -64,9 +65,9 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
{"enable-dia", o2::framework::VariantType::Bool, false, {"to require diagnostic freq and then write to calib outputs (obsolete since now default)"}},
{"trd-extra-tolerance", o2::framework::VariantType::Float, 500.0f, {"Extra time tolerance for TRD tracks in ns"}},
{"write-matchable", o2::framework::VariantType::Bool, false, {"write all matchable pairs in a file (o2matchable_tof.root)"}},
{"lumi-type", o2::framework::VariantType::Int, 0, {"1 = require CTP lumi for TPC correction scaling, 2 = require TPC scalers for TPC correction scaling"}},
{"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}},
{"combine-devices", o2::framework::VariantType::Bool, false, {"merge DPL source/writer devices"}}};
o2::tpc::CorrectionMapsLoader::addGlobalOptions(options);
o2::raw::HBFUtilsInitializer::addConfigOption(options);
std::swap(workflowOptions, options);
}
Expand All @@ -93,7 +94,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
auto diagnostic = configcontext.options().get<bool>("enable-dia");
auto extratolerancetrd = configcontext.options().get<float>("trd-extra-tolerance");
auto writeMatchable = configcontext.options().get<bool>("write-matchable");
auto lumiType = configcontext.options().get<int>("lumi-type");
auto sclOpt = o2::tpc::CorrectionMapsLoader::parseGlobalOptions(configcontext.options());
bool writematching = 0;
bool writecalib = 0;
auto outputType = configcontext.options().get<std::string>("output-type");
Expand Down Expand Up @@ -138,7 +139,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
if (useFIT) {
clustermask |= GID::getSourceMask(GID::FT0);
}
if (lumiType == 1) {
if (sclOpt.lumiType == 1) {
src = src | GID::getSourcesMask("CTP");
}
if (useMC) {
Expand All @@ -159,7 +160,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
}
}

specs.emplace_back(o2::globaltracking::getTOFMatcherSpec(src, useMC, useFIT, false, strict, extratolerancetrd, writeMatchable, lumiType)); // doTPCrefit not yet supported (need to load TPC clusters?)
specs.emplace_back(o2::globaltracking::getTOFMatcherSpec(src, useMC, useFIT, false, strict, extratolerancetrd, writeMatchable, sclOpt)); // doTPCrefit not yet supported (need to load TPC clusters?)

if (!disableRootOut) {
std::vector<DataProcessorSpec> writers;
Expand Down
Loading

0 comments on commit 0b3fa30

Please sign in to comment.