EDM4eic
EIC data model
Loading...
Searching...
No Matches
MutableTrackParameters.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_MutableTrackParameters_H
4#define EDM4EIC_MutableTrackParameters_H
5
7// Make the immutable class available from its mutable version but not vice versa
9
10#include "edm4eic/Cov6f.h"
11#include "edm4hep/Vector2f.h"
12#include <cstdint>
13
14#include "podio/utilities/MaybeSharedPtr.h"
15
16#include <cstdint>
17
18#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
19#include "nlohmann/json_fwd.hpp"
20#endif
21
22
23
24namespace edm4eic {
25
26
27/** @class MutableTrackParameters
28 * ACTS Bound Track parameters
29 * @author: W. Armstrong, S. Joosten, J. Osborn
30 */
32
35 friend class TrackParameters;
36
37public:
40
41 /// default constructor
43
44 /// Constructor initializing all members
45 MutableTrackParameters(std::int32_t type, std::uint64_t surface, edm4hep::Vector2f loc, float theta, float phi, float qOverP, float time, std::int32_t pdg, edm4eic::Cov6f covariance);
46
47 /// copy constructor
49
50 /// copy-assignment operator
52
53 /// create a mutable deep-copy of the object with identical relations
54 /// if cloneRelations=false, the relations are not cloned and will be empty
55 MutableTrackParameters clone(bool cloneRelations=true) const;
56
57 /// destructor
59
60
61public:
62
63 /// Access the Type of track parameters (-1/seed, 0/head, ...)
64 std::int32_t getType() const;
65
66 /// Access the Surface for bound parameters (geometryID)
67 std::uint64_t getSurface() const;
68
69 /// Access the 2D location on surface
70 const edm4hep::Vector2f& getLoc() const;
71
72 /// Access the Track polar angle [rad]
73 float getTheta() const;
74
75 /// Access the Track azimuthal angle [rad]
76 float getPhi() const;
77
78 /// Access the [e/GeV]
79 float getQOverP() const;
80
81 /// Access the Track time [ns]
82 float getTime() const;
83
84 /// Access the pdg pid for these parameters
85 std::int32_t getPdg() const;
86
87 /// Access the Full covariance in basis [l0,l1,theta,phi,q/p,t]
88 const edm4eic::Cov6f& getCovariance() const;
89
90
91
92 /// Set the Type of track parameters (-1/seed, 0/head, ...)
93 void setType(std::int32_t value);
94 /// Get mutable reference to Type of track parameters (-1/seed, 0/head, ...)
95 std::int32_t& getType();
96 /// Get reference to Type of track parameters (-1/seed, 0/head, ...)
97 [[deprecated("use getType instead")]]
98 std::int32_t& type();
99
100 /// Set the Surface for bound parameters (geometryID)
101 void setSurface(std::uint64_t value);
102 /// Get mutable reference to Surface for bound parameters (geometryID)
103 std::uint64_t& getSurface();
104 /// Get reference to Surface for bound parameters (geometryID)
105 [[deprecated("use getSurface instead")]]
106 std::uint64_t& surface();
107
108 /// Set the 2D location on surface
109 void setLoc(edm4hep::Vector2f value);
110 /// Get mutable reference to 2D location on surface
111 edm4hep::Vector2f& getLoc();
112 /// Get reference to 2D location on surface
113 [[deprecated("use getLoc instead")]]
114 edm4hep::Vector2f& loc();
115
116 /// Set the Track polar angle [rad]
117 void setTheta(float value);
118 /// Get mutable reference to Track polar angle [rad]
119 float& getTheta();
120 /// Get reference to Track polar angle [rad]
121 [[deprecated("use getTheta instead")]]
122 float& theta();
123
124 /// Set the Track azimuthal angle [rad]
125 void setPhi(float value);
126 /// Get mutable reference to Track azimuthal angle [rad]
127 float& getPhi();
128 /// Get reference to Track azimuthal angle [rad]
129 [[deprecated("use getPhi instead")]]
130 float& phi();
131
132 /// Set the [e/GeV]
133 void setQOverP(float value);
134 /// Get mutable reference to [e/GeV]
135 float& getQOverP();
136 /// Get reference to [e/GeV]
137 [[deprecated("use getQOverP instead")]]
138 float& qOverP();
139
140 /// Set the Track time [ns]
141 void setTime(float value);
142 /// Get mutable reference to Track time [ns]
143 float& getTime();
144 /// Get reference to Track time [ns]
145 [[deprecated("use getTime instead")]]
146 float& time();
147
148 /// Set the pdg pid for these parameters
149 void setPdg(std::int32_t value);
150 /// Get mutable reference to pdg pid for these parameters
151 std::int32_t& getPdg();
152 /// Get reference to pdg pid for these parameters
153 [[deprecated("use getPdg instead")]]
154 std::int32_t& pdg();
155
156 /// Set the Full covariance in basis [l0,l1,theta,phi,q/p,t]
157 void setCovariance(edm4eic::Cov6f value);
158 /// Get mutable reference to Full covariance in basis [l0,l1,theta,phi,q/p,t]
160 /// Get reference to Full covariance in basis [l0,l1,theta,phi,q/p,t]
161 [[deprecated("use getCovariance instead")]]
163
164
165
166
167
168
169 /// check whether the object is actually available
170 bool isAvailable() const;
171 /// disconnect from TrackParametersObj instance
172 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackParametersObj>{nullptr}; }
173
174 bool operator==(const MutableTrackParameters& other) const { return m_obj == other.m_obj; }
175 bool operator==(const TrackParameters& other) const;
176
177 bool operator!=(const MutableTrackParameters& other) const { return !(*this == other); }
178 bool operator!=(const TrackParameters& other) const { return !(*this == other); }
179
180 // less comparison operator, so that objects can be e.g. stored in sets.
181 bool operator<(const MutableTrackParameters& other) const { return m_obj < other.m_obj; }
182
183 podio::ObjectID id() const { return getObjectID(); }
184
185 const podio::ObjectID getObjectID() const;
186
188 using std::swap;
189 swap(a.m_obj, b.m_obj); // swap out the internal pointers
190 }
191
192private:
193 /// constructor from existing TrackParametersObj
194 explicit MutableTrackParameters(podio::utils::MaybeSharedPtr<TrackParametersObj> obj);
195
196 podio::utils::MaybeSharedPtr<TrackParametersObj> m_obj{nullptr};
197};
198
199#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
200void to_json(nlohmann::json& j, const MutableTrackParameters& value);
201#endif
202
203
204} // namespace edm4eic
205
206
207#endif
Definition Cov6f.h:19
Definition MutableTrackParameters.h:31
void setCovariance(edm4eic::Cov6f value)
Set the Full covariance in basis [l0,l1,theta,phi,q/p,t].
Definition MutableTrackParameters.cc:84
bool isAvailable() const
check whether the object is actually available
Definition MutableTrackParameters.cc:94
void setTime(float value)
Set the Track time [ns].
Definition MutableTrackParameters.cc:78
float getQOverP() const
Access the [e/GeV].
Definition MutableTrackParameters.cc:54
void setSurface(std::uint64_t value)
Set the Surface for bound parameters (geometryID)
Definition MutableTrackParameters.cc:63
void setPhi(float value)
Set the Track azimuthal angle [rad].
Definition MutableTrackParameters.cc:72
float & time()
Get reference to Track time [ns].
Definition MutableTrackParameters.cc:80
void setLoc(edm4hep::Vector2f value)
Set the 2D location on surface.
Definition MutableTrackParameters.cc:66
void unlink()
disconnect from TrackParametersObj instance
Definition MutableTrackParameters.h:172
podio::ObjectID id() const
Definition MutableTrackParameters.h:183
const podio::ObjectID getObjectID() const
Definition MutableTrackParameters.cc:98
edm4hep::Vector2f & loc()
Get reference to 2D location on surface.
Definition MutableTrackParameters.cc:68
bool operator!=(const TrackParameters &other) const
Definition MutableTrackParameters.h:178
MutableTrackParameters(const MutableTrackParameters &other)=default
copy constructor
bool operator<(const MutableTrackParameters &other) const
Definition MutableTrackParameters.h:181
void setTheta(float value)
Set the Track polar angle [rad].
Definition MutableTrackParameters.cc:69
MutableTrackParameters clone(bool cloneRelations=true) const
Definition MutableTrackParameters.cc:39
std::int32_t & pdg()
Get reference to pdg pid for these parameters.
Definition MutableTrackParameters.cc:83
bool operator!=(const MutableTrackParameters &other) const
Definition MutableTrackParameters.h:177
MutableTrackParameters & operator=(MutableTrackParameters other)
copy-assignment operator
Definition MutableTrackParameters.cc:34
bool operator==(const MutableTrackParameters &other) const
Definition MutableTrackParameters.h:174
edm4eic::Cov6f & covariance()
Get reference to Full covariance in basis [l0,l1,theta,phi,q/p,t].
Definition MutableTrackParameters.cc:86
void setQOverP(float value)
Set the [e/GeV].
Definition MutableTrackParameters.cc:75
std::uint64_t & surface()
Get reference to Surface for bound parameters (geometryID)
Definition MutableTrackParameters.cc:65
std::int32_t getPdg() const
Access the pdg pid for these parameters.
Definition MutableTrackParameters.cc:56
float & phi()
Get reference to Track azimuthal angle [rad].
Definition MutableTrackParameters.cc:74
std::uint64_t getSurface() const
Access the Surface for bound parameters (geometryID)
Definition MutableTrackParameters.cc:50
void setType(std::int32_t value)
Set the Type of track parameters (-1/seed, 0/head, ...)
Definition MutableTrackParameters.cc:60
friend class TrackParameters
Definition MutableTrackParameters.h:35
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition MutableTrackParameters.cc:51
std::int32_t & type()
Get reference to Type of track parameters (-1/seed, 0/head, ...)
Definition MutableTrackParameters.cc:62
float & qOverP()
Get reference to [e/GeV].
Definition MutableTrackParameters.cc:77
const edm4eic::Cov6f & getCovariance() const
Access the Full covariance in basis [l0,l1,theta,phi,q/p,t].
Definition MutableTrackParameters.cc:57
friend void swap(MutableTrackParameters &a, MutableTrackParameters &b)
Definition MutableTrackParameters.h:187
~MutableTrackParameters()=default
destructor
float getTheta() const
Access the Track polar angle [rad].
Definition MutableTrackParameters.cc:52
float getPhi() const
Access the Track azimuthal angle [rad].
Definition MutableTrackParameters.cc:53
void setPdg(std::int32_t value)
Set the pdg pid for these parameters.
Definition MutableTrackParameters.cc:81
float getTime() const
Access the Track time [ns].
Definition MutableTrackParameters.cc:55
friend class TrackParametersCollection
Definition MutableTrackParameters.h:33
MutableTrackParameters()
default constructor
Definition MutableTrackParameters.cc:18
float & theta()
Get reference to Track polar angle [rad].
Definition MutableTrackParameters.cc:71
std::int32_t getType() const
Access the Type of track parameters (-1/seed, 0/head, ...)
Definition MutableTrackParameters.cc:49
Definition TrackParametersCollection.h:92
Definition TrackParameters.h:33
Definition TrackParametersCollection.h:63
Definition CalorimeterHit.cc:17