From 7ad16dc4570e9742658ca0eba90f3275b07054b3 Mon Sep 17 00:00:00 2001 From: David Dobrigkeit Chinellato Date: Sat, 14 Jun 2025 09:27:10 -0300 Subject: [PATCH 1/2] [Common] Add hepmc info for O-O cent studies --- Common/DataModel/Multiplicity.h | 5 +++++ Common/TableProducer/multiplicityTable.cxx | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/Common/DataModel/Multiplicity.h b/Common/DataModel/Multiplicity.h index ce6aa4ba046..864e2a9cd1c 100644 --- a/Common/DataModel/Multiplicity.h +++ b/Common/DataModel/Multiplicity.h @@ -184,9 +184,14 @@ DECLARE_SOA_TABLE_VERSIONED(MultMCExtras_001, "AOD", "MULTMCEXTRA", 1, //! Table mult::IsInelGt1, o2::soa::Marker<1>); +DECLARE_SOA_TABLE(MultHepMCHIs, "AOD", "MULTHEPMCHI", //! complementary table for heavy-ion mc info (subset of HepMCHeavyIons) + o2::soa::Index<>, hepmcheavyion::McCollisionId, hepmcheavyion::NcollHard, hepmcheavyion::NpartProj, hepmcheavyion::NpartTarg, + hepmcheavyion::Ncoll, hepmcheavyion::ImpactParameter); + using MultMCExtras = MultMCExtras_001; using MultMCExtra = MultMCExtras::iterator; using MultsExtraMC = MultMCExtras; // for backwards compatibility with previous naming scheme +using MultHepMCHI = MultHepMCHIs::iterator; // crosslinks namespace mult diff --git a/Common/TableProducer/multiplicityTable.cxx b/Common/TableProducer/multiplicityTable.cxx index 6deb146daab..14fb970a6d9 100644 --- a/Common/TableProducer/multiplicityTable.cxx +++ b/Common/TableProducer/multiplicityTable.cxx @@ -100,6 +100,7 @@ struct MultiplicityTable { Produces tablePVZeqs; // 12 Produces tableExtraMc; // 13 Produces tableExtraMult2MCExtras; + Produces multHepMCHIs; // Not accounted for, produced using custom process function to avoid dependencies Produces mftMults; // Not accounted for, produced using custom process function to avoid dependencies Produces multsGlobal; // Not accounted for, produced based on process function processGlobalTrackingCounters @@ -734,6 +735,18 @@ struct MultiplicityTable { using Run3Tracks = soa::Join; Partition pvContribGlobalTracksEta1 = (minPtGlobalTrack < aod::track::pt && aod::track::pt < maxPtGlobalTrack) && (nabs(aod::track::eta) < 1.0f) && ((aod::track::flags & static_cast(o2::aod::track::PVContributor)) == static_cast(o2::aod::track::PVContributor)) && requireQualityTracksInFilter(); + void processHepMCHeavyIons(aod::HepMCHeavyIons const& hepmchis) + { + for (auto const& hepmchi : hepmchis) { + multHepMCHIs(hepmchi.mcCollisionId(), + hepmchi.ncollHard(), + hepmchi.npartProj(), + hepmchi.npartTarg(), + hepmchi.ncoll(), + hepmchi.impactParameter()); + } + } + void processGlobalTrackingCounters(aod::Collision const& collision, soa::Join const& tracksIU, Run3Tracks const&) { // counter from Igor @@ -808,6 +821,7 @@ struct MultiplicityTable { PROCESS_SWITCH(MultiplicityTable, processGlobalTrackingCounters, "Produce Run 3 global counters", false); PROCESS_SWITCH(MultiplicityTable, processMC, "Produce MC multiplicity tables", false); PROCESS_SWITCH(MultiplicityTable, processMC2Mults, "Produce MC -> Mult map", false); + PROCESS_SWITCH(MultiplicityTable, processHepMCHeavyIons, "Produce MultHepMCHIs tables", false); PROCESS_SWITCH(MultiplicityTable, processRun3MFT, "Produce MFT mult tables", false); }; From 6603ee554d7747f6441c7235de23918b58a506a6 Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Sat, 14 Jun 2025 14:29:50 +0200 Subject: [PATCH 2/2] Please consider the following formatting changes (#430) --- Common/TableProducer/multiplicityTable.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Common/TableProducer/multiplicityTable.cxx b/Common/TableProducer/multiplicityTable.cxx index 14fb970a6d9..eb9648ecf2b 100644 --- a/Common/TableProducer/multiplicityTable.cxx +++ b/Common/TableProducer/multiplicityTable.cxx @@ -739,10 +739,10 @@ struct MultiplicityTable { { for (auto const& hepmchi : hepmchis) { multHepMCHIs(hepmchi.mcCollisionId(), - hepmchi.ncollHard(), - hepmchi.npartProj(), - hepmchi.npartTarg(), - hepmchi.ncoll(), + hepmchi.ncollHard(), + hepmchi.npartProj(), + hepmchi.npartTarg(), + hepmchi.ncoll(), hepmchi.impactParameter()); } }