EICd
EIC data model
Cluster3DInfo.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_Cluster3DInfo_H
4 #define EICD_Cluster3DInfo_H
5 
8 
9 #include "eicd/Direction.h"
10 #include "eicd/Index.h"
11 #include "eicd/VectorPolar.h"
12 #include "podio/ObjectID.h"
13 #include <ostream>
14 
15 
16 
17 namespace eic {
18 
19 
20 /** @class Cluster3DInfo
21  * Additional info for 3D clusters
22  * @author: S. Joosten
23  */
25 
28  friend class ConstCluster3DInfo;
29 
30 public:
31 
32  /// default constructor
33  Cluster3DInfo();
35 
36  /// constructor from existing Cluster3DInfoObj
38 
39  /// copy constructor
40  Cluster3DInfo(const Cluster3DInfo& other);
41 
42  /// copy-assignment operator
43  Cluster3DInfo& operator=(const Cluster3DInfo& other);
44 
45  /// support cloning (deep-copy)
46  Cluster3DInfo clone() const;
47 
48  /// destructor
50 
51  /// conversion to const object
52  operator ConstCluster3DInfo() const;
53 
54 public:
55 
56  /// Access the Primary cluster ID
57  const eic::Index& clusterID() const;
58 
59  /// Access the Cluster position polar information
60  const eic::VectorPolar& polar() const;
61 
62  /// Access the Cluster pseudorapidity
63  const float& eta() const;
64 
65  /// Access the Intrinsic direction of the cluster at the central position [rad, 0->pi and -pi->pi]
66  const eic::Direction& direction() const;
67 
68 
69 
70  /// Set the Primary cluster ID
71  void clusterID(eic::Index value);
72  /// Get reference to Primary cluster ID
74 
75  /// Set the Cluster position polar information
76  void polar(eic::VectorPolar value);
77  /// Get reference to Cluster position polar information
79 
80  /// Set the Cluster pseudorapidity
81  void eta(float value);
82 
83  /// Set the Intrinsic direction of the cluster at the central position [rad, 0->pi and -pi->pi]
84  void direction(eic::Direction value);
85  /// Get reference to Intrinsic direction of the cluster at the central position [rad, 0->pi and -pi->pi]
87 
88 
89 
90 
91 
92 
93  /// check whether the object is actually available
94  bool isAvailable() const;
95  /// disconnect from Cluster3DInfoObj instance
96  void unlink() { m_obj = nullptr; }
97 
98  bool operator==(const Cluster3DInfo& other) const { return m_obj == other.m_obj; }
99  bool operator==(const ConstCluster3DInfo& other) const;
100 
101  // less comparison operator, so that objects can be e.g. stored in sets.
102  bool operator<(const Cluster3DInfo& other) const { return m_obj < other.m_obj; }
103 
104  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
105 
106  const podio::ObjectID getObjectID() const;
107 
108 private:
109  Cluster3DInfoObj* m_obj;
110 };
111 
112 std::ostream& operator<<(std::ostream& o, const ConstCluster3DInfo& value);
113 
114 } // namespace eic
115 
116 
117 #endif
eic::operator<<
std::ostream & operator<<(std::ostream &o, const ConstBasicParticle &value)
Definition: BasicParticle.cc:102
eic::Index
Definition: Index.h:11
eic::Cluster3DInfo::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: Cluster3DInfo.cc:71
Cluster3DInfoConst.h
eic::Cluster3DInfo::clusterID
const eic::Index & clusterID() const
Access the Primary cluster ID.
Definition: Cluster3DInfo.cc:51
eic::Cluster3DInfo::operator<
bool operator<(const Cluster3DInfo &other) const
Definition: Cluster3DInfo.h:102
eic::Cluster3DInfo::eta
const float & eta() const
Access the Cluster pseudorapidity.
Definition: Cluster3DInfo.cc:53
eic
Definition: BasicParticle.cc:13
eic::Cluster3DInfo::polar
const eic::VectorPolar & polar() const
Access the Cluster position polar information.
Definition: Cluster3DInfo.cc:52
eic::Cluster3DInfo::clone
Cluster3DInfo clone() const
support cloning (deep-copy)
Definition: Cluster3DInfo.cc:42
eic::Cluster3DInfo::operator=
Cluster3DInfo & operator=(const Cluster3DInfo &other)
copy-assignment operator
Definition: Cluster3DInfo.cc:32
eic::Cluster3DInfo::operator==
bool operator==(const Cluster3DInfo &other) const
Definition: Cluster3DInfo.h:98
eic::Cluster3DInfoCollection
Definition: Cluster3DInfoCollection.h:76
eic::Cluster3DInfo::~Cluster3DInfo
~Cluster3DInfo()
destructor
Definition: Cluster3DInfo.cc:46
eic::Cluster3DInfo::getObjectID
const podio::ObjectID getObjectID() const
Definition: Cluster3DInfo.cc:78
eic::Cluster3DInfo
Definition: Cluster3DInfo.h:24
eic::VectorPolar
Definition: VectorPolar.h:13
eic::Cluster3DInfoCollectionIterator
Definition: Cluster3DInfoCollection.h:29
eic::Cluster3DInfo::direction
const eic::Direction & direction() const
Access the Intrinsic direction of the cluster at the central position [rad, 0->pi and -pi->pi].
Definition: Cluster3DInfo.cc:54
Cluster3DInfoObj.h
eic::Cluster3DInfo::id
unsigned int id() const
Definition: Cluster3DInfo.h:104
eic::Cluster3DInfo::Cluster3DInfo
Cluster3DInfo()
default constructor
Definition: Cluster3DInfo.cc:16
eic::Cluster3DInfo::ConstCluster3DInfo
friend class ConstCluster3DInfo
Definition: Cluster3DInfo.h:28
VectorPolar.h
eic::Cluster3DInfoObj
Definition: Cluster3DInfoObj.h:18
eic::ConstCluster3DInfo
Definition: Cluster3DInfoConst.h:22
Index.h
Direction.h
eic::Direction
Definition: Direction.h:13
eic::Cluster3DInfo::unlink
void unlink()
disconnect from Cluster3DInfoObj instance
Definition: Cluster3DInfo.h:96