EICd
EIC data model
MutableTrackParameters.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EICD_MutableTrackParameters_H
4#define EICD_MutableTrackParameters_H
5
7// Make the immutable class available from its mutable version but not vice versa
9
10#include "eicd/Cov2f.h"
11#include "eicd/Cov3f.h"
12#include "edm4hep/Vector2f.h"
13#include <cstdint>
14#include "podio/ObjectID.h"
15#include <ostream>
16
17#ifdef PODIO_JSON_OUTPUT
18#include "nlohmann/json.hpp"
19#endif
20
21// forward declarations
22namespace eicd {
23class Trajectory;
24class MutableTrajectory;
25}
26
27
28namespace eicd {
29
30
31/** @class MutableTrackParameters
32 * ACTS Bound Track parameters
33 * @author: W. Armstrong, S. Joosten
34 */
36
39 friend class TrackParameters;
40
41public:
42
43 /// default constructor
45 MutableTrackParameters(std::int32_t type, edm4hep::Vector2f loc, eicd::Cov2f locError, float theta, float phi, float qOverP, eicd::Cov3f momentumError, float time, float timeError, float charge);
46
47 /// constructor from existing TrackParametersObj
49
50 /// copy constructor
52
53 /// copy-assignment operator
55
56 /// create a mutable deep-copy of the object with identical relations
58
59 /// destructor
61
62 /// conversion to const object
63 operator TrackParameters() const;
64
65public:
66
67 /// Access the Type of track parameters (-1/seed, 0/head, ...)
68 const std::int32_t& getType() const;
69
70 /// Access the 2D location on surface
71 const edm4hep::Vector2f& getLoc() const;
72
73 /// Access the Covariance on loc
74 const eicd::Cov2f& getLocError() const;
75
76 /// Access the Track polar angle [rad]
77 const float& getTheta() const;
78
79 /// Access the Track azimuthal angle [rad]
80 const float& getPhi() const;
81
82 /// Access the [e/GeV]
83 const float& getQOverP() const;
84
85 /// Access the Covariance on theta, phi and qOverP
86 const eicd::Cov3f& getMomentumError() const;
87
88 /// Access the Track time [ns]
89 const float& getTime() const;
90
91 /// Access the Error on the time
92 const float& getTimeError() const;
93
94 /// Access the Particle charge
95 const float& getCharge() const;
96
97
98 /// Access the Trajectory associated with these track parameters
99 const eicd::Trajectory getTrajectory() const;
100
101 /// Set the Type of track parameters (-1/seed, 0/head, ...)
102 void setType(std::int32_t value);
103
104 /// Set the 2D location on surface
105 void setLoc(edm4hep::Vector2f value);
106 /// Get reference to 2D location on surface
107 edm4hep::Vector2f& loc();
108
109 /// Set the Covariance on loc
110 void setLocError(eicd::Cov2f value);
111 /// Get reference to Covariance on loc
113
114 /// Set the Track polar angle [rad]
115 void setTheta(float value);
116
117 /// Set the Track azimuthal angle [rad]
118 void setPhi(float value);
119
120 /// Set the [e/GeV]
121 void setQOverP(float value);
122
123 /// Set the Covariance on theta, phi and qOverP
124 void setMomentumError(eicd::Cov3f value);
125 /// Get reference to Covariance on theta, phi and qOverP
127
128 /// Set the Track time [ns]
129 void setTime(float value);
130
131 /// Set the Error on the time
132 void setTimeError(float value);
133
134 /// Set the Particle charge
135 void setCharge(float value);
136
137
138 /// Set the Trajectory associated with these track parameters
140
141
142
143
144 /// check whether the object is actually available
145 bool isAvailable() const;
146 /// disconnect from TrackParametersObj instance
147 void unlink() { m_obj = nullptr; }
148
149 bool operator==(const MutableTrackParameters& other) const { return m_obj == other.m_obj; }
150 bool operator==(const TrackParameters& other) const;
151
152 // less comparison operator, so that objects can be e.g. stored in sets.
153 bool operator<(const MutableTrackParameters& other) const { return m_obj < other.m_obj; }
154
155 unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
156
157 const podio::ObjectID getObjectID() const;
158
160 using std::swap;
161 swap(a.m_obj, b.m_obj); // swap out the internal pointers
162 }
163
164private:
165 TrackParametersObj* m_obj;
166};
167
168#ifdef PODIO_JSON_OUTPUT
169void to_json(nlohmann::json& j, const MutableTrackParameters& value);
170#endif
171
172
173} // namespace eicd
174
175
176#endif
Definition: Cov2f.h:15
Definition: Cov3f.h:15
Definition: MutableTrackParameters.h:35
const float & getQOverP() const
Access the [e/GeV].
Definition: MutableTrackParameters.cc:66
void setTrajectory(eicd::Trajectory value)
Set the Trajectory associated with these track parameters.
Definition: MutableTrackParameters.cc:94
void setTimeError(float value)
Set the Error on the time.
Definition: MutableTrackParameters.cc:91
void setLoc(edm4hep::Vector2f value)
Set the 2D location on surface.
Definition: MutableTrackParameters.cc:81
void setTheta(float value)
Set the Track polar angle [rad].
Definition: MutableTrackParameters.cc:85
edm4hep::Vector2f & loc()
Get reference to 2D location on surface.
Definition: MutableTrackParameters.cc:82
bool operator<(const MutableTrackParameters &other) const
Definition: MutableTrackParameters.h:153
void setTime(float value)
Set the Track time [ns].
Definition: MutableTrackParameters.cc:90
~MutableTrackParameters()
destructor
Definition: MutableTrackParameters.cc:54
const eicd::Cov2f & getLocError() const
Access the Covariance on loc.
Definition: MutableTrackParameters.cc:63
void setCharge(float value)
Set the Particle charge.
Definition: MutableTrackParameters.cc:92
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition: MutableTrackParameters.cc:62
const eicd::Cov3f & getMomentumError() const
Access the Covariance on theta, phi and qOverP.
Definition: MutableTrackParameters.cc:67
const eicd::Trajectory getTrajectory() const
Access the Trajectory associated with these track parameters.
Definition: MutableTrackParameters.cc:72
const float & getPhi() const
Access the Track azimuthal angle [rad].
Definition: MutableTrackParameters.cc:65
void setLocError(eicd::Cov2f value)
Set the Covariance on loc.
Definition: MutableTrackParameters.cc:83
const float & getCharge() const
Access the Particle charge.
Definition: MutableTrackParameters.cc:70
bool isAvailable() const
check whether the object is actually available
Definition: MutableTrackParameters.cc:107
unsigned int id() const
Definition: MutableTrackParameters.h:155
bool operator==(const MutableTrackParameters &other) const
Definition: MutableTrackParameters.h:149
void setType(std::int32_t value)
Set the Type of track parameters (-1/seed, 0/head, ...)
Definition: MutableTrackParameters.cc:80
void setPhi(float value)
Set the Track azimuthal angle [rad].
Definition: MutableTrackParameters.cc:86
friend class TrackParameters
Definition: MutableTrackParameters.h:39
MutableTrackParameters & operator=(MutableTrackParameters other)
copy-assignment operator
Definition: MutableTrackParameters.cc:39
friend void swap(MutableTrackParameters &a, MutableTrackParameters &b)
Definition: MutableTrackParameters.h:159
void setQOverP(float value)
Set the [e/GeV].
Definition: MutableTrackParameters.cc:87
const float & getTime() const
Access the Track time [ns].
Definition: MutableTrackParameters.cc:68
const std::int32_t & getType() const
Access the Type of track parameters (-1/seed, 0/head, ...)
Definition: MutableTrackParameters.cc:61
eicd::Cov3f & momentumError()
Get reference to Covariance on theta, phi and qOverP.
Definition: MutableTrackParameters.cc:89
const float & getTheta() const
Access the Track polar angle [rad].
Definition: MutableTrackParameters.cc:64
const float & getTimeError() const
Access the Error on the time.
Definition: MutableTrackParameters.cc:69
void unlink()
disconnect from TrackParametersObj instance
Definition: MutableTrackParameters.h:147
MutableTrackParameters()
default constructor
Definition: MutableTrackParameters.cc:17
MutableTrackParameters clone() const
create a mutable deep-copy of the object with identical relations
Definition: MutableTrackParameters.cc:50
eicd::Cov2f & locError()
Get reference to Covariance on loc.
Definition: MutableTrackParameters.cc:84
const podio::ObjectID getObjectID() const
Definition: MutableTrackParameters.cc:114
void setMomentumError(eicd::Cov3f value)
Set the Covariance on theta, phi and qOverP.
Definition: MutableTrackParameters.cc:88
Definition: TrackParametersCollection.h:82
Definition: TrackParameters.h:34
Definition: TrackParametersCollection.h:57
Definition: TrackParametersObj.h:21
Definition: Trajectory.h:34
Definition: CalorimeterHit.cc:13