Project
Loading...
Searching...
No Matches
RecoWorkflow.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
13
24
25// Dummy TPC completion policy data
26
28{
29
30framework::WorkflowSpec getWorkflow(bool useMC, bool doStag,
31 TrackingMode::Type trmode,
32 const bool overrideBeamPosition,
33 bool upstreamDigits,
34 bool upstreamClusters,
35 bool clrofOnly,
36 bool disableRootOutput,
37 bool useGeom,
38 int useTrig,
39 bool useGPUWF,
41{
43 if (!(upstreamDigits || upstreamClusters)) {
44 specs.emplace_back(o2::itsmft::getITSDigitReaderSpec(useMC, doStag, false, true, "itsdigits.root"));
45 }
46 if (!upstreamClusters) {
47 specs.emplace_back(o2::itsmft::getITSClustererSpec(useMC, doStag));
48 }
49 if (!disableRootOutput || clrofOnly) {
50 specs.emplace_back(o2::itsmft::getITSClusterWriterSpec(useMC, doStag, clrofOnly));
51 }
52 if ((trmode != TrackingMode::Off) && (TrackerParamConfig::Instance().trackingMode != TrackingMode::Off)) {
53 if (useGPUWF) {
55 .itsTriggerType = useTrig,
56 .processMC = useMC,
57 .runITSTracking = true,
58 .itsStaggered = doStag,
59 .itsOverrBeamEst = overrideBeamPosition,
60 };
61
62 Inputs ggInputs;
63 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true,
65 ggInputs, true);
66 if (!useGeom) {
67 ggRequest->addInput({"itsTGeo", "ITS", "GEOMTGEO", 0, Lifetime::Condition, framework::ccdbParamSpec("ITS/Config/Geometry")}, ggInputs);
68 }
69
70 static std::vector<InputSpec> policyData;
71 static std::shared_ptr<o2::gpu::GPURecoWorkflowSpec> task = std::make_shared<o2::gpu::GPURecoWorkflowSpec>(&policyData, cfg, std::vector<int>(), 0, ggRequest);
72 Inputs taskInputs = task->inputs();
73 Options taskOptions = task->options();
74 std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));
75
76 specs.emplace_back(DataProcessorSpec{
77 .name = "its-gpu-tracker",
78 .inputs = taskInputs,
79 .outputs = task->outputs(),
80 .algorithm = AlgorithmSpec{adoptTask<o2::gpu::GPURecoWorkflowSpec>(task)},
81 .options = taskOptions});
82 } else {
83 specs.emplace_back(o2::its::getTrackerSpec(useMC, doStag, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
84 }
85 if (!disableRootOutput) {
86 specs.emplace_back(o2::its::getTrackWriterSpec(useMC));
87 specs.emplace_back(o2::globaltracking::getIRFrameWriterSpec("irfr:ITS/IRFRAMES/0", "o2_its_irframe.root", "irframe-writer-its"));
88 }
89 }
90 return specs;
91}
92
93} // namespace o2::its::reco_workflow
std::vector< ConfigParamSpec > ccdbParamSpec(std::string const &path, int runDependent, std::vector< CCDBMetadata > metadata={}, int qrate=0)
std::vector< DataProcessorSpec > WorkflowSpec
std::vector< ConfigParamSpec > Options
std::vector< InputSpec > Inputs
o2::framework::DataProcessorSpec getIRFrameWriterSpec(const std::string &spec, const std::string &defFileName="o2_irframe.root", const std::string &devName="irframe-writer")
framework::WorkflowSpec getWorkflow(bool useMC, bool doStag, TrackingMode::Type trmode, const bool overrideBeamPosition=false, bool upstreamDigits=false, bool upstreamClusters=false, bool clrofOnly=false, bool disableRootOutput=false, bool useGeom=false, int useTrig=0, bool useGPUWF=false, o2::gpu::gpudatatypes::DeviceType dType=o2::gpu::gpudatatypes::DeviceType::CPU)
framework::DataProcessorSpec getTrackerSpec(bool useMC, bool doStag, bool useGeom, int useTrig, TrackingMode::Type trMode, const bool overrBeamEst=false, o2::gpu::gpudatatypes::DeviceType dType=o2::gpu::gpudatatypes::DeviceType::CPU)
o2::framework::DataProcessorSpec getTrackWriterSpec(bool useMC)
framework::DataProcessorSpec getITSDigitReaderSpec(bool useMC=true, bool doStag=false, bool useCalib=false, bool useTriggers=true, std::string defname="itsdigits.root")
framework::DataProcessorSpec getITSClustererSpec(bool useMC, bool doStag)
framework::DataProcessorSpec getITSClusterWriterSpec(bool useMC, bool doStag, bool clusterROFOnly=false)