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"
52 MutableVertex(
const std::int32_t type,
const float chi2,
const int ndf,
const edm4hep::Vector4f& position,
const edm4eic::Cov4f& positionError);
89 void setType(
const std::int32_t type);
99 void setNdf(
const int ndf);
104 void setPosition(
const edm4hep::Vector4f& position);
127 void unlink() { m_obj = podio::utils::MaybeSharedPtr<VertexObj>{
nullptr}; }
142 friend std::hash<MutableVertex>;
146 swap(a.m_obj, b.m_obj);
151 explicit MutableVertex(podio::utils::MaybeSharedPtr<VertexObj> obj);
153 podio::utils::MaybeSharedPtr<VertexObj> m_obj{
new VertexObj{}, podio::utils::MarkOwned};
156#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
168 return std::hash<edm4eic::VertexObj*>{}(obj.m_obj.get());
Definition MutableVertex.h:38
void setType(const std::int32_t type)
Set the Type flag, to identify what type of vertex it is (e.g. primary, secondary,...
Definition MutableVertex.cc:51
friend class Vertex
Definition MutableVertex.h:42
void unlink()
disconnect from VertexObj instance
Definition MutableVertex.h:127
void addToAssociatedParticles(const edm4eic::ReconstructedParticle &)
Definition MutableVertex.cc:63
constexpr bool operator==(const MutableVertex &other) const
Definition MutableVertex.h:129
const podio::ObjectID getObjectID() const
Definition MutableVertex.cc:108
constexpr bool operator!=(const MutableVertex &other) const
Definition MutableVertex.h:132
friend class VertexMutableCollectionIterator
Definition MutableVertex.h:41
MutableVertex()=default
default constructor
void setPositionError(const edm4eic::Cov4f &positionError)
Set the Covariance matrix of the position+time. Time is 4th component, similarly to 4vector.
Definition MutableVertex.cc:59
const edm4eic::Cov4f & getPositionError() const
Access the Covariance matrix of the position+time. Time is 4th component, similarly to 4vector.
Definition MutableVertex.cc:48
bool operator<(const MutableVertex &other) const
Definition MutableVertex.h:136
friend class VertexCollection
Definition MutableVertex.h:40
std::vector< edm4eic::ReconstructedParticle >::const_iterator associatedParticles_end() const
Definition MutableVertex.cc:74
void setPosition(const edm4hep::Vector4f &position)
Set the position [mm] + time t0 [ns] of the vertex. Time is 4th component in vector.
Definition MutableVertex.cc:57
podio::ObjectID id() const
Definition MutableVertex.h:138
VertexCollection collection_type
Definition MutableVertex.h:46
void setChi2(const float chi2)
Set the Chi-squared of the vertex fit.
Definition MutableVertex.cc:53
float getChi2() const
Access the Chi-squared of the vertex fit.
Definition MutableVertex.cc:45
int getNdf() const
Access the NDF of the vertex fit.
Definition MutableVertex.cc:46
void setNdf(const int ndf)
Set the NDF of the vertex fit.
Definition MutableVertex.cc:55
~MutableVertex()=default
destructor
MutableVertex(const MutableVertex &other)=default
copy constructor
bool operator!=(const Vertex &other) const
Definition MutableVertex.h:133
friend void swap(MutableVertex &a, MutableVertex &b)
Definition MutableVertex.h:144
const edm4hep::Vector4f & getPosition() const
Access the position [mm] + time t0 [ns] of the vertex. Time is 4th component in vector.
Definition MutableVertex.cc:47
std::size_t associatedParticles_size() const
Definition MutableVertex.cc:80
bool isAvailable() const
check whether the object is actually available
Definition MutableVertex.cc:104
std::vector< edm4eic::ReconstructedParticle >::const_iterator associatedParticles_begin() const
Definition MutableVertex.cc:68
MutableVertex & operator=(MutableVertex other) &
copy-assignment operator
Definition MutableVertex.cc:26
podio::RelationRange< edm4eic::ReconstructedParticle > getAssociatedParticles() const
Definition MutableVertex.cc:91
MutableVertex clone(bool cloneRelations=true) const
Definition MutableVertex.cc:31
MutableVertex & operator=(MutableVertex other) &&=delete
std::int32_t getType() const
Access the Type flag, to identify what type of vertex it is (e.g. primary, secondary,...
Definition MutableVertex.cc:44
Vertex object_type
Definition MutableVertex.h:45
Definition ReconstructedParticle.h:54
Definition VertexCollection.h:139
Definition VertexObj.h:20
Definition ArrowMapper.cc:61
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableVertex &obj) const
Definition MutableVertex.h:167