1313#include " DataFormatsITSMFT/DPLAlpideParamInitializer.h"
1414#include " CommonUtils/ConfigurableParam.h"
1515#include " ITStracking/Configuration.h"
16+ #include " ITStracking/TrackingConfigParam.h"
1617#include " DetectorsRaw/HBFUtilsInitializer.h"
1718#include " Framework/CallbacksPolicy.h"
1819#include " Framework/ConfigContext.h"
@@ -46,6 +47,7 @@ void customize(std::vector<o2::framework::ConfigParamSpec>& workflowOptions)
4647 {" ccdb-meanvertex-seed" , o2::framework::VariantType::Bool, false , {" use MeanVertex from CCDB if available to provide beam position seed (default: false)" }},
4748 {" select-with-triggers" , o2::framework::VariantType::String, " none" , {" use triggers to prescale processed ROFs: phys, trd, none" }},
4849 {" tracking-mode" , o2::framework::VariantType::String, " sync" , {" sync,async,cosmics,unset,off" }},
50+ {" enable-tuning" , o2::framework::VariantType::Bool, false , {" enable MC-based CPU tracker tuning" }},
4951 {" disable-tracking" , o2::framework::VariantType::Bool, false , {" disable tracking step" }},
5052 {" configKeyValues" , VariantType::String, " " , {" Semicolon separated key=value strings" }},
5153 {" use-full-geometry" , o2::framework::VariantType::Bool, false , {" use full geometry instead of the light-weight ITS part" }},
@@ -70,6 +72,7 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
7072 auto trmode = configcontext.options ().get <std::string>(" tracking-mode" );
7173 auto selTrig = configcontext.options ().get <std::string>(" select-with-triggers" );
7274 auto useGpuWF = configcontext.options ().get <bool >(" use-gpu-workflow" );
75+ auto enableTuning = configcontext.options ().get <bool >(" enable-tuning" );
7376 auto gpuDevice = static_cast <o2::gpu::gpudatatypes::DeviceType>(configcontext.options ().get <int >(" gpu-device" ));
7477 auto extDigits = configcontext.options ().get <bool >(" digits-from-upstream" );
7578 auto extClusters = configcontext.options ().get <bool >(" clusters-from-upstream" );
@@ -92,10 +95,20 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
9295 LOG (fatal) << " Unknown trigger type requested for events prescaling: " << selTrig;
9396 }
9497 }
98+ const auto trackingMode = o2::its::TrackingMode::fromString (trmode);
99+ if (enableTuning && !useMC) {
100+ LOGP (fatal, " ITS tracker tuning requires MC labels" );
101+ }
102+ if (enableTuning && useGpuWF) {
103+ LOGP (fatal, " ITS tracker tuning is CPU-only and cannot use the GPU workflow" );
104+ }
105+ if (enableTuning && gpuDevice != o2::gpu::gpudatatypes::DeviceType::CPU ) {
106+ LOGP (fatal, " ITS tracker tuning is CPU-only and cannot use GPU tracker traits" );
107+ }
95108 auto wf = o2::its::reco_workflow::getWorkflow (
96109 useMC,
97110 doStag,
98- o2::its::TrackingMode::fromString (trmode) ,
111+ trackingMode ,
99112 beamPosOVerride,
100113 extDigits,
101114 extClusters,
@@ -104,7 +117,8 @@ WorkflowSpec defineDataProcessing(ConfigContext const& configcontext)
104117 useGeom,
105118 trType,
106119 useGpuWF,
107- gpuDevice);
120+ gpuDevice,
121+ enableTuning);
108122
109123 // configure dpl timer to inject correct firstTForbit: start from the 1st orbit of TF containing 1st sampled orbit
110124 o2::raw::HBFUtilsInitializer hbfIni (configcontext, wf);
0 commit comments