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);
91 const edm4hep::Vector3f&
getLocal()
const;
100 void unlink() { m_obj = podio::utils::MaybeSharedPtr<PMTHitObj>{
nullptr}; }
117 swap(a.m_obj, b.m_obj);
122 explicit PMTHit(podio::utils::MaybeSharedPtr<PMTHitObj> obj);
125 podio::utils::MaybeSharedPtr<PMTHitObj> m_obj{
nullptr};
128std::ostream&
operator<<(std::ostream& o,
const PMTHit& value);
130#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
131void to_json(nlohmann::json& j,
const PMTHit& value);
Definition MutablePMTHit.h:30
Definition PMTHitCollectionData.h:30
Definition PMTHitCollection.h:92
Definition PMTHitCollection.h:37
void unlink()
disconnect from PMTHitObj instance
Definition PMTHit.h:100
float getNpe() const
Access the Estimated number of photo-electrons [#].
Definition PMTHit.cc:60
MutablePMTHit clone(bool cloneRelations=true) const
Definition PMTHit.cc:40
PMTHit()
default constructor
Definition PMTHit.cc:20
bool operator<(const PMTHit &other) const
Definition PMTHit.h:109
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:64
bool operator!=(const PMTHit &other) const
Definition PMTHit.h:105
PMTHit & operator=(PMTHit other)
copy-assignment operator
Definition PMTHit.cc:35
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition PMTHit.cc:59
friend void swap(PMTHit &a, PMTHit &b)
Definition PMTHit.h:115
const edm4hep::Vector3f & getLocal() const
Access the The local position of the hit in detector coordinates (relative to the sector) [mm].
Definition PMTHit.cc:66
~PMTHit()=default
destructor
float getTime() const
Access the Time [ns].
Definition PMTHit.cc:61
const podio::ObjectID getObjectID() const
Definition PMTHit.cc:77
bool operator!=(const MutablePMTHit &other) const
Definition PMTHit.h:106
const edm4hep::Vector3f & getPosition() const
Access the PMT hit position [mm].
Definition PMTHit.cc:63
float getTimeError() const
Access the Error on the time [ns].
Definition PMTHit.cc:62
PMTHit(const PMTHit &other)=default
copy constructor
static PMTHit makeEmpty()
Definition PMTHit.cc:55
podio::ObjectID id() const
Definition PMTHit.h:111
bool isAvailable() const
check whether the object is actually available
Definition PMTHit.cc:73
bool operator==(const PMTHit &other) const
Definition PMTHit.h:102
std::int32_t getSector() const
Access the The sector this hit occurred in.
Definition PMTHit.cc:65
Definition PMTHitObj.h:17
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103