ATLAS Offline Software
Loading...
Searching...
No Matches
TrigEgammaMatchingToolMT Class Reference

#include <TrigEgammaMatchingToolMT.h>

Inheritance diagram for TrigEgammaMatchingToolMT:
Collaboration diagram for TrigEgammaMatchingToolMT:

Public Member Functions

 TrigEgammaMatchingToolMT (const std::string &name)
 ~TrigEgammaMatchingToolMT ()=default
StatusCode initialize ()
 =======================================================================
bool isPassed (const EventContext &ctx, const xAOD::Egamma *, const std::string &, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
bool match (const xAOD::Egamma *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
template<class T>
bool ancestorPassed (const EventContext &ctx, const TrigCompositeUtils::Decision *, const std::string &trigger, const std::string &key, unsigned int condition=TrigDefs::Physics) const
template<class T>
TrigCompositeUtils::LinkInfo< T > getFeature (const EventContext &ctx, const TrigCompositeUtils::Decision *, const std::string &trigger, unsigned int condition=TrigDefs::Physics) const
template<class T>
std::vector< TrigCompositeUtils::LinkInfo< T > > getFeatures (const EventContext &ctx, const TrigCompositeUtils::Decision *, const std::string &trigger, unsigned int condition=TrigDefs::Physics) const
template<class T>
std::vector< TrigCompositeUtils::LinkInfo< T > > getFeatures (const EventContext &ctx, const TrigCompositeUtils::Decision *, const std::string &trigger, const std::string &key, unsigned int condition=TrigDefs::Physics) const
const xAOD::EmTauRoIgetL1Feature (const EventContext &, const TrigCompositeUtils::Decision *) const
 =======================================================================
const xAOD::eFexEMRoIgetL1eEMFeature (const EventContext &, const TrigCompositeUtils::Decision *) const
 =======================================================================
const xAOD::TrigRingerRingsgetRingsFeature (const EventContext &, const TrigCompositeUtils::Decision *) const
 =======================================================================
std::string key (const std::string &) const
 =======================================================================
virtual void print () const
 Print the state of the tool.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const
Additional helper functions, not directly mimicking Athena
template<class T>
const T * getProperty (const std::string &name) const
 Get one of the tool's properties.
const std::string & msg_level_name () const __attribute__((deprecated))
 A deprecated function for getting the message level's name.
const std::string & getName (const void *ptr) const
 Get the name of an object that is / should be in the event store.
SG::sgkey_t getKey (const void *ptr) const
 Get the (hashed) key of an object that is in the event store.

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

bool matchHLTElectron (const xAOD::Electron *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
bool matchHLTPhoton (const xAOD::Photon *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
bool matchHLTCalo (const xAOD::Egamma *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
bool matchL2Electron (const xAOD::Electron *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
bool matchL2Photon (const xAOD::Photon *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
bool matchL2Calo (const xAOD::Egamma *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
bool matchL1 (const xAOD::Egamma *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
 =======================================================================
template<class T>
bool closestObject (const xAOD::Egamma *, const TrigCompositeUtils::Decision *&, const std::string &trigger, const std::string &key, float dR_value, unsigned int condition=TrigDefs::Physics) const
double dR (const double eta1, const double phi1, const double eta2, const double phi2) const
const ToolHandle< Trig::TrigDecisionTool > & tdt () const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::map< std::string, std::string > m_keys
ToolHandle< Trig::TrigDecisionToolm_trigDecTool {this, "TriggerTool", ""}
Gaudi::Property< float > m_dR {this, "DeltaR", 0.07}
Gaudi::Property< float > m_dRL1 {this, "L1DeltaR", 0.15}
SG::ReadHandleKey< xAOD::EmTauRoIContainerm_emTauRoIKey {this, "EmTauRoIKey" , "LVL1EmTauRoIs", ""}
SG::ReadHandleKey< xAOD::TrigRingerRingsContainerm_ringerKey {this, "RingerKey" , "HLT_FastCaloRinger", ""}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 27 of file TrigEgammaMatchingToolMT.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TrigEgammaMatchingToolMT()

TrigEgammaMatchingToolMT::TrigEgammaMatchingToolMT ( const std::string & name)

Definition at line 24 of file TrigEgammaMatchingToolMT.cxx.

24 :
25 asg::AsgTool( name ),
26 m_trigDecTool("Trig::TrigDecisionTool/TrigDecisionTool")
27{;}
ToolHandle< Trig::TrigDecisionTool > m_trigDecTool

◆ ~TrigEgammaMatchingToolMT()

TrigEgammaMatchingToolMT::~TrigEgammaMatchingToolMT ( )
default

Member Function Documentation

◆ ancestorPassed()

template<class T>
bool TrigEgammaMatchingToolMT::ancestorPassed ( const EventContext & ctx,
const TrigCompositeUtils::Decision * ,
const std::string & trigger,
const std::string & key,
unsigned int condition = TrigDefs::Physics ) const

◆ closestObject()

template<class T>
bool TrigEgammaMatchingToolMT::closestObject ( const xAOD::Egamma * ,
const TrigCompositeUtils::Decision *& ,
const std::string & trigger,
const std::string & key,
float dR_value,
unsigned int condition = TrigDefs::Physics ) const
private

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ dR()

double TrigEgammaMatchingToolMT::dR ( const double eta1,
const double phi1,
const double eta2,
const double phi2 ) const
inlineprivate

Definition at line 87 of file TrigEgammaMatchingToolMT.h.

88 {
89 double deta = std::abs(eta1 - eta2);
90 double dphi = std::abs(phi1 - phi2) < TMath::Pi() ? std::abs(phi1 - phi2) : 2*TMath::Pi() - std::abs(phi1 - phi2);
91 return sqrt(deta*deta + dphi*dphi);
92 };
static const double Pi

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getFeature()

template<class T>
TrigCompositeUtils::LinkInfo< T > TrigEgammaMatchingToolMT::getFeature ( const EventContext & ctx,
const TrigCompositeUtils::Decision * ,
const std::string & trigger,
unsigned int condition = TrigDefs::Physics ) const

◆ getFeatures() [1/2]

template<class T>
std::vector< TrigCompositeUtils::LinkInfo< T > > TrigEgammaMatchingToolMT::getFeatures ( const EventContext & ctx,
const TrigCompositeUtils::Decision * ,
const std::string & trigger,
const std::string & key,
unsigned int condition = TrigDefs::Physics ) const

◆ getFeatures() [2/2]

template<class T>
std::vector< TrigCompositeUtils::LinkInfo< T > > TrigEgammaMatchingToolMT::getFeatures ( const EventContext & ctx,
const TrigCompositeUtils::Decision * ,
const std::string & trigger,
unsigned int condition = TrigDefs::Physics ) const

◆ getKey()

SG::sgkey_t asg::AsgTool::getKey ( const void * ptr) const
inherited

Get the (hashed) key of an object that is in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the SG::sgkey_t key for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getName
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The hashed key of the object in the store. If not found, an invalid (zero) key.

Definition at line 119 of file AsgTool.cxx.

119 {
120
121#ifdef XAOD_STANDALONE
122 // In case we use @c xAOD::Event, we have a direct function call
123 // for this.
124 return evtStore()->event()->getKey( ptr );
125#else
126 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
127 return ( proxy == nullptr ? 0 : proxy->sgkey() );
128#endif // XAOD_STANDALONE
129 }
ServiceHandle< StoreGateSvc > & evtStore()

◆ getL1eEMFeature()

const xAOD::eFexEMRoI * TrigEgammaMatchingToolMT::getL1eEMFeature ( const EventContext & ctx,
const TrigCompositeUtils::Decision * dec ) const

=======================================================================

Definition at line 246 of file TrigEgammaMatchingToolMT.cxx.

247{
248 if( !dec ) return nullptr;
249 auto initRoi = TrigCompositeUtils::findLink<xAOD::eFexEMRoIContainer>(ctx, dec, "initialRecRoI");
250 if( !initRoi.isValid() ) return nullptr;
251 return *(initRoi.link);
252}
LinkInfo< T > findLink(const EventContext &ctx, const Decision *start, const std::string &linkName, const bool suppressMultipleLinksWarning=false)
Perform a recursive search for ElementLinks of type T and name 'linkName', starting from Decision obj...

◆ getL1Feature()

const xAOD::EmTauRoI * TrigEgammaMatchingToolMT::getL1Feature ( const EventContext & ctx,
const TrigCompositeUtils::Decision * dec ) const

=======================================================================

Definition at line 226 of file TrigEgammaMatchingToolMT.cxx.

227{
228 if( !dec ) return nullptr;
229 auto initRoi = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>(ctx, dec, "initialRoI");
230 if( !initRoi.isValid() ) return nullptr;
231
232 SG::ReadHandle<xAOD::EmTauRoIContainer> l1_cont( m_emTauRoIKey, ctx );
233 if( !l1_cont.isValid() ) return nullptr;
234
235 for( const auto *l1 : *l1_cont ){
236 if ( l1->roiType() != xAOD::EmTauRoI::RoIType::EMRoIWord) continue;
237 if((*initRoi.link)->roiWord()==l1->roiWord()){
238 return l1;
239 }
240 }
241 return nullptr;
242}
SG::ReadHandleKey< xAOD::EmTauRoIContainer > m_emTauRoIKey
@ EMRoIWord
This is a Run 2 EM RoI word.
Definition EmTauRoI_v2.h:47

◆ getName()

const std::string & asg::AsgTool::getName ( const void * ptr) const
inherited

Get the name of an object that is / should be in the event store.

This is a bit of a special one. StoreGateSvc and xAOD::Event both provide ways for getting the std::string name for an object that is in the store, based on a bare pointer. But they provide different interfaces for doing so.

In order to allow tools to efficiently perform this operation, they can use this helper function.

See also
asg::AsgTool::getKey
Parameters
ptrThe bare pointer to the object that the event store should know about
Returns
The string name of the object in the store. If not found, an empty string.

Definition at line 106 of file AsgTool.cxx.

106 {
107
108#ifdef XAOD_STANDALONE
109 // In case we use @c xAOD::Event, we have a direct function call
110 // for this.
111 return evtStore()->event()->getName( ptr );
112#else
113 const SG::DataProxy* proxy = evtStore()->proxy( ptr );
114 static const std::string dummy = "";
115 return ( proxy == nullptr ? dummy : proxy->name() );
116#endif // XAOD_STANDALONE
117 }

◆ getProperty()

template<class T>
const T * asg::AsgTool::getProperty ( const std::string & name) const
inherited

Get one of the tool's properties.

◆ getRingsFeature()

const xAOD::TrigRingerRings * TrigEgammaMatchingToolMT::getRingsFeature ( const EventContext & ctx,
const TrigCompositeUtils::Decision * dec ) const

=======================================================================

Definition at line 256 of file TrigEgammaMatchingToolMT.cxx.

257{
258 if( !dec ) return nullptr;
259 auto initRoi = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>(ctx, dec, "initialRoI");
260 if( !initRoi.isValid() ) return nullptr;
261
262 SG::ReadHandle<xAOD::TrigRingerRingsContainer> rg_cont( m_ringerKey, ctx );
263
264 if( !rg_cont.isValid() ) return nullptr;
265
266 for( const auto *rg : *rg_cont ){
267 const xAOD::TrigEMCluster *cl = rg->emCluster();
268 if(!cl) continue;
269 if(cl->RoIword()==(*initRoi.link)->roiWord())
270 return rg;
271 }
272 return nullptr;
273}
SG::ReadHandleKey< xAOD::TrigRingerRingsContainer > m_ringerKey
cl
print [x.__class__ for x in toList(dqregion.getSubRegions()) ]
TrigEMCluster_v1 TrigEMCluster
Define the latest version of the trigger EM cluster class.

◆ initialize()

StatusCode TrigEgammaMatchingToolMT::initialize ( void )
virtual

=======================================================================

Reimplemented from asg::AsgTool.

Definition at line 32 of file TrigEgammaMatchingToolMT.cxx.

33{
34 ATH_CHECK(tdt().retrieve());
35
36 ATH_CHECK( m_emTauRoIKey.initialize() );
37 ATH_CHECK( m_ringerKey.initialize() );
38
39
40 m_keys[ "Electrons"] = "HLT_egamma_Electrons" ;
41 m_keys[ "Electrons_GSF"] = "HLT_egamma_Electrons_GSF" ; // gsf
42 m_keys[ "Electrons_LRT"] = "HLT_egamma_Electrons_LRT" ; // lrt
43 m_keys[ "Photons"] = "HLT_egamma_Photons" ;
44
45 // intermediate steps
46 m_keys[ "PrecisionCalo_Electron"] = "HLT_CaloEMClusters_Electron";
47 m_keys[ "PrecisionCalo_Photon"] = "HLT_CaloEMClusters_Photon";
48 m_keys[ "PrecisionCalo_LRT"] = "HLT_CaloEMClusters_LRT" ; // lrt
49 m_keys[ "PrecisionCalo_HI"] = "HLT_HICaloEMClusters" ; // ion chains
50
51 // Fast steps
52 m_keys[ "FastElectrons"] = "HLT_FastElectrons" ;
53 m_keys[ "FastElectrons_LRT"] = "HLT_FastElectrons_LRT" ; // lrt
54 m_keys[ "FastPhotons"] = "HLT_FastPhotons" ;
55 m_keys[ "FastCalo"] = "HLT_FastCaloEMClusters" ;
56 // L1
57 m_keys[ "L1Calo"] = "LVL1EmTauRoIs" ;
58 m_keys[ "L1eEM"] = "L1_eEMRoI";
59
60 return StatusCode::SUCCESS;
61}
#define ATH_CHECK
Evaluate an expression and check for errors.
std::map< std::string, std::string > m_keys
const ToolHandle< Trig::TrigDecisionTool > & tdt() const

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isPassed()

bool TrigEgammaMatchingToolMT::isPassed ( const EventContext & ctx,
const xAOD::Egamma * eg,
const std::string & trigger,
unsigned int condition = TrigDefs::Physics ) const

=======================================================================

Definition at line 73 of file TrigEgammaMatchingToolMT.cxx.

74{
75 const TrigCompositeUtils::Decision *dec=nullptr;
76 if( match( eg, trigger, dec ) ){
77 if( dec ){
79 std::string key = this->key("Electrons_GSF");
80 if(trigger.contains("nogsf")) key=this->key("Electrons");
81 if(trigger.contains("lrt")) key=this->key("Electrons_LRT");
82 return ancestorPassed<xAOD::ElectronContainer>(ctx, dec, trigger,key, condition);
83 }
85 return ancestorPassed<xAOD::PhotonContainer>(ctx, dec, trigger, key("Photons"), condition);
86 }
87 }
88 }
89 return false;
90}
std::string key(const std::string &) const
=======================================================================
bool match(const xAOD::Egamma *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
=======================================================================
bool ancestorPassed(const EventContext &ctx, const TrigCompositeUtils::Decision *, const std::string &trigger, const std::string &key, unsigned int condition=TrigDefs::Physics) const
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon

◆ key()

std::string TrigEgammaMatchingToolMT::key ( const std::string & key) const

=======================================================================

Definition at line 66 of file TrigEgammaMatchingToolMT.cxx.

67{
68 return m_keys.at(key);
69}

◆ match()

bool TrigEgammaMatchingToolMT::match ( const xAOD::Egamma * eg,
const std::string & trigger,
const TrigCompositeUtils::Decision *& dec,
unsigned int condition = TrigDefs::Physics ) const

=======================================================================

Definition at line 94 of file TrigEgammaMatchingToolMT.cxx.

95{
96
97 ATH_MSG_DEBUG("Match decec with trigger " << trigger);
99 const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
100 if( matchHLTElectron(el,trigger,dec, condition) ) {
101 ATH_MSG_DEBUG("Matched!");
102 return true;
103 }
104 }else if(xAOD::EgammaHelpers::isPhoton(eg)){
105 const xAOD::Photon* ph =static_cast<const xAOD::Photon*> (eg);
106 if( matchHLTPhoton(ph,trigger,dec, condition) ) return true;
107 }
108
109 if( matchHLTCalo(eg,trigger,dec) ) return true;
110
112 const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
113 if( matchL2Electron(el,trigger,dec, condition) ) return true;
114
115 }else if(xAOD::EgammaHelpers::isPhoton(eg)){
116 const xAOD::Photon* ph =static_cast<const xAOD::Photon*> (eg);
117 if( matchL2Photon(ph,trigger,dec, condition) ) return true;
118 }
119
120 if( matchL2Calo(eg,trigger,dec, condition) ) return true;
121
122 if( matchL1(eg,trigger,dec, condition) ) return true;
123 ATH_MSG_DEBUG("match() failed!");
124 return false;
125}
#define ATH_MSG_DEBUG(x)
bool matchHLTPhoton(const xAOD::Photon *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
=======================================================================
bool matchL2Calo(const xAOD::Egamma *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
=======================================================================
bool matchL2Photon(const xAOD::Photon *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
=======================================================================
bool matchHLTElectron(const xAOD::Electron *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
=======================================================================
bool matchL2Electron(const xAOD::Electron *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
=======================================================================
bool matchHLTCalo(const xAOD::Egamma *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
=======================================================================
bool matchL1(const xAOD::Egamma *, const std::string &, const TrigCompositeUtils::Decision *&, unsigned int condition=TrigDefs::Physics) const
=======================================================================
Photon_v1 Photon
Definition of the current "egamma version".
Electron_v1 Electron
Definition of the current "egamma version".

◆ matchHLTCalo()

bool TrigEgammaMatchingToolMT::matchHLTCalo ( const xAOD::Egamma * eg,
const std::string & trigger,
const TrigCompositeUtils::Decision *& dec,
unsigned int condition = TrigDefs::Physics ) const
private

=======================================================================

Definition at line 154 of file TrigEgammaMatchingToolMT.cxx.

155{
156 ATH_MSG_DEBUG("Match HLT PrecisionCalo");
157 if(trigger.contains("lrt")){
158 ATH_MSG_DEBUG("Matched HLT PrecisionCalo LRT");
159 return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_LRT"), m_dR, condition );
160 }else if(trigger.contains("ion")){
161 ATH_MSG_DEBUG("Matched HLT PrecisionCalo Heavy Ion");
162 return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_HI"), m_dR, condition );
164 ATH_MSG_DEBUG("Matched HLT PrecisionCalo Electron");
165 return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_Electron"), m_dR, condition );
166 }else if(xAOD::EgammaHelpers::isPhoton(eg)){
167 ATH_MSG_DEBUG("Matched HLT PrecisionCalo Photon");
168 return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_Photon"), m_dR, condition );
169 }else{
170 ATH_MSG_DEBUG("Match HLT PrecisionCalo failed!");
171 return false;
172 }
173}
Gaudi::Property< float > m_dR
bool closestObject(const xAOD::Egamma *, const TrigCompositeUtils::Decision *&, const std::string &trigger, const std::string &key, float dR_value, unsigned int condition=TrigDefs::Physics) const

◆ matchHLTElectron()

bool TrigEgammaMatchingToolMT::matchHLTElectron ( const xAOD::Electron * eg,
const std::string & trigger,
const TrigCompositeUtils::Decision *& dec,
unsigned int condition = TrigDefs::Physics ) const
private

=======================================================================

Definition at line 138 of file TrigEgammaMatchingToolMT.cxx.

139{
140 if (trigger.contains("nogsf")){
141 ATH_MSG_DEBUG("Matched HLT Electron noGSF");
142 return closestObject<xAOD::ElectronContainer>( eg, dec , trigger, key("Electrons"), m_dR, condition );
143 }else if(trigger.contains("lrt")){
144 ATH_MSG_DEBUG("Matched HLT Electron LRT");
145 return closestObject<xAOD::ElectronContainer>( eg, dec , trigger, key("Electrons_LRT"), m_dR, condition );
146 }else {
147 ATH_MSG_DEBUG("Matched HLT Electron");
148 return closestObject<xAOD::ElectronContainer>( eg, dec , trigger, key("Electrons_GSF"), m_dR, condition );
149 }
150}

◆ matchHLTPhoton()

bool TrigEgammaMatchingToolMT::matchHLTPhoton ( const xAOD::Photon * eg,
const std::string & trigger,
const TrigCompositeUtils::Decision *& dec,
unsigned int condition = TrigDefs::Physics ) const
private

=======================================================================

Definition at line 130 of file TrigEgammaMatchingToolMT.cxx.

131{
132 ATH_MSG_DEBUG("Match HLT Photon");
133 return closestObject<xAOD::PhotonContainer>( eg, dec, trigger, key("Photons"), m_dR, condition );
134}

◆ matchL1()

bool TrigEgammaMatchingToolMT::matchL1 ( const xAOD::Egamma * eg,
const std::string & trigger,
const TrigCompositeUtils::Decision *& dec,
unsigned int condition = TrigDefs::Physics ) const
private

=======================================================================

Definition at line 205 of file TrigEgammaMatchingToolMT.cxx.

206{
207 ATH_MSG_DEBUG("Match L1 Calo");
208
209 double deltaR=0.0;
210 auto initRois = tdt()->features<TrigRoiDescriptorCollection>(trigger,condition,"",TrigDefs::allFeaturesOfType,"initialRoI");
211 if( initRois.size() < 1) return false;
212 for( auto &initRoi: initRois ){
213 if( !initRoi.link.isValid() ) continue;
214 deltaR = dR(eg->eta(),eg->phi(), (*initRoi.link)->eta(),(*initRoi.link)->phi());
215 if(deltaR < (float)m_dRL1){
216 dec=initRoi.source;
217 return true;
218 }
219 }
220
221 return false;
222}
Scalar deltaR(const MatrixBase< Derived > &vec) const
Athena::TPCnvVers::Current Athena::TPCnvVers::Old TrigRoiDescriptorCollection
double dR(const double eta1, const double phi1, const double eta2, const double phi2) const
Gaudi::Property< float > m_dRL1
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition Egamma_v1.cxx:71
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition Egamma_v1.cxx:76
static const unsigned int allFeaturesOfType
Run 3 "enum". Return all features along legs (still with type and container checks).

◆ matchL2Calo()

bool TrigEgammaMatchingToolMT::matchL2Calo ( const xAOD::Egamma * eg,
const std::string & trigger,
const TrigCompositeUtils::Decision *& dec,
unsigned int condition = TrigDefs::Physics ) const
private

=======================================================================

Definition at line 197 of file TrigEgammaMatchingToolMT.cxx.

198{
199 ATH_MSG_DEBUG("Match L2 Calo");
200 return closestObject<xAOD::TrigEMClusterContainer>( eg, dec, trigger, key("FastCalo") , m_dR, condition);
201}

◆ matchL2Electron()

bool TrigEgammaMatchingToolMT::matchL2Electron ( const xAOD::Electron * eg,
const std::string & trigger,
const TrigCompositeUtils::Decision *& dec,
unsigned int condition = TrigDefs::Physics ) const
private

=======================================================================

Definition at line 185 of file TrigEgammaMatchingToolMT.cxx.

186{
187 ATH_MSG_DEBUG("Match L2 Electron");
188 if(trigger.contains("lrt")){
189 return closestObject<xAOD::TrigElectronContainer>( eg, dec, trigger, key("FastElectrons_LRT"), m_dR, condition );
190 }else{
191 return closestObject<xAOD::TrigElectronContainer>( eg, dec, trigger, key("FastElectrons"), m_dR, condition );
192 }
193}

◆ matchL2Photon()

bool TrigEgammaMatchingToolMT::matchL2Photon ( const xAOD::Photon * eg,
const std::string & trigger,
const TrigCompositeUtils::Decision *& dec,
unsigned int condition = TrigDefs::Physics ) const
private

=======================================================================

Definition at line 177 of file TrigEgammaMatchingToolMT.cxx.

178{
179 ATH_MSG_DEBUG("Match L2 Photon");
180 return closestObject<xAOD::TrigPhotonContainer>( eg, dec, trigger, key("FastPhotons"), m_dR, condition );
181}

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msg_level_name()

const std::string & asg::AsgTool::msg_level_name ( ) const
inherited

A deprecated function for getting the message level's name.

Instead of using this, weirdly named function, user code should get the string name of the current minimum message level (in case they really need it...), with:

MSG::name( msg().level() )

This function's name doesn't follow the ATLAS coding rules, and as such will be removed in the not too distant future.

Returns
The string name of the current minimum message level that's printed

Definition at line 101 of file AsgTool.cxx.

101 {
102
103 return MSG::name( msg().level() );
104 }
MsgStream & msg() const
const std::string & name(Level lvl)
Convenience function for translating message levels to strings.
Definition MsgLevel.cxx:19

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ print()

void asg::AsgTool::print ( ) const
virtualinherited

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, and AthCheckedComponent<::AthAlgTool >.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ tdt()

const ToolHandle< Trig::TrigDecisionTool > & TrigEgammaMatchingToolMT::tdt ( ) const
inlineprivate

Definition at line 98 of file TrigEgammaMatchingToolMT.h.

98{ return m_trigDecTool; };

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default).

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dR

Gaudi::Property<float> TrigEgammaMatchingToolMT::m_dR {this, "DeltaR", 0.07}
private

Definition at line 100 of file TrigEgammaMatchingToolMT.h.

100{this, "DeltaR", 0.07};

◆ m_dRL1

Gaudi::Property<float> TrigEgammaMatchingToolMT::m_dRL1 {this, "L1DeltaR", 0.15}
private

Definition at line 101 of file TrigEgammaMatchingToolMT.h.

101{this, "L1DeltaR", 0.15};

◆ m_emTauRoIKey

SG::ReadHandleKey<xAOD::EmTauRoIContainer> TrigEgammaMatchingToolMT::m_emTauRoIKey {this, "EmTauRoIKey" , "LVL1EmTauRoIs", ""}
private

Definition at line 102 of file TrigEgammaMatchingToolMT.h.

102{this, "EmTauRoIKey" , "LVL1EmTauRoIs", ""};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default).

Definition at line 390 of file AthCommonDataStore.h.

◆ m_keys

std::map<std::string,std::string> TrigEgammaMatchingToolMT::m_keys
private

Definition at line 95 of file TrigEgammaMatchingToolMT.h.

◆ m_ringerKey

SG::ReadHandleKey<xAOD::TrigRingerRingsContainer> TrigEgammaMatchingToolMT::m_ringerKey {this, "RingerKey" , "HLT_FastCaloRinger", ""}
private

Definition at line 103 of file TrigEgammaMatchingToolMT.h.

103{this, "RingerKey" , "HLT_FastCaloRinger", ""};

◆ m_trigDecTool

ToolHandle<Trig::TrigDecisionTool> TrigEgammaMatchingToolMT::m_trigDecTool {this, "TriggerTool", ""}
private

Definition at line 97 of file TrigEgammaMatchingToolMT.h.

97{this, "TriggerTool", ""};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: