3#ifndef EICD_ReconstructedParticle_H
4#define EICD_ReconstructedParticle_H
11#include "edm4hep/ParticleID.h"
12#include "edm4hep/Vector3f.h"
13#include "podio/RelationRange.h"
16#include "podio/ObjectID.h"
19#ifdef PODIO_JSON_OUTPUT
20#include "nlohmann/json.hpp"
30class MutableParticleID;
36class MutableReconstructedParticle;
51 ReconstructedParticle(std::int32_t type,
float energy, edm4hep::Vector3f momentum, edm4hep::Vector3f referencePoint,
float charge,
float mass,
float goodnessOfPID,
eicd::Cov4f covMatrix, std::int32_t PDG);
72 const std::int32_t&
getType()
const;
96 const std::int32_t&
getPDG()
const;
106 std::vector<eicd::Cluster>::const_iterator
clusters_begin()
const;
107 std::vector<eicd::Cluster>::const_iterator
clusters_end()
const;
108 podio::RelationRange<eicd::Cluster>
getClusters()
const;
111 std::vector<eicd::Track>::const_iterator
tracks_begin()
const;
112 std::vector<eicd::Track>::const_iterator
tracks_end()
const;
113 podio::RelationRange<eicd::Track>
getTracks()
const;
116 std::vector<eicd::ReconstructedParticle>::const_iterator
particles_begin()
const;
117 std::vector<eicd::ReconstructedParticle>::const_iterator
particles_end()
const;
118 podio::RelationRange<eicd::ReconstructedParticle>
getParticles()
const;
122 std::vector<edm4hep::ParticleID>::const_iterator
particleIDs_end()
const;
145 swap(a.m_obj, b.m_obj);
152std::ostream&
operator<<(std::ostream& o,
const ReconstructedParticle& value);
154#ifdef PODIO_JSON_OUTPUT
155void to_json(nlohmann::json& j,
const ReconstructedParticle& value);
Definition: MutableReconstructedParticle.h:43
Definition: ReconstructedParticleCollection.h:82
Definition: ReconstructedParticleCollection.h:35
Definition: ReconstructedParticle.h:42
bool isCompound() const
Definition: ReconstructedParticle.h:125
unsigned int particleIDs_size() const
Definition: ReconstructedParticle.cc:194
ReconstructedParticle & operator=(ReconstructedParticle other)
copy-assignment operator
Definition: ReconstructedParticle.cc:39
const eicd::Cov4f & getCovMatrix() const
Access the cvariance matrix of the reconstructed particle 4vector (10 parameters).
Definition: ReconstructedParticle.cc:67
unsigned int clusters_size() const
Definition: ReconstructedParticle.cc:98
podio::RelationRange< eicd::ReconstructedParticle > getParticles() const
Definition: ReconstructedParticle.cc:173
unsigned int tracks_size() const
Definition: ReconstructedParticle.cc:130
podio::RelationRange< edm4hep::ParticleID > getParticleIDs() const
Definition: ReconstructedParticle.cc:205
const float & getEnergy() const
Access the [GeV] energy of the reconstructed particle. Four momentum state is not kept consistent int...
Definition: ReconstructedParticle.cc:61
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_begin() const
Definition: ReconstructedParticle.cc:182
std::vector< eicd::ReconstructedParticle >::const_iterator particles_end() const
Definition: ReconstructedParticle.cc:156
unsigned int particles_size() const
Definition: ReconstructedParticle.cc:162
~ReconstructedParticle()
destructor
Definition: ReconstructedParticle.cc:54
podio::RelationRange< eicd::Cluster > getClusters() const
Definition: ReconstructedParticle.cc:109
const edm4hep::ParticleID getParticleIDUsed() const
Access the particle ID used for the kinematics of this particle.
Definition: ReconstructedParticle.cc:77
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_end() const
Definition: ReconstructedParticle.cc:188
MutableReconstructedParticle clone() const
create a mutable deep-copy of the object with identical relations
Definition: ReconstructedParticle.cc:50
friend void swap(ReconstructedParticle &a, ReconstructedParticle &b)
Definition: ReconstructedParticle.h:143
const std::int32_t & getType() const
Access the type of reconstructed particle. Check/set collection parameters ReconstructedParticleTypeN...
Definition: ReconstructedParticle.cc:60
void unlink()
disconnect from ReconstructedParticleObj instance
Definition: ReconstructedParticle.h:131
bool operator<(const ReconstructedParticle &other) const
Definition: ReconstructedParticle.h:137
std::vector< eicd::Track >::const_iterator tracks_begin() const
Definition: ReconstructedParticle.cc:118
const edm4hep::Vector3f & getReferencePoint() const
Access the [mm] reference, i.e. where the particle has been measured.
Definition: ReconstructedParticle.cc:63
const eicd::Vertex getStartVertex() const
Access the Start vertex associated to this particle.
Definition: ReconstructedParticle.cc:70
ReconstructedParticle()
default constructor
Definition: ReconstructedParticle.cc:18
const float & getMass() const
Access the [GeV] mass of the reconstructed particle, set independently from four vector....
Definition: ReconstructedParticle.cc:65
const float & getCharge() const
Access the charge of the reconstructed particle.
Definition: ReconstructedParticle.cc:64
const podio::ObjectID getObjectID() const
Definition: ReconstructedParticle.cc:224
unsigned int id() const
Definition: ReconstructedParticle.h:139
std::vector< eicd::Cluster >::const_iterator clusters_begin() const
Definition: ReconstructedParticle.cc:86
podio::RelationRange< eicd::Track > getTracks() const
Definition: ReconstructedParticle.cc:141
std::vector< eicd::Track >::const_iterator tracks_end() const
Definition: ReconstructedParticle.cc:124
bool isAvailable() const
check whether the object is actually available
Definition: ReconstructedParticle.cc:217
std::vector< eicd::Cluster >::const_iterator clusters_end() const
Definition: ReconstructedParticle.cc:92
const edm4hep::Vector3f & getMomentum() const
Access the [GeV] particle momentum. Four momentum state is not kept consistent internally.
Definition: ReconstructedParticle.cc:62
const float & getGoodnessOfPID() const
Access the overall goodness of the PID on a scale of [0;1].
Definition: ReconstructedParticle.cc:66
bool operator==(const ReconstructedParticle &other) const
Definition: ReconstructedParticle.h:133
const std::int32_t & getPDG() const
Access the PDG code for this particle.
Definition: ReconstructedParticle.cc:68
std::vector< eicd::ReconstructedParticle >::const_iterator particles_begin() const
Definition: ReconstructedParticle.cc:150
Definition: ReconstructedParticleObj.h:28
Definition: MCRecoClusterParticleAssociation.h:21
Definition: CalorimeterHit.cc:13
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition: CalorimeterHit.cc:93