@@ -756,6 +756,7 @@ struct QaMatching {
756756 MatchRankingHistos (const std::string& histName, const std::string& histTitle, HistogramRegistry* registry, int mftMultMax, int numCandidates)
757757 {
758758 AxisSpec pAxis = {100 , 0 , 100 , " p (GeV/c)" };
759+ AxisSpec logpAxis = {32 , -1 , 3 , " log_{10}(p)" };
759760 AxisSpec ptAxis = {100 , 0 , 10 , " p_{T} (GeV/c)" };
760761 AxisSpec dzAxis = {100 , -1 , 4 , " #Deltaz (cm)" };
761762 AxisSpec trackMultAxis = {mftMultMax / 10 , 0 , static_cast <double >(mftMultMax), " MFT track mult." };
@@ -778,7 +779,7 @@ struct QaMatching {
778779 std::get<std::shared_ptr<TH2 >>(histVsMftTrackType)->GetXaxis ()->SetBinLabel (1 , " Kalman" );
779780 std::get<std::shared_ptr<TH2 >>(histVsMftTrackType)->GetXaxis ()->SetBinLabel (2 , " CA" );
780781 histVsDeltaChi2 = registry->add ((histName + " VsDeltaChi2" ).c_str (), (histTitle + " vs. #Delta#chi^{2}" ).c_str (), {HistType::kTH2F , {dchi2Axis, indexAxis}});
781- histVsProdRanking = registry->add ((histName + " VsProdRanking" ).c_str (), (histTitle + " vs. prod ranking" ).c_str (), {HistType::kTH2F , {indexProdAxis, indexAxis}});
782+ histVsProdRanking = registry->add ((histName + " VsProdRanking" ).c_str (), (histTitle + " vs. prod ranking" ).c_str (), {HistType::kTHnSparseF , {indexProdAxis, indexAxis, logpAxis }});
782783 }
783784 };
784785
@@ -2334,6 +2335,7 @@ struct QaMatching {
23342335 mftTrackType = pairedMftTrack.isCA () ? MftTrackTypeCA : MftTrackTypeStandard;
23352336 decayRanking = getDecayRanking (mchTrack, mftTracks);
23362337 }
2338+ double logp = std::log10 (mchTrack.p ());
23372339
23382340 // find the index of the matching candidate that corresponds to the true match
23392341 // index=1 corresponds to the leading candidate
@@ -2360,7 +2362,7 @@ struct QaMatching {
23602362 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRanking ->histVsMftTrackMult )->Fill (mftTrackMult, trueMatchIndex);
23612363 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRanking ->histVsMatchAttempts )->Fill (matchAttempts, trueMatchIndex);
23622364 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRanking ->histVsMftTrackType )->Fill (mftTrackType, trueMatchIndex);
2363- std::get<std::shared_ptr<TH2 >>(plotter->fMatchRanking ->histVsProdRanking )->Fill (trueMatchIndexProd, trueMatchIndex);
2365+ std::get<std::shared_ptr<THnSparse >>(plotter->fMatchRanking ->histVsProdRanking )->Fill (trueMatchIndexProd, trueMatchIndex, logp );
23642366 if (dchi2 >= 0 )
23652367 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRanking ->histVsDeltaChi2 )->Fill (dchi2, trueMatchIndex);
23662368
@@ -2372,7 +2374,7 @@ struct QaMatching {
23722374 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingGoodMCH ->histVsMftTrackMult )->Fill (mftTrackMult, trueMatchIndex);
23732375 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingGoodMCH ->histVsMatchAttempts )->Fill (matchAttempts, trueMatchIndex);
23742376 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingGoodMCH ->histVsMftTrackType )->Fill (mftTrackType, trueMatchIndex);
2375- std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingGoodMCH ->histVsProdRanking )->Fill (trueMatchIndexProd, trueMatchIndex);
2377+ std::get<std::shared_ptr<THnSparse >>(plotter->fMatchRankingGoodMCH ->histVsProdRanking )->Fill (trueMatchIndexProd, trueMatchIndex, logp );
23762378 if (dchi2 >= 0 )
23772379 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingGoodMCH ->histVsDeltaChi2 )->Fill (dchi2, trueMatchIndex);
23782380 }
@@ -2385,7 +2387,7 @@ struct QaMatching {
23852387 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPaired ->histVsMftTrackMult )->Fill (mftTrackMult, trueMatchIndex);
23862388 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPaired ->histVsMatchAttempts )->Fill (matchAttempts, trueMatchIndex);
23872389 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPaired ->histVsMftTrackType )->Fill (mftTrackType, trueMatchIndex);
2388- std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPaired ->histVsProdRanking )->Fill (trueMatchIndexProd, trueMatchIndex);
2390+ std::get<std::shared_ptr<THnSparse >>(plotter->fMatchRankingPaired ->histVsProdRanking )->Fill (trueMatchIndexProd, trueMatchIndex, logp );
23892391 if (dchi2 >= 0 )
23902392 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPaired ->histVsDeltaChi2 )->Fill (dchi2, trueMatchIndex);
23912393 }
@@ -2398,14 +2400,12 @@ struct QaMatching {
23982400 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPairedGoodMCH ->histVsMftTrackMult )->Fill (mftTrackMult, trueMatchIndex);
23992401 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPairedGoodMCH ->histVsMatchAttempts )->Fill (matchAttempts, trueMatchIndex);
24002402 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPairedGoodMCH ->histVsMftTrackType )->Fill (mftTrackType, trueMatchIndex);
2401- std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPairedGoodMCH ->histVsProdRanking )->Fill (trueMatchIndexProd, trueMatchIndex);
2403+ std::get<std::shared_ptr<THnSparse >>(plotter->fMatchRankingPairedGoodMCH ->histVsProdRanking )->Fill (trueMatchIndexProd, trueMatchIndex, logp );
24022404 if (dchi2 >= 0 )
24032405 std::get<std::shared_ptr<TH2 >>(plotter->fMatchRankingPairedGoodMCH ->histVsDeltaChi2 )->Fill (dchi2, trueMatchIndex);
24042406 }
24052407
24062408 if (isGoodMCH) {
2407- double logp = std::log10 (mchTrack.p ());
2408-
24092409 int isTagged = 0 ;
24102410 if (std::find (taggedMuons.begin (), taggedMuons.end (), mchIndex) != taggedMuons.end ()) {
24112411 isTagged = 1 ;
0 commit comments