Project
Loading...
Searching...
No Matches
alignment-workflow.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
19
20using namespace o2::framework;
21using namespace o2::its3::align;
24
25void customize(std::vector<o2::framework::CallbacksPolicy>& policies)
26{
28}
29void customize(std::vector<ConfigParamSpec>& workflowOptions)
30{
31 std::vector<o2::framework::ConfigParamSpec> options{
32 {"disable-mc", o2::framework::VariantType::Bool, false, {"enable MC propagation"}},
33 {"track-sources", VariantType::String, std::string{GID::ALL}, {"comma-separated list of track sources to use"}},
34 {"cluster-sources", VariantType::String, "ITS", {"comma-separated list of cluster sources to use"}},
35 {"with-its", VariantType::Bool, false, {"ITS alignment mode"}},
36 {"without-pv", VariantType::Bool, false, {"Do not use in track refit the PV as an additional constraint"}},
37 {"output", VariantType::String, "", {"output steering"}},
38 {"disable-root-input", VariantType::Bool, false, {"disable root-files input reader"}},
39 {"configKeyValues", VariantType::String, "", {"Semicolon separated key=value strings ..."}}};
41 std::swap(workflowOptions, options);
42}
44
46{
47 o2::conf::ConfigurableParam::updateFromString(cfg.options().get<std::string>("configKeyValues"));
48 const GID::mask_t allowedSourcesTrc = GID::getSourcesMask("ITS,TPC,ITS-TPC,ITS-TPC-TRD,ITS-TPC-TOF,ITS-TPC-TRD-TOF");
49 const GID::mask_t allowedSourcesClus = GID::getSourcesMask("ITS");
50 const GID::mask_t srcTrc = allowedSourcesTrc & GID::getSourcesMask(cfg.options().get<std::string>("track-sources"));
51 const GID::mask_t srcCls = allowedSourcesClus & GID::getSourcesMask(cfg.options().get<std::string>("cluster-sources"));
52 const auto useMC = !cfg.options().get<bool>("disable-mc");
53 const auto withPV = !cfg.options().get<bool>("without-pv");
54 const auto withITS = cfg.options().get<bool>("with-its");
55 const OutputEnum output(cfg.options().get<std::string>("output"));
56
57 WorkflowSpec specs;
58 if (!output[OutputOpt::MilleRes]) {
59 o2::globaltracking::InputHelper::addInputSpecs(cfg, specs, srcCls, srcTrc, srcTrc, useMC);
60 if (withPV && !useMC) {
62 }
63 } else {
64 specs.emplace_back(o2::globaltracking::getNoInpDummyOutSpec(0));
65 }
66
67 specs.emplace_back(o2::its3::align::getAlignmentSpec(srcTrc, srcCls, useMC, withPV, withITS, output));
68
69 o2::raw::HBFUtilsInitializer hbfIni(cfg, specs);
70 return std::move(specs);
71}
void output(const std::map< std::string, ChannelStat > &channels)
Definition rawdump.cxx:197
WorkflowSpec defineDataProcessing(ConfigContext const &cfg)
This function hooks up the the workflow specifications into the DPL driver.
void customize(std::vector< o2::framework::CallbacksPolicy > &policies)
static void updateFromString(std::string const &)
static mask_t getSourcesMask(const std::string_view srcList)
static constexpr std::string_view ALL
keywork for all sources
Static class with identifiers, bitmasks and names for ALICE detectors.
Definition DetID.h:58
ConfigParamRegistry & options() const
static int addInputSpecs(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, GID::mask_t maskClusters, GID::mask_t maskMatches, GID::mask_t maskTracks, bool useMC=true, GID::mask_t maskClustersMC=GID::getSourcesMask(GID::ALL), GID::mask_t maskTracksMC=GID::getSourcesMask(GID::ALL), bool subSpecStrict=false)
static int addInputSpecsPVertex(const o2::framework::ConfigContext &configcontext, o2::framework::WorkflowSpec &specs, bool mc)
Defining PrimaryVertex explicitly as messageable.
Definition Cartesian.h:288
std::vector< DataProcessorSpec > WorkflowSpec
framework::DataProcessorSpec getNoInpDummyOutSpec(int nloop=-1)
create a processor spec
o2::framework::DataProcessorSpec getAlignmentSpec(o2::dataformats::GlobalTrackID::mask_t srcTracks, o2::dataformats::GlobalTrackID::mask_t srcClus, bool useMC, bool withPV, bool withITS3, OutputEnum out)
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))