EDM4eic
EIC data model
Loading...
Searching...
No Matches
Trajectory.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_Trajectory_H
4#define EDM4EIC_Trajectory_H
5
7
10#include "podio/RelationRange.h"
11#include <cstdint>
12#include <vector>
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// forward declarations
24namespace edm4eic {
25class TrackSeed;
26class MutableTrackSeed;
27}
28
29
30namespace edm4eic {
31
32class MutableTrajectory;
33class TrajectoryCollection;
34class TrajectoryCollectionData;
35
36/** @class Trajectory
37 * Raw trajectory from the tracking algorithm. What is called hit here is 2d measurement indeed.
38 * @author: S. Joosten, S. Li
39 */
41
42 friend class MutableTrajectory;
46
47public:
50
51 /// default constructor
52 Trajectory();
53
54 /// Constructor initializing all members
55 Trajectory(std::uint32_t type, std::uint32_t nStates, std::uint32_t nMeasurements, std::uint32_t nOutliers, std::uint32_t nHoles, std::uint32_t nSharedHits);
56
57 /// copy constructor
58 Trajectory(const Trajectory& other) = default;
59
60 /// copy-assignment operator
62
63 /// create a mutable deep-copy of the object with identical relations
65
66 /// destructor
67 ~Trajectory() = default;
68
69
70 static Trajectory makeEmpty();
71
72public:
73
74 /// Access the 0 (does not have good track fit), 1 (has good track fit)
75 std::uint32_t getType() const;
76
77 /// Access the Number of tracking steps
78 std::uint32_t getNStates() const;
79
80 /// Access the Number of hits used
81 std::uint32_t getNMeasurements() const;
82
83 /// Access the Number of hits not considered
84 std::uint32_t getNOutliers() const;
85
86 /// Access the Number of missing hits
87 std::uint32_t getNHoles() const;
88
89 /// Access the Number of shared hits with other trajectories
90 std::uint32_t getNSharedHits() const;
91
92
93 /// Access the Corresponding track seed
94 const edm4eic::TrackSeed getSeed() const;
95
96 std::size_t trackParameters_size() const;
98 std::vector<edm4eic::TrackParameters>::const_iterator trackParameters_begin() const;
99 std::vector<edm4eic::TrackParameters>::const_iterator trackParameters_end() const;
100 podio::RelationRange<edm4eic::TrackParameters> getTrackParameters() const;
101 std::size_t measurements_deprecated_size() const;
103 std::vector<edm4eic::Measurement2D>::const_iterator measurements_deprecated_begin() const;
104 std::vector<edm4eic::Measurement2D>::const_iterator measurements_deprecated_end() const;
105 podio::RelationRange<edm4eic::Measurement2D> getMeasurements_deprecated() const;
106 std::size_t outliers_deprecated_size() const;
108 std::vector<edm4eic::Measurement2D>::const_iterator outliers_deprecated_begin() const;
109 std::vector<edm4eic::Measurement2D>::const_iterator outliers_deprecated_end() const;
110 podio::RelationRange<edm4eic::Measurement2D> getOutliers_deprecated() const;
111 std::size_t measurementChi2_size() const;
112 float getMeasurementChi2(std::size_t) const;
113 std::vector<float>::const_iterator measurementChi2_begin() const;
114 std::vector<float>::const_iterator measurementChi2_end() const;
115 podio::RelationRange<float> getMeasurementChi2() const;
116 std::size_t outlierChi2_size() const;
117 float getOutlierChi2(std::size_t) const;
118 std::vector<float>::const_iterator outlierChi2_begin() const;
119 std::vector<float>::const_iterator outlierChi2_end() const;
120 podio::RelationRange<float> getOutlierChi2() const;
121
122
123 /// check whether the object is actually available
124 bool isAvailable() const;
125 /// disconnect from TrajectoryObj instance
126 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrajectoryObj>{nullptr}; }
127
128 bool operator==(const Trajectory& other) const { return m_obj == other.m_obj; }
129 bool operator==(const MutableTrajectory& other) const;
130
131 // less comparison operator, so that objects can be e.g. stored in sets.
132 bool operator<(const Trajectory& other) const { return m_obj < other.m_obj; }
133
134 podio::ObjectID id() const { return getObjectID(); }
135
136 const podio::ObjectID getObjectID() const;
137
138 friend void swap(Trajectory& a, Trajectory& b) {
139 using std::swap;
140 swap(a.m_obj, b.m_obj); // swap out the internal pointers
141 }
142
143private:
144 /// constructor from existing TrajectoryObj
145 explicit Trajectory(podio::utils::MaybeSharedPtr<TrajectoryObj> obj);
147
148 podio::utils::MaybeSharedPtr<TrajectoryObj> m_obj{nullptr};
149};
150
151std::ostream& operator<<(std::ostream& o, const Trajectory& value);
152
153#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
154void to_json(nlohmann::json& j, const Trajectory& value);
155#endif
156
157
158} // namespace edm4eic
159
160
161#endif
Definition Measurement2D.h:36
Definition MutableTrajectory.h:39
Definition TrackParameters.h:33
Definition TrackSeed.h:39
Definition TrajectoryCollectionData.h:33
Definition TrajectoryCollection.h:95
Definition TrajectoryCollection.h:40
Definition Trajectory.h:40
Trajectory & operator=(Trajectory other)
copy-assignment operator
Definition Trajectory.cc:35
static Trajectory makeEmpty()
Definition Trajectory.cc:48
bool isAvailable() const
check whether the object is actually available
Definition Trajectory.cc:231
std::vector< edm4eic::Measurement2D >::const_iterator outliers_deprecated_end() const
Definition Trajectory.cc:138
podio::RelationRange< float > getMeasurementChi2() const
Definition Trajectory.cc:187
bool operator==(const Trajectory &other) const
Definition Trajectory.h:128
podio::RelationRange< edm4eic::TrackParameters > getTrackParameters() const
Definition Trajectory.cc:91
podio::RelationRange< float > getOutlierChi2() const
Definition Trajectory.cc:219
std::vector< float >::const_iterator outlierChi2_begin() const
Definition Trajectory.cc:196
std::vector< edm4eic::TrackParameters >::const_iterator trackParameters_end() const
Definition Trajectory.cc:74
std::vector< edm4eic::TrackParameters >::const_iterator trackParameters_begin() const
Definition Trajectory.cc:68
std::uint32_t getNHoles() const
Access the Number of missing hits.
Definition Trajectory.cc:56
Trajectory()
default constructor
Definition Trajectory.cc:22
~Trajectory()=default
destructor
friend void swap(Trajectory &a, Trajectory &b)
Definition Trajectory.h:138
std::uint32_t getNSharedHits() const
Access the Number of shared hits with other trajectories.
Definition Trajectory.cc:57
std::uint32_t getType() const
Access the 0 (does not have good track fit), 1 (has good track fit)
Definition Trajectory.cc:52
friend class TrajectoryCollection
Definition Trajectory.h:43
std::uint32_t getNMeasurements() const
Access the Number of hits used.
Definition Trajectory.cc:54
std::vector< edm4eic::Measurement2D >::const_iterator outliers_deprecated_begin() const
Definition Trajectory.cc:132
std::vector< float >::const_iterator measurementChi2_begin() const
Definition Trajectory.cc:164
std::size_t measurementChi2_size() const
Definition Trajectory.cc:176
MutableTrajectory clone() const
create a mutable deep-copy of the object with identical relations
Definition Trajectory.cc:40
std::uint32_t getNOutliers() const
Access the Number of hits not considered.
Definition Trajectory.cc:55
const edm4eic::TrackSeed getSeed() const
Access the Corresponding track seed.
Definition Trajectory.cc:59
Trajectory(const Trajectory &other)=default
copy constructor
podio::RelationRange< edm4eic::Measurement2D > getMeasurements_deprecated() const
Definition Trajectory.cc:123
std::vector< float >::const_iterator outlierChi2_end() const
Definition Trajectory.cc:202
std::vector< edm4eic::Measurement2D >::const_iterator measurements_deprecated_end() const
Definition Trajectory.cc:106
std::uint32_t getNStates() const
Access the Number of tracking steps.
Definition Trajectory.cc:53
void unlink()
disconnect from TrajectoryObj instance
Definition Trajectory.h:126
podio::ObjectID id() const
Definition Trajectory.h:134
friend class MutableTrajectory
Definition Trajectory.h:42
const podio::ObjectID getObjectID() const
Definition Trajectory.cc:238
std::size_t outliers_deprecated_size() const
Definition Trajectory.cc:144
bool operator<(const Trajectory &other) const
Definition Trajectory.h:132
std::vector< float >::const_iterator measurementChi2_end() const
Definition Trajectory.cc:170
std::size_t trackParameters_size() const
Definition Trajectory.cc:80
podio::RelationRange< edm4eic::Measurement2D > getOutliers_deprecated() const
Definition Trajectory.cc:155
std::vector< edm4eic::Measurement2D >::const_iterator measurements_deprecated_begin() const
Definition Trajectory.cc:100
std::size_t outlierChi2_size() const
Definition Trajectory.cc:208
std::size_t measurements_deprecated_size() const
Definition Trajectory.cc:112
Definition TrajectoryObj.h:24
Definition CalorimeterHit.cc:18
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:97