Skip to content

Commit 534f3c5

Browse files
authored
Update nucleitpcpbpb.cxx
1 parent bca55af commit 534f3c5

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

PWGLF/Tasks/Nuspex/nucleitpcpbpb.cxx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,13 @@ struct NucleitpcPbPb {
393393
continue;
394394
histomc.fill(HIST("histEtagen"), mcParticle.eta());
395395
float ptScaled = mcParticle.pt();
396-
if (pdgCode == 1000020030) {
396+
if (pdgCode == particlePdgCodes.at(5)) {
397397
histomc.fill(HIST("histPtgenHe3"), ptScaled);
398-
} else if (pdgCode == -1000020030) {
398+
} else if (pdgCode == -particlePdgCodes.at(5)) {
399399
histomc.fill(HIST("histPtgenAntiHe3"), ptScaled);
400-
} else if (pdgCode == 1000020040) {
400+
} else if (pdgCode == particlePdgCodes.at(6)) {
401401
histomc.fill(HIST("histPtgenHe4"), ptScaled);
402-
} else if (pdgCode == -1000020040) {
402+
} else if (pdgCode == -particlePdgCodes.at(6)) {
403403
histomc.fill(HIST("histPtgenAntiHe4"), ptScaled);
404404
}
405405
} // mc track loop generated
@@ -527,12 +527,12 @@ struct NucleitpcPbPb {
527527
float ptReco;
528528
setTrackParCov(track, mTrackParCov);
529529
mTrackParCov.setPID(track.pidForTracking());
530-
ptReco = (std::abs(pdg) == 1000020030 || std::abs(pdg) == 1000020040) ? 2 * mTrackParCov.getPt() : mTrackParCov.getPt();
531-
if (pdg == -1000020040 && cfgmccorrectionhe4Require) {
530+
ptReco = (std::abs(pdg) == particlePdgCodes.at(5) || std::abs(pdg) == particlePdgCodes.at(6)) ? 2 * mTrackParCov.getPt() : mTrackParCov.getPt();
531+
if (pdg == -particlePdgCodes.at(6) && cfgmccorrectionhe4Require) {
532532
ptReco = ptReco + 0.00765 + 0.503791 * std::exp(-1.10517 * ptReco);
533533
}
534534

535-
if (pdg == -1000020030 && cfgmccorrectionhe4Require) {
535+
if (pdg == -particlePdgCodes.at(5) && cfgmccorrectionhe4Require) {
536536
int pidGuess = track.pidForTracking();
537537
if (pidGuess == 6) {
538538
ptReco = ptReco - 0.464215 + 0.195771 * ptReco - 0.0183111 * ptReco * ptReco;
@@ -542,20 +542,20 @@ struct NucleitpcPbPb {
542542
float ptGen = matchedMCParticle.pt();
543543
float deltaPt = ptReco - ptGen;
544544

545-
if (pdg == -1000020030) {
545+
if (pdg == -particlePdgCodes.at(5)) {
546546
histomc.fill(HIST("histDeltaPtVsPtGen"), ptReco, deltaPt);
547547
histomc.fill(HIST("histPIDtrack"), ptReco, track.pidForTracking());
548548
}
549-
if (pdg == -1000020040) {
549+
if (pdg == -particlePdgCodes.at(6)) {
550550
histomc.fill(HIST("histDeltaPtVsPtGenHe4"), ptReco, deltaPt);
551551
}
552-
if (pdg == 1000020030) {
552+
if (pdg == particlePdgCodes.at(5)) {
553553
histomc.fill(HIST("histPtRecoHe3"), ptReco);
554-
} else if (pdg == -1000020030) {
554+
} else if (pdg == -particlePdgCodes.at(5)) {
555555
histomc.fill(HIST("histPtRecoAntiHe3"), ptReco);
556-
} else if (pdg == 1000020040) {
556+
} else if (pdg == particlePdgCodes.at(6)) {
557557
histomc.fill(HIST("histPtRecoHe4"), ptReco);
558-
} else if (pdg == -1000020040) {
558+
} else if (pdg == -particlePdgCodes.at(6)) {
559559
histomc.fill(HIST("histPtRecoAntiHe4"), ptReco);
560560
}
561561
} // Track loop

0 commit comments

Comments
 (0)