EICd
EIC data model
ReconstructedParticleRelations.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ReconstructedParticleRelations_H
4 #define EICD_ReconstructedParticleRelations_H
5 
8 
9 #include "eicd/Index.h"
10 #include "podio/ObjectID.h"
11 #include <ostream>
12 
13 
14 
15 namespace eic {
16 
17 
18 /** @class ReconstructedParticleRelations
19  * Relational info associated with our reconstructed particle
20  * @author: S. Joosten
21  */
23 
27 
28 public:
29 
30  /// default constructor
33 
34  /// constructor from existing ReconstructedParticleRelationsObj
36 
37  /// copy constructor
39 
40  /// copy-assignment operator
42 
43  /// support cloning (deep-copy)
45 
46  /// destructor
48 
49  /// conversion to const object
50  operator ConstReconstructedParticleRelations() const;
51 
52 public:
53 
54  /// Access the ReconstructedParticle index
55  const eic::Index& recID() const;
56 
57  /// Access the Start vertex for this particle
58  const eic::Index& vertexID() const;
59 
60  /// Access the Index of the associated track, if any
61  const eic::Index& trackID() const;
62 
63  /// Access the Index of associated pos/barrel/neg ECAL cluster, if any
64  const eic::Index& ecalID() const;
65 
66  /// Access the Index of associated pos/barrel/neg HCAL cluster, if any
67  const eic::Index& hcalID() const;
68 
69  /// Access the Index of associated pos/barrel/neg Cherenkov info, if any
70  const eic::Index& cherID() const;
71 
72  /// Access the Index of the associated TOF info, if any
73  const eic::Index& tofID() const;
74 
75  /// Access the Index of the associated MC particle, if any
76  const eic::Index& mcID() const;
77 
78 
79 
80  /// Set the ReconstructedParticle index
81  void recID(eic::Index value);
82  /// Get reference to ReconstructedParticle index
83  eic::Index& recID();
84 
85  /// Set the Start vertex for this particle
86  void vertexID(eic::Index value);
87  /// Get reference to Start vertex for this particle
89 
90  /// Set the Index of the associated track, if any
91  void trackID(eic::Index value);
92  /// Get reference to Index of the associated track, if any
94 
95  /// Set the Index of associated pos/barrel/neg ECAL cluster, if any
96  void ecalID(eic::Index value);
97  /// Get reference to Index of associated pos/barrel/neg ECAL cluster, if any
98  eic::Index& ecalID();
99 
100  /// Set the Index of associated pos/barrel/neg HCAL cluster, if any
101  void hcalID(eic::Index value);
102  /// Get reference to Index of associated pos/barrel/neg HCAL cluster, if any
103  eic::Index& hcalID();
104 
105  /// Set the Index of associated pos/barrel/neg Cherenkov info, if any
106  void cherID(eic::Index value);
107  /// Get reference to Index of associated pos/barrel/neg Cherenkov info, if any
108  eic::Index& cherID();
109 
110  /// Set the Index of the associated TOF info, if any
111  void tofID(eic::Index value);
112  /// Get reference to Index of the associated TOF info, if any
113  eic::Index& tofID();
114 
115  /// Set the Index of the associated MC particle, if any
116  void mcID(eic::Index value);
117  /// Get reference to Index of the associated MC particle, if any
118  eic::Index& mcID();
119 
120 
121 
122 
123 
124 
125  /// check whether the object is actually available
126  bool isAvailable() const;
127  /// disconnect from ReconstructedParticleRelationsObj instance
128  void unlink() { m_obj = nullptr; }
129 
130  bool operator==(const ReconstructedParticleRelations& other) const { return m_obj == other.m_obj; }
131  bool operator==(const ConstReconstructedParticleRelations& other) const;
132 
133  // less comparison operator, so that objects can be e.g. stored in sets.
134  bool operator<(const ReconstructedParticleRelations& other) const { return m_obj < other.m_obj; }
135 
136  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
137 
138  const podio::ObjectID getObjectID() const;
139 
140 private:
142 };
143 
144 std::ostream& operator<<(std::ostream& o, const ConstReconstructedParticleRelations& value);
145 
146 } // namespace eic
147 
148 
149 #endif
eic::operator<<
std::ostream & operator<<(std::ostream &o, const ConstBasicParticle &value)
Definition: BasicParticle.cc:102
eic::Index
Definition: Index.h:11
eic::ReconstructedParticleRelations::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: ReconstructedParticleRelations.cc:88
eic::ReconstructedParticleRelations::vertexID
const eic::Index & vertexID() const
Access the Start vertex for this particle.
Definition: ReconstructedParticleRelations.cc:56
eic::ReconstructedParticleRelations::tofID
const eic::Index & tofID() const
Access the Index of the associated TOF info, if any.
Definition: ReconstructedParticleRelations.cc:61
eic::ReconstructedParticleRelations::ecalID
const eic::Index & ecalID() const
Access the Index of associated pos/barrel/neg ECAL cluster, if any.
Definition: ReconstructedParticleRelations.cc:58
eic
Definition: BasicParticle.cc:13
eic::ReconstructedParticleRelations::operator==
bool operator==(const ReconstructedParticleRelations &other) const
Definition: ReconstructedParticleRelations.h:130
eic::ReconstructedParticleRelations::cherID
const eic::Index & cherID() const
Access the Index of associated pos/barrel/neg Cherenkov info, if any.
Definition: ReconstructedParticleRelations.cc:60
eic::ReconstructedParticleRelations::ReconstructedParticleRelations
ReconstructedParticleRelations()
default constructor
Definition: ReconstructedParticleRelations.cc:16
eic::ReconstructedParticleRelations::unlink
void unlink()
disconnect from ReconstructedParticleRelationsObj instance
Definition: ReconstructedParticleRelations.h:128
eic::ReconstructedParticleRelations::operator=
ReconstructedParticleRelations & operator=(const ReconstructedParticleRelations &other)
copy-assignment operator
Definition: ReconstructedParticleRelations.cc:36
eic::ReconstructedParticleRelations::hcalID
const eic::Index & hcalID() const
Access the Index of associated pos/barrel/neg HCAL cluster, if any.
Definition: ReconstructedParticleRelations.cc:59
eic::ReconstructedParticleRelations::recID
const eic::Index & recID() const
Access the ReconstructedParticle index.
Definition: ReconstructedParticleRelations.cc:55
eic::ReconstructedParticleRelations
Definition: ReconstructedParticleRelations.h:22
eic::ReconstructedParticleRelations::mcID
const eic::Index & mcID() const
Access the Index of the associated MC particle, if any.
Definition: ReconstructedParticleRelations.cc:62
eic::ReconstructedParticleRelationsCollectionIterator
Definition: ReconstructedParticleRelationsCollection.h:29
eic::ReconstructedParticleRelations::clone
ReconstructedParticleRelations clone() const
support cloning (deep-copy)
Definition: ReconstructedParticleRelations.cc:46
ReconstructedParticleRelationsObj.h
eic::ReconstructedParticleRelationsCollection
Definition: ReconstructedParticleRelationsCollection.h:76
eic::ConstReconstructedParticleRelations
Definition: ReconstructedParticleRelationsConst.h:20
ReconstructedParticleRelationsConst.h
eic::ReconstructedParticleRelationsObj
Definition: ReconstructedParticleRelationsObj.h:18
eic::ReconstructedParticleRelations::operator<
bool operator<(const ReconstructedParticleRelations &other) const
Definition: ReconstructedParticleRelations.h:134
eic::ReconstructedParticleRelations::id
unsigned int id() const
Definition: ReconstructedParticleRelations.h:136
eic::ReconstructedParticleRelations::getObjectID
const podio::ObjectID getObjectID() const
Definition: ReconstructedParticleRelations.cc:95
Index.h
eic::ReconstructedParticleRelations::trackID
const eic::Index & trackID() const
Access the Index of the associated track, if any.
Definition: ReconstructedParticleRelations.cc:57
eic::ReconstructedParticleRelations::ConstReconstructedParticleRelations
friend class ConstReconstructedParticleRelations
Definition: ReconstructedParticleRelations.h:26
eic::ReconstructedParticleRelations::~ReconstructedParticleRelations
~ReconstructedParticleRelations()
destructor
Definition: ReconstructedParticleRelations.cc:50