Skip to content

Commit 52c6eed

Browse files
[PWGLF] added invariant mass histograms for offline purity estimation, added selections on the tpc chi2 variable (#12884)
1 parent 6d517d2 commit 52c6eed

File tree

1 file changed

+84
-5
lines changed

1 file changed

+84
-5
lines changed

PWGLF/TableProducer/Nuspex/LFTreeCreatorClusterStudies.cxx

Lines changed: 84 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,10 @@ struct LfTreeCreatorClusterStudies {
179179
Configurable<float> track_nClsItsMin{"track_NclsItsMin", 0.f, "Minimum number of ITS clusters for the V0 daughters"};
180180
Configurable<float> track_nClsTpcMin{"track_NclsTpcMin", 100.f, "Minimum number of TPC clusters for the V0 daughters"};
181181
Configurable<float> track_nClsTpcMaxShared{"track_NclsTpcMaxShared", 5.f, "Maximum number of shared TPC clusters for the V0 daughters"};
182+
Configurable<float> track_etaMax{"etaMax", 0.8f, "Maximum eta"};
183+
Configurable<float> track_tpcChi2Min{"track_tpcChi2Min", 0.5f, "Minimum TPC chi2 per cluster"};
182184

183185
// Configurable<float> v0setting_etaMaxV0{"etaMaxV0", 0.8f, "Maximum eta for the V0 daughters"};
184-
Configurable<float> v0setting_etaMaxV0dau{"etaMaxV0dau", 0.8f, "Maximum eta for the V0 daughters"};
185186
Configurable<float> v0setting_dcaV0daughters{"v0setting_dcaV0daughters", 0.5f, "DCA between the V0 daughters"};
186187
Configurable<float> v0setting_dcaV0toPV{"v0setting_dcaV0fromPV", 1.f, "DCA of the V0 to the primary vertex"};
187188
Configurable<float> v0setting_dcaDaughtersToPV{"v0setting_dcaDaughtersToPV", 1.f, "DCA of the daughters to the primary vertex"};
@@ -232,7 +233,8 @@ struct LfTreeCreatorClusterStudies {
232233
{"he3_selections", "He3 track selection; selection; counts", {HistType::kTH1F, {{He3Selections::kHe3All, -0.5, static_cast<double>(He3Selections::kHe3All) - 0.5}}}},
233234
{"v0_type", "Selected V0; particle; counts", {HistType::kTH1F, {{V0Type::V0TypeAll, -0.5, static_cast<double>(V0Type::V0TypeAll) - 0.5}}}},
234235
{"radiusV0", "Decay radius (xy) V0; radius (cm); counts", {HistType::kTH1F, {{100, 0., 100.}}}},
235-
{"massLambda", "#Lambda invariant mass; signed #it{p} (GeV/#it{c}); m (GeV/#it{c}^{2})", {HistType::kTH2F, {{100, -5.f, 5.f}, {50, 1.08f, 1.18f}}}},
236+
{"massLambda", "#Lambda invariant mass; signed #it{p} (GeV/#it{c}); m (GeV/#it{c}^{2})", {HistType::kTH2F, {{100, -5.f, 5.f}, {200, 1.08f, 1.18f}}}},
237+
{"massLambdaMc", "#Lambda invariant mass (MC); signed #it{p} (GeV/#it{c}); m (GeV/#it{c}^{2})", {HistType::kTH2F, {{100, -5.f, 5.f}, {200, 1.08f, 1.18f}}}},
236238
{"Lambda_vs_K0s", "Mass #Lambda vs K^{0}_s; m_{K^{0}_{s}} (GeV/#it{c}^{2}); m_{#Lambda} (GeV/#it{c}^{2})", {HistType::kTH2F, {{50, 0.f, 1.f}, {70, 0.6f, 2.f}}}},
237239
{"armenteros_plot_before_selections", "Armenteros-Podolanski plot; #alpha; q_{T} (GeV/#it{c})", {HistType::kTH2F, {{100, -1.f, 1.f}, {100, 0.f, 0.3f}}}},
238240
{"armenteros_plot", "Armenteros-Podolanski plot; #alpha; q_{T} (GeV/#it{c})", {HistType::kTH2F, {{100, -1.f, 1.f}, {100, 0.f, 0.3f}}}},
@@ -243,7 +245,8 @@ struct LfTreeCreatorClusterStudies {
243245
{"photon_conversion_position_layer", "Photon conversion position (ITS layers); x (cm); y (cm)", {HistType::kTH2F, {{100, -5.f, 5.f}, {100, -5.f, 5.f}}}},
244246
{"casc_dca_daughter_pairs", "DCA (xy) for cascade daughter pairs; DCAxy (cm); counts", {HistType::kTH1F, {{100, -0.1, 0.1}}}},
245247
{"Xi_vs_Omega", "Mass Xi vs Omega; mass Omega (GeV/#it{c}^{2}); mass Xi (GeV/#it{c}^{2})", {HistType::kTH2F, {{50, 1.f, 2.f}, {50, 1.f, 2.f}}}},
246-
{"massOmega", "Mass #Omega; signed #it{p}_{T} (GeV/#it{c}); mass (GeV/#it{c}^{2})", {HistType::kTH2F, {{100, -5.f, 5.f}, {100, 1.62f, 1.72f}}}},
248+
{"massOmega", "Mass #Omega; signed #it{p}_{T} (GeV/#it{c}); mass (GeV/#it{c}^{2})", {HistType::kTH2F, {{100, -5.f, 5.f}, {400, 1.62f, 1.72f}}}},
249+
{"massOmegaMc", "Mass #Omega (MC); signed #it{p}_{T} (GeV/#it{c}); mass (GeV/#it{c}^{2})", {HistType::kTH2F, {{100, -5.f, 5.f}, {400, 1.62f, 1.72f}}}},
247250
{"massOmegaWithBkg", "Mass Omega with Background; mass Omega (GeV/#it{c}^{2}); counts", {HistType::kTH1F, {{100, 1.62f, 1.72f}}}},
248251
{"nSigmaTPCEl", "nSigma TPC Electron; signed #it{p} (GeV/#it{c}); n#sigma_{TPC} e", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {60, -2.0f, 2.0f}}}},
249252
{"nSigmaTPCPi", "nSigma TPC Pion; signed #it{p} (GeV/#it{c}); n#sigma_{TPC} #pi", {HistType::kTH2F, {{100, -5.0f, 5.0f}, {60, -3.0f, 3.0f}}}},
@@ -389,14 +392,16 @@ struct LfTreeCreatorClusterStudies {
389392
template <typename T>
390393
bool qualityTrackSelection(const T& track)
391394
{
392-
if (std::abs(track.eta()) > v0setting_etaMaxV0dau) {
395+
if (std::abs(track.eta()) > track_etaMax) {
393396
return false;
394397
}
395398
if (track.itsNCls() < track_nClsItsMin ||
396399
track.tpcNClsFound() < track_nClsTpcMin ||
397400
track.tpcNClsCrossedRows() < track_nClsTpcMin ||
398401
track.tpcNClsCrossedRows() < 0.8 * track.tpcNClsFindable() ||
399-
track.tpcNClsShared() > track_nClsTpcMaxShared) {
402+
track.tpcNClsShared() > track_nClsTpcMaxShared ||
403+
track.tpcChi2NCl() < track_tpcChi2Min ||
404+
track.tpcChi2NCl() > 4.0f) {
400405
return false;
401406
}
402407
return true;
@@ -556,6 +561,64 @@ struct LfTreeCreatorClusterStudies {
556561
return massV0;
557562
}
558563

564+
template <typename McPart>
565+
void fillMcHistogramsV0(const float massLambda, const float massAntiLambda,
566+
const std::array<float, 3>& momMother,
567+
const McPart& posDaughter, const McPart& negDaughter)
568+
{
569+
if ((std::abs(posDaughter.pdgCode()) != 2212 && std::abs(posDaughter.pdgCode()) != 211) ||
570+
(std::abs(negDaughter.pdgCode()) != 2212 && std::abs(negDaughter.pdgCode()) != 211)) {
571+
return;
572+
}
573+
574+
int motherPdgCode = 0;
575+
for (const auto& posMother : posDaughter.template mothers_as<aod::McParticles>()) {
576+
for (const auto& negMother : negDaughter.template mothers_as<aod::McParticles>()) {
577+
if (negMother.globalIndex() == posMother.globalIndex()) {
578+
motherPdgCode = posMother.pdgCode();
579+
}
580+
}
581+
}
582+
583+
if (motherPdgCode == 3122) {
584+
m_hAnalysis.fill(HIST("massLambdaMc"), std::hypot(momMother[0], momMother[1], momMother[2]), massLambda);
585+
} else if (motherPdgCode == -3122) {
586+
m_hAnalysis.fill(HIST("massLambdaMc"), std::hypot(momMother[0], momMother[1], momMother[2]) * -1.f, massAntiLambda);
587+
}
588+
}
589+
590+
template <typename McPart>
591+
void fillMcHistogramsCascade(const float massOmega,
592+
const std::array<float, 3>& momMother,
593+
const McPart& bachelorDaughter, const McPart& posV0Daughter)
594+
{
595+
McPart v0Daughter;
596+
for (const auto& iterV0Daughter : posV0Daughter.template mothers_as<aod::McParticles>()) {
597+
if (std::abs(iterV0Daughter.pdgCode()) != 3122) {
598+
continue;
599+
}
600+
v0Daughter = iterV0Daughter;
601+
}
602+
if (std::abs(bachelorDaughter.pdgCode()) != 321) {
603+
return;
604+
}
605+
606+
int motherPdgCode = 0;
607+
for (const auto& bachelorMother : bachelorDaughter.template mothers_as<aod::McParticles>()) {
608+
for (const auto& v0Mother : v0Daughter.template mothers_as<aod::McParticles>()) {
609+
if (v0Mother.globalIndex() == bachelorMother.globalIndex()) {
610+
motherPdgCode = bachelorMother.pdgCode();
611+
}
612+
}
613+
}
614+
615+
if (motherPdgCode == 3334) {
616+
m_hAnalysis.fill(HIST("massOmegaMc"), std::hypot(momMother[0], momMother[1], momMother[2]), massOmega);
617+
} else if (motherPdgCode == -3334) {
618+
m_hAnalysis.fill(HIST("massOmegaMc"), std::hypot(momMother[0], momMother[1], momMother[2]) * -1.f, massOmega);
619+
}
620+
}
621+
559622
template <bool isMC = false>
560623
void fillTable(const Candidate& candidate)
561624
{
@@ -587,9 +650,16 @@ struct LfTreeCreatorClusterStudies {
587650
template <typename T>
588651
bool nucleiTrackSelection(const T& track)
589652
{
653+
if (std::abs(track.eta()) > track_etaMax) {
654+
return false;
655+
}
590656
if (track.tpcNClsFound() < 90) {
591657
return false;
592658
}
659+
if ((track.tpcChi2NCl() > 4.0f) ||
660+
(track.tpcChi2NCl() < track_tpcChi2Min)) {
661+
return false;
662+
}
593663
return true;
594664
}
595665

@@ -837,6 +907,8 @@ struct LfTreeCreatorClusterStudies {
837907

838908
candidatePos.pdgCode = posMcParticle.pdgCode();
839909
candidateNeg.pdgCode = negMcParticle.pdgCode();
910+
911+
fillMcHistogramsV0(massLambdaV0, massAntiLambdaV0, momMother, posMcParticle, negMcParticle);
840912
}
841913

842914
fillTable<isMC>(candidatePos);
@@ -929,6 +1001,13 @@ struct LfTreeCreatorClusterStudies {
9291001

9301002
m_ClusterStudiesTableMc(
9311003
mcParticle.pdgCode()); // pdgCode_K
1004+
1005+
auto posV0Daughter = v0Track.posTrack_as<Track>();
1006+
if (!posV0Daughter.has_mcParticle()) {
1007+
return;
1008+
}
1009+
auto mcPosParticleV0 = posV0Daughter.mcParticle();
1010+
fillMcHistogramsCascade(massOmega, momMother, mcParticle, mcPosParticleV0);
9321011
}
9331012

9341013
m_hAnalysis.fill(HIST("isPositive"), bachelorTrack.p() > 0);

0 commit comments

Comments
 (0)