ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TrigTauCaloHypoTool Class Reference

HLT CaloMVA step TauJet selection hypothesis tools. More...

#include <TrigTauCaloHypoTool.h>

Inheritance diagram for TrigTauCaloHypoTool:
Collaboration diagram for TrigTauCaloHypoTool:

Public Member Functions

 TrigTauCaloHypoTool (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode initialize () override
 
virtual StatusCode decide (std::vector< ITrigTauCaloHypoTool::ToolInfo > &input) const override
 
virtual bool decide (const ITrigTauCaloHypoTool::ToolInfo &i) const override
 

Private Attributes

HLT::Identifier m_decisionId
 
Gaudi::Property< float > m_ptMin {this, "PtMin", 0, "Tau pT minimum cut"}
 
Gaudi::Property< bool > m_acceptAll {this, "AcceptAll", false, "Ignore selection"}
 
ToolHandle< GenericMonitoringToolm_monTool {this, "MonTool", "", "Monitoring tool"}
 

Detailed Description

HLT CaloMVA step TauJet selection hypothesis tools.

Definition at line 33 of file TrigTauCaloHypoTool.h.

Constructor & Destructor Documentation

◆ TrigTauCaloHypoTool()

TrigTauCaloHypoTool::TrigTauCaloHypoTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 28 of file TrigTauCaloHypoTool.cxx.

30 {
31 
32 }

Member Function Documentation

◆ decide() [1/2]

bool TrigTauCaloHypoTool::decide ( const ITrigTauCaloHypoTool::ToolInfo i) const
overridevirtual

Definition at line 47 of file TrigTauCaloHypoTool.cxx.

48 {
49  // Monitoring config
50  auto passedCuts = Monitored::Scalar<unsigned int>("CutCounter", 0);
51  auto pT = Monitored::Scalar<float>("pT", 0);
52  auto mon = Monitored::Group(m_monTool, passedCuts);
53 
54 
55  // Get TauJet collection
56  const xAOD::TauJetContainer* tauJets = input.tauContainer;
57 
58  if(tauJets->empty()){
59  ATH_MSG_DEBUG("No taus in input collection: Rejecting");
60  return false;
61  }
62 
63 
64  // Tau pass flag
65  bool pass = false;
66 
67  if(m_acceptAll) {
68  pass = true;
69  ATH_MSG_DEBUG("AcceptAll property is set: taking all events");
70  }
71 
72 
73  // There should only be a single TauJet in the container (one TauJet in the view);
74  // just in case we still run the loop
75  for(const xAOD::TauJet* tau : *tauJets) {
76  ATH_MSG_DEBUG(" New HLT TauJet candidate");
77 
78  ATH_MSG_DEBUG(" pT: " << tau->pt() / Gaudi::Units::GeV);
79 
80  // Evaluate minimum pT cut
81  if(!(tau->pt() > m_ptMin)) continue;
82  passedCuts++;
83  pT = tau->pt() / Gaudi::Units::GeV;
84 
85  pass = true;
86 
87  ATH_MSG_DEBUG(" Pass hypo tool: " << pass);
88  }
89 
90  return pass;
91 }

◆ decide() [2/2]

StatusCode TrigTauCaloHypoTool::decide ( std::vector< ITrigTauCaloHypoTool::ToolInfo > &  input) const
overridevirtual

Definition at line 94 of file TrigTauCaloHypoTool.cxx.

95 {
96  for(auto& i : input) {
97  if(passed(m_decisionId.numeric(), i.previousDecisionIDs)) {
98  if(decide(i)) {
99  addDecisionID(m_decisionId, i.decision);
100  }
101  }
102  }
103  return StatusCode::SUCCESS;
104 }

◆ initialize()

StatusCode TrigTauCaloHypoTool::initialize ( )
overridevirtual

Definition at line 35 of file TrigTauCaloHypoTool.cxx.

36 {
37  if(!m_monTool.empty()) ATH_CHECK(m_monTool.retrieve());
38 
39  ATH_MSG_DEBUG("Tool configured for chain/id: " << m_decisionId);
40  ATH_MSG_DEBUG(" - PtMin: " << m_ptMin.value());
41  ATH_MSG_DEBUG(" - AcceptAll: " << m_acceptAll.value());
42 
43  return StatusCode::SUCCESS;
44 }

Member Data Documentation

◆ m_acceptAll

Gaudi::Property<bool> TrigTauCaloHypoTool::m_acceptAll {this, "AcceptAll", false, "Ignore selection"}
private

Definition at line 47 of file TrigTauCaloHypoTool.h.

◆ m_decisionId

HLT::Identifier TrigTauCaloHypoTool::m_decisionId
private

Definition at line 43 of file TrigTauCaloHypoTool.h.

◆ m_monTool

ToolHandle<GenericMonitoringTool> TrigTauCaloHypoTool::m_monTool {this, "MonTool", "", "Monitoring tool"}
private

Definition at line 49 of file TrigTauCaloHypoTool.h.

◆ m_ptMin

Gaudi::Property<float> TrigTauCaloHypoTool::m_ptMin {this, "PtMin", 0, "Tau pT minimum cut"}
private

Definition at line 45 of file TrigTauCaloHypoTool.h.


The documentation for this class was generated from the following files:
CalculateHighPtTerm.pT
pT
Definition: ICHEP2016/CalculateHighPtTerm.py:57
GeV
#define GeV
Definition: PhysicsAnalysis/TauID/TauAnalysisTools/Root/HelperFunctions.cxx:17
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
HLT::Identifier::numeric
TrigCompositeUtils::DecisionID numeric() const
numeric ID
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:47
TrigTauCaloHypoTool::decide
virtual StatusCode decide(std::vector< ITrigTauCaloHypoTool::ToolInfo > &input) const override
Definition: TrigTauCaloHypoTool.cxx:94
TrigCompositeUtils::addDecisionID
void addDecisionID(DecisionID id, Decision *d)
Appends the decision (given as ID) to the decision object.
Definition: TrigCompositeUtilsRoot.cxx:61
HLT::Identifier::fromToolName
static HLT::Identifier fromToolName(const std::string &tname)
Definition: HLTIdentifier.cxx:31
lumiFormat.i
int i
Definition: lumiFormat.py:85
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
plotBeamSpotMon.mon
mon
Definition: plotBeamSpotMon.py:67
TrigTauCaloHypoTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigTauCaloHypoTool.h:49
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34
TrigTauCaloHypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigTauCaloHypoTool.h:43
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
TrigTauCaloHypoTool::m_ptMin
Gaudi::Property< float > m_ptMin
Definition: TrigTauCaloHypoTool.h:45
TrigTauCaloHypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: TrigTauCaloHypoTool.h:47