3#ifndef EDM4EIC_CherenkovParticleID_H
4#define EDM4EIC_CherenkovParticleID_H
10#include "podio/RelationRange.h"
13#include "podio/utilities/MaybeSharedPtr.h"
14#include "podio/detail/OrderKey.h"
19#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
20#include "nlohmann/json_fwd.hpp"
33OrderKey
getOrderKey(
const edm4eic::CherenkovParticleID& obj);
62 CherenkovParticleID(
const float npe,
const float refractiveIndex,
const float photonEnergy);
85 static constexpr std::string_view
typeName =
"edm4eic::CherenkovParticleID";
107 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator
hypotheses_begin()
const;
108 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator
hypotheses_end()
const;
109 podio::RelationRange<edm4eic::CherenkovParticleIDHypothesis>
getHypotheses()
const;
120 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CherenkovParticleIDObj>{
nullptr}; }
135 friend std::hash<CherenkovParticleID>;
139 swap(a.m_obj, b.m_obj);
147 podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> m_obj{
new CherenkovParticleIDObj{}, podio::utils::MarkOwned};
152#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
162struct std::hash<
edm4eic::CherenkovParticleID> {
164 return std::hash<edm4eic::CherenkovParticleIDObj*>{}(obj.m_obj.get());
172#if defined(__clang__)
173 #pragma clang diagnostic push
174 #pragma clang diagnostic ignored "-Wunknown-warning-option"
175 #pragma clang diagnostic ignored "-Wdeprecated-redundant-constexpr-static-def"
176 #pragma clang diagnostic ignored "-Wdeprecated"
178 #pragma clang diagnostic pop
179#elif defined(__GNUC__)
180 #pragma GCC diagnostic push
181 #pragma GCC diagnostic ignored "-Wdeprecated"
183 #pragma GCC diagnostic pop
Definition CherenkovParticleIDCollectionData.h:33
Definition CherenkovParticleIDCollection.h:138
Definition CherenkovParticleID.h:46
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_begin() const
Definition CherenkovParticleID.cc:100
float getNpe() const
Access the Overall photoelectron count.
Definition CherenkovParticleID.cc:87
CherenkovParticleIDCollection collection_type
Definition CherenkovParticleID.h:56
MutableCherenkovParticleID clone(bool cloneRelations=true) const
Definition CherenkovParticleID.cc:32
const edm4eic::TrackSegment getChargedParticle() const
Access the reconstructed charged particle.
Definition CherenkovParticleID.cc:91
podio::RelationRange< edm4eic::MCRecoTrackerHitAssociation > getRawHitAssociations() const
Definition CherenkovParticleID.cc:123
MutableCherenkovParticleID mutable_type
Definition CherenkovParticleID.h:55
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_end() const
Definition CherenkovParticleID.cc:170
CherenkovParticleID & operator=(CherenkovParticleID other) &
copy-assignment operator
Definition CherenkovParticleID.cc:27
CherenkovParticleID(const CherenkovParticleID &other)=default
copy constructor
podio::ObjectID id() const
Definition CherenkovParticleID.h:131
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_begin() const
Definition CherenkovParticleID.cc:164
std::size_t hypotheses_size() const
Definition CherenkovParticleID.cc:144
float getPhotonEnergy() const
Access the Average energy for these Cherenkov photons [GeV].
Definition CherenkovParticleID.cc:89
~CherenkovParticleID()=default
destructor
friend class CherenkovParticleIDCollectionIterator
Definition CherenkovParticleID.h:51
const podio::ObjectID getObjectID() const
Definition CherenkovParticleID.cc:203
CherenkovParticleID()=default
default constructor
static constexpr std::string_view typeName
Definition CherenkovParticleID.h:85
friend void swap(CherenkovParticleID &a, CherenkovParticleID &b)
Definition CherenkovParticleID.h:137
bool isAvailable() const
check whether the object is actually available
Definition CherenkovParticleID.cc:199
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_end() const
Definition CherenkovParticleID.cc:106
CherenkovParticleID & operator=(CherenkovParticleID other) &&=delete
void unlink()
disconnect from CherenkovParticleIDObj instance
Definition CherenkovParticleID.h:120
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_end() const
Definition CherenkovParticleID.cc:138
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_begin() const
Definition CherenkovParticleID.cc:132
friend class MutableCherenkovParticleID
Definition CherenkovParticleID.h:48
bool operator<(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:129
friend class CherenkovParticleIDCollection
Definition CherenkovParticleID.h:49
static CherenkovParticleID makeEmpty()
Definition CherenkovParticleID.cc:83
podio::RelationRange< edm4hep::Vector2f > getThetaPhiPhotons() const
Definition CherenkovParticleID.cc:187
bool operator!=(const MutableCherenkovParticleID &other) const
Definition CherenkovParticleID.h:126
bool operator!=(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:125
bool operator==(const CherenkovParticleID &other) const
Definition CherenkovParticleID.h:122
podio::RelationRange< edm4eic::CherenkovParticleIDHypothesis > getHypotheses() const
Definition CherenkovParticleID.cc:155
float getRefractiveIndex() const
Access the Average refractive index at the Cherenkov photons' vertices.
Definition CherenkovParticleID.cc:88
std::size_t rawHitAssociations_size() const
Definition CherenkovParticleID.cc:112
std::size_t thetaPhiPhotons_size() const
Definition CherenkovParticleID.cc:176
Definition CherenkovParticleIDHypothesis.h:20
Definition CherenkovParticleIDObj.h:26
Definition MCRecoTrackerHitAssociation.h:46
Definition MutableCherenkovParticleID.h:38
Definition MutableTrackSegment.h:37
Definition TrackSegment.h:45
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:99
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::CherenkovParticleID &obj) const
Definition CherenkovParticleID.h:163