From 311b94d6eb169a2512c51566d93d837e4419bdef Mon Sep 17 00:00:00 2001 From: jesgum Date: Tue, 31 Mar 2026 11:33:05 +0200 Subject: [PATCH] Add evsel isFlangeEvent --- Common/DataModel/Multiplicity.h | 36 ++++++++++++++++---------- Common/Tasks/centralityStudy.cxx | 34 +++++++++++++++++++----- Common/Tools/Multiplicity/MultModule.h | 10 ++++--- 3 files changed, 56 insertions(+), 24 deletions(-) diff --git a/Common/DataModel/Multiplicity.h b/Common/DataModel/Multiplicity.h index 5337d5ffd59..023282d5b12 100644 --- a/Common/DataModel/Multiplicity.h +++ b/Common/DataModel/Multiplicity.h @@ -26,20 +26,19 @@ namespace o2::aod { namespace mult { -DECLARE_SOA_COLUMN(MultFV0A, multFV0A, float); //! -DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //! -DECLARE_SOA_COLUMN(MultFV0C, multFV0C, float); //! -DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float); //! -DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); //! -DECLARE_SOA_COLUMN(MultFDDA, multFDDA, float); //! -DECLARE_SOA_COLUMN(MultFDDC, multFDDC, float); //! -DECLARE_SOA_COLUMN(MultZNA, multZNA, float); //! -DECLARE_SOA_COLUMN(MultZNC, multZNC, float); //! -DECLARE_SOA_COLUMN(MultZEM1, multZEM1, float); //! -DECLARE_SOA_COLUMN(MultZEM2, multZEM2, float); //! -DECLARE_SOA_COLUMN(MultZPA, multZPA, float); //! -DECLARE_SOA_COLUMN(MultZPC, multZPC, float); //! -DECLARE_SOA_DYNAMIC_COLUMN(MultFV0M, multFV0M, //! +DECLARE_SOA_COLUMN(MultFV0A, multFV0A, float); //! +DECLARE_SOA_COLUMN(MultFV0C, multFV0C, float); //! +DECLARE_SOA_COLUMN(MultFT0A, multFT0A, float); //! +DECLARE_SOA_COLUMN(MultFT0C, multFT0C, float); //! +DECLARE_SOA_COLUMN(MultFDDA, multFDDA, float); //! +DECLARE_SOA_COLUMN(MultFDDC, multFDDC, float); //! +DECLARE_SOA_COLUMN(MultZNA, multZNA, float); //! +DECLARE_SOA_COLUMN(MultZNC, multZNC, float); //! +DECLARE_SOA_COLUMN(MultZEM1, multZEM1, float); //! +DECLARE_SOA_COLUMN(MultZEM2, multZEM2, float); //! +DECLARE_SOA_COLUMN(MultZPA, multZPA, float); //! +DECLARE_SOA_COLUMN(MultZPC, multZPC, float); //! +DECLARE_SOA_DYNAMIC_COLUMN(MultFV0M, multFV0M, //! [](float multFV0A, float multFV0C) -> float { return multFV0A + multFV0C; }); DECLARE_SOA_DYNAMIC_COLUMN(MultFT0M, multFT0M, //! [](float multFT0A, float multFT0C) -> float { return multFT0A + multFT0C; }); @@ -100,6 +99,10 @@ DECLARE_SOA_COLUMN(TimeToPrevious, timeToPrevious, float); //! DECLARE_SOA_COLUMN(TimeToNext, timeToNext, float); //! DECLARE_SOA_COLUMN(TimeToNeNext, timeToNeNext, float); //! +// Extra information from FIT detectors +DECLARE_SOA_COLUMN(MultFV0AOuter, multFV0AOuter, float); //! FV0 without innermost ring +DECLARE_SOA_COLUMN(FT0TriggerMask, ft0TriggerMask, uint8_t); //! + } // namespace mult DECLARE_SOA_TABLE(FV0Mults, "AOD", "FV0MULT", //! Multiplicity with the FV0 detector mult::MultFV0A, mult::MultFV0C, @@ -126,6 +129,11 @@ DECLARE_SOA_TABLE(PVMults, "AOD", "PVMULT", //! Multiplicity from the PV contrib mult::IsInelGt1); DECLARE_SOA_TABLE(MFTMults, "AOD", "MFTMULT", //! Multiplicity with MFT mult::MFTNalltracks, mult::MFTNtracks); + +DECLARE_SOA_TABLE(FITExtraMults, "AOD", "FITEXTRAMULT", //! Extra information from FIT detectors + mult::MultFV0AOuter, + mult::FT0TriggerMask); + using BarrelMults = soa::Join; using Mults = soa::Join; using MultsRun3 = soa::Join; diff --git a/Common/Tasks/centralityStudy.cxx b/Common/Tasks/centralityStudy.cxx index e4a99dedb88..2b9ed353d6c 100644 --- a/Common/Tasks/centralityStudy.cxx +++ b/Common/Tasks/centralityStudy.cxx @@ -20,6 +20,7 @@ #include "Common/DataModel/Multiplicity.h" #include +#include #include #include #include @@ -91,6 +92,7 @@ struct centralityStudy { Configurable requireIsVertexTOFmatched{"requireIsVertexTOFmatched", false, "require events with at least one of vertex contributors matched to TOF"}; Configurable requireIsVertexTRDmatched{"requireIsVertexTRDmatched", false, "require events with at least one of vertex contributors matched to TRD"}; Configurable rejectSameBunchPileup{"rejectSameBunchPileup", true, "reject collisions in case of pileup with another collision in the same foundBC"}; + Configurable rejectIsFlangeEvent{"rejectIsFlangeEvent", false, "At least one channel with -350 TDC < time < -450 TDC"}; Configurable rejectITSinROFpileupStandard{"rejectITSinROFpileupStandard", false, "reject collisions in case of in-ROF ITS pileup (standard)"}; Configurable rejectITSinROFpileupStrict{"rejectITSinROFpileupStrict", false, "reject collisions in case of in-ROF ITS pileup (strict)"}; @@ -201,8 +203,12 @@ struct centralityStudy { histos.get(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(11, "Neighbour rejection"); histos.get(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(12, "no ITS in-ROF pileup (standard)"); histos.get(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(13, "no ITS in-ROF pileup (strict)"); + histos.get(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(14, "is UPC event"); + histos.get(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(15, "rejectCollInTimeRangeNarrow"); + histos.get(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(16, "em/upc rejection"); + histos.get(HIST("hCollisionSelection"))->GetXaxis()->SetBinLabel(17, "isFlangeEvent"); - histos.add("hFT0A_Collisions", "hFT0C_Collisions", kTH1D, {axisMultUltraFineFT0A}); + histos.add("hFT0A_Collisions", "hFT0A_Collisions", kTH1D, {axisMultUltraFineFT0A}); histos.add("hFT0C_Collisions", "hFT0C_Collisions", kTH1D, {axisMultUltraFineFT0C}); histos.add("hFT0M_Collisions", "hFT0M_Collisions", kTH1D, {axisMultUltraFineFT0M}); histos.add("hFV0A_Collisions", "hFV0A_Collisions", kTH1D, {axisMultUltraFineFV0A}); @@ -372,6 +378,10 @@ struct centralityStudy { getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(11, "Neighbour rejection"); getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(12, "no ITS in-ROF pileup (standard)"); getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(13, "no ITS in-ROF pileup (strict)"); + getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(14, "is UPC event"); + getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(15, "rejectCollInTimeRangeNarrow"); + getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(16, "em/upc rejection"); + getHist(TH1, histPath + "hCollisionSelection")->GetXaxis()->SetBinLabel(17, "isFlangeEvent"); histPointers.insert({histPath + "hFT0C_Collisions", histos.add((histPath + "hFT0C_Collisions").c_str(), "hFT0C_Collisions", {kTH1D, {{axisMultUltraFineFT0C}}})}); histPointers.insert({histPath + "hFT0A_Collisions", histos.add((histPath + "hFT0A_Collisions").c_str(), "hFT0A_Collisions", {kTH1D, {{axisMultUltraFineFT0A}}})}); @@ -608,7 +618,7 @@ struct centralityStudy { if (!passRejectCollInTimeRangeNarrow) { return; } - histos.fill(HIST("hCollisionSelection"), 14 /* Not ITS ROF pileup (strict) */); + histos.fill(HIST("hCollisionSelection"), 14 /* Reject collision in narrow time range */); getHist(TH1, histPath + "hCollisionSelection")->Fill(14); if (collision.multFT0C() < upcRejection.maxFT0CforZNACselection && @@ -627,6 +637,18 @@ struct centralityStudy { histos.fill(HIST("hCollisionSelection"), 15 /* pass em/upc rejection */); getHist(TH1, histPath + "hCollisionSelection")->Fill(15); + if (rejectIsFlangeEvent) { + if constexpr (requires { collision.ft0TriggerMask(); }) { + constexpr int IsFlangeEventId = 7; + std::bitset<8> ft0TriggerMask = collision.ft0TriggerMask(); + if (ft0TriggerMask[IsFlangeEventId]) { + return; + } + } + } + histos.fill(HIST("hCollisionSelection"), 16 /* reject flange events */); + getHist(TH1, histPath + "hCollisionSelection")->Fill(16); + // if we got here, we also finally fill the FT0C histogram, please histos.fill(HIST("hNPVContributors"), collision.multNTracksPV()); histos.fill(HIST("hFT0A_Collisions"), collision.multFT0A() * scaleSignalFT0C); @@ -789,22 +811,22 @@ struct centralityStudy { } } - void processCollisions(soa::Join::iterator const& collision, aod::MultBCs const&) + void processCollisions(soa::Join::iterator const& collision, aod::MultBCs const&) { genericProcessCollision(collision); } - void processCollisionsWithResolutionStudy(soa::Join::iterator const& collision, soa::Join const&) + void processCollisionsWithResolutionStudy(soa::Join::iterator const& collision, soa::Join const&) { genericProcessCollision(collision); } - void processCollisionsWithCentrality(soa::Join::iterator const& collision, aod::MultBCs const&) + void processCollisionsWithCentrality(soa::Join::iterator const& collision, aod::MultBCs const&) { genericProcessCollision(collision); } - void processCollisionsWithCentralityWithNeighbours(soa::Join::iterator const& collision) + void processCollisionsWithCentralityWithNeighbours(soa::Join::iterator const& collision) { genericProcessCollision(collision); } diff --git a/Common/Tools/Multiplicity/MultModule.h b/Common/Tools/Multiplicity/MultModule.h index 3fc13db0d7f..267cd060344 100644 --- a/Common/Tools/Multiplicity/MultModule.h +++ b/Common/Tools/Multiplicity/MultModule.h @@ -145,7 +145,7 @@ static const int defaultParameters[nTablesConst][nParameters]{ // table index : match order above enum tableIndex { kFV0Mults, // standard - kFV0AOuterMults, // standard + kFITExtraMults, // standard kFT0Mults, // standard kFDDMults, // standard kZDCMults, // standard @@ -191,7 +191,7 @@ struct products : o2::framework::ProducesGroup { //__________________________________________________ // multiplicity tables o2::framework::Produces tableFV0; - o2::framework::Produces tableFV0AOuter; + o2::framework::Produces tableFITExtraMults; o2::framework::Produces tableFT0; o2::framework::Produces tableFDD; o2::framework::Produces tableZDC; @@ -256,6 +256,7 @@ struct multEntry { float multZPA = 0.0f; float multZPC = 0.0f; int multTracklets = 0; + uint8_t fitTriggerMask{}; int multNContribs = 0; // PVMult 0.8 int multNContribsEta1 = 0; // PVMult 1.0 @@ -705,6 +706,7 @@ class MultModule } if (collision.has_foundFT0()) { const auto& ft0 = collision.foundFT0(); + mults.fitTriggerMask = ft0.triggerMask(); for (const auto& amplitude : ft0.amplitudeA()) { mults.multFT0A += amplitude; } @@ -750,8 +752,8 @@ class MultModule if (internalOpts.mEnabledTables[kFV0Mults]) { cursors.tableFV0(mults.multFV0A, mults.multFV0C); } - if (internalOpts.mEnabledTables[kFV0AOuterMults]) { - cursors.tableFV0AOuter(mults.multFV0AOuter); + if (internalOpts.mEnabledTables[kFITExtraMults]) { + cursors.tableFITExtraMults(mults.multFV0AOuter, mults.fitTriggerMask); } if (internalOpts.mEnabledTables[kFT0Mults]) { cursors.tableFT0(mults.multFT0A, mults.multFT0C);