Skip to content

Commit 097b52c

Browse files
committed
Added NSigmaTOF columns to the tables; modified MC function to include also sigma plus decaying into protons+pi0
1 parent 714ceca commit 097b52c

File tree

2 files changed

+34
-18
lines changed

2 files changed

+34
-18
lines changed

PWGLF/DataModel/LFKinkDecayTables.h

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,15 @@ DECLARE_SOA_COLUMN(DcaKinkTopo, dcaKinkTopo, float); //! DCA of the kink topolog
5050
DECLARE_SOA_COLUMN(NSigmaTPCPi, nSigmaTPCPi, float); //! Number of sigmas for the pion candidate from Sigma kink in TPC
5151
DECLARE_SOA_COLUMN(NSigmaTPCPr, nSigmaTPCPr, float); //! Number of sigmas for the proton candidate from Sigma kink in TPC
5252
DECLARE_SOA_COLUMN(NSigmaTPCKa, nSigmaTPCKa, float); //! Number of sigmas for the kaon candidate from Sigma kink in TPC
53+
DECLARE_SOA_COLUMN(NSigmaTOFPi, nSigmaTOFPi, float); //! Number of sigmas for the pion candidate from Sigma kink in TOF
54+
DECLARE_SOA_COLUMN(NSigmaTOFPr, nSigmaTOFPr, float); //! Number of sigmas for the proton candidate from Sigma kink in TOF
55+
DECLARE_SOA_COLUMN(NSigmaTOFKa, nSigmaTOFKa, float); //! Number of sigmas for the kaon candidate from Sigma kink in TOF
5356

5457
// MC Columns
55-
DECLARE_SOA_COLUMN(MothPdgCode, mothPdgCode, int); //! PDG code of the Sigma daughter
56-
DECLARE_SOA_COLUMN(DaugPdgCode, daugPdgCode, int); //! PDG code of the kink daughter
57-
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
58-
DECLARE_SOA_COLUMN(MassMC, massMC, float); //! Invariant mass of the candidate in MC
58+
DECLARE_SOA_COLUMN(MothPdgCode, mothPdgCode, int); //! PDG code of the Sigma daughter
59+
DECLARE_SOA_COLUMN(DaugPdgCode, daugPdgCode, int); //! PDG code of the kink daughter
60+
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
61+
DECLARE_SOA_COLUMN(MassMC, massMC, float); //! Invariant mass of the candidate in MC
5962

6063

6164
// DYNAMIC COLUMNS
@@ -137,7 +140,8 @@ DECLARE_SOA_TABLE(SlimKinkCands, "AOD", "SLIMKINKCANDS",
137140
kinkcand::PxDaug, kinkcand::PyDaug, kinkcand::PzDaug,
138141
kinkcand::DcaMothPv, kinkcand::DcaDaugPv, kinkcand::DcaKinkTopo,
139142
kinkcand::MothSign,
140-
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa);
143+
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa,
144+
kinkcand::NSigmaTOFPi, kinkcand::NSigmaTOFPr, kinkcand::NSigmaTOFKa);
141145

142146
DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
143147
kinkcand::XDecVtx, kinkcand::YDecVtx, kinkcand::ZDecVtx,
@@ -146,6 +150,7 @@ DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
146150
kinkcand::DcaMothPv, kinkcand::DcaDaugPv, kinkcand::DcaKinkTopo,
147151
kinkcand::MothSign,
148152
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa,
153+
kinkcand::NSigmaTOFPi, kinkcand::NSigmaTOFPr, kinkcand::NSigmaTOFKa,
149154
kinkcand::MothPdgCode, kinkcand::DaugPdgCode,
150155
kinkcand::PtMC, kinkcand::MassMC);
151156

PWGLF/Tasks/Strangeness/sigmaminustask.cxx

Lines changed: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ using namespace o2;
2626
using namespace o2::framework;
2727
using namespace o2::framework::expressions;
2828

29-
using TracksFull = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU, aod::pidTPCFullPi, aod::pidTPCFullPr, aod::pidTPCFullKa>;
29+
using TracksFull = soa::Join<aod::TracksIU, aod::TracksExtra, aod::TracksCovIU,
30+
aod::pidTPCFullPi, aod::pidTPCFullPr, aod::pidTPCFullKa,
31+
aod::pidTOFFullPi, aod::pidTOFFullPr, aod::pidTOFFullKa>;
3032
using CollisionsFull = soa::Join<aod::Collisions, aod::EvSel>;
3133
using CollisionsFullMC = soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSel>;
3234

@@ -95,7 +97,9 @@ struct sigmaminustask {
9597
kinkCand.pxMoth(), kinkCand.pyMoth(), kinkCand.pzMoth(),
9698
kinkCand.pxDaug(), kinkCand.pyDaug(), kinkCand.pzDaug(),
9799
kinkCand.dcaMothPv(), kinkCand.dcaDaugPv(), kinkCand.dcaKinkTopo(),
98-
kinkCand.mothSign(), dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa());
100+
kinkCand.mothSign(),
101+
dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa(),
102+
dauTrack.tofNSigmaPi(), dauTrack.tofNSigmaPr(), dauTrack.tofNSigmaKa());
99103
}
100104

101105
}
@@ -141,7 +145,10 @@ struct sigmaminustask {
141145
if (piMother.globalIndex() != mcTrackSigma.globalIndex()) {
142146
continue;
143147
}
144-
if (std::abs(mcTrackSigma.pdgCode()) != 3112 || std::abs(mcTrackPiDau.pdgCode()) != 211) {
148+
if (std::abs(mcTrackSigma.pdgCode()) != 3112) {
149+
continue;
150+
}
151+
if (std::abs(mcTrackPiDau.pdgCode()) != 211 && std::abs(mcTrackPiDau.pdgCode()) != 2212) {
145152
continue;
146153
}
147154
rSigmaMinus.fill(HIST("h2MassPtMCRec"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
@@ -154,6 +161,7 @@ struct sigmaminustask {
154161
kinkCand.dcaMothPv(), kinkCand.dcaDaugPv(), kinkCand.dcaKinkTopo(),
155162
kinkCand.mothSign(),
156163
dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa(),
164+
dauTrack.tofNSigmaPi(), dauTrack.tofNSigmaPr(), dauTrack.tofNSigmaKa(),
157165
mcTrackSigma.pdgCode(), mcTrackPiDau.pdgCode(),
158166
kinkCand.ptMoth(), kinkCand.mSigmaMinus());
159167
}
@@ -164,39 +172,42 @@ struct sigmaminustask {
164172

165173
// Loop over all generated particles to fill MC histograms
166174
for (const auto& mcPart : particlesMC) {
167-
if (std::abs(mcPart.pdgCode()) != 3112 || std::abs(mcPart.y()) > 0.5) {
175+
if (std::abs(mcPart.pdgCode()) != 3112 || std::abs(mcPart.y()) > 1.0) { // only sigma mothers and rapidity cut
168176
continue;
169177
}
170178
if (!mcPart.has_daughters()) {
171179
continue; // Skip if no daughters
172180
}
173181
bool hasSigmaDaughter = false;
182+
int daug_pdg = 0;
174183
std::array<float, 3> secVtx;
175184
std::array<float, 3> momDaug;
176185
for (const auto& daughter : mcPart.daughters_as<aod::McParticles>()) {
177-
if (std::abs(daughter.pdgCode()) == 211) { // Pi PDG code
186+
if (std::abs(daughter.pdgCode()) == 211 || std::abs(daughter.pdgCode()) == 2212) { // Pi or proton daughter
178187
hasSigmaDaughter = true;
179188
secVtx = {daughter.vx(), daughter.vy(), daughter.vz()};
180189
momDaug = {daughter.px(), daughter.py(), daughter.pz()};
181-
break; // Found a pi daughter, exit loop
190+
daug_pdg = daughter.pdgCode();
191+
break; // Found a daughter, exit loop
182192
}
183193
}
184194
if (!hasSigmaDaughter) {
185-
continue; // Skip if no pi daughter found
195+
continue; // Skip if no pi/proton daughter found
186196
}
187197
float mcMass = std::sqrt(mcPart.e() * mcPart.e() - mcPart.p() * mcPart.p());
188198
int sigmaSign = mcPart.pdgCode() > 0 ? 1 : -1; // Determine the sign of the Sigma
189199
rSigmaMinus.fill(HIST("h2MassPtMCGen"), sigmaSign * mcPart.pt(), mcMass);
190200

191201
// Fill output table with non reconstructed MC candidates
192202
if (fillOutputTree) {
193-
outputDataTableMC(mcPart.vx(), mcPart.vy(), mcPart.vz(),
194-
mcPart.px(), mcPart.py(), mcPart.pz(),
195-
momDaug[0], momDaug[1], momDaug[2],
196-
-999, -999, -999, // DCA values not reconstructed
203+
outputDataTableMC(-999, -999, -999,
204+
-999, -999, -999,
205+
-999, -999, -999,
206+
-999, -999, -999,
197207
sigmaSign,
198-
-999, -999, -999, // NSigmaTPC values not reconstructed
199-
mcPart.pdgCode(), 211,
208+
-999, -999, -999,
209+
-999, -999, -999,
210+
mcPart.pdgCode(), daug_pdg,
200211
mcPart.pt(), mcMass);
201212
}
202213
}

0 commit comments

Comments
 (0)