34void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
39void customize(std::vector<o2::framework::CompletionPolicy>& policies)
46void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
49 std::vector<o2::framework::ConfigParamSpec> options{
50 {
"disable-mc", VariantType::Bool,
false, {
"Disable MC labels"}},
51 {
"disable-root-input", VariantType::Bool,
false, {
"disable root-files input readers"}},
52 {
"disable-root-output", VariantType::Bool,
false, {
"disable root-files output writers"}},
53 {
"enable-vdexb-calib", VariantType::Bool,
false, {
"enable vDrift and ExB calibration based on tracking output"}},
54 {
"enable-gain-calib", VariantType::Bool,
false, {
"enable collection of dEdx histos for gain calibration"}},
55 {
"enable-qc", VariantType::Bool,
false, {
"enable tracking QC"}},
56 {
"enable-pid", VariantType::Bool,
false, {
"Enable PID"}},
57 {
"enable-ph", VariantType::Bool,
false, {
"Enable creation of PH plots"}},
58 {
"trd-digits-spec", VariantType::Int, 0, {
"Input digits subspec, ignored if disable-root-input is false"}},
59 {
"track-sources", VariantType::String, std::string{
GTrackID::ALL}, {
"comma-separated list of sources to use for tracking"}},
60 {
"filter-trigrec", VariantType::Bool,
false, {
"ignore interaction records without ITS data"}},
61 {
"strict-matching", VariantType::Bool,
false, {
"High purity preliminary matching"}},
62 {
"disable-ft0-pileup-tagging", VariantType::Bool,
false, {
"Do not request FT0 for pile-up determination"}},
63 {
"policy", VariantType::String,
"default", {
"Pick PID policy (=default)"}},
64 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings"}}};
67 std::swap(workflowOptions, options);
81 auto useMC = !configcontext.
options().
get<
bool>(
"disable-mc");
83 auto strict = configcontext.
options().
get<
bool>(
"strict-matching");
84 auto trigRecFilterActive = configcontext.
options().
get<
bool>(
"filter-trigrec");
85 auto vdexb = configcontext.
options().
get<
bool>(
"enable-vdexb-calib");
86 auto gain = configcontext.
options().
get<
bool>(
"enable-gain-calib");
87 auto pulseHeight = configcontext.
options().
get<
bool>(
"enable-ph");
88 auto digitsSpec = configcontext.
options().
get<
int>(
"trd-digits-spec");
90 bool rootInput = !configcontext.
options().
get<
bool>(
"disable-root-input");
93 LOGP(warning,
"In strict matching mode only TPC source allowed, {} asked, redefining",
GTrackID::getSourcesNames(srcTRD));
96 if (!configcontext.
options().
get<
bool>(
"disable-ft0-pileup-tagging")) {
99 if (sclOpt.requestCTPLumi) {
105 auto policyStr = configcontext.
options().
get<std::string>(
"policy");
106 auto policyIt = o2::trd::PIDPolicyString.find(policyStr);
107 if (policyIt == o2::trd::PIDPolicyString.
end()) {
108 throw std::runtime_error(fmt::format(
"No PID model named {:s} available!", policyStr));
110 policy = policyIt->second;
111 LOGF(info,
"Using PID policy %s(%u)", policyStr,
static_cast<unsigned int>(policy));
116 if (sclOpt.needTPCScalersWorkflow() && !configcontext.
options().
get<
bool>(
"disable-root-input")) {
123 if (configcontext.
options().
get<
bool>(
"enable-qc")) {
130 specs.emplace_back(o2::framework::getTRDPulseHeightSpec(srcTRD, rootInput ? 1 : digitsSpec));
134 if (!configcontext.
options().
get<
bool>(
"disable-root-output")) {
141 if (vdexb || gain || pulseHeight) {
144 if (configcontext.
options().
get<
bool>(
"enable-qc")) {
Helper class to access load maps from CCDB.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
This file provides the base interface for pid policies.
Quality control for global tracking (residuals etc)
DPL device for creating a pulse height spectrum with digits on tracks.
Steers the creation of calibration input based on tracks.
static void writeINI(std::string const &filename, std::string const &keyOnly="")
static void updateFromString(std::string const &)
ConfigParamRegistry & options() const
T get(const char *key) const
static void addGlobalOptions(std::vector< o2::framework::ConfigParamSpec > &options)
static CorrectionMapsLoaderGloOpts parseGlobalOptions(const o2::framework::ConfigParamRegistry &opts)
Defining PrimaryVertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
o2::framework::DataProcessorSpec getTPCScalerSpec(bool enableIDCs, bool enableMShape)
DataProcessorSpec getTRDTrackingQCWriterSpec()
framework::DataProcessorSpec getTRDTPCTrackWriterSpec(bool useMC, bool strictMode=false)
writer for matches with TPC-only tracks
framework::DataProcessorSpec getTRDGlobalTrackWriterSpec(bool useMC)
writer for matches to ITS-TPC tracks
DataProcessorSpec getTRDGlobalTrackingQCSpec(o2::dataformats::GlobalTrackID::mask_t src)
PIDPolicy
Option for available PID policies.
@ DEFAULT
The default option.
framework::DataProcessorSpec getTRDTrackBasedCalibSpec(o2::dataformats::GlobalTrackID::mask_t src, bool vdexb, bool gain)
create a processor spec
o2::framework::DataProcessorSpec getTRDDigitReaderSpec(bool useMC, bool trigRec=true, int dataSubspec=1)
o2::framework::DataProcessorSpec getTRDCalibWriterSpec(bool vdexb, bool gain, bool ph)
framework::DataProcessorSpec getTRDGlobalTrackingSpec(bool useMC, o2::dataformats::GlobalTrackID::mask_t src, bool trigRecFilterActive, bool strict, bool withPID, PIDPolicy policy, const o2::tpc::CorrectionMapsLoaderGloOpts &sclOpts)
create a processor spec
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
static void addNewTimeSliceCallback(std::vector< o2::framework::CallbacksPolicy > &policies)
static void addConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts, const std::string &defOpt=std::string(o2::base::NameConf::DIGITIZATIONCONFIGFILE))
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)