3#ifndef EDM4EIC_Vertex_H
4#define EDM4EIC_Vertex_H
10#include "edm4hep/Vector4f.h"
11#include "podio/RelationRange.h"
15#include "podio/utilities/MaybeSharedPtr.h"
20#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
21#include "nlohmann/json_fwd.hpp"
29class VertexCollection;
30class VertexCollectionData;
51 Vertex(std::int32_t type,
float chi2,
int ndf, edm4hep::Vector4f position,
edm4eic::Cov4f positionError);
100 void unlink() { m_obj = podio::utils::MaybeSharedPtr<VertexObj>{
nullptr}; }
117 swap(a.m_obj, b.m_obj);
122 explicit Vertex(podio::utils::MaybeSharedPtr<VertexObj> obj);
125 podio::utils::MaybeSharedPtr<VertexObj> m_obj{
nullptr};
128std::ostream&
operator<<(std::ostream& o,
const Vertex& value);
130#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
131void to_json(nlohmann::json& j,
const Vertex& value);
Definition MutableVertex.h:34
Definition ReconstructedParticle.h:47
Definition VertexCollectionData.h:31
Definition VertexCollection.h:92
Definition VertexCollection.h:37
bool operator<(const Vertex &other) const
Definition Vertex.h:109
int getNdf() const
Access the NDF of the vertex fit.
Definition Vertex.cc:69
const edm4hep::Vector4f & getPosition() const
Access the position [mm] + time t0 [ns] of the vertex. Time is 4th component in vector.
Definition Vertex.cc:70
friend class MutableVertex
Definition Vertex.h:38
podio::ObjectID id() const
Definition Vertex.h:111
void unlink()
disconnect from VertexObj instance
Definition Vertex.h:100
bool operator!=(const MutableVertex &other) const
Definition Vertex.h:106
podio::RelationRange< edm4eic::ReconstructedParticle > getAssociatedParticles() const
Definition Vertex.cc:98
const edm4eic::Cov4f & getPositionError() const
Access the Covariance matrix of the position+time. Time is 4th component, similarly to 4vector.
Definition Vertex.cc:71
const podio::ObjectID getObjectID() const
Definition Vertex.cc:114
friend class VertexCollection
Definition Vertex.h:39
friend void swap(Vertex &a, Vertex &b)
Definition Vertex.h:115
std::vector< edm4eic::ReconstructedParticle >::const_iterator associatedParticles_begin() const
Definition Vertex.cc:75
~Vertex()=default
destructor
Vertex()
default constructor
Definition Vertex.cc:20
std::vector< edm4eic::ReconstructedParticle >::const_iterator associatedParticles_end() const
Definition Vertex.cc:81
std::size_t associatedParticles_size() const
Definition Vertex.cc:87
float getChi2() const
Access the Chi-squared of the vertex fit.
Definition Vertex.cc:68
bool operator!=(const Vertex &other) const
Definition Vertex.h:105
static Vertex makeEmpty()
Definition Vertex.cc:63
Vertex(const Vertex &other)=default
copy constructor
Vertex & operator=(Vertex other)
copy-assignment operator
Definition Vertex.cc:32
MutableVertex clone(bool cloneRelations=true) const
Definition Vertex.cc:37
std::int32_t getType() const
Access the Type flag, to identify what type of vertex it is (e.g. primary, secondary,...
Definition Vertex.cc:67
bool isAvailable() const
check whether the object is actually available
Definition Vertex.cc:110
bool operator==(const Vertex &other) const
Definition Vertex.h:102
Definition VertexObj.h:19
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103