Skip to content

Commit cea871e

Browse files
committed
GPU: Add ITS3 to workflow
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent ad8cd1d commit cea871e

File tree

4 files changed

+34
-12
lines changed

4 files changed

+34
-12
lines changed

GPU/Workflow/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ o2_add_library(GPUWorkflow
2727
O2::DataFormatsGlobalTracking
2828
O2::DataFormatsTRD
2929
PRIVATE_LINK_LIBRARIES O2::GPUTracking
30-
O2::ITSTrackingInterface)
30+
O2::ITSTrackingInterface
31+
$<$<BOOL:${ENABLE_UPGRADES}>:O2::ITS3TrackingInterface>)
3132

3233
o2_add_executable(reco-workflow
3334
COMPONENT_NAME gpu

GPU/Workflow/include/GPUWorkflow/GPUWorkflowSpec.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ class GPURecoWorkflowSpec : public o2::framework::Task
128128
int32_t lumiScaleType = 0; // 0=off, 1=CTP, 2=TPC scalers
129129
bool outputErrorQA = false;
130130
bool runITSTracking = false;
131+
bool runITS3Tracking = false;
131132
bool processITSMC = false;
132133
bool itsOverrBeamEst = false;
133134
bool tpcTriggerHandling = false;

GPU/Workflow/src/GPUWorkflowITS.cxx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020

2121
#include "ITStracking/TrackingInterface.h"
2222

23+
#ifdef ENABLE_UPGRADES
24+
#include "ITS3Reconstruction/TrackingInterface.h"
25+
#endif
26+
2327
namespace o2::gpu
2428
{
2529

@@ -35,9 +39,21 @@ void GPURecoWorkflowSpec::initFunctionITS(o2::framework::InitContext& ic)
3539
{
3640
o2::its::VertexerTraits* vtxTraits = nullptr;
3741
o2::its::TrackerTraits* trkTraits = nullptr;
38-
mITSTrackingInterface = std::make_unique<o2::its::ITSTrackingInterface>(mSpecConfig.processMC,
42+
#ifdef ENABLE_UPGRADES
43+
if (mSpecConfig.runITS3Tracking) {
44+
mITSTrackingInterface = std::make_unique<o2::its3::ITS3TrackingInterface>(mSpecConfig.processITSMC,
45+
mSpecConfig.itsTriggerType,
46+
mSpecConfig.itsOverrBeamEst);
47+
} else {
48+
mITSTrackingInterface = std::make_unique<o2::its::ITSTrackingInterface>(mSpecConfig.processITSMC,
49+
mSpecConfig.itsTriggerType,
50+
mSpecConfig.itsOverrBeamEst);
51+
}
52+
#else
53+
mITSTrackingInterface = std::make_unique<o2::its::ITSTrackingInterface>(mSpecConfig.processITSMC,
3954
mSpecConfig.itsTriggerType,
4055
mSpecConfig.itsOverrBeamEst);
56+
#endif
4157
mGPUReco->GetITSTraits(trkTraits, vtxTraits, mITSTimeFrame);
4258
mITSTrackingInterface->setTraitsFromProvider(vtxTraits, trkTraits, mITSTimeFrame);
4359
}

GPU/Workflow/src/GPUWorkflowSpec.cxx

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void GPURecoWorkflowSpec::init(InitContext& ic)
223223
mConfig->configWorkflow.inputs.setBits(GPUDataTypes::InOutType::TRDTracklets, true);
224224
mConfig->configWorkflow.steps.setBits(GPUDataTypes::RecoStep::TRDTracking, true);
225225
}
226-
if (mSpecConfig.runITSTracking) {
226+
if (mSpecConfig.runITSTracking | mSpecConfig.runITS3Tracking) {
227227
mConfig->configWorkflow.inputs.setBits(GPUDataTypes::InOutType::ITSClusters, true);
228228
mConfig->configWorkflow.outputs.setBits(GPUDataTypes::InOutType::ITSTracks, true);
229229
mConfig->configWorkflow.steps.setBits(GPUDataTypes::RecoStep::ITSTracking, true);
@@ -299,7 +299,7 @@ void GPURecoWorkflowSpec::init(InitContext& ic)
299299
}
300300

301301
// initialize ITS
302-
if (mSpecConfig.runITSTracking) {
302+
if (mSpecConfig.runITSTracking || mSpecConfig.runITS3Tracking) {
303303
initFunctionITS(ic);
304304
}
305305
}
@@ -376,7 +376,7 @@ void GPURecoWorkflowSpec::finaliseCCDB(o2::framework::ConcreteDataMatcher& match
376376
{
377377
if (mSpecConfig.enableDoublePipeline != 2) {
378378
finaliseCCDBTPC(matcher, obj);
379-
if (mSpecConfig.runITSTracking) {
379+
if (mSpecConfig.runITSTracking || mSpecConfig.runITS3Tracking) {
380380
finaliseCCDBITS(matcher, obj);
381381
}
382382
}
@@ -509,7 +509,7 @@ int32_t GPURecoWorkflowSpec::runMain(o2::framework::ProcessingContext* pc, GPUTr
509509
if (mConfParam->dump < 2) {
510510
retVal = mGPUReco->RunTracking(ptrs, outputRegions, threadIndex, inputUpdateCallback);
511511

512-
if (retVal == 0 && mSpecConfig.runITSTracking) {
512+
if (retVal == 0 && (mSpecConfig.runITSTracking || mSpecConfig.runITS3Tracking)) {
513513
retVal = runITSTracking(*pc);
514514
}
515515
}
@@ -1046,7 +1046,7 @@ void GPURecoWorkflowSpec::doCalibUpdates(o2::framework::ProcessingContext& pc, c
10461046
}
10471047
}
10481048
needCalibUpdate = fetchCalibsCCDBTPC(pc, newCalibObjects, oldCalibObjects) || needCalibUpdate;
1049-
if (mSpecConfig.runITSTracking) {
1049+
if (mSpecConfig.runITSTracking || mSpecConfig.runITS3Tracking) {
10501050
needCalibUpdate = fetchCalibsCCDBITS(pc) || needCalibUpdate;
10511051
}
10521052
if (mTPCCutAtTimeBin != mConfig->configGRP.tpcCutTimeBin) {
@@ -1165,7 +1165,7 @@ Inputs GPURecoWorkflowSpec::inputs()
11651165
inputs.emplace_back("trdtrigrecmask", o2::header::gDataOriginTRD, "TRIGRECMASK", 0, Lifetime::Timeframe);
11661166
}
11671167

1168-
if (mSpecConfig.runITSTracking) {
1168+
if (mSpecConfig.runITSTracking || mSpecConfig.runITS3Tracking) {
11691169
inputs.emplace_back("compClusters", "ITS", "COMPCLUSTERS", 0, Lifetime::Timeframe);
11701170
inputs.emplace_back("patterns", "ITS", "PATTERNS", 0, Lifetime::Timeframe);
11711171
inputs.emplace_back("ROframes", "ITS", "CLUSTERSROF", 0, Lifetime::Timeframe);
@@ -1174,9 +1174,13 @@ Inputs GPURecoWorkflowSpec::inputs()
11741174
} else if (mSpecConfig.itsTriggerType == 2) {
11751175
inputs.emplace_back("phystrig", "TRD", "TRKTRGRD", 0, Lifetime::Timeframe);
11761176
}
1177-
inputs.emplace_back("itscldict", "ITS", "CLUSDICT", 0, Lifetime::Condition, ccdbParamSpec("ITS/Calib/ClusterDictionary"));
1178-
inputs.emplace_back("itsalppar", "ITS", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam"));
1179-
1177+
if (mSpecConfig.runITS3Tracking) {
1178+
inputs.emplace_back("cldict", "IT3", "CLUSDICT", 0, Lifetime::Condition, ccdbParamSpec("IT3/Calib/ClusterDictionary"));
1179+
inputs.emplace_back("alppar", "ITS", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam"));
1180+
} else {
1181+
inputs.emplace_back("itscldict", "ITS", "CLUSDICT", 0, Lifetime::Condition, ccdbParamSpec("ITS/Calib/ClusterDictionary"));
1182+
inputs.emplace_back("itsalppar", "ITS", "ALPIDEPARAM", 0, Lifetime::Condition, ccdbParamSpec("ITS/Config/AlpideParam"));
1183+
}
11801184
if (mSpecConfig.itsOverrBeamEst) {
11811185
inputs.emplace_back("meanvtx", "GLO", "MEANVERTEX", 0, Lifetime::Condition, ccdbParamSpec("GLO/Calib/MeanVertex", {}, 1));
11821186
}
@@ -1246,7 +1250,7 @@ Outputs GPURecoWorkflowSpec::outputs()
12461250
outputSpecs.emplace_back(gDataOriginGPU, "ERRORQA", 0, Lifetime::Timeframe);
12471251
}
12481252

1249-
if (mSpecConfig.runITSTracking) {
1253+
if (mSpecConfig.runITSTracking || mSpecConfig.runITS3Tracking) {
12501254
outputSpecs.emplace_back(gDataOriginITS, "TRACKS", 0, Lifetime::Timeframe);
12511255
outputSpecs.emplace_back(gDataOriginITS, "TRACKCLSID", 0, Lifetime::Timeframe);
12521256
outputSpecs.emplace_back(gDataOriginITS, "ITSTrackROF", 0, Lifetime::Timeframe);

0 commit comments

Comments
 (0)