3#ifndef EDM4EIC_Cluster_H
4#define EDM4EIC_Cluster_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"
31class ClusterCollection;
32class ClusterCollectionData;
53 Cluster(std::int32_t type,
float energy,
float energyError,
float time,
float timeError, std::uint32_t nhits, edm4hep::Vector3f position,
edm4eic::Cov3f positionError,
float intrinsicTheta,
float intrinsicPhi,
edm4eic::Cov2f intrinsicDirectionError);
112 std::vector<edm4eic::Cluster>::const_iterator
clusters_begin()
const;
113 std::vector<edm4eic::Cluster>::const_iterator
clusters_end()
const;
114 podio::RelationRange<edm4eic::Cluster>
getClusters()
const;
117 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_begin()
const;
118 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_end()
const;
119 podio::RelationRange<edm4eic::CalorimeterHit>
getHits()
const;
123 std::vector<edm4hep::ParticleID>::const_iterator
particleIDs_end()
const;
145 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ClusterObj>{
nullptr}; }
162 swap(a.m_obj, b.m_obj);
167 explicit Cluster(podio::utils::MaybeSharedPtr<ClusterObj> obj);
170 podio::utils::MaybeSharedPtr<ClusterObj> m_obj{
nullptr};
173std::ostream&
operator<<(std::ostream& o,
const Cluster& value);
175#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
176void to_json(nlohmann::json& j,
const Cluster& value);
Definition CalorimeterHit.h:37
Definition ClusterCollectionData.h:32
Definition ClusterCollection.h:92
Definition ClusterCollection.h:37
std::size_t particleIDs_size() const
Definition Cluster.cc:218
podio::RelationRange< float > getSubdetectorEnergies() const
Definition Cluster.cc:325
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_begin() const
Definition Cluster.cc:206
bool operator<(const Cluster &other) const
Definition Cluster.h:154
std::vector< float >::const_iterator hitContributions_end() const
Definition Cluster.cc:276
bool operator==(const Cluster &other) const
Definition Cluster.h:147
std::vector< edm4eic::Cluster >::const_iterator clusters_begin() const
Definition Cluster.cc:142
podio::RelationRange< float > getShapeParameters() const
Definition Cluster.cc:261
void unlink()
disconnect from ClusterObj instance
Definition Cluster.h:145
const edm4hep::Vector3f & getPosition() const
Access the Global position of the cluster [mm].
Definition Cluster.cc:134
std::vector< float >::const_iterator shapeParameters_end() const
Definition Cluster.cc:244
Cluster & operator=(Cluster other)
copy-assignment operator
Definition Cluster.cc:38
Cluster(const Cluster &other)=default
copy constructor
std::vector< float >::const_iterator subdetectorEnergies_begin() const
Definition Cluster.cc:302
float getEnergyError() const
Access the Error on the cluster energy [GeV].
Definition Cluster.cc:130
std::uint32_t getNhits() const
Access the Number of hits in the cluster.
Definition Cluster.cc:133
std::vector< float >::const_iterator hitContributions_begin() const
Definition Cluster.cc:270
podio::RelationRange< edm4hep::ParticleID > getParticleIDs() const
Definition Cluster.cc:229
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_begin() const
Definition Cluster.cc:174
MutableCluster clone(bool cloneRelations=true) const
Definition Cluster.cc:43
friend class ClusterCollection
Definition Cluster.h:41
bool isAvailable() const
check whether the object is actually available
Definition Cluster.cc:337
float getTime() const
Access the [ns].
Definition Cluster.cc:131
podio::RelationRange< float > getHitContributions() const
Definition Cluster.cc:293
std::size_t hits_size() const
Definition Cluster.cc:186
podio::RelationRange< edm4eic::Cluster > getClusters() const
Definition Cluster.cc:165
const edm4eic::Cov2f & getIntrinsicDirectionError() const
Access the Error on the intrinsic cluster propagation direction.
Definition Cluster.cc:138
Cluster()
default constructor
Definition Cluster.cc:20
std::size_t subdetectorEnergies_size() const
Definition Cluster.cc:314
podio::RelationRange< edm4eic::CalorimeterHit > getHits() const
Definition Cluster.cc:197
std::size_t hitContributions_size() const
Definition Cluster.cc:282
float getIntrinsicPhi() const
Access the Intrinsic cluster propagation direction azimuthal angle [rad].
Definition Cluster.cc:137
bool operator!=(const Cluster &other) const
Definition Cluster.h:150
friend class MutableCluster
Definition Cluster.h:40
std::size_t clusters_size() const
Definition Cluster.cc:154
const edm4eic::Cov3f & getPositionError() const
Access the Covariance matrix of the position (6 Parameters).
Definition Cluster.cc:135
std::vector< float >::const_iterator shapeParameters_begin() const
Definition Cluster.cc:238
static Cluster makeEmpty()
Definition Cluster.cc:124
float getIntrinsicTheta() const
Access the Intrinsic cluster propagation direction polar angle [rad].
Definition Cluster.cc:136
float getTimeError() const
Access the Error on the cluster time.
Definition Cluster.cc:132
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_end() const
Definition Cluster.cc:180
podio::ObjectID id() const
Definition Cluster.h:156
~Cluster()=default
destructor
std::int32_t getType() const
Access the Flag-word that defines the type of the cluster.
Definition Cluster.cc:128
std::size_t shapeParameters_size() const
Definition Cluster.cc:250
float getEnergy() const
Access the Reconstructed energy of the cluster [GeV].
Definition Cluster.cc:129
bool operator!=(const MutableCluster &other) const
Definition Cluster.h:151
const podio::ObjectID getObjectID() const
Definition Cluster.cc:341
std::vector< edm4eic::Cluster >::const_iterator clusters_end() const
Definition Cluster.cc:148
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_end() const
Definition Cluster.cc:212
friend void swap(Cluster &a, Cluster &b)
Definition Cluster.h:160
std::vector< float >::const_iterator subdetectorEnergies_end() const
Definition Cluster.cc:308
Definition ClusterObj.h:20
Definition MutableCluster.h:36
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103