3 #include "StTriggerFilterMaker.h"
4 #include "StMuDSTMaker/COMMON/StMuDst.h"
5 #include "StMuDSTMaker/COMMON/StMuEvent.h"
6 #include "StRoot/StEvent/StEvent.h"
7 #include "StRoot/StEvent/StTriggerData.h"
14 StTriggerFilterMaker::~StTriggerFilterMaker() {
15 mGoodTriggers.clear();
16 mVetoTriggers.clear();
19 Int_t StTriggerFilterMaker::Init() {
21 SetAttr(
".Privilege",1);
27 vector<unsigned int> triggerIds;
28 std::function<bool(unsigned int)> isTrigger;
32 triggerIds = trgIdColl->nominal()->triggerIds();
33 isTrigger = std::bind(&StTriggerId::isTrigger, trgIdColl->nominal(), std::placeholders::_1);
34 trgdata =
event->triggerData();
38 triggerIds = trgIdColl.nominal().triggerIds();
39 isTrigger = std::bind(&StTriggerId::isTrigger, &trgIdColl.nominal(), std::placeholders::_1);
42 LOG_INFO <<
"No StEvent nor Mudst" << endm;
46 LOG_INFO <<
"Offline Trigger Id = ";
47 for(
unsigned int id : triggerIds) LOG_INFO <<
id <<
" ";
52 LOG_INFO <<
"No TriggerData found but needed for TOF cut" << endm;
55 unsigned int tof = trgdata->tofMultiplicity();
56 if(tof >= mTofUpperLimit){
57 LOG_INFO << Form(
" Rejected with TOFmult uppter limit TOFM=%d < UpperLimit=%d",
58 tof,mTofUpperLimit) << endm;
62 for(
unsigned int id_veto : mVetoTriggers) {
63 if(isTrigger(id_veto)){
64 if(mPrint) LOG_INFO <<
" Vetoed by id= " << id_veto << endm;
68 for(
unsigned int id_good : mGoodTriggers){
69 if(isTrigger(id_good)){
70 if (mPrint) LOG_INFO <<
" Accepted with id=" << id_good << endm;
74 if(mPrint) LOG_INFO <<
"Skip (no good triggerId)" << endm;
Collection of trigger ids as stored in StEvent.
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
Collection of trigger ids as stored in MuDst.