ATLAS Offline Software
AsgForwardElectronIsEMSelector.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // Dear emacs, this is -*-c++-*-
6 
7 #ifndef __ASGFORWARDELECTRONISEMSELECTOR__
8 #define __ASGFORWARDELECTRONISEMSELECTOR__
9 
23 // Atlas includes
24 #include "AsgTools/AsgTool.h"
25 
26 // Include the interfaces
28 
31 
32 #include <string>
33 
34 class EventContext;
35 
36 namespace Root {
38 }
39 
41  : public asg::AsgTool
42  , virtual public IAsgForwardElectronIsEMSelector
43 {
44 
49 
50 public:
52  AsgForwardElectronIsEMSelector(const std::string& myname);
53 
56 
58  virtual StatusCode initialize() override final;
59 
60  // Main methods for IAsgSelectionTool interface
61 
66  virtual const asg::AcceptInfo& getAcceptInfo() const override final;
67 
69  virtual asg::AcceptData accept(
70  const xAOD::IParticle* part) const override final;
71  virtual asg::AcceptData accept(
72  const EventContext& ctx,
73  const xAOD::IParticle* part) const override final;
74 
76  virtual asg::AcceptData accept(const EventContext& ctx,
77  const xAOD::Egamma* part) const override final;
78 
80  virtual asg::AcceptData accept(const EventContext& ctx,
81  const xAOD::Photon* part) const override final;
82 
84  virtual asg::AcceptData accept(
85  const EventContext& ctx,
86  const xAOD::Electron* part) const override final;
88  virtual std::string getOperatingPointName() const override final;
89 
90  // The main execute method
91  virtual StatusCode execute(const EventContext& ctx,
92  const xAOD::Egamma* eg,
93  unsigned int& isEM) const override final;
94  // Private member variables
95 private:
96  unsigned int getNPrimVertices(const EventContext& ctx) const;
97 
98  unsigned int calocuts_electrons(const xAOD::Egamma* eg,
99  float eta2,
100  float nvtx,
101  unsigned int iflag) const;
102 
104  std::string m_WorkingPoint;
105 
107  std::string m_configFile;
108 
111 
114 
115  // defualt nPV (when not using PVCont)
116  unsigned int m_nPVdefault;
117 
120  this,
121  "primaryVertexContainer",
122  "PrimaryVertices",
123  "The primary vertex container name"
124  };
125 
126 }; // End: class definition
127 
128 #endif
129 
LArG4FSStartPointFilter.part
part
Definition: LArG4FSStartPointFilter.py:21
AsgForwardElectronIsEMSelector::~AsgForwardElectronIsEMSelector
virtual ASG_TOOL_CLASS3(AsgForwardElectronIsEMSelector, IAsgForwardElectronIsEMSelector, IAsgEGammaIsEMSelector, IAsgSelectionTool) public ~AsgForwardElectronIsEMSelector()
Standard constructor.
Definition: AsgForwardElectronIsEMSelector.cxx:93
AsgForwardElectronIsEMSelector::execute
virtual StatusCode execute(const EventContext &ctx, const xAOD::Egamma *eg, unsigned int &isEM) const override final
==========================================================================================//
Definition: AsgForwardElectronIsEMSelector.cxx:263
IAsgEGammaIsEMSelector
Interface to tool to select photons.
Definition: IAsgEGammaIsEMSelector.h:29
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
AsgForwardElectronIsEMSelector::m_rootForwardTool
Root::TForwardElectronIsEMSelector * m_rootForwardTool
Pointer to the underlying ROOT based tool.
Definition: AsgForwardElectronIsEMSelector.h:110
IAsgForwardElectronIsEMSelector.h
ParticleGun_SamplingFraction.eta2
eta2
Definition: ParticleGun_SamplingFraction.py:96
Root
Definition: GoodRunsListSelectorTool.h:30
AsgForwardElectronIsEMSelector::m_primVtxContKey
SG::ReadHandleKey< xAOD::VertexContainer > m_primVtxContKey
read handle key to primary vertex container
Definition: AsgForwardElectronIsEMSelector.h:119
ParticleTest.eg
eg
Definition: ParticleTest.py:29
AsgForwardElectronIsEMSelector
Electron isEM selector.
Definition: AsgForwardElectronIsEMSelector.h:43
IAsgForwardElectronIsEMSelector
Interface to tool to select electrons.
Definition: IAsgForwardElectronIsEMSelector.h:27
AsgForwardElectronIsEMSelector::m_configFile
std::string m_configFile
Config File.
Definition: AsgForwardElectronIsEMSelector.h:107
AsgForwardElectronIsEMSelector::m_WorkingPoint
std::string m_WorkingPoint
Working Point.
Definition: AsgForwardElectronIsEMSelector.h:104
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
AsgForwardElectronIsEMSelector::initialize
virtual StatusCode initialize() override final
Gaudi Service Interface method implementations.
Definition: AsgForwardElectronIsEMSelector.cxx:99
IAsgSelectionTool
Definition: IAsgSelectionTool.h:28
xAOD::IParticle
Class providing the definition of the 4-vector interface.
Definition: Event/xAOD/xAODBase/xAODBase/IParticle.h:40
TForwardElectronIsEMSelector
Example tool to select objects in pure ROOT.
asg::AcceptInfo
Definition: AcceptInfo.h:28
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
Root::TForwardElectronIsEMSelector
Definition: TForwardElectronIsEMSelector.h:34
AsgForwardElectronIsEMSelector::getNPrimVertices
unsigned int getNPrimVertices(const EventContext &ctx) const
( This is horrible! We don't want to iterate over all vertices in the event for each electron!...
Definition: AsgForwardElectronIsEMSelector.cxx:382
AsgForwardElectronIsEMSelector::getOperatingPointName
virtual std::string getOperatingPointName() const override final
Method to get the operating point.
Definition: AsgForwardElectronIsEMSelector.cxx:249
AsgForwardElectronIsEMSelector::m_usePVCont
bool m_usePVCont
Whether to use the PV (not available for trigger)
Definition: AsgForwardElectronIsEMSelector.h:113
xAOD::Electron_v1
Definition: Electron_v1.h:34
AsgForwardElectronIsEMSelector::m_nPVdefault
unsigned int m_nPVdefault
Definition: AsgForwardElectronIsEMSelector.h:116
AsgForwardElectronIsEMSelector::getAcceptInfo
virtual const asg::AcceptInfo & getAcceptInfo() const override final
Method to get the plain AcceptInfo.
Definition: AsgForwardElectronIsEMSelector.cxx:176
VertexContainer.h
xAOD::Photon_v1
Definition: Photon_v1.h:37
ASG_TOOL_CLASS3
#define ASG_TOOL_CLASS3(CLASSNAME, INT1, INT2, INT3)
Definition: AsgToolMacros.h:85
AsgTool.h
asg::AcceptData
Definition: AcceptData.h:30
AsgForwardElectronIsEMSelector::calocuts_electrons
unsigned int calocuts_electrons(const xAOD::Egamma *eg, float eta2, float nvtx, unsigned int iflag) const
Definition: AsgForwardElectronIsEMSelector.cxx:318
AsgForwardElectronIsEMSelector::accept
virtual asg::AcceptData accept(const xAOD::IParticle *part) const override final
Accept with generic interface.
Definition: AsgForwardElectronIsEMSelector.cxx:185