ATLAS Offline Software
Loading...
Searching...
No Matches
TrackRoad.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TRKROAD_TRACKROAD_H
6#define TRKROAD_TRACKROAD_H
7
10#include <iostream>
11
12class MsgStream;
13
14namespace Trk {
15
20class TrackRoad final
21{
22public:
27 {
29 RPCTGC = 1,
30 MDT = 2,
32 };
33
44 double deltaEta,
45 double deltaPhi,
46 int type = Unknown,
47 double weight = 1.0);
48
49 TrackRoad() = default;
50 TrackRoad(const TrackRoad&) = default;
51 TrackRoad(TrackRoad&&) = default;
52 TrackRoad& operator=(const TrackRoad&) = default;
54 ~TrackRoad() = default;
58 const Amg::Vector3D& globalPosition() const;
62 const Amg::Vector3D& globalDirection() const;
66 double deltaEta() const;
70 double deltaPhi() const;
74 int type() const;
78 double weight() const;
79
83 std::string toString() const;
87 MsgStream& dump(MsgStream& stream) const;
91 std::ostream& dump(std::ostream& stream) const;
95 void setType(int type);
99 void setWeight(double weight);
100
101protected:
104 double m_dDeltaEta{ 0 };
105 double m_dDeltaPhi{ 0 };
106 int m_type{ 0 };
107 double m_weight{ 1.0 };
108};
109
113MsgStream&
114operator<<(MsgStream& stream, const TrackRoad& tr);
118std::ostream&
119operator<<(std::ostream& stream, const TrackRoad& tr);
120
135
136inline const Amg::Vector3D&
138{
139 return m_globalPos;
140}
141
142inline const Amg::Vector3D&
144{
145 return m_globalDir;
146}
147
148inline double
150{
151 return m_dDeltaEta;
152}
153
154inline double
156{
157 return m_dDeltaPhi;
158}
159
160inline int
162{
163 return m_type;
164}
165
166inline double
168{
169 return m_weight;
170}
171
172inline void
174{
175 m_type = type;
176}
177
178inline void
183
184}
185
186#endif
Scalar deltaPhi(const MatrixBase< Derived > &vec) const
@ Unknown
Definition TruthClasses.h:9
TrackRoad & operator=(const TrackRoad &)=default
TrackRoadTypes
TrackRoad Types.
Definition TrackRoad.h:27
double m_dDeltaEta
The width of the road in the eta direction.
Definition TrackRoad.h:104
double weight() const
Get the weight of the road.
Definition TrackRoad.h:167
TrackRoad(TrackRoad &&)=default
Amg::Vector3D m_globalDir
The global direction of the road.
Definition TrackRoad.h:103
const Amg::Vector3D & globalPosition() const
Get the global position of the road.
Definition TrackRoad.h:137
TrackRoad & operator=(TrackRoad &&)=default
double deltaEta() const
Get the width of the road in the eta direction.
Definition TrackRoad.h:149
std::string toString() const
Get a readable form for debugging.
Definition TrackRoad.cxx:12
int type() const
Get the type of the road.
Definition TrackRoad.h:161
const Amg::Vector3D & globalDirection() const
Get the global direction of the road.
Definition TrackRoad.h:143
TrackRoad()=default
TrackRoad(const TrackRoad &)=default
double deltaPhi() const
Get the width of the road in the phi direction.
Definition TrackRoad.h:155
double m_weight
The weight of the road (default is 1.0)
Definition TrackRoad.h:107
Amg::Vector3D m_globalPos
The global position of the road.
Definition TrackRoad.h:102
~TrackRoad()=default
double m_dDeltaPhi
The width of the road in the phi direction.
Definition TrackRoad.h:105
int m_type
The type of the road (Unknown, RPCTGC, MDT, IDSeeded)
Definition TrackRoad.h:106
void setWeight(double weight)
Set the weight of the road.
Definition TrackRoad.h:179
TrackRoad(const Amg::Vector3D &globalPosition, const Amg::Vector3D &globalDirection, double deltaEta, double deltaPhi, int type=Unknown, double weight=1.0)
Constructor.
Definition TrackRoad.h:121
void setType(int type)
Set the type of the road.
Definition TrackRoad.h:173
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the ATLAS eigen extensions are properly loaded.
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
-event-from-file