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);
89 const edm4hep::Vector3f&
getLocal()
const;
94 void setCellID(
const std::uint64_t cellID);
99 void setNpe(
const float npe);
104 void setTime(
const float time);
114 void setPosition(
const edm4hep::Vector3f& position);
124 void setSector(
const std::int32_t sector);
129 void setLocal(
const edm4hep::Vector3f& local);
141 void unlink() { m_obj = podio::utils::MaybeSharedPtr<PMTHitObj>{
nullptr}; }
156 friend std::hash<MutablePMTHit>;
160 swap(a.m_obj, b.m_obj);
165 explicit MutablePMTHit(podio::utils::MaybeSharedPtr<PMTHitObj> obj);
167 podio::utils::MaybeSharedPtr<PMTHitObj> m_obj{
new PMTHitObj{}, podio::utils::MarkOwned};
170#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
182 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:147
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
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:152
constexpr bool operator==(const MutablePMTHit &other) const
Definition MutablePMTHit.h:143
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
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:150
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:158
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
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:54
constexpr bool operator!=(const MutablePMTHit &other) const
Definition MutablePMTHit.h:146
void unlink()
disconnect from PMTHitObj instance
Definition MutablePMTHit.h:141
Definition PMTHitCollection.h:139
Definition PMTHitObj.h:17
Definition ArrowMapper.cc:61
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutablePMTHit &obj) const
Definition MutablePMTHit.h:181