EICd
EIC data model
TrackParameters.h
Go to the documentation of this file.
1// AUTOMATICALLY GENERATED FILE - DO NOT EDIT
2
3#ifndef EICD_TrackParameters_H
4#define EICD_TrackParameters_H
5
7
8#include "eicd/Cov2f.h"
9#include "eicd/Cov3f.h"
10#include "edm4hep/Vector2f.h"
11#include <cstdint>
12#include "podio/ObjectID.h"
13#include <ostream>
14
15#ifdef PODIO_JSON_OUTPUT
16#include "nlohmann/json.hpp"
17#endif
18
19// forward declarations
20namespace eicd {
21class Trajectory;
22class MutableTrajectory;
23}
24
25
26namespace eicd {
27
28class MutableTrackParameters;
29
30/** @class TrackParameters
31 * ACTS Bound Track parameters
32 * @author: W. Armstrong, S. Joosten
33 */
35
39
40public:
41 /// default constructor
43 TrackParameters(std::int32_t type, edm4hep::Vector2f loc, eicd::Cov2f locError, float theta, float phi, float qOverP, eicd::Cov3f momentumError, float time, float timeError, float charge);
44
45 /// constructor from existing TrackParametersObj
47
48 /// copy constructor
49 TrackParameters(const TrackParameters& other);
50
51 /// copy-assignment operator
53
54 /// create a mutable deep-copy of the object with identical relations
56
57 /// destructor
59
60
61public:
62
63 /// Access the Type of track parameters (-1/seed, 0/head, ...)
64 const std::int32_t& getType() const;
65
66 /// Access the 2D location on surface
67 const edm4hep::Vector2f& getLoc() const;
68
69 /// Access the Covariance on loc
70 const eicd::Cov2f& getLocError() const;
71
72 /// Access the Track polar angle [rad]
73 const float& getTheta() const;
74
75 /// Access the Track azimuthal angle [rad]
76 const float& getPhi() const;
77
78 /// Access the [e/GeV]
79 const float& getQOverP() const;
80
81 /// Access the Covariance on theta, phi and qOverP
82 const eicd::Cov3f& getMomentumError() const;
83
84 /// Access the Track time [ns]
85 const float& getTime() const;
86
87 /// Access the Error on the time
88 const float& getTimeError() const;
89
90 /// Access the Particle charge
91 const float& getCharge() const;
92
93
94 /// Access the Trajectory associated with these track parameters
95 const eicd::Trajectory getTrajectory() const;
96
97
98
99 /// check whether the object is actually available
100 bool isAvailable() const;
101 /// disconnect from TrackParametersObj instance
102 void unlink() { m_obj = nullptr; }
103
104 bool operator==(const TrackParameters& other) const { return m_obj == other.m_obj; }
105 bool operator==(const MutableTrackParameters& other) const;
106
107 // less comparison operator, so that objects can be e.g. stored in sets.
108 bool operator<(const TrackParameters& other) const { return m_obj < other.m_obj; }
109
110 unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
111
112 const podio::ObjectID getObjectID() const;
113
115 using std::swap;
116 swap(a.m_obj, b.m_obj); // swap out the internal pointers
117 }
118
119private:
120 TrackParametersObj* m_obj;
121};
122
123std::ostream& operator<<(std::ostream& o, const TrackParameters& value);
124
125#ifdef PODIO_JSON_OUTPUT
126void to_json(nlohmann::json& j, const TrackParameters& value);
127#endif
128
129
130} // namespace eicd
131
132
133#endif
Definition: Cov2f.h:15
Definition: Cov3f.h:15
Definition: MutableTrackParameters.h:35
Definition: TrackParametersCollection.h:82
Definition: TrackParametersCollection.h:35
Definition: TrackParameters.h:34
friend void swap(TrackParameters &a, TrackParameters &b)
Definition: TrackParameters.h:114
const float & getTime() const
Access the Track time [ns].
Definition: TrackParameters.cc:67
const float & getQOverP() const
Access the [e/GeV].
Definition: TrackParameters.cc:65
const std::int32_t & getType() const
Access the Type of track parameters (-1/seed, 0/head, ...)
Definition: TrackParameters.cc:60
bool operator==(const TrackParameters &other) const
Definition: TrackParameters.h:104
unsigned int id() const
Definition: TrackParameters.h:110
const eicd::Trajectory getTrajectory() const
Access the Trajectory associated with these track parameters.
Definition: TrackParameters.cc:71
const podio::ObjectID getObjectID() const
Definition: TrackParameters.cc:90
const float & getTheta() const
Access the Track polar angle [rad].
Definition: TrackParameters.cc:63
const edm4hep::Vector2f & getLoc() const
Access the 2D location on surface.
Definition: TrackParameters.cc:61
TrackParameters & operator=(TrackParameters other)
copy-assignment operator
Definition: TrackParameters.cc:39
const float & getPhi() const
Access the Track azimuthal angle [rad].
Definition: TrackParameters.cc:64
const float & getCharge() const
Access the Particle charge.
Definition: TrackParameters.cc:69
bool isAvailable() const
check whether the object is actually available
Definition: TrackParameters.cc:83
const eicd::Cov2f & getLocError() const
Access the Covariance on loc.
Definition: TrackParameters.cc:62
~TrackParameters()
destructor
Definition: TrackParameters.cc:54
MutableTrackParameters clone() const
create a mutable deep-copy of the object with identical relations
Definition: TrackParameters.cc:50
bool operator<(const TrackParameters &other) const
Definition: TrackParameters.h:108
void unlink()
disconnect from TrackParametersObj instance
Definition: TrackParameters.h:102
const float & getTimeError() const
Access the Error on the time.
Definition: TrackParameters.cc:68
const eicd::Cov3f & getMomentumError() const
Access the Covariance on theta, phi and qOverP.
Definition: TrackParameters.cc:66
TrackParameters()
default constructor
Definition: TrackParameters.cc:17
Definition: TrackParametersObj.h:21
Definition: Trajectory.h:34
Definition: CalorimeterHit.cc:13
std::ostream & operator<<(std::ostream &o, const CalorimeterHit &value)
Definition: CalorimeterHit.cc:93