3#ifndef EDM4EIC_MutablePMTHit_H
4#define EDM4EIC_MutablePMTHit_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"
89 const edm4hep::Vector3f&
getLocal()
const;
98 [[deprecated(
"use getCellID instead")]]
106 [[deprecated(
"use getNpe instead")]]
114 [[deprecated(
"use getTime instead")]]
122 [[deprecated(
"use getTimeError instead")]]
130 [[deprecated(
"use getPosition instead")]]
138 [[deprecated(
"use getDimension instead")]]
146 [[deprecated(
"use getSector instead")]]
154 [[deprecated(
"use getLocal instead")]]
155 edm4hep::Vector3f&
local();
165 void unlink() { m_obj = podio::utils::MaybeSharedPtr<PMTHitObj>{
nullptr}; }
180 friend std::hash<MutablePMTHit>;
184 swap(a.m_obj, b.m_obj);
189 explicit MutablePMTHit(podio::utils::MaybeSharedPtr<PMTHitObj> obj);
191 podio::utils::MaybeSharedPtr<PMTHitObj> m_obj{
nullptr};
194#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
206 return std::hash<edm4eic::PMTHitObj*>{}(obj.m_obj.get());
Definition MutablePMTHit.h:34
bool isAvailable() const
check whether the object is actually available
Definition MutablePMTHit.cc:89
MutablePMTHit clone(bool cloneRelations=true) const
Definition MutablePMTHit.cc:38
bool operator!=(const PMTHit &other) const
Definition MutablePMTHit.h:171
void setTime(const float time)
Set the Time [ns].
Definition MutablePMTHit.cc:64
const edm4hep::Vector3f & getPosition() const
Access the PMT hit position [mm].
Definition MutablePMTHit.cc:52
bool operator!=(const MutablePMTHit &other) const
Definition MutablePMTHit.h:170
friend class PMTHitCollection
Definition MutablePMTHit.h:36
void setSector(const std::int32_t sector)
Set the The sector this hit occurred in.
Definition MutablePMTHit.cc:76
MutablePMTHit & operator=(MutablePMTHit other) &&=delete
const edm4hep::Vector3f & getDimension() const
Access the The dimension information of the pixel [mm].
Definition MutablePMTHit.cc:53
std::int32_t getSector() const
Access the The sector this hit occurred in.
Definition MutablePMTHit.cc:54
float & npe()
Get reference to Estimated number of photo-electrons [#].
Definition MutablePMTHit.cc:63
~MutablePMTHit()=default
destructor
void setDimension(const edm4hep::Vector3f &dimension)
Set the The dimension information of the pixel [mm].
Definition MutablePMTHit.cc:73
PMTHit object_type
Definition MutablePMTHit.h:41
MutablePMTHit()
default constructor
Definition MutablePMTHit.cc:18
float getNpe() const
Access the Estimated number of photo-electrons [#].
Definition MutablePMTHit.cc:49
bool operator==(const MutablePMTHit &other) const
Definition MutablePMTHit.h:167
void setPosition(const edm4hep::Vector3f &position)
Set the PMT hit position [mm].
Definition MutablePMTHit.cc:70
std::int32_t & sector()
Get reference to The sector this hit occurred in.
Definition MutablePMTHit.cc:78
edm4hep::Vector3f & local()
Get reference to The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition MutablePMTHit.cc:81
float getTimeError() const
Access the Error on the time [ns].
Definition MutablePMTHit.cc:51
friend class PMTHit
Definition MutablePMTHit.h:38
PMTHitCollection collection_type
Definition MutablePMTHit.h:42
float & time()
Get reference to Time [ns].
Definition MutablePMTHit.cc:66
podio::ObjectID id() const
Definition MutablePMTHit.h:176
const edm4hep::Vector3f & getLocal() const
Access the The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition MutablePMTHit.cc:55
float getTime() const
Access the Time [ns].
Definition MutablePMTHit.cc:50
void setTimeError(const float timeError)
Set the Error on the time [ns].
Definition MutablePMTHit.cc:67
edm4hep::Vector3f & position()
Get reference to PMT hit position [mm].
Definition MutablePMTHit.cc:72
bool operator<(const MutablePMTHit &other) const
Definition MutablePMTHit.h:174
const podio::ObjectID getObjectID() const
Definition MutablePMTHit.cc:93
MutablePMTHit & operator=(MutablePMTHit other) &
copy-assignment operator
Definition MutablePMTHit.cc:33
void setLocal(const edm4hep::Vector3f &local)
Set the The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition MutablePMTHit.cc:79
friend class PMTHitMutableCollectionIterator
Definition MutablePMTHit.h:37
edm4hep::Vector3f & dimension()
Get reference to The dimension information of the pixel [mm].
Definition MutablePMTHit.cc:75
std::uint64_t & cellID()
Get reference to The detector specific (geometrical) cell id.
Definition MutablePMTHit.cc:60
friend void swap(MutablePMTHit &a, MutablePMTHit &b)
Definition MutablePMTHit.h:182
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition MutablePMTHit.cc:48
void setNpe(const float npe)
Set the Estimated number of photo-electrons [#].
Definition MutablePMTHit.cc:61
MutablePMTHit(const MutablePMTHit &other)=default
copy constructor
void setCellID(const std::uint64_t cellID)
Set the The detector specific (geometrical) cell id.
Definition MutablePMTHit.cc:58
float & timeError()
Get reference to Error on the time [ns].
Definition MutablePMTHit.cc:69
void unlink()
disconnect from PMTHitObj instance
Definition MutablePMTHit.h:165
Definition PMTHitCollection.h:137
Definition CalorimeterHit.cc:17
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150
std::size_t operator()(const edm4eic::MutablePMTHit &obj) const
Definition MutablePMTHit.h:205