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 
8 
9 #include "eicd/Direction.h"
10 #include "eicd/FloatPair.h"
11 #include "eicd/Index.h"
12 #include "podio/ObjectID.h"
13 #include <ostream>
14 
15 
16 
17 namespace eic {
18 
19 
20 /** @class TrackParameters
21  * ACTS Bound Track parameters
22  * @author: W. Armstrong, S. Joosten
23  */
25 
28  friend class ConstTrackParameters;
29 
30 public:
31 
32  /// default constructor
35 
36  /// constructor from existing TrackParametersObj
38 
39  /// copy constructor
40  TrackParameters(const TrackParameters& other);
41 
42  /// copy-assignment operator
44 
45  /// support cloning (deep-copy)
46  TrackParameters clone() const;
47 
48  /// destructor
50 
51  /// conversion to const object
52  operator ConstTrackParameters() const;
53 
54 public:
55 
56  /// Access the unique ID for this track
57  const eic::Index& ID() const;
58 
59  /// Access the tracking location
60  const eic::FloatPair& loc() const;
61 
62  /// Access the error on the location
63  const eic::FloatPair& locError() const;
64 
65  /// Access the track direction (theta, phi) [rad, 0-pi and -pi->pi]
66  const eic::Direction& direction() const;
67 
68  /// Access the error on the direction [rad]
69  const eic::Direction& directionError() const;
70 
71  /// Access the [e/GeV]
72  const float& qOverP() const;
73 
74  /// Access the error on qOverP
75  const float& qOverPError() const;
76 
77  /// Access the track time [ns]
78  const float& time() const;
79 
80  /// Access the error on the time
81  const float& timeError() const;
82 
83 
84 
85  /// Set the unique ID for this track
86  void ID(eic::Index value);
87  /// Get reference to unique ID for this track
88  eic::Index& ID();
89 
90  /// Set the tracking location
91  void loc(eic::FloatPair value);
92  /// Get reference to tracking location
94 
95  /// Set the error on the location
96  void locError(eic::FloatPair value);
97  /// Get reference to error on the location
99 
100  /// Set the track direction (theta, phi) [rad, 0-pi and -pi->pi]
101  void direction(eic::Direction value);
102  /// Get reference to track direction (theta, phi) [rad, 0-pi and -pi->pi]
104 
105  /// Set the error on the direction [rad]
106  void directionError(eic::Direction value);
107  /// Get reference to error on the direction [rad]
109 
110  /// Set the [e/GeV]
111  void qOverP(float value);
112 
113  /// Set the error on qOverP
114  void qOverPError(float value);
115 
116  /// Set the track time [ns]
117  void time(float value);
118 
119  /// Set the error on the time
120  void timeError(float value);
121 
122 
123 
124 
125 
126 
127  /// check whether the object is actually available
128  bool isAvailable() const;
129  /// disconnect from TrackParametersObj instance
130  void unlink() { m_obj = nullptr; }
131 
132  bool operator==(const TrackParameters& other) const { return m_obj == other.m_obj; }
133  bool operator==(const ConstTrackParameters& other) const;
134 
135  // less comparison operator, so that objects can be e.g. stored in sets.
136  bool operator<(const TrackParameters& other) const { return m_obj < other.m_obj; }
137 
138  unsigned int id() const { return getObjectID().collectionID * 10000000 + getObjectID().index; }
139 
140  const podio::ObjectID getObjectID() const;
141 
142 private:
143  TrackParametersObj* m_obj;
144 };
145 
146 std::ostream& operator<<(std::ostream& o, const ConstTrackParameters& value);
147 
148 } // namespace eic
149 
150 
151 #endif
eic::operator<<
std::ostream & operator<<(std::ostream &o, const ConstBasicParticle &value)
Definition: BasicParticle.cc:102
eic::Index
Definition: Index.h:11
eic::TrackParametersObj
Definition: TrackParametersObj.h:18
eic::TrackParameters::time
const float & time() const
Access the track time [ns].
Definition: TrackParameters.cc:63
eic::TrackParameters::clone
TrackParameters clone() const
support cloning (deep-copy)
Definition: TrackParameters.cc:47
eic::TrackParameters::qOverP
const float & qOverP() const
Access the [e/GeV].
Definition: TrackParameters.cc:61
eic
Definition: BasicParticle.cc:13
eic::TrackParameters::qOverPError
const float & qOverPError() const
Access the error on qOverP.
Definition: TrackParameters.cc:62
eic::TrackParameters::TrackParameters
TrackParameters()
default constructor
Definition: TrackParameters.cc:16
eic::TrackParameters::id
unsigned int id() const
Definition: TrackParameters.h:138
eic::TrackParameters::direction
const eic::Direction & direction() const
Access the track direction (theta, phi) [rad, 0-pi and -pi->pi].
Definition: TrackParameters.cc:59
eic::TrackParameters::operator=
TrackParameters & operator=(const TrackParameters &other)
copy-assignment operator
Definition: TrackParameters.cc:37
eic::TrackParameters::ConstTrackParameters
friend class ConstTrackParameters
Definition: TrackParameters.h:28
eic::TrackParameters::timeError
const float & timeError() const
Access the error on the time.
Definition: TrackParameters.cc:64
eic::TrackParameters::directionError
const eic::Direction & directionError() const
Access the error on the direction [rad].
Definition: TrackParameters.cc:60
eic::TrackParametersCollection
Definition: TrackParametersCollection.h:76
eic::TrackParameters::isAvailable
bool isAvailable() const
check whether the object is actually available
Definition: TrackParameters.cc:88
eic::TrackParameters::ID
const eic::Index & ID() const
Access the unique ID for this track.
Definition: TrackParameters.cc:56
TrackParametersObj.h
eic::TrackParameters
Definition: TrackParameters.h:24
eic::TrackParameters::operator<
bool operator<(const TrackParameters &other) const
Definition: TrackParameters.h:136
eic::TrackParameters::locError
const eic::FloatPair & locError() const
Access the error on the location.
Definition: TrackParameters.cc:58
eic::TrackParametersCollectionIterator
Definition: TrackParametersCollection.h:29
FloatPair.h
TrackParametersConst.h
eic::ConstTrackParameters
Definition: TrackParametersConst.h:22
Index.h
eic::FloatPair
Definition: FloatPair.h:12
eic::TrackParameters::operator==
bool operator==(const TrackParameters &other) const
Definition: TrackParameters.h:132
Direction.h
eic::TrackParameters::unlink
void unlink()
disconnect from TrackParametersObj instance
Definition: TrackParameters.h:130
eic::TrackParameters::loc
const eic::FloatPair & loc() const
Access the tracking location.
Definition: TrackParameters.cc:57
eic::Direction
Definition: Direction.h:13
eic::TrackParameters::~TrackParameters
~TrackParameters()
destructor
Definition: TrackParameters.cc:51
eic::TrackParameters::getObjectID
const podio::ObjectID getObjectID() const
Definition: TrackParameters.cc:95