From 95e09eebdf29ce26bf531d0f4672acc012a09787 Mon Sep 17 00:00:00 2001 From: Raphaelle Bailhache Date: Mon, 23 Feb 2026 16:43:43 +0100 Subject: [PATCH 1/2] Running with different scenario at the same time --- ALICE3/Tasks/alice3-dilepton.cxx | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/ALICE3/Tasks/alice3-dilepton.cxx b/ALICE3/Tasks/alice3-dilepton.cxx index c901664cec8..c7e79197049 100644 --- a/ALICE3/Tasks/alice3-dilepton.cxx +++ b/ALICE3/Tasks/alice3-dilepton.cxx @@ -16,6 +16,7 @@ #include "ALICE3/DataModel/OTFRICH.h" #include "ALICE3/DataModel/OTFTOF.h" +#include "ALICE3/DataModel/OTFCollision.h" #include "ALICE3/DataModel/tracksAlice3.h" #include "Common/DataModel/TrackSelectionTables.h" @@ -25,9 +26,11 @@ #include #include #include +#include #include + #include using namespace o2; @@ -54,6 +57,8 @@ struct Alice3Dilepton { SliceCache cache_mc; SliceCache cache_rec; + Service inspdg; + Configurable pdg{"pdg", 11, "pdg code for analysis. dielectron:11, dimuon:13"}; Configurable requireHFEid{"requireHFEid", true, "Require HFE identification for both leptons"}; Configurable ptMin{"pt-min", 0.f, "Lower limit in pT"}; @@ -68,6 +73,7 @@ struct Alice3Dilepton { Configurable nSigmaPionCutInnerTOF{"nSigmaPionCutInnerTOF", 3., "Pion exclusion in inner TOF"}; Configurable nSigmaElectronRich{"nSigmaElectronRich", 3., "Electron inclusion RICH"}; Configurable nSigmaPionRich{"nSigmaPionRich", 3., "Pion exclusion RICH"}; + Configurable otfConfig{"otfConfig", 0, "OTF configuration flag"}; HistogramRegistry registry{"Histos", {}, OutputObjHandlingPolicy::AnalysisObject}; @@ -100,6 +106,7 @@ struct Alice3Dilepton { registry.add("Generated/Particle/prodVy", "Particle Prod. Vertex Y", kTH1F, {axisPrody}); registry.add("Generated/Particle/prodVz", "Particle Prod. Vertex Z", kTH1F, {axisProdz}); registry.add("Generated/Particle/ParticlesPerEvent", "Particles per event", kTH1F, {{100, 0, 100}}); + registry.add("Generated/Particle/ParticlesFit", "Charged Particles in Fit acceptance per event", kTH1F, {{15000,0,15000}}); registry.add("Generated/Pair/ULS/Tried", "Pair tries", kTH1F, {{10, -0.5, 9.5}}); registry.add("Generated/Pair/ULS/Mass", "Pair Mass", kTH1F, {axisM}); @@ -601,7 +608,19 @@ struct Alice3Dilepton { auto mcParticles_per_coll = mcParticles.sliceBy(perMCCollision, mccollision.globalIndex()); int nParticlesInEvent = 0; + int nParticlesFIT=0; for (const auto& mcParticle : mcParticles_per_coll) { + if (mcParticle.isPhysicalPrimary()) { + if ((2.2GetParticle(mcParticle.pdgCode()); + if (pdgParticle) { + float charge = pdgParticle->Charge() / 3.f; // Charge in units of |e| + if (std::abs(charge) >= 1.) { + nParticlesFIT++; + } + } + } + } if (std::abs(mcParticle.pdgCode()) != pdg) { continue; } @@ -624,6 +643,7 @@ struct Alice3Dilepton { } // end of mc particle loop registry.fill(HIST("Generated/Particle/ParticlesPerEvent"), nParticlesInEvent); + registry.fill(HIST("Generated/Particle/ParticlesFIT"), nParticlesFIT); auto neg_mcParticles_coll = neg_mcParticles->sliceByCached(o2::aod::mcparticle::mcCollisionId, mccollision.globalIndex(), cache_mc); auto pos_mcParticles_coll = pos_mcParticles->sliceByCached(o2::aod::mcparticle::mcCollisionId, mccollision.globalIndex(), cache_mc); @@ -636,6 +656,8 @@ struct Alice3Dilepton { } // end of processGen using MyTracksMC = soa::Join; + using Alice3Collision = soa::Join; + // Filter trackFilter = etaMin < o2::aod::track::eta && // o2::aod::track::eta < etaMax && // ptMin < o2::aod::track::pt && @@ -643,11 +665,13 @@ struct Alice3Dilepton { // o2::aod::track_alice3::isReconstructed == selectReconstructed; Filter trackFilter = o2::aod::track_alice3::isReconstructed == selectReconstructed; using MyFilteredTracksMC = soa::Filtered; + Filter configFilter = (aod::upgrade_collision::lutConfigId == otfConfig); + using MyFilteredAlice3Collision = soa::Filtered; Preslice perCollision = aod::track::collisionId; Partition posTracks = o2::aod::track::signed1Pt > 0.f; Partition negTracks = o2::aod::track::signed1Pt < 0.f; - void processRec(const o2::aod::Collisions& collisions, + void processRec(MyFilteredAlice3Collision const& collisions, MyFilteredTracksMC const& tracks, const o2::aod::McCollisions&, const aod::McParticles& mcParticles) From 843f5e2ae8002e65e1bc89d7ab8cc51ab4b3b3dd Mon Sep 17 00:00:00 2001 From: Raphaelle Bailhache Date: Mon, 23 Feb 2026 16:59:38 +0100 Subject: [PATCH 2/2] fix --- ALICE3/Tasks/alice3-dilepton.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ALICE3/Tasks/alice3-dilepton.cxx b/ALICE3/Tasks/alice3-dilepton.cxx index c7e79197049..bb142b11834 100644 --- a/ALICE3/Tasks/alice3-dilepton.cxx +++ b/ALICE3/Tasks/alice3-dilepton.cxx @@ -14,9 +14,9 @@ /// \author s.scheid@cern.ch, daiki.sekihata@cern.ch /// +#include "ALICE3/DataModel/OTFCollision.h" #include "ALICE3/DataModel/OTFRICH.h" #include "ALICE3/DataModel/OTFTOF.h" -#include "ALICE3/DataModel/OTFCollision.h" #include "ALICE3/DataModel/tracksAlice3.h" #include "Common/DataModel/TrackSelectionTables.h" @@ -25,12 +25,11 @@ #include #include #include -#include #include +#include #include - #include using namespace o2; @@ -106,7 +105,7 @@ struct Alice3Dilepton { registry.add("Generated/Particle/prodVy", "Particle Prod. Vertex Y", kTH1F, {axisPrody}); registry.add("Generated/Particle/prodVz", "Particle Prod. Vertex Z", kTH1F, {axisProdz}); registry.add("Generated/Particle/ParticlesPerEvent", "Particles per event", kTH1F, {{100, 0, 100}}); - registry.add("Generated/Particle/ParticlesFit", "Charged Particles in Fit acceptance per event", kTH1F, {{15000,0,15000}}); + registry.add("Generated/Particle/ParticlesFit", "Charged Particles in Fit acceptance per event", kTH1F, {{15000, 0, 15000}}); registry.add("Generated/Pair/ULS/Tried", "Pair tries", kTH1F, {{10, -0.5, 9.5}}); registry.add("Generated/Pair/ULS/Mass", "Pair Mass", kTH1F, {axisM}); @@ -608,10 +607,10 @@ struct Alice3Dilepton { auto mcParticles_per_coll = mcParticles.sliceBy(perMCCollision, mccollision.globalIndex()); int nParticlesInEvent = 0; - int nParticlesFIT=0; + int nParticlesFIT = 0; for (const auto& mcParticle : mcParticles_per_coll) { if (mcParticle.isPhysicalPrimary()) { - if ((2.2GetParticle(mcParticle.pdgCode()); if (pdgParticle) { float charge = pdgParticle->Charge() / 3.f; // Charge in units of |e|