3#ifndef EDM4EIC_PMTHit_H
4#define EDM4EIC_PMTHit_H
8#include "edm4hep/Vector3f.h"
11#include "podio/utilities/MaybeSharedPtr.h"
16#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
17#include "nlohmann/json_fwd.hpp"
25class PMTHitCollection;
26class PMTHitCollectionData;
47 PMTHit(std::uint64_t cellID,
float npe,
float time,
float timeError, edm4hep::Vector3f position, edm4hep::Vector3f dimension, std::int32_t sector, edm4hep::Vector3f local);
88 const edm4hep::Vector3f&
getLocal()
const;
97 void unlink() { m_obj = podio::utils::MaybeSharedPtr<PMTHitObj>{
nullptr}; }
111 swap(a.m_obj, b.m_obj);
116 explicit PMTHit(podio::utils::MaybeSharedPtr<PMTHitObj> obj);
119 podio::utils::MaybeSharedPtr<PMTHitObj> m_obj{
nullptr};
122std::ostream&
operator<<(std::ostream& o,
const PMTHit& value);
124#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
125void to_json(nlohmann::json& j,
const PMTHit& value);
Definition MutablePMTHit.h:31
Definition PMTHitCollectionData.h:30
Definition PMTHitCollection.h:95
Definition PMTHitCollection.h:40
void unlink()
disconnect from PMTHitObj instance
Definition PMTHit.h:97
MutablePMTHit clone() const
create a mutable deep-copy of the object with identical relations
Definition PMTHit.cc:41
float getNpe() const
Access the Estimated number of photo-electrons [#].
Definition PMTHit.cc:54
PMTHit()
default constructor
Definition PMTHit.cc:21
bool operator<(const PMTHit &other) const
Definition PMTHit.h:103
friend class PMTHitCollection
Definition PMTHit.h:35
friend class MutablePMTHit
Definition PMTHit.h:34
const edm4hep::Vector3f & getDimension() const
Access the The dimension information of the pixel [mm].
Definition PMTHit.cc:58
PMTHit & operator=(PMTHit other)
copy-assignment operator
Definition PMTHit.cc:36
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition PMTHit.cc:53
friend void swap(PMTHit &a, PMTHit &b)
Definition PMTHit.h:109
const edm4hep::Vector3f & getLocal() const
Access the The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition PMTHit.cc:60
~PMTHit()=default
destructor
float getTime() const
Access the Time [ns].
Definition PMTHit.cc:55
const podio::ObjectID getObjectID() const
Definition PMTHit.cc:74
const edm4hep::Vector3f & getPosition() const
Access the PMT hit position [mm].
Definition PMTHit.cc:57
float getTimeError() const
Access the Error on the time [ns].
Definition PMTHit.cc:56
PMTHit(const PMTHit &other)=default
copy constructor
static PMTHit makeEmpty()
Definition PMTHit.cc:49
podio::ObjectID id() const
Definition PMTHit.h:105
bool isAvailable() const
check whether the object is actually available
Definition PMTHit.cc:67
bool operator==(const PMTHit &other) const
Definition PMTHit.h:99
std::int32_t getSector() const
Access the The sector this hit occurred in.
Definition PMTHit.cc:59
Definition PMTHitObj.h:17
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97