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