Skip to content

Commit 4ce00af

Browse files
committed
feat(hypernuclei): Add process code for MC analysis
1 parent ac2da13 commit 4ce00af

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

PWGLF/DataModel/LFHypernucleiTables.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ DECLARE_SOA_TABLE(MCHypCands, "AOD", "MCHYPCANDS",
150150
hyperrec::IsSignal,
151151
hyperrec::IsRecoMCCollision,
152152
hyperrec::IsSurvEvSel,
153-
hyperrec::IsTwoBodyDecay);
153+
hyperrec::IsTwoBodyDecay, aod::mcparticle::StatusCode);
154154

155155
DECLARE_SOA_TABLE(DataHypCandsWColl, "AOD", "HYPCANDSWCOLL",
156156
o2::soa::Index<>,

PWGLF/TableProducer/Nuspex/hyperRecoTask.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,7 @@ struct hyperRecoTask {
798798
hypCand.clusterSizeITSHe3, hypCand.clusterSizeITSPi, hypCand.flags, trackedHypClSize,
799799
chargeFactor * hypCand.genPt(), hypCand.genPhi(), hypCand.genEta(), hypCand.genPtHe3(),
800800
hypCand.gDecVtx[0], hypCand.gDecVtx[1], hypCand.gDecVtx[2],
801-
hypCand.isReco, hypCand.isFakeHeOnITSLayer, hypCand.isSignal, hypCand.isRecoMCCollision, hypCand.isSurvEvSelection, 1);
801+
hypCand.isReco, hypCand.isFakeHeOnITSLayer, hypCand.isSignal, hypCand.isRecoMCCollision, hypCand.isSurvEvSelection, 1, 0);
802802
}
803803

804804
// now we fill only the signal candidates that were not reconstructed
@@ -811,12 +811,15 @@ struct hyperRecoTask {
811811
std::array<float, 3> momMother = {mcPart.px(), mcPart.py(), mcPart.pz()};
812812
std::array<float, 3> momHe3;
813813
bool isHeFound = false;
814+
int mcProcess = {0};
814815
for (auto& mcDaught : mcPart.daughters_as<aod::McParticles>()) {
815816
if (std::abs(mcDaught.pdgCode()) == heDauPdg) {
816817
secVtx = {mcDaught.vx(), mcDaught.vy(), mcDaught.vz()};
817818
momHe3 = {mcDaught.px(), mcDaught.py(), mcDaught.pz()};
818819
isHeFound = true;
819-
break;
820+
}
821+
if (mcDaught.pdgCode() != PDG_t::kElectron) { // we do not care about delta electrons
822+
mcProcess = mcDaught.getProcess();
820823
}
821824
}
822825
if (mcPart.pdgCode() > 0) {
@@ -870,7 +873,7 @@ struct hyperRecoTask {
870873
-1, -1, -1, false,
871874
chargeFactor * hypCand.genPt(), hypCand.genPhi(), hypCand.genEta(), hypCand.genPtHe3(),
872875
hypCand.gDecVtx[0], hypCand.gDecVtx[1], hypCand.gDecVtx[2],
873-
hypCand.isReco, -1, hypCand.isSignal, hypCand.isRecoMCCollision, hypCand.isSurvEvSelection, isHeFound);
876+
hypCand.isReco, -1, hypCand.isSignal, hypCand.isRecoMCCollision, hypCand.isSurvEvSelection, isHeFound, mcProcess);
874877
}
875878
}
876879
PROCESS_SWITCH(hyperRecoTask, processMC, "MC analysis", false);

0 commit comments

Comments
 (0)