Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
DerivationFramework::TriggerSkimmingTool Class Reference

#include <TriggerSkimmingTool.h>

Inheritance diagram for DerivationFramework::TriggerSkimmingTool:
Collaboration diagram for DerivationFramework::TriggerSkimmingTool:

Public Member Functions

 TriggerSkimmingTool (const std::string &t, const std::string &n, const IInterface *p)
 
bool eventPassesFilter () const override
 
StatusCode initialize () override
 

Private Attributes

Gaudi::Property< std::vector< std::string > > m_triggerListAND {this,"TriggerListAND", {}}
 
Gaudi::Property< std::vector< std::string > > m_triggerListOR {this,"TriggerListOR", {}}
 
Gaudi::Property< std::vector< std::string > > m_triggerListORHLTOnly {this,"TriggerListORHLTOnly", {}, "Decision is based on HLT only (unseeded triggers)"}
 
PublicToolHandle< Trig::TrigDecisionToolm_trigDec {this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool"}
 

Detailed Description

Definition at line 20 of file TriggerSkimmingTool.h.

Constructor & Destructor Documentation

◆ TriggerSkimmingTool()

DerivationFramework::TriggerSkimmingTool::TriggerSkimmingTool ( const std::string &  t,
const std::string &  n,
const IInterface *  p 
)

Definition at line 23 of file TriggerSkimmingTool.cxx.

25  :
26  base_class(t,n,p) {
27 
28  }

Member Function Documentation

◆ eventPassesFilter()

bool DerivationFramework::TriggerSkimmingTool::eventPassesFilter ( ) const
override

Definition at line 38 of file TriggerSkimmingTool.cxx.

39  {
40 
41  if (msgLvl(MSG::VERBOSE)){
42  const Trig::ChainGroup* Chain = m_trigDec->getChainGroup(".*");
43  const std::vector<std::string> fired_triggers = Chain->getListOfTriggers();
44  for (const std::string& fired : fired_triggers) {
45  if (m_trigDec->isPassed(fired)) ATH_MSG_VERBOSE("Fired trigger "<<fired);
46  }
47  }
48 
49  unsigned int cntrAND{0}, cntrOR{0}, cntrORHLTOnly{0};
50  for (const std::string& trig_and : m_triggerListAND) {
51  ATH_MSG_DEBUG("AND - Trigger "<<trig_and<<" passed "<<m_trigDec->isPassed(trig_and));
52  cntrAND+=(m_trigDec->isPassed(trig_and));
53  }
54  for (const std::string& trig_or : m_triggerListOR) {
55  ATH_MSG_DEBUG("OR - Trigger "<<trig_or<<" passed "<<m_trigDec->isPassed(trig_or));
56  cntrOR +=(m_trigDec->isPassed(trig_or));
57  }
58  for (const std::string& trig_orhltonly : m_triggerListORHLTOnly) {
59  ATH_MSG_DEBUG("ORHLTOnly - Trigger "<<trig_orhltonly<<" passed "<<m_trigDec->isPassed(trig_orhltonly, TrigDefs::requireDecision));
60  cntrORHLTOnly +=(m_trigDec->isPassed(trig_orhltonly, TrigDefs::requireDecision));
61  }
62 
63  bool passAND = (cntrAND==m_triggerListAND.size() && !m_triggerListAND.empty());
64  bool passOR = (cntrOR > 0);
65  bool passORHLTOnly = (cntrORHLTOnly > 0);
66 
67  bool pass = passAND || passOR || passORHLTOnly;
68  return pass;
69  }

◆ initialize()

StatusCode DerivationFramework::TriggerSkimmingTool::initialize ( )
override

Definition at line 30 of file TriggerSkimmingTool.cxx.

31  {
32  ATH_CHECK(m_trigDec.retrieve());
33  return StatusCode::SUCCESS;
34  }

Member Data Documentation

◆ m_trigDec

PublicToolHandle<Trig::TrigDecisionTool> DerivationFramework::TriggerSkimmingTool::m_trigDec {this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool"}
private

Definition at line 31 of file TriggerSkimmingTool.h.

◆ m_triggerListAND

Gaudi::Property<std::vector<std::string> > DerivationFramework::TriggerSkimmingTool::m_triggerListAND {this,"TriggerListAND", {}}
private

Definition at line 28 of file TriggerSkimmingTool.h.

◆ m_triggerListOR

Gaudi::Property<std::vector<std::string> > DerivationFramework::TriggerSkimmingTool::m_triggerListOR {this,"TriggerListOR", {}}
private

Definition at line 29 of file TriggerSkimmingTool.h.

◆ m_triggerListORHLTOnly

Gaudi::Property<std::vector<std::string> > DerivationFramework::TriggerSkimmingTool::m_triggerListORHLTOnly {this,"TriggerListORHLTOnly", {}, "Decision is based on HLT only (unseeded triggers)"}
private

Definition at line 30 of file TriggerSkimmingTool.h.


The documentation for this class was generated from the following files:
DerivationFramework::TriggerSkimmingTool::m_triggerListAND
Gaudi::Property< std::vector< std::string > > m_triggerListAND
Definition: TriggerSkimmingTool.h:28
DerivationFramework::TriggerSkimmingTool::m_triggerListORHLTOnly
Gaudi::Property< std::vector< std::string > > m_triggerListORHLTOnly
Definition: TriggerSkimmingTool.h:30
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
beamspotman.n
n
Definition: beamspotman.py:731
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trig::ChainGroup
Definition: ChainGroup.h:51
DerivationFramework::TriggerSkimmingTool::m_trigDec
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
Definition: TriggerSkimmingTool.h:31
DerivationFramework::TriggerSkimmingTool::m_triggerListOR
Gaudi::Property< std::vector< std::string > > m_triggerListOR
Definition: TriggerSkimmingTool.h:29
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:13
Trig::ChainGroup::getListOfTriggers
std::vector< std::string > getListOfTriggers() const
Definition: ChainGroup.cxx:467
passOR
@ passOR
Definition: SUSYToolsTester.cxx:105