ATLAS Offline Software
TrigEgammaMatchingTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include <boost/algorithm/string.hpp>
7 
8 
9 #ifdef ROOTCORE
10 #include "xAODRootAccess/Init.h"
11 #include "xAODRootAccess/TEvent.h"
13 #endif // ROOTCORE
14 
15 #ifndef XAOD_ANALYSIS
17 #endif
18 
19 namespace Trig {
21  : asg::AsgMetadataTool( name ),
22  m_trigDecTool("Trig::TrigDecisionTool/TrigDecisionTool")
23  {
24  declareProperty( "TriggerTool", m_trigDecTool);
25  declareProperty( "DeltaR", m_dR=0.07);
26  declareProperty( "L1DeltaR", m_dRL1=0.15);
27  }
28 
30  }
31 
32 
34  // Greet the user:
35  ATH_MSG_INFO( "Initialising... " );
36 
37  ATH_CHECK(m_trigDecTool.retrieve());
38 
39  return StatusCode::SUCCESS;
40  }
41 
42  double TrigEgammaMatchingTool::dR(const double eta1, const double phi1, const double eta2, const double phi2){
43  double deta = fabs(eta1 - eta2);
44  double dphi = fabs(phi1 - phi2) < TMath::Pi() ? fabs(phi1 - phi2) : 2*TMath:: \
45  Pi() - fabs(phi1 - phi2);
46  return sqrt(deta*deta + dphi*dphi);
47  }
48 
54 
55  if(eg==nullptr) {
56  ATH_MSG_DEBUG("nullptr Offline object");
57  return nullptr;
58  }
60  double deltaR=0.;
61  double dRMax = 100;
62  const xAOD::Electron *elEF = 0;
63  const xAOD::Photon *phEF = 0;
64  if(eg->type()==xAOD::Type::Electron){
65  const xAOD::Electron* elOff =static_cast<const xAOD::Electron*> (eg);
66  const std::vector< Trig::Feature<xAOD::ElectronContainer> > vec = fc.get<xAOD::ElectronContainer>("egamma_Electrons");
67 
68  for(auto feat : vec){
69  const xAOD::ElectronContainer *cont = feat.cptr();
70  if(cont == nullptr) {
71  ATH_MSG_DEBUG("Electron container from TE nullptr");
72  continue;
73  }
74  for(const auto el : *cont){
75  if(el == nullptr) {
76  ATH_MSG_DEBUG("Electron from TE nullptr");
77  continue;
78  }
79  deltaR = dR(elOff->trackParticle()->eta(),elOff->trackParticle()->phi(), el->trackParticle()->eta(),el->trackParticle()->phi());
80  if (deltaR < dRMax) {
81  dRMax = deltaR;
82  elEF =el;
83  }
84  }
85  }
86  if(dRMax < m_dR) return elEF;
87  }
88  else if(eg->type()==xAOD::Type::Photon){
89  const xAOD::Photon* phOff =static_cast<const xAOD::Photon*> (eg);
90  const std::vector< Trig::Feature<xAOD::PhotonContainer> > vec = fc.get<xAOD::PhotonContainer>("egamma_Photons");
91  for(auto feat : vec){
92  const xAOD::PhotonContainer *cont = feat.cptr();
93  if(cont == nullptr) {
94  ATH_MSG_DEBUG("Photon Container from TE nullptr");
95  continue;
96  }
97  for(const auto ph : *cont){
98  if(ph == nullptr) {
99  ATH_MSG_DEBUG("Photon from TE nullptr");
100  continue;
101  }
102  deltaR = dR(phOff->caloCluster()->eta(),phOff->caloCluster()->phi(), ph->caloCluster()->eta(),ph->caloCluster()->phi());
103  if (deltaR < dRMax) {
104  dRMax = deltaR;
105  phEF =ph;
106  }
107  }
108  }
109  if(dRMax < m_dR) return phEF;
110  }
111  return 0; // No match
112  }
113 
116  bool TrigEgammaMatchingTool::matchHLT(const xAOD::Egamma *eg,const std::string &trigger){
117  ATH_MSG_DEBUG("matchHLT");
119  ATH_MSG_DEBUG("FeatureContainer");
120  double deltaR=0.;
122  ATH_MSG_DEBUG("Electron");
123  //const xAOD::Electron* elOff =static_cast<const xAOD::Electron*> (eg);
124 #ifdef XAOD_ANALYSIS
125  const auto vec = fc.containerFeature<xAOD::ElectronContainer>("egamma_Electrons");
126 #else
127  const auto vec = fc.get<xAOD::ElectronContainer>("egamma_Electrons");
128 #endif // XAOD_ANALYSIS
129  ATH_MSG_DEBUG("Container Feature");
130  for(const auto& feat : vec){
131  const xAOD::ElectronContainer *cont = feat.cptr();
132  if(cont == nullptr) {
133  ATH_MSG_DEBUG("Electron container from TE nullptr");
134  continue;
135  }
136  for(const auto el : *cont){
137  if(el == nullptr) {
138  ATH_MSG_WARNING("Electron from TE nullptr");
139  continue;
140  }
141  deltaR = dR(eg->eta(),eg->phi(), el->eta(),el->phi());
142  if(deltaR < m_dR){
143  return true;
144  }
145  }
146  }
147  }
149  std::string key = "egamma_Photons";
150  if(boost::contains(trigger,"icaloloose") || boost::contains(trigger,"icalovloose") || boost::contains(trigger,"icalotight")) key = "egamma_Iso_Photons";
151  //key="";
152 
153  const xAOD::Photon* phOff =static_cast<const xAOD::Photon*> (eg);
154 #ifdef XAOD_ANALYSIS
155  const auto vec = fc.containerFeature<xAOD::PhotonContainer>(key);
156 #else
157  const auto vec = fc.get<xAOD::PhotonContainer>(key);
158 #endif // XAOD_ANALYSIS
159  for(const auto& feat : vec){
160  const xAOD::PhotonContainer *cont = feat.cptr();
161  if(cont == nullptr) {
162  ATH_MSG_DEBUG("Photon Container from TE nullptr");
163  continue;
164  }
165  for(const auto ph : *cont){
166  if(ph == nullptr) {
167  ATH_MSG_DEBUG("Photon from TE nullptr");
168  continue;
169  }
170  deltaR = dR(phOff->eta(),phOff->phi(), ph->eta(),ph->phi());
171  if(deltaR < m_dR){
172  return true;
173  }
174  }
175  }
176  }
177  return false; // No match
178  }
179 
180  bool TrigEgammaMatchingTool::matchHLTPhoton(const xAOD::Photon *eg,const std::string &trigger,const HLT::TriggerElement*& finalFC){
181  finalFC=nullptr;
182  ATH_MSG_DEBUG("Match HLT Photon");
183  // Get the container of online electrons associated to passed items
184  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
185  std::string key = "egamma_Photons";
186  if(boost::contains(trigger,"iloose") || boost::contains(trigger,"ivloose") || boost::contains(trigger,"itight")) key = "egamma_Iso_Photons";
187  key="";
188 
189 
190 #ifdef XAOD_ANALYSIS
191  const auto vec = fc.containerFeature<xAOD::PhotonContainer>(key,TrigDefs::alsoDeactivateTEs);
192 #else
193  const auto vec = fc.get<xAOD::PhotonContainer>(key,TrigDefs::alsoDeactivateTEs);
194 #endif // XAOD_ANALYSIS
195  ATH_MSG_DEBUG("EF FC Size " << vec.size());
196  double deltaR=0.;
197  for(auto feat : vec){
198  const xAOD::PhotonContainer *cont = feat.cptr();
199  if(cont == nullptr) {
200  ATH_MSG_DEBUG("Photon Container from TE nullptr");
201  continue;
202  }
203  ATH_MSG_DEBUG("EF Size " << cont->size());
204  for(const auto ph : *cont){
205  if(ph == nullptr) {
206  ATH_MSG_DEBUG("Photon from TE nullptr");
207  continue;
208  }
209  deltaR = dR(eg->eta(),eg->phi(), ph->eta(),ph->phi());
210  if(deltaR < m_dR){
211  finalFC = (feat.te());
212  return true;
213  }
214  }
215  }
216  return false;
217  }
218 
220  ATH_MSG_DEBUG("Match HLT electron");
221  finalFC=nullptr;
222  // Get the container of online electrons associated to passed items
223  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
224 
225 #ifdef XAOD_ANALYSIS
226  const auto vec = fc.containerFeature<xAOD::ElectronContainer>("",TrigDefs::alsoDeactivateTEs);
227 #else
228  const auto vec = fc.get<xAOD::ElectronContainer>("",TrigDefs::alsoDeactivateTEs);
229 #endif // XAOD_ANALYSIS
230  ATH_MSG_DEBUG("EF FC Size " << vec.size());
231  double deltaR=0.;
232  for(auto feat : vec){
233  const xAOD::ElectronContainer *cont = feat.cptr();
234  if(cont == nullptr) {
235  ATH_MSG_WARNING("Electron Container from TE nullptr");
236  continue;
237  }
238  ATH_MSG_DEBUG("EF Size " << cont->size());
239  for(const auto el : *cont){
240  if(el == nullptr) {
241  ATH_MSG_DEBUG("Electron from TE nullptr");
242  continue;
243  }
244  deltaR = dR(eg->eta(),eg->phi(), el->eta(),el->phi());
245  if(deltaR < m_dR){
246  finalFC = (feat.te());
247  ATH_MSG_DEBUG("Electron finalFC matches offline");
248  return true;
249  }
250  }
251  }
252  ATH_MSG_DEBUG("Reached the end in matchHLTElectron. So didn't match!");
253  return false;
254  }
255 
256  bool TrigEgammaMatchingTool::matchHLTCalo(const xAOD::Egamma *eg,const std::string &trigger,const HLT::TriggerElement*& finalFC){
257  ATH_MSG_DEBUG("Match HLT CaloCluster");
258  finalFC=nullptr;
259  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
260 #ifdef XAOD_ANALYSIS
261  const auto vec = fc.containerFeature<xAOD::CaloClusterContainer>("TrigEFCaloCalibFex",TrigDefs::alsoDeactivateTEs);
262 #else
263  const auto vec = fc.get<xAOD::CaloClusterContainer>("TrigEFCaloCalibFex",TrigDefs::alsoDeactivateTEs);
264 #endif // XAOD_ANALYSIS
265 
266  ATH_MSG_DEBUG("EFCal FC Size " << vec.size());
267  double deltaR=0.;
268  for(auto feat : vec){
269  const xAOD::CaloClusterContainer *cont = feat.cptr();
270  ATH_MSG_DEBUG("EF Calo Size " << cont->size());
271  if(cont == nullptr) {
272  ATH_MSG_DEBUG("CaloCluster Container from TE nullptr");
273  continue;
274  }
275  for(const auto clus : *cont){
276  if(clus == nullptr) {
277  ATH_MSG_DEBUG("CaloCluster from TE nullptr");
278  continue;
279  }
280  deltaR = dR(eg->eta(),eg->phi(), clus->eta(),clus->phi());
281  if(deltaR < m_dR){
282  finalFC = (feat.te());
283  return true;
284  }
285  }
286  }
287  return false;
288 
289  }
290 
291  bool TrigEgammaMatchingTool::matchL2Photon(const xAOD::Photon *eg,const std::string &trigger,const HLT::TriggerElement*& finalFC){
292  finalFC=nullptr;
293  ATH_MSG_DEBUG("Match L2 Photon");
294  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
295 
296 #ifdef XAOD_ANALYSIS
297  auto vec = fc.containerFeature<xAOD::TrigPhotonContainer>("",TrigDefs::alsoDeactivateTEs);
298 #else
299  auto vec = fc.get<xAOD::TrigPhotonContainer>("",TrigDefs::alsoDeactivateTEs);
300 #endif
301  ATH_MSG_DEBUG("L2 FC Size " << vec.size());
302  double deltaR=0.;
303  for(auto feat : vec){
304  const xAOD::TrigPhotonContainer *cont = feat.cptr();
305  if(cont == nullptr) {
306  ATH_MSG_WARNING("TrigPhoton Container from TE nullptr");
307  continue;
308  }
309  ATH_MSG_DEBUG("L2 Size " << cont->size());
310  for(const auto l2 : *cont){
311  if(l2 == nullptr) {
312  ATH_MSG_DEBUG("TrigElectron from TE nullptr");
313  continue;
314  }
315  deltaR = dR(eg->eta(),eg->phi(), l2->eta(),l2->phi());
316  if(deltaR < m_dR){
317  finalFC = (feat.te());
318  return true;
319  }
320  }
321  }
322  return false;
323  }
324 
326  finalFC=nullptr;
327  ATH_MSG_DEBUG("Match L2 Electron");
328  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
329 #ifdef XAOD_ANALYSIS
330  auto vec = fc.containerFeature<xAOD::TrigElectronContainer>("",TrigDefs::alsoDeactivateTEs);
331 #else
332  auto vec = fc.get<xAOD::TrigElectronContainer>("",TrigDefs::alsoDeactivateTEs);
333 #endif
334  ATH_MSG_DEBUG("L2 FC Size " << vec.size());
335  double deltaR=0.;
336  for(auto feat : vec){
337  const xAOD::TrigElectronContainer *cont = feat.cptr();
338  if(cont == nullptr) {
339  ATH_MSG_DEBUG("TrigElectron Container from TE nullptr");
340  continue;
341  }
342  ATH_MSG_DEBUG("L2 Size " << cont->size());
343  for(const auto l2 : *cont){
344  if(l2 == nullptr) {
345  ATH_MSG_DEBUG("TrigElectron from TE nullptr");
346  continue;
347  }
348  deltaR = dR(eg->eta(),eg->phi(), l2->eta(),l2->phi());
349  if(deltaR < m_dR){
350  finalFC = (feat.te());
351  return true;
352  }
353  }
354  }
355  return false;
356 
357  }
358 
359  bool TrigEgammaMatchingTool::matchL2Calo(const xAOD::Egamma *eg,const std::string &trigger,const HLT::TriggerElement*& finalFC){
360  finalFC=nullptr;
361  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
362 #ifdef XAOD_ANALYSIS
363  ATH_MSG_DEBUG("No matching for TrigEMCluster in AnalysisBase");
364  return false;
365 #else
366  auto vec = fc.get<xAOD::TrigEMCluster>("",TrigDefs::alsoDeactivateTEs);
367 
368  ATH_MSG_DEBUG("L2 FC Size " << vec.size());
369  for(auto feat : vec){
370  const xAOD::TrigEMCluster *em = feat.cptr();
371  if(em == nullptr) {
372  ATH_MSG_DEBUG("TrigEMCluster from TE nullptr");
373  continue;
374  }
375  ATH_MSG_DEBUG("TrigEMCluster << " << em->et() );
376  double deltaR=0.;
377  deltaR = dR(eg->eta(),eg->phi(), em->eta(),em->phi());
378  if(deltaR < m_dR){
379  finalFC = (feat.te());
380  return true;
381  }
382  }
383 #endif
384  return false;
385 
386  }
387 
388  bool TrigEgammaMatchingTool::matchL1( const xAOD::Egamma* eg, const std::string &trigger,const HLT::TriggerElement*& finalFC ){
389  finalFC=nullptr;
390 
391 #ifdef XAOD_ANALYSIS
392  if(m_trigDecTool->isPassed("L1_EM.*")) return true;
393 #else
394  double deltaR=0.;
395  auto fc = (m_trigDecTool->features(trigger,TrigDefs::alsoDeactivateTEs));
396  auto initRois = fc.get<TrigRoiDescriptor>();
397  if ( initRois.size() < 1 ) return false;
398  for (auto initRoi: initRois) {
399  auto itEmTau = m_trigDecTool->ancestor<xAOD::EmTauRoI>(initRoi);
400  const xAOD::EmTauRoI *l1 = itEmTau.cptr();
401  if(l1 == nullptr) {
402  ATH_MSG_DEBUG("EMTauRoI from TE nullptr");
403  return false;
404  }
405  deltaR = dR(eg->eta(),eg->phi(), l1->eta(),l1->phi());
406 
407  if(deltaR < m_dRL1){
408  finalFC = (itEmTau.te());
409  return true;
410  }
411  }
412 #endif
413  return false; // otherwise, someone matched!*/
414 
415  }
416 
417  /*bool TrigEgammaMatchingTool::matchL1( const xAOD::Egamma* eg, const std::string trigger){
418  finalFC=nullptr;
419 
420 #ifdef XAOD_ANALYSIS
421  if(m_trigDecTool->isPassed("L1_EM.*")) return true;
422 #else
423  double deltaR=0.;
424  auto fc = (m_trigDecTool->features(trigger));
425  auto initRois = fc.get<TrigRoiDescriptor>();
426  if ( initRois.size() < 1 ) return false;
427  auto cont = m_trigDecTool->ancestor<xAOD::EmTauRoIContainer>(initRois);
428  for(const auto &l1 : cont){
429  //const xAOD::EmTauRoI *l1 = feat.cptr();
430  if(l1 == nullptr) {
431  ATH_MSG_DEBUG("EMTauRoI from TE nullptr");
432  return false;
433  }
434 
435  if(eg->type()==xAOD::Type::Electron){
436  const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
437  deltaR = dR(el->trackParticle()->eta(),el->trackParticle()->phi(), l1->eta(),l1->phi());
438  }
439  else if (eg->type()==xAOD::Type::Photon)
440  deltaR = dR(eg->caloCluster()->eta(),eg->caloCluster()->phi(), l1->eta(),l1->phi());
441 
442  if(deltaR < m_dRL1){
443  finalFC = (itEmTau.te());
444  return true;
445  }
446  }
447 #endif
448  return false; // otherwise, someone matched!
449 
450  }*/
451  bool TrigEgammaMatchingTool::match(const xAOD::Egamma *eg,const std::string &trigger,const HLT::TriggerElement*& finalFC){
452  // Set TE to nullptr
453  // If no match easy check
454  finalFC=nullptr;
455 
456  ATH_MSG_DEBUG("Match objec with trigger " << trigger);
458  const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
459  if( matchHLTElectron(el,trigger,finalFC) ) {
460  ATH_MSG_DEBUG("Matchched!");
461  return true;
462  }
463  }
465  const xAOD::Photon* ph =static_cast<const xAOD::Photon*> (eg);
466  if( matchHLTPhoton(ph,trigger,finalFC) ) return true;
467  }
468  if( matchHLTCalo(eg,trigger,finalFC) ) return true;
470  const xAOD::Electron* el =static_cast<const xAOD::Electron*> (eg);
471  if( matchL2Electron(el,trigger,finalFC) ) return true;
472  }
474  const xAOD::Photon* ph =static_cast<const xAOD::Photon*> (eg);
475  //if( matchL2Photon(ph,fc,trigger,finalFC) ) return true;
476  if( matchL2Photon(ph,trigger,finalFC) ) return true;
477  }
478  if( matchL2Calo(eg,trigger,finalFC) ) return true;
479  if( matchL1(eg,trigger,finalFC) ) return true;
480  ATH_MSG_DEBUG("match() failed!");
481  return false;// otherwise, someone matched!*/
482  }
483 
486  bool TrigEgammaMatchingTool::match(const xAOD::Egamma *eg,const std::string &trigger){
487  const HLT::TriggerElement* finalFC;
488  bool passed = false;
489  if( match(eg,trigger,finalFC) ){
490  if( finalFC == nullptr) return false;
492  if ( (m_trigDecTool->ancestor<xAOD::ElectronContainer>(finalFC)).te() != nullptr){
493  if( (m_trigDecTool->ancestor<xAOD::ElectronContainer>(finalFC)).te()->getActiveState())
494  passed = true;
495  }
496  }
498  if ( (m_trigDecTool->ancestor<xAOD::PhotonContainer>(finalFC)).te() != nullptr){
499  if( (m_trigDecTool->ancestor<xAOD::PhotonContainer>(finalFC)).te()->getActiveState())
500  passed = true;
501  }
502  }
503  }
504  return passed;
505  }
506 
507 } //namespace Trig
508 
509 
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
Trig::TrigEgammaMatchingTool::matchL2Calo
bool matchL2Calo(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:359
xAOD::Electron
Electron_v1 Electron
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Electron.h:17
TrigEgammaMatchingTool.h
xAOD::TrigEMCluster_v1::eta
float eta() const
get Eta (calibrated)
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
TrigCompositeUtils::passed
bool passed(DecisionID id, const DecisionIDContainer &idSet)
checks if required decision ID is in the set of IDs in the container
Definition: TrigCompositeUtilsRoot.cxx:117
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
ParticleTest.eg
eg
Definition: ParticleTest.py:29
Trig
The common trigger namespace for trigger analysis tools.
Definition: CaloTowerVecMon.h:44
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TrackParticle_v1.cxx:77
Trig::TrigEgammaMatchingTool::matchL1
bool matchL1(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:388
Trig::FeatureContainer::containerFeature
std::vector< Feature< CONTAINER > > containerFeature(const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
Definition: FeatureContainer.h:103
asg
Definition: DataHandleTestTool.h:28
Trig::TrigEgammaMatchingTool::matchHLTCalo
bool matchHLTCalo(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:256
DataVector::get
const T * get(size_type n) const
Access an element, as an rvalue.
Trig::TrigEgammaMatchingTool::initialize
virtual StatusCode initialize() override
Definition: TrigEgammaMatchingTool.cxx:33
xAOD::eta1
setEt setPhi setE277 setWeta2 eta1
Definition: TrigEMCluster_v1.cxx:41
xAOD::Electron_v1::trackParticle
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
Definition: Electron_v1.cxx:55
TrigRoiDescriptor
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
Definition: TrigRoiDescriptor.h:56
Trig::TrigEgammaMatchingTool::matchHLTElectron
bool matchHLTElectron(const xAOD::Electron *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:219
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
ReturnCheck.h
Trig::FeatureContainer
Definition: FeatureContainer.h:54
skel.l2
l2
Definition: skel.GENtoEVGEN.py:426
xAOD::TrigEMCluster_v1::phi
float phi() const
get Phi (calibrated)
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
Trig::TrigEgammaMatchingTool::matchHLT
virtual bool matchHLT(const xAOD::Egamma *, const std::string &) override
Egamma trigger matching to HLT Electron/Photon Only.
Definition: TrigEgammaMatchingTool.cxx:116
xAOD::EmTauRoI_v2
Class describing a LVL1 em/tau region of interest.
Definition: EmTauRoI_v2.h:35
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:13
HLT::TriggerElement
TriggerElement is the basic ingreedient of the interface between HLT algorithms and the navigation It...
Definition: TrigNavStructure/TrigNavStructure/TriggerElement.h:27
Trig::TrigEgammaMatchingTool::m_trigDecTool
ToolHandle< Trig::TrigDecisionTool > m_trigDecTool
Definition: TrigEgammaMatchingTool.h:48
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
xAOD::Egamma_v1::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition: Egamma_v1.cxx:388
TEvent.h
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Init.h
xAOD::Egamma_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: Egamma_v1.cxx:75
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
Trig::TrigEgammaMatchingTool::match
virtual bool match(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&) override
Egamma trigger matching which returns TE.
Definition: TrigEgammaMatchingTool.cxx:451
Trig::TrigEgammaMatchingTool::matchHLTPhoton
bool matchHLTPhoton(const xAOD::Photon *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:180
Trig::TrigEgammaMatchingTool::matchL2Electron
bool matchL2Electron(const xAOD::Electron *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:325
Trig::TrigEgammaMatchingTool::matchL2Photon
bool matchL2Photon(const xAOD::Photon *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:291
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
Trig::FeatureContainer::get
const std::vector< Trig::Feature< T > > get(const std::string &label="", unsigned int condition=TrigDefs::Physics, const std::string &teName="") const
returns flattened vector of Features of given type This method is in fact sullied by 3 arguments.
Definition: FeatureContainer.h:151
xAOD::Electron_v1
Definition: Electron_v1.h:34
xAOD::Photon
Photon_v1 Photon
Definition of the current "egamma version".
Definition: Event/xAOD/xAODEgamma/xAODEgamma/Photon.h:17
Trig::TrigEgammaMatchingTool::m_dR
double m_dR
Definition: TrigEgammaMatchingTool.h:44
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
xAOD::EgammaHelpers::isPhoton
bool isPhoton(const xAOD::Egamma *eg)
is the object a photon
Definition: EgammaxAODHelpers.cxx:22
Trig::TrigEgammaMatchingTool::TrigEgammaMatchingTool
TrigEgammaMatchingTool(const std::string &name)
Definition: TrigEgammaMatchingTool.cxx:20
xAOD::TrigEMCluster_v1::et
float et() const
get Et (calibrated)
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: Egamma_v1.cxx:70
TrigRoiDescriptor.h
skel.l1
l1
Definition: skel.GENtoEVGEN.py:425
Trig::TrigEgammaMatchingTool::closestHLTObject
virtual const xAOD::Egamma * closestHLTObject(const xAOD::Egamma *, const std::string &) override
Egamma trigger matching to HLT Electron/Photon only – returns nearest object.
Definition: TrigEgammaMatchingTool.cxx:53
xAOD::TrigEMCluster_v1
Description of a trigger EM cluster.
Definition: TrigEMCluster_v1.h:28
Trig::TrigEgammaMatchingTool::~TrigEgammaMatchingTool
virtual ~TrigEgammaMatchingTool()
Definition: TrigEgammaMatchingTool.cxx:29
Trig::TrigEgammaMatchingTool::dR
double dR(const double, const double, const double, const double)
Definition: TrigEgammaMatchingTool.cxx:42
Trig::TrigEgammaMatchingTool::m_dRL1
double m_dRL1
Definition: TrigEgammaMatchingTool.h:45
makeComparison.deltaR
float deltaR
Definition: makeComparison.py:36
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
xAOD::TrackParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle (has range to .)
PhysDESDM_Quirks.trigger
trigger
Definition: PhysDESDM_Quirks.py:27
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37