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);
109 std::vector<edm4eic::Cluster>::const_iterator
clusters_begin()
const;
110 std::vector<edm4eic::Cluster>::const_iterator
clusters_end()
const;
111 podio::RelationRange<edm4eic::Cluster>
getClusters()
const;
114 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_begin()
const;
115 std::vector<edm4eic::CalorimeterHit>::const_iterator
hits_end()
const;
116 podio::RelationRange<edm4eic::CalorimeterHit>
getHits()
const;
120 std::vector<edm4hep::ParticleID>::const_iterator
particleIDs_end()
const;
142 void unlink() { m_obj = podio::utils::MaybeSharedPtr<ClusterObj>{
nullptr}; }
156 swap(a.m_obj, b.m_obj);
161 explicit Cluster(podio::utils::MaybeSharedPtr<ClusterObj> obj);
164 podio::utils::MaybeSharedPtr<ClusterObj> m_obj{
nullptr};
167std::ostream&
operator<<(std::ostream& o,
const Cluster& value);
169#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
170void to_json(nlohmann::json& j,
const Cluster& value);
Definition CalorimeterHit.h:37
Definition ClusterCollectionData.h:32
Definition ClusterCollection.h:95
Definition ClusterCollection.h:40
std::size_t particleIDs_size() const
Definition Cluster.cc:146
podio::RelationRange< float > getSubdetectorEnergies() const
Definition Cluster.cc:253
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_begin() const
Definition Cluster.cc:134
bool operator<(const Cluster &other) const
Definition Cluster.h:148
std::vector< float >::const_iterator hitContributions_end() const
Definition Cluster.cc:204
bool operator==(const Cluster &other) const
Definition Cluster.h:144
std::vector< edm4eic::Cluster >::const_iterator clusters_begin() const
Definition Cluster.cc:70
podio::RelationRange< float > getShapeParameters() const
Definition Cluster.cc:189
void unlink()
disconnect from ClusterObj instance
Definition Cluster.h:142
const edm4hep::Vector3f & getPosition() const
Access the Global position of the cluster [mm].
Definition Cluster.cc:62
std::vector< float >::const_iterator shapeParameters_end() const
Definition Cluster.cc:172
Cluster & operator=(Cluster other)
copy-assignment operator
Definition Cluster.cc:39
Cluster(const Cluster &other)=default
copy constructor
std::vector< float >::const_iterator subdetectorEnergies_begin() const
Definition Cluster.cc:230
float getEnergyError() const
Access the Error on the cluster energy [GeV].
Definition Cluster.cc:58
std::uint32_t getNhits() const
Access the Number of hits in the cluster.
Definition Cluster.cc:61
std::vector< float >::const_iterator hitContributions_begin() const
Definition Cluster.cc:198
podio::RelationRange< edm4hep::ParticleID > getParticleIDs() const
Definition Cluster.cc:157
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_begin() const
Definition Cluster.cc:102
friend class ClusterCollection
Definition Cluster.h:41
bool isAvailable() const
check whether the object is actually available
Definition Cluster.cc:265
float getTime() const
Access the [ns].
Definition Cluster.cc:59
podio::RelationRange< float > getHitContributions() const
Definition Cluster.cc:221
std::size_t hits_size() const
Definition Cluster.cc:114
podio::RelationRange< edm4eic::Cluster > getClusters() const
Definition Cluster.cc:93
const edm4eic::Cov2f & getIntrinsicDirectionError() const
Access the Error on the intrinsic cluster propagation direction.
Definition Cluster.cc:66
Cluster()
default constructor
Definition Cluster.cc:21
std::size_t subdetectorEnergies_size() const
Definition Cluster.cc:242
podio::RelationRange< edm4eic::CalorimeterHit > getHits() const
Definition Cluster.cc:125
std::size_t hitContributions_size() const
Definition Cluster.cc:210
float getIntrinsicPhi() const
Access the Intrinsic cluster propagation direction azimuthal angle [rad].
Definition Cluster.cc:65
friend class MutableCluster
Definition Cluster.h:40
std::size_t clusters_size() const
Definition Cluster.cc:82
const edm4eic::Cov3f & getPositionError() const
Access the Covariance matrix of the position (6 Parameters).
Definition Cluster.cc:63
std::vector< float >::const_iterator shapeParameters_begin() const
Definition Cluster.cc:166
static Cluster makeEmpty()
Definition Cluster.cc:52
float getIntrinsicTheta() const
Access the Intrinsic cluster propagation direction polar angle [rad].
Definition Cluster.cc:64
float getTimeError() const
Access the Error on the cluster time.
Definition Cluster.cc:60
std::vector< edm4eic::CalorimeterHit >::const_iterator hits_end() const
Definition Cluster.cc:108
MutableCluster clone() const
create a mutable deep-copy of the object with identical relations
Definition Cluster.cc:44
podio::ObjectID id() const
Definition Cluster.h:150
~Cluster()=default
destructor
std::int32_t getType() const
Access the Flag-word that defines the type of the cluster.
Definition Cluster.cc:56
std::size_t shapeParameters_size() const
Definition Cluster.cc:178
float getEnergy() const
Access the Reconstructed energy of the cluster [GeV].
Definition Cluster.cc:57
const podio::ObjectID getObjectID() const
Definition Cluster.cc:272
std::vector< edm4eic::Cluster >::const_iterator clusters_end() const
Definition Cluster.cc:76
std::vector< edm4hep::ParticleID >::const_iterator particleIDs_end() const
Definition Cluster.cc:140
friend void swap(Cluster &a, Cluster &b)
Definition Cluster.h:154
std::vector< float >::const_iterator subdetectorEnergies_end() const
Definition Cluster.cc:236
Definition ClusterObj.h:20
Definition MutableCluster.h:37
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97