3#ifndef EDM4EIC_MutableVertex_H
4#define EDM4EIC_MutableVertex_H
12#include "edm4hep/Vector4f.h"
13#include "podio/RelationRange.h"
17#include "podio/utilities/MaybeSharedPtr.h"
21#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
22#include "nlohmann/json_fwd.hpp"
84 void setType(std::int32_t value);
88 [[deprecated(
"use getType instead")]]
96 [[deprecated(
"use getChi2 instead")]]
104 [[deprecated(
"use getNdf instead")]]
112 [[deprecated(
"use getPosition instead")]]
120 [[deprecated(
"use getPositionError instead")]]
137 void unlink() { m_obj = podio::utils::MaybeSharedPtr<VertexObj>{
nullptr}; }
154 swap(a.m_obj, b.m_obj);
159 explicit MutableVertex(podio::utils::MaybeSharedPtr<VertexObj> obj);
161 podio::utils::MaybeSharedPtr<VertexObj> m_obj{
nullptr};
164#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
165void to_json(nlohmann::json& j,
const MutableVertex& value);
Definition MutableVertex.h:34
friend class Vertex
Definition MutableVertex.h:38
int & ndf()
Get reference to NDF of the vertex fit.
Definition MutableVertex.cc:63
void unlink()
disconnect from VertexObj instance
Definition MutableVertex.h:137
float & chi2()
Get reference to Chi-squared of the vertex fit.
Definition MutableVertex.cc:60
void setPosition(edm4hep::Vector4f value)
Set the position [mm] + time t0 [ns] of the vertex. Time is 4th component in vector.
Definition MutableVertex.cc:64
MutableVertex & operator=(MutableVertex other)
copy-assignment operator
Definition MutableVertex.cc:30
void addToAssociatedParticles(const edm4eic::ReconstructedParticle &)
Definition MutableVertex.cc:72
bool operator!=(const MutableVertex &other) const
Definition MutableVertex.h:142
const podio::ObjectID getObjectID() const
Definition MutableVertex.cc:117
const edm4eic::Cov4f & getPositionError() const
Access the Covariance matrix of the position+time. Time is 4th component, similarly to 4vector.
Definition MutableVertex.cc:52
bool operator<(const MutableVertex &other) const
Definition MutableVertex.h:146
edm4eic::Cov4f & positionError()
Get reference to Covariance matrix of the position+time. Time is 4th component, similarly to 4vector.
Definition MutableVertex.cc:69
friend class VertexCollection
Definition MutableVertex.h:36
std::vector< edm4eic::ReconstructedParticle >::const_iterator associatedParticles_end() const
Definition MutableVertex.cc:83
edm4hep::Vector4f & position()
Get reference to position [mm] + time t0 [ns] of the vertex. Time is 4th component in vector.
Definition MutableVertex.cc:66
podio::ObjectID id() const
Definition MutableVertex.h:148
float getChi2() const
Access the Chi-squared of the vertex fit.
Definition MutableVertex.cc:49
int getNdf() const
Access the NDF of the vertex fit.
Definition MutableVertex.cc:50
~MutableVertex()=default
destructor
MutableVertex(const MutableVertex &other)=default
copy constructor
bool operator!=(const Vertex &other) const
Definition MutableVertex.h:143
friend void swap(MutableVertex &a, MutableVertex &b)
Definition MutableVertex.h:152
const edm4hep::Vector4f & getPosition() const
Access the position [mm] + time t0 [ns] of the vertex. Time is 4th component in vector.
Definition MutableVertex.cc:51
std::size_t associatedParticles_size() const
Definition MutableVertex.cc:89
bool isAvailable() const
check whether the object is actually available
Definition MutableVertex.cc:113
std::vector< edm4eic::ReconstructedParticle >::const_iterator associatedParticles_begin() const
Definition MutableVertex.cc:77
void setChi2(float value)
Set the Chi-squared of the vertex fit.
Definition MutableVertex.cc:58
void setNdf(int value)
Set the NDF of the vertex fit.
Definition MutableVertex.cc:61
bool operator==(const MutableVertex &other) const
Definition MutableVertex.h:139
void setPositionError(edm4eic::Cov4f value)
Set the Covariance matrix of the position+time. Time is 4th component, similarly to 4vector.
Definition MutableVertex.cc:67
std::int32_t & type()
Get reference to Type flag, to identify what type of vertex it is (e.g. primary, secondary,...
Definition MutableVertex.cc:57
podio::RelationRange< edm4eic::ReconstructedParticle > getAssociatedParticles() const
Definition MutableVertex.cc:100
MutableVertex()
default constructor
Definition MutableVertex.cc:18
MutableVertex clone(bool cloneRelations=true) const
Definition MutableVertex.cc:35
void setType(std::int32_t value)
Set the Type flag, to identify what type of vertex it is (e.g. primary, secondary,...
Definition MutableVertex.cc:55
std::int32_t getType() const
Access the Type flag, to identify what type of vertex it is (e.g. primary, secondary,...
Definition MutableVertex.cc:48
Definition ReconstructedParticle.h:47
Definition VertexCollection.h:92
Definition VertexCollection.h:63
Definition CalorimeterHit.cc:17