ATLAS Offline Software
Loading...
Searching...
No Matches
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
32
33namespace xAOD {
34
42 class Vertex_v1 : public SG::AuxElement {
43
44 public:
46 Vertex_v1();
47
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 );
80 void setHasValidTime( uint8_t 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
116 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
Base class for elements of a container that can have aux data.
Cached value with atomic update.
#define SG_BASE(D, B)
Declare that class D derives from class B.
#define AmgSymMatrix(dim)
Cached value with atomic update.
Definition CachedValue.h:55
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
Class describing a Vertex.
Definition Vertex_v1.h:42
void clearNeutrals()
Remove all neutrals from the vertex.
float z() const
Returns the z position.
std::vector< ElementLink< xAOD::NeutralParticleContainer > > NeutralParticleLinks_t
Type for the associated neutral particles.
Definition Vertex_v1.h:141
void setNeutralWeights(const std::vector< float > &weights)
Set all the neutral weights.
size_t nNeutralParticles() const
Get the number of neutrals associated with this vertex.
void setTrackParticleLinks(const TrackParticleLinks_t &trackParticles)
Set all track particle links at once.
size_t nTrackParticles() const
Get the number of tracks associated with this vertex.
void clearTracks()
Remove all tracks from the vertex.
const NeutralParticle * neutralParticle(size_t i) const
Get the pointer to a given neutral that was used in vertex reco.
void setTrackWeights(const std::vector< float > &weights)
Set all the track weights.
CxxUtils::CachedValue< Amg::Vector3D > m_position
Cached position of the vertex.
Definition Vertex_v1.h:191
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
Vertex_v1()
Default constructor.
Definition Vertex_v1.cxx:19
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
float time() const
Returns the time.
void addTrackAtVertex(const ElementLink< TrackParticleContainer > &tr, float weight=1.0)
Add a new track to the vertex.
CxxUtils::CachedValue< AmgSymMatrix(3)> m_covariance
Cached covariance of the vertex.
Definition Vertex_v1.h:193
void setZ(float value)
Sets the z position.
const TrackParticleLinks_t & trackParticleLinks() const
Get all the particles associated with the vertex.
void addNeutralAtVertex(const ElementLink< NeutralParticleContainer > &tr, float weight=1.0)
Add a new neutral to the vertex.
const TrackParticle * trackParticle(size_t i) const
Get the pointer to a given track that was used in vertex reco.
std::vector< ElementLink< xAOD::TrackParticleContainer > > TrackParticleLinks_t
Type for the associated track particles.
Definition Vertex_v1.h:128
void resetCache()
Reset the internal cache of the object.
void setX(float value)
Sets the x position.
float neutralWeight(size_t i) const
Get the weight of a given neutral in the vertex reconstruction.
void setY(float value)
Sets the y position.
Type::ObjectType type() const
A little helper function for identifying the type in template code.
Definition Vertex_v1.cxx:58
void setHasValidTime(uint8_t value)
Sets whether or not the vertex has a valid time.
void setVertexType(VxType::VertexType vType)
Set the type of the vertex.
float y() const
Returns the y position.
void setCovariance(const std::vector< float > &value)
Sets the covariance matrix as a simple vector of values.
float numberDoF() const
Returns the number of degrees of freedom of the vertex fit as float.
void setTimeResolution(float value)
Sets the time resolution.
const NeutralParticleLinks_t & neutralParticleLinks() const
Get all the particles associated with the vertex.
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
bool vxTrackAtVertexAvailable() const
Check if VxTrackAtVertices are attached to the object.
VxType::VertexType vertexType() const
The type of the vertex.
float chiSquared() const
Returns the of the vertex fit as float.
std::vector< Trk::VxTrackAtVertex > & vxTrackAtVertex()
Non-const access to the VxTrackAtVertex vector.
void setTime(float value)
Sets the time.
float timeResolution() const
Returns the time resolution.
const std::vector< float > & neutralWeights() const
Get all the neutral weights.
const std::vector< float > & trackWeights() const
Get all the track weights.
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
const Amg::Vector3D & position() const
Returns the 3-pos.
const AmgSymMatrix(3) &covariancePosition() const
Returns the vertex covariance matrix.
uint8_t hasValidTime() const
Returns whether or not the vertex has a valid time.
float x() const
Returns the x position.
const std::vector< float > & covariance() const
Returns the covariance matrix as a simple vector of values.
void setNeutralParticleLinks(const NeutralParticleLinks_t &neutralParticles)
Set all neutral particle links at once.
float trackWeight(size_t i) const
Get the weight of a given track in the vertex reconstruction.
Eigen::Matrix< double, 3, 1 > Vector3D
VertexType
Vertex types.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setStrategy setMatchFlag ElementLink< TrackParticleContainer >
NeutralParticle_v1 NeutralParticle
Reference the current persistent version:
TrackParticle_v1 TrackParticle
Reference the current persistent version: