3#ifndef EDM4EIC_MutableCherenkovParticleID_H
4#define EDM4EIC_MutableCherenkovParticleID_H
12#include "podio/RelationRange.h"
15#include "podio/utilities/MaybeSharedPtr.h"
19#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
20#include "nlohmann/json_fwd.hpp"
89 [[deprecated(
"use getNpe instead")]]
97 [[deprecated(
"use getRefractiveIndex instead")]]
105 [[deprecated(
"use getPhotonEnergy instead")]]
121 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator
hypotheses_begin()
const;
122 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator
hypotheses_end()
const;
123 podio::RelationRange<edm4eic::CherenkovParticleIDHypothesis>
getHypotheses()
const;
136 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CherenkovParticleIDObj>{
nullptr}; }
151 friend std::hash<MutableCherenkovParticleID>;
155 swap(a.m_obj, b.m_obj);
162 podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> m_obj{
new CherenkovParticleIDObj{}, podio::utils::MarkOwned};
165#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
175struct std::hash<
edm4eic::MutableCherenkovParticleID> {
177 return std::hash<edm4eic::CherenkovParticleIDObj*>{}(obj.m_obj.get());
Definition CherenkovParticleIDCollection.h:138
Definition CherenkovParticleID.h:46
Definition CherenkovParticleIDHypothesis.h:20
Definition CherenkovParticleIDObj.h:26
Definition MCRecoTrackerHitAssociation.h:46
Definition MutableCherenkovParticleID.h:38
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_begin() const
Definition MutableCherenkovParticleID.cc:117
bool operator!=(const MutableCherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:141
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_begin() const
Definition MutableCherenkovParticleID.cc:153
const podio::ObjectID getObjectID() const
Definition MutableCherenkovParticleID.cc:193
float getPhotonEnergy() const
Access the Average energy for these Cherenkov photons [GeV].
Definition MutableCherenkovParticleID.cc:51
void setPhotonEnergy(const float photonEnergy)
Set the Average energy for these Cherenkov photons [GeV].
Definition MutableCherenkovParticleID.cc:67
float & photonEnergy()
Get reference to Average energy for these Cherenkov photons [GeV].
Definition MutableCherenkovParticleID.cc:69
bool operator<(const MutableCherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:145
void setChargedParticle(const edm4eic::TrackSegment &value)
Set the reconstructed charged particle.
Definition MutableCherenkovParticleID.cc:71
friend class CherenkovParticleID
Definition MutableCherenkovParticleID.h:42
float getRefractiveIndex() const
Access the Average refractive index at the Cherenkov photons' vertices.
Definition MutableCherenkovParticleID.cc:50
~MutableCherenkovParticleID()=default
destructor
podio::RelationRange< edm4hep::Vector2f > getThetaPhiPhotons() const
Definition MutableCherenkovParticleID.cc:176
MutableCherenkovParticleID & operator=(MutableCherenkovParticleID other) &&=delete
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_end() const
Definition MutableCherenkovParticleID.cc:123
void addToThetaPhiPhotons(const edm4hep::Vector2f &)
Definition MutableCherenkovParticleID.cc:148
friend class CherenkovParticleIDMutableCollectionIterator
Definition MutableCherenkovParticleID.h:41
MutableCherenkovParticleID(const MutableCherenkovParticleID &other)=default
copy constructor
std::size_t thetaPhiPhotons_size() const
Definition MutableCherenkovParticleID.cc:165
const edm4eic::TrackSegment getChargedParticle() const
Access the reconstructed charged particle.
Definition MutableCherenkovParticleID.cc:53
MutableCherenkovParticleID()=default
default constructor
bool isAvailable() const
check whether the object is actually available
Definition MutableCherenkovParticleID.cc:189
void setRefractiveIndex(const float refractiveIndex)
Set the Average refractive index at the Cherenkov photons' vertices.
Definition MutableCherenkovParticleID.cc:64
float & refractiveIndex()
Get reference to Average refractive index at the Cherenkov photons' vertices.
Definition MutableCherenkovParticleID.cc:66
bool operator!=(const CherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:142
podio::RelationRange< edm4eic::CherenkovParticleIDHypothesis > getHypotheses() const
Definition MutableCherenkovParticleID.cc:140
friend void swap(MutableCherenkovParticleID &a, MutableCherenkovParticleID &b)
Definition MutableCherenkovParticleID.h:153
void addToHypotheses(const edm4eic::CherenkovParticleIDHypothesis &)
Definition MutableCherenkovParticleID.cc:112
MutableCherenkovParticleID clone(bool cloneRelations=true) const
Definition MutableCherenkovParticleID.cc:30
void unlink()
disconnect from CherenkovParticleIDObj instance
Definition MutableCherenkovParticleID.h:136
void addToRawHitAssociations(const edm4eic::MCRecoTrackerHitAssociation &)
Definition MutableCherenkovParticleID.cc:76
std::size_t rawHitAssociations_size() const
Definition MutableCherenkovParticleID.cc:93
friend class CherenkovParticleIDCollection
Definition MutableCherenkovParticleID.h:40
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_end() const
Definition MutableCherenkovParticleID.cc:87
float getNpe() const
Access the Overall photoelectron count.
Definition MutableCherenkovParticleID.cc:49
float & npe()
Get reference to Overall photoelectron count.
Definition MutableCherenkovParticleID.cc:63
std::size_t hypotheses_size() const
Definition MutableCherenkovParticleID.cc:129
MutableCherenkovParticleID & operator=(MutableCherenkovParticleID other) &
copy-assignment operator
Definition MutableCherenkovParticleID.cc:25
podio::ObjectID id() const
Definition MutableCherenkovParticleID.h:147
CherenkovParticleIDCollection collection_type
Definition MutableCherenkovParticleID.h:46
CherenkovParticleID object_type
Definition MutableCherenkovParticleID.h:45
podio::RelationRange< edm4eic::MCRecoTrackerHitAssociation > getRawHitAssociations() const
Definition MutableCherenkovParticleID.cc:104
void setNpe(const float npe)
Set the Overall photoelectron count.
Definition MutableCherenkovParticleID.cc:61
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_end() const
Definition MutableCherenkovParticleID.cc:159
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_begin() const
Definition MutableCherenkovParticleID.cc:81
bool operator==(const MutableCherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:138
Definition MutableTrackSegment.h:37
Definition TrackSegment.h:45
Definition CalorimeterHit.cc:17
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:146
std::size_t operator()(const edm4eic::MutableCherenkovParticleID &obj) const
Definition MutableCherenkovParticleID.h:176