@@ -702,29 +702,31 @@ struct JetHadronRecoil {
702702 float dphip = RecoDecay::constrainAngle (jetTag.phi () - phiTT);
703703 double dRp = getWTAaxisDifference (jetTag, particles);
704704
705- if (jetTag.has_matchedJetGeo ()) {
705+ if (jetTag.has_matchedJetGeo () && jetTag. has_matchedJetPt () ) {
706706 for (const auto & jetBase : jetTag.template matchedJetGeo_as <std::decay_t <T>>()) {
707- if (jetBase.pt () > pTHatMaxMCD * pTHat) {
708- if (outlierRejectEvent) {
709- return ;
710- } else {
711- continue ;
707+ if (jetTag.template matchedJetGeo_first_as <std::decay_t <T>>().globalIndex () == jetTag.template matchedJetPt_first_as <std::decay_t <T>>().globalIndex ()) {
708+ if (jetBase.pt () > pTHatMaxMCD * pTHat) {
709+ if (outlierRejectEvent) {
710+ return ;
711+ } else {
712+ continue ;
713+ }
712714 }
713- }
714715
715- float dphi = RecoDecay::constrainAngle (jetBase.phi () - phiTT);
716- double dR = getWTAaxisDifference (jetBase, tracks);
717- registry.fill (HIST (" hPhiMatched" ), dphi, dphip, weight);
718- registry.fill (HIST (" hPhiMatched2d" ), jetTag.phi (), jetTag.pt (), weight);
719- registry.fill (HIST (" hPhiResolution" ), jetTag.pt (), dphip - dphi, weight);
720- registry.fill (HIST (" hFullMatching" ), jetBase.pt () - (rho * jetBase.area ()), jetTag.pt (), dphi, dphip, dR, dRp, weight);
721- if ((std::abs (dphip - o2::constants::math::PI) < 0.6 )) {
722- registry.fill (HIST (" hPtMatched1d" ), jetTag.pt (), weight);
723- registry.fill (HIST (" hDeltaRMatched1d" ), dRp, weight);
724- registry.fill (HIST (" hPtMatched" ), jetBase.pt () - (rho * jetBase.area ()), jetTag.pt (), weight);
725- registry.fill (HIST (" hPtResolution" ), jetTag.pt (), (jetTag.pt () - (jetBase.pt () - (rho * jetBase.area ()))) / jetTag.pt (), weight);
726- registry.fill (HIST (" hDeltaRMatched" ), dR, dRp, weight);
727- registry.fill (HIST (" hDeltaRResolution" ), jetTag.pt (), dRp - dR, weight);
716+ float dphi = RecoDecay::constrainAngle (jetBase.phi () - phiTT);
717+ double dR = getWTAaxisDifference (jetBase, tracks);
718+ registry.fill (HIST (" hPhiMatched" ), dphi, dphip, weight);
719+ registry.fill (HIST (" hPhiMatched2d" ), jetTag.phi (), jetTag.pt (), weight);
720+ registry.fill (HIST (" hPhiResolution" ), jetTag.pt (), dphip - dphi, weight);
721+ registry.fill (HIST (" hFullMatching" ), jetBase.pt () - (rho * jetBase.area ()), jetTag.pt (), dphi, dphip, dR, dRp, weight);
722+ if ((std::abs (dphip - o2::constants::math::PI) < 0.6 )) {
723+ registry.fill (HIST (" hPtMatched1d" ), jetTag.pt (), weight);
724+ registry.fill (HIST (" hDeltaRMatched1d" ), dRp, weight);
725+ registry.fill (HIST (" hPtMatched" ), jetBase.pt () - (rho * jetBase.area ()), jetTag.pt (), weight);
726+ registry.fill (HIST (" hPtResolution" ), jetTag.pt (), (jetTag.pt () - (jetBase.pt () - (rho * jetBase.area ()))) / jetTag.pt (), weight);
727+ registry.fill (HIST (" hDeltaRMatched" ), dR, dRp, weight);
728+ registry.fill (HIST (" hDeltaRResolution" ), jetTag.pt (), dRp - dR, weight);
729+ }
728730 }
729731 }
730732 }
0 commit comments