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