Skip to content

Commit 2ee6b4a

Browse files
committed
Added pz_MC column for mc table
1 parent d9c6e06 commit 2ee6b4a

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

PWGLF/DataModel/LFKinkDecayTables.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ DECLARE_SOA_COLUMN(NSigmaTOFKa, nSigmaTOFKa, float); //! Number of sigmas for th
5858
DECLARE_SOA_COLUMN(MothPdgCode, mothPdgCode, int); //! PDG code of the Sigma daughter
5959
DECLARE_SOA_COLUMN(DaugPdgCode, daugPdgCode, int); //! PDG code of the kink daughter
6060
DECLARE_SOA_COLUMN(PtMC, ptMC, float); //! pT of the candidate in MC
61+
DECLARE_SOA_COLUMN(PzMC, pzMC, float); //! pZ of the candidate in MC
6162
DECLARE_SOA_COLUMN(MassMC, massMC, float); //! Invariant mass of the candidate in MC
6263
DECLARE_SOA_COLUMN(DecayRadiusMC, decayRadiusMC, float); //! Decay radius of the candidate in MC
6364
DECLARE_SOA_COLUMN(CollisionIdCheck, collisionIdCheck, bool); //! Check if mcDaughter collision ID matches the reconstructed collision ID
@@ -153,7 +154,7 @@ DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
153154
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa,
154155
kinkcand::NSigmaTOFPi, kinkcand::NSigmaTOFPr, kinkcand::NSigmaTOFKa,
155156
kinkcand::MothPdgCode, kinkcand::DaugPdgCode,
156-
kinkcand::PtMC, kinkcand::MassMC, kinkcand::DecayRadiusMC, kinkcand::CollisionIdCheck);
157+
kinkcand::PtMC, kinkcand::PzMC, kinkcand::MassMC, kinkcand::DecayRadiusMC, kinkcand::CollisionIdCheck);
157158

158159
} // namespace o2::aod
159160

PWGLF/TableProducer/Strangeness/sigmaminustask.cxx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ struct sigmaminustask {
112112
const AxisSpec alphaAPAxis{200, -1.0, 1.0, "#alpha_{AP}"};
113113
const AxisSpec qtAPAxis{200, 0.0, 0.5, "q_{T,AP}"};
114114
const AxisSpec cosPointingAngleAxis{100, -1.0, 1.0, "Cos#theta_{PA}"};
115+
const AxisSpec kinkAngleAxis{100, 0, 100, "Kink angle (deg)"};
115116

116117
const AxisSpec ptResolutionAxis{100, -1.0, 1.0, "(#it{p}_{T}^{rec} - #it{p}_{T}^{gen}) / #it{p}_{T}^{gen}"};
117118
const AxisSpec massResolutionAxis{100, -0.5, 0.5, "(m_{rec} - m_{gen}) / m_{gen}"};
@@ -137,6 +138,7 @@ struct sigmaminustask {
137138
// Add MC histograms if needed
138139
rSigmaMinus.add("h2MassPtMCRec", "h2MassPtMCRec", {HistType::kTH2F, {ptAxis, sigmaMassAxis}});
139140
rSigmaMinus.add("h2MassPtMCGen", "h2MassPtMCGen", {HistType::kTH2F, {ptAxis, sigmaMassAxis}});
141+
rSigmaMinus.add("h2KinkAngleVsPtMothMC", "h2KinkAngleVsPtMothMC", {HistType::kTH2F, {ptAxis, kinkAngleAxis}});
140142

141143
rSigmaMinus.add("h2MassResolution", "h2MassResolution", {HistType::kTH2F, {ptAxis, massResolutionAxis}});
142144
rSigmaMinus.add("h2PtResolution", "h2PtResolution", {HistType::kTH2F, {ptAxis, ptResolutionAxis}});
@@ -229,6 +231,14 @@ struct sigmaminustask {
229231
return (std::inner_product(momMother.begin(), momMother.end(), vMother.begin(), 0.f)) / (pMother * vMotherNorm);
230232
}
231233

234+
float kinkAngle(std::array<float, 3> const& p_moth, std::array<float, 3> const& p_daug)
235+
{
236+
float dot_product = std::inner_product(p_moth.begin(), p_moth.end(), p_daug.begin(), 0.0f);
237+
float mag_moth = std::hypot(p_moth[0], p_moth[1], p_moth[2]);
238+
float mag_daug = std::hypot(p_daug[0], p_daug[1], p_daug[2]);
239+
return std::acos(dot_product / (mag_moth * mag_daug)) * 180.0 / M_PI;
240+
}
241+
232242
void processData(CollisionsFull::iterator const& collision, aod::KinkCands const& KinkCands, TracksFull const&)
233243
{
234244
if (std::abs(collision.posZ()) > cutzvertex || !collision.sel8()) {
@@ -326,6 +336,7 @@ struct sigmaminustask {
326336

327337
float MotherMassMC = std::sqrt(piMother.e() * piMother.e() - piMother.p() * piMother.p());
328338
float MotherpTMC = piMother.pt();
339+
float MotherpZMC = piMother.pz();
329340
float deltaXMother = mcTrackPiDau.vx() - piMother.vx();
330341
float deltaYMother = mcTrackPiDau.vy() - piMother.vy();
331342
float decayRadiusMC = std::sqrt(deltaXMother * deltaXMother + deltaYMother * deltaYMother);
@@ -373,7 +384,7 @@ struct sigmaminustask {
373384
dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa(),
374385
dauTrack.tofNSigmaPi(), dauTrack.tofNSigmaPr(), dauTrack.tofNSigmaKa(),
375386
mcTrackSigma.pdgCode(), mcTrackPiDau.pdgCode(),
376-
MotherpTMC, MotherMassMC, decayRadiusMC, mcCollisionIdCheck);
387+
MotherpTMC, MotherpZMC, MotherMassMC, decayRadiusMC, mcCollisionIdCheck);
377388
}
378389
}
379390
} // MC association and selection
@@ -412,7 +423,9 @@ struct sigmaminustask {
412423
float mcMass = std::sqrt(mcPart.e() * mcPart.e() - mcPart.p() * mcPart.p());
413424
float mcDecayRadius = std::sqrt((secVtx[0] - mcPart.vx()) * (secVtx[0] - mcPart.vx()) + (secVtx[1] - mcPart.vy()) * (secVtx[1] - mcPart.vy()));
414425
int sigmaSign = mcPart.pdgCode() > 0 ? 1 : -1; // Determine the sign of the Sigma
426+
float kinkAngleMC = kinkAngle({mcPart.px(), mcPart.py(), mcPart.pz()}, momDaug);
415427
rSigmaMinus.fill(HIST("h2MassPtMCGen"), sigmaSign * mcPart.pt(), mcMass);
428+
rSigmaMinus.fill(HIST("h2KinkAngleVsPtMothMC"), sigmaSign * mcPart.pt(), kinkAngleMC);
416429

417430
// Fill output table with non reconstructed MC candidates
418431
if (fillOutputTree) {
@@ -424,7 +437,7 @@ struct sigmaminustask {
424437
-999, -999, -999,
425438
-999, -999, -999,
426439
mcPart.pdgCode(), daug_pdg,
427-
mcPart.pt(), mcMass, mcDecayRadius, false);
440+
mcPart.pt(), mcPart.pz(), mcMass, mcDecayRadius, false);
428441
}
429442
}
430443
}

0 commit comments

Comments
 (0)