Skip to content

Commit 1d80c4b

Browse files
rolavickalibuild
andauthored
[PWGUD] Modification of MCgenID test task (#12003)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 60fad30 commit 1d80c4b

File tree

4 files changed

+20
-15
lines changed

4 files changed

+20
-15
lines changed

PWGUD/TableProducer/tauEventTableProducer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ struct TauEventTableProducer {
301301
return false; // TPC chi2
302302
if (cutGlobalTrack.cutGoodITSTPCmatching) {
303303
if (track.itsChi2NCl() < 0.)
304-
return false; // TPC chi2
304+
return false; // good ITS-TPC matching means ITS ch2 is not negative
305305
}
306306
// TOF
307307
if (track.hasTOF()) {

PWGUD/TableProducer/twoTracksEventTableProducer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ struct TwoTracksEventTableProducer {
327327
return false; // TPC chi2
328328
if (cutGlobalTrack.cutGoodITSTPCmatching) {
329329
if (track.itsChi2NCl() < 0.)
330-
return false; // TPC chi2
330+
return false; // good ITS-TPC matching means ITS ch2 is not negative
331331
}
332332
// TOF
333333
if (track.hasTOF()) {

PWGUD/Tasks/testMcStdTabsRl.cxx

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,13 @@ struct TestMcStdTabsRl {
4747

4848
HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject};
4949

50+
// declare configurables
51+
Configurable<bool> useMcgenidGetGeneratorID{"useMcgenidGetGeneratorID", true, {"Use o2::mcgenid::getGeneratorId instead of o2::mccollision::getGeneratorId; default it true."}};
52+
5053
struct : ConfigurableGroup {
51-
ConfigurableAxis zzAxisNtracks{"zzAxisNtracks", {30, -0.5, 29.5}, "Number of tracks in collision"};
52-
ConfigurableAxis zzAxisNparticles{"zzAxisNparticles", {60, -0.5, 59.5}, "Number of particles in collision"};
53-
ConfigurableAxis zzAxisNprocesses{"zzAxisNprocesses", {50, -0.5, 49.5}, "Number of processes"};
54+
ConfigurableAxis zzAxisNtracks{"zzAxisNtracks", {100, -0.5, 99.5}, "Number of tracks in collision"};
55+
ConfigurableAxis zzAxisNparticles{"zzAxisNparticles", {100, -0.5, 99.5}, "Number of particles in collision"};
56+
ConfigurableAxis zzAxisNprocesses{"zzAxisNprocesses", {1000, -0.5, 999.5}, "Number of processes"};
5457
ConfigurableAxis zzAxisInvMassWide{"zzAxisInvMassWide", {1000, 0., 10.}, "Invariant mass (GeV/c^{2}), wider range"};
5558
ConfigurableAxis zzAxisPt{"zzAxisPt", {400, 0., 2.}, "Transversal momentum (GeV/c)"};
5659
ConfigurableAxis zzAxisRap{"zzAxisRap", {50, -1.2, 1.2}, "Rapidity (a.u.)"};
@@ -74,24 +77,26 @@ struct TestMcStdTabsRl {
7477
void processMCgen(aod::McCollision const& collision, aod::McParticles const& particles)
7578
{
7679

77-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsCountCollisions"))->Fill(collision.getGeneratorId(), 1);
78-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsNparticles"))->Fill(collision.getGeneratorId(), particles.size());
80+
const auto genID = useMcgenidGetGeneratorID ? o2::mcgenid::getGeneratorId(collision.getGeneratorId()) : collision.getGeneratorId();
81+
82+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsCountCollisions"))->Fill(genID, 1);
83+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsNparticles"))->Fill(genID, particles.size());
7984

8085
ROOT::Math::LorentzVector<ROOT::Math::PxPyPzE4D<double>> mother;
8186
for (const auto& particle : particles) {
82-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsPDGcodesAll"))->Fill(collision.getGeneratorId(), particle.pdgCode());
87+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsPDGcodesAll"))->Fill(genID, particle.pdgCode());
8388
// if (!particle.isPhysicalPrimary()) continue;
8489
if (particle.has_mothers())
8590
continue;
8691
mother.SetPxPyPzE(particle.px(), particle.py(), particle.pz(), energy(pdg->Mass(particle.pdgCode()), particle.px(), particle.py(), particle.pz()));
87-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsPDGcodesNoMother"))->Fill(collision.getGeneratorId(), particle.pdgCode());
88-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsMotherMass"))->Fill(collision.getGeneratorId(), mother.M());
89-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsMotherPt"))->Fill(collision.getGeneratorId(), particle.pt());
90-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsMotherRap"))->Fill(collision.getGeneratorId(), particle.y());
92+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsPDGcodesNoMother"))->Fill(genID, particle.pdgCode());
93+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsMotherMass"))->Fill(genID, mother.M());
94+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsMotherPt"))->Fill(genID, particle.pt());
95+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsMotherRap"))->Fill(genID, particle.y());
9196
const auto& daughters = particle.daughters_as<aod::McParticles>();
92-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsNdaughters"))->Fill(collision.getGeneratorId(), daughters.size());
97+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsNdaughters"))->Fill(genID, daughters.size());
9398
for (const auto& daughter : daughters) {
94-
histos.get<TH2>(HIST("Events/Truth/hGenIDvsPDGcodesDaughters"))->Fill(collision.getGeneratorId(), daughter.pdgCode());
99+
histos.get<TH2>(HIST("Events/Truth/hGenIDvsPDGcodesDaughters"))->Fill(genID, daughter.pdgCode());
95100
}
96101
}
97102

PWGUD/Tasks/upcTauRl.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,7 @@ struct UpcTauRl {
768768
return false; // TPC chi2
769769
if (cutGlobalTrack.cutGoodITSTPCmatching) {
770770
if (track.itsChi2NCl() < 0.)
771-
return false; // TPC chi2
771+
return false; // good ITS-TPC matching means ITS ch2 is not negative
772772
}
773773
// TOF
774774
if (track.hasTOF()) {

0 commit comments

Comments
 (0)