3#ifndef EDM4EIC_CalorimeterHit_H
4#define EDM4EIC_CalorimeterHit_H
8#include "edm4hep/Vector3f.h"
11#include "podio/utilities/MaybeSharedPtr.h"
16#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
17#include "nlohmann/json_fwd.hpp"
22class RawCalorimeterHit;
23class MutableRawCalorimeterHit;
29class MutableCalorimeterHit;
30class CalorimeterHitCollection;
31class CalorimeterHitCollectionData;
52 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);
99 const edm4hep::Vector3f&
getLocal()
const;
103 const edm4hep::RawCalorimeterHit
getRawHit()
const;
110 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CalorimeterHitObj>{
nullptr}; }
124 swap(a.m_obj, b.m_obj);
129 explicit CalorimeterHit(podio::utils::MaybeSharedPtr<CalorimeterHitObj> obj);
132 podio::utils::MaybeSharedPtr<CalorimeterHitObj> m_obj{
nullptr};
135std::ostream&
operator<<(std::ostream& o,
const CalorimeterHit& value);
137#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
138void to_json(nlohmann::json& j,
const CalorimeterHit& value);
Definition CalorimeterHitCollectionData.h:31
Definition CalorimeterHitCollection.h:95
Definition CalorimeterHitCollection.h:40
Definition CalorimeterHit.h:37
float getTime() const
Access the The time of the hit in [ns].
Definition CalorimeterHit.cc:59
friend void swap(CalorimeterHit &a, CalorimeterHit &b)
Definition CalorimeterHit.h:122
const podio::ObjectID getObjectID() const
Definition CalorimeterHit.cc:86
const edm4hep::Vector3f & getPosition() const
Access the The global position of the hit in world coordinates [mm].
Definition CalorimeterHit.cc:61
bool isAvailable() const
check whether the object is actually available
Definition CalorimeterHit.cc:79
float getTimeError() const
Access the Error on the time.
Definition CalorimeterHit.cc:60
bool operator==(const CalorimeterHit &other) const
Definition CalorimeterHit.h:112
float getEnergy() const
Access the The energy for this hit in [GeV].
Definition CalorimeterHit.cc:57
CalorimeterHit & operator=(CalorimeterHit other)
copy-assignment operator
Definition CalorimeterHit.cc:39
const edm4hep::Vector3f & getDimension() const
Access the The dimension information of the cell [mm].
Definition CalorimeterHit.cc:62
float getEnergyError() const
Access the Error on energy [GeV].
Definition CalorimeterHit.cc:58
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition CalorimeterHit.cc:56
bool operator<(const CalorimeterHit &other) const
Definition CalorimeterHit.h:116
std::int32_t getSector() const
Access the Sector that this hit occurred in.
Definition CalorimeterHit.cc:63
MutableCalorimeterHit clone() const
create a mutable deep-copy of the object with identical relations
Definition CalorimeterHit.cc:44
const edm4hep::Vector3f & getLocal() const
Access the The local coordinates of the hit in the detector segment [mm].
Definition CalorimeterHit.cc:65
static CalorimeterHit makeEmpty()
Definition CalorimeterHit.cc:52
void unlink()
disconnect from CalorimeterHitObj instance
Definition CalorimeterHit.h:110
CalorimeterHit(const CalorimeterHit &other)=default
copy constructor
friend class CalorimeterHitCollection
Definition CalorimeterHit.h:40
friend class MutableCalorimeterHit
Definition CalorimeterHit.h:39
CalorimeterHit()
default constructor
Definition CalorimeterHit.cc:22
~CalorimeterHit()=default
destructor
podio::ObjectID id() const
Definition CalorimeterHit.h:118
std::int32_t getLayer() const
Access the Layer that the hit occurred in.
Definition CalorimeterHit.cc:64
const edm4hep::RawCalorimeterHit getRawHit() const
Access the Related raw calorimeter hit.
Definition CalorimeterHit.cc:67
Definition CalorimeterHitObj.h:21
Definition MutableCalorimeterHit.h:36
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97
Definition CalorimeterHit.h:21