ATLAS Offline Software
egammaRec.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
9 {
10  if (index >= m_caloClusters.size() || !m_caloClusters[index].isValid()){
11  return nullptr;
12  }
13  return (*(m_caloClusters[index]));
14 }
15 
18 {
19  if (index >= m_caloClusters.size() || !m_caloClusters[index].isValid()){
20  return {};
21  }
22  return m_caloClusters[index];
23 }
24 
25 const std::vector<ElementLink<xAOD::CaloClusterContainer>> &
27  return m_caloClusters;
28 }
29 
32 {
33  if (index >= m_trackParticles.size() || !m_trackParticles[index].isValid()){
34  return nullptr;
35  }
36  return (*(m_trackParticles[index]));
37 }
38 
41 {
42  if (index >= m_trackParticles.size() || !m_trackParticles[index].isValid()){
43  return {};
44  }
45  return m_trackParticles[index];
46 }
47 
48 const std::vector<ElementLink<xAOD::TrackParticleContainer>> &
50  return m_trackParticles;
51 }
52 
53 const xAOD::Vertex*
54 egammaRec::vertex(size_t index) const
55 {
56  if (index >= m_vertices.size() || !m_vertices[index].isValid()){
57  return nullptr;
58  }
59  return (*(m_vertices[index]));
60 }
61 
64  if (index >= m_vertices.size() || !m_vertices[index].isValid()){
65  return {};
66  }
67  return m_vertices.at(index);
68 }
69 
70 const std::vector<ElementLink<xAOD::VertexContainer>> &
72  return m_vertices;
73 }
74 
75 void
77 {
78  m_vertices.push_back(vertexElementLink);
79 }
80 
81 void
83 {
84  m_vertices.insert(m_vertices.begin(), vertexElementLink);
85 }
86 
egammaRec::pushFrontVertex
void pushFrontVertex(const ElementLink< xAOD::VertexContainer > &vertexElementLink)
Push front another vertex.
Definition: egammaRec.cxx:82
egammaRec::vertexElementLink
ElementLink< xAOD::VertexContainer > vertexElementLink(size_t index=0) const
ElementLink to the xAOD::vertex/es that match the electron candidate.
Definition: egammaRec.cxx:63
egammaRec::caloClusterElementLink
ElementLink< xAOD::CaloClusterContainer > caloClusterElementLink(size_t index=0) const
ElementLink to the xAOD::CaloCluster/s that match the electron candidate.
Definition: egammaRec.cxx:17
index
Definition: index.py:1
egammaRec::caloCluster
const xAOD::CaloCluster * caloCluster(size_t index=0) const
Pointer to the xAOD::CaloCluster/s that define the electron candidate.
Definition: egammaRec.cxx:8
egammaRec::trackParticleElementLinks
const std::vector< ElementLink< xAOD::TrackParticleContainer > > & trackParticleElementLinks() const
Get a reference to the track particle links.
Definition: egammaRec.cxx:49
egammaRec::m_vertices
std::vector< ElementLink< xAOD::VertexContainer > > m_vertices
Definition: egammaRec.h:148
egammaRec::m_caloClusters
std::vector< ElementLink< xAOD::CaloClusterContainer > > m_caloClusters
Definition: egammaRec.h:146
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
egammaRec::caloClusterElementLinks
const std::vector< ElementLink< xAOD::CaloClusterContainer > > & caloClusterElementLinks() const
Get a reference to the calo cluster links.
Definition: egammaRec.cxx:26
egammaRec::pushBackVertex
void pushBackVertex(const ElementLink< xAOD::VertexContainer > &vertexElementLink)
Push back another vertex.
Definition: egammaRec.cxx:76
egammaRec.h
egammaRec::trackParticleElementLink
ElementLink< xAOD::TrackParticleContainer > trackParticleElementLink(size_t index=0) const
ElementLink to the xAOD::TrackParticle/s that match the electron candidate.
Definition: egammaRec.cxx:40
egammaRec::trackParticle
const xAOD::TrackParticle * trackParticle(size_t index=0) const
Pointer to the xAOD::TrackParticle/s that match the electron candidate.
Definition: egammaRec.cxx:31
egammaRec::m_trackParticles
std::vector< ElementLink< xAOD::TrackParticleContainer > > m_trackParticles
Definition: egammaRec.h:147
egammaRec::vertexElementLinks
const std::vector< ElementLink< xAOD::VertexContainer > > & vertexElementLinks() const
Get a reference to the vertix links.
Definition: egammaRec.cxx:71
DeMoScan.index
string index
Definition: DeMoScan.py:362
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
egammaRec::vertex
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
Definition: egammaRec.cxx:54
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43