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"
84 const edm4hep::Vector3f&
getLocal()
const;
93 [[deprecated(
"use getCellID instead")]]
101 [[deprecated(
"use getNpe instead")]]
109 [[deprecated(
"use getTime instead")]]
117 [[deprecated(
"use getTimeError instead")]]
125 [[deprecated(
"use getPosition instead")]]
133 [[deprecated(
"use getDimension instead")]]
141 [[deprecated(
"use getSector instead")]]
145 void setLocal(edm4hep::Vector3f value);
149 [[deprecated(
"use getLocal instead")]]
150 edm4hep::Vector3f&
local();
160 void unlink() { m_obj = podio::utils::MaybeSharedPtr<PMTHitObj>{
nullptr}; }
177 swap(a.m_obj, b.m_obj);
182 explicit MutablePMTHit(podio::utils::MaybeSharedPtr<PMTHitObj> obj);
184 podio::utils::MaybeSharedPtr<PMTHitObj> m_obj{
nullptr};
187#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
188void to_json(nlohmann::json& j,
const MutablePMTHit& value);
Definition MutablePMTHit.h:30
bool isAvailable() const
check whether the object is actually available
Definition MutablePMTHit.cc:89
MutablePMTHit clone(bool cloneRelations=true) const
Definition MutablePMTHit.cc:38
void setLocal(edm4hep::Vector3f value)
Set the The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition MutablePMTHit.cc:79
bool operator!=(const PMTHit &other) const
Definition MutablePMTHit.h:166
void setDimension(edm4hep::Vector3f value)
Set the The dimension information of the pixel [mm].
Definition MutablePMTHit.cc:73
const edm4hep::Vector3f & getPosition() const
Access the PMT hit position [mm].
Definition MutablePMTHit.cc:52
bool operator!=(const MutablePMTHit &other) const
Definition MutablePMTHit.h:165
MutablePMTHit & operator=(MutablePMTHit other)
copy-assignment operator
Definition MutablePMTHit.cc:33
friend class PMTHitCollection
Definition MutablePMTHit.h:32
void setNpe(float value)
Set the Estimated number of photo-electrons [#].
Definition MutablePMTHit.cc:61
void setTime(float value)
Set the Time [ns].
Definition MutablePMTHit.cc:64
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 setCellID(std::uint64_t value)
Set the The detector specific (geometrical) cell id.
Definition MutablePMTHit.cc:58
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:162
void setTimeError(float value)
Set the Error on the time [ns].
Definition MutablePMTHit.cc:67
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:34
void setPosition(edm4hep::Vector3f value)
Set the PMT hit position [mm].
Definition MutablePMTHit.cc:70
float & time()
Get reference to Time [ns].
Definition MutablePMTHit.cc:66
podio::ObjectID id() const
Definition MutablePMTHit.h:171
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
edm4hep::Vector3f & position()
Get reference to PMT hit position [mm].
Definition MutablePMTHit.cc:72
bool operator<(const MutablePMTHit &other) const
Definition MutablePMTHit.h:169
const podio::ObjectID getObjectID() const
Definition MutablePMTHit.cc:93
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
void setSector(std::int32_t value)
Set the The sector this hit occurred in.
Definition MutablePMTHit.cc:76
friend void swap(MutablePMTHit &a, MutablePMTHit &b)
Definition MutablePMTHit.h:175
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition MutablePMTHit.cc:48
MutablePMTHit(const MutablePMTHit &other)=default
copy constructor
float & timeError()
Get reference to Error on the time [ns].
Definition MutablePMTHit.cc:69
void unlink()
disconnect from PMTHitObj instance
Definition MutablePMTHit.h:160
Definition PMTHitCollection.h:92
Definition PMTHitCollection.h:63
Definition CalorimeterHit.cc:17