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"
48 MutablePMTHit(
const std::uint64_t cellID,
const float npe,
const float time,
const float timeError,
const edm4hep::Vector3f& position,
const edm4hep::Vector3f& dimension,
const std::int32_t sector,
const edm4hep::Vector3f& local);
92 const edm4hep::Vector3f&
getLocal()
const;
97 void setCellID(
const std::uint64_t cellID);
102 void setNpe(
const float npe);
107 void setTime(
const float time);
117 void setPosition(
const edm4hep::Vector3f& position);
127 void setSector(
const std::int32_t sector);
132 void setLocal(
const edm4hep::Vector3f& local);
144 void unlink() { m_obj = podio::utils::MaybeSharedPtr<PMTHitObj>{
nullptr}; }
159 friend std::hash<MutablePMTHit>;
163 swap(a.m_obj, b.m_obj);
168 explicit MutablePMTHit(podio::utils::MaybeSharedPtr<PMTHitObj> obj);
170 podio::utils::MaybeSharedPtr<PMTHitObj> m_obj{
new PMTHitObj{}, podio::utils::MarkOwned};
173#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
185 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:77
MutablePMTHit clone(bool cloneRelations=true) const
Definition MutablePMTHit.cc:34
bool operator!=(const PMTHit &other) const
Definition MutablePMTHit.h:150
void setTime(const float time)
Set the Time [ns].
Definition MutablePMTHit.cc:58
const edm4hep::Vector3f & getPosition() const
Access the PMT hit position [mm].
Definition MutablePMTHit.cc:48
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:66
MutablePMTHit & operator=(MutablePMTHit other) &&=delete
const edm4hep::Vector3f & getDimension() const
Access the The dimension information of the pixel [mm].
Definition MutablePMTHit.cc:49
std::int32_t getSector() const
Access the The sector this hit occurred in.
Definition MutablePMTHit.cc:50
MutablePMTHit()=default
default constructor
~MutablePMTHit()=default
destructor
void setDimension(const edm4hep::Vector3f &dimension)
Set the The dimension information of the pixel [mm].
Definition MutablePMTHit.cc:64
PMTHit object_type
Definition MutablePMTHit.h:41
float getNpe() const
Access the Estimated number of photo-electrons [#].
Definition MutablePMTHit.cc:45
void setPosition(const edm4hep::Vector3f &position)
Set the PMT hit position [mm].
Definition MutablePMTHit.cc:62
MutablePMTHit(const MutablePMTHit &other) noexcept=default
copy constructor
float getTimeError() const
Access the Error on the time [ns].
Definition MutablePMTHit.cc:47
friend class PMTHit
Definition MutablePMTHit.h:38
PMTHitCollection collection_type
Definition MutablePMTHit.h:42
podio::ObjectID id() const
Definition MutablePMTHit.h:155
constexpr bool operator==(const MutablePMTHit &other) const
Definition MutablePMTHit.h:146
const edm4hep::Vector3f & getLocal() const
Access the The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition MutablePMTHit.cc:51
MutablePMTHit(MutablePMTHit &&other) noexcept=default
move constructor
float getTime() const
Access the Time [ns].
Definition MutablePMTHit.cc:46
void setTimeError(const float timeError)
Set the Error on the time [ns].
Definition MutablePMTHit.cc:60
bool operator<(const MutablePMTHit &other) const
Definition MutablePMTHit.h:153
const podio::ObjectID getObjectID() const
Definition MutablePMTHit.cc:81
MutablePMTHit & operator=(MutablePMTHit other) &
copy-assignment operator
Definition MutablePMTHit.cc:29
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:68
friend class PMTHitMutableCollectionIterator
Definition MutablePMTHit.h:37
friend void swap(MutablePMTHit &a, MutablePMTHit &b)
Definition MutablePMTHit.h:161
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition MutablePMTHit.cc:44
void setNpe(const float npe)
Set the Estimated number of photo-electrons [#].
Definition MutablePMTHit.cc:56
void setCellID(const std::uint64_t cellID)
Set the The detector specific (geometrical) cell id.
Definition MutablePMTHit.cc:54
constexpr bool operator!=(const MutablePMTHit &other) const
Definition MutablePMTHit.h:149
void unlink()
disconnect from PMTHitObj instance
Definition MutablePMTHit.h:144
Definition PMTHitCollection.h:139
Definition PMTHitObj.h:17
Definition ArrowMapper.cc:63
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutablePMTHit &obj) const
Definition MutablePMTHit.h:184