EICd
EIC data model
RingImage.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_RingImage_H
4 #define EICD_RingImage_H
5 
6 #include "eicd/RingImageConst.h"
7 #include "eicd/RingImageObj.h"
8 
9 #include "eicd/Index.h"
10 #include "eicd/VectorXYZ.h"
11 #include "podio/ObjectID.h"
12 #include <ostream>
13 
14 
15 
16 namespace eic {
17 
18 
19 /** @class RingImage
20  * EIC Ring Image Cluster
21  * @author: S. Joosten, C. Peng
22  */
23 class RingImage {
24 
25  friend class RingImageCollection;
27  friend class ConstRingImage;
28 
29 public:
30 
31  /// default constructor
32  RingImage();
34 
35  /// constructor from existing RingImageObj
36  RingImage(RingImageObj* obj);
37 
38  /// copy constructor
39  RingImage(const RingImage& other);
40 
41  /// copy-assignment operator
42  RingImage& operator=(const RingImage& other);
43 
44  /// support cloning (deep-copy)
45  RingImage clone() const;
46 
47  /// destructor
48  ~RingImage();
49 
50  /// conversion to const object
51  operator ConstRingImage() const;
52 
53 public:
54 
55  /// Access the Unique cluster ID
56  const eic::Index& ID() const;
57 
58  /// Access the number of photo-electrons [#]
59  const float& npe() const;
60 
61  /// Access the Global position of the cluster [mm]
62  const eic::VectorXYZ& position() const;
63 
64  /// Access the Error on the position
65  const eic::VectorXYZ& positionError() const;
66 
67  /// Access the opening angle of the ring [rad, 0->pi]
68  const float& theta() const;
69 
70  /// Access the error on the opening angle
71  const float& thetaError() const;
72 
73  /// Access the radius of the best fit ring [mm]
74  const float& radius() const;
75 
76  /// Access the estimated error from the fit [mm]
77  const float& radiusError() const;
78 
79 
80 
81  /// Set the Unique cluster ID
82  void ID(eic::Index value);
83  /// Get reference to Unique cluster ID
84  eic::Index& ID();
85 
86  /// Set the number of photo-electrons [#]
87  void npe(float value);
88 
89  /// Set the Global position of the cluster [mm]
90  void position(eic::VectorXYZ value);
91  /// Get reference to Global position of the cluster [mm]
93 
94  /// Set the Error on the position
95  void positionError(eic::VectorXYZ value);
96  /// Get reference to Error on the position
98 
99  /// Set the opening angle of the ring [rad, 0->pi]
100  void theta(float value);
101 
102  /// Set the error on the opening angle
103  void thetaError(float value);
104 
105  /// Set the radius of the best fit ring [mm]
106  void radius(float value);
107 
108  /// Set the estimated error from the fit [mm]
109  void radiusError(float value);
110 
111 
112 
113 
114 
115 
116  /// check whether the object is actually available
117  bool isAvailable() const;
118  /// disconnect from RingImageObj instance
119  void unlink() { m_obj = nullptr; }
120 
121  bool operator==(const RingImage& other) const { return m_obj == other.m_obj; }
122  bool operator==(const ConstRingImage& other) const;
123 
124  // less comparison operator, so that objects can be e.g. stored in sets.
125  bool operator<(const RingImage& other) const { return m_obj < other.m_obj; }
126 
127  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
128 
129  const podio::ObjectID getObjectID() const;
130 
131 private:
132  RingImageObj* m_obj;
133 };
134 
135 std::ostream& operator<<(std::ostream& o, const ConstRingImage& value);
136 
137 } // namespace eic
138 
139 
140 #endif
eic::operator<<
std::ostream & operator<<(std::ostream &o, const ConstBasicParticle &value)
Definition: BasicParticle.cc:102
eic::Index
Definition: Index.h:11
eic::RingImageCollectionIterator
Definition: RingImageCollection.h:29
eic::RingImage::theta
const float & theta() const
Access the opening angle of the ring [rad, 0->pi].
Definition: RingImage.cc:59
eic::RingImage::ID
const eic::Index & ID() const
Access the Unique cluster ID.
Definition: RingImage.cc:55
RingImageObj.h
eic::RingImage::~RingImage
~RingImage()
destructor
Definition: RingImage.cc:50
eic::RingImage::RingImage
RingImage()
default constructor
Definition: RingImage.cc:16
eic::RingImage::npe
const float & npe() const
Access the number of photo-electrons [#].
Definition: RingImage.cc:56
eic
Definition: BasicParticle.cc:13
eic::RingImage::ConstRingImage
friend class ConstRingImage
Definition: RingImage.h:27
eic::RingImage::id
unsigned int id() const
Definition: RingImage.h:127
eic::RingImage::operator=
RingImage & operator=(const RingImage &other)
copy-assignment operator
Definition: RingImage.cc:36
eic::RingImage::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: RingImage.cc:83
eic::RingImageObj
Definition: RingImageObj.h:18
eic::RingImage
Definition: RingImage.h:23
eic::RingImage::operator<
bool operator<(const RingImage &other) const
Definition: RingImage.h:125
VectorXYZ.h
eic::RingImageCollection
Definition: RingImageCollection.h:76
eic::RingImage::thetaError
const float & thetaError() const
Access the error on the opening angle.
Definition: RingImage.cc:60
eic::RingImage::positionError
const eic::VectorXYZ & positionError() const
Access the Error on the position.
Definition: RingImage.cc:58
eic::RingImage::radiusError
const float & radiusError() const
Access the estimated error from the fit [mm].
Definition: RingImage.cc:62
eic::RingImage::radius
const float & radius() const
Access the radius of the best fit ring [mm].
Definition: RingImage.cc:61
eic::RingImage::position
const eic::VectorXYZ & position() const
Access the Global position of the cluster [mm].
Definition: RingImage.cc:57
eic::RingImage::unlink
void unlink()
disconnect from RingImageObj instance
Definition: RingImage.h:119
eic::RingImage::clone
RingImage clone() const
support cloning (deep-copy)
Definition: RingImage.cc:46
Index.h
eic::ConstRingImage
Definition: RingImageConst.h:21
eic::RingImage::getObjectID
const podio::ObjectID getObjectID() const
Definition: RingImage.cc:90
eic::RingImage::operator==
bool operator==(const RingImage &other) const
Definition: RingImage.h:121
RingImageConst.h
eic::VectorXYZ
Definition: VectorXYZ.h:13