diff --git a/Common/DataModel/Multiplicity.h b/Common/DataModel/Multiplicity.h index 023282d5b12..0d04cfc2a14 100644 --- a/Common/DataModel/Multiplicity.h +++ b/Common/DataModel/Multiplicity.h @@ -285,6 +285,9 @@ DECLARE_SOA_TABLE(MultBCs, "AOD", "MULTBC", //! bc::Flags); using MultBC = MultBCs::iterator; +DECLARE_SOA_TABLE(MultBcSel, "AOD", "MULTBCSEL", //! BC selection bits joinable with multBCs + evsel::Selection); + // crosslinks namespace mult { diff --git a/Common/TableProducer/multiplicityExtraTable.cxx b/Common/TableProducer/multiplicityExtraTable.cxx index 949d461298d..7319a082c63 100644 --- a/Common/TableProducer/multiplicityExtraTable.cxx +++ b/Common/TableProducer/multiplicityExtraTable.cxx @@ -41,6 +41,7 @@ const int nBCsPerOrbit = o2::constants::lhc::LHCMaxBunches; struct MultiplicityExtraTable { Produces multBC; + Produces multBcSel; Produces multNeigh; Produces mult2bc; @@ -85,7 +86,7 @@ struct MultiplicityExtraTable { using BCsWithRun3Matchings = soa::Join; - void processBCs(soa::Join const& bcs, aod::FV0As const&, aod::FT0s const&, aod::FDDs const&, aod::Zdcs const&, soa::Join const& collisions) + void processBCs(soa::Join const& bcs, aod::FV0As const&, aod::FT0s const&, aod::FDDs const&, aod::Zdcs const&, soa::Join const& collisions) { //+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+-<*>-+ // determine saved BCs and corresponding new BC table index @@ -260,6 +261,8 @@ struct MultiplicityExtraTable { multFV0TriggerBits, multFT0TriggerBits, multFDDTriggerBits, multBCTriggerMask, collidingBC, bc.timestamp(), bc.flags()); + + multBcSel(bc.selection_raw()); } } diff --git a/Common/Tasks/centralityStudy.cxx b/Common/Tasks/centralityStudy.cxx index 2b9ed353d6c..08e9185c084 100644 --- a/Common/Tasks/centralityStudy.cxx +++ b/Common/Tasks/centralityStudy.cxx @@ -97,6 +97,7 @@ struct centralityStudy { 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)"}; Configurable rejectCollInTimeRangeNarrow{"rejectCollInTimeRangeNarrow", false, "reject if extra colls in time range (narrow)"}; + Configurable rejectZNAC{"rejectZNAC", false, "reject if !(kIsBBZNA && kIsBBZNC)"}; Configurable selectUPCcollisions{"selectUPCcollisions", false, "select collisions tagged with UPC flag"}; @@ -225,6 +226,13 @@ struct centralityStudy { if (doprocessBCs) { histos.add("hBCSelection", "hBCSelection", kTH1D, {{20, -0.5, 19.5f}}); + histos.get(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(1, "All BCs"); + histos.get(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(2, "Colliding BCs"); + histos.get(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(3, "TVX"); + histos.get(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(4, "FV0OrA"); + histos.get(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(5, "upc rej"); + histos.get(HIST("hBCSelection"))->GetXaxis()->SetBinLabel(6, "zdc rej"); + histos.add("hFT0C_BCs", "hFT0C_BCs", kTH1D, {axisMultUltraFineFT0C}); histos.add("hFT0M_BCs", "hFT0M_BCs", kTH1D, {axisMultUltraFineFT0M}); histos.add("hFV0A_BCs", "hFV0A_BCs", kTH1D, {axisMultUltraFineFV0A}); @@ -831,27 +839,31 @@ struct centralityStudy { genericProcessCollision(collision); } - void processBCs(soa::Join::iterator const& multbc, soa::Join const&) + void processBCs(soa::Join::iterator const& multbc, soa::Join const&) { // process BCs, calculate FT0C distribution // conditionals suggested by FIT team (Jacek O. et al) histos.fill(HIST("hBCSelection"), 0); // all BCs + if (selectCollidingBCs && !multbc.multCollidingBC()) return; histos.fill(HIST("hBCSelection"), 1); // colliding + if (selectTVX && !multbc.multTVX()) return; histos.fill(HIST("hBCSelection"), 2); // TVX + if (selectFV0OrA && !multbc.multFV0OrA()) return; histos.fill(HIST("hBCSelection"), 3); // FV0OrA + if (vertexZwithT0 < 100.0f) { if (!multbc.multFT0PosZValid()) return; if (TMath::Abs(multbc.multFT0PosZ()) > vertexZwithT0) return; } - histos.fill(HIST("hBCSelection"), 4); // FV0OrA + histos.fill(HIST("hBCSelection"), 4); // FT0PosZ if (multbc.multFT0C() < upcRejection.maxFT0CforZNACselection && multbc.multZNA() < upcRejection.minZNACsignal && @@ -866,8 +878,11 @@ struct centralityStudy { multbc.multFDDA() < upcRejection.minFDDAsignal) { return; } - - histos.fill(HIST("hBCSelection"), 5); // znac + histos.fill(HIST("hBCSelection"), 5); // znac amp + if (rejectZNAC && !multbc.selection_bit(o2::aod::evsel::kIsBBZNA) && !multbc.selection_bit(o2::aod::evsel::kIsBBZNC)) { + return; + } + histos.fill(HIST("hBCSelection"), 6); // znac time // if we got here, we also finally fill the FT0C histogram, please histos.fill(HIST("hFT0C_BCs"), multbc.multFT0C() * scaleSignalFT0C);