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
25
26// Dummy TPC completion policy data
27
29{
30
32 bool useCAtracker,
33 TrackingMode::Type trmode,
34 const bool overrideBeamPosition,
35 bool upstreamDigits,
36 bool upstreamClusters,
37 bool disableRootOutput,
38 bool useGeom,
39 int useTrig,
40 bool useGPUWF,
42{
44 if (!(upstreamDigits || upstreamClusters)) {
45 specs.emplace_back(o2::itsmft::getITSDigitReaderSpec(useMC, false, true, "itsdigits.root"));
46 }
47 if (!upstreamClusters) {
48 specs.emplace_back(o2::its::getClustererSpec(useMC));
49 }
50 if (!disableRootOutput) {
51 specs.emplace_back(o2::its::getClusterWriterSpec(useMC));
52 }
53 if ((trmode != TrackingMode::Off) && (TrackerParamConfig::Instance().trackingMode != TrackingMode::Off)) {
54 if (useCAtracker) {
55 if (useGPUWF) {
57 .itsTriggerType = useTrig,
58 .processMC = useMC,
59 .runITSTracking = true,
60 .itsOverrBeamEst = overrideBeamPosition,
61 };
62
63 Inputs ggInputs;
64 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true,
66 ggInputs, true);
67 if (!useGeom) {
68 ggRequest->addInput({"itsTGeo", "ITS", "GEOMTGEO", 0, Lifetime::Condition, framework::ccdbParamSpec("ITS/Config/Geometry")}, ggInputs);
69 }
70
71 static std::vector<InputSpec> policyData;
72 static std::shared_ptr<o2::gpu::GPURecoWorkflowSpec> task = std::make_shared<o2::gpu::GPURecoWorkflowSpec>(&policyData, cfg, std::vector<int>(), 0, ggRequest);
73 Inputs taskInputs = task->inputs();
74 Options taskOptions = task->options();
75 std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));
76
77 specs.emplace_back(DataProcessorSpec{
78 .name = "its-gpu-tracker",
79 .inputs = taskInputs,
80 .outputs = task->outputs(),
81 .algorithm = AlgorithmSpec{adoptTask<o2::gpu::GPURecoWorkflowSpec>(task)},
82 .options = taskOptions});
83 } else {
84 specs.emplace_back(o2::its::getTrackerSpec(useMC, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
85 }
86 } else {
87 specs.emplace_back(o2::its::getCookedTrackerSpec(useMC, useGeom, useTrig, trmode));
88 }
89 if (!disableRootOutput) {
90 specs.emplace_back(o2::its::getTrackWriterSpec(useMC));
91 specs.emplace_back(o2::globaltracking::getIRFrameWriterSpec("irfr:ITS/IRFRAMES/0", "o2_its_irframe.root", "irframe-writer-its"));
92 }
93 }
94 return specs;
95}
96
97} // 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 useCAtracker, TrackingMode::Type trmode, const bool overrideBeamPosition=false, bool upstreamDigits=false, bool upstreamClusters=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 getClusterWriterSpec(bool useMC)
framework::DataProcessorSpec getCookedTrackerSpec(bool useMC, bool useGeom, int useTrig, TrackingMode::Type trMode)
framework::DataProcessorSpec getClustererSpec(bool useMC)
framework::DataProcessorSpec getTrackerSpec(bool useMC, 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 useCalib=false, bool useTriggers=true, std::string defname="o2_itsdigits.root")