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 disableRootOutput,
36 bool useGeom,
37 int useTrig,
38 bool useGPUWF,
40{
42 if (!(upstreamDigits || upstreamClusters)) {
43 specs.emplace_back(o2::itsmft::getITSDigitReaderSpec(useMC, doStag, false, true, "itsdigits.root"));
44 }
45 if (!upstreamClusters) {
46 specs.emplace_back(o2::itsmft::getITSClustererSpec(useMC, doStag));
47 }
48 if (!disableRootOutput) {
49 specs.emplace_back(o2::itsmft::getITSClusterWriterSpec(useMC, doStag));
50 }
51 if ((trmode != TrackingMode::Off) && (TrackerParamConfig::Instance().trackingMode != TrackingMode::Off)) {
52 if (useGPUWF) {
54 .itsTriggerType = useTrig,
55 .processMC = useMC,
56 .runITSTracking = true,
57 .itsStaggered = doStag,
58 .itsOverrBeamEst = overrideBeamPosition,
59 };
60
61 Inputs ggInputs;
62 auto ggRequest = std::make_shared<o2::base::GRPGeomRequest>(false, true, false, true, true,
64 ggInputs, true);
65 if (!useGeom) {
66 ggRequest->addInput({"itsTGeo", "ITS", "GEOMTGEO", 0, Lifetime::Condition, framework::ccdbParamSpec("ITS/Config/Geometry")}, ggInputs);
67 }
68
69 static std::vector<InputSpec> policyData;
70 static std::shared_ptr<o2::gpu::GPURecoWorkflowSpec> task = std::make_shared<o2::gpu::GPURecoWorkflowSpec>(&policyData, cfg, std::vector<int>(), 0, ggRequest);
71 Inputs taskInputs = task->inputs();
72 Options taskOptions = task->options();
73 std::move(ggInputs.begin(), ggInputs.end(), std::back_inserter(taskInputs));
74
75 specs.emplace_back(DataProcessorSpec{
76 .name = "its-gpu-tracker",
77 .inputs = taskInputs,
78 .outputs = task->outputs(),
79 .algorithm = AlgorithmSpec{adoptTask<o2::gpu::GPURecoWorkflowSpec>(task)},
80 .options = taskOptions});
81 } else {
82 specs.emplace_back(o2::its::getTrackerSpec(useMC, doStag, useGeom, useTrig, trmode, overrideBeamPosition, dtype));
83 }
84 if (!disableRootOutput) {
85 specs.emplace_back(o2::its::getTrackWriterSpec(useMC));
86 specs.emplace_back(o2::globaltracking::getIRFrameWriterSpec("irfr:ITS/IRFRAMES/0", "o2_its_irframe.root", "irframe-writer-its"));
87 }
88 }
89 return specs;
90}
91
92} // 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 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 getITSClusterWriterSpec(bool useMC, bool doStag)
framework::DataProcessorSpec getITSClustererSpec(bool useMC, bool doStag)