ATLAS Offline Software
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 
12 class MsgStream;
13 
14 namespace Trk {
15 
20 class TrackRoad final
21 {
22 public:
27  {
28  Unknown = 0,
29  RPCTGC = 1,
30  MDT = 2,
31  IDSeeded = 3
32  };
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;
53  TrackRoad& operator=(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 
101 protected:
104  double m_dDeltaEta{ 0 };
105  double m_dDeltaPhi{ 0 };
106  int m_type{ 0 };
107  double m_weight{ 1.0 };
108 };
109 
113 MsgStream&
114 operator<<(MsgStream& stream, const TrackRoad& tr);
118 std::ostream&
119 operator<<(std::ostream& stream, const TrackRoad& tr);
120 
121 inline TrackRoad::TrackRoad(const Amg::Vector3D& globalPosition,
122  const Amg::Vector3D& globalDirection,
123  double deltaEta,
124  double deltaPhi,
125  int type,
126  double weight)
127  : m_globalPos(globalPosition)
128  , m_globalDir(globalDirection)
129  , m_dDeltaEta(deltaEta)
130  , m_dDeltaPhi(deltaPhi)
131  , m_type(type)
132  , m_weight(weight)
133 {
134 }
135 
136 inline const Amg::Vector3D&
138 {
139  return m_globalPos;
140 }
141 
142 inline const Amg::Vector3D&
144 {
145  return m_globalDir;
146 }
147 
148 inline double
150 {
151  return m_dDeltaEta;
152 }
153 
154 inline double
156 {
157  return m_dDeltaPhi;
158 }
159 
160 inline int
162 {
163  return m_type;
164 }
165 
166 inline double
168 {
169  return m_weight;
170 }
171 
172 inline void
174 {
175  m_type = type;
176 }
177 
178 inline void
180 {
181  m_weight = weight;
182 }
183 
184 }
185 
186 #endif
Trk::TrackRoad
Encapsulates the information required by the find() method of the muon segment makers.
Definition: TrackRoad.h:21
Trk::TrackRoad::MDT
@ MDT
Definition: TrackRoad.h:30
Trk::TrackRoad::deltaPhi
double deltaPhi() const
Get the width of the road in the phi direction.
Definition: TrackRoad.h:155
Trk::TrackRoad::~TrackRoad
~TrackRoad()=default
Trk::TrackRoad::TrackRoad
TrackRoad(TrackRoad &&)=default
Trk::TrackRoad::dump
MsgStream & dump(MsgStream &stream) const
Dump the road into a message stream.
Definition: TrackRoad.cxx:28
Trk::TrackRoad::toString
std::string toString() const
Get a readable form for debugging.
Definition: TrackRoad.cxx:12
xAOD::deltaPhi
setSAddress setEtaMS setDirPhiMS setDirZMS setBarrelRadius setEndcapAlpha setEndcapRadius setInterceptInner setEtaMap setEtaBin setIsTgcFailure setDeltaPt deltaPhi
Definition: L2StandAloneMuon_v1.cxx:160
Trk::TrackRoad::weight
double weight() const
Get the weight of the road.
Definition: TrackRoad.h:167
Trk::TrackRoad::m_weight
double m_weight
The weight of the road (default is 1.0)
Definition: TrackRoad.h:107
Trk::TrackRoad::Unknown
@ Unknown
Definition: TrackRoad.h:28
Trk::TrackRoad::m_dDeltaEta
double m_dDeltaEta
The width of the road in the eta direction.
Definition: TrackRoad.h:104
Trk::TrackRoad::operator=
TrackRoad & operator=(TrackRoad &&)=default
Trk::TrackRoad::TrackRoad
TrackRoad()=default
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Trk::TrackRoad::setType
void setType(int type)
Set the type of the road.
Definition: TrackRoad.h:173
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
m_type
TokenType m_type
the type
Definition: TProperty.cxx:44
GeoPrimitives.h
Trk::TrackRoad::globalDirection
const Amg::Vector3D & globalDirection() const
Get the global direction of the road.
Definition: TrackRoad.h:143
P4Helpers::deltaEta
double deltaEta(const I4Momentum &p1, const I4Momentum &p2)
Computes efficiently .
Definition: P4Helpers.h:66
Trk::TrackRoad::type
int type() const
Get the type of the road.
Definition: TrackRoad.h:161
Trk::TrackRoad::globalPosition
const Amg::Vector3D & globalPosition() const
Get the global position of the road.
Definition: TrackRoad.h:137
Trk::TrackRoad::setWeight
void setWeight(double weight)
Set the weight of the road.
Definition: TrackRoad.h:179
EventPrimitives.h
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Trk::TrackRoad::RPCTGC
@ RPCTGC
Definition: TrackRoad.h:29
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Trk::TrackRoad::IDSeeded
@ IDSeeded
Definition: TrackRoad.h:31
Trk::operator<<
MsgStream & operator<<(MsgStream &sl, const AlignModule &alignModule)
overload of << operator for MsgStream for debug output
Definition: AlignModule.cxx:204
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Trk::TrackRoad::m_globalDir
Amg::Vector3D m_globalDir
The global direction of the road.
Definition: TrackRoad.h:103
Trk::TrackRoad::TrackRoadTypes
TrackRoadTypes
TrackRoad Types.
Definition: TrackRoad.h:27
Trk::TrackRoad::m_type
int m_type
The type of the road (Unknown, RPCTGC, MDT, IDSeeded)
Definition: TrackRoad.h:106
Trk::TrackRoad::m_dDeltaPhi
double m_dDeltaPhi
The width of the road in the phi direction.
Definition: TrackRoad.h:105
Trk::TrackRoad::operator=
TrackRoad & operator=(const TrackRoad &)=default
Trk::TrackRoad::m_globalPos
Amg::Vector3D m_globalPos
The global position of the road.
Definition: TrackRoad.h:102
Trk::TrackRoad::TrackRoad
TrackRoad(const TrackRoad &)=default
Trk::TrackRoad::deltaEta
double deltaEta() const
Get the width of the road in the eta direction.
Definition: TrackRoad.h:149