ATLAS Offline Software
Loading...
Searching...
No Matches
TrigEgammaEmulationToolMT.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2002-2024 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
37namespace Trig{
38
39
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
106 StatusCode initialize();
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
#define ASG_TOOL_INTERFACE(CLASSNAME)
#define ASG_TOOL_CLASS0(CLASSNAME)
nope - should be used for standalone also, perhaps need to protect the class def bits ifndef XAOD_ANA...
std::vector< const xAOD::Photon * > photons
~TrigData()=default
std::vector< const xAOD::TrigElectron * > trig_electrons
bool isPassed(const xAOD::Photon *ph, const std::string &pidname) const
ToolHandleArray< IAsgPhotonIsEMSelector > egammaPhotonCBTools
std::vector< const xAOD::Electron * > electrons
const xAOD::EmTauRoI * l1
ToolHandleArray< IAsgElectronLikelihoodTool > egammaElectronLHTools
ToolHandleArray< IAsgElectronIsEMSelector > egammaElectronCBTools
const xAOD::TrigPhoton * trig_photon
std::vector< const xAOD::CaloCluster * > clusters
const xAOD::TrigEMCluster * emCluster
ToolHandleArray< Ringer::IAsgRingerSelectorTool > ringerTools
TrigData(const std::string &)
const TrigRoiDescriptor * roi
const xAOD::TrigRingerRings * rings
ToolHandleArray< AsgElectronSelectorTool > egammaElectronDNNTools
ToolHandle< TrigEgammaMatchingToolMT > m_matchTool
ToolHandleArray< IAsgElectronIsEMSelector > m_egammaElectronCBTools
const ToolHandle< TrigEgammaMatchingToolMT > & match() const
StatusCode initialize()
Dummy implementation of the initialisation function.
ToolHandleArray< IAsgElectronLikelihoodTool > m_egammaElectronLHTools
asg::AcceptData emulate(const TrigCompositeUtils::Decision *dec, const std::string &trigger, bool &valid) const
ToolHandleArray< AsgElectronSelectorTool > m_egammaElectronDNNTools
Gaudi::Property< std::vector< std::string > > m_photonTrigList
ToolHandleArray< Trig::ITrigEgammaEmulationChain > m_hypoTools
ToolHandleArray< IAsgPhotonIsEMSelector > m_egammaPhotonCBTools
Gaudi::Property< std::vector< std::string > > m_electronTrigList
ToolHandle< Trig::TrigDecisionTool > m_trigdec
Trigger decision tool.
ToolHandleArray< Ringer::IAsgRingerSelectorTool > m_ringerTools
TrigEgammaEmulationToolMT(const std::string &myname)
Base class for the dual-use tool implementation classes.
Definition AsgTool.h:47
static const unsigned int includeFailedDecisions
Run3 synonym of alsoDeactivateTEs.
The common trigger namespace for trigger analysis tools.
TrigPhoton_v1 TrigPhoton
Declare the latest version of TrigPhoton.
TrigRingerRings_v2 TrigRingerRings
Define the latest version of the TrigRingerRings class.
TrigEMCluster_v1 TrigEMCluster
Define the latest version of the trigger EM cluster class.
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".
EmTauRoI_v2 EmTauRoI
Definition EmTauRoI.h:16