@@ -52,20 +52,25 @@ std::map<int, std::shared_ptr<TH2>> invPtResolutionVsPt;
5252std::map<int , std::shared_ptr<TProfile2D>> invPtResolutionVsEta;
5353std::map<int , std::shared_ptr<TH2>> dcaXyResolutionVsPt;
5454std::map<int , std::shared_ptr<TH2>> dcaZResolutionVsPt;
55+ std::map<int , std::shared_ptr<TH2>> covariancePtPtVsPt;
56+ std::map<int , std::shared_ptr<TH2>> covarianceDcaXyDcaXyVsPt;
57+ std::map<int , std::shared_ptr<TH2>> covarianceDcaZDcaZVsPt;
5558
5659struct Alice3TrackingPerformance {
5760 Configurable<std::vector<int >> pdgCodes{" pdgCodes" , {0 , 211 }, " List of PDG codes to consider for efficiency calculation. (0 means all)" };
5861 HistogramRegistry histos{" Histos" , {}, OutputObjHandlingPolicy::AnalysisObject};
59- Configurable<std::pair<float , float >> etaRange{" etaRange" , {-5 .f , 5 .f }, " Eta range for efficiency calculation" };
62+ ConfigurableAxis ptAxis{" ptAxis" , {500 , 0 , 100 }, " #it{p}_{T} (GeV/#it{c})" };
63+ ConfigurableAxis etaAxis{" etaAxis" , {100 , -5 .f , 5 .f }, " #eta" };
64+ ConfigurableAxis invPtDeltaAxis{" invPtDeltaAxis" , {1000 , -0 .1f , 0 .1f }, " 1./#it{p}_{T}^{gen} - 1./#it{p}_{T}^{reco} (GeV/#it{c})^{-1}" };
6065
6166 void init (o2::framework::InitContext&)
6267 {
63- const AxisSpec axisPt{500 , 0 , 100 , " #it{p}_{T} (GeV/#it{c})" };
64- const AxisSpec axisEta{100 , etaRange.value .first , etaRange.value .second , " #eta" };
6568 const AxisSpec axisPtDelta{100 , -1 , 1 , " (#it{p}_{T}^{reco} - #it{p}_{T}^{gen}) / #it{p}_{T}^{gen}" };
66- const AxisSpec axisInvPtDelta{100 , -1 , 1 , " 1./#it{p}_{T}^{gen} - 1./#it{p}_{T}^{reco} (GeV/#it{c})^{-1}" };
6769 const AxisSpec axisDcaXy{100 , -1 , 1 , " DCA_{xy} (cm)" };
6870 const AxisSpec axisDcaZ{100 , -1 , 1 , " DCA_{z} (cm)" };
71+ const AxisSpec axisCovariancePtPt{100 , 0 , 10 , " cov(#it{p}_{T}, #it{p}_{T}) ((GeV/#it{c})^{2})" };
72+ const AxisSpec axisCovarianceDcaXyDcaXy{100 , 0 , 1 , " cov(DCA_{xy}, DCA_{xy}) (cm^{2})" };
73+ const AxisSpec axisCovarianceDcaZDcaZ{100 , 0 , 1 , " cov(DCA_{z}, DCA_{z}) (cm^{2})" };
6974 particlePdgCodes = histos.add <TH1>(" particlePdgCodes" , " " , kTH1D , {AxisSpec{100 , -0.5 , 99.5 , " PDG Code" }});
7075 for (const int & pdg : pdgCodes.value ) {
7176 std::string prefix = Form (" %i" , pdg);
@@ -74,30 +79,31 @@ struct Alice3TrackingPerformance {
7479 }
7580 const std::string tag = " _" + prefix;
7681 prefix += " /" ;
77- particlePtDistribution[pdg] = histos.add <TH1>(prefix + " particlePtDistribution" + tag, " " , kTH1D , {axisPt });
78- particleEtaDistribution[pdg] = histos.add <TH1>(prefix + " particleEtaDistribution" + tag, " " , kTH1D , {axisEta });
82+ particlePtDistribution[pdg] = histos.add <TH1>(prefix + " particlePtDistribution" + tag, " " , kTH1D , {ptAxis });
83+ particleEtaDistribution[pdg] = histos.add <TH1>(prefix + " particleEtaDistribution" + tag, " " , kTH1D , {etaAxis });
7984
80- ptDistribution[pdg] = histos.add <TH1>(prefix + " ptDistribution" + tag, " " , kTH1D , {axisPt});
81- ptResolutionVsPt[pdg] = histos.add <TH2>(prefix + " ptResolutionVsPt" + tag, " " , kTH2D , {axisPt, axisPtDelta});
82- ptResolutionVsEta[pdg] = histos.add <TProfile2D>(prefix + " ptResolutionVsEta" + tag, " " , kTProfile2D , {axisPt, axisEta});
83- invPtResolutionVsPt[pdg] = histos.add <TH2>(prefix + " invPtResolutionVsPt" + tag, " " , kTH2D , {axisPt, axisInvPtDelta});
84- invPtResolutionVsEta[pdg] = histos.add <TProfile2D>(prefix + " invPtResolutionVsEta" + tag, " " , kTProfile2D , {axisPt, axisEta});
85- dcaXyResolutionVsPt[pdg] = histos.add <TH2>(prefix + " dcaXyResolutionVsPt" + tag, " " , kTH2D , {axisPt, axisDcaXy});
86- dcaZResolutionVsPt[pdg] = histos.add <TH2>(prefix + " dcaZResolutionVsPt" + tag, " " , kTH2D , {axisPt, axisDcaZ});
85+ ptDistribution[pdg] = histos.add <TH1>(prefix + " ptDistribution" + tag, " " , kTH1D , {ptAxis});
86+ ptResolutionVsPt[pdg] = histos.add <TH2>(prefix + " ptResolutionVsPt" + tag, " " , kTH2D , {ptAxis, axisPtDelta});
87+ ptResolutionVsEta[pdg] = histos.add <TProfile2D>(prefix + " ptResolutionVsEta" + tag, " " , kTProfile2D , {ptAxis, etaAxis});
88+ invPtResolutionVsPt[pdg] = histos.add <TH2>(prefix + " invPtResolutionVsPt" + tag, " " , kTH2D , {ptAxis, invPtDeltaAxis});
89+ invPtResolutionVsEta[pdg] = histos.add <TProfile2D>(prefix + " invPtResolutionVsEta" + tag, " " , kTProfile2D , {ptAxis, etaAxis});
90+ dcaXyResolutionVsPt[pdg] = histos.add <TH2>(prefix + " dcaXyResolutionVsPt" + tag, " " , kTH2D , {ptAxis, axisDcaXy});
91+ dcaZResolutionVsPt[pdg] = histos.add <TH2>(prefix + " dcaZResolutionVsPt" + tag, " " , kTH2D , {ptAxis, axisDcaZ});
92+ covariancePtPtVsPt[pdg] = histos.add <TH2>(prefix + " covariancePtPtVsPt" + tag, " " , kTH2D , {ptAxis, axisCovariancePtPt});
93+ covarianceDcaXyDcaXyVsPt[pdg] = histos.add <TH2>(prefix + " covarianceDcaXyDcaXyVsPt" + tag, " " , kTH2D , {ptAxis, axisCovarianceDcaXyDcaXy});
94+ covarianceDcaZDcaZVsPt[pdg] = histos.add <TH2>(prefix + " covarianceDcaZDcaZVsPt" + tag, " " , kTH2D , {ptAxis, axisCovarianceDcaZDcaZ});
8795 }
8896 }
8997
90- void process (soa::Join<aod::Tracks, o2::aod::McTrackLabels, o2::aod::TracksDCA> const & tracks,
98+ void process (soa::Join<aod::Tracks, o2::aod::TracksCov, o2::aod:: McTrackLabels, o2::aod::TracksDCA, o2::aod::TracksDCACov > const & tracks,
9199 aod::McParticles const & mcParticles)
92100 {
93101 auto isParticleSelected = [&](const o2::aod::McParticle& p) {
94102 if (!p.isPhysicalPrimary ()) {
95103 return false ;
96104 }
97- if (p.eta () < etaRange.value .first ) {
98- return false ;
99- }
100- if (p.eta () > etaRange.value .second ) {
105+ const int etaBin = particleEtaDistribution[0 ]->GetXaxis ()->FindBin (p.eta ());
106+ if (etaBin < 1 || etaBin > particleEtaDistribution[0 ]->GetXaxis ()->GetNbins ()) {
101107 return false ;
102108 }
103109 return true ;
@@ -123,6 +129,7 @@ struct Alice3TrackingPerformance {
123129 const auto & mcParticle = track.mcParticle ();
124130 const float ptResolution = (track.pt () - mcParticle.pt ()) / mcParticle.pt ();
125131 const float invptResolution = 1 .f / track.pt () - 1 .f / mcParticle.pt ();
132+ const float covariancePtPt = track.sigma1Pt () * track.sigma1Pt () * track.pt () * track.pt () * track.pt () * track.pt ();
126133
127134 auto fillResolutionHistograms = [&](const int p) {
128135 ptDistribution[p]->Fill (track.pt ());
@@ -132,6 +139,9 @@ struct Alice3TrackingPerformance {
132139 invPtResolutionVsEta[p]->Fill (mcParticle.pt (), mcParticle.eta (), invptResolution);
133140 dcaXyResolutionVsPt[p]->Fill (mcParticle.pt (), track.dcaXY ());
134141 dcaZResolutionVsPt[p]->Fill (mcParticle.pt (), track.dcaZ ());
142+ covariancePtPtVsPt[p]->Fill (mcParticle.pt (), covariancePtPt);
143+ covarianceDcaXyDcaXyVsPt[p]->Fill (mcParticle.pt (), track.sigmaDcaXY2 ());
144+ covarianceDcaZDcaZVsPt[p]->Fill (mcParticle.pt (), track.sigmaDcaZ2 ());
135145 };
136146
137147 fillResolutionHistograms (0 );
0 commit comments