43void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
49void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
52 std::vector<o2::framework::ConfigParamSpec> options{
57 {
"pv-contributor-sources", VariantType::String,
"", {
"global track sources loaded only to reject the TPC track of a primary-vertex contributor as a leg (cosmicsMatch.discardPVContributors, implies --use-pv-info); sources without TPC are ignored, so the vertexing sources can be passed as they are"}},
58 {
"enable-cluster-output",
o2::framework::VariantType::Bool,
false, {
"collect the raw clusters of the cosmics (legs + road around them) and write them with the cosmics"}},
59 {
"road-detectors", VariantType::String,
"ITS,TOF,TRD", {
"with --enable-cluster-output: detectors whose hits along the cosmic are collected besides the TPC road"}},
60 {
"cosmics-preset", VariantType::String,
"", {
"named set of cosmicsMatch settings applied before --configKeyValues (which can override single keys): physics-v1 = cosmics in collision data"}},
61 {
"track-sources", VariantType::String, std::string{
GID::ALL}, {
"comma-separated list of sources to use"}},
62 {
"configKeyValues", VariantType::String,
"", {
"Semicolon separated key=value strings ..."}}};
66 std::swap(workflowOptions, options);
72void customize(std::vector<o2::framework::CompletionPolicy>& policies)
95 auto preset = configcontext.
options().
get<std::string>(
"cosmics-preset");
96 if (!preset.empty()) {
103 auto useMC = !configcontext.
options().
get<
bool>(
"disable-mc");
105 auto disableRootOut = configcontext.
options().
get<
bool>(
"disable-root-output");
108 if (GID::includesDet(DetID::TPC,
src)) {
111 if (GID::includesDet(DetID::TRD,
src)) {
114 if (GID::includesDet(DetID::TOF,
src)) {
117 if (sclOpt.requestCTPLumi) {
125 if (useTOFClusters) {
126 srcCl |= GID::getSourceMask(
GID::TOF);
129 if (!configcontext.
options().
get<
bool>(
"disable-root-input")) {
132 bool usePV = configcontext.
options().
get<
bool>(
"use-pv-info");
136 LOG(warning) <<
"--pv-contributor-sources ignored: cosmicsMatch.discardPVContributors is off";
139 usePV |= srcPV.any();
142 bool clusterOutput = configcontext.
options().
get<
bool>(
"enable-cluster-output");
145 LOG(fatal) <<
"--enable-cluster-output needs TPC tracks in --track-sources";
148 for (
auto det : {DetID::ITS, DetID::TOF, DetID::TRD}) {
161 if (!disableRootOut) {
171 return std::move(specs);
Device to produce TPC clusters sharing map.
Helper class to parse options for correction maps.
Collects the raw clusters of matched cosmics (attached + road around the legs) for offline refits.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
Configurable params for cosmics matching.
Helper function to tokenize sequences and ranges of integral numbers.
DPL completion policy helper for TPC scetor data.
static const MatchCosmicsParams & Instance()
static void writeINI(std::string const &filename, std::string const &keyOnly="")
static void updateFromString(std::string const &)
Static class with identifiers, bitmasks and names for ALICE detectors.
static mask_t getMask(const std::string_view detList)
detector masks from any non-alpha-num delimiter-separated list (empty if NONE is supplied)
ConfigParamRegistry & options() const
T get(const char *key) const
static void addGlobalOptions(std::vector< o2::framework::ConfigParamSpec > &options)
static CorrectionMapsGloOpts parseGlobalOptions(const o2::framework::ConfigParamRegistry &opts)
WorkflowSpec defineDataProcessing(ConfigContext const &configcontext)
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
Defining ITS Vertex explicitly as messageable.
std::vector< DataProcessorSpec > WorkflowSpec
o2::dataformats::GlobalTrackID::mask_t getLegITSSources(o2::dataformats::GlobalTrackID::mask_t src)
std::string getMatchCosmicsPreset(const std::string &name)
framework::DataProcessorSpec getTrackCosmicsWriterSpec(bool useMC)
o2::dataformats::GlobalTrackID::mask_t addPVContributorParents(o2::dataformats::GlobalTrackID::mask_t srcPVContributors)
srcPVContributors plus the parent matches needed to resolve their single-detector parts (RecoContaine...
framework::DataProcessorSpec getCosmicsMatchingSpec(o2::dataformats::GlobalTrackID::mask_t src, bool usePV, bool useMC, bool itsStag, bool useTOFClusters=false, o2::dataformats::GlobalTrackID::mask_t srcPVContributors={})
framework::DataProcessorSpec getCosmicsClusterCollectorSpec(o2::dataformats::GlobalTrackID::mask_t src, bool useMC, bool itsStag, o2::detectors::DetID::mask_t roadDets)
framework::DataProcessorSpec getCosmicsFullWriterSpec()
write cosmics with their raw clusters (cosmics-cluster-collector output) to a root file
o2::framework::DataProcessorSpec getTPCScalerSpec(const o2::tpc::CorrectionMapsGloOpts &sclOpts)
static CompletionPolicy consumeWhenAllOrdered(const char *name, CompletionPolicy::Matcher matcher)
as consumeWhenAll, but ensures that records are processed with incremental timeSlice (DataHeader::sta...
static bool isITSStaggeringEnabled(o2::framework::ConfigContext const &cfgc)
static void addITSConfigOption(std::vector< o2::framework::ConfigParamSpec > &opts)
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))
LOG(info)<< "Compressed in "<< sw.CpuTime()<< " s"