3#ifndef EDM4EIC_CalorimeterHit_H
4#define EDM4EIC_CalorimeterHit_H
8#include "edm4hep/Vector3f.h"
11#include "podio/utilities/MaybeSharedPtr.h"
12#include "podio/detail/OrderKey.h"
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
23class CalorimeterHitCollection;
26class RawCalorimeterHit;
27class MutableRawCalorimeterHit;
38class MutableCalorimeterHit;
39class CalorimeterHitCollection;
40class CalorimeterHitCollectionData;
62 CalorimeterHit(std::uint64_t cellID,
float energy,
float energyError,
float time,
float timeError, edm4hep::Vector3f position, edm4hep::Vector3f dimension, std::int32_t sector, std::int32_t layer, edm4hep::Vector3f local);
84 static constexpr auto typeName =
"edm4eic::CalorimeterHit";
114 const edm4hep::Vector3f&
getLocal()
const;
118 const edm4hep::RawCalorimeterHit
getRawHit()
const;
125 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CalorimeterHitObj>{
nullptr}; }
142 swap(a.m_obj, b.m_obj);
147 explicit CalorimeterHit(podio::utils::MaybeSharedPtr<CalorimeterHitObj> obj);
150 podio::utils::MaybeSharedPtr<CalorimeterHitObj> m_obj{
nullptr};
153std::ostream&
operator<<(std::ostream& o,
const CalorimeterHit& value);
155#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
156void to_json(nlohmann::json& j,
const CalorimeterHit& value);
Definition CalorimeterHitCollectionData.h:31
Definition CalorimeterHitCollection.h:91
Definition CalorimeterHitCollection.h:36
Definition CalorimeterHit.h:46
float getTime() const
Access the The time of the hit in [ns].
Definition CalorimeterHit.cc:68
friend void swap(CalorimeterHit &a, CalorimeterHit &b)
Definition CalorimeterHit.h:140
const podio::ObjectID getObjectID() const
Definition CalorimeterHit.cc:92
const edm4hep::Vector3f & getPosition() const
Access the The global position of the hit in world coordinates [mm].
Definition CalorimeterHit.cc:70
bool isAvailable() const
check whether the object is actually available
Definition CalorimeterHit.cc:88
float getTimeError() const
Access the Error on the time.
Definition CalorimeterHit.cc:69
bool operator==(const CalorimeterHit &other) const
Definition CalorimeterHit.h:127
float getEnergy() const
Access the The energy for this hit in [GeV].
Definition CalorimeterHit.cc:66
CalorimeterHit & operator=(CalorimeterHit other)
copy-assignment operator
Definition CalorimeterHit.cc:38
const edm4hep::Vector3f & getDimension() const
Access the The dimension information of the cell [mm].
Definition CalorimeterHit.cc:71
bool operator!=(const CalorimeterHit &other) const
Definition CalorimeterHit.h:130
float getEnergyError() const
Access the Error on energy [GeV].
Definition CalorimeterHit.cc:67
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition CalorimeterHit.cc:65
bool operator<(const CalorimeterHit &other) const
Definition CalorimeterHit.h:134
std::int32_t getSector() const
Access the Sector that this hit occurred in.
Definition CalorimeterHit.cc:72
MutableCalorimeterHit clone(bool cloneRelations=true) const
Definition CalorimeterHit.cc:43
static constexpr auto typeName
Definition CalorimeterHit.h:84
const edm4hep::Vector3f & getLocal() const
Access the The local coordinates of the hit in the detector segment [mm].
Definition CalorimeterHit.cc:74
static CalorimeterHit makeEmpty()
Definition CalorimeterHit.cc:61
void unlink()
disconnect from CalorimeterHitObj instance
Definition CalorimeterHit.h:125
CalorimeterHit(const CalorimeterHit &other)=default
copy constructor
friend class CalorimeterHitCollection
Definition CalorimeterHit.h:49
friend class MutableCalorimeterHit
Definition CalorimeterHit.h:48
CalorimeterHit()
default constructor
Definition CalorimeterHit.cc:21
~CalorimeterHit()=default
destructor
podio::ObjectID id() const
Definition CalorimeterHit.h:136
std::int32_t getLayer() const
Access the Layer that the hit occurred in.
Definition CalorimeterHit.cc:73
bool operator!=(const MutableCalorimeterHit &other) const
Definition CalorimeterHit.h:131
const edm4hep::RawCalorimeterHit getRawHit() const
Access the Related raw calorimeter hit.
Definition CalorimeterHit.cc:76
Definition CalorimeterHitObj.h:21
Definition MutableCalorimeterHit.h:38
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:25
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150