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);
97 void unlink() { m_obj = podio::utils::MaybeSharedPtr<VertexObj>{
nullptr}; }
111 swap(a.m_obj, b.m_obj);
116 explicit Vertex(podio::utils::MaybeSharedPtr<VertexObj> obj);
119 podio::utils::MaybeSharedPtr<VertexObj> m_obj{
nullptr};
122std::ostream&
operator<<(std::ostream& o,
const Vertex& value);
124#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
125void to_json(nlohmann::json& j,
const Vertex& value);
Definition MutableVertex.h:35
Definition ReconstructedParticle.h:47
Definition VertexCollectionData.h:31
Definition VertexCollection.h:95
Definition VertexCollection.h:40
MutableVertex clone() const
create a mutable deep-copy of the object with identical relations
Definition Vertex.cc:38
bool operator<(const Vertex &other) const
Definition Vertex.h:103
int getNdf() const
Access the NDF of the vertex fit.
Definition Vertex.cc:52
const edm4hep::Vector4f & getPosition() const
Access the position [mm] + time t0 [ns] of the vertex. Time is 4th component in vector.
Definition Vertex.cc:53
friend class MutableVertex
Definition Vertex.h:38
podio::ObjectID id() const
Definition Vertex.h:105
void unlink()
disconnect from VertexObj instance
Definition Vertex.h:97
podio::RelationRange< edm4eic::ReconstructedParticle > getAssociatedParticles() const
Definition Vertex.cc:81
const edm4eic::Cov4f & getPositionError() const
Access the Covariance matrix of the position+time. Time is 4th component, similarly to 4vector.
Definition Vertex.cc:54
const podio::ObjectID getObjectID() const
Definition Vertex.cc:100
friend class VertexCollection
Definition Vertex.h:39
friend void swap(Vertex &a, Vertex &b)
Definition Vertex.h:109
std::vector< edm4eic::ReconstructedParticle >::const_iterator associatedParticles_begin() const
Definition Vertex.cc:58
~Vertex()=default
destructor
Vertex()
default constructor
Definition Vertex.cc:21
std::vector< edm4eic::ReconstructedParticle >::const_iterator associatedParticles_end() const
Definition Vertex.cc:64
std::size_t associatedParticles_size() const
Definition Vertex.cc:70
float getChi2() const
Access the Chi-squared of the vertex fit.
Definition Vertex.cc:51
static Vertex makeEmpty()
Definition Vertex.cc:46
Vertex(const Vertex &other)=default
copy constructor
Vertex & operator=(Vertex other)
copy-assignment operator
Definition Vertex.cc:33
std::int32_t getType() const
Access the Type flag, to identify what type of vertex it is (e.g. primary, secondary,...
Definition Vertex.cc:50
bool isAvailable() const
check whether the object is actually available
Definition Vertex.cc:93
bool operator==(const Vertex &other) const
Definition Vertex.h:99
Definition VertexObj.h:19
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97