Skip to content

Commit 61e44f0

Browse files
committed
Check process that generated MC particle when processing fractions
1 parent 5fcab7c commit 61e44f0

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

PWGCF/FemtoUniverse/TableProducer/femtoUniverseProducerTask.cxx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,9 @@ struct FemtoUniverseProducerTask {
884884
if (particle.isPhysicalPrimary()) {
885885
return 0;
886886
} else if (particle.has_mothers()) {
887+
if (particle.getProcess() == 20 || particle.getProcess() == 23) { // treat particles from hadronic scattering (20, 23) as primary
888+
return 0;
889+
}
887890
auto motherparticlesMC = particle.template mothers_as<aod::McParticles>();
888891
auto motherparticleMC = motherparticlesMC.front();
889892
return motherparticleMC.pdgCode();
@@ -2142,6 +2145,7 @@ struct FemtoUniverseProducerTask {
21422145
// instead of the bitmask, the PDG of the particle is stored as uint32_t
21432146

21442147
int32_t variablePDG = confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode();
2148+
int32_t variableCut = confStoreMCmothers ? particle.getProcess() : 0;
21452149

21462150
// now the table is filled
21472151
if constexpr (resolveDaughs) {
@@ -2156,7 +2160,7 @@ struct FemtoUniverseProducerTask {
21562160
particle.eta(),
21572161
particle.phi(),
21582162
aod::femtouniverseparticle::ParticleType::kMCTruthTrack,
2159-
0,
2163+
variableCut,
21602164
pdgCode,
21612165
variablePDG,
21622166
childIDs,
@@ -2195,13 +2199,14 @@ struct FemtoUniverseProducerTask {
21952199
}
21962200

21972201
int32_t variablePDG = confStoreMCmothers ? getMotherPDG(particle) : particle.pdgCode();
2202+
int32_t variableCut = confStoreMCmothers ? particle.getProcess() : 0;
21982203

21992204
outputParts(outputCollision.lastIndex(),
22002205
particle.pt(),
22012206
particle.eta(),
22022207
particle.phi(),
22032208
aod::femtouniverseparticle::ParticleType::kMCTruthTrack,
2204-
0,
2209+
variableCut,
22052210
static_cast<uint32_t>(particle.pdgCode()),
22062211
variablePDG,
22072212
childIDs,

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackTrackMultKtExtended.cxx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
366366
}
367367
if (doprocessFractionsMCTruth) {
368368
mixedMultRegistryPM.add("MCtruth/motherParticle", "pair fractions; part1 mother PDG; part2 mother PDG", {HistType::kTH2F, {{8001, -4000, 4000}, {8001, -4000, 4000}}});
369+
mixedMultRegistryPM.add("MCtruth/mcProcess", "pair ; part1 VMC physics code; part2 VMC physics code", {HistType::kTH2F, {{50, 0, 50}, {50, 0, 50}}});
369370
}
370371
}
371372

@@ -376,6 +377,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
376377
}
377378
if (doprocessFractionsMCTruth) {
378379
mixedMultRegistryPP.add("MCtruth/motherParticle", "pair fractions; part1 mother PDG; part2 mother PDG", {HistType::kTH2F, {{8001, -4000, 4000}, {8001, -4000, 4000}}});
380+
mixedMultRegistryPP.add("MCtruth/mcProcess", "pair ; part1 VMC physics code; part2 VMC physics code", {HistType::kTH2F, {{50, 0, 50}, {50, 0, 50}}});
379381
}
380382
sameEventContPP.init(&resultRegistryPP, confkstarBins, confMultBins, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D);
381383
mixedEventContPP.init(&resultRegistryPP, confkstarBins, confMultBins, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D);
@@ -395,6 +397,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
395397
}
396398
if (doprocessFractionsMCTruth) {
397399
mixedMultRegistryMM.add("MCtruth/motherParticle", "pair fractions; part1 mother PDG; part2 mother PDG", {HistType::kTH2F, {{8001, -4000, 4000}, {8001, -4000, 4000}}});
400+
mixedMultRegistryMM.add("MCtruth/mcProcess", "pair ; part1 VMC physics code; part2 VMC physics code", {HistType::kTH2F, {{50, 0, 50}, {50, 0, 50}}});
398401
}
399402
sameEventContMM.init(&resultRegistryMM, confkstarBins, confMultBins, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D);
400403
mixedEventContMM.init(&resultRegistryMM, confkstarBins, confMultBins, confkTBins, confmTBins, confmultBins3D, confmTBins3D, twotracksconfigs.confIsMC, twotracksconfigs.confUse3D);
@@ -955,6 +958,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
955958
const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo);
956959
if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) {
957960
mixedMultRegistryPM.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
961+
mixedMultRegistryPM.fill(HIST("MCtruth/mcProcess"), p1.cut(), p2.cut());
958962
}
959963
}
960964
break;
@@ -967,6 +971,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
967971
const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo);
968972
if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == trackonefilter.confPDGCodePartOne) && (pdgCodePartTwo == trackonefilter.confPDGCodePartOne)) {
969973
mixedMultRegistryPP.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
974+
mixedMultRegistryPP.fill(HIST("MCtruth/mcProcess"), p1.cut(), p2.cut());
970975
}
971976
}
972977
break;
@@ -979,6 +984,7 @@ struct FemtoUniversePairTaskTrackTrackMultKtExtended {
979984
const auto& pdgParticleTwo = pdg->GetParticle(pdgCodePartTwo);
980985
if (pdgParticleOne && pdgParticleTwo && (pdgCodePartOne == tracktwofilter.confPDGCodePartTwo) && (pdgCodePartTwo == tracktwofilter.confPDGCodePartTwo)) {
981986
mixedMultRegistryMM.fill(HIST("MCtruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
987+
mixedMultRegistryMM.fill(HIST("MCtruth/mcProcess"), p1.cut(), p2.cut());
982988
}
983989
}
984990
break;

PWGCF/FemtoUniverse/Tasks/femtoUniversePairTaskTrackV0Extended.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
336336

337337
if (doprocessPairFractionsMCTruthV0 || doprocessPairFractionsMCTruth) {
338338
registryMCtruth.add("mothersTruth/motherParticle", "pair fractions;part1 mother PDG;part2 mother PDG", {HistType::kTH2F, {confMotherPDGBins, confMotherPDGBins}});
339+
registryMCtruth.add("mothersTruth/mcProcess", "pair ; part1 VMC physics code; part2 VMC physics code", {HistType::kTH2F, {{50, 0, 50}, {50, 0, 50}}});
339340
}
340341

341342
// MC reco
@@ -1547,6 +1548,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
15471548
continue;
15481549

15491550
registryMCtruth.fill(HIST("mothersTruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
1551+
registryMCtruth.fill(HIST("mothersTruth/mcProcess"), p1.cut(), p2.cut());
15501552
}
15511553
};
15521554

@@ -1580,6 +1582,7 @@ struct FemtoUniversePairTaskTrackV0Extended {
15801582
continue;
15811583

15821584
registryMCtruth.fill(HIST("mothersTruth/motherParticle"), p1.tempFitVar(), p2.tempFitVar());
1585+
registryMCtruth.fill(HIST("mothersTruth/mcProcess"), p1.cut(), p2.cut());
15831586
}
15841587
};
15851588

0 commit comments

Comments
 (0)