3#ifndef EDM4EIC_MutableCalorimeterHit_H
4#define EDM4EIC_MutableCalorimeterHit_H
10#include "edm4hep/Vector3f.h"
13#include "podio/utilities/MaybeSharedPtr.h"
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
26class RawCalorimeterHit;
27class MutableRawCalorimeterHit;
99 const edm4hep::Vector3f&
getLocal()
const;
103 const edm4hep::RawCalorimeterHit
getRawHit()
const;
110 [[deprecated(
"use getCellID instead")]]
118 [[deprecated(
"use getEnergy instead")]]
126 [[deprecated(
"use getEnergyError instead")]]
134 [[deprecated(
"use getTime instead")]]
142 [[deprecated(
"use getTimeError instead")]]
150 [[deprecated(
"use getPosition instead")]]
158 [[deprecated(
"use getDimension instead")]]
166 [[deprecated(
"use getSector instead")]]
174 [[deprecated(
"use getLayer instead")]]
175 std::int32_t&
layer();
182 [[deprecated(
"use getLocal instead")]]
183 edm4hep::Vector3f&
local();
187 void setRawHit(
const edm4hep::RawCalorimeterHit& value);
195 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CalorimeterHitObj>{
nullptr}; }
210 friend std::hash<MutableCalorimeterHit>;
214 swap(a.m_obj, b.m_obj);
221 podio::utils::MaybeSharedPtr<CalorimeterHitObj> m_obj{
new CalorimeterHitObj{}, podio::utils::MarkOwned};
224#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
234struct std::hash<
edm4eic::MutableCalorimeterHit> {
236 return std::hash<edm4eic::CalorimeterHitObj*>{}(obj.m_obj.get());
Definition CalorimeterHitCollection.h:138
Definition CalorimeterHit.h:46
Definition CalorimeterHitObj.h:21
Definition MutableCalorimeterHit.h:38
std::int32_t getLayer() const
Access the Layer that the hit occurred in.
Definition MutableCalorimeterHit.cc:55
MutableCalorimeterHit(const MutableCalorimeterHit &other)=default
copy constructor
float & time()
Get reference to The time of the hit in [ns].
Definition MutableCalorimeterHit.cc:77
std::int32_t & layer()
Get reference to Layer that the hit occurred in.
Definition MutableCalorimeterHit.cc:92
void unlink()
disconnect from CalorimeterHitObj instance
Definition MutableCalorimeterHit.h:195
void setDimension(const edm4hep::Vector3f &dimension)
Set the The dimension information of the cell [mm].
Definition MutableCalorimeterHit.cc:84
void setLayer(const std::int32_t layer)
Set the Layer that the hit occurred in.
Definition MutableCalorimeterHit.cc:90
MutableCalorimeterHit clone(bool cloneRelations=true) const
Definition MutableCalorimeterHit.cc:37
bool operator==(const MutableCalorimeterHit &other) const
Definition MutableCalorimeterHit.h:197
edm4hep::Vector3f & position()
Get reference to The global position of the hit in world coordinates [mm].
Definition MutableCalorimeterHit.cc:83
void setTime(const float time)
Set the The time of the hit in [ns].
Definition MutableCalorimeterHit.cc:75
bool operator!=(const CalorimeterHit &other) const
Definition MutableCalorimeterHit.h:201
void setSector(const std::int32_t sector)
Set the Sector that this hit occurred in.
Definition MutableCalorimeterHit.cc:87
float & energy()
Get reference to The energy for this hit in [GeV].
Definition MutableCalorimeterHit.cc:71
std::int32_t & sector()
Get reference to Sector that this hit occurred in.
Definition MutableCalorimeterHit.cc:89
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition MutableCalorimeterHit.cc:47
MutableCalorimeterHit()=default
default constructor
bool operator<(const MutableCalorimeterHit &other) const
Definition MutableCalorimeterHit.h:204
const edm4hep::Vector3f & getDimension() const
Access the The dimension information of the cell [mm].
Definition MutableCalorimeterHit.cc:53
const edm4hep::Vector3f & getPosition() const
Access the The global position of the hit in world coordinates [mm].
Definition MutableCalorimeterHit.cc:52
edm4hep::Vector3f & dimension()
Get reference to The dimension information of the cell [mm].
Definition MutableCalorimeterHit.cc:86
void setEnergy(const float energy)
Set the The energy for this hit in [GeV].
Definition MutableCalorimeterHit.cc:69
float getEnergy() const
Access the The energy for this hit in [GeV].
Definition MutableCalorimeterHit.cc:48
MutableCalorimeterHit & operator=(MutableCalorimeterHit other) &
copy-assignment operator
Definition MutableCalorimeterHit.cc:32
float getTimeError() const
Access the Error on the time.
Definition MutableCalorimeterHit.cc:51
void setCellID(const std::uint64_t cellID)
Set the The detector specific (geometrical) cell id.
Definition MutableCalorimeterHit.cc:66
~MutableCalorimeterHit()=default
destructor
std::int32_t getSector() const
Access the Sector that this hit occurred in.
Definition MutableCalorimeterHit.cc:54
friend void swap(MutableCalorimeterHit &a, MutableCalorimeterHit &b)
Definition MutableCalorimeterHit.h:212
const podio::ObjectID getObjectID() const
Definition MutableCalorimeterHit.cc:111
CalorimeterHit object_type
Definition MutableCalorimeterHit.h:45
edm4hep::Vector3f & local()
Get reference to The local coordinates of the hit in the detector segment [mm].
Definition MutableCalorimeterHit.cc:95
friend class CalorimeterHitMutableCollectionIterator
Definition MutableCalorimeterHit.h:41
CalorimeterHitCollection collection_type
Definition MutableCalorimeterHit.h:46
void setTimeError(const float timeError)
Set the Error on the time.
Definition MutableCalorimeterHit.cc:78
float & timeError()
Get reference to Error on the time.
Definition MutableCalorimeterHit.cc:80
float & energyError()
Get reference to Error on energy [GeV].
Definition MutableCalorimeterHit.cc:74
float getTime() const
Access the The time of the hit in [ns].
Definition MutableCalorimeterHit.cc:50
std::uint64_t & cellID()
Get reference to The detector specific (geometrical) cell id.
Definition MutableCalorimeterHit.cc:68
friend class CalorimeterHitCollection
Definition MutableCalorimeterHit.h:40
bool operator!=(const MutableCalorimeterHit &other) const
Definition MutableCalorimeterHit.h:200
MutableCalorimeterHit & operator=(MutableCalorimeterHit other) &&=delete
bool isAvailable() const
check whether the object is actually available
Definition MutableCalorimeterHit.cc:107
float getEnergyError() const
Access the Error on energy [GeV].
Definition MutableCalorimeterHit.cc:49
void setLocal(const edm4hep::Vector3f &local)
Set the The local coordinates of the hit in the detector segment [mm].
Definition MutableCalorimeterHit.cc:93
podio::ObjectID id() const
Definition MutableCalorimeterHit.h:206
void setPosition(const edm4hep::Vector3f &position)
Set the The global position of the hit in world coordinates [mm].
Definition MutableCalorimeterHit.cc:81
friend class CalorimeterHit
Definition MutableCalorimeterHit.h:42
const edm4hep::RawCalorimeterHit getRawHit() const
Access the Related raw calorimeter hit.
Definition MutableCalorimeterHit.cc:58
void setEnergyError(const float energyError)
Set the Error on energy [GeV].
Definition MutableCalorimeterHit.cc:72
void setRawHit(const edm4hep::RawCalorimeterHit &value)
Set the Related raw calorimeter hit.
Definition MutableCalorimeterHit.cc:97
const edm4hep::Vector3f & getLocal() const
Access the The local coordinates of the hit in the detector segment [mm].
Definition MutableCalorimeterHit.cc:56
Definition CalorimeterHit.cc:17
Definition CalorimeterHit.h:25
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableCalorimeterHit &obj) const
Definition MutableCalorimeterHit.h:235