Skip to content

Commit d6cbe97

Browse files
committed
Corrected table filling for MC reconstructed particles, added mc decay radius column, added few resolution histograms
1 parent 097b52c commit d6cbe97

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

PWGLF/DataModel/LFKinkDecayTables.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ DECLARE_SOA_COLUMN(MothPdgCode, mothPdgCode, int); //! PDG code of the Sigma d
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
6161
DECLARE_SOA_COLUMN(MassMC, massMC, float); //! Invariant mass of the candidate in MC
62-
62+
DECLARE_SOA_COLUMN(DecayRadiusMC, decayRadiusMC, float); //! Decay radius of the candidate in MC
6363

6464
// DYNAMIC COLUMNS
6565

@@ -152,7 +152,7 @@ DECLARE_SOA_TABLE(SlimKinkCandsMC, "AOD", "SLIMKINKCANDSMC",
152152
kinkcand::NSigmaTPCPi, kinkcand::NSigmaTPCPr, kinkcand::NSigmaTPCKa,
153153
kinkcand::NSigmaTOFPi, kinkcand::NSigmaTOFPr, kinkcand::NSigmaTOFKa,
154154
kinkcand::MothPdgCode, kinkcand::DaugPdgCode,
155-
kinkcand::PtMC, kinkcand::MassMC);
155+
kinkcand::PtMC, kinkcand::MassMC, kinkcand::DecayRadiusMC);
156156

157157

158158

PWGLF/Tasks/Strangeness/sigmaminustask.cxx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,16 @@ struct sigmaminustask {
5353
void init(InitContext const&)
5454
{
5555
// Axes
56-
const AxisSpec ptAxis{50, -10, 10, "#it{p}_{T} (GeV/#it{c})"};
56+
const AxisSpec ptAxis{100, -10, 10, "#it{p}_{T} (GeV/#it{c})"};
5757
const AxisSpec nSigmaPiAxis{100, -5, 5, "n#sigma_{#pi}"};
5858
const AxisSpec sigmaMassAxis{100, 1.1, 1.4, "m (GeV/#it{c}^{2})"};
5959
const AxisSpec xiMassAxis{100, 1.2, 1.6, "m_{#Xi} (GeV/#it{c}^{2})"};
6060
const AxisSpec pdgAxis{10001, -5000, 5000, "PDG code"};
6161
const AxisSpec vertexZAxis{100, -15., 15., "vrtx_{Z} [cm]"};
6262

63+
const AxisSpec ptResolutionAxis{100, -0.5, 0.5, "#it{p}_{T}^{rec} - #it{p}_{T}^{gen} (GeV/#it{c})"};
64+
const AxisSpec massResolutionAxis{100, -0.1, 0.1, "m_{rec} - m_{gen} (GeV/#it{c}^{2})"};
65+
6366
// Event selection
6467
rEventSelection.add("hVertexZRec", "hVertexZRec", {HistType::kTH1F, {vertexZAxis}});
6568
// Sigma-minus reconstruction
@@ -71,6 +74,11 @@ struct sigmaminustask {
7174
// Add MC histograms if needed
7275
rSigmaMinus.add("h2MassPtMCRec", "h2MassPtMCRec", {HistType::kTH2F, {ptAxis, sigmaMassAxis}});
7376
rSigmaMinus.add("h2MassPtMCGen", "h2MassPtMCGen", {HistType::kTH2F, {ptAxis, sigmaMassAxis}});
77+
78+
rSigmaMinus.add("h2MassResolution_minus", "h2MassResolution_minus", {HistType::kTH2F, {sigmaMassAxis, massResolutionAxis}});
79+
rSigmaMinus.add("h2PtResolution_minus", "h2PtResolution_minus", {HistType::kTH2F, {ptAxis, ptResolutionAxis}});
80+
rSigmaMinus.add("h2MassResolution_plus", "h2MassResolution_plus", {HistType::kTH2F, {sigmaMassAxis, massResolutionAxis}});
81+
rSigmaMinus.add("h2PtResolution_plus", "h2PtResolution_plus", {HistType::kTH2F, {ptAxis, ptResolutionAxis}});
7482
}
7583
}
7684

@@ -151,7 +159,19 @@ struct sigmaminustask {
151159
if (std::abs(mcTrackPiDau.pdgCode()) != 211 && std::abs(mcTrackPiDau.pdgCode()) != 2212) {
152160
continue;
153161
}
162+
163+
float MotherMassMC = std::sqrt(piMother.e() * piMother.e() - piMother.p() * piMother.p());
164+
float MotherpTMC = piMother.pt();
165+
float decayRadiusMC = std::sqrt(mcTrackPiDau.vx() * mcTrackPiDau.vx() + mcTrackPiDau.vy() * mcTrackPiDau.vy());
166+
154167
rSigmaMinus.fill(HIST("h2MassPtMCRec"), kinkCand.mothSign() * kinkCand.ptMoth(), kinkCand.mSigmaMinus());
168+
if (mcTrackSigma.pdgCode() > 0) {
169+
rSigmaMinus.fill(HIST("h2MassResolution_plus"), kinkCand.mSigmaMinus(), kinkCand.mSigmaMinus() - MotherMassMC);
170+
rSigmaMinus.fill(HIST("h2PtResolution_plus"), kinkCand.ptMoth(), kinkCand.ptMoth() - MotherpTMC);
171+
} else {
172+
rSigmaMinus.fill(HIST("h2MassResolution_minus"), kinkCand.mSigmaMinus(), kinkCand.mSigmaMinus() - MotherMassMC);
173+
rSigmaMinus.fill(HIST("h2PtResolution_minus"), kinkCand.ptMoth(), kinkCand.ptMoth() - MotherpTMC);
174+
}
155175

156176
// fill the output table with Mc information
157177
if (fillOutputTree) {
@@ -163,7 +183,7 @@ struct sigmaminustask {
163183
dauTrack.tpcNSigmaPi(), dauTrack.tpcNSigmaPr(), dauTrack.tpcNSigmaKa(),
164184
dauTrack.tofNSigmaPi(), dauTrack.tofNSigmaPr(), dauTrack.tofNSigmaKa(),
165185
mcTrackSigma.pdgCode(), mcTrackPiDau.pdgCode(),
166-
kinkCand.ptMoth(), kinkCand.mSigmaMinus());
186+
MotherpTMC, MotherMassMC, decayRadiusMC);
167187
}
168188
}
169189
} // MC association and selection
@@ -195,6 +215,7 @@ struct sigmaminustask {
195215
continue; // Skip if no pi/proton daughter found
196216
}
197217
float mcMass = std::sqrt(mcPart.e() * mcPart.e() - mcPart.p() * mcPart.p());
218+
float mcDecayRadius = std::sqrt(secVtx[0] * secVtx[0] + secVtx[1] * secVtx[1]);
198219
int sigmaSign = mcPart.pdgCode() > 0 ? 1 : -1; // Determine the sign of the Sigma
199220
rSigmaMinus.fill(HIST("h2MassPtMCGen"), sigmaSign * mcPart.pt(), mcMass);
200221

@@ -208,7 +229,7 @@ struct sigmaminustask {
208229
-999, -999, -999,
209230
-999, -999, -999,
210231
mcPart.pdgCode(), daug_pdg,
211-
mcPart.pt(), mcMass);
232+
mcPart.pt(), mcMass, mcDecayRadius);
212233
}
213234
}
214235
}

0 commit comments

Comments
 (0)