EICd
EIC data model
RingImageConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstRingImage_H
4 #define EICD_ConstRingImage_H
5 
6 #include "eicd/RingImageObj.h"
7 
8 #include "eicd/Index.h"
9 #include "eicd/VectorXYZ.h"
10 #include "podio/ObjectID.h"
11 
12 
13 
14 namespace eic {
15 
16 
17 /** @class ConstRingImage
18  * EIC Ring Image Cluster
19  * @author: S. Joosten, C. Peng
20  */
22 
23  friend class RingImage;
24  friend class RingImageCollection;
26 
27 public:
28  /// default constructor
31 
32  /// constructor from existing RingImageObj
34 
35  /// copy constructor
36  ConstRingImage(const ConstRingImage& other);
37 
38  /// copy-assignment operator
40 
41  /// support cloning (deep-copy)
42  ConstRingImage clone() const;
43 
44  /// destructor
46 
47 
48 public:
49 
50  /// Access the Unique cluster ID
51  const eic::Index& ID() const;
52 
53  /// Access the number of photo-electrons [#]
54  const float& npe() const;
55 
56  /// Access the Global position of the cluster [mm]
57  const eic::VectorXYZ& position() const;
58 
59  /// Access the Error on the position
60  const eic::VectorXYZ& positionError() const;
61 
62  /// Access the opening angle of the ring [rad, 0->pi]
63  const float& theta() const;
64 
65  /// Access the error on the opening angle
66  const float& thetaError() const;
67 
68  /// Access the radius of the best fit ring [mm]
69  const float& radius() const;
70 
71  /// Access the estimated error from the fit [mm]
72  const float& radiusError() const;
73 
74 
75 
76 
77 
78  /// check whether the object is actually available
79  bool isAvailable() const;
80  /// disconnect from RingImageObj instance
81  void unlink() { m_obj = nullptr; }
82 
83  bool operator==(const ConstRingImage& other) const { return m_obj == other.m_obj; }
84  bool operator==(const RingImage& other) const;
85 
86  // less comparison operator, so that objects can be e.g. stored in sets.
87  bool operator<(const ConstRingImage& other) const { return m_obj < other.m_obj; }
88 
89  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
90 
91  const podio::ObjectID getObjectID() const;
92 
93 private:
94  RingImageObj* m_obj;
95 };
96 
97 } // namespace eic
98 
99 
100 #endif
eic::Index
Definition: Index.h:11
eic::ConstRingImage::ConstRingImage
ConstRingImage()
default constructor
Definition: RingImageConst.cc:16
eic::ConstRingImage::npe
const float & npe() const
Access the number of photo-electrons [#].
Definition: RingImageConst.cc:54
RingImageObj.h
eic
Definition: BasicParticle.cc:13
eic::ConstRingImage::radius
const float & radius() const
Access the radius of the best fit ring [mm].
Definition: RingImageConst.cc:59
eic::ConstRingImage::operator=
ConstRingImage & operator=(const ConstRingImage &other)
copy-assignment operator
Definition: RingImageConst.cc:36
eic::ConstRingImage::operator==
bool operator==(const ConstRingImage &other) const
Definition: RingImageConst.h:83
eic::RingImageObj
Definition: RingImageObj.h:18
eic::ConstRingImage::operator<
bool operator<(const ConstRingImage &other) const
Definition: RingImageConst.h:87
eic::ConstRingImage::theta
const float & theta() const
Access the opening angle of the ring [rad, 0->pi].
Definition: RingImageConst.cc:57
eic::RingImage
Definition: RingImage.h:23
eic::ConstRingImage::positionError
const eic::VectorXYZ & positionError() const
Access the Error on the position.
Definition: RingImageConst.cc:56
VectorXYZ.h
eic::ConstRingImage::~ConstRingImage
~ConstRingImage()
destructor
Definition: RingImageConst.cc:50
eic::RingImageCollection
Definition: RingImageCollection.h:76
eic::ConstRingImage::getObjectID
const podio::ObjectID getObjectID() const
Definition: RingImageConst.cc:74
eic::ConstRingImage::unlink
void unlink()
disconnect from RingImageObj instance
Definition: RingImageConst.h:81
eic::RingImageConstCollectionIterator
Definition: RingImageCollection.h:51
eic::ConstRingImage::radiusError
const float & radiusError() const
Access the estimated error from the fit [mm].
Definition: RingImageConst.cc:60
Index.h
eic::ConstRingImage
Definition: RingImageConst.h:21
eic::ConstRingImage::position
const eic::VectorXYZ & position() const
Access the Global position of the cluster [mm].
Definition: RingImageConst.cc:55
eic::ConstRingImage::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: RingImageConst.cc:67
eic::ConstRingImage::id
unsigned int id() const
Definition: RingImageConst.h:89
eic::ConstRingImage::thetaError
const float & thetaError() const
Access the error on the opening angle.
Definition: RingImageConst.cc:58
eic::ConstRingImage::clone
ConstRingImage clone() const
support cloning (deep-copy)
Definition: RingImageConst.cc:46
eic::ConstRingImage::ID
const eic::Index & ID() const
Access the Unique cluster ID.
Definition: RingImageConst.cc:53
eic::VectorXYZ
Definition: VectorXYZ.h:13