3#ifndef EDM4EIC_MutablePMTHit_H
4#define EDM4EIC_MutablePMTHit_H
10#include "edm4hep/Vector3f.h"
13#include "podio/utilities/MaybeSharedPtr.h"
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
45 MutablePMTHit(std::uint64_t cellID,
float npe,
float time,
float timeError, edm4hep::Vector3f
position, edm4hep::Vector3f
dimension, std::int32_t sector, edm4hep::Vector3f
local);
87 const edm4hep::Vector3f&
getLocal()
const;
117 void setLocal(edm4hep::Vector3f value);
119 edm4hep::Vector3f&
local();
129 void unlink() { m_obj = podio::utils::MaybeSharedPtr<PMTHitObj>{
nullptr}; }
143 swap(a.m_obj, b.m_obj);
148 explicit MutablePMTHit(podio::utils::MaybeSharedPtr<PMTHitObj> obj);
150 podio::utils::MaybeSharedPtr<PMTHitObj> m_obj{
nullptr};
153#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
154void to_json(nlohmann::json& j,
const MutablePMTHit& value);
Definition MutablePMTHit.h:31
bool isAvailable() const
check whether the object is actually available
Definition MutablePMTHit.cc:76
void setLocal(edm4hep::Vector3f value)
Set the The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition MutablePMTHit.cc:67
void setDimension(edm4hep::Vector3f value)
Set the The dimension information of the pixel [mm].
Definition MutablePMTHit.cc:64
const edm4hep::Vector3f & getPosition() const
Access the PMT hit position [mm].
Definition MutablePMTHit.cc:52
MutablePMTHit & operator=(MutablePMTHit other)
copy-assignment operator
Definition MutablePMTHit.cc:36
friend class PMTHitCollection
Definition MutablePMTHit.h:33
void setNpe(float value)
Set the Estimated number of photo-electrons [#].
Definition MutablePMTHit.cc:59
void setTime(float value)
Set the Time [ns].
Definition MutablePMTHit.cc:60
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
~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:21
float getNpe() const
Access the Estimated number of photo-electrons [#].
Definition MutablePMTHit.cc:49
bool operator==(const MutablePMTHit &other) const
Definition MutablePMTHit.h:131
void setTimeError(float value)
Set the Error on the time [ns].
Definition MutablePMTHit.cc:61
edm4hep::Vector3f & local()
Get reference to The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition MutablePMTHit.cc:68
MutablePMTHit clone() const
create a mutable deep-copy of the object with identical relations
Definition MutablePMTHit.cc:41
float getTimeError() const
Access the Error on the time [ns].
Definition MutablePMTHit.cc:51
friend class PMTHit
Definition MutablePMTHit.h:35
void setPosition(edm4hep::Vector3f value)
Set the PMT hit position [mm].
Definition MutablePMTHit.cc:62
podio::ObjectID id() const
Definition MutablePMTHit.h:137
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:63
bool operator<(const MutablePMTHit &other) const
Definition MutablePMTHit.h:135
const podio::ObjectID getObjectID() const
Definition MutablePMTHit.cc:83
edm4hep::Vector3f & dimension()
Get reference to The dimension information of the pixel [mm].
Definition MutablePMTHit.cc:65
void setSector(std::int32_t value)
Set the The sector this hit occurred in.
Definition MutablePMTHit.cc:66
friend void swap(MutablePMTHit &a, MutablePMTHit &b)
Definition MutablePMTHit.h:141
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition MutablePMTHit.cc:48
MutablePMTHit(const MutablePMTHit &other)=default
copy constructor
void unlink()
disconnect from PMTHitObj instance
Definition MutablePMTHit.h:129
Definition PMTHitCollection.h:95
Definition PMTHitCollection.h:66
Definition CalorimeterHit.cc:18