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"
16#include "podio/detail/OrderKey.h"
21#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
22#include "nlohmann/json_fwd.hpp"
27class VertexCollection;
39class VertexCollection;
40class VertexCollectionData;
62 Vertex(std::int32_t type,
float chi2,
int ndf, edm4hep::Vector4f position,
edm4eic::Cov4f positionError);
84 static constexpr auto typeName =
"edm4eic::Vertex";
113 void unlink() { m_obj = podio::utils::MaybeSharedPtr<VertexObj>{
nullptr}; }
130 swap(a.m_obj, b.m_obj);
135 explicit Vertex(podio::utils::MaybeSharedPtr<VertexObj> obj);
138 podio::utils::MaybeSharedPtr<VertexObj> m_obj{
nullptr};
141std::ostream&
operator<<(std::ostream& o,
const Vertex& value);
143#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
144void to_json(nlohmann::json& j,
const Vertex& value);
Definition MutableVertex.h:38
Definition ReconstructedParticle.h:54
Definition VertexCollectionData.h:31
Definition VertexCollection.h:91
Definition VertexCollection.h:36
bool operator<(const Vertex &other) const
Definition Vertex.h:122
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:48
podio::ObjectID id() const
Definition Vertex.h:124
void unlink()
disconnect from VertexObj instance
Definition Vertex.h:113
bool operator!=(const MutableVertex &other) const
Definition Vertex.h:119
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:49
friend void swap(Vertex &a, Vertex &b)
Definition Vertex.h:128
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
static constexpr auto typeName
Definition Vertex.h:84
bool operator!=(const Vertex &other) const
Definition Vertex.h:118
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:115
Definition VertexObj.h:20
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150