EDM4eic
EIC data model
Loading...
Searching...
No Matches
MutableCherenkovParticleID.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_MutableCherenkovParticleID_H
4#define EDM4EIC_MutableCherenkovParticleID_H
5
7// Make the immutable class available from its mutable version but not vice versa
9
12#include "podio/RelationRange.h"
13#include <vector>
14
15#include "podio/utilities/MaybeSharedPtr.h"
16
17#include <cstdint>
18
19#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
20#include "nlohmann/json_fwd.hpp"
21#endif
22
23// forward declarations
24namespace edm4eic {
25class TrackSegment;
26class MutableTrackSegment;
27}
28
29
30namespace edm4eic {
31
32
33/** @class MutableCherenkovParticleID
34 * Cherenkov detector PID
35 * @author: A. Kiselev, C. Chatterjee, C. Dilks
36 */
38
41 friend class CherenkovParticleID;
42
43public:
46
47 /// default constructor
49
50 /// Constructor initializing all members
52
53 /// copy constructor
55
56 /// copy-assignment operator
58
59 /// create a mutable deep-copy of the object with identical relations
60 /// if cloneRelations=false, the relations are not cloned and will be empty
61 MutableCherenkovParticleID clone(bool cloneRelations=true) const;
62
63 /// destructor
65
66
67public:
68
69 /// Access the Overall photoelectron count
70 float getNpe() const;
71
72 /// Access the Average refractive index at the Cherenkov photons' vertices
73 float getRefractiveIndex() const;
74
75 /// Access the Average energy for these Cherenkov photons [GeV]
76 float getPhotonEnergy() const;
77
78
79 /// Access the reconstructed charged particle
81
82 /// Set the Overall photoelectron count
83 void setNpe(float value);
84 /// Get mutable reference to Overall photoelectron count
85 float& getNpe();
86 /// Get reference to Overall photoelectron count
87 [[deprecated("use getNpe instead")]]
88 float& npe();
89
90 /// Set the Average refractive index at the Cherenkov photons' vertices
91 void setRefractiveIndex(float value);
92 /// Get mutable reference to Average refractive index at the Cherenkov photons' vertices
93 float& getRefractiveIndex();
94 /// Get reference to Average refractive index at the Cherenkov photons' vertices
95 [[deprecated("use getRefractiveIndex instead")]]
96 float& refractiveIndex();
97
98 /// Set the Average energy for these Cherenkov photons [GeV]
99 void setPhotonEnergy(float value);
100 /// Get mutable reference to Average energy for these Cherenkov photons [GeV]
101 float& getPhotonEnergy();
102 /// Get reference to Average energy for these Cherenkov photons [GeV]
103 [[deprecated("use getPhotonEnergy instead")]]
104 float& photonEnergy();
105
106
107 /// Set the reconstructed charged particle
108 void setChargedParticle(const edm4eic::TrackSegment& value);
109
111 std::size_t rawHitAssociations_size() const;
113 std::vector<edm4eic::MCRecoTrackerHitAssociation>::const_iterator rawHitAssociations_begin() const;
114 std::vector<edm4eic::MCRecoTrackerHitAssociation>::const_iterator rawHitAssociations_end() const;
115 podio::RelationRange<edm4eic::MCRecoTrackerHitAssociation> getRawHitAssociations() const;
117 std::size_t hypotheses_size() const;
119 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator hypotheses_begin() const;
120 std::vector<edm4eic::CherenkovParticleIDHypothesis>::const_iterator hypotheses_end() const;
121 podio::RelationRange<edm4eic::CherenkovParticleIDHypothesis> getHypotheses() const;
122 void addToThetaPhiPhotons(const edm4hep::Vector2f&);
123 std::size_t thetaPhiPhotons_size() const;
124 edm4hep::Vector2f getThetaPhiPhotons(std::size_t) const;
125 std::vector<edm4hep::Vector2f>::const_iterator thetaPhiPhotons_begin() const;
126 std::vector<edm4hep::Vector2f>::const_iterator thetaPhiPhotons_end() const;
127 podio::RelationRange<edm4hep::Vector2f> getThetaPhiPhotons() const;
128
129
130
131 /// check whether the object is actually available
132 bool isAvailable() const;
133 /// disconnect from CherenkovParticleIDObj instance
134 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CherenkovParticleIDObj>{nullptr}; }
135
136 bool operator==(const MutableCherenkovParticleID& other) const { return m_obj == other.m_obj; }
137 bool operator==(const CherenkovParticleID& other) const;
138
139 bool operator!=(const MutableCherenkovParticleID& other) const { return !(*this == other); }
140 bool operator!=(const CherenkovParticleID& other) const { return !(*this == other); }
141
142 // less comparison operator, so that objects can be e.g. stored in sets.
143 bool operator<(const MutableCherenkovParticleID& other) const { return m_obj < other.m_obj; }
144
145 podio::ObjectID id() const { return getObjectID(); }
146
147 const podio::ObjectID getObjectID() const;
148
150 using std::swap;
151 swap(a.m_obj, b.m_obj); // swap out the internal pointers
152 }
153
154private:
155 /// constructor from existing CherenkovParticleIDObj
156 explicit MutableCherenkovParticleID(podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> obj);
157
158 podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> m_obj{nullptr};
159};
160
161#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
162void to_json(nlohmann::json& j, const MutableCherenkovParticleID& value);
163#endif
164
165
166} // namespace edm4eic
167
168
169#endif
Definition CherenkovParticleIDCollection.h:92
Definition CherenkovParticleID.h:39
Definition CherenkovParticleIDHypothesis.h:19
Definition CherenkovParticleIDCollection.h:63
Definition MCRecoTrackerHitAssociation.h:39
Definition MutableCherenkovParticleID.h:37
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_begin() const
Definition MutableCherenkovParticleID.cc:122
bool operator!=(const MutableCherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:139
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_begin() const
Definition MutableCherenkovParticleID.cc:158
const podio::ObjectID getObjectID() const
Definition MutableCherenkovParticleID.cc:198
float getPhotonEnergy() const
Access the Average energy for these Cherenkov photons [GeV].
Definition MutableCherenkovParticleID.cc:55
float & photonEnergy()
Get reference to Average energy for these Cherenkov photons [GeV].
Definition MutableCherenkovParticleID.cc:73
bool operator<(const MutableCherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:143
void setChargedParticle(const edm4eic::TrackSegment &value)
Set the reconstructed charged particle.
Definition MutableCherenkovParticleID.cc:75
friend class CherenkovParticleID
Definition MutableCherenkovParticleID.h:41
float getRefractiveIndex() const
Access the Average refractive index at the Cherenkov photons' vertices.
Definition MutableCherenkovParticleID.cc:54
~MutableCherenkovParticleID()=default
destructor
podio::RelationRange< edm4hep::Vector2f > getThetaPhiPhotons() const
Definition MutableCherenkovParticleID.cc:181
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_end() const
Definition MutableCherenkovParticleID.cc:128
void addToThetaPhiPhotons(const edm4hep::Vector2f &)
Definition MutableCherenkovParticleID.cc:153
void setPhotonEnergy(float value)
Set the Average energy for these Cherenkov photons [GeV].
Definition MutableCherenkovParticleID.cc:71
MutableCherenkovParticleID(const MutableCherenkovParticleID &other)=default
copy constructor
std::size_t thetaPhiPhotons_size() const
Definition MutableCherenkovParticleID.cc:170
const edm4eic::TrackSegment getChargedParticle() const
Access the reconstructed charged particle.
Definition MutableCherenkovParticleID.cc:57
bool isAvailable() const
check whether the object is actually available
Definition MutableCherenkovParticleID.cc:194
float & refractiveIndex()
Get reference to Average refractive index at the Cherenkov photons' vertices.
Definition MutableCherenkovParticleID.cc:70
bool operator!=(const CherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:140
podio::RelationRange< edm4eic::CherenkovParticleIDHypothesis > getHypotheses() const
Definition MutableCherenkovParticleID.cc:145
friend void swap(MutableCherenkovParticleID &a, MutableCherenkovParticleID &b)
Definition MutableCherenkovParticleID.h:149
void addToHypotheses(const edm4eic::CherenkovParticleIDHypothesis &)
Definition MutableCherenkovParticleID.cc:117
MutableCherenkovParticleID clone(bool cloneRelations=true) const
Definition MutableCherenkovParticleID.cc:34
void unlink()
disconnect from CherenkovParticleIDObj instance
Definition MutableCherenkovParticleID.h:134
void addToRawHitAssociations(const edm4eic::MCRecoTrackerHitAssociation &)
Definition MutableCherenkovParticleID.cc:81
std::size_t rawHitAssociations_size() const
Definition MutableCherenkovParticleID.cc:98
friend class CherenkovParticleIDCollection
Definition MutableCherenkovParticleID.h:39
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_end() const
Definition MutableCherenkovParticleID.cc:92
float getNpe() const
Access the Overall photoelectron count.
Definition MutableCherenkovParticleID.cc:53
float & npe()
Get reference to Overall photoelectron count.
Definition MutableCherenkovParticleID.cc:67
std::size_t hypotheses_size() const
Definition MutableCherenkovParticleID.cc:134
MutableCherenkovParticleID & operator=(MutableCherenkovParticleID other)
copy-assignment operator
Definition MutableCherenkovParticleID.cc:29
podio::ObjectID id() const
Definition MutableCherenkovParticleID.h:145
void setRefractiveIndex(float value)
Set the Average refractive index at the Cherenkov photons' vertices.
Definition MutableCherenkovParticleID.cc:68
podio::RelationRange< edm4eic::MCRecoTrackerHitAssociation > getRawHitAssociations() const
Definition MutableCherenkovParticleID.cc:109
void setNpe(float value)
Set the Overall photoelectron count.
Definition MutableCherenkovParticleID.cc:65
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_end() const
Definition MutableCherenkovParticleID.cc:164
MutableCherenkovParticleID()
default constructor
Definition MutableCherenkovParticleID.cc:19
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_begin() const
Definition MutableCherenkovParticleID.cc:86
bool operator==(const MutableCherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:136
Definition TrackSegment.h:38
Definition CalorimeterHit.cc:17