diff --git a/Common/TableProducer/trackPropagationTester.cxx b/Common/TableProducer/trackPropagationTester.cxx index 2e3d0837956..be2fb41e1bb 100644 --- a/Common/TableProducer/trackPropagationTester.cxx +++ b/Common/TableProducer/trackPropagationTester.cxx @@ -11,10 +11,10 @@ //=============================================================== // -// Experimental version of the track propagation task +// Experimental version of the track propagation task // this utilizes an analysis task module that can be employed elsewhere -// and allows for the re-utilization of a material LUT -// +// and allows for the re-utilization of a material LUT +// // candidate approach for core service approach // //=============================================================== @@ -75,12 +75,12 @@ struct TrackPropagationTester { StandardCCDBLoader ccdbLoader; TrackPropagationModule trackPropagationMod; - // registry + // registry HistogramRegistry registry{"registry"}; void init(o2::framework::InitContext& initContext) { - // configure ccdb + // configure ccdb ccdb->setURL(ccdbConfigurables.ccdburl); ccdb->setCaching(true); ccdb->setLocalObjectValidityChecking(); @@ -90,7 +90,7 @@ struct TrackPropagationTester { trackPropagationMod.initHistograms(registry, trackPropagationConfigurables); } - void processReal(soa::Join const& tracks, aod::Collisions const&, aod::BCs const& bcs) + void processReal(soa::Join const& tracks, aod::Collisions const&, aod::BCs const& bcs) { ccdbLoader.initCCDBfromBCs(ccdb, bcs); trackPropagationMod.getFromCCDBLoader(ccdbLoader); @@ -117,4 +117,5 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) { WorkflowSpec workflow{adaptAnalysisTask(cfgc)}; return workflow; -} \ No newline at end of file +} + \ No newline at end of file diff --git a/Common/Tools/StandardCCDBLoader.h b/Common/Tools/StandardCCDBLoader.h index a08bc9a68b6..b1db9afadca 100644 --- a/Common/Tools/StandardCCDBLoader.h +++ b/Common/Tools/StandardCCDBLoader.h @@ -18,9 +18,9 @@ #include "Framework/AnalysisDataModel.h" //__________________________________________ -// Standard class to load stuff +// Standard class to load stuff // such as matLUT, B and mean Vertex -// partial requests possible. +// partial requests possible. class StandardCCDBLoader { @@ -53,7 +53,8 @@ class StandardCCDBLoader // takes a configurableGroup and reads in necessary configs template - void readConfiguration(TConfigurableGroup const& cGroup){ + void readConfiguration(TConfigurableGroup const& cGroup) + { ccdburl = cGroup.ccdburl.value; lutPath = cGroup.lutPath.value; geoPath = cGroup.geoPath.value; @@ -65,11 +66,11 @@ class StandardCCDBLoader template void initCCDBfromBCs(TCCDB& ccdb, TBCs& bcs, bool getMeanVertex = true) { - // instant load from BCs table. Bonus: protect also against empty bcs + // instant load from BCs table. Bonus: protect also against empty bcs if (bcs.size() == 0) { return; } - auto bc = bcs.begin(); + auto bc = bcs.begin(); initCCDB(ccdb, bc.runNumber(), getMeanVertex); } @@ -93,10 +94,10 @@ class StandardCCDBLoader o2::base::Propagator::initFieldFromGRP(grpmag); LOG(info) << "Setting global propagator material propagation LUT"; o2::base::Propagator::Instance()->setMatLUT(lut); - if(getMeanVertex){ + if (getMeanVertex) { // only try this if explicitly requested mMeanVtx = ccdb->template getForRun(mVtxPath, currentRunNumber); - }else{ + } else { mMeanVtx = nullptr; } @@ -104,4 +105,4 @@ class StandardCCDBLoader } }; -#endif // COMMON_TOOLS_STANDARDCCDBLOADER_H_ \ No newline at end of file +#endif // COMMON_TOOLS_STANDARDCCDBLOADER_H_ diff --git a/Common/Tools/TrackPropagationModule.h b/Common/Tools/TrackPropagationModule.h index 4c829c0368c..e219f8f6731 100644 --- a/Common/Tools/TrackPropagationModule.h +++ b/Common/Tools/TrackPropagationModule.h @@ -21,13 +21,13 @@ #include "Common/Tools/TrackTuner.h" //__________________________________________ -// track propagation module -// +// track propagation module +// // this class is capable of performing the usual track propagation -// and table creation it is a demonstration of core service -// plug-in functionality that could be used to reduce the number of -// heavyweight (e.g. mat-LUT-using, propagating) core services to -// reduce overhead and make it easier to pipeline / parallelize +// and table creation it is a demonstration of core service +// plug-in functionality that could be used to reduce the number of +// heavyweight (e.g. mat-LUT-using, propagating) core services to +// reduce overhead and make it easier to pipeline / parallelize // bottlenecks in core services class TrackPropagationModule @@ -36,19 +36,19 @@ class TrackPropagationModule TrackPropagationModule() { // constructor: set defaults - minPropagationRadius = o2::constants::geom::XTPCInnerRef + 0.1; + minPropagationRadius = o2::constants::geom::XTPCInnerRef + 0.1; useTrackTuner = false; - useTrkPid = false; - fillTrackTunerTable = false; + useTrkPid = false; + fillTrackTunerTable = false; trackTunerConfigSource = o2::aod::track_tuner::InputString; 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."; }; - float minPropagationRadius; - bool useTrackTuner; + float minPropagationRadius; + bool useTrackTuner; bool useTrkPid; - bool fillTrackTunerTable; - int trackTunerConfigSource; + bool fillTrackTunerTable; + int trackTunerConfigSource; std::string trackTunerParams; // controls behaviour @@ -74,7 +74,8 @@ class TrackPropagationModule // takes a configurableGroup and reads in necessary configs template - void readConfiguration(TConfigurableGroup const& cGroup){ + void readConfiguration(TConfigurableGroup const& cGroup) + { minPropagationRadius = cGroup.minPropagationRadius.value; useTrackTuner = cGroup.minPropagationRadius.value; useTrkPid = cGroup.useTrkPid.value; @@ -84,14 +85,16 @@ class TrackPropagationModule LOGF(info, "Track propagation module configuration done."); } template - void getFromCCDBLoader(TCCDBLoader const& loader){ + void getFromCCDBLoader(TCCDBLoader const& loader) + { lut = loader.lut; mMeanVtx = loader.mMeanVtx; grpmag = loader.grpmag; } template - void init(TInitContext& initContext){ + void init(TInitContext& initContext) + { // Checking if the tables are requested in the workflow and enabling them fillTracksCov = isTableRequiredInWorkflow(initContext, "TracksCov"); fillTracksDCA = isTableRequiredInWorkflow(initContext, "TracksDCA"); @@ -118,15 +121,16 @@ class TrackPropagationModule } template - void initHistograms(THistoRegistry& registry, TConfigurableGroup& cGroup){ + void initHistograms(THistoRegistry& registry, TConfigurableGroup& cGroup) + { trackTunedTracks = registry.template add("trackTunedTracks", "trackTunedTracks", o2::framework::kTH1D, {{1, 0.5f, 1.5f}}); - + // Histograms for track tuner o2::framework::AxisSpec axisBinsDCA = {600, -0.15f, 0.15f, "#it{dca}_{xy} (cm)"}; registry.template add("hDCAxyVsPtRec", "hDCAxyVsPtRec", o2::framework::kTH2F, {axisBinsDCA, cGroup.axisPtQA}); registry.template add("hDCAxyVsPtMC", "hDCAxyVsPtMC", o2::framework::kTH2F, {axisBinsDCA, cGroup.axisPtQA}); registry.template add("hDCAzVsPtRec", "hDCAzVsPtRec", o2::framework::kTH2F, {axisBinsDCA, cGroup.axisPtQA}); - registry.template add("hDCAzVsPtMC", "hDCAzVsPtMC", o2::framework::kTH2F, {axisBinsDCA, cGroup.axisPtQA}); + registry.template add("hDCAzVsPtMC", "hDCAzVsPtMC", o2::framework::kTH2F, {axisBinsDCA, cGroup.axisPtQA}); } template @@ -172,7 +176,7 @@ class TrackPropagationModule double q2OverPtNew = -9999.; // Only propagate tracks which have passed the innermost wall of the TPC (e.g. skipping loopers etc). Others fill unpropagated. if (track.trackType() == o2::aod::track::TrackIU && track.x() < minPropagationRadius) { - if(fillTracksCov){ + if (fillTracksCov) { if constexpr (isMc) { // checking MC and fillCovMat block begins // bool hasMcParticle = track.has_mcParticle(); if (useTrackTuner) { @@ -210,7 +214,7 @@ class TrackPropagationModule trackType = o2::aod::track::Track; } // filling some QA histograms for track tuner test purpose - if(fillTracksCov){ + if (fillTracksCov) { if constexpr (isMc) { // checking MC and fillCovMat block begins if (track.has_mcParticle() && isPropagationOK) { auto mcParticle1 = track.mcParticle(); @@ -235,11 +239,11 @@ class TrackPropagationModule cursors.tracksParExtensionPropagated(mTrackParCov.getPt(), mTrackParCov.getP(), mTrackParCov.getEta(), mTrackParCov.getPhi()); // TODO do we keep the rho as 0? Also the sigma's are duplicated information cursors.tracksParCovPropagated(std::sqrt(mTrackParCov.getSigmaY2()), std::sqrt(mTrackParCov.getSigmaZ2()), std::sqrt(mTrackParCov.getSigmaSnp2()), - std::sqrt(mTrackParCov.getSigmaTgl2()), std::sqrt(mTrackParCov.getSigma1Pt2()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); + std::sqrt(mTrackParCov.getSigmaTgl2()), std::sqrt(mTrackParCov.getSigma1Pt2()), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); cursors.tracksParCovExtensionPropagated(mTrackParCov.getSigmaY2(), mTrackParCov.getSigmaZY(), mTrackParCov.getSigmaZ2(), mTrackParCov.getSigmaSnpY(), - mTrackParCov.getSigmaSnpZ(), mTrackParCov.getSigmaSnp2(), mTrackParCov.getSigmaTglY(), mTrackParCov.getSigmaTglZ(), mTrackParCov.getSigmaTglSnp(), - mTrackParCov.getSigmaTgl2(), mTrackParCov.getSigma1PtY(), mTrackParCov.getSigma1PtZ(), mTrackParCov.getSigma1PtSnp(), mTrackParCov.getSigma1PtTgl(), - mTrackParCov.getSigma1Pt2()); + mTrackParCov.getSigmaSnpZ(), mTrackParCov.getSigmaSnp2(), mTrackParCov.getSigmaTglY(), mTrackParCov.getSigmaTglZ(), mTrackParCov.getSigmaTglSnp(), + mTrackParCov.getSigmaTgl2(), mTrackParCov.getSigma1PtY(), mTrackParCov.getSigma1PtZ(), mTrackParCov.getSigma1PtSnp(), mTrackParCov.getSigma1PtTgl(), + mTrackParCov.getSigma1Pt2()); if (fillTracksDCA) { cursors.tracksDCA(mDcaInfoCov.getY(), mDcaInfoCov.getZ()); } @@ -257,4 +261,4 @@ class TrackPropagationModule } }; -#endif // COMMON_TOOLS_TRACKPROPAGATIONMODULE_H_ \ No newline at end of file +#endif // COMMON_TOOLS_TRACKPROPAGATIONMODULE_H_