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 <ostream>
17#include <cstddef>
18
19#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
20#include "nlohmann/json_fwd.hpp"
21#endif
22
23
24
25namespace edm4eic {
26
27
28/** @class MutableTrackParameters
29 * ACTS Bound Track parameters
30 * @author: W. Armstrong, S. Joosten, J. Osborn
31 */
33
36 friend class TrackParameters;
37
38public:
41
42 /// default constructor
44
45 /// Constructor initializing all members
46 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);
47
48 /// copy constructor
50
51 /// copy-assignment operator
53
54 /// create a mutable deep-copy of the object with identical relations
56
57 /// destructor
59
60
61 /// conversion to const object
62 operator TrackParameters() const;
63
64public:
65
66 /// Access the Type of track parameters (-1/seed, 0/head, ...)
67 std::int32_t getType() const;
68
69 /// Access the Surface for bound parameters (geometryID)
70 std::uint64_t getSurface() const;
71
72 /// Access the 2D location on surface
73 const edm4hep::Vector2f& getLoc() const;
74
75 /// Access the Track polar angle [rad]
76 float getTheta() const;
77
78 /// Access the Track azimuthal angle [rad]
79 float getPhi() const;
80
81 /// Access the [e/GeV]
82 float getQOverP() const;
83
84 /// Access the Track time [ns]
85 float getTime() const;
86
87 /// Access the pdg pid for these parameters
88 std::int32_t getPdg() const;
89
90 /// Access the Full covariance in basis [l0,l1,theta,phi,q/p,t]
91 const edm4eic::Cov6f& getCovariance() const;
92
93
94
95 /// Set the Type of track parameters (-1/seed, 0/head, ...)
96 void setType(std::int32_t value);
97
98 /// Set the Surface for bound parameters (geometryID)
99 void setSurface(std::uint64_t value);
100
101 /// Set the 2D location on surface
102 void setLoc(edm4hep::Vector2f value);
103 /// Get reference to 2D location on surface
104 edm4hep::Vector2f& loc();
105
106 /// Set the Track polar angle [rad]
107 void setTheta(float value);
108
109 /// Set the Track azimuthal angle [rad]
110 void setPhi(float value);
111
112 /// Set the [e/GeV]
113 void setQOverP(float value);
114
115 /// Set the Track time [ns]
116 void setTime(float value);
117
118 /// Set the pdg pid for these parameters
119 void setPdg(std::int32_t value);
120
121 /// Set the Full covariance in basis [l0,l1,theta,phi,q/p,t]
122 void setCovariance(edm4eic::Cov6f value);
123 /// Get reference to Full covariance in basis [l0,l1,theta,phi,q/p,t]
125
126
127
128
129
130
131 /// check whether the object is actually available
132 bool isAvailable() const;
133 /// disconnect from TrackParametersObj instance
134 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackParametersObj>{nullptr}; }
135
136 bool operator==(const MutableTrackParameters& other) const { return m_obj == other.m_obj; }
137 bool operator==(const TrackParameters& other) const;
138
139 // less comparison operator, so that objects can be e.g. stored in sets.
140 bool operator<(const MutableTrackParameters& other) const { return m_obj < other.m_obj; }
141
142 podio::ObjectID id() const { return getObjectID(); }
143
144 const podio::ObjectID getObjectID() const;
145
147 using std::swap;
148 swap(a.m_obj, b.m_obj); // swap out the internal pointers
149 }
150
151private:
152 /// constructor from existing TrackParametersObj
153 explicit MutableTrackParameters(podio::utils::MaybeSharedPtr<TrackParametersObj> obj);
154
155 podio::utils::MaybeSharedPtr<TrackParametersObj> m_obj{nullptr};
156};
157
158#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
159void to_json(nlohmann::json& j, const MutableTrackParameters& value);
160#endif
161
162
163} // namespace edm4eic
164
165
166#endif
Definition Cov6f.h:19
Definition MutableTrackParameters.h:32
void setCovariance(edm4eic::Cov6f value)
Set the Full covariance in basis [l0,l1,theta,phi,q/p,t].
Definition MutableTrackParameters.cc:69
bool isAvailable() const
check whether the object is actually available
Definition MutableTrackParameters.cc:78
void setTime(float value)
Set the Track time [ns].
Definition MutableTrackParameters.cc:67
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:61
void setPhi(float value)
Set the Track azimuthal angle [rad].
Definition MutableTrackParameters.cc:65
void setLoc(edm4hep::Vector2f value)
Set the 2D location on surface.
Definition MutableTrackParameters.cc:62
void unlink()
disconnect from TrackParametersObj instance
Definition MutableTrackParameters.h:134
MutableTrackParameters clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableTrackParameters.cc:42
podio::ObjectID id() const
Definition MutableTrackParameters.h:142
const podio::ObjectID getObjectID() const
Definition MutableTrackParameters.cc:85
edm4hep::Vector2f & loc()
Get reference to 2D location on surface.
Definition MutableTrackParameters.cc:63
MutableTrackParameters(const MutableTrackParameters &other)=default
copy constructor
bool operator<(const MutableTrackParameters &other) const
Definition MutableTrackParameters.h:140
void setTheta(float value)
Set the Track polar angle [rad].
Definition MutableTrackParameters.cc:64
MutableTrackParameters & operator=(MutableTrackParameters other)
copy-assignment operator
Definition MutableTrackParameters.cc:37
bool operator==(const MutableTrackParameters &other) const
Definition MutableTrackParameters.h:136
edm4eic::Cov6f & covariance()
Get reference to Full covariance in basis [l0,l1,theta,phi,q/p,t].
Definition MutableTrackParameters.cc:70
void setQOverP(float value)
Set the [e/GeV].
Definition MutableTrackParameters.cc:66
std::int32_t getPdg() const
Access the pdg pid for these parameters.
Definition MutableTrackParameters.cc:56
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:36
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition MutableTrackParameters.cc:51
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:146
~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:68
float getTime() const
Access the Track time [ns].
Definition MutableTrackParameters.cc:55
friend class TrackParametersCollection
Definition MutableTrackParameters.h:34
MutableTrackParameters()
default constructor
Definition MutableTrackParameters.cc:21
std::int32_t getType() const
Access the Type of track parameters (-1/seed, 0/head, ...)
Definition MutableTrackParameters.cc:49
Definition TrackParametersCollection.h:95
Definition TrackParameters.h:33
Definition TrackParametersCollection.h:66
Definition CalorimeterHit.cc:18