@@ -712,6 +712,11 @@ struct QaMatching {
712712 o2::framework::HistPtr hDeltaTanl;
713713 o2::framework::HistPtr hDeltaEta;
714714 o2::framework::HistPtr hRabs;
715+ o2::framework::HistPtr hPullPt;
716+ o2::framework::HistPtr hPullX;
717+ o2::framework::HistPtr hPullY;
718+ o2::framework::HistPtr hPullPhi;
719+ o2::framework::HistPtr hPullTanl;
715720
716721 MatchFeaturesHistos (const std::string& path, HistogramRegistry* registry, int numCandidates, double scoreMax)
717722 {
@@ -730,6 +735,11 @@ struct QaMatching {
730735 AxisSpec dtanlAxis = {100 , -20 , 20 , " #Deltatanl" };
731736 AxisSpec detaAxis = {100 , -2 , 2 , " #Delta#eta" };
732737 AxisSpec rabsAxis = {100 , 0 , 100 , " R_{abs}" };
738+ AxisSpec uxAxis = {100 , -10 , 10 , " pull(x)" };
739+ AxisSpec uyAxis = {100 , -10 , 10 , " pull(y)" };
740+ AxisSpec uptAxis = {100 , -10 , 10 , " pull(p_{T})" };
741+ AxisSpec uphiAxis = {100 , -10 , 10 , " pull(#phi)" };
742+ AxisSpec utanlAxis = {100 , -10 , 10 , " pull(tanl)" };
733743
734744 hDeltaP = registry->add ((path + " /deltaP" ).c_str (), " MFT-MCH #Deltap" , {HistType::kTHnSparseF , {dpAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
735745 hDeltaPt = registry->add ((path + " /deltaPt" ).c_str (), " MFT-MCH #Deltap_{T}" , {HistType::kTHnSparseF , {dptAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
@@ -739,6 +749,12 @@ struct QaMatching {
739749 hDeltaTanl = registry->add ((path + " /deltaTanl" ).c_str (), " MFT-MCH #DeltaTanl" , {HistType::kTHnSparseF , {dtanlAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
740750 hDeltaEta = registry->add ((path + " /deltaEta" ).c_str (), " MFT-MCH #Delta#eta" , {HistType::kTHnSparseF , {detaAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
741751 hRabs = registry->add ((path + " /Rabs" ).c_str (), " MFT-MCH R_{abs}" , {HistType::kTHnSparseF , {rabsAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
752+
753+ hPullPt = registry->add ((path + " /pullPt" ).c_str (), " MFT-MCH Pull p_{T}" , {HistType::kTHnSparseF , {uptAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
754+ hPullX = registry->add ((path + " /pullX" ).c_str (), " MFT-MCH Pull x" , {HistType::kTHnSparseF , {uxAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
755+ hPullY = registry->add ((path + " /pullY" ).c_str (), " MFT-MCH Pull y" , {HistType::kTHnSparseF , {uyAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
756+ hPullPhi = registry->add ((path + " /pullPhi" ).c_str (), " MFT-MCH Pull #phi" , {HistType::kTHnSparseF , {uphiAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
757+ hPullTanl = registry->add ((path + " /pullTanl" ).c_str (), " MFT-MCH Pull Tanl" , {HistType::kTHnSparseF , {utanlAxis, logpAxis, scoreAxis, scoreGapAxis, indexAxis, matchTypeAxis, taggedAxis}});
742758 }
743759 };
744760
@@ -2271,6 +2287,22 @@ struct QaMatching {
22712287 std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaTanl )->Fill (dtanl, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
22722288 std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaEta )->Fill (deta, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
22732289 std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hRabs )->Fill (mchTrack.rAtAbsorberEnd (), logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2290+
2291+ double ptError = std::sqrt ((1 . / candidate.mchTrackProp .getSigma2InvQPt ()) + (1 . / candidate.mftTrackProp .getSigma2InvQPt ()));
2292+ double pullPt = (ptError > 0 ) ? dpt / ptError : 1 .e6 ;
2293+ double xError = std::sqrt (candidate.mchTrackProp .getSigma2X () + candidate.mftTrackProp .getSigma2X ());
2294+ double pullX = (xError > 0 ) ? dx / xError : 1 .e6 ;
2295+ double yError = std::sqrt (candidate.mchTrackProp .getSigma2Y () + candidate.mftTrackProp .getSigma2Y ());
2296+ double pullY = (yError > 0 ) ? dy / yError : 1 .e6 ;
2297+ double phiError = std::sqrt (candidate.mchTrackProp .getSigma2Phi () + candidate.mftTrackProp .getSigma2Phi ());
2298+ double pullPhi = (phiError > 0 ) ? dphi / phiError : 1 .e6 ;
2299+ double tanlError = std::sqrt (candidate.mchTrackProp .getSigma2Tanl () + candidate.mftTrackProp .getSigma2Tanl ());
2300+ double pullTanl = (tanlError > 0 ) ? dtanl / tanlError : 1 .e6 ;
2301+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullPt )->Fill (pullPt, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2302+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullX )->Fill (pullX, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2303+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullY )->Fill (pullY, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2304+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullPhi )->Fill (pullPhi, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2305+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullTanl )->Fill (pullTanl, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
22742306 }
22752307 }
22762308
@@ -2438,6 +2470,22 @@ struct QaMatching {
24382470 std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaTanl )->Fill (dtanl, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
24392471 std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaEta )->Fill (deta, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
24402472 std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hRabs )->Fill (mchTrack.rAtAbsorberEnd (), logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2473+
2474+ double ptError = std::sqrt ((1 . / candidate.mchTrackProp .getSigma2InvQPt ()) + (1 . / candidate.mftTrackProp .getSigma2InvQPt ()));
2475+ double pullPt = (ptError > 0 ) ? dpt / ptError : 1 .e6 ;
2476+ double xError = std::sqrt (candidate.mchTrackProp .getSigma2X () + candidate.mftTrackProp .getSigma2X ());
2477+ double pullX = (xError > 0 ) ? dx / xError : 1 .e6 ;
2478+ double yError = std::sqrt (candidate.mchTrackProp .getSigma2Y () + candidate.mftTrackProp .getSigma2Y ());
2479+ double pullY = (yError > 0 ) ? dy / yError : 1 .e6 ;
2480+ double phiError = std::sqrt (candidate.mchTrackProp .getSigma2Phi () + candidate.mftTrackProp .getSigma2Phi ());
2481+ double pullPhi = (phiError > 0 ) ? dphi / phiError : 1 .e6 ;
2482+ double tanlError = std::sqrt (candidate.mchTrackProp .getSigma2Tanl () + candidate.mftTrackProp .getSigma2Tanl ());
2483+ double pullTanl = (tanlError > 0 ) ? dtanl / tanlError : 1 .e6 ;
2484+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullPt )->Fill (pullPt, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2485+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullX )->Fill (pullX, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2486+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullY )->Fill (pullY, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2487+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullPhi )->Fill (pullPhi, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
2488+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hPullTanl )->Fill (pullTanl, logp, candidate.matchChi2 , chi2Gap, ranking, matchType, isTagged);
24412489 }
24422490 }
24432491
0 commit comments