ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
PhysicsAnalysis
ElectronPhotonID
PhotonVertexSelection
PhotonVertexSelection
BuildVertexPointingAlg.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_BUILDVERTEXPOINTINGALG_H
6
#define PHOTONVERTEXSELECTION_BUILDVERTEXPOINTINGALG_H
7
8
#include <
AnaAlgorithm/AnaAlgorithm.h
>
9
#include <
PATCore/IAsgSelectionTool.h
>
10
11
#include <
xAODTracking/VertexContainerFwd.h
>
12
#include <
xAODEgamma/EgammaContainerFwd.h
>
13
#include <
xAODEventInfo/EventInfo.h
>
14
15
#include "
AsgDataHandles/ReadHandleKey.h
"
16
#include <
AsgDataHandles/WriteHandleKey.h
>
17
#include <
AsgDataHandles/WriteDecorHandleKey.h
>
18
#include <
AsgDataHandles/ReadDecorHandleKey.h
>
19
#include <
AsgTools/AsgTool.h
>
20
#include <
AsgTools/PropertyWrapper.h
>
21
22
#include <string>
23
24
31
class
BuildVertexPointingAlg
:
public
EL::AnaAlgorithm
{
32
public
:
33
BuildVertexPointingAlg
(
const
std::string& name,
34
ISvcLocator* svcLoc =
nullptr
);
35
virtual
StatusCode
initialize
();
36
virtual
StatusCode
execute
();
37
38
private
:
39
SG::ReadHandleKey<xAOD::EgammaContainer>
m_photonContainerKey
{
40
this
,
"PhotonContainerKey"
,
"Photons"
,
41
"The input photons (or electrons) container"
};
42
SG::ReadHandleKey<xAOD::EventInfo>
m_eventInfoKey
{
this
,
"EventInfoKey"
,
43
"EventInfo"
,
""
};
44
SG::WriteHandleKey<xAOD::VertexContainer>
m_pointingVertexContainerKey
{
45
this
,
"PointingVertexContainerKey"
,
"PhotonPointingVertices"
,
""
};
46
47
// additional information written to the vertex as decorations
48
SG::WriteDecorHandleKey<xAOD::VertexContainer>
m_nphotons_good_key
{
49
this
,
"NGoodPhotonsKey"
,
m_pointingVertexContainerKey
,
"nphotons_good"
,
""
};
50
SG::WriteDecorHandleKey<xAOD::VertexContainer>
m_z_common_nphotons_key
{
51
this
,
"ZCommonPhotonsKey"
,
m_pointingVertexContainerKey
,
"z_common_nphotons"
,
""
};
52
SG::WriteDecorHandleKey<xAOD::VertexContainer>
m_photons_px_key
{
53
this
,
"PhotonsPxKey"
,
m_pointingVertexContainerKey
,
"photons_px"
,
""
};
54
SG::WriteDecorHandleKey<xAOD::VertexContainer>
m_photons_py_key
{
55
this
,
"PhotonsPyKey"
,
m_pointingVertexContainerKey
,
"photons_py"
,
""
};
56
SG::WriteDecorHandleKey<xAOD::VertexContainer>
m_photons_pz_key
{
57
this
,
"PhotonsPzKey"
,
m_pointingVertexContainerKey
,
"photons_pz"
,
""
};
58
SG::WriteDecorHandleKey<xAOD::VertexContainer>
m_photon_links_key
{
59
this
,
"PhotonLinksKey"
,
m_pointingVertexContainerKey
,
"PhotonLinks"
,
""
};
60
61
// decoration read from Photon by xAOD::PVHelpers::getZCommonAndError function
62
// the user should not change them
63
SG::ReadDecorHandleKey<xAOD::EgammaContainer>
m_photon_zvertex_key
{
64
this
,
"PhotonZVertexKey"
,
m_photonContainerKey
,
"zvertex"
};
65
SG::ReadDecorHandleKey<xAOD::EgammaContainer>
m_photon_errz_key
{
66
this
,
"PhotonErrZKey"
,
m_photonContainerKey
,
"errz"
};
67
SG::ReadDecorHandleKey<xAOD::EgammaContainer>
m_photon_HPV_zvertex_key
{
68
this
,
"PhotonHPVZVertexKey"
,
m_photonContainerKey
,
"HPV_zvertex"
};
69
SG::ReadDecorHandleKey<xAOD::EgammaContainer>
m_photon_HPV_errz_key
{
70
this
,
"PhotonHPVErrZKey"
,
m_photonContainerKey
,
"HPV_errz"
};
71
72
ToolHandle<IAsgSelectionTool>
m_selectionTool
{
73
this
,
"selectionTool"
,
"CP::AsgPtEtaSelectionTool/PhotonSelectionTool"
,
74
"the selection tool we apply to photons to compute pointing variables"
};
75
76
ToolHandle<IAsgSelectionTool>
m_goodPhotonSelectionTool
{
77
this
,
"goodPhotonSelectionTool"
,
""
,
78
"the selection tool to count good photons"
};
79
80
Gaudi::Property<float>
m_convPtCut
{
this
,
"convPtCut"
, 2E3,
"the conversion pt cut"
};
81
Gaudi::Property<int>
m_nphotons_to_use
{
this
,
"nphotonsToUse"
, -1,
"the number of photons to use for the pointing computation"
};
82
83
void
selectPhotons
(
const
xAOD::EgammaContainer
& original_photons,
84
ConstDataVector
<
DataVector<xAOD::Egamma>
>& photons_selected)
const
;
85
86
87
};
88
89
#endif
// PHOTONVERTEXSELECTION_BUILDVERTEXPOINTINGALG_H
AnaAlgorithm.h
AsgTool.h
ReadDecorHandleKey.h
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
WriteDecorHandleKey.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
EgammaContainerFwd.h
IAsgSelectionTool.h
PropertyWrapper.h
VertexContainerFwd.h
BuildVertexPointingAlg::m_photon_errz_key
SG::ReadDecorHandleKey< xAOD::EgammaContainer > m_photon_errz_key
Definition
BuildVertexPointingAlg.h:65
BuildVertexPointingAlg::initialize
virtual StatusCode initialize()
Definition
BuildVertexPointingAlg.cxx:26
BuildVertexPointingAlg::selectPhotons
void selectPhotons(const xAOD::EgammaContainer &original_photons, ConstDataVector< DataVector< xAOD::Egamma > > &photons_selected) const
Definition
BuildVertexPointingAlg.cxx:151
BuildVertexPointingAlg::m_photon_zvertex_key
SG::ReadDecorHandleKey< xAOD::EgammaContainer > m_photon_zvertex_key
Definition
BuildVertexPointingAlg.h:63
BuildVertexPointingAlg::m_goodPhotonSelectionTool
ToolHandle< IAsgSelectionTool > m_goodPhotonSelectionTool
Definition
BuildVertexPointingAlg.h:76
BuildVertexPointingAlg::m_photons_px_key
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_photons_px_key
Definition
BuildVertexPointingAlg.h:52
BuildVertexPointingAlg::m_photon_links_key
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_photon_links_key
Definition
BuildVertexPointingAlg.h:58
BuildVertexPointingAlg::m_nphotons_to_use
Gaudi::Property< int > m_nphotons_to_use
Definition
BuildVertexPointingAlg.h:81
BuildVertexPointingAlg::m_convPtCut
Gaudi::Property< float > m_convPtCut
Definition
BuildVertexPointingAlg.h:80
BuildVertexPointingAlg::m_z_common_nphotons_key
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_z_common_nphotons_key
Definition
BuildVertexPointingAlg.h:50
BuildVertexPointingAlg::m_nphotons_good_key
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_nphotons_good_key
Definition
BuildVertexPointingAlg.h:48
BuildVertexPointingAlg::execute
virtual StatusCode execute()
Definition
BuildVertexPointingAlg.cxx:63
BuildVertexPointingAlg::m_pointingVertexContainerKey
SG::WriteHandleKey< xAOD::VertexContainer > m_pointingVertexContainerKey
Definition
BuildVertexPointingAlg.h:44
BuildVertexPointingAlg::m_photonContainerKey
SG::ReadHandleKey< xAOD::EgammaContainer > m_photonContainerKey
Definition
BuildVertexPointingAlg.h:39
BuildVertexPointingAlg::BuildVertexPointingAlg
BuildVertexPointingAlg(const std::string &name, ISvcLocator *svcLoc=nullptr)
Definition
BuildVertexPointingAlg.cxx:22
BuildVertexPointingAlg::m_photons_py_key
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_photons_py_key
Definition
BuildVertexPointingAlg.h:54
BuildVertexPointingAlg::m_selectionTool
ToolHandle< IAsgSelectionTool > m_selectionTool
Definition
BuildVertexPointingAlg.h:72
BuildVertexPointingAlg::m_photon_HPV_zvertex_key
SG::ReadDecorHandleKey< xAOD::EgammaContainer > m_photon_HPV_zvertex_key
Definition
BuildVertexPointingAlg.h:67
BuildVertexPointingAlg::m_photon_HPV_errz_key
SG::ReadDecorHandleKey< xAOD::EgammaContainer > m_photon_HPV_errz_key
Definition
BuildVertexPointingAlg.h:69
BuildVertexPointingAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition
BuildVertexPointingAlg.h:42
BuildVertexPointingAlg::m_photons_pz_key
SG::WriteDecorHandleKey< xAOD::VertexContainer > m_photons_pz_key
Definition
BuildVertexPointingAlg.h:56
ConstDataVector
DataVector adapter that acts like it holds const pointers.
Definition
ConstDataVector.h:76
DataVector
Derived DataVector<T>.
Definition
DataVector.h:795
EL::AnaAlgorithm
the (new) base class for EventLoop algorithms
Definition
AnaAlgorithm.h:74
SG::ReadDecorHandleKey
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Definition
StoreGate/StoreGate/ReadDecorHandleKey.h:86
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::WriteDecorHandleKey
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Definition
StoreGate/StoreGate/WriteDecorHandleKey.h:90
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition
StoreGate/StoreGate/WriteHandleKey.h:40
xAOD::EgammaContainer
EgammaContainer_v1 EgammaContainer
Definition of the current "egamma container version".
Definition
EgammaContainer.h:17
EventInfo.h
Generated on
for ATLAS Offline Software by
1.17.0