@@ -921,6 +921,19 @@ struct NucleitpcPbPb {
921921 histos.fill (HIST (" dcaXY" ), ptReco, track.dcaXY ());
922922 histos.fill (HIST (" dcaZ" ), ptReco, track.dcaZ ());
923923 histos.fill (HIST (" Tpcsignal" ), getRigidity (track) * track.sign (), track.tpcSignal ());
924+ // Delta Pt histograms
925+ float ptGen = matchedMCParticle.pt ();
926+ float deltaPt = ptReco - ptGen;
927+
928+ if (pdg == -particlePdgCodes.at (i)) { // Anti-particle
929+ histomc.fill (HIST (" histDeltaPtVsPtGenanti" ), ptReco, deltaPt);
930+ histomc.fill (HIST (" histPIDtrackanti" ), ptReco, track.pidForTracking ());
931+ }
932+
933+ if (pdg == particlePdgCodes.at (i) && decayType == 0 ) { // Particle
934+ histomc.fill (HIST (" histDeltaPtVsPtGen" ), ptReco, deltaPt);
935+ histomc.fill (HIST (" histPIDtrack" ), ptReco, track.pidForTracking ());
936+ }
924937
925938 // Fill mass²/z² for MC - separate for particles and anti-particles
926939 if (track.hasTOF ()) {
@@ -940,7 +953,7 @@ struct NucleitpcPbPb {
940953 }
941954 }
942955
943- if (!skipHe4) {
956+ if (!skipHe4 && decayType == 0 ) {
944957 if (pdg > 0 ) {
945958 histomc.fill (HIST (" hMassVsPtMC" ), ptReco, massSquareOverChargeSquare, collision.centFT0C ());
946959 } else {
@@ -949,19 +962,6 @@ struct NucleitpcPbPb {
949962 }
950963 }
951964 }
952-
953- // Delta Pt histograms
954- float ptGen = matchedMCParticle.pt ();
955- float deltaPt = ptReco - ptGen;
956-
957- if (pdg == -particlePdgCodes.at (i)) { // Anti-particle
958- histomc.fill (HIST (" histDeltaPtVsPtGenanti" ), ptReco, deltaPt);
959- histomc.fill (HIST (" histPIDtrackanti" ), ptReco, track.pidForTracking ());
960- }
961- if (pdg == particlePdgCodes.at (i)) { // Particle
962- histomc.fill (HIST (" histDeltaPtVsPtGen" ), ptReco, deltaPt);
963- histomc.fill (HIST (" histPIDtrack" ), ptReco, track.pidForTracking ());
964- }
965965 }
966966 }
967967 break ; // Found the matching collision, break out of collision loop
0 commit comments