31 this->makePrivateStore(
other );
43 if( ( ! hasStore() ) && ( ! container() ) ) {
52 SG::AuxElement::operator=( tp );
73 covariance, setCovariance )
76 static const SG::AuxElement::Accessor< uint8_t >
acc(
"hasValidTime");
77 if( !
acc.isAvailable( *
this) || !
static_cast<bool>(hasValidTime()) )
throw std::runtime_error(
"Unavailable Vertex time requested" );
78 static const SG::AuxElement::Accessor< float > accTime(
"time");
79 return accTime( *
this );
83 static const SG::AuxElement::Accessor< uint8_t >
acc(
"hasValidTime");
84 if( !
acc.isAvailable( *
this) || !
static_cast<bool>(
hasValidTime()) )
throw std::runtime_error(
"Unavailable Vertex timeResolution requested" );
85 static const SG::AuxElement::Accessor< float > accTimeRes(
"timeResolution");
86 return accTimeRes( *
this );
90 static const SG::AuxElement::Accessor< float >
acc(
"time");
95 static const SG::AuxElement::Accessor< float >
acc(
"timeResolution");
96 acc( *
this ) = timeRes;
111 tmpPosition( 0 ) =
x();
112 tmpPosition( 1 ) =
y();
113 tmpPosition( 2 ) =
z();
150 std::vector< float >
vec;
174 static const Accessor< float > acc1(
"chiSquared" );
175 static const Accessor< float > acc2(
"numberDoF" );
192 static const SG::AuxElement::Accessor< std::vector< Trk::VxTrackAtVertex > >
219 const std::vector< Trk::VxTrackAtVertex >&
243 static const SG::AuxElement::Accessor< Vertex_v1::TrackParticleLinks_t >
246 static const SG::AuxElement::Accessor< std::vector< float > >
250 static const SG::AuxElement::Accessor< Vertex_v1::NeutralParticleLinks_t >
253 static const SG::AuxElement::Accessor< std::vector< float > >
259 setTrackParticleLinks )
265 neutralParticleLinks,
266 setNeutralParticleLinks )
273 if( !
trackAcc.isAvailable( *
this ) ) {
276 if( (
trackAcc( *this ).size() <= i ) ||
281 return ( *(
trackAcc( *
this )[ i ] ) );
294 if( !
trackAcc.isAvailable( *
this ) ) {
bool isValid() const
Test to see if the link can be dereferenced.
#define AUXSTORE_PRIMITIVE_GETTER_WITH_CAST(CL, PERSTYPE, TRANSTYPE, NAME)
Macro creating a getter function with a type conversion.
#define AUXSTORE_PRIMITIVE_GETTER(CL, TYPE, NAME)
Macro creating the reader function for a primitive auxiliary property.
#define AUXSTORE_PRIMITIVE_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of primitive auxiliary properties.
#define AUXSTORE_OBJECT_SETTER_AND_GETTER(CL, TYPE, NAME, SETTER)
Macro creating the accessors of complex auxiliary properties.
std::vector< size_t > vec
#define AmgSymMatrix(dim)
void reset()
Reset the value to invalid.
const T * ptr() const
Return a pointer to the cached value.
void set(const T &val) const
Set the value, assuming it is currently invalid.
bool isValid() const
Test to see if the value is valid.
ElementLink implementation for ROOT usage.
Class describing a Vertex.
void clearNeutrals()
Remove all neutrals from the vertex.
float z() const
Returns the z position.
size_t nNeutralParticles() const
Get the number of neutrals associated with this vertex.
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.
CxxUtils::CachedValue< Amg::Vector3D > m_position
Cached position of the vertex.
void setCovariancePosition(const AmgSymMatrix(3)&covariancePosition)
Sets the vertex covariance matrix.
Vertex_v1()
Default constructor.
Vertex_v1 & operator=(const Vertex_v1 &tp)
Assignment operator. This can involve creating and copying an Auxilary store, and so should be used s...
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.
void setZ(float value)
Sets the z position.
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.
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.
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.
void setPosition(const Amg::Vector3D &position)
Sets the 3-position.
bool vxTrackAtVertexAvailable() const
Check if VxTrackAtVertices are attached to the object.
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.
void setFitQuality(float chiSquared, float numberDoF)
Set the 'Fit Quality' information.
const Amg::Vector3D & position() const
Returns the 3-pos.
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.
float trackWeight(size_t i) const
Get the weight of a given track in the vertex reconstruction.
void compress(const AmgSymMatrix(N) &covMatrix, std::vector< float > &vec)
void expand(std::vector< float >::const_iterator it, std::vector< float >::const_iterator, AmgSymMatrix(N) &covMatrix)
Eigen::Matrix< double, 3, 1 > Vector3D
A convenience namespace to make the client code easier to understand.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
setStrategy setMatchFlag ElementLink< TrackParticleContainer >
AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1, float, double, px, setPx) AUXSTORE_PRIMITIVE_SETTER_WITH_CAST(CompositeParticle_v1
setTrackWeights neutralWeights
NeutralParticle_v1 NeutralParticle
Reference the current persistent version:
static const SG::AuxElement::Accessor< std::vector< float > > weightNeutralAcc("neutralWeights")
Accessor for the neutral weights.
TrackParticle_v1 TrackParticle
Reference the current persistent version:
static const SG::AuxElement::Accessor< Vertex_v1::TrackParticleLinks_t > trackAcc("trackParticleLinks")
Accessor for the track links.
static const SG::AuxElement::Accessor< std::vector< float > > weightTrackAcc("trackWeights")
Accessor for the track weights.
static const SG::AuxElement::Accessor< Vertex_v1::NeutralParticleLinks_t > neutralAcc("neutralParticleLinks")
Accessor for the neutral links.
AUXSTORE_OBJECT_SETTER_AND_GETTER(CaloRings_v1, RingSetLinks, ringSetLinks, setRingSetLinks) unsigned CaloRings_v1
static setVertexType const SG::AuxElement::Accessor< std::vector< Trk::VxTrackAtVertex > > vxVertAcc("vxTrackAtVertex")
Helper object for implementing the vxTrackAtVertex functions.
static const SG::AuxElement::Accessor< ElementLink< IParticleContainer > > acc("originalObjectLink")
Object used for setting/getting the dynamic decoration in question.