Skip to content

Commit 2dcb85a

Browse files
Update Sigma0 and LambdaStar handling in sigma0builder
1 parent 462a08b commit 2dcb85a

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

‎PWGLF/TableProducer/Strangeness/sigma0builder.cxx‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,8 +1094,9 @@ struct sigma0builder {
10941094
auto v02MC = v02.template v0MCCore_as<soa::Join<aod::V0MCCores, aod::V0MCCollRefs>>();
10951095

10961096
// Sanity check: Is V0Pair <-> Mother assignment correct?
1097+
int expectedPairPDG = doLambdaStar ? 3124 : PDG_t::kSigma0;
10971098
bool fIsSigma0 = false;
1098-
if ((v01MC.pdgCode() == PDG_t::kGamma) && (v01MC.pdgCodeMother() == PDG_t::kSigma0) && (v02MC.pdgCode() == PDG_t::kLambda0) && (v02MC.pdgCodeMother() == PDG_t::kSigma0) && (v01.motherMCPartId() == v02.motherMCPartId()))
1099+
if ((v01MC.pdgCode() == PDG_t::kGamma) && (v01MC.pdgCodeMother() == expectedPairPDG) && (v02MC.pdgCode() == PDG_t::kLambda0) && (v02MC.pdgCodeMother() == expectedPairPDG) && (v01.motherMCPartId() == v02.motherMCPartId()))
10991100
fIsSigma0 = true;
11001101

11011102
bool fIsKStar = false;
@@ -1246,11 +1247,11 @@ struct sigma0builder {
12461247
}
12471248
}
12481249
// Check association correctness
1249-
if (fIsSigma0 && (MCinfo.V0PairPDGCode == PDG_t::kSigma0))
1250+
if (fIsSigma0 && (MCinfo.V0PairPDGCode == expectedPairPDG))
12501251
histos.fill(HIST("MCQA/hSigma0MCCheck"), 1); // match
1251-
if (fIsSigma0 && !(MCinfo.V0PairPDGCode == PDG_t::kSigma0))
1252+
if (fIsSigma0 && !(MCinfo.V0PairPDGCode == expectedPairPDG))
12521253
histos.fill(HIST("MCQA/hSigma0MCCheck"), 2); // mismatch
1253-
if (!fIsSigma0 && (MCinfo.V0PairPDGCode == PDG_t::kSigma0))
1254+
if (!fIsSigma0 && (MCinfo.V0PairPDGCode == expectedPairPDG))
12541255
histos.fill(HIST("MCQA/hSigma0MCCheck"), 3); // mismatch
12551256

12561257
// Check association correctness
@@ -1905,6 +1906,8 @@ struct sigma0builder {
19051906
GenInfo.IsPi0 = mcParticle.pdgCode() == PDG_t::kPi0; // 111;
19061907
GenInfo.IsSigma0 = mcParticle.pdgCode() == PDG_t::kSigma0; // PDG_t::kSigma0
19071908
GenInfo.IsAntiSigma0 = mcParticle.pdgCode() == PDG_t::kSigma0Bar; //-3212
1909+
GenInfo.IsLambdaStar = mcParticle.pdgCode() == 3124; // 102134 (PYTHIA8)
1910+
GenInfo.IsAntiLambdaStar = mcParticle.pdgCode() == -3124; // -102134
19081911
GenInfo.IsKStar = std::abs(mcParticle.pdgCode()) == o2::constants::physics::Pdg::kK0Star892; // 313;
19091912
GenInfo.IsProducedByGenerator = mcParticle.producedByGenerator();
19101913
GenInfo.MCProcess = mcParticle.getProcess();
@@ -1916,7 +1919,7 @@ struct sigma0builder {
19161919
GenInfo.MCCollId = mcParticle.mcCollisionId(); // save this reference, please
19171920

19181921
// Checking decay mode if sigma0 or pi0 (it is easier here)
1919-
if (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0 || GenInfo.IsPi0 || GenInfo.IsKStar) {
1922+
if (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0 || GenInfo.IsPi0 || GenInfo.IsKStar || GenInfo.IsLambdaStar || GenInfo.IsAntiLambdaStar) {
19201923

19211924
// This is a costly operation, so we do it only for pi0s and sigma0s
19221925
auto const& daughters = mcParticle.template daughters_as<aod::McParticles>();
@@ -1926,7 +1929,7 @@ struct sigma0builder {
19261929
auto const& GenMothersList = mcParticle.template mothers_as<aod::McParticles>();
19271930
GenInfo.PDGCodeMother = (!GenMothersList.empty()) ? GenMothersList.front().pdgCode() : 0;
19281931

1929-
if ((GenInfo.IsSigma0 || GenInfo.IsAntiSigma0) && genSelections.doQA) {
1932+
if ((doLambdaStar ? (GenInfo.IsLambdaStar || GenInfo.IsAntiLambdaStar) : (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0)) && genSelections.doQA) {
19301933
histos.fill(HIST("GenQA/h2dSigma0MCSourceVsPDGMother"), GenInfo.IsProducedByGenerator, GenInfo.PDGCodeMother);
19311934

19321935
// Checking decay modes and getting daughter pTs
@@ -1989,7 +1992,7 @@ struct sigma0builder {
19891992
histos.fill(HIST("GenQA/hGenSpeciesKStar"), 0);
19901993

19911994
// Checking decay mode
1992-
if (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0) {
1995+
if (doLambdaStar ? (GenInfo.IsLambdaStar || GenInfo.IsAntiLambdaStar) : (GenInfo.IsSigma0 || GenInfo.IsAntiSigma0)) {
19931996
histos.fill(HIST("GenQA/hSigma0NDau"), GenInfo.NDaughters);
19941997
histos.fill(HIST("GenQA/h2dSigma0NDauVsProcess"), GenInfo.NDaughters, GenInfo.MCProcess);
19951998

@@ -2009,7 +2012,7 @@ struct sigma0builder {
20092012
histos.fill(HIST("GenQA/h2DGenSigma0TypeVsProducedByGen"), typeIndex, genIndex);
20102013

20112014
// Fill histograms
2012-
if (GenInfo.IsSigma0) {
2015+
if (doLambdaStar ? GenInfo.IsLambdaStar : GenInfo.IsSigma0) {
20132016
histos.fill(HIST("GenQA/hGenSpecies"), 2);
20142017
histos.fill(HIST("GenQA/hGenSigma0"), GenInfo.MCPt);
20152018
histos.fill(HIST("GenQA/h3dGenSigma0_pTMap"), GenInfo.MCPt, GenInfo.MCDau1Pt, GenInfo.MCDau2Pt);
@@ -2018,7 +2021,7 @@ struct sigma0builder {
20182021
if (GenInfo.IsPrimary)
20192022
histos.fill(HIST("GenQA/hPrimarySigma0s"), 1);
20202023
}
2021-
if (GenInfo.IsAntiSigma0) {
2024+
if (doLambdaStar ? GenInfo.IsAntiLambdaStar : GenInfo.IsAntiSigma0) {
20222025
histos.fill(HIST("GenQA/hGenSpecies"), 3);
20232026
histos.fill(HIST("GenQA/hGenAntiSigma0"), GenInfo.MCPt);
20242027
histos.fill(HIST("GenQA/h3dGenASigma0_pTMap"), GenInfo.MCPt, GenInfo.MCDau1Pt, GenInfo.MCDau2Pt);
@@ -2095,9 +2098,10 @@ struct sigma0builder {
20952098
pi0GenCollRefs(MCGenInfo.MCCollId); // link to stramccollision table
20962099
}
20972100

2098-
// Sigma0/ASigma0
2099-
if (fillSigma0Tables && (MCGenInfo.IsSigma0 || MCGenInfo.IsAntiSigma0)) {
2100-
sigma0Gens(MCGenInfo.IsSigma0, MCGenInfo.IsProducedByGenerator, MCGenInfo.MCPt, mcParticle.y());
2101+
// Sigma0/ASigma0 (Lambda(1520)/ALambda(1520))
2102+
bool fIsGenSigma0Like = doLambdaStar ? (MCGenInfo.IsLambdaStar || MCGenInfo.IsAntiLambdaStar) : (MCGenInfo.IsSigma0 || MCGenInfo.IsAntiSigma0);
2103+
if (fillSigma0Tables && fIsGenSigma0Like) {
2104+
sigma0Gens(doLambdaStar ? MCGenInfo.IsLambdaStar : MCGenInfo.IsSigma0, MCGenInfo.IsProducedByGenerator, MCGenInfo.MCPt, mcParticle.y());
21012105
sigma0GenCollRefs(MCGenInfo.MCCollId); // link to stramccollision table
21022106
}
21032107

0 commit comments

Comments
 (0)