Skip to content

Commit aa3068b

Browse files
lauraserLaura Serksnyte
andauthored
[PWGCF] Change how triggers of interest are selected to avoid hard-coded flags (#13599)
Co-authored-by: Laura Serksnyte <lserksny@alicecerno2.cern.ch>
1 parent 0ecd613 commit aa3068b

File tree

1 file changed

+2
-23
lines changed

1 file changed

+2
-23
lines changed

PWGCF/FemtoDream/TableProducer/femtoDreamProducerTask.cxx

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,6 @@ using FemtoFullTracks =
7575
aod::pidTOFFullPr, aod::pidTOFFullDe, aod::pidTOFFullTr, aod::pidTOFFullHe>;
7676
} // namespace o2::aod
7777

78-
namespace softwareTriggers
79-
{
80-
static const int nTriggers = 11;
81-
static const std::vector<std::string> triggerNames{"fPPP", "fPPL", "fPLL", "fLLL", "fPD", "fLD", "fDoubleXi", "fDoubleOmega", "fOmegaHighMult", "fTrackedXi", "fTrackedOmega"};
82-
static const float triggerSwitches[1][nTriggers]{
83-
{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
84-
} // namespace softwareTriggers
85-
8678
template <typename T>
8779
int getRowDaughters(int daughID, T const& vecID)
8880
{
@@ -119,10 +111,7 @@ struct femtoDreamProducerTask {
119111
FemtoDreamCollisionSelection colCuts;
120112
// Event cuts - Triggers
121113
Configurable<bool> ConfEnableTriggerSelection{"ConfEnableTriggerSelection", false, "Should the trigger selection be enabled for collisions?"};
122-
Configurable<LabeledArray<float>> ConfTriggerSwitches{
123-
"ConfTriggerSwitches",
124-
{softwareTriggers::triggerSwitches[0], 1, softwareTriggers::nTriggers, std::vector<std::string>{"Switch"}, softwareTriggers::triggerNames},
125-
"Turn on which trigger should be checked for recorded events to pass selection"};
114+
Configurable<std::string> ConfSoftwareTriggerNames{"ConfSoftwareTriggerNames", "fPPL", "Names of the software triggers, use comma and no space"};
126115
Configurable<std::string> ConfBaseCCDBPathForTriggers{"ConfBaseCCDBPathForTriggers", "Users/m/mpuccio/EventFiltering/OTS/Chunked/", "Provide ccdb path for trigger table; default - trigger coordination"};
127116

128117
// Event cuts - usual selection criteria
@@ -304,7 +293,6 @@ struct femtoDreamProducerTask {
304293

305294
int mRunNumber;
306295
float mMagField;
307-
std::string zorroTriggerNames = "";
308296
Service<o2::ccdb::BasicCCDBManager> ccdb; /// Accessing the CCDB
309297
RCTFlagsChecker rctChecker;
310298

@@ -340,15 +328,6 @@ struct femtoDreamProducerTask {
340328
ResoRegistry.add("AnalysisQA/Reso/PtD1_selected", "Transverse momentum of all processed tracks;p_{T} (GeV/c);Entries", HistType::kTH1F, {{1000, 0, 10}});
341329
ResoRegistry.add("AnalysisQA/Reso/PtD2_selected", "Transverse momentum of all processed tracks;p_{T} (GeV/c);Entries", HistType::kTH1F, {{1000, 0, 10}});
342330

343-
if (ConfEnableTriggerSelection) {
344-
for (const std::string& triggerName : softwareTriggers::triggerNames) {
345-
if (ConfTriggerSwitches->get("Switch", triggerName.c_str())) {
346-
zorroTriggerNames += triggerName + ",";
347-
}
348-
}
349-
zorroTriggerNames.pop_back();
350-
}
351-
352331
rctChecker.init(rctCut.cfgEvtRCTFlagCheckerLabel, false, rctCut.cfgEvtRCTFlagCheckerLimitAcceptAsBad);
353332

354333
colCuts.setCuts(ConfEvtZvtx.value, ConfEvtTriggerCheck.value, ConfEvtTriggerSel.value, ConfEvtOfflineCheck.value, ConfEvtAddOfflineCheck.value, ConfIsRun3.value, ConfEvtMinSphericity.value, ConfEvtSphericityPtmin.value);
@@ -521,7 +500,7 @@ struct femtoDreamProducerTask {
521500
// Init for zorro to get trigger flags
522501
if (ConfEnableTriggerSelection) {
523502
zorro.setCCDBpath(ConfBaseCCDBPathForTriggers);
524-
zorro.initCCDB(ccdb.service, mRunNumber, timestamp, zorroTriggerNames);
503+
zorro.initCCDB(ccdb.service, mRunNumber, timestamp, ConfSoftwareTriggerNames.value);
525504
}
526505
}
527506

0 commit comments

Comments
 (0)