ATLAS Offline Software
PhotonPointingTool.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef PhotonVertexSelection_PhotonPointingTool_h
6 #define PhotonVertexSelection_PhotonPointingTool_h
7 
8 // Framework includes
10 
11 // Local includes
13 
14 // EDM includes
16 
17 // Data handles
21 
22 // Forward declarations
23 class TH1F;
24 namespace CP { class ShowerDepthTool; }
25 
26 namespace CP {
27 
35  class PhotonPointingTool : public virtual IPhotonPointingTool,
36  public asg::AsgMetadataTool {
37 
40 
41  private:
44 
46  this,
47  "EventInfo",
48  "EventInfo",
49  "SG key of xAOD::EventInfo"
50  };
51 
52  //Write decoration handle keys
57 
58 
59  private:
61  float getCorrectedZ(float zPointing, float etas2) const;
62  bool m_isMC{};
64  std::string m_zvertexDecorName;
65  std::string m_errzDecorName;
67  std::string m_HPV_errzDecorName;
68  std::string m_ContainerName;
69 
70  public:
71  PhotonPointingTool(const std::string &name);
72  virtual ~PhotonPointingTool();
73 
76 
78  virtual StatusCode initialize();
79 
81 
84 
87 
89  std::pair<float, float> getCaloPointing(const xAOD::Egamma *egamma) const ;
90 
92  std::pair<float, float> getConvPointing(const xAOD::Photon *photon) const ;
94 
95  }; // class PhotonPointingTool
96 
97 } // namespace CP
98 
99 
100 #endif // PhotonVertexSelection_PhotonPointingTool_H
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition: StoreGate/StoreGate/WriteDecorHandleKey.h:89
CP::PhotonPointingTool::m_isMC
bool m_isMC
Definition: PhotonPointingTool.h:62
CurrentContext.h
CP::PhotonPointingTool
Implementation for the photon pointing tool.
Definition: PhotonPointingTool.h:36
CP::PhotonPointingTool::PhotonPointingTool
PhotonPointingTool(const std::string &name)
Definition: PhotonPointingTool.cxx:30
CP::PhotonPointingTool::getCaloPointing
std::pair< float, float > getCaloPointing(const xAOD::Egamma *egamma) const
Return calo pointing variables.
Definition: PhotonPointingTool.cxx:174
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
CP::PhotonPointingTool::m_zOscFileData
std::string m_zOscFileData
Definition: PhotonPointingTool.h:63
CP::PhotonPointingTool::m_zOscFileMC
std::string m_zOscFileMC
Definition: PhotonPointingTool.h:63
SG::ReadHandleKey< xAOD::EventInfo >
CP::PhotonPointingTool::m_zvertexDecorName
std::string m_zvertexDecorName
Definition: PhotonPointingTool.h:64
CP::IPhotonPointingTool
Definition: IPhotonPointingTool.h:18
CP
Select isolated Photons, Electrons and Muons.
Definition: Control/xAODRootAccess/xAODRootAccess/TEvent.h:48
egamma
Definition: egamma.h:58
CP::PhotonPointingTool::m_HPV_errz
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_HPV_errz
Definition: PhotonPointingTool.h:56
EgammaContainer.h
CP::PhotonPointingTool::m_HPV_zvertexDecorName
std::string m_HPV_zvertexDecorName
Definition: PhotonPointingTool.h:66
CP::PhotonPointingTool::initialize
virtual StatusCode initialize()
Function initialising the tool.
Definition: PhotonPointingTool.cxx:51
CP::PhotonPointingTool::m_errzDecorName
std::string m_errzDecorName
Definition: PhotonPointingTool.h:65
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.
CP::PhotonPointingTool::m_HPV_errzDecorName
std::string m_HPV_errzDecorName
Definition: PhotonPointingTool.h:67
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
WriteDecorHandle.h
Handle class for adding a decoration to an object.
CP::PhotonPointingTool::m_errz
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_errz
Definition: PhotonPointingTool.h:54
CP::PhotonPointingTool::m_zCorrection
TH1F * m_zCorrection
Create a proper constructor for Athena.
Definition: PhotonPointingTool.h:43
CP::PhotonPointingTool::getCorrectedZ
float getCorrectedZ(float zPointing, float etas2) const
Definition: PhotonPointingTool.cxx:167
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
CP::PhotonPointingTool::m_evtInfo
SG::ReadHandleKey< xAOD::EventInfo > m_evtInfo
Definition: PhotonPointingTool.h:45
CP::PhotonPointingTool::~PhotonPointingTool
virtual ~PhotonPointingTool()
Definition: PhotonPointingTool.cxx:45
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
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
CP::PhotonPointingTool::updatePointingAuxdata
StatusCode updatePointingAuxdata(const xAOD::EgammaContainer &egammas) const
Add calo and conversion (HPV) pointing variables.
Definition: PhotonPointingTool.cxx:115
ASG_TOOL_CLASS
#define ASG_TOOL_CLASS(CLASSNAME, INT1)
Definition: AsgToolMacros.h:68
CP::PhotonPointingTool::m_HPV_zvertex
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_HPV_zvertex
Definition: PhotonPointingTool.h:55
AsgMetadataTool.h
CP::PhotonPointingTool::getConvPointing
std::pair< float, float > getConvPointing(const xAOD::Photon *photon) const
Return conversion (HPV) pointing variables.
Definition: PhotonPointingTool.cxx:225
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
IPhotonPointingTool.h
CP::PhotonPointingTool::m_ContainerName
std::string m_ContainerName
Definition: PhotonPointingTool.h:68
CP::PhotonPointingTool::m_zvertex
SG::WriteDecorHandleKey< xAOD::EgammaContainer > m_zvertex
Definition: PhotonPointingTool.h:53