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 <ostream>
19#include <cstddef>
20
21#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
22#include "nlohmann/json_fwd.hpp"
23#endif
24
25// forward declarations
26namespace edm4eic {
27class TrackSeed;
28class MutableTrackSeed;
29}
30
31
32namespace edm4eic {
33
34
35/** @class MutableTrajectory
36 * Raw trajectory from the tracking algorithm. What is called hit here is 2d measurement indeed.
37 * @author: S. Joosten, S. Li
38 */
40
43 friend class Trajectory;
44
45public:
48
49 /// default constructor
51
52 /// Constructor initializing all members
53 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);
54
55 /// copy constructor
56 MutableTrajectory(const MutableTrajectory& other) = default;
57
58 /// copy-assignment operator
60
61 /// create a mutable deep-copy of the object with identical relations
63
64 /// destructor
65 ~MutableTrajectory() = default;
66
67
68 /// conversion to const object
69 operator Trajectory() const;
70
71public:
72
73 /// Access the 0 (does not have good track fit), 1 (has good track fit)
74 std::uint32_t getType() const;
75
76 /// Access the Number of tracking steps
77 std::uint32_t getNStates() const;
78
79 /// Access the Number of hits used
80 std::uint32_t getNMeasurements() const;
81
82 /// Access the Number of hits not considered
83 std::uint32_t getNOutliers() const;
84
85 /// Access the Number of missing hits
86 std::uint32_t getNHoles() const;
87
88 /// Access the Number of shared hits with other trajectories
89 std::uint32_t getNSharedHits() const;
90
91
92 /// Access the Corresponding track seed
93 const edm4eic::TrackSeed getSeed() const;
94
95 /// Set the 0 (does not have good track fit), 1 (has good track fit)
96 void setType(std::uint32_t value);
97
98 /// Set the Number of tracking steps
99 void setNStates(std::uint32_t value);
100
101 /// Set the Number of hits used
102 void setNMeasurements(std::uint32_t value);
103
104 /// Set the Number of hits not considered
105 void setNOutliers(std::uint32_t value);
106
107 /// Set the Number of missing hits
108 void setNHoles(std::uint32_t value);
109
110 /// Set the Number of shared hits with other trajectories
111 void setNSharedHits(std::uint32_t value);
112
113
114 /// Set the Corresponding track seed
115 void setSeed(edm4eic::TrackSeed value);
116
118 std::size_t trackParameters_size() const;
120 std::vector<edm4eic::TrackParameters>::const_iterator trackParameters_begin() const;
121 std::vector<edm4eic::TrackParameters>::const_iterator trackParameters_end() const;
122 podio::RelationRange<edm4eic::TrackParameters> getTrackParameters() const;
124 std::size_t measurements_deprecated_size() const;
126 std::vector<edm4eic::Measurement2D>::const_iterator measurements_deprecated_begin() const;
127 std::vector<edm4eic::Measurement2D>::const_iterator measurements_deprecated_end() const;
128 podio::RelationRange<edm4eic::Measurement2D> getMeasurements_deprecated() const;
130 std::size_t outliers_deprecated_size() const;
132 std::vector<edm4eic::Measurement2D>::const_iterator outliers_deprecated_begin() const;
133 std::vector<edm4eic::Measurement2D>::const_iterator outliers_deprecated_end() const;
134 podio::RelationRange<edm4eic::Measurement2D> getOutliers_deprecated() const;
135 void addToMeasurementChi2(float);
136 std::size_t measurementChi2_size() const;
137 float getMeasurementChi2(std::size_t) const;
138 std::vector<float>::const_iterator measurementChi2_begin() const;
139 std::vector<float>::const_iterator measurementChi2_end() const;
140 podio::RelationRange<float> getMeasurementChi2() const;
141 void addToOutlierChi2(float);
142 std::size_t outlierChi2_size() const;
143 float getOutlierChi2(std::size_t) const;
144 std::vector<float>::const_iterator outlierChi2_begin() const;
145 std::vector<float>::const_iterator outlierChi2_end() const;
146 podio::RelationRange<float> getOutlierChi2() const;
147
148
149
150 /// check whether the object is actually available
151 bool isAvailable() const;
152 /// disconnect from TrajectoryObj instance
153 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrajectoryObj>{nullptr}; }
154
155 bool operator==(const MutableTrajectory& other) const { return m_obj == other.m_obj; }
156 bool operator==(const Trajectory& other) const;
157
158 // less comparison operator, so that objects can be e.g. stored in sets.
159 bool operator<(const MutableTrajectory& other) const { return m_obj < other.m_obj; }
160
161 podio::ObjectID id() const { return getObjectID(); }
162
163 const podio::ObjectID getObjectID() const;
164
166 using std::swap;
167 swap(a.m_obj, b.m_obj); // swap out the internal pointers
168 }
169
170private:
171 /// constructor from existing TrajectoryObj
172 explicit MutableTrajectory(podio::utils::MaybeSharedPtr<TrajectoryObj> obj);
173
174 podio::utils::MaybeSharedPtr<TrajectoryObj> m_obj{nullptr};
175};
176
177#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
178void to_json(nlohmann::json& j, const MutableTrajectory& value);
179#endif
180
181
182} // namespace edm4eic
183
184
185#endif
Definition Measurement2D.h:36
Definition MutableTrajectory.h:39
std::uint32_t getNMeasurements() const
Access the Number of hits used.
Definition MutableTrajectory.cc:49
podio::RelationRange< edm4eic::Measurement2D > getOutliers_deprecated() const
Definition MutableTrajectory.cc:177
void addToMeasurementChi2(float)
Definition MutableTrajectory.cc:185
std::vector< float >::const_iterator outlierChi2_begin() const
Definition MutableTrajectory.cc:226
podio::RelationRange< float > getMeasurementChi2() const
Definition MutableTrajectory.cc:213
std::size_t outliers_deprecated_size() const
Definition MutableTrajectory.cc:166
podio::RelationRange< edm4eic::TrackParameters > getTrackParameters() const
Definition MutableTrajectory.cc:105
void setSeed(edm4eic::TrackSeed value)
Set the Corresponding track seed.
Definition MutableTrajectory.cc:69
bool operator<(const MutableTrajectory &other) const
Definition MutableTrajectory.h:159
std::uint32_t getNOutliers() const
Access the Number of hits not considered.
Definition MutableTrajectory.cc:50
void setNMeasurements(std::uint32_t value)
Set the Number of hits used.
Definition MutableTrajectory.cc:64
MutableTrajectory clone() const
create a mutable deep-copy of the object with identical relations
Definition MutableTrajectory.cc:40
std::vector< edm4eic::Measurement2D >::const_iterator outliers_deprecated_end() const
Definition MutableTrajectory.cc:160
void addToOutliers_deprecated(edm4eic::Measurement2D)
Definition MutableTrajectory.cc:149
std::size_t measurements_deprecated_size() const
Definition MutableTrajectory.cc:130
podio::ObjectID id() const
Definition MutableTrajectory.h:161
bool operator==(const MutableTrajectory &other) const
Definition MutableTrajectory.h:155
MutableTrajectory(const MutableTrajectory &other)=default
copy constructor
void setNSharedHits(std::uint32_t value)
Set the Number of shared hits with other trajectories.
Definition MutableTrajectory.cc:67
void setNStates(std::uint32_t value)
Set the Number of tracking steps.
Definition MutableTrajectory.cc:63
void setNOutliers(std::uint32_t value)
Set the Number of hits not considered.
Definition MutableTrajectory.cc:65
std::vector< edm4eic::Measurement2D >::const_iterator measurements_deprecated_end() const
Definition MutableTrajectory.cc:124
~MutableTrajectory()=default
destructor
const edm4eic::TrackSeed getSeed() const
Access the Corresponding track seed.
Definition MutableTrajectory.cc:54
void setNHoles(std::uint32_t value)
Set the Number of missing hits.
Definition MutableTrajectory.cc:66
MutableTrajectory & operator=(MutableTrajectory other)
copy-assignment operator
Definition MutableTrajectory.cc:35
std::vector< float >::const_iterator measurementChi2_end() const
Definition MutableTrajectory.cc:196
friend class TrajectoryCollection
Definition MutableTrajectory.h:41
MutableTrajectory()
default constructor
Definition MutableTrajectory.cc:22
std::vector< float >::const_iterator outlierChi2_end() const
Definition MutableTrajectory.cc:232
bool isAvailable() const
check whether the object is actually available
Definition MutableTrajectory.cc:262
podio::RelationRange< float > getOutlierChi2() const
Definition MutableTrajectory.cc:249
std::uint32_t getType() const
Access the 0 (does not have good track fit), 1 (has good track fit)
Definition MutableTrajectory.cc:47
std::vector< float >::const_iterator measurementChi2_begin() const
Definition MutableTrajectory.cc:190
std::uint32_t getNStates() const
Access the Number of tracking steps.
Definition MutableTrajectory.cc:48
friend class Trajectory
Definition MutableTrajectory.h:43
const podio::ObjectID getObjectID() const
Definition MutableTrajectory.cc:269
std::uint32_t getNHoles() const
Access the Number of missing hits.
Definition MutableTrajectory.cc:51
std::size_t measurementChi2_size() const
Definition MutableTrajectory.cc:202
void unlink()
disconnect from TrajectoryObj instance
Definition MutableTrajectory.h:153
std::vector< edm4eic::Measurement2D >::const_iterator measurements_deprecated_begin() const
Definition MutableTrajectory.cc:118
podio::RelationRange< edm4eic::Measurement2D > getMeasurements_deprecated() const
Definition MutableTrajectory.cc:141
void setType(std::uint32_t value)
Set the 0 (does not have good track fit), 1 (has good track fit)
Definition MutableTrajectory.cc:62
void addToTrackParameters(edm4eic::TrackParameters)
Definition MutableTrajectory.cc:77
std::vector< edm4eic::Measurement2D >::const_iterator outliers_deprecated_begin() const
Definition MutableTrajectory.cc:154
friend void swap(MutableTrajectory &a, MutableTrajectory &b)
Definition MutableTrajectory.h:165
std::size_t outlierChi2_size() const
Definition MutableTrajectory.cc:238
void addToOutlierChi2(float)
Definition MutableTrajectory.cc:221
std::vector< edm4eic::TrackParameters >::const_iterator trackParameters_end() const
Definition MutableTrajectory.cc:88
std::uint32_t getNSharedHits() const
Access the Number of shared hits with other trajectories.
Definition MutableTrajectory.cc:52
void addToMeasurements_deprecated(edm4eic::Measurement2D)
Definition MutableTrajectory.cc:113
std::vector< edm4eic::TrackParameters >::const_iterator trackParameters_begin() const
Definition MutableTrajectory.cc:82
std::size_t trackParameters_size() const
Definition MutableTrajectory.cc:94
Definition TrackParameters.h:33
Definition TrackSeed.h:39
Definition TrajectoryCollection.h:95
Definition Trajectory.h:40
Definition TrajectoryCollection.h:66
Definition CalorimeterHit.cc:18