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 <ostream>
18#include <cstddef>
19
20#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
21#include "nlohmann/json_fwd.hpp"
22#endif
23
24// forward declarations
25namespace edm4eic {
26class TrackSegment;
27class MutableTrackSegment;
28}
29
30
31namespace edm4eic {
32
33
34/** @class MutableCherenkovParticleID
35 * Cherenkov detector PID
36 * @author: A. Kiselev, C. Chatterjee, C. Dilks
37 */
39
42 friend class CherenkovParticleID;
43
44public:
47
48 /// default constructor
50
51 /// Constructor initializing all members
52 MutableCherenkovParticleID(float npe, float refractiveIndex, float photonEnergy);
53
54 /// copy constructor
56
57 /// copy-assignment operator
59
60 /// create a mutable deep-copy of the object with identical relations
62
63 /// destructor
65
66
67 /// conversion to const object
68 operator CherenkovParticleID() const;
69
70public:
71
72 /// Access the Overall photoelectron count
73 float getNpe() const;
74
75 /// Access the Average refractive index at the Cherenkov photons' vertices
76 float getRefractiveIndex() const;
77
78 /// Access the Average energy for these Cherenkov photons [GeV]
79 float getPhotonEnergy() const;
80
81
82 /// Access the reconstructed charged particle
84
85 /// Set the Overall photoelectron count
86 void setNpe(float value);
87
88 /// Set the Average refractive index at the Cherenkov photons' vertices
89 void setRefractiveIndex(float value);
90
91 /// Set the Average energy for these Cherenkov photons [GeV]
92 void setPhotonEnergy(float value);
93
94
95 /// Set the reconstructed charged particle
97
99 std::size_t rawHitAssociations_size() const;
101 std::vector<edm4eic::MCRecoTrackerHitAssociation>::const_iterator rawHitAssociations_begin() const;
102 std::vector<edm4eic::MCRecoTrackerHitAssociation>::const_iterator rawHitAssociations_end() const;
103 podio::RelationRange<edm4eic::MCRecoTrackerHitAssociation> getRawHitAssociations() const;
105 std::size_t hypotheses_size() const;
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;
110 void addToThetaPhiPhotons(edm4hep::Vector2f);
111 std::size_t thetaPhiPhotons_size() const;
112 edm4hep::Vector2f getThetaPhiPhotons(std::size_t) const;
113 std::vector<edm4hep::Vector2f>::const_iterator thetaPhiPhotons_begin() const;
114 std::vector<edm4hep::Vector2f>::const_iterator thetaPhiPhotons_end() const;
115 podio::RelationRange<edm4hep::Vector2f> getThetaPhiPhotons() const;
116
117
118
119 /// check whether the object is actually available
120 bool isAvailable() const;
121 /// disconnect from CherenkovParticleIDObj instance
122 void unlink() { m_obj = podio::utils::MaybeSharedPtr<CherenkovParticleIDObj>{nullptr}; }
123
124 bool operator==(const MutableCherenkovParticleID& other) const { return m_obj == other.m_obj; }
125 bool operator==(const CherenkovParticleID& other) const;
126
127 // less comparison operator, so that objects can be e.g. stored in sets.
128 bool operator<(const MutableCherenkovParticleID& other) const { return m_obj < other.m_obj; }
129
130 podio::ObjectID id() const { return getObjectID(); }
131
132 const podio::ObjectID getObjectID() const;
133
135 using std::swap;
136 swap(a.m_obj, b.m_obj); // swap out the internal pointers
137 }
138
139private:
140 /// constructor from existing CherenkovParticleIDObj
141 explicit MutableCherenkovParticleID(podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> obj);
142
143 podio::utils::MaybeSharedPtr<CherenkovParticleIDObj> m_obj{nullptr};
144};
145
146#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
147void to_json(nlohmann::json& j, const MutableCherenkovParticleID& value);
148#endif
149
150
151} // namespace edm4eic
152
153
154#endif
Definition CherenkovParticleIDCollection.h:95
Definition CherenkovParticleID.h:39
Definition CherenkovParticleIDHypothesis.h:19
Definition CherenkovParticleIDCollection.h:66
Definition MCRecoTrackerHitAssociation.h:39
Definition MutableCherenkovParticleID.h:38
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_begin() const
Definition MutableCherenkovParticleID.cc:109
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_begin() const
Definition MutableCherenkovParticleID.cc:145
const podio::ObjectID getObjectID() const
Definition MutableCherenkovParticleID.cc:188
float getPhotonEnergy() const
Access the Average energy for these Cherenkov photons [GeV].
Definition MutableCherenkovParticleID.cc:46
bool operator<(const MutableCherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:128
friend class CherenkovParticleID
Definition MutableCherenkovParticleID.h:42
float getRefractiveIndex() const
Access the Average refractive index at the Cherenkov photons' vertices.
Definition MutableCherenkovParticleID.cc:45
~MutableCherenkovParticleID()=default
destructor
podio::RelationRange< edm4hep::Vector2f > getThetaPhiPhotons() const
Definition MutableCherenkovParticleID.cc:168
std::vector< edm4eic::CherenkovParticleIDHypothesis >::const_iterator hypotheses_end() const
Definition MutableCherenkovParticleID.cc:115
void setPhotonEnergy(float value)
Set the Average energy for these Cherenkov photons [GeV].
Definition MutableCherenkovParticleID.cc:58
MutableCherenkovParticleID(const MutableCherenkovParticleID &other)=default
copy constructor
std::size_t thetaPhiPhotons_size() const
Definition MutableCherenkovParticleID.cc:157
void addToRawHitAssociations(edm4eic::MCRecoTrackerHitAssociation)
Definition MutableCherenkovParticleID.cc:68
const edm4eic::TrackSegment getChargedParticle() const
Access the reconstructed charged particle.
Definition MutableCherenkovParticleID.cc:48
bool isAvailable() const
check whether the object is actually available
Definition MutableCherenkovParticleID.cc:181
void setChargedParticle(edm4eic::TrackSegment value)
Set the reconstructed charged particle.
Definition MutableCherenkovParticleID.cc:60
void addToHypotheses(edm4eic::CherenkovParticleIDHypothesis)
Definition MutableCherenkovParticleID.cc:104
podio::RelationRange< edm4eic::CherenkovParticleIDHypothesis > getHypotheses() const
Definition MutableCherenkovParticleID.cc:132
friend void swap(MutableCherenkovParticleID &a, MutableCherenkovParticleID &b)
Definition MutableCherenkovParticleID.h:134
void unlink()
disconnect from CherenkovParticleIDObj instance
Definition MutableCherenkovParticleID.h:122
std::size_t rawHitAssociations_size() const
Definition MutableCherenkovParticleID.cc:85
friend class CherenkovParticleIDCollection
Definition MutableCherenkovParticleID.h:40
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_end() const
Definition MutableCherenkovParticleID.cc:79
float getNpe() const
Access the Overall photoelectron count.
Definition MutableCherenkovParticleID.cc:44
std::size_t hypotheses_size() const
Definition MutableCherenkovParticleID.cc:121
MutableCherenkovParticleID & operator=(MutableCherenkovParticleID other)
copy-assignment operator
Definition MutableCherenkovParticleID.cc:32
podio::ObjectID id() const
Definition MutableCherenkovParticleID.h:130
void setRefractiveIndex(float value)
Set the Average refractive index at the Cherenkov photons' vertices.
Definition MutableCherenkovParticleID.cc:57
podio::RelationRange< edm4eic::MCRecoTrackerHitAssociation > getRawHitAssociations() const
Definition MutableCherenkovParticleID.cc:96
void setNpe(float value)
Set the Overall photoelectron count.
Definition MutableCherenkovParticleID.cc:56
std::vector< edm4hep::Vector2f >::const_iterator thetaPhiPhotons_end() const
Definition MutableCherenkovParticleID.cc:151
MutableCherenkovParticleID()
default constructor
Definition MutableCherenkovParticleID.cc:22
std::vector< edm4eic::MCRecoTrackerHitAssociation >::const_iterator rawHitAssociations_begin() const
Definition MutableCherenkovParticleID.cc:73
bool operator==(const MutableCherenkovParticleID &other) const
Definition MutableCherenkovParticleID.h:124
void addToThetaPhiPhotons(edm4hep::Vector2f)
Definition MutableCherenkovParticleID.cc:140
MutableCherenkovParticleID clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableCherenkovParticleID.cc:37
Definition TrackSegment.h:38
Definition CalorimeterHit.cc:18