Skip to content

Commit 88fbe9a

Browse files
[PWGCF] FemtoUniverse -- Improve K0Short histogramming. (#16222)
1 parent d0a27ab commit 88fbe9a

1 file changed

Lines changed: 33 additions & 26 deletions

File tree

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Helicity.cxx

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ struct FemtoUniversePairTaskTrackV0Helicity {
195195
Configurable<float> confLimitHel4{"confLimitHel4", -1.0, "Lowest value of the helicity angle"};
196196
ConfigurableAxis confInvMassMotherpTBinsHel{"confInvMassMotherpTBinsHel", {5, 0, 5}, "pT binning in the pT vs. InvMassMother plot for helicity"};
197197
ConfigurableAxis confInvMassMotherBinsHel{"confInvMassMotherBinsHel", {1000, 0.8, 1.4}, "InvMassMother binning in the pT vs. InvMassMother plot for helicity"};
198+
Configurable<bool> isRealK0Short{"isRealK0Short", true, "If true, fill invariant mass for real K0Short; if false, fill invariant mass as if dealing with Lambda (needed for estimation of K0Short fraction in the Lambda sample)"};
198199
ConfigurableAxis confInvMassK0Short{"confInvMassK0Short", {1000, 0.2, 0.8}, "Invariant mass binning for K0 Short"}; // o2-linter: disable=lowerCamelCase (consistency with generally accepted particle name)
199200
} helicityconfigs;
200201

@@ -330,10 +331,6 @@ struct FemtoUniversePairTaskTrackV0Helicity {
330331
thetaRegistry.add("Theta/Mother/Data/hInvMassLambdaHel2", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {helicityconfigs.confInvMassMotherpTBinsHel, helicityconfigs.confInvMassMotherBinsHel});
331332
thetaRegistry.add("Theta/Mother/Data/hInvMassLambdaHel3", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {helicityconfigs.confInvMassMotherpTBinsHel, helicityconfigs.confInvMassMotherBinsHel});
332333
thetaRegistry.add("Theta/Mother/Data/hInvMassLambdaHel4", " ; p_{T} (GeV/#it{c}); M_{#Lambda};", kTH2F, {helicityconfigs.confInvMassMotherpTBinsHel, helicityconfigs.confInvMassMotherBinsHel});
333-
thetaRegistry.add("Theta/Mother/Data/hInvMassK0ShortHel1", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
334-
thetaRegistry.add("Theta/Mother/Data/hInvMassK0ShortHel2", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
335-
thetaRegistry.add("Theta/Mother/Data/hInvMassK0ShortHel3", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
336-
thetaRegistry.add("Theta/Mother/Data/hInvMassK0ShortHel4", " ; M_{K^{0}_{S}}; ;", kTH1F, {helicityconfigs.confInvMassK0Short});
337334
thetaRegistry.add("Theta/Mother/MCReco/hInvMassLambdaMC", " ; M_{#Lambda}; ;", kTH1F, {helicityconfigs.confInvMassMotherBinsHel});
338335
thetaRegistry.add("Theta/Mother/MCReco/hInvMassLambdaMCHel1", " ; M_{#Lambda}; ;", kTH1F, {helicityconfigs.confInvMassMotherBinsHel});
339336
thetaRegistry.add("Theta/Mother/MCReco/hInvMassLambdaMCHel2", " ; M_{#Lambda}; ;", kTH1F, {helicityconfigs.confInvMassMotherBinsHel});
@@ -496,7 +493,6 @@ struct FemtoUniversePairTaskTrackV0Helicity {
496493
auto negChildMass = pdg->Mass(V0configs.confPDGCodeNegChild);
497494
auto posChildBoosted = FemtoUniverseMath::boostPRF<decltype(posChild)>(posChild, posChildMass, negChild, negChildMass);
498495
auto cosineTheta = (posChildBoosted.Px() * part.px() + posChildBoosted.Py() * part.py() + posChildBoosted.Pz() * part.pz()) / (posChildBoosted.P() * part.p());
499-
auto invMassK0Short = TMath::Sqrt(TMath::Power(TMath::Sqrt(posChild.p() * posChild.p() + pdg->Mass(V0configs.confPDGCodePosChild) * pdg->Mass(V0configs.confPDGCodePosChild)) + TMath::Sqrt(negChild.p() * negChild.p() + pdg->Mass(V0configs.confPDGCodeNegChild) * pdg->Mass(V0configs.confPDGCodeNegChild)), 2) - TMath::Power(posChild.p() + negChild.p(), 2)); // "fake" K0Short invariant mass to estimate their fraction in the Lambda sample
500496

501497
trackHistoPartTwo.fillQA<false, true>(part);
502498
posChildHistos.fillQA<false, true>(posChild);
@@ -512,19 +508,14 @@ struct FemtoUniversePairTaskTrackV0Helicity {
512508
thetaRegistry.fill(HIST("Theta/NegativeChild/hThetaEta"), negChild.eta(), cosineTheta);
513509
thetaRegistry.fill(HIST("Theta/NegativeChild/hThetaPhi"), negChild.phi(), cosineTheta);
514510

515-
if (cosineTheta <= helicityconfigs.confLimitHel0 && cosineTheta >= helicityconfigs.confLimitHel1) {
511+
if (cosineTheta <= helicityconfigs.confLimitHel0 && cosineTheta >= helicityconfigs.confLimitHel1)
516512
thetaRegistry.fill(HIST("Theta/Mother/Data/hInvMassLambdaHel1"), part.pt(), part.mLambda());
517-
thetaRegistry.fill(HIST("Theta/Mother/Data/hInvMassK0ShortHel1"), invMassK0Short);
518-
} else if (cosineTheta < helicityconfigs.confLimitHel1 && cosineTheta >= helicityconfigs.confLimitHel2) {
513+
else if (cosineTheta < helicityconfigs.confLimitHel1 && cosineTheta >= helicityconfigs.confLimitHel2)
519514
thetaRegistry.fill(HIST("Theta/Mother/Data/hInvMassLambdaHel2"), part.pt(), part.mLambda());
520-
thetaRegistry.fill(HIST("Theta/Mother/Data/hInvMassK0ShortHel2"), invMassK0Short);
521-
} else if (cosineTheta < helicityconfigs.confLimitHel2 && cosineTheta >= helicityconfigs.confLimitHel3) {
515+
else if (cosineTheta < helicityconfigs.confLimitHel2 && cosineTheta >= helicityconfigs.confLimitHel3)
522516
thetaRegistry.fill(HIST("Theta/Mother/Data/hInvMassLambdaHel3"), part.pt(), part.mLambda());
523-
thetaRegistry.fill(HIST("Theta/Mother/Data/hInvMassK0ShortHel3"), invMassK0Short);
524-
} else if (cosineTheta < helicityconfigs.confLimitHel3 && cosineTheta >= helicityconfigs.confLimitHel4) {
517+
else if (cosineTheta < helicityconfigs.confLimitHel3 && cosineTheta >= helicityconfigs.confLimitHel4)
525518
thetaRegistry.fill(HIST("Theta/Mother/Data/hInvMassLambdaHel4"), part.pt(), part.mLambda());
526-
thetaRegistry.fill(HIST("Theta/Mother/Data/hInvMassK0ShortHel4"), invMassK0Short);
527-
}
528519

529520
/// Histogramming for MC Reco to calculate fraction of K0Short in the Lambda sample for each helicity bin
530521
if constexpr (confIsMC) {
@@ -535,25 +526,41 @@ struct FemtoUniversePairTaskTrackV0Helicity {
535526
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMC"), part.mKaon());
536527

537528
if (cosineTheta <= helicityconfigs.confLimitHel0 && cosineTheta >= helicityconfigs.confLimitHel1) {
538-
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
529+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0) {
539530
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassLambdaMCHel1"), part.mLambda());
540-
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
541-
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel1"), part.mKaon());
531+
} else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short) {
532+
if (helicityconfigs.isRealK0Short)
533+
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel1"), part.mKaon());
534+
else
535+
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel1"), part.mLambda());
536+
}
542537
} else if (cosineTheta < helicityconfigs.confLimitHel1 && cosineTheta >= helicityconfigs.confLimitHel2) {
543-
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
538+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0) {
544539
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassLambdaMCHel2"), part.mLambda());
545-
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
546-
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel2"), part.mKaon());
540+
} else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short) {
541+
if (helicityconfigs.isRealK0Short)
542+
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel2"), part.mKaon());
543+
else
544+
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel2"), part.mLambda());
545+
}
547546
} else if (cosineTheta < helicityconfigs.confLimitHel2 && cosineTheta >= helicityconfigs.confLimitHel3) {
548-
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
547+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0) {
549548
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassLambdaMCHel3"), part.mLambda());
550-
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
551-
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel3"), part.mKaon());
549+
} else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short) {
550+
if (helicityconfigs.isRealK0Short)
551+
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel3"), part.mKaon());
552+
else
553+
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel3"), part.mLambda());
554+
}
552555
} else if (cosineTheta < helicityconfigs.confLimitHel3 && cosineTheta >= helicityconfigs.confLimitHel4) {
553-
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0)
556+
if ((part.fdMCParticle()).pdgMCTruth() == kLambda0) {
554557
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassLambdaMCHel4"), part.mLambda());
555-
else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short)
556-
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel4"), part.mKaon());
558+
} else if ((part.fdMCParticle()).pdgMCTruth() == kK0Short) {
559+
if (helicityconfigs.isRealK0Short)
560+
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel4"), part.mKaon());
561+
else
562+
thetaRegistry.fill(HIST("Theta/Mother/MCReco/hInvMassK0ShortMCHel4"), part.mLambda());
563+
}
557564
}
558565
}
559566
}

0 commit comments

Comments
 (0)