ATLAS Offline Software
TrigEgammaMatchingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigEgammaMatchingTool_H
6 #define TrigEgammaMatchingTool_H
7 
12 #include "AsgTools/AsgTool.h"
13 #include "AsgTools/ToolHandle.h"
14 #include <iostream>
15 
16 
17 
18 namespace Trig{
20  public asg::AsgMetadataTool,
21  public virtual ITrigEgammaMatchingTool
22 {
25 
26  public:
27 
28  TrigEgammaMatchingTool( const std::string& name );
29 
30  virtual ~TrigEgammaMatchingTool();
31 
32  virtual StatusCode initialize() override;
33 
34 
36  virtual bool match(const xAOD::Egamma *,const std::string&,const HLT::TriggerElement*&) override;
38  virtual bool match(const xAOD::Egamma *,const std::string&) override;
40  virtual bool matchHLT(const xAOD::Egamma *,const std::string&) override;
42  virtual const xAOD::Egamma* closestHLTObject(const xAOD::Egamma *,const std::string&) override;
43  double dR(const double, const double, const double, const double);
44  double m_dR;
45  double m_dRL1;
46  protected:
47  private:
48  ToolHandle<Trig::TrigDecisionTool> m_trigDecTool;
49 
50  template<class T> const T* getFeature(const HLT::TriggerElement* te);
51  template<class T> bool ancestorPassed(const HLT::TriggerElement* te);
52  bool matchHLTElectron(const xAOD::Electron *,const std::string&,const HLT::TriggerElement*&);
53  bool matchHLTPhoton(const xAOD::Photon *,const std::string&,const HLT::TriggerElement*&);
54  bool matchHLTCalo(const xAOD::Egamma *,const std::string&,const HLT::TriggerElement*&);
55  bool matchL2Electron(const xAOD::Electron *,const std::string&,const HLT::TriggerElement*&);
56  bool matchL2Photon(const xAOD::Photon *,const std::string&,const HLT::TriggerElement*&);
57  bool matchL2Calo(const xAOD::Egamma *,const std::string&,const HLT::TriggerElement*&);
58  bool matchL1(const xAOD::Egamma *,const std::string&,const HLT::TriggerElement*&);
59 
60 };
61 }
62 #endif
Trig::TrigEgammaMatchingTool::matchL2Calo
bool matchL2Calo(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:359
Trig::TrigEgammaMatchingTool::getFeature
const T * getFeature(const HLT::TriggerElement *te)
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
Trig::TrigEgammaMatchingTool::ancestorPassed
bool ancestorPassed(const HLT::TriggerElement *te)
ASG_TOOL_CLASS2
#define ASG_TOOL_CLASS2(CLASSNAME, INT1, INT2)
Definition: AsgToolMacros.h:77
Trig::TrigEgammaMatchingTool::matchL1
bool matchL1(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:388
Trig::TrigEgammaMatchingTool::matchHLTCalo
bool matchHLTCalo(const xAOD::Egamma *, const std::string &, const HLT::TriggerElement *&)
Definition: TrigEgammaMatchingTool.cxx:256
Trig::TrigEgammaMatchingTool::initialize
virtual StatusCode initialize() override
Definition: TrigEgammaMatchingTool.cxx:33
TrigDecisionTool.h
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
EgammaxAODHelpers.h
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
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
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
ITrigEgammaMatchingTool.h
ASG_TOOL_INTERFACE
#define ASG_TOOL_INTERFACE(CLASSNAME)
Definition: AsgToolMacros.h:40
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:228
xAOD::Electron_v1
Definition: Electron_v1.h:34
Trig::TrigEgammaMatchingTool::m_dR
double m_dR
Definition: TrigEgammaMatchingTool.h:44
Trig::TrigEgammaMatchingTool
Definition: TrigEgammaMatchingTool.h:22
xAOD::Photon_v1
Definition: Photon_v1.h:37
asg::AsgMetadataTool
Base class for dual-use tools that provide file metadata access.
Definition: AsgMetadataTool.h:48
Trig::ITrigEgammaMatchingTool
Definition: ITrigEgammaMatchingTool.h:15
AsgMetadataTool.h
Trig::TrigEgammaMatchingTool::TrigEgammaMatchingTool
TrigEgammaMatchingTool(const std::string &name)
Definition: TrigEgammaMatchingTool.cxx:20
ToolHandle.h
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
AsgTool.h
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