|
15 | 15 | #include "Common/CCDB/EventSelectionParams.h" |
16 | 16 | #include "Common/CCDB/TriggerAliases.h" |
17 | 17 | #include "Common/Core/TableHelper.h" |
| 18 | +#include "Common/Core/Zorro.h" |
18 | 19 | #include "Common/DataModel/Centrality.h" |
19 | 20 | #include "Common/DataModel/EventSelection.h" |
20 | 21 | #include "Common/DataModel/Multiplicity.h" |
@@ -92,7 +93,7 @@ struct FilterCF { |
92 | 93 | O2_DEFINE_CONFIGURABLE(cfgCutMCPt, float, 0.5f, "Minimal pT for particles"); |
93 | 94 | O2_DEFINE_CONFIGURABLE(cfgCutMCEta, float, 0.8f, "Eta range for particles"); |
94 | 95 | O2_DEFINE_CONFIGURABLE(cfgVerbosity, int, 1, "Verbosity level (0 = major, 1 = per collision)"); |
95 | | - O2_DEFINE_CONFIGURABLE(cfgTrigger, int, 7, "Trigger choice: (0 = none, 7 = sel7, 8 = sel8, 9 = sel8 + kNoSameBunchPileup + kIsGoodZvtxFT0vsPV, 10 = sel8 before April, 2024, 11 = sel8 for MC, 12 = sel8 with low occupancy cut, 13 = sel8 + kNoSameBunchPileup + kIsGoodITSLayersAll -- for OO/NeNe) "); |
| 96 | + O2_DEFINE_CONFIGURABLE(cfgTrigger, int, 7, "Trigger choice: (0 = none, 7 = sel7, 8 = sel8, 9 = sel8 + kNoSameBunchPileup + kIsGoodZvtxFT0vsPV, 10 = sel8 before April, 2024, 11 = sel8 for MC, 12 = sel8 with low occupancy cut, 13 = sel8 + kNoSameBunchPileup + kIsGoodITSLayersAll -- for OO/NeNe, 14 = fHighTrackMult (pp), 15 = fHighMultFv0 (pp), 16 = fHighTrackMult || fHighMultFv0 (pp))"); |
96 | 97 | O2_DEFINE_CONFIGURABLE(cfgMinOcc, int, 0, "minimum occupancy selection"); |
97 | 98 | O2_DEFINE_CONFIGURABLE(cfgMaxOcc, int, 3000, "maximum occupancy selection"); |
98 | 99 | O2_DEFINE_CONFIGURABLE(cfgCollisionFlags, uint16_t, aod::collision::CollisionFlagsRun2::Run2VertexerTracks, "Request collision flags if non-zero (0 = off, 1 = Run2VertexerTracks)"); |
@@ -135,6 +136,9 @@ struct FilterCF { |
135 | 136 |
|
136 | 137 | HistogramRegistry registrytrackQA{"TrackQA", {}, OutputObjHandlingPolicy::AnalysisObject, true, true}; |
137 | 138 |
|
| 139 | + Zorro zorro; |
| 140 | + int zorroRun = 0; |
| 141 | + |
138 | 142 | Produces<aod::CFCollisions> outputCollisions; |
139 | 143 | Produces<aod::CFCollisionsExtra> outputCollisionsExtra; |
140 | 144 | Produces<aod::CFTracks> outputTracks; |
@@ -194,12 +198,13 @@ struct FilterCF { |
194 | 198 | return; |
195 | 199 | } |
196 | 200 | localMultiplicityEfficiency.reset(dynamic_cast<THn*>(efficiency->Clone())); |
197 | | - } else { |
198 | | - ccdb->setURL("http://alice-ccdb.cern.ch"); |
199 | | - ccdb->setCaching(true); |
200 | | - ccdb->setLocalObjectValidityChecking(); |
201 | 201 | } |
202 | 202 | } |
| 203 | + if ((cfgTrigger >= 14 && cfgTrigger <= 16) || (!cfgEfficiencyMultiplicity.value.empty() && cfgLocalEfficiency == 0)) { // o2-linter: disable=magic-number (documented legacy trigger-selection code) |
| 204 | + ccdb->setURL("http://alice-ccdb.cern.ch"); |
| 205 | + ccdb->setCaching(true); |
| 206 | + ccdb->setLocalObjectValidityChecking(); |
| 207 | + } |
203 | 208 | if (doprocessTrackQA) { |
204 | 209 | registrytrackQA.add("zvtx", "Z Vertex position; posz (cm); Events", HistType::kTH1F, {{100, -12, 12}}); |
205 | 210 | registrytrackQA.add("eta", "eta distribution; eta; arb. units", HistType::kTH1F, {{100, -2, 2}}); |
@@ -249,6 +254,26 @@ struct FilterCF { |
249 | 254 | if (cfgTrigger == 13) { // relevant for pO/OO/NeNe, recommended by Physics Board on 27.01.2026; o2-linter: disable=magic-number (documented legacy trigger-selection code) |
250 | 255 | return isMultSelected && collision.sel8() && collision.selection_bit(aod::evsel::kNoSameBunchPileup) && collision.selection_bit(aod::evsel::kIsGoodZvtxFT0vsPV); |
251 | 256 | } |
| 257 | + |
| 258 | + // Zorro-based trigger selection |
| 259 | + if (cfgTrigger >= 14 && cfgTrigger <= 16) { // o2-linter: disable=magic-number (documented legacy trigger-selection code) |
| 260 | + std::string zorroMask; |
| 261 | + if (cfgTrigger == 14) { // High-multiplicity pp trigger based on tracks (PWGMM/multFilter.cxx); o2-linter: disable=magic-number (documented legacy trigger-selection code) |
| 262 | + zorroMask = "fHighTrackMult"; |
| 263 | + } |
| 264 | + if (cfgTrigger == 15) { // High-multiplicity pp trigger based on FV0 amplitude (PWGMM/multFilter.cxx); o2-linter: disable=magic-number (documented legacy trigger-selection code) |
| 265 | + zorroMask = "fHighMultFv0"; |
| 266 | + } |
| 267 | + if (cfgTrigger == 16) { // High-multiplicity pp trigger based on tracks or FV0 amplitude (PWGMM/multFilter.cxx); o2-linter: disable=magic-number (documented legacy trigger-selection code) |
| 268 | + zorroMask = "fHighTrackMult,fHighMultFv0"; |
| 269 | + } |
| 270 | + auto bc = collision.template bc_as<aod::BCsWithTimestamps>(); |
| 271 | + if (zorroRun != bc.runNumber()) { |
| 272 | + zorro.initCCDB(ccdb.service, bc.runNumber(), bc.timestamp(), zorroMask); |
| 273 | + zorroRun = bc.runNumber(); |
| 274 | + } |
| 275 | + return isMultSelected && zorro.isSelected(bc.globalBC(), 0); // Set BC threshold to zero to not admit nearby low-multiplicity collisions |
| 276 | + } |
252 | 277 | return false; |
253 | 278 | } |
254 | 279 |
|
@@ -488,7 +513,7 @@ struct FilterCF { |
488 | 513 | } |
489 | 514 | PROCESS_SWITCH(FilterCF, processDataMults, "Process data with multiplicity sets", false); |
490 | 515 |
|
491 | | - void processTrackQA(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CFMultiplicities>>::iterator const& collision, soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA>> const& tracks) |
| 516 | + void processTrackQA(soa::Filtered<soa::Join<aod::Collisions, aod::EvSels, aod::CFMultiplicities>>::iterator const& collision, aod::BCsWithTimestamps const&, soa::Filtered<soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TracksDCA>> const& tracks) |
492 | 517 | { |
493 | 518 | if (!keepCollision(collision)) { |
494 | 519 | return; |
|
0 commit comments