ATLAS Offline Software
Loading...
Searching...
No Matches
EGElectronAmbiguityTool.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef DERIVATIONFRAMEWORK_EGELECTRONAMBIGUITYTOOL_H
6#define DERIVATIONFRAMEWORK_EGELECTRONAMBIGUITYTOOL_H
7
8#include "GaudiKernel/ToolHandle.h"
9
12
13#include "GaudiKernel/EventContext.h"
16
18#include "xAODEgamma/Electron.h"
22#include "xAODTracking/Vertex.h"
24
25#include <string>
26
27namespace DerivationFramework {
28
29 class EGElectronAmbiguityTool : public extends<AthAlgTool, IAugmentationTool>
30 {
31
32 public:
33
34 using base_class::base_class;
35
36 virtual StatusCode initialize() override final;
37 virtual StatusCode addBranches(const EventContext& ctx) const override final;
38
39 private:
41 this,
42 "ContainerName",
43 "Electrons",
44 "SG key of electron container"
45 };
47 this,
48 "VtxContainerName",
49 "PrimaryVertices",
50 "SG key of vertex container"
51 };
53 this,
54 "tpContainerName",
55 "InDetTrackParticles",
56 "SG key of track particles container"
57 };
58
60 this,
61 "tpCName",
62 "GSFTrackParticles",
63 "SG key of TrackParticleInputContainer"
64 };
65
66 // Write decoration handle keys
68 m_drv{ this, "DFCommonSimpleConvRadius", m_containerName, "DFCommonSimpleConvRadius", "" };
69
71 m_dphiv{ this, "DFCommonSimpleConvPhi", m_containerName, "DFCommonSimpleConvPhi", "" };
72
74 m_dmee{ this, "DFCommonSimpleMee", m_containerName, "DFCommonSimpleMee", "" };
75
77 m_dmeeVtx{ this, "DFCommonSimpleMeeAtVtx", m_containerName, "DFCommonSimpleMeeAtVtx", "" };
78
80 m_dsep{ this, "DFCommonSimpleSeparation", m_containerName, "DFCommonSimpleSeparation", "" };
81
83 m_dambi{ this, "DFCommonAddAmbiguity", m_containerName, "DFCommonAddAmbiguity", "" };
84
86 m_dtrv{ this, "DFCommonProdTrueRadius", m_containerName, "DFCommonProdTrueRadius", "" };
87
89 m_dtpv{ this, "DFCommonProdTruePhi", m_containerName, "DFCommonProdTruePhi", "" };
90
92 m_dtzv{ this, "DFCommonProdTrueZ", m_containerName, "DFCommonProdTrueZ", "" };
93
106 friend struct DecorHandles;
107
108 StatusCode decorateSimple(
109 DecorHandles& dh,
111 const xAOD::Electron* ele,
112 const xAOD::Vertex* pvtx) const;
113
114 Gaudi::Property<bool> m_isMC{this, "isMC", false};
115
116 // cuts to select the electron to run on
117 Gaudi::Property<double> m_elepTCut{
118 this, "pTCut", 9000., "minimum pT for an electron to be studied"};
119 Gaudi::Property<std::string> m_idCut{
120 this, "idCut", "DFCommonElectronsLHLoose", "minimal quality for an electron to be studied"};
121
122 // cuts to select the other track
123 Gaudi::Property<unsigned int> m_nSiCut{
124 this, "nSiCut", 7, "minimum number of Si hits in the other track"};
125 Gaudi::Property<double> m_dctCut{
126 this, "DCTCut", 0.02, "second separation cut"};
127 Gaudi::Property<double> m_sepCut{
128 this, "SeparationCut", 1., "first separation cut"};
129 Gaudi::Property<double> m_dzCut{
130 this, "dzsinTCut", 0.5, "max dz sinTheta between ele and other tracks"};
131
132 // cuts to define the various types :
133 // ambi = -1 : no other track, 0 : other track exists but no good gamma reco,
134 // 1 : gamma*, 2 : material conversion
135 Gaudi::Property<double> m_rvECCut{
136 this, "radiusCut", 20, "minimum radius to be classified as external conversion"};
137 Gaudi::Property<double> m_meeAtVtxECCut{
138 this, "meeAtVtxCut", 100, "maximal mass at vertex to be classified as external conversion"};
139 Gaudi::Property<double> m_meeICCut{
140 this, "meeCut", 100, "maximal mass at primary vertex to be classified as gamma*"};
141 };
142}
143
144#endif // DERIVATIONFRAMEWORK_EGCONVERSIONINFOTOOL_H
DataVector adapter that acts like it holds const pointers.
Property holding a SG store/key/clid from which a ReadHandle is made.
Handle class for adding a decoration to an object.
DataVector adapter that acts like it holds const pointers.
virtual StatusCode addBranches(const EventContext &ctx) const override final
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dsep
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tpContainerName
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dtzv
StatusCode decorateSimple(DecorHandles &dh, std::unique_ptr< ConstDataVector< xAOD::TrackParticleContainer > > &tpC, const xAOD::Electron *ele, const xAOD::Vertex *pvtx) const
SG::ReadHandleKey< xAOD::ElectronContainer > m_containerName
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dambi
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dmee
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dtrv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dphiv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dtpv
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_dmeeVtx
SG::ReadHandleKey< xAOD::TrackParticleContainer > m_tpCName
SG::WriteDecorHandleKey< xAOD::ElectronContainer > m_drv
SG::ReadHandleKey< xAOD::VertexContainer > m_VtxContainerName
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Handle class for adding a decoration to an object.
THE reconstruction tool.
Vertex_v1 Vertex
Define the latest version of the vertex class.
Electron_v1 Electron
Definition of the current "egamma version".
SG::WriteDecorHandle< xAOD::ElectronContainer, float > dtrv
SG::WriteDecorHandle< xAOD::ElectronContainer, int > dambi
SG::WriteDecorHandle< xAOD::ElectronContainer, float > dtpv
SG::WriteDecorHandle< xAOD::ElectronContainer, float > dsep
SG::WriteDecorHandle< xAOD::ElectronContainer, float > dmee
DecorHandles(const EGElectronAmbiguityTool &tool, const EventContext &ctx)
SG::WriteDecorHandle< xAOD::ElectronContainer, float > dphiv
SG::WriteDecorHandle< xAOD::ElectronContainer, float > drv
SG::WriteDecorHandle< xAOD::ElectronContainer, float > dtzv
SG::WriteDecorHandle< xAOD::ElectronContainer, float > dmeeVtx