Skip to content

Commit f778389

Browse files
committed
Added eta cut as a configurable; added column for check on McCollisionId of reconstructed vs Mc daughter particle
1 parent 4ea4e98 commit f778389

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

PWGLF/DataModel/LFKinkDecayTables.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ DECLARE_SOA_COLUMN(DaugPdgCode, daugPdgCode, int); //! PDG code of the kin
6060
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
6161
DECLARE_SOA_COLUMN(MassMC, massMC, float); //! Invariant mass of the candidate in MC
6262
DECLARE_SOA_COLUMN(DecayRadiusMC, decayRadiusMC, float); //! Decay radius of the candidate in MC
63+
DECLARE_SOA_COLUMN(CollisionIdCheck, collisionIdCheck, bool); //! Check if mcDaughter collision ID matches the reconstructed collision ID
6364

6465
// DYNAMIC COLUMNS
6566

@@ -152,7 +153,7 @@ DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
152153
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa,
153154
kinkcand::NSigmaTOFPi, kinkcand::NSigmaTOFPr, kinkcand::NSigmaTOFKa,
154155
kinkcand::MothPdgCode, kinkcand::DaugPdgCode,
155-
kinkcand::PtMC, kinkcand::MassMC, kinkcand::DecayRadiusMC);
156+
kinkcand::PtMC, kinkcand::MassMC, kinkcand::DecayRadiusMC, kinkcand::CollisionIdCheck);
156157

157158
} // namespace o2::aod
158159

PWGLF/Tasks/Strangeness/sigmaminustask.cxx

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ struct sigmaminustask {
4545
// Configurable for event selection
4646
Configurable<float> cutzvertex{"cutzvertex", 10.0f, "Accepted z-vertex range (cm)"};
4747
Configurable<float> cutNSigmaPi{"cutNSigmaPi", 4, "NSigmaTPCPion"};
48+
Configurable<float> cutEtaMotherMC{"cutEtaMotherMC", 1.0f, "Eta cut for mother Sigma in MC"};
4849

4950
Configurable<bool> fillOutputTree{"fillOutputTree", true, "If true, fill the output tree with Kink candidates"};
5051

@@ -92,7 +93,7 @@ struct sigmaminustask {
9293
for (const auto& kinkCand : KinkCands) {
9394
auto dauTrack = kinkCand.trackDaug_as<TracksFull>();
9495

95-
if (abs(dauTrack.tpcNSigmaPi()) > cutNSigmaPi) {
96+
if (std::abs(dauTrack.tpcNSigmaPi()) > cutNSigmaPi) {
9697
continue;
9798
}
9899

@@ -131,7 +132,7 @@ struct sigmaminustask {
131132
LOG(info) << "Skipping kink candidate with opposite sign daughter and mother: " << kinkCand.globalIndex();
132133
continue; // Skip if the daughter has the opposite sign as the mother
133134
}
134-
if (abs(dauTrack.tpcNSigmaPi()) > cutNSigmaPi) {
135+
if (std::abs(dauTrack.tpcNSigmaPi()) > cutNSigmaPi) {
135136
continue;
136137
}
137138

@@ -161,7 +162,13 @@ struct sigmaminustask {
161162

162163
float MotherMassMC = std::sqrt(piMother.e() * piMother.e() - piMother.p() * piMother.p());
163164
float MotherpTMC = piMother.pt();
164-
float decayRadiusMC = std::sqrt(mcTrackPiDau.vx() * mcTrackPiDau.vx() + mcTrackPiDau.vy() * mcTrackPiDau.vy());
165+
float deltaXMother = mcTrackPiDau.vx() - piMother.vx();
166+
float deltaYMother = mcTrackPiDau.vy() - piMother.vy();
167+
float decayRadiusMC = std::sqrt(deltaXMother * deltaXMother + deltaYMother * deltaYMother);
168+
169+
// Check coherence of MCcollision Id for daughter MCparticle and reconstructed collision
170+
auto mcCollision = mcTrackPiDau.template mcCollision_as<aod::McCollisions>();
171+
bool mcCollisionIdCheck = collision.mcCollisionId() == mcCollision.globalIndex();
165172

166173
rSigmaMinus.fill(HIST("h2MassPtMCRec"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
167174
if (mcTrackSigma.pdgCode() > 0) {
@@ -182,7 +189,7 @@ struct sigmaminustask {
182189
dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa(),
183190
dauTrack.tofNSigmaPi(), dauTrack.tofNSigmaPr(), dauTrack.tofNSigmaKa(),
184191
mcTrackSigma.pdgCode(), mcTrackPiDau.pdgCode(),
185-
MotherpTMC, MotherMassMC, decayRadiusMC);
192+
MotherpTMC, MotherMassMC, decayRadiusMC, mcCollisionIdCheck);
186193
}
187194
}
188195
} // MC association and selection
@@ -191,7 +198,7 @@ struct sigmaminustask {
191198

192199
// Loop over all generated particles to fill MC histograms
193200
for (const auto& mcPart : particlesMC) {
194-
if (std::abs(mcPart.pdgCode()) != 3112 || std::abs(mcPart.y()) > 1.0) { // only sigma mothers and rapidity cut
201+
if (std::abs(mcPart.pdgCode()) != 3112 || std::abs(mcPart.y()) > cutEtaMotherMC) { // only sigma mothers and rapidity cut
195202
continue;
196203
}
197204
if (!mcPart.has_daughters()) {
@@ -214,7 +221,7 @@ struct sigmaminustask {
214221
continue; // Skip if no pi/proton daughter found
215222
}
216223
float mcMass = std::sqrt(mcPart.e() * mcPart.e() - mcPart.p() * mcPart.p());
217-
float mcDecayRadius = std::sqrt(secVtx[0] * secVtx[0] + secVtx[1] * secVtx[1]);
224+
float mcDecayRadius = std::sqrt((secVtx[0] - mcPart.vx()) * (secVtx[0] - mcPart.vx()) + (secVtx[1] - mcPart.vy()) * (secVtx[1] - mcPart.vy()));
218225
int sigmaSign = mcPart.pdgCode() > 0 ? 1 : -1; // Determine the sign of the Sigma
219226
rSigmaMinus.fill(HIST("h2MassPtMCGen"), sigmaSign * mcPart.pt(), mcMass);
220227

@@ -228,7 +235,7 @@ struct sigmaminustask {
228235
-999, -999, -999,
229236
-999, -999, -999,
230237
mcPart.pdgCode(), daug_pdg,
231-
mcPart.pt(), mcMass, mcDecayRadius);
238+
mcPart.pt(), mcMass, mcDecayRadius, false);
232239
}
233240
}
234241
}

0 commit comments

Comments
 (0)