EDM4eic
EIC data model
Loading...
Searching...
No Matches
TrackParameters.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EDM4EIC_TrackParameters_H
4#define EDM4EIC_TrackParameters_H
5
7
8#include "edm4eic/Cov6f.h"
9#include "edm4hep/Vector2f.h"
10#include <cstdint>
11
12#include "podio/utilities/MaybeSharedPtr.h"
13#include "podio/detail/OrderKey.h"
14
15#include <ostream>
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 podio::detail {
29// Internal function used in less comparison operators of the datatypes and interface types
30OrderKey getOrderKey(const edm4eic::TrackParameters& obj);
31};
32
33namespace edm4eic {
34
35class MutableTrackParameters;
36class TrackParametersCollection;
37class TrackParametersCollectionData;
38
39/** @class TrackParameters
40 * ACTS Bound Track parameters
41 * @author: W. Armstrong, S. Joosten, J. Osborn
42 */
44
49 friend podio::detail::OrderKey podio::detail::getOrderKey(const TrackParameters & obj);
50
51public:
54
55 /// default constructor
57
58 /// Constructor initializing all members
59 TrackParameters(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);
60
61 /// copy constructor
62 TrackParameters(const TrackParameters& other) = default;
63
64 /// copy-assignment operator
66
67 /// create a mutable deep-copy of the object with identical relations
68 /// if cloneRelations=false, the relations are not cloned and will be empty
69 MutableTrackParameters clone(bool cloneRelations=true) const;
70
71 /// destructor
72 ~TrackParameters() = default;
73
74 /// converting constructor from mutable object
76
78
79public:
80
81 static constexpr auto typeName = "edm4eic::TrackParameters";
82
83 /// Access the Type of track parameters (-1/seed, 0/head, ...)
84 std::int32_t getType() const;
85
86 /// Access the Surface for bound parameters (geometryID)
87 std::uint64_t getSurface() const;
88
89 /// Access the 2D location on surface
90 const edm4hep::Vector2f& getLoc() const;
91
92 /// Access the Track polar angle [rad]
93 float getTheta() const;
94
95 /// Access the Track azimuthal angle [rad]
96 float getPhi() const;
97
98 /// Access the [e/GeV]
99 float getQOverP() const;
100
101 /// Access the Track time [ns]
102 float getTime() const;
103
104 /// Access the pdg pid for these parameters
105 std::int32_t getPdg() const;
106
107 /// Access the Full covariance in basis [l0,l1,theta,phi,q/p,t]
108 const edm4eic::Cov6f& getCovariance() const;
109
110
111
112
113
114 /// check whether the object is actually available
115 bool isAvailable() const;
116 /// disconnect from TrackParametersObj instance
117 void unlink() { m_obj = podio::utils::MaybeSharedPtr<TrackParametersObj>{nullptr}; }
118
119 bool operator==(const TrackParameters& other) const { return m_obj == other.m_obj; }
120 bool operator==(const MutableTrackParameters& other) const;
121
122 bool operator!=(const TrackParameters& other) const { return !(*this == other); }
123 bool operator!=(const MutableTrackParameters& other) const { return !(*this == other); }
124
125 // less comparison operator, so that objects can be e.g. stored in sets.
126 bool operator<(const TrackParameters& other) const { return podio::detail::getOrderKey(*this) < podio::detail::getOrderKey(other); }
127
128 podio::ObjectID id() const { return getObjectID(); }
129
130 const podio::ObjectID getObjectID() const;
131
133 using std::swap;
134 swap(a.m_obj, b.m_obj); // swap out the internal pointers
135 }
136
137private:
138 /// constructor from existing TrackParametersObj
139 explicit TrackParameters(podio::utils::MaybeSharedPtr<TrackParametersObj> obj);
141
142 podio::utils::MaybeSharedPtr<TrackParametersObj> m_obj{nullptr};
143};
144
145std::ostream& operator<<(std::ostream& o, const TrackParameters& value);
146
147#if defined(PODIO_JSON_OUTPUT) && !defined(__CLING__)
148void to_json(nlohmann::json& j, const TrackParameters& value);
149#endif
150
151
152} // namespace edm4eic
153
154
155#endif
Definition Cov6f.h:19
Definition MutableTrackParameters.h:35
Definition TrackParametersCollectionData.h:30
Definition TrackParametersCollection.h:91
Definition TrackParametersCollection.h:36
Definition TrackParameters.h:43
friend void swap(TrackParameters &a, TrackParameters &b)
Definition TrackParameters.h:132
float getPhi() const
Access the Track azimuthal angle [rad].
Definition TrackParameters.cc:64
std::int32_t getPdg() const
Access the pdg pid for these parameters.
Definition TrackParameters.cc:67
bool operator==(const TrackParameters &other) const
Definition TrackParameters.h:119
bool operator<(const TrackParameters &other) const
Definition TrackParameters.h:126
static constexpr auto typeName
Definition TrackParameters.h:81
static TrackParameters makeEmpty()
Definition TrackParameters.cc:56
float getQOverP() const
Access the [e/GeV].
Definition TrackParameters.cc:65
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition TrackParameters.cc:62
TrackParameters & operator=(TrackParameters other)
copy-assignment operator
Definition TrackParameters.cc:36
bool operator!=(const MutableTrackParameters &other) const
Definition TrackParameters.h:123
TrackParameters()
default constructor
Definition TrackParameters.cc:20
const podio::ObjectID getObjectID() const
Definition TrackParameters.cc:79
const edm4eic::Cov6f & getCovariance() const
Access the Full covariance in basis [l0,l1,theta,phi,q/p,t].
Definition TrackParameters.cc:68
~TrackParameters()=default
destructor
std::uint64_t getSurface() const
Access the Surface for bound parameters (geometryID)
Definition TrackParameters.cc:61
bool isAvailable() const
check whether the object is actually available
Definition TrackParameters.cc:75
TrackParameters(const TrackParameters &other)=default
copy constructor
float getTime() const
Access the Track time [ns].
Definition TrackParameters.cc:66
void unlink()
disconnect from TrackParametersObj instance
Definition TrackParameters.h:117
float getTheta() const
Access the Track polar angle [rad].
Definition TrackParameters.cc:63
podio::ObjectID id() const
Definition TrackParameters.h:128
MutableTrackParameters clone(bool cloneRelations=true) const
Definition TrackParameters.cc:41
std::int32_t getType() const
Access the Type of track parameters (-1/seed, 0/head, ...)
Definition TrackParameters.cc:60
friend class TrackParametersCollection
Definition TrackParameters.h:46
bool operator!=(const TrackParameters &other) const
Definition TrackParameters.h:122
friend class MutableTrackParameters
Definition TrackParameters.h:45
Definition TrackParametersObj.h:17
Definition CalorimeterHit.cc:17
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition CalorimeterHit.cc:103
Definition CalorimeterHit.h:31
OrderKey getOrderKey(const edm4eic::CalorimeterHit &obj)
Definition CalorimeterHit.cc:150