@@ -679,14 +679,14 @@ struct QaMatching {
679679 o2::framework::HistPtr hDeltaEta;
680680 o2::framework::HistPtr hRabs;
681681
682- MatchFeaturesHistos (std::string path, HistogramRegistry* registry, int numCandidates)
682+ MatchFeaturesHistos (std::string path, HistogramRegistry* registry, int numCandidates, double scoreMax )
683683 {
684684 AxisSpec indexAxis = {numCandidates, 0 , static_cast <double >(numCandidates), " ranking index" };
685- AxisSpec scoreAxis = {100 , 0 , 1 , " match score" };
686685 int matchTypeMax = static_cast <int >(kMatchTypeUndefined ) + 1 ;
687686 AxisSpec matchTypeAxis = {matchTypeMax, 0 , static_cast <double >(matchTypeMax), " match type" };
688687 AxisSpec taggedAxis = {2 , 0 , 2.0 , " is tagged" };
689- AxisSpec scoreGapAxis = {100 , 0 , 1.0 , " match score gap" };
688+ AxisSpec scoreAxis = {100 , 0 , scoreMax, " match score" };
689+ AxisSpec scoreGapAxis = {100 , 0 , scoreMax, " match score gap" };
690690 AxisSpec logpAxis = {16 , -1 , 3 , " log_{10}(p)" };
691691 AxisSpec dxAxis = {100 , -20 , 20 , " #Deltax (cm)" };
692692 AxisSpec dyAxis = {100 , -20 , 20 , " #Deltay (cm)" };
@@ -818,7 +818,7 @@ struct QaMatching {
818818 std::string histName;
819819 std::string histTitle;
820820
821- fMatchFeaturesGoodMCH = std::make_unique<MatchFeaturesHistos>(path + " matchFeaturesGoodMCH" , registry, numCandidates);
821+ fMatchFeaturesGoodMCH = std::make_unique<MatchFeaturesHistos>(path + " matchFeaturesGoodMCH" , registry, numCandidates, 100 );
822822
823823 if (isMc) {
824824 fMatchRanking = std::make_unique<MatchRankingHistos>(path + " matchRanking" , " True match ranking" , registry, mftMultMax, numCandidates);
@@ -2179,13 +2179,13 @@ struct QaMatching {
21792179 isTagged = 1 ;
21802180 }
21812181
2182- float scoreGap = 0 ;
2182+ float chi2Gap = 0 ;
21832183 if (globalTracksVector.size () > 1 ) {
21842184 // we have at least two candidates, so we can check the score difference
21852185 // between the leading and the sub-leading
2186- auto leadingScore = globalTracksVector[0 ].matchScore ;
2187- auto subleadingScore = globalTracksVector[1 ].matchScore ;
2188- scoreGap = leadingScore - subleadingScore ;
2186+ auto leadingChi2 = globalTracksVector[0 ].matchChi2 ;
2187+ auto subleadingChi2 = globalTracksVector[1 ].matchChi2 ;
2188+ chi2Gap = subleadingChi2 - leadingChi2 ;
21892189 }
21902190
21912191 for (const auto & candidate : globalTracksVector) {
@@ -2198,14 +2198,14 @@ struct QaMatching {
21982198 double deta = candidate.mchTrackProp .getEta () - candidate.mftTrackProp .getEta ();
21992199 int matchType = static_cast <int >(candidate.matchType );
22002200 int ranking = candidate.matchRanking - 1 ;
2201- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaP )->Fill (dp, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2202- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaPt )->Fill (dpt, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2203- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaX )->Fill (dx, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2204- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaY )->Fill (dy, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2205- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaPhi )->Fill (dphi, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2206- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaTanl )->Fill (dtanl, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2207- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaEta )->Fill (deta, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2208- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hRabs )->Fill (mchTrack.rAtAbsorberEnd (), logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2201+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaP )->Fill (dp, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2202+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaPt )->Fill (dpt, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2203+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaX )->Fill (dx, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2204+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaY )->Fill (dy, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2205+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaPhi )->Fill (dphi, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2206+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaTanl )->Fill (dtanl, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2207+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaEta )->Fill (deta, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2208+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hRabs )->Fill (mchTrack.rAtAbsorberEnd (), logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
22092209 }
22102210 }
22112211
@@ -2344,13 +2344,13 @@ struct QaMatching {
23442344 isTagged = 1 ;
23452345 }
23462346
2347- float scoreGap = 0 ;
2348- if (globalTracksVector.size ()) {
2349- // we have a matchable pair with at least two candidates, so we can check the score difference
2347+ float chi2Gap = 0 ;
2348+ if (globalTracksVector.size () > 1 ) {
2349+ // we have at least two candidates, so we can check the score difference
23502350 // between the leading and the sub-leading
2351- auto leadingScore = globalTracksVector[0 ].matchScore ;
2352- auto subleadingScore = globalTracksVector[1 ].matchScore ;
2353- scoreGap = leadingScore - subleadingScore ;
2351+ auto leadingChi2 = globalTracksVector[0 ].matchChi2 ;
2352+ auto subleadingChi2 = globalTracksVector[1 ].matchChi2 ;
2353+ chi2Gap = subleadingChi2 - leadingChi2 ;
23542354 }
23552355
23562356 for (const auto & candidate : globalTracksVector) {
@@ -2363,14 +2363,14 @@ struct QaMatching {
23632363 double deta = candidate.mchTrackProp .getEta () - candidate.mftTrackProp .getEta ();
23642364 int matchType = static_cast <int >(candidate.matchType );
23652365 int ranking = candidate.matchRanking - 1 ;
2366- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaP )->Fill (dp, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2367- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaPt )->Fill (dpt, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2368- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaX )->Fill (dx, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2369- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaY )->Fill (dy, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2370- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaPhi )->Fill (dphi, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2371- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaTanl )->Fill (dtanl, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2372- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaEta )->Fill (deta, logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2373- std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hRabs )->Fill (mchTrack.rAtAbsorberEnd (), logp, candidate.matchScore , scoreGap , ranking, matchType, isTagged);
2366+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaP )->Fill (dp, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2367+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaPt )->Fill (dpt, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2368+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaX )->Fill (dx, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2369+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaY )->Fill (dy, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2370+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaPhi )->Fill (dphi, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2371+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaTanl )->Fill (dtanl, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2372+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hDeltaEta )->Fill (deta, logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
2373+ std::get<std::shared_ptr<THnSparse>>(plotter->fMatchFeaturesGoodMCH ->hRabs )->Fill (mchTrack.rAtAbsorberEnd (), logp, candidate.matchChi2 , chi2Gap , ranking, matchType, isTagged);
23742374 }
23752375 }
23762376
0 commit comments