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