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 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 TrigCompositeUtils::Decision *, const std::string &trigger, const std::string &key, unsigned int condition=TrigDefs::Physics) const
template<class T>
TrigCompositeUtils::LinkInfo< T > getFeature (const TrigCompositeUtils::Decision *, const std::string &trigger, unsigned int condition=TrigDefs::Physics) const
template<class T>
std::vector< TrigCompositeUtils::LinkInfo< T > > getFeatures (const TrigCompositeUtils::Decision *, const std::string &trigger, unsigned int condition=TrigDefs::Physics) const
template<class T>
std::vector< TrigCompositeUtils::LinkInfo< T > > getFeatures (const TrigCompositeUtils::Decision *, const std::string &trigger, const std::string &key, unsigned int condition=TrigDefs::Physics) const
const xAOD::EmTauRoIgetL1Feature (const TrigCompositeUtils::Decision *) const
 =======================================================================
const xAOD::eFexEMRoIgetL1eEMFeature (const TrigCompositeUtils::Decision *) const
 =======================================================================
const xAOD::TrigRingerRingsgetRingsFeature (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 25 of file TrigEgammaMatchingToolMT.cxx.

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

◆ ~TrigEgammaMatchingToolMT()

TrigEgammaMatchingToolMT::~TrigEgammaMatchingToolMT ( )
default

Member Function Documentation

◆ ancestorPassed()

template<class T>
bool TrigEgammaMatchingToolMT::ancestorPassed ( 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 83 of file TrigEgammaMatchingToolMT.h.

84 {
85 double deta = std::abs(eta1 - eta2);
86 double dphi = std::abs(phi1 - phi2) < TMath::Pi() ? std::abs(phi1 - phi2) : 2*TMath::Pi() - std::abs(phi1 - phi2);
87 return sqrt(deta*deta + dphi*dphi);
88 };
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 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 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 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::TEvent 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::TEvent, 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 TrigCompositeUtils::Decision * dec) const

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

Definition at line 247 of file TrigEgammaMatchingToolMT.cxx.

248{
249 if( !dec ) return nullptr;
250 auto initRoi = TrigCompositeUtils::findLink<xAOD::eFexEMRoIContainer>(dec, "initialRecRoI");
251 if( !initRoi.isValid() ) return nullptr;
252 return *(initRoi.link);
253}
LinkInfo< T > findLink(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 TrigCompositeUtils::Decision * dec) const

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

Definition at line 227 of file TrigEgammaMatchingToolMT.cxx.

228{
229 if( !dec ) return nullptr;
230 auto initRoi = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>(dec, "initialRoI");
231 if( !initRoi.isValid() ) return nullptr;
232
233 SG::ReadHandle<xAOD::EmTauRoIContainer> l1_cont( m_emTauRoIKey, Gaudi::Hive::currentContext());
234 if( !l1_cont.isValid() ) return nullptr;
235
236 for( const auto *l1 : *l1_cont ){
237 if ( l1->roiType() != xAOD::EmTauRoI::RoIType::EMRoIWord) continue;
238 if((*initRoi.link)->roiWord()==l1->roiWord()){
239 return l1;
240 }
241 }
242 return nullptr;
243}
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::TEvent 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::TEvent, 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 TrigCompositeUtils::Decision * dec) const

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

Definition at line 257 of file TrigEgammaMatchingToolMT.cxx.

258{
259 if( !dec ) return nullptr;
260 auto initRoi = TrigCompositeUtils::findLink<TrigRoiDescriptorCollection>(dec, "initialRoI");
261 if( !initRoi.isValid() ) return nullptr;
262
263 SG::ReadHandle<xAOD::TrigRingerRingsContainer> rg_cont( m_ringerKey, Gaudi::Hive::currentContext() );
264
265 if( !rg_cont.isValid() ) return nullptr;
266
267 for( const auto *rg : *rg_cont ){
268 const xAOD::TrigEMCluster *cl = rg->emCluster();
269 if(!cl) continue;
270 if(cl->RoIword()==(*initRoi.link)->roiWord())
271 return rg;
272 }
273 return nullptr;
274}
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 33 of file TrigEgammaMatchingToolMT.cxx.

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

◆ 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 xAOD::Egamma * eg,
const std::string & trigger,
unsigned int condition = TrigDefs::Physics ) const

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

Definition at line 74 of file TrigEgammaMatchingToolMT.cxx.

75{
76 const TrigCompositeUtils::Decision *dec=nullptr;
77 if( match( eg, trigger, dec ) ){
78 if( dec ){
80 std::string key = this->key("Electrons_GSF");
81 if(boost::contains(trigger,"nogsf")) key=this->key("Electrons");
82 if(boost::contains(trigger,"lrt")) key=this->key("Electrons_LRT");
83 return ancestorPassed<xAOD::ElectronContainer>(dec, trigger,key, condition);
84 }
86 return ancestorPassed<xAOD::PhotonContainer>(dec, trigger, key("Photons"), condition);
87 }
88 }
89 }
90 return false;
91}
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 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 67 of file TrigEgammaMatchingToolMT.cxx.

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

◆ 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 95 of file TrigEgammaMatchingToolMT.cxx.

96{
97
98 ATH_MSG_DEBUG("Match decec with trigger " << trigger);
100 const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
101 if( matchHLTElectron(el,trigger,dec, condition) ) {
102 ATH_MSG_DEBUG("Matched!");
103 return true;
104 }
105 }else if(xAOD::EgammaHelpers::isPhoton(eg)){
106 const xAOD::Photon* ph =static_cast<const xAOD::Photon*> (eg);
107 if( matchHLTPhoton(ph,trigger,dec, condition) ) return true;
108 }
109
110 if( matchHLTCalo(eg,trigger,dec) ) return true;
111
113 const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
114 if( matchL2Electron(el,trigger,dec, condition) ) return true;
115
116 }else if(xAOD::EgammaHelpers::isPhoton(eg)){
117 const xAOD::Photon* ph =static_cast<const xAOD::Photon*> (eg);
118 if( matchL2Photon(ph,trigger,dec, condition) ) return true;
119 }
120
121 if( matchL2Calo(eg,trigger,dec, condition) ) return true;
122
123 if( matchL1(eg,trigger,dec, condition) ) return true;
124 ATH_MSG_DEBUG("match() failed!");
125 return false;
126}
#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 155 of file TrigEgammaMatchingToolMT.cxx.

156{
157 ATH_MSG_DEBUG("Match HLT PrecisionCalo");
158 if(boost::contains(trigger,"lrt")){
159 ATH_MSG_DEBUG("Matched HLT PrecisionCalo LRT");
160 return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_LRT"), m_dR, condition );
161 }else if(boost::contains(trigger,"ion")){
162 ATH_MSG_DEBUG("Matched HLT PrecisionCalo Heavy Ion");
163 return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_HI"), m_dR, condition );
165 ATH_MSG_DEBUG("Matched HLT PrecisionCalo Electron");
166 return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_Electron"), m_dR, condition );
167 }else if(xAOD::EgammaHelpers::isPhoton(eg)){
168 ATH_MSG_DEBUG("Matched HLT PrecisionCalo Photon");
169 return closestObject<xAOD::CaloClusterContainer>( eg, dec, trigger, key("PrecisionCalo_Photon"), m_dR, condition );
170 }else{
171 ATH_MSG_DEBUG("Match HLT PrecisionCalo failed!");
172 return false;
173 }
174}
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 139 of file TrigEgammaMatchingToolMT.cxx.

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

◆ 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 131 of file TrigEgammaMatchingToolMT.cxx.

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

◆ 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 206 of file TrigEgammaMatchingToolMT.cxx.

207{
208 ATH_MSG_DEBUG("Match L1 Calo");
209
210 double deltaR=0.0;
211 auto initRois = tdt()->features<TrigRoiDescriptorCollection>(trigger,condition,"",TrigDefs::allFeaturesOfType,"initialRoI");
212 if( initRois.size() < 1) return false;
213 for( auto &initRoi: initRois ){
214 if( !initRoi.link.isValid() ) continue;
215 deltaR = dR(eg->eta(),eg->phi(), (*initRoi.link)->eta(),(*initRoi.link)->phi());
216 if(deltaR < (float)m_dRL1){
217 dec=initRoi.source;
218 return true;
219 }
220 }
221
222 return false;
223}
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
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 198 of file TrigEgammaMatchingToolMT.cxx.

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

◆ 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 186 of file TrigEgammaMatchingToolMT.cxx.

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

◆ 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 178 of file TrigEgammaMatchingToolMT.cxx.

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

◆ 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()

◆ 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 >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ 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 94 of file TrigEgammaMatchingToolMT.h.

94{ 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 96 of file TrigEgammaMatchingToolMT.h.

96{this, "DeltaR", 0.07};

◆ m_dRL1

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

Definition at line 97 of file TrigEgammaMatchingToolMT.h.

97{this, "L1DeltaR", 0.15};

◆ m_emTauRoIKey

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

Definition at line 98 of file TrigEgammaMatchingToolMT.h.

98{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 91 of file TrigEgammaMatchingToolMT.h.

◆ m_ringerKey

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

Definition at line 99 of file TrigEgammaMatchingToolMT.h.

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

◆ m_trigDecTool

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

Definition at line 93 of file TrigEgammaMatchingToolMT.h.

93{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: