00001 // Dear emacs, this is -*-c++-*- 00002 00003 #ifndef __ASGFORWARDELECTRONISEMSELECTOR__ 00004 #define __ASGFORWARDELECTRONISEMSELECTOR__ 00005 00019 // Atlas includes 00020 #include "AsgTools/AsgTool.h" 00021 00022 // Include the interfaces 00023 #include "ElectronPhotonSelectorTools/IAsgForwardElectronIsEMSelector.h" 00024 // Include the return object and the underlying ROOT tool 00025 #include "PATCore/TAccept.h" 00026 #include "ElectronPhotonSelectorTools/TForwardElectronIsEMSelector.h" 00027 #include <string> 00028 00029 class AsgForwardElectronIsEMSelector : public asg::AsgTool, 00030 virtual public IAsgForwardElectronIsEMSelector 00031 { 00032 00033 ASG_TOOL_CLASS3(AsgForwardElectronIsEMSelector, IAsgForwardElectronIsEMSelector, 00034 IAsgEGammaIsEMSelector,IAsgSelectionTool) 00035 00036 public: 00038 AsgForwardElectronIsEMSelector(std::string myname); 00039 00041 virtual ~AsgForwardElectronIsEMSelector(); 00042 00044 virtual StatusCode initialize(); 00045 00047 virtual StatusCode finalize(); 00048 00049 // Main methods for IAsgSelectionTool interface 00050 00051 00053 virtual const Root::TAccept& accept( const xAOD::IParticle* part ) const ; 00054 00056 virtual const Root::TAccept& accept( const xAOD::IParticle& part ) const { 00057 return accept(&part); 00058 } 00059 00061 virtual const Root::TAccept& accept( const xAOD::Egamma* part) const ; 00062 00064 virtual const Root::TAccept& accept( const xAOD::Egamma& part) const { 00065 return accept(&part); 00066 } 00067 00069 virtual const Root::TAccept& accept( const xAOD::Photon* part ) const ; 00070 00072 virtual const Root::TAccept& accept( const xAOD::Photon& part ) const { 00073 return accept(&part); 00074 } 00075 00077 virtual const Root::TAccept& accept( const xAOD::Electron* part ) const ; 00078 00080 virtual const Root::TAccept& accept( const xAOD::Electron& part ) const{ 00081 return accept(&part); 00082 } 00083 00085 unsigned int IsemValue() const {return m_rootForwardTool->isEM(); }; 00086 00088 virtual std::string getOperatingPointName( ) const; 00089 00090 //The main execute method 00091 StatusCode execute(const xAOD::Egamma* eg) const; 00092 00094 virtual const Root::TAccept& getTAccept( ) const{ 00095 return m_rootForwardTool->getTAccept(); 00096 } 00097 00098 00099 // Private member variables 00100 private: 00101 00102 unsigned int getNPrimVertices() const; 00103 00104 unsigned int calocuts_electrons(const xAOD::Egamma* eg, 00105 float eta2, float nvtx, 00106 unsigned int iflag) const; 00107 00109 std::string m_WorkingPoint; 00110 00112 std::string m_configFile; 00113 00115 Root::TForwardElectronIsEMSelector* m_rootForwardTool; 00116 00118 Root::TAccept m_acceptDummy; 00119 00120 bool m_usePVCont; 00121 00122 // defualt nPV (when not using PVCont) 00123 unsigned int m_nPVdefault; 00124 00125 // The primary vertex container name 00126 std::string m_primVtxContName; 00127 00128 }; // End: class definition 00129 00130 00131 #endif 00132