From 98ae2641cefd518fa186bffde68c6b663e1a805f Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Thu, 10 Jul 2025 16:47:13 +0200 Subject: [PATCH 1/3] change in a comment --- PWGUD/TableProducer/tauEventTableProducer.cxx | 2 +- PWGUD/TableProducer/twoTracksEventTableProducer.cxx | 2 +- PWGUD/Tasks/upcTauRl.cxx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGUD/TableProducer/tauEventTableProducer.cxx b/PWGUD/TableProducer/tauEventTableProducer.cxx index 194e6d3a7c8..548d8701689 100644 --- a/PWGUD/TableProducer/tauEventTableProducer.cxx +++ b/PWGUD/TableProducer/tauEventTableProducer.cxx @@ -301,7 +301,7 @@ struct TauEventTableProducer { return false; // TPC chi2 if (cutGlobalTrack.cutGoodITSTPCmatching) { if (track.itsChi2NCl() < 0.) - return false; // TPC chi2 + return false; // good ITS-TPC matching means ITS ch2 is not negative } // TOF if (track.hasTOF()) { diff --git a/PWGUD/TableProducer/twoTracksEventTableProducer.cxx b/PWGUD/TableProducer/twoTracksEventTableProducer.cxx index 4f98b604852..f132315c403 100644 --- a/PWGUD/TableProducer/twoTracksEventTableProducer.cxx +++ b/PWGUD/TableProducer/twoTracksEventTableProducer.cxx @@ -327,7 +327,7 @@ struct TwoTracksEventTableProducer { return false; // TPC chi2 if (cutGlobalTrack.cutGoodITSTPCmatching) { if (track.itsChi2NCl() < 0.) - return false; // TPC chi2 + return false; // good ITS-TPC matching means ITS ch2 is not negative } // TOF if (track.hasTOF()) { diff --git a/PWGUD/Tasks/upcTauRl.cxx b/PWGUD/Tasks/upcTauRl.cxx index 6e1c64ac4f1..c0684cec14b 100644 --- a/PWGUD/Tasks/upcTauRl.cxx +++ b/PWGUD/Tasks/upcTauRl.cxx @@ -768,7 +768,7 @@ struct UpcTauRl { return false; // TPC chi2 if (cutGlobalTrack.cutGoodITSTPCmatching) { if (track.itsChi2NCl() < 0.) - return false; // TPC chi2 + return false; // good ITS-TPC matching means ITS ch2 is not negative } // TOF if (track.hasTOF()) { From 7de842002c2dec7d9d03c9459075e2834257a270 Mon Sep 17 00:00:00 2001 From: Roman Lavicka Date: Thu, 10 Jul 2025 17:20:30 +0200 Subject: [PATCH 2/3] modification of MC test task to switch between two getGeneratorID methods --- PWGUD/Tasks/testMcStdTabsRl.cxx | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/PWGUD/Tasks/testMcStdTabsRl.cxx b/PWGUD/Tasks/testMcStdTabsRl.cxx index ced8f2fdc66..b085914133a 100644 --- a/PWGUD/Tasks/testMcStdTabsRl.cxx +++ b/PWGUD/Tasks/testMcStdTabsRl.cxx @@ -47,10 +47,13 @@ struct TestMcStdTabsRl { HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; + // declare configurables + Configurable useMcgenidGetGeneratorID{"useMcgenidGetGeneratorID", true, {"Use o2::mcgenid::getGeneratorId instead of o2::mccollision::getGeneratorId; default it true."}}; + struct : ConfigurableGroup { - ConfigurableAxis zzAxisNtracks{"zzAxisNtracks", {30, -0.5, 29.5}, "Number of tracks in collision"}; - ConfigurableAxis zzAxisNparticles{"zzAxisNparticles", {60, -0.5, 59.5}, "Number of particles in collision"}; - ConfigurableAxis zzAxisNprocesses{"zzAxisNprocesses", {50, -0.5, 49.5}, "Number of processes"}; + ConfigurableAxis zzAxisNtracks{"zzAxisNtracks", {100, -0.5, 99.5}, "Number of tracks in collision"}; + ConfigurableAxis zzAxisNparticles{"zzAxisNparticles", {100, -0.5, 99.5}, "Number of particles in collision"}; + ConfigurableAxis zzAxisNprocesses{"zzAxisNprocesses", {1000, -0.5, 999.5}, "Number of processes"}; ConfigurableAxis zzAxisInvMassWide{"zzAxisInvMassWide", {1000, 0., 10.}, "Invariant mass (GeV/c^{2}), wider range"}; ConfigurableAxis zzAxisPt{"zzAxisPt", {400, 0., 2.}, "Transversal momentum (GeV/c)"}; ConfigurableAxis zzAxisRap{"zzAxisRap", {50, -1.2, 1.2}, "Rapidity (a.u.)"}; @@ -74,24 +77,26 @@ struct TestMcStdTabsRl { void processMCgen(aod::McCollision const& collision, aod::McParticles const& particles) { - histos.get(HIST("Events/Truth/hGenIDvsCountCollisions"))->Fill(collision.getGeneratorId(), 1); - histos.get(HIST("Events/Truth/hGenIDvsNparticles"))->Fill(collision.getGeneratorId(), particles.size()); + const auto genID = useMcgenidGetGeneratorID ? o2::mcgenid::getGeneratorId(collision.getGeneratorId()) : collision.getGeneratorId(); + + histos.get(HIST("Events/Truth/hGenIDvsCountCollisions"))->Fill(genID, 1); + histos.get(HIST("Events/Truth/hGenIDvsNparticles"))->Fill(genID, particles.size()); ROOT::Math::LorentzVector> mother; for (const auto& particle : particles) { - histos.get(HIST("Events/Truth/hGenIDvsPDGcodesAll"))->Fill(collision.getGeneratorId(), particle.pdgCode()); + histos.get(HIST("Events/Truth/hGenIDvsPDGcodesAll"))->Fill(genID, particle.pdgCode()); // if (!particle.isPhysicalPrimary()) continue; if (particle.has_mothers()) continue; mother.SetPxPyPzE(particle.px(), particle.py(), particle.pz(), energy(pdg->Mass(particle.pdgCode()), particle.px(), particle.py(), particle.pz())); - histos.get(HIST("Events/Truth/hGenIDvsPDGcodesNoMother"))->Fill(collision.getGeneratorId(), particle.pdgCode()); - histos.get(HIST("Events/Truth/hGenIDvsMotherMass"))->Fill(collision.getGeneratorId(), mother.M()); - histos.get(HIST("Events/Truth/hGenIDvsMotherPt"))->Fill(collision.getGeneratorId(), particle.pt()); - histos.get(HIST("Events/Truth/hGenIDvsMotherRap"))->Fill(collision.getGeneratorId(), particle.y()); + histos.get(HIST("Events/Truth/hGenIDvsPDGcodesNoMother"))->Fill(genID, particle.pdgCode()); + histos.get(HIST("Events/Truth/hGenIDvsMotherMass"))->Fill(genID, mother.M()); + histos.get(HIST("Events/Truth/hGenIDvsMotherPt"))->Fill(genID, particle.pt()); + histos.get(HIST("Events/Truth/hGenIDvsMotherRap"))->Fill(genID, particle.y()); const auto& daughters = particle.daughters_as(); - histos.get(HIST("Events/Truth/hGenIDvsNdaughters"))->Fill(collision.getGeneratorId(), daughters.size()); + histos.get(HIST("Events/Truth/hGenIDvsNdaughters"))->Fill(genID, daughters.size()); for (const auto& daughter : daughters) { - histos.get(HIST("Events/Truth/hGenIDvsPDGcodesDaughters"))->Fill(collision.getGeneratorId(), daughter.pdgCode()); + histos.get(HIST("Events/Truth/hGenIDvsPDGcodesDaughters"))->Fill(genID, daughter.pdgCode()); } } From 46ff06defb4dffcb5c76018a23798cbe7e602c9d Mon Sep 17 00:00:00 2001 From: ALICE Action Bot Date: Thu, 10 Jul 2025 15:21:57 +0000 Subject: [PATCH 3/3] Please consider the following formatting changes --- PWGUD/Tasks/testMcStdTabsRl.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PWGUD/Tasks/testMcStdTabsRl.cxx b/PWGUD/Tasks/testMcStdTabsRl.cxx index b085914133a..9748b28784f 100644 --- a/PWGUD/Tasks/testMcStdTabsRl.cxx +++ b/PWGUD/Tasks/testMcStdTabsRl.cxx @@ -47,8 +47,8 @@ struct TestMcStdTabsRl { HistogramRegistry histos{"histos", {}, OutputObjHandlingPolicy::AnalysisObject}; - // declare configurables - Configurable useMcgenidGetGeneratorID{"useMcgenidGetGeneratorID", true, {"Use o2::mcgenid::getGeneratorId instead of o2::mccollision::getGeneratorId; default it true."}}; + // declare configurables + Configurable useMcgenidGetGeneratorID{"useMcgenidGetGeneratorID", true, {"Use o2::mcgenid::getGeneratorId instead of o2::mccollision::getGeneratorId; default it true."}}; struct : ConfigurableGroup { ConfigurableAxis zzAxisNtracks{"zzAxisNtracks", {100, -0.5, 99.5}, "Number of tracks in collision"}; @@ -77,7 +77,7 @@ struct TestMcStdTabsRl { void processMCgen(aod::McCollision const& collision, aod::McParticles const& particles) { - const auto genID = useMcgenidGetGeneratorID ? o2::mcgenid::getGeneratorId(collision.getGeneratorId()) : collision.getGeneratorId(); + const auto genID = useMcgenidGetGeneratorID ? o2::mcgenid::getGeneratorId(collision.getGeneratorId()) : collision.getGeneratorId(); histos.get(HIST("Events/Truth/hGenIDvsCountCollisions"))->Fill(genID, 1); histos.get(HIST("Events/Truth/hGenIDvsNparticles"))->Fill(genID, particles.size());