EICd
EIC data model
ReconstructedParticleConst.h
Go to the documentation of this file.
1 // AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2 
3 #ifndef EICD_ConstReconstructedParticle_H
4 #define EICD_ConstReconstructedParticle_H
5 
7 
8 #include "eicd/Direction.h"
9 #include "eicd/Index.h"
10 #include "eicd/VectorXYZ.h"
11 #include "eicd/Weight.h"
12 #include "podio/ObjectID.h"
13 
14 
15 
16 namespace eic {
17 
18 
19 /** @class ConstReconstructedParticle
20  * EIC Reconstructed Particle
21  * @author: W. Armstrong, S. Joosten
22  */
24 
25  friend class ReconstructedParticle;
28 
29 public:
30  /// default constructor
32  ConstReconstructedParticle(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);
33 
34  /// constructor from existing ReconstructedParticleObj
36 
37  /// copy constructor
39 
40  /// copy-assignment operator
42 
43  /// support cloning (deep-copy)
45 
46  /// destructor
48 
49 
50 public:
51 
52  /// Access the Unique particle index
53  const eic::Index& ID() const;
54 
55  /// Access the momentum vector [GeV]
56  const eic::VectorXYZ& p() const;
57 
58  /// Access the vertex [mm]
59  const eic::VectorXYZ& v() const;
60 
61  /// Access the Time in [ns]
62  const float& time() const;
63 
64  /// Access the PID of reconstructed particle.
65  const std::int32_t& pid() const;
66 
67  /// Access the Status code
68  const std::int16_t& status() const;
69 
70  /// Access the Particle charge (or sign)
71  const std::int16_t& charge() const;
72 
73  /// Access the Particle weight, e.g. from PID algorithm [0-1]
74  const eic::Weight& weight() const;
75 
76  /// Access the Direction (theta/phi of this particle [mrad])
77  const eic::Direction& direction() const;
78 
79  /// Access the particle 3-momentum magnitude [GeV]
80  const float& momentum() const;
81 
82  /// Access the Particle energy, consistent with PID assigment [GeV]
83  const float& energy() const;
84 
85  /// Access the The mass of the particle in [GeV]
86  const float& mass() const;
87 
88 
89 
90 
91 
92  /// check whether the object is actually available
93  bool isAvailable() const;
94  /// disconnect from ReconstructedParticleObj instance
95  void unlink() { m_obj = nullptr; }
96 
97  bool operator==(const ConstReconstructedParticle& other) const { return m_obj == other.m_obj; }
98  bool operator==(const ReconstructedParticle& other) const;
99 
100  // less comparison operator, so that objects can be e.g. stored in sets.
101  bool operator<(const ConstReconstructedParticle& other) const { return m_obj < other.m_obj; }
102 
103  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
104 
105  const podio::ObjectID getObjectID() const;
106 
107 private:
109 };
110 
111 } // namespace eic
112 
113 
114 #endif
eic::ConstReconstructedParticle::clone
ConstReconstructedParticle clone() const
support cloning (deep-copy)
Definition: ReconstructedParticleConst.cc:50
eic::ConstReconstructedParticle::ConstReconstructedParticle
ConstReconstructedParticle()
default constructor
Definition: ReconstructedParticleConst.cc:16
eic::Index
Definition: Index.h:11
eic::ConstReconstructedParticle::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: ReconstructedParticleConst.cc:75
eic::ConstReconstructedParticle::ID
const eic::Index & ID() const
Access the Unique particle index.
Definition: ReconstructedParticleConst.cc:57
eic::ConstReconstructedParticle::status
const std::int16_t & status() const
Access the Status code.
Definition: ReconstructedParticleConst.cc:62
eic::ConstReconstructedParticle::id
unsigned int id() const
Definition: ReconstructedParticleConst.h:103
eic::ConstReconstructedParticle::getObjectID
const podio::ObjectID getObjectID() const
Definition: ReconstructedParticleConst.cc:82
eic::ConstReconstructedParticle::operator==
bool operator==(const ConstReconstructedParticle &other) const
Definition: ReconstructedParticleConst.h:97
eic
Definition: BasicParticle.cc:13
eic::ConstReconstructedParticle::momentum
const float & momentum() const
Access the particle 3-momentum magnitude [GeV].
Definition: ReconstructedParticleConst.cc:66
ReconstructedParticleObj.h
eic::Weight
Definition: Weight.h:11
eic::ReconstructedParticleConstCollectionIterator
Definition: ReconstructedParticleCollection.h:51
eic::ConstReconstructedParticle::operator=
ConstReconstructedParticle & operator=(const ConstReconstructedParticle &other)
copy-assignment operator
Definition: ReconstructedParticleConst.cc:40
eic::ConstReconstructedParticle::operator<
bool operator<(const ConstReconstructedParticle &other) const
Definition: ReconstructedParticleConst.h:101
VectorXYZ.h
eic::ConstReconstructedParticle::time
const float & time() const
Access the Time in [ns].
Definition: ReconstructedParticleConst.cc:60
eic::ConstReconstructedParticle::mass
const float & mass() const
Access the The mass of the particle in [GeV].
Definition: ReconstructedParticleConst.cc:68
eic::ReconstructedParticle
Definition: ReconstructedParticle.h:25
Weight.h
eic::ConstReconstructedParticle::pid
const std::int32_t & pid() const
Access the PID of reconstructed particle.
Definition: ReconstructedParticleConst.cc:61
eic::ReconstructedParticleCollection
Definition: ReconstructedParticleCollection.h:76
eic::ConstReconstructedParticle::weight
const eic::Weight & weight() const
Access the Particle weight, e.g. from PID algorithm [0-1].
Definition: ReconstructedParticleConst.cc:64
eic::ConstReconstructedParticle::direction
const eic::Direction & direction() const
Access the Direction (theta/phi of this particle [mrad])
Definition: ReconstructedParticleConst.cc:65
eic::ConstReconstructedParticle
Definition: ReconstructedParticleConst.h:23
eic::ReconstructedParticleObj
Definition: ReconstructedParticleObj.h:18
eic::ConstReconstructedParticle::p
const eic::VectorXYZ & p() const
Access the momentum vector [GeV].
Definition: ReconstructedParticleConst.cc:58
eic::ConstReconstructedParticle::energy
const float & energy() const
Access the Particle energy, consistent with PID assigment [GeV].
Definition: ReconstructedParticleConst.cc:67
Index.h
Direction.h
eic::ConstReconstructedParticle::v
const eic::VectorXYZ & v() const
Access the vertex [mm].
Definition: ReconstructedParticleConst.cc:59
eic::Direction
Definition: Direction.h:13
eic::ConstReconstructedParticle::unlink
void unlink()
disconnect from ReconstructedParticleObj instance
Definition: ReconstructedParticleConst.h:95
eic::VectorXYZ
Definition: VectorXYZ.h:13
eic::ConstReconstructedParticle::~ConstReconstructedParticle
~ConstReconstructedParticle()
destructor
Definition: ReconstructedParticleConst.cc:54
eic::ConstReconstructedParticle::charge
const std::int16_t & charge() const
Access the Particle charge (or sign)
Definition: ReconstructedParticleConst.cc:63