2121#include " Common/Tools/TrackTuner.h"
2222
2323// __________________________________________
24- // track propagation module
25- //
24+ // track propagation module
25+ //
2626// this class is capable of performing the usual track propagation
27- // and table creation it is a demonstration of core service
28- // plug-in functionality that could be used to reduce the number of
29- // heavyweight (e.g. mat-LUT-using, propagating) core services to
30- // reduce overhead and make it easier to pipeline / parallelize
27+ // and table creation it is a demonstration of core service
28+ // plug-in functionality that could be used to reduce the number of
29+ // heavyweight (e.g. mat-LUT-using, propagating) core services to
30+ // reduce overhead and make it easier to pipeline / parallelize
3131// bottlenecks in core services
3232
3333class TrackPropagationModule
@@ -36,19 +36,19 @@ class TrackPropagationModule
3636 TrackPropagationModule ()
3737 {
3838 // constructor: set defaults
39- minPropagationRadius = o2::constants::geom::XTPCInnerRef + 0.1 ;
39+ minPropagationRadius = o2::constants::geom::XTPCInnerRef + 0.1 ;
4040 useTrackTuner = false ;
41- useTrkPid = false ;
42- fillTrackTunerTable = false ;
41+ useTrkPid = false ;
42+ fillTrackTunerTable = false ;
4343 trackTunerConfigSource = o2::aod::track_tuner::InputString;
4444 std::string trackTunerParams = " debugInfo=0|updateTrackDCAs=1|updateTrackCovMat=1|updateCurvature=0|updateCurvatureIU=0|updatePulls=0|isInputFileFromCCDB=1|pathInputFile=Users/m/mfaggin/test/inputsTrackTuner/PbPb2022|nameInputFile=trackTuner_DataLHC22sPass5_McLHC22l1b2_run529397.root|pathFileQoverPt=Users/h/hsharma/qOverPtGraphs|nameFileQoverPt=D0sigma_Data_removal_itstps_MC_LHC22b1b.root|usePvRefitCorrections=0|qOverPtMC=-1.|qOverPtData=-1." ;
4545 };
4646
47- float minPropagationRadius;
48- bool useTrackTuner;
47+ float minPropagationRadius;
48+ bool useTrackTuner;
4949 bool useTrkPid;
50- bool fillTrackTunerTable;
51- int trackTunerConfigSource;
50+ bool fillTrackTunerTable;
51+ int trackTunerConfigSource;
5252 std::string trackTunerParams;
5353
5454 // controls behaviour
@@ -74,7 +74,8 @@ class TrackPropagationModule
7474
7575 // takes a configurableGroup and reads in necessary configs
7676 template <typename TConfigurableGroup>
77- void readConfiguration (TConfigurableGroup const & cGroup){
77+ void readConfiguration (TConfigurableGroup const & cGroup)
78+ {
7879 minPropagationRadius = cGroup.minPropagationRadius .value ;
7980 useTrackTuner = cGroup.minPropagationRadius .value ;
8081 useTrkPid = cGroup.useTrkPid .value ;
@@ -84,14 +85,16 @@ class TrackPropagationModule
8485 LOGF (info, " Track propagation module configuration done." );
8586 }
8687 template <typename TCCDBLoader>
87- void getFromCCDBLoader (TCCDBLoader const & loader){
88+ void getFromCCDBLoader (TCCDBLoader const & loader)
89+ {
8890 lut = loader.lut ;
8991 mMeanVtx = loader.mMeanVtx ;
9092 grpmag = loader.grpmag ;
9193 }
9294
9395 template <typename TInitContext>
94- void init (TInitContext& initContext){
96+ void init (TInitContext& initContext)
97+ {
9598 // Checking if the tables are requested in the workflow and enabling them
9699 fillTracksCov = isTableRequiredInWorkflow (initContext, " TracksCov" );
97100 fillTracksDCA = isTableRequiredInWorkflow (initContext, " TracksDCA" );
@@ -118,15 +121,16 @@ class TrackPropagationModule
118121 }
119122
120123 template <typename THistoRegistry, typename TConfigurableGroup>
121- void initHistograms (THistoRegistry& registry, TConfigurableGroup& cGroup){
124+ void initHistograms (THistoRegistry& registry, TConfigurableGroup& cGroup)
125+ {
122126 trackTunedTracks = registry.template add <TH1>(" trackTunedTracks" , " trackTunedTracks" , o2::framework::kTH1D , {{1 , 0 .5f , 1 .5f }});
123-
127+
124128 // Histograms for track tuner
125129 o2::framework::AxisSpec axisBinsDCA = {600 , -0 .15f , 0 .15f , " #it{dca}_{xy} (cm)" };
126130 registry.template add (" hDCAxyVsPtRec" , " hDCAxyVsPtRec" , o2::framework::kTH2F , {axisBinsDCA, cGroup.axisPtQA });
127131 registry.template add (" hDCAxyVsPtMC" , " hDCAxyVsPtMC" , o2::framework::kTH2F , {axisBinsDCA, cGroup.axisPtQA });
128132 registry.template add (" hDCAzVsPtRec" , " hDCAzVsPtRec" , o2::framework::kTH2F , {axisBinsDCA, cGroup.axisPtQA });
129- registry.template add (" hDCAzVsPtMC" , " hDCAzVsPtMC" , o2::framework::kTH2F , {axisBinsDCA, cGroup.axisPtQA });
133+ registry.template add (" hDCAzVsPtMC" , " hDCAzVsPtMC" , o2::framework::kTH2F , {axisBinsDCA, cGroup.axisPtQA });
130134 }
131135
132136 template <bool isMc, typename TTracks, typename TOutputGroup, typename THistoRegistry>
@@ -172,7 +176,7 @@ class TrackPropagationModule
172176 double q2OverPtNew = -9999 .;
173177 // Only propagate tracks which have passed the innermost wall of the TPC (e.g. skipping loopers etc). Others fill unpropagated.
174178 if (track.trackType () == o2::aod::track::TrackIU && track.x () < minPropagationRadius) {
175- if (fillTracksCov){
179+ if (fillTracksCov) {
176180 if constexpr (isMc) { // checking MC and fillCovMat block begins
177181 // bool hasMcParticle = track.has_mcParticle();
178182 if (useTrackTuner) {
@@ -210,7 +214,7 @@ class TrackPropagationModule
210214 trackType = o2::aod::track::Track;
211215 }
212216 // filling some QA histograms for track tuner test purpose
213- if (fillTracksCov){
217+ if (fillTracksCov) {
214218 if constexpr (isMc) { // checking MC and fillCovMat block begins
215219 if (track.has_mcParticle () && isPropagationOK) {
216220 auto mcParticle1 = track.mcParticle ();
@@ -235,11 +239,11 @@ class TrackPropagationModule
235239 cursors.tracksParExtensionPropagated (mTrackParCov .getPt (), mTrackParCov .getP (), mTrackParCov .getEta (), mTrackParCov .getPhi ());
236240 // TODO do we keep the rho as 0? Also the sigma's are duplicated information
237241 cursors.tracksParCovPropagated (std::sqrt (mTrackParCov .getSigmaY2 ()), std::sqrt (mTrackParCov .getSigmaZ2 ()), std::sqrt (mTrackParCov .getSigmaSnp2 ()),
238- std::sqrt (mTrackParCov .getSigmaTgl2 ()), std::sqrt (mTrackParCov .getSigma1Pt2 ()), 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 );
242+ std::sqrt (mTrackParCov .getSigmaTgl2 ()), std::sqrt (mTrackParCov .getSigma1Pt2 ()), 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 );
239243 cursors.tracksParCovExtensionPropagated (mTrackParCov .getSigmaY2 (), mTrackParCov .getSigmaZY (), mTrackParCov .getSigmaZ2 (), mTrackParCov .getSigmaSnpY (),
240- mTrackParCov .getSigmaSnpZ (), mTrackParCov .getSigmaSnp2 (), mTrackParCov .getSigmaTglY (), mTrackParCov .getSigmaTglZ (), mTrackParCov .getSigmaTglSnp (),
241- mTrackParCov .getSigmaTgl2 (), mTrackParCov .getSigma1PtY (), mTrackParCov .getSigma1PtZ (), mTrackParCov .getSigma1PtSnp (), mTrackParCov .getSigma1PtTgl (),
242- mTrackParCov .getSigma1Pt2 ());
244+ mTrackParCov .getSigmaSnpZ (), mTrackParCov .getSigmaSnp2 (), mTrackParCov .getSigmaTglY (), mTrackParCov .getSigmaTglZ (), mTrackParCov .getSigmaTglSnp (),
245+ mTrackParCov .getSigmaTgl2 (), mTrackParCov .getSigma1PtY (), mTrackParCov .getSigma1PtZ (), mTrackParCov .getSigma1PtSnp (), mTrackParCov .getSigma1PtTgl (),
246+ mTrackParCov .getSigma1Pt2 ());
243247 if (fillTracksDCA) {
244248 cursors.tracksDCA (mDcaInfoCov .getY (), mDcaInfoCov .getZ ());
245249 }
@@ -257,4 +261,4 @@ class TrackPropagationModule
257261 }
258262};
259263
260- #endif // COMMON_TOOLS_TRACKPROPAGATIONMODULE_H_
264+ #endif // COMMON_TOOLS_TRACKPROPAGATIONMODULE_H_
0 commit comments