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"
23#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
24#include "nlohmann/json_fwd.hpp"
34class MutableParticleID;
102 std::int32_t
getPDG()
const;
111 void setType(std::int32_t value);
115 [[deprecated(
"use getType instead")]]
116 std::int32_t&
type();
123 [[deprecated(
"use getEnergy instead")]]
131 [[deprecated(
"use getMomentum instead")]]
139 [[deprecated(
"use getReferencePoint instead")]]
147 [[deprecated(
"use getCharge instead")]]
155 [[deprecated(
"use getMass instead")]]
163 [[deprecated(
"use getGoodnessOfPID instead")]]
171 [[deprecated(
"use getCovMatrix instead")]]
175 void setPDG(std::int32_t value);
179 [[deprecated(
"use getPDG instead")]]
191 std::vector<edm4eic::Cluster>::const_iterator
clusters_begin()
const;
192 std::vector<edm4eic::Cluster>::const_iterator
clusters_end()
const;
193 podio::RelationRange<edm4eic::Cluster>
getClusters()
const;
197 std::vector<edm4eic::Track>::const_iterator
tracks_begin()
const;
198 std::vector<edm4eic::Track>::const_iterator
tracks_end()
const;
199 podio::RelationRange<edm4eic::Track>
getTracks()
const;
203 std::vector<edm4eic::ReconstructedParticle>::const_iterator
particles_begin()
const;
204 std::vector<edm4eic::ReconstructedParticle>::const_iterator
particles_end()
const;
205 podio::RelationRange<edm4eic::ReconstructedParticle>
getParticles()
const;
210 std::vector<edm4hep::ParticleID>::const_iterator
particleIDs_end()
const;
220 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ReconstructedParticleObj>{
nullptr}; }
237 swap(a.m_obj, b.m_obj);
244 podio::utils::MaybeSharedPtr<ReconstructedParticleObj> m_obj{
nullptr};
247#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
248void to_json(nlohmann::json& j,
const MutableReconstructedParticle& value);
Definition MutableReconstructedParticle.h:45
void setMass(float value)
Set the [GeV] mass of the reconstructed particle, set independently from four vector....
Definition MutableReconstructedParticle.cc:103
void setPDG(std::int32_t value)
Set the PDG code for this particle.
Definition MutableReconstructedParticle.cc:112
std::size_t clusters_size() const
Definition MutableReconstructedParticle.cc:144
MutableReconstructedParticle & operator=(MutableReconstructedParticle other)
copy-assignment operator
Definition MutableReconstructedParticle.cc:36
const edm4eic::Vertex getStartVertex() const
Access the Start vertex associated to this particle.
Definition MutableReconstructedParticle.cc:73
void addToParticleIDs(const edm4hep::ParticleID &)
Definition MutableReconstructedParticle.cc:235
void unlink()
disconnect from ReconstructedParticleObj instance
Definition MutableReconstructedParticle.h:220
bool isCompound() const
Definition MutableReconstructedParticle.h:213
std::vector< edm4eic::Track >::const_iterator tracks_begin() const
Definition MutableReconstructedParticle.cc:168
void addToTracks(const edm4eic::Track &)
Definition MutableReconstructedParticle.cc:163
MutableReconstructedParticle clone(bool cloneRelations=true) const
Definition MutableReconstructedParticle.cc:41
podio::ObjectID id() const
Definition MutableReconstructedParticle.h:231
friend class ReconstructedParticleCollection
Definition MutableReconstructedParticle.h:47
std::size_t particleIDs_size() const
Definition MutableReconstructedParticle.cc:252
std::vector< edm4eic::Cluster >::const_iterator clusters_begin() const
Definition MutableReconstructedParticle.cc:132
const edm4hep::Vector3f & getMomentum() const
Access the [GeV] particle momentum. Four momentum state is not kept consistent internally.
Definition MutableReconstructedParticle.cc:65
edm4eic::Cov4f & covMatrix()
Get reference to covariance matrix of the reconstructed particle 4vector (10 parameters).
Definition MutableReconstructedParticle.cc:111
void setGoodnessOfPID(float value)
Set the overall goodness of the PID on a scale of [0;1].
Definition MutableReconstructedParticle.cc:106
float getEnergy() const
Access the [GeV] energy of the reconstructed particle. Four momentum state is not kept consistent int...
Definition MutableReconstructedParticle.cc:64
std::vector< edm4eic::ReconstructedParticle >::const_iterator particles_begin() const
Definition MutableReconstructedParticle.cc:204
float & goodnessOfPID()
Get reference to overall goodness of the PID on a scale of [0;1].
Definition MutableReconstructedParticle.cc:108
bool operator<(const MutableReconstructedParticle &other) const
Definition MutableReconstructedParticle.h:229
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_end() const
Definition MutableReconstructedParticle.cc:246
std::int32_t getPDG() const
Access the PDG code for this particle.
Definition MutableReconstructedParticle.cc:71
float & mass()
Get reference to [GeV] mass of the reconstructed particle, set independently from four vector....
Definition MutableReconstructedParticle.cc:105
const edm4hep::Vector3f & getReferencePoint() const
Access the [mm] reference, i.e. where the particle has been measured.
Definition MutableReconstructedParticle.cc:66
float & charge()
Get reference to charge of the reconstructed particle.
Definition MutableReconstructedParticle.cc:102
std::vector< edm4eic::Track >::const_iterator tracks_end() const
Definition MutableReconstructedParticle.cc:174
const podio::ObjectID getObjectID() const
Definition MutableReconstructedParticle.cc:280
float getGoodnessOfPID() const
Access the overall goodness of the PID on a scale of [0;1].
Definition MutableReconstructedParticle.cc:69
bool operator==(const MutableReconstructedParticle &other) const
Definition MutableReconstructedParticle.h:222
std::vector< edm4eic::Cluster >::const_iterator clusters_end() const
Definition MutableReconstructedParticle.cc:138
void setCharge(float value)
Set the charge of the reconstructed particle.
Definition MutableReconstructedParticle.cc:100
const edm4eic::Cov4f & getCovMatrix() const
Access the covariance matrix of the reconstructed particle 4vector (10 parameters).
Definition MutableReconstructedParticle.cc:70
podio::RelationRange< edm4eic::Cluster > getClusters() const
Definition MutableReconstructedParticle.cc:155
MutableReconstructedParticle()
default constructor
Definition MutableReconstructedParticle.cc:20
void setParticleIDUsed(const edm4hep::ParticleID &value)
Set the particle ID used for the kinematics of this particle.
Definition MutableReconstructedParticle.cc:121
std::int32_t & PDG()
Get reference to PDG code for this particle.
Definition MutableReconstructedParticle.cc:114
bool operator!=(const MutableReconstructedParticle &other) const
Definition MutableReconstructedParticle.h:225
std::int32_t & type()
Get reference to type of reconstructed particle. Check/set collection parameters ReconstructedParticl...
Definition MutableReconstructedParticle.cc:90
~MutableReconstructedParticle()=default
destructor
void setCovMatrix(edm4eic::Cov4f value)
Set the covariance matrix of the reconstructed particle 4vector (10 parameters).
Definition MutableReconstructedParticle.cc:109
bool isAvailable() const
check whether the object is actually available
Definition MutableReconstructedParticle.cc:276
std::size_t tracks_size() const
Definition MutableReconstructedParticle.cc:180
podio::RelationRange< edm4eic::ReconstructedParticle > getParticles() const
Definition MutableReconstructedParticle.cc:227
edm4hep::Vector3f & referencePoint()
Get reference to [mm] reference, i.e. where the particle has been measured.
Definition MutableReconstructedParticle.cc:99
std::int32_t getType() const
Access the type of reconstructed particle. Check/set collection parameters ReconstructedParticleTypeN...
Definition MutableReconstructedParticle.cc:63
void setReferencePoint(edm4hep::Vector3f value)
Set the [mm] reference, i.e. where the particle has been measured.
Definition MutableReconstructedParticle.cc:97
float getMass() const
Access the [GeV] mass of the reconstructed particle, set independently from four vector....
Definition MutableReconstructedParticle.cc:68
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_begin() const
Definition MutableReconstructedParticle.cc:240
void setMomentum(edm4hep::Vector3f value)
Set the [GeV] particle momentum. Four momentum state is not kept consistent internally.
Definition MutableReconstructedParticle.cc:94
float & energy()
Get reference to [GeV] energy of the reconstructed particle. Four momentum state is not kept consiste...
Definition MutableReconstructedParticle.cc:93
const edm4hep::ParticleID getParticleIDUsed() const
Access the particle ID used for the kinematics of this particle.
Definition MutableReconstructedParticle.cc:80
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:88
void setEnergy(float value)
Set the [GeV] energy of the reconstructed particle. Four momentum state is not kept consistent intern...
Definition MutableReconstructedParticle.cc:91
std::size_t particles_size() const
Definition MutableReconstructedParticle.cc:216
friend class ReconstructedParticle
Definition MutableReconstructedParticle.h:49
edm4hep::Vector3f & momentum()
Get reference to [GeV] particle momentum. Four momentum state is not kept consistent internally.
Definition MutableReconstructedParticle.cc:96
std::vector< edm4eic::ReconstructedParticle >::const_iterator particles_end() const
Definition MutableReconstructedParticle.cc:210
friend void swap(MutableReconstructedParticle &a, MutableReconstructedParticle &b)
Definition MutableReconstructedParticle.h:235
float getCharge() const
Access the charge of the reconstructed particle.
Definition MutableReconstructedParticle.cc:67
bool operator!=(const ReconstructedParticle &other) const
Definition MutableReconstructedParticle.h:226
void addToParticles(const edm4eic::ReconstructedParticle &)
Definition MutableReconstructedParticle.cc:199
podio::RelationRange< edm4eic::Track > getTracks() const
Definition MutableReconstructedParticle.cc:191
void setStartVertex(const edm4eic::Vertex &value)
Set the Start vertex associated to this particle.
Definition MutableReconstructedParticle.cc:116
podio::RelationRange< edm4hep::ParticleID > getParticleIDs() const
Definition MutableReconstructedParticle.cc:263
void addToClusters(const edm4eic::Cluster &)
Definition MutableReconstructedParticle.cc:127
Definition ReconstructedParticleCollection.h:92
Definition ReconstructedParticle.h:47
Definition ReconstructedParticleCollection.h:63
Definition CalorimeterHit.cc:17
Definition CalorimeterHit.h:21