3#ifndef EDM4EIC_MutableReconstructedParticle_H
4#define EDM4EIC_MutableReconstructedParticle_H
13#include "edm4hep/ParticleID.h"
14#include "edm4hep/Vector3f.h"
15#include "podio/RelationRange.h"
19#include "podio/utilities/MaybeSharedPtr.h"
24#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
25#include "nlohmann/json_fwd.hpp"
35class MutableParticleID;
105 std::int32_t
getPDG()
const;
114 void setType(std::int32_t value);
144 void setPDG(std::int32_t value);
155 std::vector<edm4eic::Cluster>::const_iterator
clusters_begin()
const;
156 std::vector<edm4eic::Cluster>::const_iterator
clusters_end()
const;
157 podio::RelationRange<edm4eic::Cluster>
getClusters()
const;
161 std::vector<edm4eic::Track>::const_iterator
tracks_begin()
const;
162 std::vector<edm4eic::Track>::const_iterator
tracks_end()
const;
163 podio::RelationRange<edm4eic::Track>
getTracks()
const;
167 std::vector<edm4eic::ReconstructedParticle>::const_iterator
particles_begin()
const;
168 std::vector<edm4eic::ReconstructedParticle>::const_iterator
particles_end()
const;
169 podio::RelationRange<edm4eic::ReconstructedParticle>
getParticles()
const;
174 std::vector<edm4hep::ParticleID>::const_iterator
particleIDs_end()
const;
184 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ReconstructedParticleObj>{
nullptr}; }
198 swap(a.m_obj, b.m_obj);
205 podio::utils::MaybeSharedPtr<ReconstructedParticleObj> m_obj{
nullptr};
208#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
209void to_json(nlohmann::json& j,
const MutableReconstructedParticle& value);
Definition MutableReconstructedParticle.h:46
void setParticleIDUsed(edm4hep::ParticleID value)
Set the particle ID used for the kinematics of this particle.
Definition MutableReconstructedParticle.cc:96
void setMass(float value)
Set the [GeV] mass of the reconstructed particle, set independently from four vector....
Definition MutableReconstructedParticle.cc:83
void setPDG(std::int32_t value)
Set the PDG code for this particle.
Definition MutableReconstructedParticle.cc:87
std::size_t clusters_size() const
Definition MutableReconstructedParticle.cc:121
MutableReconstructedParticle & operator=(MutableReconstructedParticle other)
copy-assignment operator
Definition MutableReconstructedParticle.cc:39
const edm4eic::Vertex getStartVertex() const
Access the Start vertex associated to this particle.
Definition MutableReconstructedParticle.cc:61
void unlink()
disconnect from ReconstructedParticleObj instance
Definition MutableReconstructedParticle.h:184
bool isCompound() const
Definition MutableReconstructedParticle.h:177
MutableReconstructedParticle clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableReconstructedParticle.cc:44
std::vector< edm4eic::Track >::const_iterator tracks_begin() const
Definition MutableReconstructedParticle.cc:145
podio::ObjectID id() const
Definition MutableReconstructedParticle.h:192
friend class ReconstructedParticleCollection
Definition MutableReconstructedParticle.h:48
std::size_t particleIDs_size() const
Definition MutableReconstructedParticle.cc:229
void addToParticleIDs(edm4hep::ParticleID)
Definition MutableReconstructedParticle.cc:212
std::vector< edm4eic::Cluster >::const_iterator clusters_begin() const
Definition MutableReconstructedParticle.cc:109
const edm4hep::Vector3f & getMomentum() const
Access the [GeV] particle momentum. Four momentum state is not kept consistent internally.
Definition MutableReconstructedParticle.cc:53
edm4eic::Cov4f & covMatrix()
Get reference to covariance matrix of the reconstructed particle 4vector (10 parameters).
Definition MutableReconstructedParticle.cc:86
void setGoodnessOfPID(float value)
Set the overall goodness of the PID on a scale of [0;1].
Definition MutableReconstructedParticle.cc:84
float getEnergy() const
Access the [GeV] energy of the reconstructed particle. Four momentum state is not kept consistent int...
Definition MutableReconstructedParticle.cc:52
std::vector< edm4eic::ReconstructedParticle >::const_iterator particles_begin() const
Definition MutableReconstructedParticle.cc:181
void addToTracks(edm4eic::Track)
Definition MutableReconstructedParticle.cc:140
bool operator<(const MutableReconstructedParticle &other) const
Definition MutableReconstructedParticle.h:190
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_end() const
Definition MutableReconstructedParticle.cc:223
std::int32_t getPDG() const
Access the PDG code for this particle.
Definition MutableReconstructedParticle.cc:59
const edm4hep::Vector3f & getReferencePoint() const
Access the [mm] reference, i.e. where the particle has been measured.
Definition MutableReconstructedParticle.cc:54
std::vector< edm4eic::Track >::const_iterator tracks_end() const
Definition MutableReconstructedParticle.cc:151
const podio::ObjectID getObjectID() const
Definition MutableReconstructedParticle.cc:260
float getGoodnessOfPID() const
Access the overall goodness of the PID on a scale of [0;1].
Definition MutableReconstructedParticle.cc:57
bool operator==(const MutableReconstructedParticle &other) const
Definition MutableReconstructedParticle.h:186
std::vector< edm4eic::Cluster >::const_iterator clusters_end() const
Definition MutableReconstructedParticle.cc:115
void setCharge(float value)
Set the charge of the reconstructed particle.
Definition MutableReconstructedParticle.cc:82
const edm4eic::Cov4f & getCovMatrix() const
Access the covariance matrix of the reconstructed particle 4vector (10 parameters).
Definition MutableReconstructedParticle.cc:58
podio::RelationRange< edm4eic::Cluster > getClusters() const
Definition MutableReconstructedParticle.cc:132
MutableReconstructedParticle()
default constructor
Definition MutableReconstructedParticle.cc:23
~MutableReconstructedParticle()=default
destructor
void setCovMatrix(edm4eic::Cov4f value)
Set the covariance matrix of the reconstructed particle 4vector (10 parameters).
Definition MutableReconstructedParticle.cc:85
bool isAvailable() const
check whether the object is actually available
Definition MutableReconstructedParticle.cc:253
std::size_t tracks_size() const
Definition MutableReconstructedParticle.cc:157
podio::RelationRange< edm4eic::ReconstructedParticle > getParticles() const
Definition MutableReconstructedParticle.cc:204
edm4hep::Vector3f & referencePoint()
Get reference to [mm] reference, i.e. where the particle has been measured.
Definition MutableReconstructedParticle.cc:81
std::int32_t getType() const
Access the type of reconstructed particle. Check/set collection parameters ReconstructedParticleTypeN...
Definition MutableReconstructedParticle.cc:51
void setReferencePoint(edm4hep::Vector3f value)
Set the [mm] reference, i.e. where the particle has been measured.
Definition MutableReconstructedParticle.cc:80
float getMass() const
Access the [GeV] mass of the reconstructed particle, set independently from four vector....
Definition MutableReconstructedParticle.cc:56
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_begin() const
Definition MutableReconstructedParticle.cc:217
void setMomentum(edm4hep::Vector3f value)
Set the [GeV] particle momentum. Four momentum state is not kept consistent internally.
Definition MutableReconstructedParticle.cc:78
const edm4hep::ParticleID getParticleIDUsed() const
Access the particle ID used for the kinematics of this particle.
Definition MutableReconstructedParticle.cc:68
MutableReconstructedParticle(const MutableReconstructedParticle &other)=default
copy constructor
void setType(std::int32_t value)
Set the type of reconstructed particle. Check/set collection parameters ReconstructedParticleTypeName...
Definition MutableReconstructedParticle.cc:76
void setEnergy(float value)
Set the [GeV] energy of the reconstructed particle. Four momentum state is not kept consistent intern...
Definition MutableReconstructedParticle.cc:77
std::size_t particles_size() const
Definition MutableReconstructedParticle.cc:193
friend class ReconstructedParticle
Definition MutableReconstructedParticle.h:50
edm4hep::Vector3f & momentum()
Get reference to [GeV] particle momentum. Four momentum state is not kept consistent internally.
Definition MutableReconstructedParticle.cc:79
void addToParticles(edm4eic::ReconstructedParticle)
Definition MutableReconstructedParticle.cc:176
void setStartVertex(edm4eic::Vertex value)
Set the Start vertex associated to this particle.
Definition MutableReconstructedParticle.cc:89
std::vector< edm4eic::ReconstructedParticle >::const_iterator particles_end() const
Definition MutableReconstructedParticle.cc:187
friend void swap(MutableReconstructedParticle &a, MutableReconstructedParticle &b)
Definition MutableReconstructedParticle.h:196
float getCharge() const
Access the charge of the reconstructed particle.
Definition MutableReconstructedParticle.cc:55
podio::RelationRange< edm4eic::Track > getTracks() const
Definition MutableReconstructedParticle.cc:168
void addToClusters(edm4eic::Cluster)
Definition MutableReconstructedParticle.cc:104
podio::RelationRange< edm4hep::ParticleID > getParticleIDs() const
Definition MutableReconstructedParticle.cc:240
Definition ReconstructedParticleCollection.h:95
Definition ReconstructedParticle.h:47
Definition ReconstructedParticleCollection.h:66
Definition CalorimeterHit.cc:18
Definition CalorimeterHit.h:21