EICd
EIC data model
ReconstructedParticle.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ReconstructedParticle_H
4 #define EICD_ReconstructedParticle_H
5 
8 
9 #include "eicd/Direction.h"
10 #include "eicd/Index.h"
11 #include "eicd/VectorXYZ.h"
12 #include "eicd/Weight.h"
13 #include "podio/ObjectID.h"
14 #include <ostream>
15 
16 
17 
18 namespace eic {
19 
20 
21 /** @class ReconstructedParticle
22  * EIC Reconstructed Particle
23  * @author: W. Armstrong, S. Joosten
24  */
26 
30 
31 public:
32 
33  /// default constructor
35  ReconstructedParticle(eic::Index ID, eic::VectorXYZ p, eic::VectorXYZ v, float time, std::int32_t pid, std::int16_t status, std::int16_t charge, eic::Weight weight, eic::Direction direction, float momentum, float energy, float mass);
36 
37  /// constructor from existing ReconstructedParticleObj
39 
40  /// copy constructor
42 
43  /// copy-assignment operator
45 
46  /// support cloning (deep-copy)
48 
49  /// destructor
51 
52  /// conversion to const object
53  operator ConstReconstructedParticle() const;
54 
55 public:
56 
57  /// Access the Unique particle index
58  const eic::Index& ID() const;
59 
60  /// Access the momentum vector [GeV]
61  const eic::VectorXYZ& p() const;
62 
63  /// Access the vertex [mm]
64  const eic::VectorXYZ& v() const;
65 
66  /// Access the Time in [ns]
67  const float& time() const;
68 
69  /// Access the PID of reconstructed particle.
70  const std::int32_t& pid() const;
71 
72  /// Access the Status code
73  const std::int16_t& status() const;
74 
75  /// Access the Particle charge (or sign)
76  const std::int16_t& charge() const;
77 
78  /// Access the Particle weight, e.g. from PID algorithm [0-1]
79  const eic::Weight& weight() const;
80 
81  /// Access the Direction (theta/phi of this particle [mrad])
82  const eic::Direction& direction() const;
83 
84  /// Access the particle 3-momentum magnitude [GeV]
85  const float& momentum() const;
86 
87  /// Access the Particle energy, consistent with PID assigment [GeV]
88  const float& energy() const;
89 
90  /// Access the The mass of the particle in [GeV]
91  const float& mass() const;
92 
93 
94 
95  /// Set the Unique particle index
96  void ID(eic::Index value);
97  /// Get reference to Unique particle index
98  eic::Index& ID();
99 
100  /// Set the momentum vector [GeV]
101  void p(eic::VectorXYZ value);
102  /// Get reference to momentum vector [GeV]
103  eic::VectorXYZ& p();
104 
105  /// Set the vertex [mm]
106  void v(eic::VectorXYZ value);
107  /// Get reference to vertex [mm]
108  eic::VectorXYZ& v();
109 
110  /// Set the Time in [ns]
111  void time(float value);
112 
113  /// Set the PID of reconstructed particle.
114  void pid(std::int32_t value);
115 
116  /// Set the Status code
117  void status(std::int16_t value);
118 
119  /// Set the Particle charge (or sign)
120  void charge(std::int16_t value);
121 
122  /// Set the Particle weight, e.g. from PID algorithm [0-1]
123  void weight(eic::Weight value);
124  /// Get reference to Particle weight, e.g. from PID algorithm [0-1]
125  eic::Weight& weight();
126 
127  /// Set the Direction (theta/phi of this particle [mrad])
128  void direction(eic::Direction value);
129  /// Get reference to Direction (theta/phi of this particle [mrad])
131 
132  /// Set the particle 3-momentum magnitude [GeV]
133  void momentum(float value);
134 
135  /// Set the Particle energy, consistent with PID assigment [GeV]
136  void energy(float value);
137 
138  /// Set the The mass of the particle in [GeV]
139  void mass(float value);
140 
141 
142 
143 
144 
145 
146  /// check whether the object is actually available
147  bool isAvailable() const;
148  /// disconnect from ReconstructedParticleObj instance
149  void unlink() { m_obj = nullptr; }
150 
151  bool operator==(const ReconstructedParticle& other) const { return m_obj == other.m_obj; }
152  bool operator==(const ConstReconstructedParticle& other) const;
153 
154  // less comparison operator, so that objects can be e.g. stored in sets.
155  bool operator<(const ReconstructedParticle& other) const { return m_obj < other.m_obj; }
156 
157  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
158 
159  const podio::ObjectID getObjectID() const;
160 
161 private:
163 };
164 
165 std::ostream& operator<<(std::ostream& o, const ConstReconstructedParticle& value);
166 
167 } // namespace eic
168 
169 
170 #endif
eic::operator<<
std::ostream & operator<<(std::ostream &o, const ConstBasicParticle &value)
Definition: BasicParticle.cc:102
eic::Index
Definition: Index.h:11
eic::ReconstructedParticle::getObjectID
const podio::ObjectID getObjectID() const
Definition: ReconstructedParticle.cc:104
eic::ReconstructedParticle::charge
const std::int16_t & charge() const
Access the Particle charge (or sign)
Definition: ReconstructedParticle.cc:65
eic::ReconstructedParticle::operator<
bool operator<(const ReconstructedParticle &other) const
Definition: ReconstructedParticle.h:155
eic::ReconstructedParticle::momentum
const float & momentum() const
Access the particle 3-momentum magnitude [GeV].
Definition: ReconstructedParticle.cc:68
eic::ReconstructedParticle::operator=
ReconstructedParticle & operator=(const ReconstructedParticle &other)
copy-assignment operator
Definition: ReconstructedParticle.cc:40
eic
Definition: BasicParticle.cc:13
eic::ReconstructedParticle::p
const eic::VectorXYZ & p() const
Access the momentum vector [GeV].
Definition: ReconstructedParticle.cc:60
eic::ReconstructedParticleCollectionIterator
Definition: ReconstructedParticleCollection.h:29
ReconstructedParticleObj.h
eic::ReconstructedParticle::direction
const eic::Direction & direction() const
Access the Direction (theta/phi of this particle [mrad])
Definition: ReconstructedParticle.cc:67
eic::ReconstructedParticle::ID
const eic::Index & ID() const
Access the Unique particle index.
Definition: ReconstructedParticle.cc:59
eic::Weight
Definition: Weight.h:11
eic::ReconstructedParticle::pid
const std::int32_t & pid() const
Access the PID of reconstructed particle.
Definition: ReconstructedParticle.cc:63
eic::ReconstructedParticle::~ReconstructedParticle
~ReconstructedParticle()
destructor
Definition: ReconstructedParticle.cc:54
eic::ReconstructedParticle::time
const float & time() const
Access the Time in [ns].
Definition: ReconstructedParticle.cc:62
VectorXYZ.h
eic::ReconstructedParticle::operator==
bool operator==(const ReconstructedParticle &other) const
Definition: ReconstructedParticle.h:151
eic::ReconstructedParticle::clone
ReconstructedParticle clone() const
support cloning (deep-copy)
Definition: ReconstructedParticle.cc:50
eic::ReconstructedParticle::unlink
void unlink()
disconnect from ReconstructedParticleObj instance
Definition: ReconstructedParticle.h:149
eic::ReconstructedParticle::v
const eic::VectorXYZ & v() const
Access the vertex [mm].
Definition: ReconstructedParticle.cc:61
eic::ReconstructedParticle::id
unsigned int id() const
Definition: ReconstructedParticle.h:157
eic::ReconstructedParticle
Definition: ReconstructedParticle.h:25
eic::ReconstructedParticle::energy
const float & energy() const
Access the Particle energy, consistent with PID assigment [GeV].
Definition: ReconstructedParticle.cc:69
Weight.h
eic::ReconstructedParticle::ReconstructedParticle
ReconstructedParticle()
default constructor
Definition: ReconstructedParticle.cc:16
eic::ReconstructedParticleCollection
Definition: ReconstructedParticleCollection.h:76
eic::ConstReconstructedParticle
Definition: ReconstructedParticleConst.h:23
ReconstructedParticleConst.h
eic::ReconstructedParticleObj
Definition: ReconstructedParticleObj.h:18
eic::ReconstructedParticle::weight
const eic::Weight & weight() const
Access the Particle weight, e.g. from PID algorithm [0-1].
Definition: ReconstructedParticle.cc:66
eic::ReconstructedParticle::mass
const float & mass() const
Access the The mass of the particle in [GeV].
Definition: ReconstructedParticle.cc:70
eic::ReconstructedParticle::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: ReconstructedParticle.cc:97
Index.h
Direction.h
eic::Direction
Definition: Direction.h:13
eic::ReconstructedParticle::ConstReconstructedParticle
friend class ConstReconstructedParticle
Definition: ReconstructedParticle.h:29
eic::ReconstructedParticle::status
const std::int16_t & status() const
Access the Status code.
Definition: ReconstructedParticle.cc:64
eic::VectorXYZ
Definition: VectorXYZ.h:13