ATLAS Offline Software
Vertex_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 
3 /*
4  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 #ifndef XAODTRACKING_VERSIONS_VERTEX_V1_H
8 #define XAODTRACKING_VERSIONS_VERTEX_V1_H
9 
10 // System include(s):
11 #include <vector>
12 
13 // Core include(s):
15 #include "AthLinks/ElementLink.h"
16 
17 // EDM include(s):
20 #ifndef XAOD_ANALYSIS
22 #endif // not XAOD_ANALYSIS
23 
24 // xAOD include(s):
28 #include "xAODBase/ObjectType.h"
29 
30 //MT CachedValue
31 #include "CxxUtils/CachedValue.h"
32 
33 namespace xAOD {
34 
42  class Vertex_v1 : public SG::AuxElement {
43 
44  public:
46  Vertex_v1();
47 
49  Vertex_v1(const Vertex_v1& other);
50 
52  Vertex_v1& operator=(const Vertex_v1& tp );
53 
55  Type::ObjectType type() const;
56 
58  float x() const;
60  void setX( float value );
62  float y() const;
64  void setY( float value );
66  float z() const;
68  void setZ( float value );
70  float time() const;
72  void setTime( float value );
74  float timeResolution() const;
76  void setTimeResolution( float value );
81 
83  const std::vector< float >& covariance() const;
85  void setCovariance( const std::vector< float >& value );
86 
88  const Amg::Vector3D& position() const;
91 
93  const AmgSymMatrix(3)& covariancePosition() const;
95  void setCovariancePosition( const AmgSymMatrix(3)& covariancePosition );
96 
99 
101  float chiSquared() const;
103  float numberDoF() const;
105  void setFitQuality( float chiSquared, float numberDoF );
106 
108 
113 
114 #ifndef XAOD_ANALYSIS
115  std::vector< Trk::VxTrackAtVertex >& vxTrackAtVertex();
118  const std::vector< Trk::VxTrackAtVertex >& vxTrackAtVertex() const;
120  bool vxTrackAtVertexAvailable() const;
121 #endif // not XAOD_ANALYSIS
122 
125 
127  typedef std::vector< ElementLink< xAOD::TrackParticleContainer > >
132  void setTrackParticleLinks( const TrackParticleLinks_t& trackParticles );
133 
135  const std::vector< float >& trackWeights() const;
137  void setTrackWeights( const std::vector< float >& weights );
138 
139 
141  typedef std::vector< ElementLink< xAOD::NeutralParticleContainer > > NeutralParticleLinks_t;
145  void setNeutralParticleLinks( const NeutralParticleLinks_t& neutralParticles );
146 
148  const std::vector< float >& neutralWeights() const;
150  void setNeutralWeights( const std::vector< float >& weights );
151 
152 
154  const TrackParticle* trackParticle( size_t i ) const;
156  float trackWeight( size_t i ) const;
158  size_t nTrackParticles() const;
159 
160 
162  const NeutralParticle* neutralParticle( size_t i ) const;
164  float neutralWeight( size_t i ) const;
166  size_t nNeutralParticles() const;
167 
168 
171  float weight = 1.0 );
172 
175  float weight = 1.0 );
176 
178  void clearTracks();
179 
181  void clearNeutrals();
182 
183 
185 
187  void resetCache();
188 
189  private:
194 
195  }; // end of the Vertex_v1 class definitions
196 
197 } // end of the xAOD namespace
198 
199 #include "xAODCore/BaseInfo.h"
201 
202 #endif // XAODTRACKING_VERSIONS_VERTEX_V1_H
xAOD::Vertex_v1::timeResolution
float timeResolution() const
Returns the time resolution.
xAOD::Vertex_v1::setTimeResolution
void setTimeResolution(float value)
Sets the time resolution.
xAOD::Vertex_v1::NeutralParticleLinks_t
std::vector< ElementLink< xAOD::NeutralParticleContainer > > NeutralParticleLinks_t
Type for the associated neutral particles.
Definition: Vertex_v1.h:141
xAOD::Vertex_v1::x
float x() const
Returns the x position.
xAOD::Vertex_v1::time
float time() const
Returns the time.
xAOD::Vertex_v1::hasValidTime
uint8_t hasValidTime() const
Returns whether or not the vertex has a valid time.
xAOD::Vertex_v1::setPosition
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
xAOD::Vertex_v1::setFitQuality
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
Definition: Vertex_v1.cxx:150
xAOD::Vertex_v1::nTrackParticles
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
Definition: Vertex_v1.cxx:270
xAOD::Vertex_v1::AmgSymMatrix
const AmgSymMatrix(3) &covariancePosition() const
Returns the vertex covariance matrix.
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
xAOD::Vertex_v1::Vertex_v1
Vertex_v1()
Default constructor.
Definition: Vertex_v1.cxx:19
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:446
xAOD::Vertex_v1::trackParticleLinks
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
xAOD::Vertex_v1::trackWeights
const std::vector< float > & trackWeights() const
Get all the track weights.
xAOD::Vertex_v1::clearNeutrals
void clearNeutrals()
Remove all neutrals from the vertex.
Definition: Vertex_v1.cxx:338
BaseInfo.h
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::other
@ other
Definition: TrackingPrimitives.h:509
athena.value
value
Definition: athena.py:122
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
xAOD::Vertex_v1::position
const Amg::Vector3D & position() const
Returns the 3-pos.
xAOD::Vertex_v1::m_position
CxxUtils::CachedValue< Amg::Vector3D > m_position
Cached position of the vertex.
Definition: Vertex_v1.h:191
xAOD::Vertex_v1::neutralParticleLinks
const NeutralParticleLinks_t & neutralParticleLinks() const
Get all the particles associated with the vertex.
xAOD::Vertex_v1::setX
void setX(float value)
Sets the x position.
xAOD::Vertex_v1::setCovariance
void setCovariance(const std::vector< float > &value)
Sets the covariance matrix as a simple vector of values.
xAOD::Vertex_v1::vertexType
VxType::VertexType vertexType() const
The type of the vertex.
SG_BASE
SG_BASE(xAOD::Vertex_v1, SG::AuxElement)
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:200
xAOD::VxType::VertexType
VertexType
Vertex types.
Definition: TrackingPrimitives.h:569
xAOD::Vertex_v1::setVertexType
void setVertexType(VxType::VertexType vType)
Set the type of the vertex.
GeoPrimitives.h
xAOD::Vertex_v1::addTrackAtVertex
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
Definition: Vertex_v1.cxx:314
xAOD::Vertex_v1::setZ
void setZ(float value)
Sets the z position.
ObjectType.h
xAOD::Vertex_v1::setY
void setY(float value)
Sets the y position.
lumiFormat.i
int i
Definition: lumiFormat.py:92
xAOD::Vertex_v1::neutralWeights
const std::vector< float > & neutralWeights() const
Get all the neutral weights.
xAOD::Vertex_v1::setTrackParticleLinks
void setTrackParticleLinks(const TrackParticleLinks_t &trackParticles)
Set all track particle links at once.
CxxUtils::CachedValue< Amg::Vector3D >
VxTrackAtVertex.h
xAOD::Vertex_v1::TrackParticleLinks_t
std::vector< ElementLink< xAOD::TrackParticleContainer > > TrackParticleLinks_t
Type for the associated track particles.
Definition: Vertex_v1.h:128
xAOD::Vertex_v1::trackParticle
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
Definition: Vertex_v1.cxx:249
xAOD::Vertex_v1::clearTracks
void clearTracks()
Remove all tracks from the vertex.
Definition: Vertex_v1.cxx:331
xAOD::Vertex_v1::z
float z() const
Returns the z position.
xAOD::Vertex_v1::neutralParticle
const NeutralParticle * neutralParticle(size_t i) const
Get the pointer to a given neutral that was used in vertex reco.
Definition: Vertex_v1.cxx:280
EventPrimitives.h
CachedValue.h
Cached value with atomic update.
xAOD::Vertex_v1::setTime
void setTime(float value)
Sets the time.
xAOD::Vertex_v1::operator=
Vertex_v1 & operator=(const Vertex_v1 &tp)
Assignment operator. This can involve creating and copying an Auxilary store, and so should be used s...
Definition: Vertex_v1.cxx:34
xAOD::Vertex_v1::setTrackWeights
void setTrackWeights(const std::vector< float > &weights)
Set all the track weights.
xAOD::Vertex_v1::trackWeight
float trackWeight(size_t i) const
Get the weight of a given track in the vertex reconstruction.
Definition: Vertex_v1.cxx:262
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
xAOD::Vertex_v1::nNeutralParticles
size_t nNeutralParticles() const
Get the number of neutrals associated with this vertex.
Definition: Vertex_v1.cxx:301
xAOD::Vertex_v1::numberDoF
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
NeutralParticleContainer.h
xAOD::Vertex_v1::covariance
const std::vector< float > & covariance() const
Returns the covariance matrix as a simple vector of values.
xAOD::Vertex_v1::addNeutralAtVertex
void addNeutralAtVertex(const ElementLink< NeutralParticleContainer > &tr, float weight=1.0)
Add a new neutral to the vertex.
Definition: Vertex_v1.cxx:323
xAOD::Vertex_v1::chiSquared
float chiSquared() const
Returns the of the vertex fit as float.
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
xAOD::Vertex_v1::setNeutralParticleLinks
void setNeutralParticleLinks(const NeutralParticleLinks_t &neutralParticles)
Set all neutral particle links at once.
xAOD::Vertex_v1::resetCache
void resetCache()
Reset the internal cache of the object.
Definition: Vertex_v1.cxx:348
xAOD::Vertex_v1::y
float y() const
Returns the y position.
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
xAOD::Vertex_v1::vxTrackAtVertex
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
Definition: Vertex_v1.cxx:181
xAOD::NeutralParticle_v1
Class describing a NeutralParticle.
Definition: NeutralParticle_v1.h:40
xAODType::ObjectType
ObjectType
Type of objects that have a representation in the xAOD EDM.
Definition: ObjectType.h:32
xAOD::Vertex_v1::setNeutralWeights
void setNeutralWeights(const std::vector< float > &weights)
Set all the neutral weights.
xAOD::Vertex_v1::m_covariance
CxxUtils::CachedValue< AmgSymMatrix(3)> m_covariance
Cached covariance of the vertex.
Definition: Vertex_v1.h:193
xAOD::Vertex_v1::vxTrackAtVertexAvailable
bool vxTrackAtVertexAvailable() const
Check if VxTrackAtVertices are attached to the object.
Definition: Vertex_v1.cxx:209
TrackingPrimitives.h
xAOD::Vertex_v1::setCovariancePosition
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
TrackParticleContainerFwd.h
xAOD::Vertex_v1::setHasValidTime
void setHasValidTime(uint8_t value)
Sets whether or not the vertex has a valid time.
AuxElement.h
Base class for elements of a container that can have aux data.
xAOD::Vertex_v1::neutralWeight
float neutralWeight(size_t i) const
Get the weight of a given neutral in the vertex reconstruction.
Definition: Vertex_v1.cxx:293
xAOD::Vertex_v1::type
Type::ObjectType type() const
A little helper function for identifying the type in template code.
Definition: Vertex_v1.cxx:58