EDM4eic
EIC data model
Loading...
Searching...
No Matches
MutableTrajectory.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_MutableTrajectory_H
4#define EDM4EIC_MutableTrajectory_H
5
7// Make the immutable class available from its mutable version but not vice versa
9
12#include "podio/RelationRange.h"
13#include <cstdint>
14#include <vector>
15
16#include "podio/utilities/MaybeSharedPtr.h"
17
18#include <cstdint>
19
20#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
21#include "nlohmann/json_fwd.hpp"
22#endif
23
24// forward declarations
25namespace edm4eic {
26class TrackSeed;
27class MutableTrackSeed;
28}
29
30
31namespace edm4eic {
32
33
34/** @class MutableTrajectory
35 * Raw trajectory from the tracking algorithm. What is called hit here is 2d measurement indeed.
36 * @author: S. Joosten, S. Li
37 */
39
42 friend class Trajectory;
43
44public:
47
48 /// default constructor
50
51 /// Constructor initializing all members
52 MutableTrajectory(std::uint32_t type, std::uint32_t nStates, std::uint32_t nMeasurements, std::uint32_t nOutliers, std::uint32_t nHoles, std::uint32_t nSharedHits);
53
54 /// copy constructor
55 MutableTrajectory(const MutableTrajectory& other) = default;
56
57 /// copy-assignment operator
59
60 /// create a mutable deep-copy of the object with identical relations
61 /// if cloneRelations=false, the relations are not cloned and will be empty
62 MutableTrajectory clone(bool cloneRelations=true) const;
63
64 /// destructor
65 ~MutableTrajectory() = default;
66
67
68public:
69
70 /// Access the 0 (does not have good track fit), 1 (has good track fit)
71 std::uint32_t getType() const;
72
73 /// Access the Number of tracking steps
74 std::uint32_t getNStates() const;
75
76 /// Access the Number of hits used
77 std::uint32_t getNMeasurements() const;
78
79 /// Access the Number of hits not considered
80 std::uint32_t getNOutliers() const;
81
82 /// Access the Number of missing hits
83 std::uint32_t getNHoles() const;
84
85 /// Access the Number of shared hits with other trajectories
86 std::uint32_t getNSharedHits() const;
87
88
89 /// Access the Corresponding track seed
90 const edm4eic::TrackSeed getSeed() const;
91
92 /// Set the 0 (does not have good track fit), 1 (has good track fit)
93 void setType(std::uint32_t value);
94 /// Get mutable reference to 0 (does not have good track fit), 1 (has good track fit)
95 std::uint32_t& getType();
96 /// Get reference to 0 (does not have good track fit), 1 (has good track fit)
97 [[deprecated("use getType instead")]]
98 std::uint32_t& type();
99
100 /// Set the Number of tracking steps
101 void setNStates(std::uint32_t value);
102 /// Get mutable reference to Number of tracking steps
103 std::uint32_t& getNStates();
104 /// Get reference to Number of tracking steps
105 [[deprecated("use getNStates instead")]]
106 std::uint32_t& nStates();
107
108 /// Set the Number of hits used
109 void setNMeasurements(std::uint32_t value);
110 /// Get mutable reference to Number of hits used
111 std::uint32_t& getNMeasurements();
112 /// Get reference to Number of hits used
113 [[deprecated("use getNMeasurements instead")]]
114 std::uint32_t& nMeasurements();
115
116 /// Set the Number of hits not considered
117 void setNOutliers(std::uint32_t value);
118 /// Get mutable reference to Number of hits not considered
119 std::uint32_t& getNOutliers();
120 /// Get reference to Number of hits not considered
121 [[deprecated("use getNOutliers instead")]]
122 std::uint32_t& nOutliers();
123
124 /// Set the Number of missing hits
125 void setNHoles(std::uint32_t value);
126 /// Get mutable reference to Number of missing hits
127 std::uint32_t& getNHoles();
128 /// Get reference to Number of missing hits
129 [[deprecated("use getNHoles instead")]]
130 std::uint32_t& nHoles();
131
132 /// Set the Number of shared hits with other trajectories
133 void setNSharedHits(std::uint32_t value);
134 /// Get mutable reference to Number of shared hits with other trajectories
135 std::uint32_t& getNSharedHits();
136 /// Get reference to Number of shared hits with other trajectories
137 [[deprecated("use getNSharedHits instead")]]
138 std::uint32_t& nSharedHits();
139
140
141 /// Set the Corresponding track seed
142 void setSeed(const edm4eic::TrackSeed& value);
143
145 std::size_t trackParameters_size() const;
147 std::vector<edm4eic::TrackParameters>::const_iterator trackParameters_begin() const;
148 std::vector<edm4eic::TrackParameters>::const_iterator trackParameters_end() const;
149 podio::RelationRange<edm4eic::TrackParameters> getTrackParameters() const;
151 std::size_t measurements_deprecated_size() const;
153 std::vector<edm4eic::Measurement2D>::const_iterator measurements_deprecated_begin() const;
154 std::vector<edm4eic::Measurement2D>::const_iterator measurements_deprecated_end() const;
155 podio::RelationRange<edm4eic::Measurement2D> getMeasurements_deprecated() const;
157 std::size_t outliers_deprecated_size() const;
159 std::vector<edm4eic::Measurement2D>::const_iterator outliers_deprecated_begin() const;
160 std::vector<edm4eic::Measurement2D>::const_iterator outliers_deprecated_end() const;
161 podio::RelationRange<edm4eic::Measurement2D> getOutliers_deprecated() const;
162 void addToMeasurementChi2(const float&);
163 std::size_t measurementChi2_size() const;
164 float getMeasurementChi2(std::size_t) const;
165 std::vector<float>::const_iterator measurementChi2_begin() const;
166 std::vector<float>::const_iterator measurementChi2_end() const;
167 podio::RelationRange<float> getMeasurementChi2() const;
168 void addToOutlierChi2(const float&);
169 std::size_t outlierChi2_size() const;
170 float getOutlierChi2(std::size_t) const;
171 std::vector<float>::const_iterator outlierChi2_begin() const;
172 std::vector<float>::const_iterator outlierChi2_end() const;
173 podio::RelationRange<float> getOutlierChi2() const;
174
175
176
177 /// check whether the object is actually available
178 bool isAvailable() const;
179 /// disconnect from TrajectoryObj instance
180 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrajectoryObj>{nullptr}; }
181
182 bool operator==(const MutableTrajectory& other) const { return m_obj == other.m_obj; }
183 bool operator==(const Trajectory& other) const;
184
185 bool operator!=(const MutableTrajectory& other) const { return !(*this == other); }
186 bool operator!=(const Trajectory& other) const { return !(*this == other); }
187
188 // less comparison operator, so that objects can be e.g. stored in sets.
189 bool operator<(const MutableTrajectory& other) const { return m_obj < other.m_obj; }
190
191 podio::ObjectID id() const { return getObjectID(); }
192
193 const podio::ObjectID getObjectID() const;
194
196 using std::swap;
197 swap(a.m_obj, b.m_obj); // swap out the internal pointers
198 }
199
200private:
201 /// constructor from existing TrajectoryObj
202 explicit MutableTrajectory(podio::utils::MaybeSharedPtr<TrajectoryObj> obj);
203
204 podio::utils::MaybeSharedPtr<TrajectoryObj> m_obj{nullptr};
205};
206
207#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
208void to_json(nlohmann::json& j, const MutableTrajectory& value);
209#endif
210
211
212} // namespace edm4eic
213
214
215#endif
Definition Measurement2D.h:36
Definition MutableTrajectory.h:38
std::uint32_t getNMeasurements() const
Access the Number of hits used.
Definition MutableTrajectory.cc:64
podio::RelationRange< edm4eic::Measurement2D > getOutliers_deprecated() const
Definition MutableTrajectory.cc:202
std::vector< float >::const_iterator outlierChi2_begin() const
Definition MutableTrajectory.cc:251
podio::RelationRange< float > getMeasurementChi2() const
Definition MutableTrajectory.cc:238
std::size_t outliers_deprecated_size() const
Definition MutableTrajectory.cc:191
podio::RelationRange< edm4eic::TrackParameters > getTrackParameters() const
Definition MutableTrajectory.cc:130
bool operator<(const MutableTrajectory &other) const
Definition MutableTrajectory.h:189
std::uint32_t getNOutliers() const
Access the Number of hits not considered.
Definition MutableTrajectory.cc:65
void setNMeasurements(std::uint32_t value)
Set the Number of hits used.
Definition MutableTrajectory.cc:83
void addToMeasurementChi2(const float &)
Definition MutableTrajectory.cc:210
std::vector< edm4eic::Measurement2D >::const_iterator outliers_deprecated_end() const
Definition MutableTrajectory.cc:185
std::uint32_t & type()
Get reference to 0 (does not have good track fit), 1 (has good track fit)
Definition MutableTrajectory.cc:79
std::size_t measurements_deprecated_size() const
Definition MutableTrajectory.cc:155
std::uint32_t & nSharedHits()
Get reference to Number of shared hits with other trajectories.
Definition MutableTrajectory.cc:94
std::uint32_t & nOutliers()
Get reference to Number of hits not considered.
Definition MutableTrajectory.cc:88
void addToOutliers_deprecated(const edm4eic::Measurement2D &)
Definition MutableTrajectory.cc:174
podio::ObjectID id() const
Definition MutableTrajectory.h:191
bool operator==(const MutableTrajectory &other) const
Definition MutableTrajectory.h:182
MutableTrajectory(const MutableTrajectory &other)=default
copy constructor
void addToMeasurements_deprecated(const edm4eic::Measurement2D &)
Definition MutableTrajectory.cc:138
std::uint32_t & nStates()
Get reference to Number of tracking steps.
Definition MutableTrajectory.cc:82
void setNSharedHits(std::uint32_t value)
Set the Number of shared hits with other trajectories.
Definition MutableTrajectory.cc:92
void addToTrackParameters(const edm4eic::TrackParameters &)
Definition MutableTrajectory.cc:102
void setNStates(std::uint32_t value)
Set the Number of tracking steps.
Definition MutableTrajectory.cc:80
void setNOutliers(std::uint32_t value)
Set the Number of hits not considered.
Definition MutableTrajectory.cc:86
std::vector< edm4eic::Measurement2D >::const_iterator measurements_deprecated_end() const
Definition MutableTrajectory.cc:149
~MutableTrajectory()=default
destructor
const edm4eic::TrackSeed getSeed() const
Access the Corresponding track seed.
Definition MutableTrajectory.cc:69
void setNHoles(std::uint32_t value)
Set the Number of missing hits.
Definition MutableTrajectory.cc:89
MutableTrajectory & operator=(MutableTrajectory other)
copy-assignment operator
Definition MutableTrajectory.cc:32
std::vector< float >::const_iterator measurementChi2_end() const
Definition MutableTrajectory.cc:221
bool operator!=(const Trajectory &other) const
Definition MutableTrajectory.h:186
friend class TrajectoryCollection
Definition MutableTrajectory.h:40
MutableTrajectory clone(bool cloneRelations=true) const
Definition MutableTrajectory.cc:37
MutableTrajectory()
default constructor
Definition MutableTrajectory.cc:19
std::vector< float >::const_iterator outlierChi2_end() const
Definition MutableTrajectory.cc:257
bool isAvailable() const
check whether the object is actually available
Definition MutableTrajectory.cc:287
podio::RelationRange< float > getOutlierChi2() const
Definition MutableTrajectory.cc:274
void setSeed(const edm4eic::TrackSeed &value)
Set the Corresponding track seed.
Definition MutableTrajectory.cc:96
std::uint32_t getType() const
Access the 0 (does not have good track fit), 1 (has good track fit)
Definition MutableTrajectory.cc:62
std::vector< float >::const_iterator measurementChi2_begin() const
Definition MutableTrajectory.cc:215
std::uint32_t getNStates() const
Access the Number of tracking steps.
Definition MutableTrajectory.cc:63
friend class Trajectory
Definition MutableTrajectory.h:42
const podio::ObjectID getObjectID() const
Definition MutableTrajectory.cc:291
std::uint32_t getNHoles() const
Access the Number of missing hits.
Definition MutableTrajectory.cc:66
bool operator!=(const MutableTrajectory &other) const
Definition MutableTrajectory.h:185
std::uint32_t & nMeasurements()
Get reference to Number of hits used.
Definition MutableTrajectory.cc:85
std::size_t measurementChi2_size() const
Definition MutableTrajectory.cc:227
void unlink()
disconnect from TrajectoryObj instance
Definition MutableTrajectory.h:180
std::vector< edm4eic::Measurement2D >::const_iterator measurements_deprecated_begin() const
Definition MutableTrajectory.cc:143
podio::RelationRange< edm4eic::Measurement2D > getMeasurements_deprecated() const
Definition MutableTrajectory.cc:166
std::uint32_t & nHoles()
Get reference to Number of missing hits.
Definition MutableTrajectory.cc:91
void addToOutlierChi2(const float &)
Definition MutableTrajectory.cc:246
void setType(std::uint32_t value)
Set the 0 (does not have good track fit), 1 (has good track fit)
Definition MutableTrajectory.cc:77
std::vector< edm4eic::Measurement2D >::const_iterator outliers_deprecated_begin() const
Definition MutableTrajectory.cc:179
friend void swap(MutableTrajectory &a, MutableTrajectory &b)
Definition MutableTrajectory.h:195
std::size_t outlierChi2_size() const
Definition MutableTrajectory.cc:263
std::vector< edm4eic::TrackParameters >::const_iterator trackParameters_end() const
Definition MutableTrajectory.cc:113
std::uint32_t getNSharedHits() const
Access the Number of shared hits with other trajectories.
Definition MutableTrajectory.cc:67
std::vector< edm4eic::TrackParameters >::const_iterator trackParameters_begin() const
Definition MutableTrajectory.cc:107
std::size_t trackParameters_size() const
Definition MutableTrajectory.cc:119
Definition TrackParameters.h:33
Definition TrackSeed.h:39
Definition TrajectoryCollection.h:92
Definition Trajectory.h:40
Definition TrajectoryCollection.h:63
Definition CalorimeterHit.cc:17