From 29b20235401ebba20c9857c25a1ddbb2d4eab68f Mon Sep 17 00:00:00 2001 From: Cornel de Villiers Date: Thu, 19 Nov 2026 17:34:39 +0100 Subject: [PATCH 1/6] Added additional input features for matching. --- PWGDQ/Core/MuonMatchingMlResponse.h | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/PWGDQ/Core/MuonMatchingMlResponse.h b/PWGDQ/Core/MuonMatchingMlResponse.h index 584cc10b3d6..232e500b8e5 100644 --- a/PWGDQ/Core/MuonMatchingMlResponse.h +++ b/PWGDQ/Core/MuonMatchingMlResponse.h @@ -90,6 +90,7 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { tglMFT, phiMFT, ptMFT, + pMFT, etaMFT, timeMFT, timeResMFT, @@ -106,6 +107,7 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { tglMCH, phiMCH, ptMCH, + pMCH, etaMCH, timeMCH, timeResMCH, @@ -152,7 +154,9 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { deltaPhi, deltaTgl, deltaEta, + delta1Pt, deltaPt, + deltaP, deltaR, deltaDirection, pullX, @@ -163,6 +167,7 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { pullPt, pullR, deltaPtRel, + deltaPRel, // track residuals (absolute values) absDeltaX, absDeltaY, @@ -170,6 +175,7 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { absDeltaTgl, absDeltaEta, absDeltaPt, + absDeltaP, absDeltaR, absDeltaDirection, absPullX, @@ -258,6 +264,11 @@ float getPull(float mftVal, float mftErr2, float mchVal, float mchErr2) return (err > 0 ? delta / err : delta); } +float getRelDifference(float mftVal, float mchVal) +{ + return (mchVal - mftVal) / (mchVal + mftVal); +} + template class MlResponseMFTMuonMatch : public MlResponse { @@ -285,6 +296,7 @@ class MlResponseMFTMuonMatch : public MlResponse /*dummy value*/ CHECK_AND_FILL_FEATURE(dcaXY, 0); /*dummy value*/ CHECK_AND_FILL_FEATURE(dcaZ, 0); CHECK_AND_FILL_FEATURE(ptMFT, mftprop.getPt()); + CHECK_AND_FILL_FEATURE(pMFT, mftprop.getPt() * std::cosh(mftprop.getEta())); CHECK_AND_FILL_FEATURE(etaMFT, mftprop.getEta()); CHECK_AND_FILL_FEATURE(timeMFT, mft.trackTime()); CHECK_AND_FILL_FEATURE(timeResMFT, mft.trackTimeRes()); @@ -297,6 +309,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(tglMCH, mchprop.getTanl()); CHECK_AND_FILL_FEATURE(phiMCH, mchprop.getPhi()); CHECK_AND_FILL_FEATURE(ptMCH, mchprop.getPt()); + CHECK_AND_FILL_FEATURE(pMCH, mchprop.getPt() * std::cosh(mchprop.getEta())); CHECK_AND_FILL_FEATURE(etaMCH, mchprop.getEta()); CHECK_AND_FILL_FEATURE(timeMCH, mch.trackTime()); CHECK_AND_FILL_FEATURE(timeResMCH, mch.trackTimeRes()); @@ -343,10 +356,13 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(deltaPhi, mchprop.getPhi() - mftprop.getPhi()); CHECK_AND_FILL_FEATURE(deltaTgl, mchprop.getTgl() - mftprop.getTgl()); CHECK_AND_FILL_FEATURE(deltaEta, mchprop.getEta() - mftprop.getEta()); + CHECK_AND_FILL_FEATURE(delta1Pt, mchprop.getInvQPt() - mftprop.getInvQPt()); CHECK_AND_FILL_FEATURE(deltaPt, mchprop.getPt() - mftprop.getPt()); + CHECK_AND_FILL_FEATURE(deltaP, mchprop.getPt() * std::cosh(mchprop.getEta()) - mftprop.getPt() * std::cosh(mftprop.getEta())); CHECK_AND_FILL_FEATURE(deltaR, getDeltaR(mftprop, mchprop)); CHECK_AND_FILL_FEATURE(deltaDirection, getDeltaDirection(mftprop, mchprop)); - CHECK_AND_FILL_FEATURE(deltaPtRel, (mchprop.getPt() - mftprop.getPt()) / (mchprop.getPt() + mftprop.getPt())); + CHECK_AND_FILL_FEATURE(deltaPtRel, getRelDifference(mftprop.getPt(), mchprop.getPt())); + CHECK_AND_FILL_FEATURE(deltaPRel, getRelDifference(mftprop.getPt() * std::cosh(mftprop.getEta()), mchprop.getPt() * std::cosh(mchprop.getEta()))); CHECK_AND_FILL_FEATURE(pullX, getPull(mftprop.getX(), mftprop.getCovariances()(0, 0), mchprop.getX(), mchprop.getCovariances()(0, 0))); CHECK_AND_FILL_FEATURE(pullY, getPull(mftprop.getY(), mftprop.getCovariances()(1, 1), mchprop.getY(), mchprop.getCovariances()(1, 1))); CHECK_AND_FILL_FEATURE(pullPhi, getPull(mftprop.getPhi(), mftprop.getCovariances()(2, 2), mchprop.getPhi(), mchprop.getCovariances()(2, 2))); @@ -361,9 +377,10 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(absDeltaTgl, std::fabs(mchprop.getTgl() - mftprop.getTgl())); CHECK_AND_FILL_FEATURE(absDeltaEta, std::fabs(mchprop.getEta() - mftprop.getEta())); CHECK_AND_FILL_FEATURE(absDeltaPt, std::fabs(mchprop.getPt() - mftprop.getPt())); + CHECK_AND_FILL_FEATURE(absDeltaP, std::fabs(mchprop.getPt() * std::cosh(mchprop.getEta()) - mftprop.getPt() * std::cosh(mftprop.getEta()))); CHECK_AND_FILL_FEATURE(absDeltaR, std::fabs(getDeltaR(mftprop, mchprop))); CHECK_AND_FILL_FEATURE(absDeltaDirection, std::fabs(getDeltaDirection(mftprop, mchprop))); - CHECK_AND_FILL_FEATURE(absDeltaPtRel, std::fabs((mchprop.getPt() - mftprop.getPt()) / (mchprop.getPt() + mftprop.getPt()))); + CHECK_AND_FILL_FEATURE(absDeltaPtRel, std::fabs(getRelDifference(mftprop.getPt(), mchprop.getPt()))); CHECK_AND_FILL_FEATURE(absPullX, std::fabs(getPull(mftprop.getX(), mftprop.getCovariances()(0, 0), mchprop.getX(), mchprop.getCovariances()(0, 0)))); CHECK_AND_FILL_FEATURE(absPullY, std::fabs(getPull(mftprop.getY(), mftprop.getCovariances()(1, 1), mchprop.getY(), mchprop.getCovariances()(1, 1)))); CHECK_AND_FILL_FEATURE(absPullPhi, std::fabs(getPull(mftprop.getPhi(), mftprop.getCovariances()(2, 2), mchprop.getPhi(), mchprop.getCovariances()(2, 2)))); @@ -447,6 +464,7 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(tglMFT), FILL_MAP_MFTMUON_MATCH(phiMFT), FILL_MAP_MFTMUON_MATCH(ptMFT), + FILL_MAP_MFTMUON_MATCH(pMFT), FILL_MAP_MFTMUON_MATCH(etaMFT), FILL_MAP_MFTMUON_MATCH(timeMFT), FILL_MAP_MFTMUON_MATCH(timeResMFT), @@ -464,6 +482,7 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(phiMCH), FILL_MAP_MFTMUON_MATCH(nClustersMCH), FILL_MAP_MFTMUON_MATCH(ptMCH), + FILL_MAP_MFTMUON_MATCH(pMCH), FILL_MAP_MFTMUON_MATCH(etaMCH), FILL_MAP_MFTMUON_MATCH(timeMCH), FILL_MAP_MFTMUON_MATCH(timeResMCH), @@ -510,6 +529,8 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(deltaTgl), FILL_MAP_MFTMUON_MATCH(deltaEta), FILL_MAP_MFTMUON_MATCH(deltaPt), + FILL_MAP_MFTMUON_MATCH(delta1Pt), + FILL_MAP_MFTMUON_MATCH(deltaP), FILL_MAP_MFTMUON_MATCH(deltaR), FILL_MAP_MFTMUON_MATCH(deltaDirection), FILL_MAP_MFTMUON_MATCH(pullX), @@ -520,6 +541,7 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(pullPt), FILL_MAP_MFTMUON_MATCH(pullR), FILL_MAP_MFTMUON_MATCH(deltaPtRel), + FILL_MAP_MFTMUON_MATCH(deltaPRel), // track residuals (absolute values) FILL_MAP_MFTMUON_MATCH(absDeltaX), FILL_MAP_MFTMUON_MATCH(absDeltaY), @@ -527,6 +549,7 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(absDeltaTgl), FILL_MAP_MFTMUON_MATCH(absDeltaEta), FILL_MAP_MFTMUON_MATCH(absDeltaPt), + FILL_MAP_MFTMUON_MATCH(absDeltaP), FILL_MAP_MFTMUON_MATCH(absDeltaR), FILL_MAP_MFTMUON_MATCH(absDeltaDirection), FILL_MAP_MFTMUON_MATCH(absPullX), From 5bb904c402548556ef7fea74b82da3e02e59a325 Mon Sep 17 00:00:00 2001 From: Cornel de Villiers Date: Mon, 23 Nov 2026 16:19:36 +0100 Subject: [PATCH 2/6] Added support for matching using 2 matching planes --- PWGDQ/Core/MuonMatchingMlResponse.h | 431 +++++++++++++++++++++++++++- PWGDQ/Tasks/qaMatching.cxx | 30 +- 2 files changed, 445 insertions(+), 16 deletions(-) diff --git a/PWGDQ/Core/MuonMatchingMlResponse.h b/PWGDQ/Core/MuonMatchingMlResponse.h index 232e500b8e5..3210aaae630 100644 --- a/PWGDQ/Core/MuonMatchingMlResponse.h +++ b/PWGDQ/Core/MuonMatchingMlResponse.h @@ -210,7 +210,137 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { chi2GlobMUON, dcaX, dcaY, - isAmbig + isAmbig, + // matching parameters for second matching plane + zMatching2, + // MFT track parameters + xMFT2, + yMFT2, + qOverptMFT2, + tglMFT2, + phiMFT2, + ptMFT2, + pMFT2, + etaMFT2, + // timeMFT2, + // timeResMFT2, + // clusterSizesAndTrackFlagsMFT2, + // trackTypeMFT2, + // dcaXY2, + // dcaZ2, + // chi2MFT2, + // nClustersMFT2, + // MCH track parameters + xMCH2, + yMCH2, + qOverptMCH2, + tglMCH2, + phiMCH2, + ptMCH2, + pMCH2, + etaMCH2, + // timeMCH2, + // timeResMCH2, + // nClustersMCH2, + // chi2MCH2, + // pdca2, + // Rabs2, + // MFT covariances + cXXMFT2, + cXYMFT2, + cYYMFT2, + cPhiYMFT2, + cPhiXMFT2, + cPhiPhiMFT2, + cTglYMFT2, + cTglXMFT2, + cTglPhiMFT2, + cTglTglMFT2, + c1PtYMFT2, + c1PtXMFT2, + c1PtPhiMFT2, + c1PtTglMFT2, + c1Pt21Pt2MFT2, + // MCH covariances + cXXMCH2, + cXYMCH2, + cYYMCH2, + cPhiYMCH2, + cPhiXMCH2, + cPhiPhiMCH2, + cTglYMCH2, + cTglXMCH2, + cTglPhiMCH2, + cTglTglMCH2, + c1PtYMCH2, + c1PtXMCH2, + c1PtPhiMCH2, + c1PtTglMCH2, + c1Pt21Pt2MCH2, + // track residuals + sameSign2, + deltaX2, + deltaY2, + deltaPhi2, + deltaTgl2, + deltaEta2, + delta1Pt2, + deltaPt2, + deltaP2, + deltaR2, + deltaDirection2, + pullX2, + pullY2, + pullPhi2, + pullTgl2, + pullEta2, + pullPt2, + pullR2, + deltaPtRel2, + deltaPRel2, + // track residuals (absolute values) + absDeltaX2, + absDeltaY2, + absDeltaPhi2, + absDeltaTgl2, + absDeltaEta2, + absDeltaPt2, + absDeltaP2, + absDeltaR2, + absDeltaDirection2, + absPullX2, + absPullY2, + absPullPhi2, + absPullTgl2, + absPullEta2, + absPullPt2, + absPullR2, + absDeltaPtRel2, + // primary vertex parameters + // posX2, + // posY2, + // posZ2, + // numContrib2, + // trackOccupancyInTimeRange2, + // ft0cOccupancyInTimeRange2, + // multMFT2, + // multFT0A2, + // multFT0C2, + // multNTracksPV2, + // multNTracksPVeta12, + // multNTracksPVetaHalf2, + // isInelGt02, + // isInelGt12, + // multFT0M2, + // centFT0M2, + // centFT0A2, + // centFT0C2, + // // global forward track parameters + // chi2MCHMFT2, + // chi2GlobMUON2, + // dcaX2, + // dcaY2, + // isAmbig2, }; template @@ -278,8 +408,8 @@ class MlResponseMFTMuonMatch : public MlResponse /// Default destructor virtual ~MlResponseMFTMuonMatch() = default; - template - float returnFeature(uint8_t idx, T1 const& muon, T2 const& mft, T3 const& mch, T4 const& mftprop, T5 const& mchprop, U const& collision) + template + float returnFeature(uint8_t idx, T1 const& muon, T2 const& mft, T3 const& mch, T4 const& mftprop, T5 const& mchprop, T6 const& mftprop2, T7 const& mchprop2, U const& collision) { float inputFeature = 0.; switch (idx) { @@ -296,7 +426,7 @@ class MlResponseMFTMuonMatch : public MlResponse /*dummy value*/ CHECK_AND_FILL_FEATURE(dcaXY, 0); /*dummy value*/ CHECK_AND_FILL_FEATURE(dcaZ, 0); CHECK_AND_FILL_FEATURE(ptMFT, mftprop.getPt()); - CHECK_AND_FILL_FEATURE(pMFT, mftprop.getPt() * std::cosh(mftprop.getEta())); + CHECK_AND_FILL_FEATURE(pMFT, mftprop.getP()); CHECK_AND_FILL_FEATURE(etaMFT, mftprop.getEta()); CHECK_AND_FILL_FEATURE(timeMFT, mft.trackTime()); CHECK_AND_FILL_FEATURE(timeResMFT, mft.trackTimeRes()); @@ -309,7 +439,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(tglMCH, mchprop.getTanl()); CHECK_AND_FILL_FEATURE(phiMCH, mchprop.getPhi()); CHECK_AND_FILL_FEATURE(ptMCH, mchprop.getPt()); - CHECK_AND_FILL_FEATURE(pMCH, mchprop.getPt() * std::cosh(mchprop.getEta())); + CHECK_AND_FILL_FEATURE(pMCH, mchprop.getP()); CHECK_AND_FILL_FEATURE(etaMCH, mchprop.getEta()); CHECK_AND_FILL_FEATURE(timeMCH, mch.trackTime()); CHECK_AND_FILL_FEATURE(timeResMCH, mch.trackTimeRes()); @@ -358,11 +488,11 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(deltaEta, mchprop.getEta() - mftprop.getEta()); CHECK_AND_FILL_FEATURE(delta1Pt, mchprop.getInvQPt() - mftprop.getInvQPt()); CHECK_AND_FILL_FEATURE(deltaPt, mchprop.getPt() - mftprop.getPt()); - CHECK_AND_FILL_FEATURE(deltaP, mchprop.getPt() * std::cosh(mchprop.getEta()) - mftprop.getPt() * std::cosh(mftprop.getEta())); + CHECK_AND_FILL_FEATURE(deltaP, mchprop.getP() - mftprop.getP()); CHECK_AND_FILL_FEATURE(deltaR, getDeltaR(mftprop, mchprop)); CHECK_AND_FILL_FEATURE(deltaDirection, getDeltaDirection(mftprop, mchprop)); CHECK_AND_FILL_FEATURE(deltaPtRel, getRelDifference(mftprop.getPt(), mchprop.getPt())); - CHECK_AND_FILL_FEATURE(deltaPRel, getRelDifference(mftprop.getPt() * std::cosh(mftprop.getEta()), mchprop.getPt() * std::cosh(mchprop.getEta()))); + CHECK_AND_FILL_FEATURE(deltaPRel, getRelDifference(mftprop.getP(), mchprop.getP())); CHECK_AND_FILL_FEATURE(pullX, getPull(mftprop.getX(), mftprop.getCovariances()(0, 0), mchprop.getX(), mchprop.getCovariances()(0, 0))); CHECK_AND_FILL_FEATURE(pullY, getPull(mftprop.getY(), mftprop.getCovariances()(1, 1), mchprop.getY(), mchprop.getCovariances()(1, 1))); CHECK_AND_FILL_FEATURE(pullPhi, getPull(mftprop.getPhi(), mftprop.getCovariances()(2, 2), mchprop.getPhi(), mchprop.getCovariances()(2, 2))); @@ -377,7 +507,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(absDeltaTgl, std::fabs(mchprop.getTgl() - mftprop.getTgl())); CHECK_AND_FILL_FEATURE(absDeltaEta, std::fabs(mchprop.getEta() - mftprop.getEta())); CHECK_AND_FILL_FEATURE(absDeltaPt, std::fabs(mchprop.getPt() - mftprop.getPt())); - CHECK_AND_FILL_FEATURE(absDeltaP, std::fabs(mchprop.getPt() * std::cosh(mchprop.getEta()) - mftprop.getPt() * std::cosh(mftprop.getEta()))); + CHECK_AND_FILL_FEATURE(absDeltaP, std::fabs(mchprop.getP() - mftprop.getP())); CHECK_AND_FILL_FEATURE(absDeltaR, std::fabs(getDeltaR(mftprop, mchprop))); CHECK_AND_FILL_FEATURE(absDeltaDirection, std::fabs(getDeltaDirection(mftprop, mchprop))); CHECK_AND_FILL_FEATURE(absDeltaPtRel, std::fabs(getRelDifference(mftprop.getPt(), mchprop.getPt()))); @@ -412,7 +542,141 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(chi2GlobMUON, muon.chi2()); CHECK_AND_FILL_FEATURE_OPTIONAL(dcaX, muon, fwdDcaX); CHECK_AND_FILL_FEATURE_OPTIONAL(dcaY, muon, fwdDcaY); - CHECK_AND_FILL_FEATURE_OPTIONAL(isAmbig, muon, compatibleCollIds, (muon.compatibleCollIds().size() == 1) ? 0 : 1); + CHECK_AND_FILL_FEATURE_OPTIONAL(isAmbig, muon, compatibleCollIds, (muon.compatibleCollIds().size() == 1) ? 0 : 1) + + // plane 2 + // matching parameters + CHECK_AND_FILL_FEATURE(zMatching2, mftprop2.getZ()); + // MFT2 track parameters + CHECK_AND_FILL_FEATURE(xMFT2, mftprop2.getX()); + CHECK_AND_FILL_FEATURE(yMFT2, mftprop2.getY()); + CHECK_AND_FILL_FEATURE(qOverptMFT2, mftprop2.getInvQPt()); + CHECK_AND_FILL_FEATURE(tglMFT2, mftprop2.getTanl()); + CHECK_AND_FILL_FEATURE(phiMFT2, mftprop2.getPhi()); + // CHECK_AND_FILL_FEATURE(chi2MFT2, mft.chi2()); + // CHECK_AND_FILL_FEATURE(nClustersMFT2, mft.nClusters()); + // /*dummy value*/ CHECK_AND_FILL_FEATURE(dcaXY, 0); + // /*dummy value*/ CHECK_AND_FILL_FEATURE(dcaZ, 0); + CHECK_AND_FILL_FEATURE(ptMFT2, mftprop2.getPt()); + CHECK_AND_FILL_FEATURE(pMFT2, mftprop2.getP()); + CHECK_AND_FILL_FEATURE(etaMFT2, mftprop2.getEta()); + // CHECK_AND_FILL_FEATURE(timeMFT2, mft.trackTime()); + // CHECK_AND_FILL_FEATURE(timeResMFT2, mft.trackTimeRes()); + // CHECK_AND_FILL_FEATURE(clusterSizesAndTrackFlagsMFT2, mft.mftClusterSizesAndTrackFlags()); + // CHECK_AND_FILL_FEATURE(trackTypeMFT2, (mft.isCA() ? 1 : 0)); + // MCH2 track parameters + CHECK_AND_FILL_FEATURE(xMCH2, mchprop2.getX()); + CHECK_AND_FILL_FEATURE(yMCH2, mchprop2.getY()); + CHECK_AND_FILL_FEATURE(qOverptMCH2, mchprop2.getInvQPt()); + CHECK_AND_FILL_FEATURE(tglMCH2, mchprop2.getTanl()); + CHECK_AND_FILL_FEATURE(phiMCH2, mchprop2.getPhi()); + CHECK_AND_FILL_FEATURE(ptMCH2, mchprop2.getPt()); + CHECK_AND_FILL_FEATURE(pMCH2, mchprop2.getP()); + // CHECK_AND_FILL_FEATURE(etaMCH2, mchprop2.getEta()); + // CHECK_AND_FILL_FEATURE(timeMCH2, mch.trackTime()); + // CHECK_AND_FILL_FEATURE(timeResMCH2, mch.trackTimeRes()); + // CHECK_AND_FILL_FEATURE(nClustersMCH2, mch.nClusters()); + // CHECK_AND_FILL_FEATURE(chi2MCH2, mch.chi2()); + // CHECK_AND_FILL_FEATURE(pdca, muon.pDca()); + // CHECK_AND_FILL_FEATURE(Rabs, muon.rAtAbsorberEnd()); + // MFT2 covariances + CHECK_AND_FILL_FEATURE(cXXMFT2, mftprop2.getCovariances()(0, 0)); + CHECK_AND_FILL_FEATURE(cXYMFT2, mftprop2.getCovariances()(0, 1)); + CHECK_AND_FILL_FEATURE(cYYMFT2, mftprop2.getCovariances()(1, 1)); + CHECK_AND_FILL_FEATURE(cPhiXMFT2, mftprop2.getCovariances()(0, 2)); + CHECK_AND_FILL_FEATURE(cPhiYMFT2, mftprop2.getCovariances()(1, 2)); + CHECK_AND_FILL_FEATURE(cPhiPhiMFT2, mftprop2.getCovariances()(2, 2)); + CHECK_AND_FILL_FEATURE(cTglXMFT2, mftprop2.getCovariances()(0, 3)); + CHECK_AND_FILL_FEATURE(cTglYMFT2, mftprop2.getCovariances()(1, 3)); + CHECK_AND_FILL_FEATURE(cTglPhiMFT2, mftprop2.getCovariances()(2, 3)); + CHECK_AND_FILL_FEATURE(cTglTglMFT2, mftprop2.getCovariances()(3, 3)); + CHECK_AND_FILL_FEATURE(c1PtXMFT2, mftprop2.getCovariances()(0, 4)); + CHECK_AND_FILL_FEATURE(c1PtYMFT2, mftprop2.getCovariances()(1, 4)); + CHECK_AND_FILL_FEATURE(c1PtPhiMFT2, mftprop2.getCovariances()(2, 4)); + CHECK_AND_FILL_FEATURE(c1PtTglMFT2, mftprop2.getCovariances()(3, 4)); + CHECK_AND_FILL_FEATURE(c1Pt21Pt2MFT2, mftprop2.getCovariances()(4, 4)); + // MCH2 covariances + CHECK_AND_FILL_FEATURE(cXXMCH2, mchprop2.getCovariances()(0, 0)); + CHECK_AND_FILL_FEATURE(cXYMCH2, mchprop2.getCovariances()(0, 1)); + CHECK_AND_FILL_FEATURE(cYYMCH2, mchprop2.getCovariances()(1, 1)); + CHECK_AND_FILL_FEATURE(cPhiXMCH2, mchprop2.getCovariances()(0, 2)); + CHECK_AND_FILL_FEATURE(cPhiYMCH2, mchprop2.getCovariances()(1, 2)); + CHECK_AND_FILL_FEATURE(cPhiPhiMCH2, mchprop2.getCovariances()(2, 2)); + CHECK_AND_FILL_FEATURE(cTglXMCH2, mchprop2.getCovariances()(0, 3)); + CHECK_AND_FILL_FEATURE(cTglYMCH2, mchprop2.getCovariances()(1, 3)); + CHECK_AND_FILL_FEATURE(cTglPhiMCH2, mchprop2.getCovariances()(2, 3)); + CHECK_AND_FILL_FEATURE(cTglTglMCH2, mchprop2.getCovariances()(3, 3)); + CHECK_AND_FILL_FEATURE(c1PtXMCH2, mchprop2.getCovariances()(0, 4)); + CHECK_AND_FILL_FEATURE(c1PtYMCH2, mchprop2.getCovariances()(1, 4)); + CHECK_AND_FILL_FEATURE(c1PtPhiMCH2, mchprop2.getCovariances()(2, 4)); + CHECK_AND_FILL_FEATURE(c1PtTglMCH2, mchprop2.getCovariances()(3, 4)); + CHECK_AND_FILL_FEATURE(c1Pt21Pt2MCH2, mchprop2.getCovariances()(4, 4)); + // Track residuals + // CHECK_AND_FILL_FEATURE(sameSign, (mch.sign() == mft.sign()) ? 1 : 0); + CHECK_AND_FILL_FEATURE(deltaX2, mchprop2.getX() - mftprop2.getX()); + CHECK_AND_FILL_FEATURE(deltaY2, mchprop2.getY() - mftprop2.getY()); + CHECK_AND_FILL_FEATURE(deltaPhi2, mchprop2.getPhi() - mftprop2.getPhi()); + CHECK_AND_FILL_FEATURE(deltaTgl2, mchprop2.getTgl() - mftprop2.getTgl()); + CHECK_AND_FILL_FEATURE(deltaEta2, mchprop2.getEta() - mftprop2.getEta()); + CHECK_AND_FILL_FEATURE(delta1Pt2, mchprop2.getInvQPt() - mftprop2.getInvQPt()); + CHECK_AND_FILL_FEATURE(deltaPt2, mchprop2.getPt() - mftprop2.getPt()); + CHECK_AND_FILL_FEATURE(deltaP2, mchprop2.getP() - mftprop2.getP()); + CHECK_AND_FILL_FEATURE(deltaR2, getDeltaR(mftprop2, mchprop2)); + CHECK_AND_FILL_FEATURE(deltaDirection2, getDeltaDirection(mftprop2, mchprop2)); + CHECK_AND_FILL_FEATURE(deltaPtRel2, getRelDifference(mftprop2.getPt(), mchprop2.getPt())); + CHECK_AND_FILL_FEATURE(deltaPRel2, getRelDifference(mftprop2.getP(), mchprop2.getP())); + CHECK_AND_FILL_FEATURE(pullX2, getPull(mftprop2.getX(), mftprop2.getCovariances()(0, 0), mchprop2.getX(), mchprop2.getCovariances()(0, 0))); + CHECK_AND_FILL_FEATURE(pullY2, getPull(mftprop2.getY(), mftprop2.getCovariances()(1, 1), mchprop2.getY(), mchprop2.getCovariances()(1, 1))); + CHECK_AND_FILL_FEATURE(pullPhi2, getPull(mftprop2.getPhi(), mftprop2.getCovariances()(2, 2), mchprop2.getPhi(), mchprop2.getCovariances()(2, 2))); + CHECK_AND_FILL_FEATURE(pullTgl2, getPull(mftprop2.getTgl(), mftprop2.getCovariances()(3, 3), mchprop2.getTgl(), mchprop2.getCovariances()(3, 3))); + // /*dummy value*/ CHECK_AND_FILL_FEATURE(pullEta2, 0); + CHECK_AND_FILL_FEATURE(pullPt2, getPullPt(mftprop2, mchprop2)); + CHECK_AND_FILL_FEATURE(pullR2, getPullR(mftprop2, mchprop2)); + // Track residuals (absolute values) + CHECK_AND_FILL_FEATURE(absDeltaX2, std::fabs(mchprop2.getX() - mftprop2.getX())); + CHECK_AND_FILL_FEATURE(absDeltaY2, std::fabs(mchprop2.getY() - mftprop2.getY())); + CHECK_AND_FILL_FEATURE(absDeltaPhi2, std::fabs(mchprop2.getPhi() - mftprop2.getPhi())); + CHECK_AND_FILL_FEATURE(absDeltaTgl2, std::fabs(mchprop2.getTgl() - mftprop2.getTgl())); + CHECK_AND_FILL_FEATURE(absDeltaEta2, std::fabs(mchprop2.getEta() - mftprop2.getEta())); + CHECK_AND_FILL_FEATURE(absDeltaPt2, std::fabs(mchprop2.getPt() - mftprop2.getPt())); + CHECK_AND_FILL_FEATURE(absDeltaP2, std::fabs(mchprop2.getP() - mftprop2.getP())); + CHECK_AND_FILL_FEATURE(absDeltaR2, std::fabs(getDeltaR(mftprop2, mchprop2))); + CHECK_AND_FILL_FEATURE(absDeltaDirection2, std::fabs(getDeltaDirection(mftprop2, mchprop2))); + CHECK_AND_FILL_FEATURE(absDeltaPtRel2, std::fabs(getRelDifference(mftprop2.getPt(), mchprop2.getPt()))); + CHECK_AND_FILL_FEATURE(absPullX2, std::fabs(getPull(mftprop2.getX(), mftprop2.getCovariances()(0, 0), mchprop2.getX(), mchprop2.getCovariances()(0, 0)))); + CHECK_AND_FILL_FEATURE(absPullY2, std::fabs(getPull(mftprop2.getY(), mftprop2.getCovariances()(1, 1), mchprop2.getY(), mchprop2.getCovariances()(1, 1)))); + CHECK_AND_FILL_FEATURE(absPullPhi2, std::fabs(getPull(mftprop2.getPhi(), mftprop2.getCovariances()(2, 2), mchprop2.getPhi(), mchprop2.getCovariances()(2, 2)))); + CHECK_AND_FILL_FEATURE(absPullTgl2, std::fabs(getPull(mftprop2.getTgl(), mftprop2.getCovariances()(3, 3), mchprop2.getTgl(), mchprop2.getCovariances()(3, 3)))); + // /*dummy value*/ CHECK_AND_FILL_FEATURE(absPullEta2, 0); + CHECK_AND_FILL_FEATURE(absPullPt2, std::fabs(getPullPt(mftprop2, mchprop2))); + CHECK_AND_FILL_FEATURE(absPullR2, std::fabs(getPullR(mftprop2, mchprop2))); + // primary vertex parameters + // CHECK_AND_FILL_FEATURE(posX, collision.posX()); + // CHECK_AND_FILL_FEATURE(posY, collision.posY()); + // CHECK_AND_FILL_FEATURE(posZ, collision.posZ()); + // CHECK_AND_FILL_FEATURE_OPTIONAL(numContrib, collision, numContrib); + // CHECK_AND_FILL_FEATURE_OPTIONAL(trackOccupancyInTimeRange, collision, trackOccupancyInTimeRange); + // CHECK_AND_FILL_FEATURE_OPTIONAL(ft0cOccupancyInTimeRange, collision, ft0cOccupancyInTimeRange); + // CHECK_AND_FILL_FEATURE_OPTIONAL(multMFT2, collision, mftNtracks); + // CHECK_AND_FILL_FEATURE_OPTIONAL(multFT0A, collision, multFT0A); + // CHECK_AND_FILL_FEATURE_OPTIONAL(multFT0C, collision, multFT0C); + // CHECK_AND_FILL_FEATURE_OPTIONAL(multNTracksPV, collision, multNTracksPV); + // CHECK_AND_FILL_FEATURE_OPTIONAL(multNTracksPVeta1, collision, multNTracksPVeta1); + // CHECK_AND_FILL_FEATURE_OPTIONAL(multNTracksPVetaHalf, collision, multNTracksPVetaHalf); + // CHECK_AND_FILL_FEATURE_OPTIONAL(isInelGt0, collision, isInelGt0); + // CHECK_AND_FILL_FEATURE_OPTIONAL(isInelGt1, collision, isInelGt1); + // CHECK_AND_FILL_FEATURE_OPTIONAL(multFT0M, collision, multFT0M); + // CHECK_AND_FILL_FEATURE_OPTIONAL(centFT0M, collision, centFT0M); + // CHECK_AND_FILL_FEATURE_OPTIONAL(centFT0A, collision, centFT0A); + // CHECK_AND_FILL_FEATURE_OPTIONAL(centFT0C, collision, centFT0C); + // global forward track parameters + // CHECK_AND_FILL_FEATURE(chi2MCH2MFT2, muon.chi2MatchMCH2MFT2()); + // CHECK_AND_FILL_FEATURE(chi2GlobMUON, muon.chi2()); + // CHECK_AND_FILL_FEATURE_OPTIONAL(dcaX, muon, fwdDcaX); + // CHECK_AND_FILL_FEATURE_OPTIONAL(dcaY, muon, fwdDcaY); + // CHECK_AND_FILL_FEATURE_OPTIONAL(isAmbig, muon, compatibleCollIds, (muon.compatibleCollIds().size() == 1) ? 0 : 1) + + ; } return inputFeature; } @@ -425,7 +689,21 @@ class MlResponseMFTMuonMatch : public MlResponse { std::vector inputFeatures; for (const auto& idx : MlResponse::mCachedIndices) { - float inputFeature = returnFeature(idx, muon, mft, mch, mftprop, mchprop, collision); + float inputFeature = returnFeature(idx, muon, mft, mch, mftprop, mchprop, mftprop, mchprop, collision); + inputFeatures.emplace_back(inputFeature); + } + return inputFeatures; + } + + /// Method to get the input features vector needed for ML inference with 2 matching planes + /// \param track is the single track, \param collision is the collision + /// \return inputFeatures vector + template + std::vector getInputFeatures(T1 const& muon, T2 const& mft, T3 const& mch, T4 const& mftprop, T5 const& mchprop, T6 const& mftprop2, T7 const& mchprop2, U const& collision) + { + std::vector inputFeatures; + for (const auto& idx : MlResponse::mCachedIndices) { + float inputFeature = returnFeature(idx, muon, mft, mch, mftprop, mchprop, mftprop2, mchprop2, collision); inputFeatures.emplace_back(inputFeature); } return inputFeatures; @@ -584,7 +862,138 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(chi2GlobMUON), FILL_MAP_MFTMUON_MATCH(dcaX), FILL_MAP_MFTMUON_MATCH(dcaY), - FILL_MAP_MFTMUON_MATCH(isAmbig)}; + FILL_MAP_MFTMUON_MATCH(isAmbig), + // Matching plane 2 parameters + FILL_MAP_MFTMUON_MATCH(zMatching2), + // MFT track parameters + FILL_MAP_MFTMUON_MATCH(xMFT2), + FILL_MAP_MFTMUON_MATCH(yMFT2), + FILL_MAP_MFTMUON_MATCH(qOverptMFT2), + FILL_MAP_MFTMUON_MATCH(tglMFT2), + FILL_MAP_MFTMUON_MATCH(phiMFT2), + FILL_MAP_MFTMUON_MATCH(ptMFT2), + FILL_MAP_MFTMUON_MATCH(pMFT2), + FILL_MAP_MFTMUON_MATCH(etaMFT2), + // FILL_MAP_MFTMUON_MATCH(timeMFT), + // FILL_MAP_MFTMUON_MATCH(timeResMFT), + // FILL_MAP_MFTMUON_MATCH(dcaXY), + // FILL_MAP_MFTMUON_MATCH(dcaZ), + // FILL_MAP_MFTMUON_MATCH(chi2MFT), + // FILL_MAP_MFTMUON_MATCH(clusterSizesAndTrackFlagsMFT), + // FILL_MAP_MFTMUON_MATCH(trackTypeMFT), + // FILL_MAP_MFTMUON_MATCH(nClustersMFT), + // MCH track parameters + FILL_MAP_MFTMUON_MATCH(xMCH2), + FILL_MAP_MFTMUON_MATCH(yMCH2), + FILL_MAP_MFTMUON_MATCH(qOverptMCH2), + FILL_MAP_MFTMUON_MATCH(tglMCH2), + FILL_MAP_MFTMUON_MATCH(phiMCH2), + // FILL_MAP_MFTMUON_MATCH(nClustersMCH), + FILL_MAP_MFTMUON_MATCH(ptMCH2), + FILL_MAP_MFTMUON_MATCH(pMCH2), + FILL_MAP_MFTMUON_MATCH(etaMCH2), + // FILL_MAP_MFTMUON_MATCH(timeMCH), + // FILL_MAP_MFTMUON_MATCH(timeResMCH), + // FILL_MAP_MFTMUON_MATCH(chi2MCH), + // FILL_MAP_MFTMUON_MATCH(pdca), + // FILL_MAP_MFTMUON_MATCH(Rabs), + // MFT covariances + FILL_MAP_MFTMUON_MATCH(cXXMFT2), + FILL_MAP_MFTMUON_MATCH(cXYMFT2), + FILL_MAP_MFTMUON_MATCH(cYYMFT2), + FILL_MAP_MFTMUON_MATCH(cPhiYMFT2), + FILL_MAP_MFTMUON_MATCH(cPhiXMFT2), + FILL_MAP_MFTMUON_MATCH(cPhiPhiMFT2), + FILL_MAP_MFTMUON_MATCH(cTglYMFT2), + FILL_MAP_MFTMUON_MATCH(cTglXMFT2), + FILL_MAP_MFTMUON_MATCH(cTglPhiMFT2), + FILL_MAP_MFTMUON_MATCH(cTglTglMFT2), + FILL_MAP_MFTMUON_MATCH(c1PtYMFT2), + FILL_MAP_MFTMUON_MATCH(c1PtXMFT2), + FILL_MAP_MFTMUON_MATCH(c1PtPhiMFT2), + FILL_MAP_MFTMUON_MATCH(c1PtTglMFT2), + FILL_MAP_MFTMUON_MATCH(c1Pt21Pt2MFT2), + // MCH covariances + FILL_MAP_MFTMUON_MATCH(cXXMCH2), + FILL_MAP_MFTMUON_MATCH(cXYMCH2), + FILL_MAP_MFTMUON_MATCH(cYYMCH2), + FILL_MAP_MFTMUON_MATCH(cPhiYMCH2), + FILL_MAP_MFTMUON_MATCH(cPhiXMCH2), + FILL_MAP_MFTMUON_MATCH(cPhiPhiMCH2), + FILL_MAP_MFTMUON_MATCH(cTglYMCH2), + FILL_MAP_MFTMUON_MATCH(cTglXMCH2), + FILL_MAP_MFTMUON_MATCH(cTglPhiMCH2), + FILL_MAP_MFTMUON_MATCH(cTglTglMCH2), + FILL_MAP_MFTMUON_MATCH(c1PtYMCH2), + FILL_MAP_MFTMUON_MATCH(c1PtXMCH2), + FILL_MAP_MFTMUON_MATCH(c1PtPhiMCH2), + FILL_MAP_MFTMUON_MATCH(c1PtTglMCH2), + FILL_MAP_MFTMUON_MATCH(c1Pt21Pt2MCH2), + // track residuals + // FILL_MAP_MFTMUON_MATCH(sameSign), + FILL_MAP_MFTMUON_MATCH(deltaX2), + FILL_MAP_MFTMUON_MATCH(deltaY2), + FILL_MAP_MFTMUON_MATCH(deltaPhi2), + FILL_MAP_MFTMUON_MATCH(deltaTgl2), + FILL_MAP_MFTMUON_MATCH(deltaEta2), + FILL_MAP_MFTMUON_MATCH(deltaPt2), + FILL_MAP_MFTMUON_MATCH(delta1Pt2), + FILL_MAP_MFTMUON_MATCH(deltaP2), + FILL_MAP_MFTMUON_MATCH(deltaR2), + FILL_MAP_MFTMUON_MATCH(deltaDirection2), + FILL_MAP_MFTMUON_MATCH(pullX2), + FILL_MAP_MFTMUON_MATCH(pullY2), + FILL_MAP_MFTMUON_MATCH(pullPhi2), + FILL_MAP_MFTMUON_MATCH(pullTgl2), + FILL_MAP_MFTMUON_MATCH(pullEta2), + FILL_MAP_MFTMUON_MATCH(pullPt2), + FILL_MAP_MFTMUON_MATCH(pullR2), + FILL_MAP_MFTMUON_MATCH(deltaPtRel2), + FILL_MAP_MFTMUON_MATCH(deltaPRel2), + // track residuals (absolute values) + FILL_MAP_MFTMUON_MATCH(absDeltaX2), + FILL_MAP_MFTMUON_MATCH(absDeltaY2), + FILL_MAP_MFTMUON_MATCH(absDeltaPhi2), + FILL_MAP_MFTMUON_MATCH(absDeltaTgl2), + FILL_MAP_MFTMUON_MATCH(absDeltaEta2), + FILL_MAP_MFTMUON_MATCH(absDeltaPt2), + FILL_MAP_MFTMUON_MATCH(absDeltaP2), + FILL_MAP_MFTMUON_MATCH(absDeltaR2), + FILL_MAP_MFTMUON_MATCH(absDeltaDirection2), + FILL_MAP_MFTMUON_MATCH(absPullX2), + FILL_MAP_MFTMUON_MATCH(absPullY2), + FILL_MAP_MFTMUON_MATCH(absPullPhi2), + FILL_MAP_MFTMUON_MATCH(absPullTgl2), + FILL_MAP_MFTMUON_MATCH(absPullEta2), + FILL_MAP_MFTMUON_MATCH(absPullPt2), + FILL_MAP_MFTMUON_MATCH(absPullR2), + FILL_MAP_MFTMUON_MATCH(absDeltaPtRel2), + // primary vertex parameters + // FILL_MAP_MFTMUON_MATCH(posX), + // FILL_MAP_MFTMUON_MATCH(posY), + // FILL_MAP_MFTMUON_MATCH(posZ), + // FILL_MAP_MFTMUON_MATCH(numContrib), + // FILL_MAP_MFTMUON_MATCH(trackOccupancyInTimeRange), + // FILL_MAP_MFTMUON_MATCH(ft0cOccupancyInTimeRange), + // FILL_MAP_MFTMUON_MATCH(multMFT), + // FILL_MAP_MFTMUON_MATCH(multFT0A), + // FILL_MAP_MFTMUON_MATCH(multFT0C), + // FILL_MAP_MFTMUON_MATCH(multNTracksPV), + // FILL_MAP_MFTMUON_MATCH(multNTracksPVeta1), + // FILL_MAP_MFTMUON_MATCH(multNTracksPVetaHalf), + // FILL_MAP_MFTMUON_MATCH(isInelGt0), + // FILL_MAP_MFTMUON_MATCH(isInelGt1), + // FILL_MAP_MFTMUON_MATCH(multFT0M), + // FILL_MAP_MFTMUON_MATCH(centFT0M), + // FILL_MAP_MFTMUON_MATCH(centFT0A), + // FILL_MAP_MFTMUON_MATCH(centFT0C), + // // global forward track parameters + // FILL_MAP_MFTMUON_MATCH(chi2MCHMFT), + // FILL_MAP_MFTMUON_MATCH(chi2GlobMUON), + // FILL_MAP_MFTMUON_MATCH(dcaX), + // FILL_MAP_MFTMUON_MATCH(dcaY), + // FILL_MAP_MFTMUON_MATCH(isAmbig) + }; } uint8_t mCachedIndexBinning; // index correspondance between configurable and available input features diff --git a/PWGDQ/Tasks/qaMatching.cxx b/PWGDQ/Tasks/qaMatching.cxx index 92ae33ab386..de1d07a1891 100644 --- a/PWGDQ/Tasks/qaMatching.cxx +++ b/PWGDQ/Tasks/qaMatching.cxx @@ -484,6 +484,14 @@ struct QaMatching { std::array*, MlModelsNum> matchingPlaneZs{ &cfgMlModelMatchingPlaneZ1, &cfgMlModelMatchingPlaneZ2, &cfgMlModelMatchingPlaneZ3, &cfgMlModelMatchingPlaneZ4, &cfgMlModelMatchingPlaneZ5}; + Configurable cfgMlModelMatchingPlane2Z1{"cfgMlModelMatchingPlane2Z1", 0.f, "Z position of the second matching plane, default value of 0.f runs single plane matching"}; + Configurable cfgMlModelMatchingPlane2Z2{"cfgMlModelMatchingPlane2Z2", 0.f, "Z position of the second matching plane, default value of 0.f runs single plane matching"}; + Configurable cfgMlModelMatchingPlane2Z3{"cfgMlModelMatchingPlane2Z3", 0.f, "Z position of the second matching plane, default value of 0.f runs single plane matching"}; + Configurable cfgMlModelMatchingPlane2Z4{"cfgMlModelMatchingPlane2Z4", 0.f, "Z position of the second matching plane, default value of 0.f runs single plane matching"}; + Configurable cfgMlModelMatchingPlane2Z5{"cfgMlModelMatchingPlane2Z5", 0.f, "Z position of the second matching plane, default value of 0.f runs single plane matching"}; + std::array*, MlModelsNum> matchingPlane2Zs{ + &cfgMlModelMatchingPlane2Z1, &cfgMlModelMatchingPlane2Z2, &cfgMlModelMatchingPlane2Z3, &cfgMlModelMatchingPlane2Z4, &cfgMlModelMatchingPlane2Z5}; + Configurable cfgMlMatchingExtrapMethod1{"cfgMlMatchingExtrapMethod1", 0, "Method for MCH track extrapolation to maching plane"}; Configurable cfgMlMatchingExtrapMethod2{"cfgMlMatchingExtrapMethod2", 0, "Method for MCH track extrapolation to maching plane"}; Configurable cfgMlMatchingExtrapMethod3{"cfgMlMatchingExtrapMethod3", 0, "Method for MCH track extrapolation to maching plane"}; @@ -499,6 +507,7 @@ struct QaMatching { std::map> matchingMlResponses; std::map matchingChi2Functions; std::map matchingPlanesZ; + std::map matchingPlane2Zs; std::map matchingScoreCuts; std::map matchingExtrapMethod; @@ -3398,17 +3407,28 @@ struct QaMatching { // get tracks parameters in O2 format auto mftTrackProp = fwdToTrackPar(mftTrack, mftTrackCov); auto mchTrackProp = fwdToTrackPar(mchTrack, mchTrack); - - // extrapolate to the matching plane + auto mftTrackProp2 = mftTrackProp; + auto mchTrackProp2 = mchTrackProp; auto matchingPlaneZ = matchingPlanesZ[label]; + auto matchingPlane2Z = matchingPlane2Zs[label]; + if (matchingPlaneZ < 0.) { mftTrackProp = propagateToZMft(mftTrackProp, matchingPlaneZ); mchTrackProp = propagateToZMch(mchTrackProp, matchingPlaneZ); } - // run the ML model + std::vector inputML; + if (matchingPlane2Z < 0.f) { + // For 2 plane matching we still use plane 1 for the metric plotting, i.e. store plane1's prop'd tracks + mftTrackProp2 = propagateToZMft(mftTrackProp, matchingPlane2Z); + mchTrackProp2 = propagateToZMch(mchTrackProp, matchingPlane2Z); + // TODO: confirm proper interfacing with mlresponse + inputML = mlResponse.getInputFeatures(muonTrack, mftTrack, mchTrack, mftTrackProp, mchTrackProp, mftTrackProp2, mchTrackProp2, collision); + } else { + inputML = mlResponse.getInputFeatures(muonTrack, mftTrack, mchTrack, mftTrackProp, mchTrackProp, collision); + } + std::vector output; - std::vector inputML = mlResponse.getInputFeatures(muonTrack, mftTrack, mchTrack, mftTrackProp, mchTrackProp, collision); mlResponse.isSelectedMl(inputML, 0, output); float matchScore = output[0]; float matchScoreInv = (matchScore > 0) ? 1.0 / matchScore : std::numeric_limits::max(); @@ -3429,7 +3449,7 @@ struct QaMatching { mftTrack.globalIndex(), candidate.trackType, static_cast(mftTrackProp), - static_cast(mchTrackProp), + static_cast(mchTrackProp), // TODO: add plane2too matchScore, matchChi2, -1, From a2d48fd5b94e1781e695438f5be9aaef2f3621e5 Mon Sep 17 00:00:00 2001 From: Cornel de Villiers Date: Tue, 24 Nov 2026 12:36:17 +0100 Subject: [PATCH 3/6] Clean up vestigial comments + minor fix for eta2MCH --- PWGDQ/Core/MuonMatchingMlResponse.h | 136 +--------------------------- PWGDQ/Tasks/qaMatching.cxx | 2 - 2 files changed, 5 insertions(+), 133 deletions(-) diff --git a/PWGDQ/Core/MuonMatchingMlResponse.h b/PWGDQ/Core/MuonMatchingMlResponse.h index 3210aaae630..7dad1ed1877 100644 --- a/PWGDQ/Core/MuonMatchingMlResponse.h +++ b/PWGDQ/Core/MuonMatchingMlResponse.h @@ -211,7 +211,7 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { dcaX, dcaY, isAmbig, - // matching parameters for second matching plane + // plane 2 zMatching2, // MFT track parameters xMFT2, @@ -222,14 +222,6 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { ptMFT2, pMFT2, etaMFT2, - // timeMFT2, - // timeResMFT2, - // clusterSizesAndTrackFlagsMFT2, - // trackTypeMFT2, - // dcaXY2, - // dcaZ2, - // chi2MFT2, - // nClustersMFT2, // MCH track parameters xMCH2, yMCH2, @@ -239,12 +231,6 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { ptMCH2, pMCH2, etaMCH2, - // timeMCH2, - // timeResMCH2, - // nClustersMCH2, - // chi2MCH2, - // pdca2, - // Rabs2, // MFT covariances cXXMFT2, cXYMFT2, @@ -315,32 +301,7 @@ enum class InputFeaturesMFTMuonMatch : uint8_t { absPullEta2, absPullPt2, absPullR2, - absDeltaPtRel2, - // primary vertex parameters - // posX2, - // posY2, - // posZ2, - // numContrib2, - // trackOccupancyInTimeRange2, - // ft0cOccupancyInTimeRange2, - // multMFT2, - // multFT0A2, - // multFT0C2, - // multNTracksPV2, - // multNTracksPVeta12, - // multNTracksPVetaHalf2, - // isInelGt02, - // isInelGt12, - // multFT0M2, - // centFT0M2, - // centFT0A2, - // centFT0C2, - // // global forward track parameters - // chi2MCHMFT2, - // chi2GlobMUON2, - // dcaX2, - // dcaY2, - // isAmbig2, + absDeltaPtRel2 }; template @@ -543,9 +504,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE_OPTIONAL(dcaX, muon, fwdDcaX); CHECK_AND_FILL_FEATURE_OPTIONAL(dcaY, muon, fwdDcaY); CHECK_AND_FILL_FEATURE_OPTIONAL(isAmbig, muon, compatibleCollIds, (muon.compatibleCollIds().size() == 1) ? 0 : 1) - // plane 2 - // matching parameters CHECK_AND_FILL_FEATURE(zMatching2, mftprop2.getZ()); // MFT2 track parameters CHECK_AND_FILL_FEATURE(xMFT2, mftprop2.getX()); @@ -553,17 +512,9 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(qOverptMFT2, mftprop2.getInvQPt()); CHECK_AND_FILL_FEATURE(tglMFT2, mftprop2.getTanl()); CHECK_AND_FILL_FEATURE(phiMFT2, mftprop2.getPhi()); - // CHECK_AND_FILL_FEATURE(chi2MFT2, mft.chi2()); - // CHECK_AND_FILL_FEATURE(nClustersMFT2, mft.nClusters()); - // /*dummy value*/ CHECK_AND_FILL_FEATURE(dcaXY, 0); - // /*dummy value*/ CHECK_AND_FILL_FEATURE(dcaZ, 0); CHECK_AND_FILL_FEATURE(ptMFT2, mftprop2.getPt()); CHECK_AND_FILL_FEATURE(pMFT2, mftprop2.getP()); CHECK_AND_FILL_FEATURE(etaMFT2, mftprop2.getEta()); - // CHECK_AND_FILL_FEATURE(timeMFT2, mft.trackTime()); - // CHECK_AND_FILL_FEATURE(timeResMFT2, mft.trackTimeRes()); - // CHECK_AND_FILL_FEATURE(clusterSizesAndTrackFlagsMFT2, mft.mftClusterSizesAndTrackFlags()); - // CHECK_AND_FILL_FEATURE(trackTypeMFT2, (mft.isCA() ? 1 : 0)); // MCH2 track parameters CHECK_AND_FILL_FEATURE(xMCH2, mchprop2.getX()); CHECK_AND_FILL_FEATURE(yMCH2, mchprop2.getY()); @@ -572,13 +523,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(phiMCH2, mchprop2.getPhi()); CHECK_AND_FILL_FEATURE(ptMCH2, mchprop2.getPt()); CHECK_AND_FILL_FEATURE(pMCH2, mchprop2.getP()); - // CHECK_AND_FILL_FEATURE(etaMCH2, mchprop2.getEta()); - // CHECK_AND_FILL_FEATURE(timeMCH2, mch.trackTime()); - // CHECK_AND_FILL_FEATURE(timeResMCH2, mch.trackTimeRes()); - // CHECK_AND_FILL_FEATURE(nClustersMCH2, mch.nClusters()); - // CHECK_AND_FILL_FEATURE(chi2MCH2, mch.chi2()); - // CHECK_AND_FILL_FEATURE(pdca, muon.pDca()); - // CHECK_AND_FILL_FEATURE(Rabs, muon.rAtAbsorberEnd()); + CHECK_AND_FILL_FEATURE(etaMCH2, mchprop2.getEta()); // MFT2 covariances CHECK_AND_FILL_FEATURE(cXXMFT2, mftprop2.getCovariances()(0, 0)); CHECK_AND_FILL_FEATURE(cXYMFT2, mftprop2.getCovariances()(0, 1)); @@ -612,7 +557,6 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(c1PtTglMCH2, mchprop2.getCovariances()(3, 4)); CHECK_AND_FILL_FEATURE(c1Pt21Pt2MCH2, mchprop2.getCovariances()(4, 4)); // Track residuals - // CHECK_AND_FILL_FEATURE(sameSign, (mch.sign() == mft.sign()) ? 1 : 0); CHECK_AND_FILL_FEATURE(deltaX2, mchprop2.getX() - mftprop2.getX()); CHECK_AND_FILL_FEATURE(deltaY2, mchprop2.getY() - mftprop2.getY()); CHECK_AND_FILL_FEATURE(deltaPhi2, mchprop2.getPhi() - mftprop2.getPhi()); @@ -629,7 +573,6 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(pullY2, getPull(mftprop2.getY(), mftprop2.getCovariances()(1, 1), mchprop2.getY(), mchprop2.getCovariances()(1, 1))); CHECK_AND_FILL_FEATURE(pullPhi2, getPull(mftprop2.getPhi(), mftprop2.getCovariances()(2, 2), mchprop2.getPhi(), mchprop2.getCovariances()(2, 2))); CHECK_AND_FILL_FEATURE(pullTgl2, getPull(mftprop2.getTgl(), mftprop2.getCovariances()(3, 3), mchprop2.getTgl(), mchprop2.getCovariances()(3, 3))); - // /*dummy value*/ CHECK_AND_FILL_FEATURE(pullEta2, 0); CHECK_AND_FILL_FEATURE(pullPt2, getPullPt(mftprop2, mchprop2)); CHECK_AND_FILL_FEATURE(pullR2, getPullR(mftprop2, mchprop2)); // Track residuals (absolute values) @@ -647,36 +590,8 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(absPullY2, std::fabs(getPull(mftprop2.getY(), mftprop2.getCovariances()(1, 1), mchprop2.getY(), mchprop2.getCovariances()(1, 1)))); CHECK_AND_FILL_FEATURE(absPullPhi2, std::fabs(getPull(mftprop2.getPhi(), mftprop2.getCovariances()(2, 2), mchprop2.getPhi(), mchprop2.getCovariances()(2, 2)))); CHECK_AND_FILL_FEATURE(absPullTgl2, std::fabs(getPull(mftprop2.getTgl(), mftprop2.getCovariances()(3, 3), mchprop2.getTgl(), mchprop2.getCovariances()(3, 3)))); - // /*dummy value*/ CHECK_AND_FILL_FEATURE(absPullEta2, 0); CHECK_AND_FILL_FEATURE(absPullPt2, std::fabs(getPullPt(mftprop2, mchprop2))); CHECK_AND_FILL_FEATURE(absPullR2, std::fabs(getPullR(mftprop2, mchprop2))); - // primary vertex parameters - // CHECK_AND_FILL_FEATURE(posX, collision.posX()); - // CHECK_AND_FILL_FEATURE(posY, collision.posY()); - // CHECK_AND_FILL_FEATURE(posZ, collision.posZ()); - // CHECK_AND_FILL_FEATURE_OPTIONAL(numContrib, collision, numContrib); - // CHECK_AND_FILL_FEATURE_OPTIONAL(trackOccupancyInTimeRange, collision, trackOccupancyInTimeRange); - // CHECK_AND_FILL_FEATURE_OPTIONAL(ft0cOccupancyInTimeRange, collision, ft0cOccupancyInTimeRange); - // CHECK_AND_FILL_FEATURE_OPTIONAL(multMFT2, collision, mftNtracks); - // CHECK_AND_FILL_FEATURE_OPTIONAL(multFT0A, collision, multFT0A); - // CHECK_AND_FILL_FEATURE_OPTIONAL(multFT0C, collision, multFT0C); - // CHECK_AND_FILL_FEATURE_OPTIONAL(multNTracksPV, collision, multNTracksPV); - // CHECK_AND_FILL_FEATURE_OPTIONAL(multNTracksPVeta1, collision, multNTracksPVeta1); - // CHECK_AND_FILL_FEATURE_OPTIONAL(multNTracksPVetaHalf, collision, multNTracksPVetaHalf); - // CHECK_AND_FILL_FEATURE_OPTIONAL(isInelGt0, collision, isInelGt0); - // CHECK_AND_FILL_FEATURE_OPTIONAL(isInelGt1, collision, isInelGt1); - // CHECK_AND_FILL_FEATURE_OPTIONAL(multFT0M, collision, multFT0M); - // CHECK_AND_FILL_FEATURE_OPTIONAL(centFT0M, collision, centFT0M); - // CHECK_AND_FILL_FEATURE_OPTIONAL(centFT0A, collision, centFT0A); - // CHECK_AND_FILL_FEATURE_OPTIONAL(centFT0C, collision, centFT0C); - // global forward track parameters - // CHECK_AND_FILL_FEATURE(chi2MCH2MFT2, muon.chi2MatchMCH2MFT2()); - // CHECK_AND_FILL_FEATURE(chi2GlobMUON, muon.chi2()); - // CHECK_AND_FILL_FEATURE_OPTIONAL(dcaX, muon, fwdDcaX); - // CHECK_AND_FILL_FEATURE_OPTIONAL(dcaY, muon, fwdDcaY); - // CHECK_AND_FILL_FEATURE_OPTIONAL(isAmbig, muon, compatibleCollIds, (muon.compatibleCollIds().size() == 1) ? 0 : 1) - - ; } return inputFeature; } @@ -863,7 +778,7 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(dcaX), FILL_MAP_MFTMUON_MATCH(dcaY), FILL_MAP_MFTMUON_MATCH(isAmbig), - // Matching plane 2 parameters + // plane2 FILL_MAP_MFTMUON_MATCH(zMatching2), // MFT track parameters FILL_MAP_MFTMUON_MATCH(xMFT2), @@ -874,29 +789,15 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(ptMFT2), FILL_MAP_MFTMUON_MATCH(pMFT2), FILL_MAP_MFTMUON_MATCH(etaMFT2), - // FILL_MAP_MFTMUON_MATCH(timeMFT), - // FILL_MAP_MFTMUON_MATCH(timeResMFT), - // FILL_MAP_MFTMUON_MATCH(dcaXY), - // FILL_MAP_MFTMUON_MATCH(dcaZ), - // FILL_MAP_MFTMUON_MATCH(chi2MFT), - // FILL_MAP_MFTMUON_MATCH(clusterSizesAndTrackFlagsMFT), - // FILL_MAP_MFTMUON_MATCH(trackTypeMFT), - // FILL_MAP_MFTMUON_MATCH(nClustersMFT), // MCH track parameters FILL_MAP_MFTMUON_MATCH(xMCH2), FILL_MAP_MFTMUON_MATCH(yMCH2), FILL_MAP_MFTMUON_MATCH(qOverptMCH2), FILL_MAP_MFTMUON_MATCH(tglMCH2), FILL_MAP_MFTMUON_MATCH(phiMCH2), - // FILL_MAP_MFTMUON_MATCH(nClustersMCH), FILL_MAP_MFTMUON_MATCH(ptMCH2), FILL_MAP_MFTMUON_MATCH(pMCH2), FILL_MAP_MFTMUON_MATCH(etaMCH2), - // FILL_MAP_MFTMUON_MATCH(timeMCH), - // FILL_MAP_MFTMUON_MATCH(timeResMCH), - // FILL_MAP_MFTMUON_MATCH(chi2MCH), - // FILL_MAP_MFTMUON_MATCH(pdca), - // FILL_MAP_MFTMUON_MATCH(Rabs), // MFT covariances FILL_MAP_MFTMUON_MATCH(cXXMFT2), FILL_MAP_MFTMUON_MATCH(cXYMFT2), @@ -930,7 +831,6 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(c1PtTglMCH2), FILL_MAP_MFTMUON_MATCH(c1Pt21Pt2MCH2), // track residuals - // FILL_MAP_MFTMUON_MATCH(sameSign), FILL_MAP_MFTMUON_MATCH(deltaX2), FILL_MAP_MFTMUON_MATCH(deltaY2), FILL_MAP_MFTMUON_MATCH(deltaPhi2), @@ -967,33 +867,7 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(absPullEta2), FILL_MAP_MFTMUON_MATCH(absPullPt2), FILL_MAP_MFTMUON_MATCH(absPullR2), - FILL_MAP_MFTMUON_MATCH(absDeltaPtRel2), - // primary vertex parameters - // FILL_MAP_MFTMUON_MATCH(posX), - // FILL_MAP_MFTMUON_MATCH(posY), - // FILL_MAP_MFTMUON_MATCH(posZ), - // FILL_MAP_MFTMUON_MATCH(numContrib), - // FILL_MAP_MFTMUON_MATCH(trackOccupancyInTimeRange), - // FILL_MAP_MFTMUON_MATCH(ft0cOccupancyInTimeRange), - // FILL_MAP_MFTMUON_MATCH(multMFT), - // FILL_MAP_MFTMUON_MATCH(multFT0A), - // FILL_MAP_MFTMUON_MATCH(multFT0C), - // FILL_MAP_MFTMUON_MATCH(multNTracksPV), - // FILL_MAP_MFTMUON_MATCH(multNTracksPVeta1), - // FILL_MAP_MFTMUON_MATCH(multNTracksPVetaHalf), - // FILL_MAP_MFTMUON_MATCH(isInelGt0), - // FILL_MAP_MFTMUON_MATCH(isInelGt1), - // FILL_MAP_MFTMUON_MATCH(multFT0M), - // FILL_MAP_MFTMUON_MATCH(centFT0M), - // FILL_MAP_MFTMUON_MATCH(centFT0A), - // FILL_MAP_MFTMUON_MATCH(centFT0C), - // // global forward track parameters - // FILL_MAP_MFTMUON_MATCH(chi2MCHMFT), - // FILL_MAP_MFTMUON_MATCH(chi2GlobMUON), - // FILL_MAP_MFTMUON_MATCH(dcaX), - // FILL_MAP_MFTMUON_MATCH(dcaY), - // FILL_MAP_MFTMUON_MATCH(isAmbig) - }; + FILL_MAP_MFTMUON_MATCH(absDeltaPtRel2)}; } uint8_t mCachedIndexBinning; // index correspondance between configurable and available input features diff --git a/PWGDQ/Tasks/qaMatching.cxx b/PWGDQ/Tasks/qaMatching.cxx index de1d07a1891..110f47a82ad 100644 --- a/PWGDQ/Tasks/qaMatching.cxx +++ b/PWGDQ/Tasks/qaMatching.cxx @@ -3419,10 +3419,8 @@ struct QaMatching { std::vector inputML; if (matchingPlane2Z < 0.f) { - // For 2 plane matching we still use plane 1 for the metric plotting, i.e. store plane1's prop'd tracks mftTrackProp2 = propagateToZMft(mftTrackProp, matchingPlane2Z); mchTrackProp2 = propagateToZMch(mchTrackProp, matchingPlane2Z); - // TODO: confirm proper interfacing with mlresponse inputML = mlResponse.getInputFeatures(muonTrack, mftTrack, mchTrack, mftTrackProp, mchTrackProp, mftTrackProp2, mchTrackProp2, collision); } else { inputML = mlResponse.getInputFeatures(muonTrack, mftTrack, mchTrack, mftTrackProp, mchTrackProp, collision); From 331e70d837f9612acdda5bcdcc84329eb5f359ed Mon Sep 17 00:00:00 2001 From: Cornel de Villiers Date: Tue, 1 Dec 2026 09:40:18 +0100 Subject: [PATCH 4/6] comment cleanup --- PWGDQ/Core/MuonMatchingMlResponse.h | 8 ++++---- PWGDQ/Tasks/qaMatching.cxx | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PWGDQ/Core/MuonMatchingMlResponse.h b/PWGDQ/Core/MuonMatchingMlResponse.h index 7dad1ed1877..60bcaa576ba 100644 --- a/PWGDQ/Core/MuonMatchingMlResponse.h +++ b/PWGDQ/Core/MuonMatchingMlResponse.h @@ -506,7 +506,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE_OPTIONAL(isAmbig, muon, compatibleCollIds, (muon.compatibleCollIds().size() == 1) ? 0 : 1) // plane 2 CHECK_AND_FILL_FEATURE(zMatching2, mftprop2.getZ()); - // MFT2 track parameters + // MFT track parameters CHECK_AND_FILL_FEATURE(xMFT2, mftprop2.getX()); CHECK_AND_FILL_FEATURE(yMFT2, mftprop2.getY()); CHECK_AND_FILL_FEATURE(qOverptMFT2, mftprop2.getInvQPt()); @@ -515,7 +515,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(ptMFT2, mftprop2.getPt()); CHECK_AND_FILL_FEATURE(pMFT2, mftprop2.getP()); CHECK_AND_FILL_FEATURE(etaMFT2, mftprop2.getEta()); - // MCH2 track parameters + // MCH track parameters CHECK_AND_FILL_FEATURE(xMCH2, mchprop2.getX()); CHECK_AND_FILL_FEATURE(yMCH2, mchprop2.getY()); CHECK_AND_FILL_FEATURE(qOverptMCH2, mchprop2.getInvQPt()); @@ -524,7 +524,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(ptMCH2, mchprop2.getPt()); CHECK_AND_FILL_FEATURE(pMCH2, mchprop2.getP()); CHECK_AND_FILL_FEATURE(etaMCH2, mchprop2.getEta()); - // MFT2 covariances + // MFT covariances CHECK_AND_FILL_FEATURE(cXXMFT2, mftprop2.getCovariances()(0, 0)); CHECK_AND_FILL_FEATURE(cXYMFT2, mftprop2.getCovariances()(0, 1)); CHECK_AND_FILL_FEATURE(cYYMFT2, mftprop2.getCovariances()(1, 1)); @@ -540,7 +540,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(c1PtPhiMFT2, mftprop2.getCovariances()(2, 4)); CHECK_AND_FILL_FEATURE(c1PtTglMFT2, mftprop2.getCovariances()(3, 4)); CHECK_AND_FILL_FEATURE(c1Pt21Pt2MFT2, mftprop2.getCovariances()(4, 4)); - // MCH2 covariances + // MCH covariances CHECK_AND_FILL_FEATURE(cXXMCH2, mchprop2.getCovariances()(0, 0)); CHECK_AND_FILL_FEATURE(cXYMCH2, mchprop2.getCovariances()(0, 1)); CHECK_AND_FILL_FEATURE(cYYMCH2, mchprop2.getCovariances()(1, 1)); diff --git a/PWGDQ/Tasks/qaMatching.cxx b/PWGDQ/Tasks/qaMatching.cxx index 34de3f0207b..4761706de1c 100644 --- a/PWGDQ/Tasks/qaMatching.cxx +++ b/PWGDQ/Tasks/qaMatching.cxx @@ -3454,7 +3454,7 @@ struct QaMatching { mftTrack.globalIndex(), candidate.trackType, static_cast(mftTrackProp), - static_cast(mchTrackProp), // TODO: add plane2too + static_cast(mchTrackProp), matchScore, matchChi2, -1, From 48cfea1218f7d186ff0d5f9a6a39b836ef98b88f Mon Sep 17 00:00:00 2001 From: Cornel de Villiers Date: Wed, 2 Dec 2026 14:23:56 +0100 Subject: [PATCH 5/6] * DeltaPhis now wrap around 2Pi properly * Added missing initialization for plane2 --- PWGDQ/Core/MuonMatchingMlResponse.h | 16 ++++++++-------- PWGDQ/Tasks/qaMatching.cxx | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/PWGDQ/Core/MuonMatchingMlResponse.h b/PWGDQ/Core/MuonMatchingMlResponse.h index 60bcaa576ba..698658fa1e5 100644 --- a/PWGDQ/Core/MuonMatchingMlResponse.h +++ b/PWGDQ/Core/MuonMatchingMlResponse.h @@ -444,7 +444,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(sameSign, (mch.sign() == mft.sign()) ? 1 : 0); CHECK_AND_FILL_FEATURE(deltaX, mchprop.getX() - mftprop.getX()); CHECK_AND_FILL_FEATURE(deltaY, mchprop.getY() - mftprop.getY()); - CHECK_AND_FILL_FEATURE(deltaPhi, mchprop.getPhi() - mftprop.getPhi()); + CHECK_AND_FILL_FEATURE(deltaPhi, std::remainder(mchprop.getPhi() - mftprop.getPhi(), o2::constants::math::TwoPI)); CHECK_AND_FILL_FEATURE(deltaTgl, mchprop.getTgl() - mftprop.getTgl()); CHECK_AND_FILL_FEATURE(deltaEta, mchprop.getEta() - mftprop.getEta()); CHECK_AND_FILL_FEATURE(delta1Pt, mchprop.getInvQPt() - mftprop.getInvQPt()); @@ -456,7 +456,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(deltaPRel, getRelDifference(mftprop.getP(), mchprop.getP())); CHECK_AND_FILL_FEATURE(pullX, getPull(mftprop.getX(), mftprop.getCovariances()(0, 0), mchprop.getX(), mchprop.getCovariances()(0, 0))); CHECK_AND_FILL_FEATURE(pullY, getPull(mftprop.getY(), mftprop.getCovariances()(1, 1), mchprop.getY(), mchprop.getCovariances()(1, 1))); - CHECK_AND_FILL_FEATURE(pullPhi, getPull(mftprop.getPhi(), mftprop.getCovariances()(2, 2), mchprop.getPhi(), mchprop.getCovariances()(2, 2))); + CHECK_AND_FILL_FEATURE(pullPhi, getPull(0, mftprop.getCovariances()(2, 2), std::remainder(mchprop.getPhi() - mftprop.getPhi(), o2::constants::math::TwoPI), mchprop.getCovariances()(2, 2))); CHECK_AND_FILL_FEATURE(pullTgl, getPull(mftprop.getTgl(), mftprop.getCovariances()(3, 3), mchprop.getTgl(), mchprop.getCovariances()(3, 3))); /*dummy value*/ CHECK_AND_FILL_FEATURE(pullEta, 0); CHECK_AND_FILL_FEATURE(pullPt, getPullPt(mftprop, mchprop)); @@ -464,7 +464,7 @@ class MlResponseMFTMuonMatch : public MlResponse // Track residuals (absolute values) CHECK_AND_FILL_FEATURE(absDeltaX, std::fabs(mchprop.getX() - mftprop.getX())); CHECK_AND_FILL_FEATURE(absDeltaY, std::fabs(mchprop.getY() - mftprop.getY())); - CHECK_AND_FILL_FEATURE(absDeltaPhi, std::fabs(mchprop.getPhi() - mftprop.getPhi())); + CHECK_AND_FILL_FEATURE(absDeltaPhi, std::fabs(std::remainder(mchprop.getPhi() - mftprop.getPhi(), o2::constants::math::TwoPI))); CHECK_AND_FILL_FEATURE(absDeltaTgl, std::fabs(mchprop.getTgl() - mftprop.getTgl())); CHECK_AND_FILL_FEATURE(absDeltaEta, std::fabs(mchprop.getEta() - mftprop.getEta())); CHECK_AND_FILL_FEATURE(absDeltaPt, std::fabs(mchprop.getPt() - mftprop.getPt())); @@ -474,7 +474,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(absDeltaPtRel, std::fabs(getRelDifference(mftprop.getPt(), mchprop.getPt()))); CHECK_AND_FILL_FEATURE(absPullX, std::fabs(getPull(mftprop.getX(), mftprop.getCovariances()(0, 0), mchprop.getX(), mchprop.getCovariances()(0, 0)))); CHECK_AND_FILL_FEATURE(absPullY, std::fabs(getPull(mftprop.getY(), mftprop.getCovariances()(1, 1), mchprop.getY(), mchprop.getCovariances()(1, 1)))); - CHECK_AND_FILL_FEATURE(absPullPhi, std::fabs(getPull(mftprop.getPhi(), mftprop.getCovariances()(2, 2), mchprop.getPhi(), mchprop.getCovariances()(2, 2)))); + CHECK_AND_FILL_FEATURE(absPullPhi, std::fabs(getPull(0, mftprop.getCovariances()(2, 2), std::remainder(mchprop.getPhi() - mftprop.getPhi(), o2::constants::math::TwoPI), mchprop.getCovariances()(2, 2)))); CHECK_AND_FILL_FEATURE(absPullTgl, std::fabs(getPull(mftprop.getTgl(), mftprop.getCovariances()(3, 3), mchprop.getTgl(), mchprop.getCovariances()(3, 3)))); /*dummy value*/ CHECK_AND_FILL_FEATURE(absPullEta, 0); CHECK_AND_FILL_FEATURE(absPullPt, std::fabs(getPullPt(mftprop, mchprop))); @@ -559,7 +559,7 @@ class MlResponseMFTMuonMatch : public MlResponse // Track residuals CHECK_AND_FILL_FEATURE(deltaX2, mchprop2.getX() - mftprop2.getX()); CHECK_AND_FILL_FEATURE(deltaY2, mchprop2.getY() - mftprop2.getY()); - CHECK_AND_FILL_FEATURE(deltaPhi2, mchprop2.getPhi() - mftprop2.getPhi()); + CHECK_AND_FILL_FEATURE(deltaPhi2, std::remainder(mchprop2.getPhi() - mftprop2.getPhi(), o2::constants::math::TwoPI)); CHECK_AND_FILL_FEATURE(deltaTgl2, mchprop2.getTgl() - mftprop2.getTgl()); CHECK_AND_FILL_FEATURE(deltaEta2, mchprop2.getEta() - mftprop2.getEta()); CHECK_AND_FILL_FEATURE(delta1Pt2, mchprop2.getInvQPt() - mftprop2.getInvQPt()); @@ -571,14 +571,14 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(deltaPRel2, getRelDifference(mftprop2.getP(), mchprop2.getP())); CHECK_AND_FILL_FEATURE(pullX2, getPull(mftprop2.getX(), mftprop2.getCovariances()(0, 0), mchprop2.getX(), mchprop2.getCovariances()(0, 0))); CHECK_AND_FILL_FEATURE(pullY2, getPull(mftprop2.getY(), mftprop2.getCovariances()(1, 1), mchprop2.getY(), mchprop2.getCovariances()(1, 1))); - CHECK_AND_FILL_FEATURE(pullPhi2, getPull(mftprop2.getPhi(), mftprop2.getCovariances()(2, 2), mchprop2.getPhi(), mchprop2.getCovariances()(2, 2))); + CHECK_AND_FILL_FEATURE(pullPhi2, getPull(0, mftprop2.getCovariances()(2, 2), std::remainder(mchprop2.getPhi() - mftprop2.getPhi(), o2::constants::math::TwoPI), mchprop2.getCovariances()(2, 2))); CHECK_AND_FILL_FEATURE(pullTgl2, getPull(mftprop2.getTgl(), mftprop2.getCovariances()(3, 3), mchprop2.getTgl(), mchprop2.getCovariances()(3, 3))); CHECK_AND_FILL_FEATURE(pullPt2, getPullPt(mftprop2, mchprop2)); CHECK_AND_FILL_FEATURE(pullR2, getPullR(mftprop2, mchprop2)); // Track residuals (absolute values) CHECK_AND_FILL_FEATURE(absDeltaX2, std::fabs(mchprop2.getX() - mftprop2.getX())); CHECK_AND_FILL_FEATURE(absDeltaY2, std::fabs(mchprop2.getY() - mftprop2.getY())); - CHECK_AND_FILL_FEATURE(absDeltaPhi2, std::fabs(mchprop2.getPhi() - mftprop2.getPhi())); + CHECK_AND_FILL_FEATURE(absDeltaPhi2, std::fabs(std::remainder(mchprop2.getPhi() - mftprop2.getPhi(), o2::constants::math::TwoPI))); CHECK_AND_FILL_FEATURE(absDeltaTgl2, std::fabs(mchprop2.getTgl() - mftprop2.getTgl())); CHECK_AND_FILL_FEATURE(absDeltaEta2, std::fabs(mchprop2.getEta() - mftprop2.getEta())); CHECK_AND_FILL_FEATURE(absDeltaPt2, std::fabs(mchprop2.getPt() - mftprop2.getPt())); @@ -588,7 +588,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(absDeltaPtRel2, std::fabs(getRelDifference(mftprop2.getPt(), mchprop2.getPt()))); CHECK_AND_FILL_FEATURE(absPullX2, std::fabs(getPull(mftprop2.getX(), mftprop2.getCovariances()(0, 0), mchprop2.getX(), mchprop2.getCovariances()(0, 0)))); CHECK_AND_FILL_FEATURE(absPullY2, std::fabs(getPull(mftprop2.getY(), mftprop2.getCovariances()(1, 1), mchprop2.getY(), mchprop2.getCovariances()(1, 1)))); - CHECK_AND_FILL_FEATURE(absPullPhi2, std::fabs(getPull(mftprop2.getPhi(), mftprop2.getCovariances()(2, 2), mchprop2.getPhi(), mchprop2.getCovariances()(2, 2)))); + CHECK_AND_FILL_FEATURE(absPullPhi2, std::fabs(getPull(0, mftprop2.getCovariances()(2, 2), std::remainder(mchprop2.getPhi() - mftprop2.getPhi(), o2::constants::math::TwoPI), mchprop2.getCovariances()(2, 2)))); CHECK_AND_FILL_FEATURE(absPullTgl2, std::fabs(getPull(mftprop2.getTgl(), mftprop2.getCovariances()(3, 3), mchprop2.getTgl(), mchprop2.getCovariances()(3, 3)))); CHECK_AND_FILL_FEATURE(absPullPt2, std::fabs(getPullPt(mftprop2, mchprop2))); CHECK_AND_FILL_FEATURE(absPullR2, std::fabs(getPullR(mftprop2, mchprop2))); diff --git a/PWGDQ/Tasks/qaMatching.cxx b/PWGDQ/Tasks/qaMatching.cxx index 4761706de1c..2842cded387 100644 --- a/PWGDQ/Tasks/qaMatching.cxx +++ b/PWGDQ/Tasks/qaMatching.cxx @@ -1383,6 +1383,7 @@ struct QaMatching { auto modelName = configMlOptions.modelNames[modelId]->value; auto scoreMin = configMlOptions.matchingScoreCuts[modelId]->value; auto matchingPlaneZ = configMlOptions.matchingPlaneZs[modelId]->value; + auto matchingPlane2Z = configMlOptions.matchingPlane2Zs[modelId]->value; auto extrapMethod = configMlOptions.matchingExtrapMethods[modelId]->value; if (label == "" || modelPath == "" || inputFeatures.empty() || modelName == "") @@ -1395,6 +1396,7 @@ struct QaMatching { matchingScoreCuts[label] = scoreMin; matchingPlanesZ[label] = matchingPlaneZ; + matchingPlane2Zs[label] = matchingPlane2Z; matchingExtrapMethod[label] = extrapMethod; matchMethodLabels.push_back(label); From 4c8eba8a516cfffccc792b83e885bcdd0bdbde2e Mon Sep 17 00:00:00 2001 From: Cornel de Villiers Date: Thu, 3 Dec 2026 15:50:32 +0100 Subject: [PATCH 6/6] Implemented comments' suggestions --- PWGDQ/Core/MuonMatchingMlResponse.h | 21 +++++++++++---------- PWGDQ/Tasks/qaMatching.cxx | 10 +++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/PWGDQ/Core/MuonMatchingMlResponse.h b/PWGDQ/Core/MuonMatchingMlResponse.h index 698658fa1e5..b5e214726e5 100644 --- a/PWGDQ/Core/MuonMatchingMlResponse.h +++ b/PWGDQ/Core/MuonMatchingMlResponse.h @@ -444,7 +444,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(sameSign, (mch.sign() == mft.sign()) ? 1 : 0); CHECK_AND_FILL_FEATURE(deltaX, mchprop.getX() - mftprop.getX()); CHECK_AND_FILL_FEATURE(deltaY, mchprop.getY() - mftprop.getY()); - CHECK_AND_FILL_FEATURE(deltaPhi, std::remainder(mchprop.getPhi() - mftprop.getPhi(), o2::constants::math::TwoPI)); + CHECK_AND_FILL_FEATURE(deltaPhi, o2::math_utils::toPMPiGend(mchprop.getPhi() - mftprop.getPhi())); CHECK_AND_FILL_FEATURE(deltaTgl, mchprop.getTgl() - mftprop.getTgl()); CHECK_AND_FILL_FEATURE(deltaEta, mchprop.getEta() - mftprop.getEta()); CHECK_AND_FILL_FEATURE(delta1Pt, mchprop.getInvQPt() - mftprop.getInvQPt()); @@ -456,7 +456,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(deltaPRel, getRelDifference(mftprop.getP(), mchprop.getP())); CHECK_AND_FILL_FEATURE(pullX, getPull(mftprop.getX(), mftprop.getCovariances()(0, 0), mchprop.getX(), mchprop.getCovariances()(0, 0))); CHECK_AND_FILL_FEATURE(pullY, getPull(mftprop.getY(), mftprop.getCovariances()(1, 1), mchprop.getY(), mchprop.getCovariances()(1, 1))); - CHECK_AND_FILL_FEATURE(pullPhi, getPull(0, mftprop.getCovariances()(2, 2), std::remainder(mchprop.getPhi() - mftprop.getPhi(), o2::constants::math::TwoPI), mchprop.getCovariances()(2, 2))); + CHECK_AND_FILL_FEATURE(pullPhi, getPull(0, mftprop.getCovariances()(2, 2), o2::math_utils::toPMPiGend(mchprop.getPhi() - mftprop.getPhi()), mchprop.getCovariances()(2, 2))); CHECK_AND_FILL_FEATURE(pullTgl, getPull(mftprop.getTgl(), mftprop.getCovariances()(3, 3), mchprop.getTgl(), mchprop.getCovariances()(3, 3))); /*dummy value*/ CHECK_AND_FILL_FEATURE(pullEta, 0); CHECK_AND_FILL_FEATURE(pullPt, getPullPt(mftprop, mchprop)); @@ -464,7 +464,7 @@ class MlResponseMFTMuonMatch : public MlResponse // Track residuals (absolute values) CHECK_AND_FILL_FEATURE(absDeltaX, std::fabs(mchprop.getX() - mftprop.getX())); CHECK_AND_FILL_FEATURE(absDeltaY, std::fabs(mchprop.getY() - mftprop.getY())); - CHECK_AND_FILL_FEATURE(absDeltaPhi, std::fabs(std::remainder(mchprop.getPhi() - mftprop.getPhi(), o2::constants::math::TwoPI))); + CHECK_AND_FILL_FEATURE(absDeltaPhi, std::fabs(o2::math_utils::toPMPiGend(mchprop.getPhi() - mftprop.getPhi()))); CHECK_AND_FILL_FEATURE(absDeltaTgl, std::fabs(mchprop.getTgl() - mftprop.getTgl())); CHECK_AND_FILL_FEATURE(absDeltaEta, std::fabs(mchprop.getEta() - mftprop.getEta())); CHECK_AND_FILL_FEATURE(absDeltaPt, std::fabs(mchprop.getPt() - mftprop.getPt())); @@ -474,7 +474,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(absDeltaPtRel, std::fabs(getRelDifference(mftprop.getPt(), mchprop.getPt()))); CHECK_AND_FILL_FEATURE(absPullX, std::fabs(getPull(mftprop.getX(), mftprop.getCovariances()(0, 0), mchprop.getX(), mchprop.getCovariances()(0, 0)))); CHECK_AND_FILL_FEATURE(absPullY, std::fabs(getPull(mftprop.getY(), mftprop.getCovariances()(1, 1), mchprop.getY(), mchprop.getCovariances()(1, 1)))); - CHECK_AND_FILL_FEATURE(absPullPhi, std::fabs(getPull(0, mftprop.getCovariances()(2, 2), std::remainder(mchprop.getPhi() - mftprop.getPhi(), o2::constants::math::TwoPI), mchprop.getCovariances()(2, 2)))); + CHECK_AND_FILL_FEATURE(absPullPhi, std::fabs(getPull(0, mftprop.getCovariances()(2, 2), o2::math_utils::toPMPiGend(mchprop.getPhi() - mftprop.getPhi()), mchprop.getCovariances()(2, 2)))); CHECK_AND_FILL_FEATURE(absPullTgl, std::fabs(getPull(mftprop.getTgl(), mftprop.getCovariances()(3, 3), mchprop.getTgl(), mchprop.getCovariances()(3, 3)))); /*dummy value*/ CHECK_AND_FILL_FEATURE(absPullEta, 0); CHECK_AND_FILL_FEATURE(absPullPt, std::fabs(getPullPt(mftprop, mchprop))); @@ -559,7 +559,7 @@ class MlResponseMFTMuonMatch : public MlResponse // Track residuals CHECK_AND_FILL_FEATURE(deltaX2, mchprop2.getX() - mftprop2.getX()); CHECK_AND_FILL_FEATURE(deltaY2, mchprop2.getY() - mftprop2.getY()); - CHECK_AND_FILL_FEATURE(deltaPhi2, std::remainder(mchprop2.getPhi() - mftprop2.getPhi(), o2::constants::math::TwoPI)); + CHECK_AND_FILL_FEATURE(deltaPhi2, o2::math_utils::toPMPiGend(mchprop2.getPhi() - mftprop2.getPhi())); CHECK_AND_FILL_FEATURE(deltaTgl2, mchprop2.getTgl() - mftprop2.getTgl()); CHECK_AND_FILL_FEATURE(deltaEta2, mchprop2.getEta() - mftprop2.getEta()); CHECK_AND_FILL_FEATURE(delta1Pt2, mchprop2.getInvQPt() - mftprop2.getInvQPt()); @@ -571,14 +571,14 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(deltaPRel2, getRelDifference(mftprop2.getP(), mchprop2.getP())); CHECK_AND_FILL_FEATURE(pullX2, getPull(mftprop2.getX(), mftprop2.getCovariances()(0, 0), mchprop2.getX(), mchprop2.getCovariances()(0, 0))); CHECK_AND_FILL_FEATURE(pullY2, getPull(mftprop2.getY(), mftprop2.getCovariances()(1, 1), mchprop2.getY(), mchprop2.getCovariances()(1, 1))); - CHECK_AND_FILL_FEATURE(pullPhi2, getPull(0, mftprop2.getCovariances()(2, 2), std::remainder(mchprop2.getPhi() - mftprop2.getPhi(), o2::constants::math::TwoPI), mchprop2.getCovariances()(2, 2))); + CHECK_AND_FILL_FEATURE(pullPhi2, getPull(0, mftprop2.getCovariances()(2, 2), o2::math_utils::toPMPiGend(mchprop2.getPhi() - mftprop2.getPhi()), mchprop2.getCovariances()(2, 2))); CHECK_AND_FILL_FEATURE(pullTgl2, getPull(mftprop2.getTgl(), mftprop2.getCovariances()(3, 3), mchprop2.getTgl(), mchprop2.getCovariances()(3, 3))); CHECK_AND_FILL_FEATURE(pullPt2, getPullPt(mftprop2, mchprop2)); CHECK_AND_FILL_FEATURE(pullR2, getPullR(mftprop2, mchprop2)); // Track residuals (absolute values) CHECK_AND_FILL_FEATURE(absDeltaX2, std::fabs(mchprop2.getX() - mftprop2.getX())); CHECK_AND_FILL_FEATURE(absDeltaY2, std::fabs(mchprop2.getY() - mftprop2.getY())); - CHECK_AND_FILL_FEATURE(absDeltaPhi2, std::fabs(std::remainder(mchprop2.getPhi() - mftprop2.getPhi(), o2::constants::math::TwoPI))); + CHECK_AND_FILL_FEATURE(absDeltaPhi2, std::fabs(o2::math_utils::toPMPiGend(mchprop2.getPhi() - mftprop2.getPhi()))); CHECK_AND_FILL_FEATURE(absDeltaTgl2, std::fabs(mchprop2.getTgl() - mftprop2.getTgl())); CHECK_AND_FILL_FEATURE(absDeltaEta2, std::fabs(mchprop2.getEta() - mftprop2.getEta())); CHECK_AND_FILL_FEATURE(absDeltaPt2, std::fabs(mchprop2.getPt() - mftprop2.getPt())); @@ -588,7 +588,7 @@ class MlResponseMFTMuonMatch : public MlResponse CHECK_AND_FILL_FEATURE(absDeltaPtRel2, std::fabs(getRelDifference(mftprop2.getPt(), mchprop2.getPt()))); CHECK_AND_FILL_FEATURE(absPullX2, std::fabs(getPull(mftprop2.getX(), mftprop2.getCovariances()(0, 0), mchprop2.getX(), mchprop2.getCovariances()(0, 0)))); CHECK_AND_FILL_FEATURE(absPullY2, std::fabs(getPull(mftprop2.getY(), mftprop2.getCovariances()(1, 1), mchprop2.getY(), mchprop2.getCovariances()(1, 1)))); - CHECK_AND_FILL_FEATURE(absPullPhi2, std::fabs(getPull(0, mftprop2.getCovariances()(2, 2), std::remainder(mchprop2.getPhi() - mftprop2.getPhi(), o2::constants::math::TwoPI), mchprop2.getCovariances()(2, 2)))); + CHECK_AND_FILL_FEATURE(absPullPhi2, std::fabs(getPull(0, mftprop2.getCovariances()(2, 2), o2::math_utils::toPMPiGend(mchprop2.getPhi() - mftprop2.getPhi()), mchprop2.getCovariances()(2, 2)))); CHECK_AND_FILL_FEATURE(absPullTgl2, std::fabs(getPull(mftprop2.getTgl(), mftprop2.getCovariances()(3, 3), mchprop2.getTgl(), mchprop2.getCovariances()(3, 3)))); CHECK_AND_FILL_FEATURE(absPullPt2, std::fabs(getPullPt(mftprop2, mchprop2))); CHECK_AND_FILL_FEATURE(absPullR2, std::fabs(getPullR(mftprop2, mchprop2))); @@ -596,7 +596,7 @@ class MlResponseMFTMuonMatch : public MlResponse return inputFeature; } - /// Method to get the input features vector needed for ML inference + /// Method to get the input features vector needed for ML inference when matching using only 1 plane /// \param track is the single track, \param collision is the collision /// \return inputFeatures vector template @@ -604,6 +604,7 @@ class MlResponseMFTMuonMatch : public MlResponse { std::vector inputFeatures; for (const auto& idx : MlResponse::mCachedIndices) { + // returnFeature expects 2 matching planes, so we pass the same mftprop and mchprop twice, since when matching with only 1 plane, the second plane is not used float inputFeature = returnFeature(idx, muon, mft, mch, mftprop, mchprop, mftprop, mchprop, collision); inputFeatures.emplace_back(inputFeature); } @@ -870,7 +871,7 @@ class MlResponseMFTMuonMatch : public MlResponse FILL_MAP_MFTMUON_MATCH(absDeltaPtRel2)}; } - uint8_t mCachedIndexBinning; // index correspondance between configurable and available input features + uint8_t mCachedIndexBinning = 0; // index correspondance between configurable and available input features }; } // namespace o2::analysis diff --git a/PWGDQ/Tasks/qaMatching.cxx b/PWGDQ/Tasks/qaMatching.cxx index 2842cded387..26233acb31e 100644 --- a/PWGDQ/Tasks/qaMatching.cxx +++ b/PWGDQ/Tasks/qaMatching.cxx @@ -492,7 +492,7 @@ struct QaMatching { Configurable cfgMlModelMatchingPlane2Z3{"cfgMlModelMatchingPlane2Z3", 0.f, "Z position of the second matching plane, default value of 0.f runs single plane matching"}; Configurable cfgMlModelMatchingPlane2Z4{"cfgMlModelMatchingPlane2Z4", 0.f, "Z position of the second matching plane, default value of 0.f runs single plane matching"}; Configurable cfgMlModelMatchingPlane2Z5{"cfgMlModelMatchingPlane2Z5", 0.f, "Z position of the second matching plane, default value of 0.f runs single plane matching"}; - std::array*, MlModelsNum> matchingPlane2Zs{ + std::array*, MlModelsNum> matchingPlanes2Z{ &cfgMlModelMatchingPlane2Z1, &cfgMlModelMatchingPlane2Z2, &cfgMlModelMatchingPlane2Z3, &cfgMlModelMatchingPlane2Z4, &cfgMlModelMatchingPlane2Z5}; Configurable cfgMlMatchingExtrapMethod1{"cfgMlMatchingExtrapMethod1", 0, "Method for MCH track extrapolation to maching plane"}; @@ -510,7 +510,7 @@ struct QaMatching { std::map> matchingMlResponses; std::map matchingChi2Functions; std::map matchingPlanesZ; - std::map matchingPlane2Zs; + std::map matchingPlanes2Z; std::map matchingScoreCuts; std::map matchingExtrapMethod; @@ -1383,7 +1383,7 @@ struct QaMatching { auto modelName = configMlOptions.modelNames[modelId]->value; auto scoreMin = configMlOptions.matchingScoreCuts[modelId]->value; auto matchingPlaneZ = configMlOptions.matchingPlaneZs[modelId]->value; - auto matchingPlane2Z = configMlOptions.matchingPlane2Zs[modelId]->value; + auto matchingPlane2Z = configMlOptions.matchingPlanes2Z[modelId]->value; auto extrapMethod = configMlOptions.matchingExtrapMethods[modelId]->value; if (label == "" || modelPath == "" || inputFeatures.empty() || modelName == "") @@ -1396,7 +1396,7 @@ struct QaMatching { matchingScoreCuts[label] = scoreMin; matchingPlanesZ[label] = matchingPlaneZ; - matchingPlane2Zs[label] = matchingPlane2Z; + matchingPlanes2Z[label] = matchingPlane2Z; matchingExtrapMethod[label] = extrapMethod; matchMethodLabels.push_back(label); @@ -3419,7 +3419,7 @@ struct QaMatching { auto mftTrackProp2 = mftTrackProp; auto mchTrackProp2 = mchTrackProp; auto matchingPlaneZ = matchingPlanesZ[label]; - auto matchingPlane2Z = matchingPlane2Zs[label]; + auto matchingPlane2Z = matchingPlanes2Z[label]; if (matchingPlaneZ < 0.) { mftTrackProp = propagateToZMft(mftTrackProp, matchingPlaneZ);