3#ifndef EDM4EIC_ReconstructedParticle_H
4#define EDM4EIC_ReconstructedParticle_H
11#include "edm4hep/ParticleID.h"
12#include "edm4hep/Vector3f.h"
13#include "podio/RelationRange.h"
17#include "podio/utilities/MaybeSharedPtr.h"
22#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
23#include "nlohmann/json_fwd.hpp"
33class MutableParticleID;
39class MutableReconstructedParticle;
40class ReconstructedParticleCollection;
41class ReconstructedParticleCollectionData;
62 ReconstructedParticle(std::int32_t type,
float energy, edm4hep::Vector3f momentum, edm4hep::Vector3f referencePoint,
float charge,
float mass,
float goodnessOfPID,
edm4eic::Cov4f covMatrix, std::int32_t PDG);
106 std::int32_t
getPDG()
const;
116 std::vector<edm4eic::Cluster>::const_iterator
clusters_begin()
const;
117 std::vector<edm4eic::Cluster>::const_iterator
clusters_end()
const;
118 podio::RelationRange<edm4eic::Cluster>
getClusters()
const;
121 std::vector<edm4eic::Track>::const_iterator
tracks_begin()
const;
122 std::vector<edm4eic::Track>::const_iterator
tracks_end()
const;
123 podio::RelationRange<edm4eic::Track>
getTracks()
const;
126 std::vector<edm4eic::ReconstructedParticle>::const_iterator
particles_begin()
const;
127 std::vector<edm4eic::ReconstructedParticle>::const_iterator
particles_end()
const;
128 podio::RelationRange<edm4eic::ReconstructedParticle>
getParticles()
const;
132 std::vector<edm4hep::ParticleID>::const_iterator
particleIDs_end()
const;
141 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ReconstructedParticleObj>{
nullptr}; }
155 swap(a.m_obj, b.m_obj);
163 podio::utils::MaybeSharedPtr<ReconstructedParticleObj> m_obj{
nullptr};
166std::ostream&
operator<<(std::ostream& o,
const ReconstructedParticle& value);
168#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
169void to_json(nlohmann::json& j,
const ReconstructedParticle& value);
Definition MutableReconstructedParticle.h:46
Definition ReconstructedParticleCollectionData.h:34
Definition ReconstructedParticleCollection.h:95
Definition ReconstructedParticleCollection.h:40
Definition ReconstructedParticle.h:47
std::size_t particleIDs_size() const
Definition ReconstructedParticle.cc:190
ReconstructedParticle()
default constructor
Definition ReconstructedParticle.cc:23
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_end() const
Definition ReconstructedParticle.cc:184
ReconstructedParticle & operator=(ReconstructedParticle other)
copy-assignment operator
Definition ReconstructedParticle.cc:39
friend class ReconstructedParticleCollection
Definition ReconstructedParticle.h:50
const edm4eic::Cov4f & getCovMatrix() const
Access the covariance matrix of the reconstructed particle 4vector (10 parameters).
Definition ReconstructedParticle.cc:63
std::size_t clusters_size() const
Definition ReconstructedParticle.cc:94
ReconstructedParticle(const ReconstructedParticle &other)=default
copy constructor
std::size_t tracks_size() const
Definition ReconstructedParticle.cc:126
std::vector< edm4eic::Cluster >::const_iterator clusters_begin() const
Definition ReconstructedParticle.cc:82
std::int32_t getType() const
Access the type of reconstructed particle. Check/set collection parameters ReconstructedParticleTypeN...
Definition ReconstructedParticle.cc:56
float getGoodnessOfPID() const
Access the overall goodness of the PID on a scale of [0;1].
Definition ReconstructedParticle.cc:62
podio::RelationRange< edm4eic::Cluster > getClusters() const
Definition ReconstructedParticle.cc:105
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_begin() const
Definition ReconstructedParticle.cc:178
podio::ObjectID id() const
Definition ReconstructedParticle.h:149
std::vector< edm4eic::Track >::const_iterator tracks_end() const
Definition ReconstructedParticle.cc:120
friend class MutableReconstructedParticle
Definition ReconstructedParticle.h:49
const edm4hep::Vector3f & getReferencePoint() const
Access the [mm] reference, i.e. where the particle has been measured.
Definition ReconstructedParticle.cc:59
std::int32_t getPDG() const
Access the PDG code for this particle.
Definition ReconstructedParticle.cc:64
std::vector< edm4eic::Track >::const_iterator tracks_begin() const
Definition ReconstructedParticle.cc:114
const edm4hep::Vector3f & getMomentum() const
Access the [GeV] particle momentum. Four momentum state is not kept consistent internally.
Definition ReconstructedParticle.cc:58
friend void swap(ReconstructedParticle &a, ReconstructedParticle &b)
Definition ReconstructedParticle.h:153
std::vector< edm4eic::ReconstructedParticle >::const_iterator particles_end() const
Definition ReconstructedParticle.cc:152
bool isCompound() const
Definition ReconstructedParticle.h:135
const edm4eic::Vertex getStartVertex() const
Access the Start vertex associated to this particle.
Definition ReconstructedParticle.cc:66
bool operator==(const ReconstructedParticle &other) const
Definition ReconstructedParticle.h:143
~ReconstructedParticle()=default
destructor
const podio::ObjectID getObjectID() const
Definition ReconstructedParticle.cc:220
bool isAvailable() const
check whether the object is actually available
Definition ReconstructedParticle.cc:213
float getMass() const
Access the [GeV] mass of the reconstructed particle, set independently from four vector....
Definition ReconstructedParticle.cc:61
float getCharge() const
Access the charge of the reconstructed particle.
Definition ReconstructedParticle.cc:60
float getEnergy() const
Access the [GeV] energy of the reconstructed particle. Four momentum state is not kept consistent int...
Definition ReconstructedParticle.cc:57
const edm4hep::ParticleID getParticleIDUsed() const
Access the particle ID used for the kinematics of this particle.
Definition ReconstructedParticle.cc:73
podio::RelationRange< edm4eic::Track > getTracks() const
Definition ReconstructedParticle.cc:137
std::vector< edm4eic::Cluster >::const_iterator clusters_end() const
Definition ReconstructedParticle.cc:88
std::size_t particles_size() const
Definition ReconstructedParticle.cc:158
std::vector< edm4eic::ReconstructedParticle >::const_iterator particles_begin() const
Definition ReconstructedParticle.cc:146
static ReconstructedParticle makeEmpty()
Definition ReconstructedParticle.cc:52
bool operator<(const ReconstructedParticle &other) const
Definition ReconstructedParticle.h:147
podio::RelationRange< edm4eic::ReconstructedParticle > getParticles() const
Definition ReconstructedParticle.cc:169
void unlink()
disconnect from ReconstructedParticleObj instance
Definition ReconstructedParticle.h:141
MutableReconstructedParticle clone() const
create a mutable deep-copy of the object with identical relations
Definition ReconstructedParticle.cc:44
podio::RelationRange< edm4hep::ParticleID > getParticleIDs() const
Definition ReconstructedParticle.cc:201
Definition ReconstructedParticleObj.h:28
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97
Definition CalorimeterHit.h:21