EDM4eic
EIC data model
Loading...
Searching...
No Matches
MutableRingImage.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_MutableRingImage_H
4#define EDM4EIC_MutableRingImage_H
5
7// Make the immutable class available from its mutable version but not vice versa
8#include "edm4eic/RingImage.h"
9
10#include "edm4hep/Vector3f.h"
11
12#include "podio/utilities/MaybeSharedPtr.h"
13
14#include <ostream>
15#include <cstddef>
16
17#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
18#include "nlohmann/json_fwd.hpp"
19#endif
20
21
22
23namespace edm4eic {
24
25
26/** @class MutableRingImage
27 * EIC Ring Image Cluster
28 * @author: S. Joosten, C. Peng
29 */
31
32 friend class RingImageCollection;
34 friend class RingImage;
35
36public:
39
40 /// default constructor
42
43 /// Constructor initializing all members
44 MutableRingImage(float npe, edm4hep::Vector3f position, edm4hep::Vector3f positionError, float theta, float thetaError, float radius, float radiusError);
45
46 /// copy constructor
47 MutableRingImage(const MutableRingImage& other) = default;
48
49 /// copy-assignment operator
51
52 /// create a mutable deep-copy of the object with identical relations
53 MutableRingImage clone() const;
54
55 /// destructor
56 ~MutableRingImage() = default;
57
58
59 /// conversion to const object
60 operator RingImage() const;
61
62public:
63
64 /// Access the Number of photo-electrons [#]
65 float getNpe() const;
66
67 /// Access the Global position of the cluster [mm]
68 const edm4hep::Vector3f& getPosition() const;
69
70 /// Access the Error on the position
71 const edm4hep::Vector3f& getPositionError() const;
72
73 /// Access the Opening angle of the ring [rad, 0->pi]
74 float getTheta() const;
75
76 /// Access the Error on the opening angle
77 float getThetaError() const;
78
79 /// Access the Radius of the best fit ring [mm]
80 float getRadius() const;
81
82 /// Access the Estimated error from the fit [mm]
83 float getRadiusError() const;
84
85
86
87 /// Set the Number of photo-electrons [#]
88 void setNpe(float value);
89
90 /// Set the Global position of the cluster [mm]
91 void setPosition(edm4hep::Vector3f value);
92 /// Get reference to Global position of the cluster [mm]
93 edm4hep::Vector3f& position();
94
95 /// Set the Error on the position
96 void setPositionError(edm4hep::Vector3f value);
97 /// Get reference to Error on the position
98 edm4hep::Vector3f& positionError();
99
100 /// Set the Opening angle of the ring [rad, 0->pi]
101 void setTheta(float value);
102
103 /// Set the Error on the opening angle
104 void setThetaError(float value);
105
106 /// Set the Radius of the best fit ring [mm]
107 void setRadius(float value);
108
109 /// Set the Estimated error from the fit [mm]
110 void setRadiusError(float value);
111
112
113
114
115
116
117 /// check whether the object is actually available
118 bool isAvailable() const;
119 /// disconnect from RingImageObj instance
120 void unlink() { m_obj = podio::utils::MaybeSharedPtr<RingImageObj>{nullptr}; }
121
122 bool operator==(const MutableRingImage& other) const { return m_obj == other.m_obj; }
123 bool operator==(const RingImage& other) const;
124
125 // less comparison operator, so that objects can be e.g. stored in sets.
126 bool operator<(const MutableRingImage& other) const { return m_obj < other.m_obj; }
127
128 podio::ObjectID id() const { return getObjectID(); }
129
130 const podio::ObjectID getObjectID() const;
131
133 using std::swap;
134 swap(a.m_obj, b.m_obj); // swap out the internal pointers
135 }
136
137private:
138 /// constructor from existing RingImageObj
139 explicit MutableRingImage(podio::utils::MaybeSharedPtr<RingImageObj> obj);
140
141 podio::utils::MaybeSharedPtr<RingImageObj> m_obj{nullptr};
142};
143
144#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
145void to_json(nlohmann::json& j, const MutableRingImage& value);
146#endif
147
148
149} // namespace edm4eic
150
151
152#endif
Definition MutableRingImage.h:30
MutableRingImage & operator=(MutableRingImage other)
copy-assignment operator
Definition MutableRingImage.cc:35
void setPosition(edm4hep::Vector3f value)
Set the Global position of the cluster [mm].
Definition MutableRingImage.cc:57
float getThetaError() const
Access the Error on the opening angle.
Definition MutableRingImage.cc:51
MutableRingImage()
default constructor
Definition MutableRingImage.cc:21
bool isAvailable() const
check whether the object is actually available
Definition MutableRingImage.cc:72
MutableRingImage(const MutableRingImage &other)=default
copy constructor
void setNpe(float value)
Set the Number of photo-electrons [#].
Definition MutableRingImage.cc:56
void unlink()
disconnect from RingImageObj instance
Definition MutableRingImage.h:120
void setRadius(float value)
Set the Radius of the best fit ring [mm].
Definition MutableRingImage.cc:63
friend class RingImage
Definition MutableRingImage.h:34
const edm4hep::Vector3f & getPositionError() const
Access the Error on the position.
Definition MutableRingImage.cc:49
void setThetaError(float value)
Set the Error on the opening angle.
Definition MutableRingImage.cc:62
podio::ObjectID id() const
Definition MutableRingImage.h:128
void setTheta(float value)
Set the Opening angle of the ring [rad, 0->pi].
Definition MutableRingImage.cc:61
friend void swap(MutableRingImage &a, MutableRingImage &b)
Definition MutableRingImage.h:132
float getNpe() const
Access the Number of photo-electrons [#].
Definition MutableRingImage.cc:47
bool operator==(const MutableRingImage &other) const
Definition MutableRingImage.h:122
MutableRingImage clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableRingImage.cc:40
const edm4hep::Vector3f & getPosition() const
Access the Global position of the cluster [mm].
Definition MutableRingImage.cc:48
float getTheta() const
Access the Opening angle of the ring [rad, 0->pi].
Definition MutableRingImage.cc:50
float getRadiusError() const
Access the Estimated error from the fit [mm].
Definition MutableRingImage.cc:53
friend class RingImageCollection
Definition MutableRingImage.h:32
edm4hep::Vector3f & positionError()
Get reference to Error on the position.
Definition MutableRingImage.cc:60
~MutableRingImage()=default
destructor
edm4hep::Vector3f & position()
Get reference to Global position of the cluster [mm].
Definition MutableRingImage.cc:58
bool operator<(const MutableRingImage &other) const
Definition MutableRingImage.h:126
float getRadius() const
Access the Radius of the best fit ring [mm].
Definition MutableRingImage.cc:52
const podio::ObjectID getObjectID() const
Definition MutableRingImage.cc:79
void setPositionError(edm4hep::Vector3f value)
Set the Error on the position.
Definition MutableRingImage.cc:59
void setRadiusError(float value)
Set the Estimated error from the fit [mm].
Definition MutableRingImage.cc:64
Definition RingImageCollection.h:95
Definition RingImage.h:31
Definition RingImageCollection.h:66
Definition CalorimeterHit.cc:18