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