ATLAS Offline Software
TrigEgammaEmulationToolMT.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3  */
4 
5 
6 #ifndef TrigEgammaEmulationToolMT_H
7 #define TrigEgammaEmulationToolMT_H
8 
9 // Core staff
13 #include "GaudiKernel/SystemOfUnits.h"
14 #include "PATCore/AcceptInfo.h"
15 #include "PATCore/AcceptData.h"
16 #include "AsgTools/AsgTool.h"
17 // Selector includes
23 // EDM includes
33 
34 
35 
36 
37 namespace Trig{
38 
39 
40 class TrigData{
41 
42  public:
43  TrigData( const std::string& );
44  ~TrigData()=default;
45 
46  void clear();
47  bool isValid() const;
48 
49 
50  bool isPassed( const xAOD::Photon *ph , const std::string& pidname ) const;
51  bool isPassed( const xAOD::Electron *el , float avgmu, const std::string& pidname ) const;
52  bool isPassed( const xAOD::TrigRingerRings *rings , float avgmu, const std::string& pidname ) const;
53 
54 
55 
56  public:
57 
58  // chain name
59  std::string trigger;
60  // signature slice type: electron or photon only
61  std::string signature;
62 
63  // L1 object
65  // L1 legacy object
67  // Step 1 cluster
69  // Step 1 rings
71  // Step 2 photon object
73  // Step 3 clusters
74  std::vector<const xAOD::CaloCluster*> clusters;
75  // Step 2 electrons
76  std::vector<const xAOD::TrigElectron*> trig_electrons;
77  // Step 4 electrons
78  std::vector<const xAOD::Electron*> electrons;
79  // Step 4 photons
80  std::vector<const xAOD::Photon*> photons;
81 
82 
83  /* Step 4 photon selectors */
84  ToolHandleArray< IAsgPhotonIsEMSelector > egammaPhotonCBTools;
85  /* Step 4 electron selectors */
86  ToolHandleArray<AsgElectronSelectorTool> egammaElectronDNNTools;
87  ToolHandleArray<IAsgElectronIsEMSelector> egammaElectronCBTools;
88  ToolHandleArray<IAsgElectronLikelihoodTool> egammaElectronLHTools;
89  // Step 1 electron ringer selectors
90  ToolHandleArray<Ringer::IAsgRingerSelectorTool> ringerTools;
91 };
92 
93 
95 {
96 
99 
100  public:
101 
102  TrigEgammaEmulationToolMT(const std::string& myname);
103 
105 
107 
108  asg::AcceptData emulate(const TrigCompositeUtils::Decision *dec, const std::string& trigger, bool &valid) const;
109 
110  bool match( const TrigCompositeUtils::Decision *dec , Trig::TrigData &, unsigned int condition=TrigDefs::includeFailedDecisions ) const;
111 
112 
113  private:
114 
115  /* hypo tools */
116  ToolHandleArray<Trig::ITrigEgammaEmulationChain> m_hypoTools{ this, "HypoTools", {}, "Hypo tools" };
117 
119  ToolHandle<Trig::TrigDecisionTool> m_trigdec;
120  /* Trigger e/g matching tool */
121  ToolHandle<TrigEgammaMatchingToolMT> m_matchTool;
124 
125  Gaudi::Property<std::vector<std::string>> m_electronTrigList{ this, "ElectronTriggerList", {}};
126  Gaudi::Property<std::vector<std::string>> m_photonTrigList{ this, "PhotonTriggerList", {}};
127 
128  const ToolHandle<TrigEgammaMatchingToolMT>& match() const {return m_matchTool;}
129 
130 
131  /*
132  * e/g selectors
133  */
134 
135 
136  /* photon selectors */
137  ToolHandleArray< IAsgPhotonIsEMSelector > m_egammaPhotonCBTools { this, "PhotonCBSelectorTools", {} , "Cut-based tools"};
138 
139  /* electron selectors */
140  ToolHandleArray<AsgElectronSelectorTool> m_egammaElectronDNNTools{ this, "ElectronDNNSelectorTools", {},"DNN tools" };
141  ToolHandleArray<IAsgElectronIsEMSelector> m_egammaElectronCBTools{ this, "ElectronCBSelectorTools", {},"Cut-based tools" };
142  ToolHandleArray<IAsgElectronLikelihoodTool> m_egammaElectronLHTools{ this, "ElectronLHSelectorTools", {},"Likelihood tools" };
143 
144  // electron ringer selectors
145  ToolHandleArray<Ringer::IAsgRingerSelectorTool> m_ringerTools{ this, "RingerTools", {}, "Ringer tools" };
146 
147 };
148 
149 }
150 
151 
152 #endif
Trig::TrigData::~TrigData
~TrigData()=default
TrigEgammaMatchingToolMT.h
TrigRingerRingsContainer.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
Trig::TrigData::photons
std::vector< const xAOD::Photon * > photons
Definition: TrigEgammaEmulationToolMT.h:80
Trig::TrigEgammaEmulationToolMT
Definition: TrigEgammaEmulationToolMT.h:95
Trig::TrigData::isPassed
bool isPassed(const xAOD::Photon *ph, const std::string &pidname) const
Definition: TrigEgammaEmulationToolMT.cxx:296
IAsgPhotonIsEMSelector.h
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
Trig::TrigEgammaEmulationToolMT::match
const ToolHandle< TrigEgammaMatchingToolMT > & match() const
Definition: TrigEgammaEmulationToolMT.h:128
Trig::TrigEgammaEmulationToolMT::m_electronTrigList
Gaudi::Property< std::vector< std::string > > m_electronTrigList
Definition: TrigEgammaEmulationToolMT.h:125
ITrigEgammaEmulationChain.h
Trig::TrigEgammaEmulationToolMT::m_accept
asg::AcceptInfo m_accept
Accept.
Definition: TrigEgammaEmulationToolMT.h:123
Trig::TrigData::egammaElectronCBTools
ToolHandleArray< IAsgElectronIsEMSelector > egammaElectronCBTools
Definition: TrigEgammaEmulationToolMT.h:87
Trig::TrigEgammaEmulationToolMT::m_photonTrigList
Gaudi::Property< std::vector< std::string > > m_photonTrigList
Definition: TrigEgammaEmulationToolMT.h:126
TrigDecisionTool.h
LArG4GenerateShowerLib.condition
condition
Definition: LArG4GenerateShowerLib.py:19
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
Trig::TrigData::egammaPhotonCBTools
ToolHandleArray< IAsgPhotonIsEMSelector > egammaPhotonCBTools
Definition: TrigEgammaEmulationToolMT.h:84
Trig::TrigEgammaEmulationToolMT::m_trigdec
ToolHandle< Trig::TrigDecisionTool > m_trigdec
Trigger decision tool.
Definition: TrigEgammaEmulationToolMT.h:119
Trig::TrigData::trig_electrons
std::vector< const xAOD::TrigElectron * > trig_electrons
Definition: TrigEgammaEmulationToolMT.h:76
Trig::TrigEgammaEmulationToolMT::m_egammaPhotonCBTools
ToolHandleArray< IAsgPhotonIsEMSelector > m_egammaPhotonCBTools
Definition: TrigEgammaEmulationToolMT.h:137
Trig::TrigData::signature
std::string signature
Definition: TrigEgammaEmulationToolMT.h:61
EgammaContainer.h
AsgElectronSelectorTool.h
calibdata.valid
list valid
Definition: calibdata.py:45
IAsgElectronLikelihoodTool.h
EgammaxAODHelpers.h
Trig::TrigEgammaEmulationToolMT::~TrigEgammaEmulationToolMT
~TrigEgammaEmulationToolMT()=default
asg::AcceptInfo
Definition: AcceptInfo.h:28
ElectronContainer.h
Trig::TrigEgammaEmulationToolMT::m_egammaElectronLHTools
ToolHandleArray< IAsgElectronLikelihoodTool > m_egammaElectronLHTools
Definition: TrigEgammaEmulationToolMT.h:142
Trig::TrigEgammaEmulationToolMT::m_ringerTools
ToolHandleArray< Ringer::IAsgRingerSelectorTool > m_ringerTools
Definition: TrigEgammaEmulationToolMT.h:145
xAOD::EmTauRoI_v2
Class describing a LVL1 em/tau region of interest.
Definition: EmTauRoI_v2.h:35
Trig::TrigData::ringerTools
ToolHandleArray< Ringer::IAsgRingerSelectorTool > ringerTools
Definition: TrigEgammaEmulationToolMT.h:90
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ASG_TOOL_CLASS0
#define ASG_TOOL_CLASS0(CLASSNAME)
Definition: AsgToolMacros.h:62
Trig::TrigEgammaEmulationToolMT::emulate
asg::AcceptData emulate(const TrigCompositeUtils::Decision *dec, const std::string &trigger, bool &valid) const
Definition: TrigEgammaEmulationToolMT.cxx:56
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
Trig::TrigData::electrons
std::vector< const xAOD::Electron * > electrons
Definition: TrigEgammaEmulationToolMT.h:78
xAOD::TrigComposite_v1
Class used to describe composite objects in the HLT.
Definition: TrigComposite_v1.h:52
AcceptData.h
Trig::TrigData::egammaElectronLHTools
ToolHandleArray< IAsgElectronLikelihoodTool > egammaElectronLHTools
Definition: TrigEgammaEmulationToolMT.h:88
xAOD::TrigPhoton_v1
Class describing a photon reconstructed in the HLT.
Definition: TrigPhoton_v1.h:38
Trig::TrigData::emCluster
const xAOD::TrigEMCluster * emCluster
Definition: TrigEgammaEmulationToolMT.h:68
Trig::TrigEgammaEmulationToolMT::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: TrigEgammaEmulationToolMT.cxx:24
Trig::TrigData::clear
void clear()
Definition: TrigEgammaEmulationToolMT.cxx:269
Trig::TrigEgammaEmulationToolMT::m_hypoTools
ToolHandleArray< Trig::ITrigEgammaEmulationChain > m_hypoTools
Definition: TrigEgammaEmulationToolMT.h:116
Trig::TrigData::clusters
std::vector< const xAOD::CaloCluster * > clusters
Definition: TrigEgammaEmulationToolMT.h:74
Trig::TrigData::rings
const xAOD::TrigRingerRings * rings
Definition: TrigEgammaEmulationToolMT.h:70
xAOD::Electron_v1
Definition: Electron_v1.h:34
EmTauRoIContainer.h
xAOD::TrigRingerRings_v2
Definition: TrigRingerRings_v2.h:24
Trig::TrigData::egammaElectronDNNTools
ToolHandleArray< AsgElectronSelectorTool > egammaElectronDNNTools
Definition: TrigEgammaEmulationToolMT.h:86
Trig::TrigEgammaEmulationToolMT::m_matchTool
ToolHandle< TrigEgammaMatchingToolMT > m_matchTool
Definition: TrigEgammaEmulationToolMT.h:121
TrigEMClusterContainer.h
AcceptInfo.h
IAsgElectronIsEMSelector.h
Trig::TrigData::trigger
std::string trigger
Definition: TrigEgammaEmulationToolMT.h:59
Trig::TrigEgammaEmulationToolMT::TrigEgammaEmulationToolMT
TrigEgammaEmulationToolMT(const std::string &myname)
Definition: TrigEgammaEmulationToolMT.cxx:14
Trig::TrigData::roi
const TrigRoiDescriptor * roi
Definition: TrigEgammaEmulationToolMT.h:64
xAOD::Photon_v1
Definition: Photon_v1.h:37
Trig::TrigData
Definition: TrigEgammaEmulationToolMT.h:40
CaloClusterContainer.h
Trig::TrigEgammaEmulationToolMT::m_egammaElectronDNNTools
ToolHandleArray< AsgElectronSelectorTool > m_egammaElectronDNNTools
Definition: TrigEgammaEmulationToolMT.h:140
Trig::TrigData::l1
const xAOD::EmTauRoI * l1
Definition: TrigEgammaEmulationToolMT.h:66
IAsgRingerSelectorTool.h
AsgTool.h
xAOD::TrigEMCluster_v1
Description of a trigger EM cluster.
Definition: TrigEMCluster_v1.h:28
asg::AcceptData
Definition: AcceptData.h:30
Trig::TrigEgammaEmulationToolMT::m_egammaElectronCBTools
ToolHandleArray< IAsgElectronIsEMSelector > m_egammaElectronCBTools
Definition: TrigEgammaEmulationToolMT.h:141
Trig::TrigData::isValid
bool isValid() const
Definition: TrigEgammaEmulationToolMT.cxx:283
Trig::TrigData::trig_photon
const xAOD::TrigPhoton * trig_photon
Definition: TrigEgammaEmulationToolMT.h:72
PhotonContainer.h
Trig::TrigData::TrigData
TrigData(const std::string &)
Definition: TrigEgammaEmulationToolMT.cxx:261
TrackParticleContainer.h