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

#include <TrigTRTHTHhypoTool.h>

Inheritance diagram for TrigTRTHTHhypoTool:
Collaboration diagram for TrigTRTHTHhypoTool:

Public Member Functions

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

Private Attributes

HLT::Identifier m_decisionId
 
Gaudi::Property< bool > m_acceptAll { this, "AcceptAll", false , "Bins of eta" }
 
Gaudi::Property< unsigned int > m_minTRTHTHitsRoad { this, "MinTRTHTHitsRoad", 20 , "Bins of eta" }
 
Gaudi::Property< float > m_minHTratioRoad { this, "MinHTRatioRoad", 0.4 , "Bins of eta" }
 
Gaudi::Property< unsigned int > m_minTRTHTHitsWedge { this, "MinTRTHTHitsWedge", 30 , "Bins of eta" }
 
Gaudi::Property< float > m_minHTratioWedge { this, "MinHTRatioWedge", 0.5 , "Bins of eta" }
 
Gaudi::Property< bool > m_doWedge { this, "DoWedge", true , "Bins of eta" }
 
Gaudi::Property< bool > m_doRoad { this, "DoRoad", false , "Bins of eta" }
 
ToolHandle< GenericMonitoringToolm_monTool { this, "MonTool", "", "Monitoring tool" }
 

Detailed Description

Definition at line 18 of file TrigTRTHTHhypoTool.h.

Constructor & Destructor Documentation

◆ TrigTRTHTHhypoTool()

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

Definition at line 11 of file TrigTRTHTHhypoTool.cxx.

14  : base_class( type, name, parent ),
16 {}

Member Function Documentation

◆ decide() [1/2]

bool TrigTRTHTHhypoTool::decide ( const ITrigTRTHTHhypoTool::RNNOutputInfo i) const
overridevirtual

Definition at line 25 of file TrigTRTHTHhypoTool.cxx.

25  {
26 
27  bool pass = false;
28 
29  auto fHT_road = Monitored::Scalar( "HTRatioRoad", -1. );
30  auto fHT_wedge = Monitored::Scalar( "HTRatioWedge", -1. );
31  auto trththits_road = Monitored::Scalar( "TRTHTHitsRoad" , -1.0 );
32  auto trththits_wedge = Monitored::Scalar( "TRTHTHitsWedge", -1.0 );
33  auto monitorIt = Monitored::Group( m_monTool, fHT_road, fHT_wedge, trththits_road, trththits_wedge);
34 
35  if( m_acceptAll ){
36  pass=true;
37  ATH_MSG_DEBUG ( "Accepting all events in " << name());
38  return pass;
39  }
40 
41  auto rnn = input.rnnOutput;
42  std::vector<float> vec = rnn->rnnDecision();
43 
44  if (vec.size()!=6){
45  pass = true;
46  return pass;
47  }
48 
49  //Parse the vector to assign fHT and nHT appropriately
50 
51  fHT_road = vec.at(1);
52  fHT_wedge = vec.at(3);
53  trththits_road = vec.at(0);
54  trththits_wedge = vec.at(2);
55 
56  ATH_MSG_DEBUG ( "trththits_road: " << trththits_road);
57  ATH_MSG_DEBUG ("m_minTRTHTHitsRoad in hypotool: "<<m_minTRTHTHitsRoad);
58  ATH_MSG_DEBUG ( "trththits_wedge: " << trththits_wedge);
59  ATH_MSG_DEBUG ("m_minTRTHTHitsWedge in hypotool:: "<< m_minTRTHTHitsWedge);
60  ATH_MSG_DEBUG ( "fHT_road: " << fHT_road);
61  ATH_MSG_DEBUG ("m_minHTratioRoad in hypotool: "<<m_minHTratioRoad);
62  ATH_MSG_DEBUG ( "fHT_wedge: " << fHT_wedge);
63  ATH_MSG_DEBUG ("m_minHTratioWedge in hypotool: "<<m_minHTratioWedge);
64 
65  //Apply the cuts
66 
67  if (fHT_road > m_minHTratioRoad && trththits_road > m_minTRTHTHitsRoad && m_doRoad) pass = true;
68 
69  if (fHT_wedge > m_minHTratioWedge && trththits_wedge > m_minTRTHTHitsWedge && m_doWedge) pass = true;
70 
71  ATH_MSG_DEBUG ( name() << " hypo result " << pass);
72 
73  return pass;
74 
75 }

◆ decide() [2/2]

virtual StatusCode TrigTRTHTHhypoTool::decide ( std::vector< ITrigTRTHTHhypoTool::RNNOutputInfo > &  input) const
overridevirtual

◆ initialize()

StatusCode TrigTRTHTHhypoTool::initialize ( )
overridevirtual

Definition at line 18 of file TrigTRTHTHhypoTool.cxx.

18  {
19 
20  ATH_MSG_DEBUG( "Tool configured for chain/id: " << m_decisionId );
21 
22  return StatusCode::SUCCESS;
23 }

Member Data Documentation

◆ m_acceptAll

Gaudi::Property< bool > TrigTRTHTHhypoTool::m_acceptAll { this, "AcceptAll", false , "Bins of eta" }
private

Definition at line 34 of file TrigTRTHTHhypoTool.h.

◆ m_decisionId

HLT::Identifier TrigTRTHTHhypoTool::m_decisionId
private

Definition at line 32 of file TrigTRTHTHhypoTool.h.

◆ m_doRoad

Gaudi::Property< bool > TrigTRTHTHhypoTool::m_doRoad { this, "DoRoad", false , "Bins of eta" }
private

Definition at line 40 of file TrigTRTHTHhypoTool.h.

◆ m_doWedge

Gaudi::Property< bool > TrigTRTHTHhypoTool::m_doWedge { this, "DoWedge", true , "Bins of eta" }
private

Definition at line 39 of file TrigTRTHTHhypoTool.h.

◆ m_minHTratioRoad

Gaudi::Property< float > TrigTRTHTHhypoTool::m_minHTratioRoad { this, "MinHTRatioRoad", 0.4 , "Bins of eta" }
private

Definition at line 36 of file TrigTRTHTHhypoTool.h.

◆ m_minHTratioWedge

Gaudi::Property< float > TrigTRTHTHhypoTool::m_minHTratioWedge { this, "MinHTRatioWedge", 0.5 , "Bins of eta" }
private

Definition at line 38 of file TrigTRTHTHhypoTool.h.

◆ m_minTRTHTHitsRoad

Gaudi::Property< unsigned int > TrigTRTHTHhypoTool::m_minTRTHTHitsRoad { this, "MinTRTHTHitsRoad", 20 , "Bins of eta" }
private

Definition at line 35 of file TrigTRTHTHhypoTool.h.

◆ m_minTRTHTHitsWedge

Gaudi::Property< unsigned int > TrigTRTHTHhypoTool::m_minTRTHTHitsWedge { this, "MinTRTHTHitsWedge", 30 , "Bins of eta" }
private

Definition at line 37 of file TrigTRTHTHhypoTool.h.

◆ m_monTool

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

Definition at line 42 of file TrigTRTHTHhypoTool.h.


The documentation for this class was generated from the following files:
TrigTRTHTHhypoTool::m_doRoad
Gaudi::Property< bool > m_doRoad
Definition: TrigTRTHTHhypoTool.h:40
TrigDefs::Group
Group
Properties of a chain group.
Definition: GroupProperties.h:13
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
HLT::Identifier::fromToolName
static HLT::Identifier fromToolName(const std::string &tname)
Definition: HLTIdentifier.cxx:31
TrigTRTHTHhypoTool::m_doWedge
Gaudi::Property< bool > m_doWedge
Definition: TrigTRTHTHhypoTool.h:39
TrigTRTHTHhypoTool::m_decisionId
HLT::Identifier m_decisionId
Definition: TrigTRTHTHhypoTool.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
TrigTRTHTHhypoTool::m_minHTratioWedge
Gaudi::Property< float > m_minHTratioWedge
Definition: TrigTRTHTHhypoTool.h:38
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
test_pyathena.parent
parent
Definition: test_pyathena.py:15
TrigTRTHTHhypoTool::m_minHTratioRoad
Gaudi::Property< float > m_minHTratioRoad
Definition: TrigTRTHTHhypoTool.h:36
TrigTRTHTHhypoTool::m_acceptAll
Gaudi::Property< bool > m_acceptAll
Definition: TrigTRTHTHhypoTool.h:34
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
TrigTRTHTHhypoTool::m_minTRTHTHitsRoad
Gaudi::Property< unsigned int > m_minTRTHTHitsRoad
Definition: TrigTRTHTHhypoTool.h:35
TrigTRTHTHhypoTool::m_minTRTHTHitsWedge
Gaudi::Property< unsigned int > m_minTRTHTHitsWedge
Definition: TrigTRTHTHhypoTool.h:37
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TrigTRTHTHhypoTool::m_monTool
ToolHandle< GenericMonitoringTool > m_monTool
Definition: TrigTRTHTHhypoTool.h:42
Monitored::Scalar
Declare a monitored scalar variable.
Definition: MonitoredScalar.h:34