3#ifndef EDM4EIC_PMTHit_H
4#define EDM4EIC_PMTHit_H
8#include "edm4hep/Vector3f.h"
11#include "podio/utilities/MaybeSharedPtr.h"
12#include "podio/detail/OrderKey.h"
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
58 PMTHit(
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);
81 static constexpr std::string_view
typeName =
"edm4eic::PMTHit";
105 const edm4hep::Vector3f&
getLocal()
const;
114 void unlink() { m_obj = podio::utils::MaybeSharedPtr<PMTHitObj>{
nullptr}; }
129 friend std::hash<PMTHit>;
133 swap(a.m_obj, b.m_obj);
138 explicit PMTHit(podio::utils::MaybeSharedPtr<PMTHitObj> obj);
141 podio::utils::MaybeSharedPtr<PMTHitObj> m_obj{
nullptr};
146#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
147void to_json(nlohmann::json& j,
const PMTHit& value);
158 return std::hash<edm4eic::PMTHitObj*>{}(obj.m_obj.get());
166#if defined(__clang__)
167#pragma clang diagnostic push
168#pragma clang diagnostic ignored "-Wunknown-warning-option"
169#pragma clang diagnostic ignored "-Wdeprecated-redundant-constexpr-static-def"
170#pragma clang diagnostic ignored "-Wdeprecated"
172#pragma clang diagnostic pop
173#elif defined(__GNUC__)
174#pragma GCC diagnostic push
175#pragma GCC diagnostic ignored "-Wdeprecated"
177#pragma GCC diagnostic pop
Definition MutablePMTHit.h:34
Definition PMTHitCollectionData.h:30
Definition PMTHitCollection.h:137
void unlink()
disconnect from PMTHitObj instance
Definition PMTHit.h:114
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
PMTHit & operator=(PMTHit other) &
copy-assignment operator
Definition PMTHit.cc:35
bool operator<(const PMTHit &other) const
Definition PMTHit.h:123
friend class PMTHitCollection
Definition PMTHit.h:45
friend class MutablePMTHit
Definition PMTHit.h:44
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:119
MutablePMTHit mutable_type
Definition PMTHit.h:51
std::uint64_t getCellID() const
Access the The detector specific (geometrical) cell id.
Definition PMTHit.cc:59
static constexpr std::string_view typeName
Definition PMTHit.h:81
friend void swap(PMTHit &a, PMTHit &b)
Definition PMTHit.h:131
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
friend class PMTHitCollectionIterator
Definition PMTHit.h:47
const podio::ObjectID getObjectID() const
Definition PMTHit.cc:77
bool operator!=(const MutablePMTHit &other) const
Definition PMTHit.h:120
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
PMTHitCollection collection_type
Definition PMTHit.h:52
PMTHit(const PMTHit &other)=default
copy constructor
static PMTHit makeEmpty()
Definition PMTHit.cc:55
PMTHit & operator=(PMTHit other) &&=delete
podio::ObjectID id() const
Definition PMTHit.h:125
bool isAvailable() const
check whether the object is actually available
Definition PMTHit.cc:73
bool operator==(const PMTHit &other) const
Definition PMTHit.h:116
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
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150
std::size_t operator()(const edm4eic::PMTHit &obj) const
Definition PMTHit.h:157