Skip to content

Commit 519e2e7

Browse files
committed
Add Xic track femto task and kaon MC sources
1 parent bff0cf6 commit 519e2e7

20 files changed

Lines changed: 541 additions & 746 deletions

PWGCF/DataModel/FemtoDerived.h

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,11 +674,16 @@ enum ParticleOriginMCTruth {
674674
kSecondaryDaughterLambda, //! Daughter from a Lambda decay
675675
kSecondaryDaughterSigmaplus, //! Daughter from a Sigma^plus decay
676676
kSecondaryDaughterSigma0, //! Daughter from a Sigma^0 decay
677+
kSecondaryDaughterSigmaminus, //! Daughter from a Sigma^- decay
677678
kSecondaryDaughterXiMinus, //! Daughter from a Xi^- decay
678679
kSecondaryDaughterXi0, //! Daughter from a Xi^0 decay
679680
kSecondaryDaughterOmegaMinus, //! Daughter from a Omega^- decay
680681
kSecondaryDaughterXistar0, //! Daughter from a Xi*^0 decay
681682
kSecondaryDaughterXistarMinus, //! Daughter from a Xi*^- decay
683+
kSecondaryDaughterK0Long, //! Daughter from a K0 long decay
684+
kSecondaryDaughterK0Short, //! Daughter from a K0 short decay
685+
kSecondaryDaughterKCharged, //! Daughter from a charged kaon decay
686+
kSecondaryDaughterPionCharged, //! Daughter from a charged pion decay
682687
kElse, //! none of the above; (NOTE: used to catch bugs. will be removed once MC usage is properly validated)
683688
kNOriginMCTruthTypes
684689
};
@@ -690,8 +695,38 @@ static constexpr std::string_view ParticleOriginMCTruthName[kNOriginMCTruthTypes
690695
"_Material",
691696
"_NotPrimary",
692697
"_Fake",
698+
"_WrongCollision",
693699
"_SecondaryDaughterLambda",
694-
"_SecondaryDaughterSigmaPlus"};
700+
"_SecondaryDaughterSigmaplus",
701+
"_SecondaryDaughterSigma0",
702+
"_SecondaryDaughterSigmaminus",
703+
"_SecondaryDaughterXiMinus",
704+
"_SecondaryDaughterXi0",
705+
"_SecondaryDaughterOmegaMinus",
706+
"_SecondaryDaughterXistar0",
707+
"_SecondaryDaughterXistarMinus",
708+
"_SecondaryDaughterK0Long",
709+
"_SecondaryDaughterK0Short",
710+
"_SecondaryDaughterKCharged",
711+
"_SecondaryDaughterPionCharged",
712+
"_Else"};
713+
714+
inline constexpr bool isSecondaryOrigin(uint8_t origin)
715+
{
716+
return origin == kSecondary || origin == kSecondaryDaughterLambda ||
717+
origin == kSecondaryDaughterSigmaplus ||
718+
origin == kSecondaryDaughterSigma0 ||
719+
origin == kSecondaryDaughterSigmaminus ||
720+
origin == kSecondaryDaughterXiMinus ||
721+
origin == kSecondaryDaughterXi0 ||
722+
origin == kSecondaryDaughterOmegaMinus ||
723+
origin == kSecondaryDaughterXistar0 ||
724+
origin == kSecondaryDaughterXistarMinus ||
725+
origin == kSecondaryDaughterK0Long ||
726+
origin == kSecondaryDaughterK0Short ||
727+
origin == kSecondaryDaughterKCharged ||
728+
origin == kSecondaryDaughterPionCharged;
729+
}
695730

696731
/// Distinguished between reconstructed and truth
697732
enum MCType {

PWGCF/FemtoDream/Core/femtoDreamParticleHisto.h

Lines changed: 109 additions & 1 deletion
Large diffs are not rendered by default.

PWGCF/FemtoDream/Core/femtoDreamUtils.h

Lines changed: 77 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,68 @@ inline float getMass(int pdgCode)
102102
return mass;
103103
}
104104

105-
inline int checkDaughterType(o2::aod::femtodreamparticle::ParticleType partType, int motherPDG)
105+
inline int checkDaughterType(o2::aod::femtodreamparticle::ParticleType partType, int motherPDG, int daughterPDG = 0)
106106
{
107107
int partOrigin = 0;
108+
const auto absMotherPDG = std::abs(motherPDG);
109+
const auto absDaughterPDG = std::abs(daughterPDG);
110+
const bool isTrackLike = partType == o2::aod::femtodreamparticle::ParticleType::kTrack ||
111+
partType == o2::aod::femtodreamparticle::ParticleType::kV0Child ||
112+
partType == o2::aod::femtodreamparticle::ParticleType::kCascadeV0Child ||
113+
partType == o2::aod::femtodreamparticle::ParticleType::kCascadeBachelor;
114+
115+
if (absDaughterPDG == kKPlus && isTrackLike) {
116+
switch (absMotherPDG) {
117+
case kOmegaMinus:
118+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterOmegaMinus;
119+
break;
120+
default:
121+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondary;
122+
}
123+
return partOrigin;
124+
}
125+
108126
if (partType == o2::aod::femtodreamparticle::ParticleType::kTrack) {
109-
switch (std::abs(motherPDG)) {
127+
switch (absMotherPDG) {
110128
case kLambda0:
111129
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterLambda;
112130
break;
113131
case kSigmaPlus:
114132
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterSigmaplus;
115133
break;
134+
case kSigma0:
135+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterSigma0;
136+
break;
137+
case kSigmaMinus:
138+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterSigmaminus;
139+
break;
140+
case kXiMinus:
141+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterXiMinus;
142+
break;
143+
case o2::constants::physics::Pdg::kXi0:
144+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterXi0;
145+
break;
146+
case kOmegaMinus:
147+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterOmegaMinus;
148+
break;
149+
case kK0Long:
150+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterK0Long;
151+
break;
152+
case kK0Short:
153+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterK0Short;
154+
break;
155+
case kKPlus:
156+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterKCharged;
157+
break;
158+
case kPiPlus:
159+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterPionCharged;
160+
break;
116161
default:
117162
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondary;
118163
} // switch
119164

120165
} else if (partType == o2::aod::femtodreamparticle::ParticleType::kV0) {
121-
switch (std::abs(motherPDG)) {
166+
switch (absMotherPDG) {
122167
case kSigma0:
123168
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterSigma0;
124169
break;
@@ -133,19 +178,46 @@ inline int checkDaughterType(o2::aod::femtodreamparticle::ParticleType partType,
133178
}
134179

135180
} else if (partType == o2::aod::femtodreamparticle::ParticleType::kV0Child || partType == o2::aod::femtodreamparticle::ParticleType::kCascadeV0Child || partType == o2::aod::femtodreamparticle::ParticleType::kCascadeBachelor) {
136-
switch (abs(motherPDG)) {
181+
switch (absMotherPDG) {
137182
case kLambda0:
138183
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterLambda;
139184
break;
140185
case kSigmaPlus:
141186
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterSigmaplus;
142187
break;
188+
case kSigma0:
189+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterSigma0;
190+
break;
191+
case kSigmaMinus:
192+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterSigmaminus;
193+
break;
194+
case kXiMinus:
195+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterXiMinus;
196+
break;
197+
case o2::constants::physics::Pdg::kXi0:
198+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterXi0;
199+
break;
200+
case kOmegaMinus:
201+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterOmegaMinus;
202+
break;
203+
case kK0Long:
204+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterK0Long;
205+
break;
206+
case kK0Short:
207+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterK0Short;
208+
break;
209+
case kKPlus:
210+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterKCharged;
211+
break;
212+
case kPiPlus:
213+
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterPionCharged;
214+
break;
143215
default:
144216
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondary;
145217
} // switch
146218

147219
} else if (partType == o2::aod::femtodreamparticle::ParticleType::kCascade) {
148-
switch (std::abs(motherPDG)) {
220+
switch (absMotherPDG) {
149221
case kOmegaMinus:
150222
partOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kSecondaryDaughterOmegaMinus;
151223
break;

PWGCF/FemtoDream/TableProducer/femtoDreamProducerReducedTask.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ struct femtoDreamProducerReducedTask {
214214
} else if (particleMC.isPhysicalPrimary()) {
215215
particleOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kPrimary;
216216
} else if (motherparticleMC.isPhysicalPrimary() && particleMC.getProcess() == 4) {
217-
particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode());
217+
particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode(), pdgCode);
218218
} else if (particleMC.getGenStatusCode() == -1) {
219219
particleOrigin = aod::femtodreamMCparticle::ParticleOriginMCTruth::kMaterial;
220220
} else {

PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ struct femtoDreamProducerTask {
672672
auto motherparticleMC = motherparticlesMC.front();
673673
pdgCodeMother = motherparticleMC.pdgCode();
674674
TrackRegistry.fill(HIST("AnalysisQA/Mother"), pdgCodeMother);
675-
particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode());
675+
particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode(), pdgCode);
676676
// check if particle is material
677677
// particle is from inelastic hadronic interaction -> getProcess() == 23
678678
// particle is generated during transport -> getGenStatusCode() == -1

PWGCF/FemtoDream/TableProducer/femtoDreamProducerTaskReso.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ struct FemtoDreamProducerTaskReso {
928928
auto motherparticleMC = motherparticlesMC.front();
929929
pdgCodeMother = motherparticleMC.pdgCode();
930930
trackRegistry.fill(HIST("AnalysisQA/Mother"), pdgCodeMother);
931-
particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode());
931+
particleOrigin = checkDaughterType(fdparttype, motherparticleMC.pdgCode(), pdgCode);
932932
// check if particle is material
933933
// particle is from inelastic hadronic interaction -> getProcess() == 23
934934
// particle is generated during transport -> getGenStatusCode() == -1

PWGCF/FemtoUniverse/Core/FemtoUniverseEfficiencyCorrection.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,14 @@ class EfficiencyCorrection
167167
case (o2::aod::femtouniverse_mc_particle::kDaughter):
168168
case (o2::aod::femtouniverse_mc_particle::kDaughterLambda):
169169
case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaplus):
170+
case (o2::aod::femtouniverse_mc_particle::kDaughterSigma0):
171+
case (o2::aod::femtouniverse_mc_particle::kDaughterSigmaminus):
172+
case (o2::aod::femtouniverse_mc_particle::kDaughterXi):
173+
case (o2::aod::femtouniverse_mc_particle::kDaughterOmega):
174+
case (o2::aod::femtouniverse_mc_particle::kDaughterK0Long):
175+
case (o2::aod::femtouniverse_mc_particle::kDaughterK0Short):
176+
case (o2::aod::femtouniverse_mc_particle::kDaughterKCharged):
177+
case (o2::aod::femtouniverse_mc_particle::kDaughterPionCharged):
170178
histRegistry->fill(HIST(histDirectory) + HIST("/") + HIST(histSuffix[N - 1]) + HIST("/hSecondary"),
171179
mcParticle.pt(),
172180
mcParticle.eta(),

0 commit comments

Comments
 (0)