ATLAS Offline Software
Loading...
Searching...
No Matches
SiWidth.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SiWidth.h, (c) ATLAS Detector software
8
9#ifndef INDETPREPRAWDATA_SIWIDTH_H
10#define INDETPREPRAWDATA_SIWIDTH_H
11
14#include <iosfwd>
15
16class MsgStream;
17
19namespace InDet {
20
25 class SiWidth final{
26
28 // Public methods:
30 public:
31
32 // Implicit constructor:
33 SiWidth();
34
35 // Copy constructor:
36 SiWidth(const SiWidth& position);
37 //move ctor
38 SiWidth(SiWidth&& position) = default;
39
40 // Constructor with parameters: <col, row> in units of RDOs (so should be int),
41 // <phiR width in mm, Z width in mm>
42 SiWidth(const Amg::Vector2D& colrow, const Amg::Vector2D& phiRZ);
43
44 // online constructor: only the col, row in units of RDOs
45 SiWidth(const Amg::Vector2D& colrow);
46
47 // Destructor:
48 ~SiWidth() = default;
49
50 // Assignment operator:
52 // move assignment
54
56 // Const methods:
58
59 // return col row:
60 const Amg::Vector2D& colRow() const;
61
62 // return phiRZ in mm:
63 const Amg::Vector2D& widthPhiRZ() const;
64
65 // return PhiR
66 double phiR() const;
67
68 // return z
69 double z() const;
70
71 // comparison
72 bool operator <(const SiWidth& width) const;
73 bool operator >(const SiWidth& width) const;
74
76 // Non-const methods:
78
79 void setColumn(const double col);
80
81 void setRow(const double row);
82
83 void setColRow(const Amg::Vector2D& colRow);
84
85 void setPhirWidth(const double phirWidth);
86
87 void setZWidth(const double zWidth);
88
89 void setPhirzWidth(const Amg::Vector2D& phirzWidth);
90
92 MsgStream& dump(MsgStream& stream) const;
93
95 std::ostream& dump(std::ostream& stream) const;
96
97 // scaling
98
100 // Private data:
102 private:
103 // Need to force proper alignment; otherwise cling gets it wrong.
104 alignas(16) Amg::Vector2D m_colrow;//<col, row>
106 };
107
108 MsgStream& operator << (MsgStream& stream, const SiWidth& prd);
109 std::ostream& operator << (std::ostream& stream, const SiWidth& prd);
110
111
113 // Inline methods:
115 inline const Amg::Vector2D& SiWidth::colRow() const
116 {
117 return (m_colrow);
118 }
119
120
121 inline const Amg::Vector2D& SiWidth::widthPhiRZ() const
122 {
123 return m_phirzWidth;
124 }
125
126 inline double SiWidth::phiR() const
127 {
128 return m_phirzWidth[Trk::locPhiR];
129 }
130
131 inline double SiWidth::z() const
132 {
133 return m_phirzWidth[Trk::locZ];
134 }
135
136 // comparison
137 // return true if smaller in either direction
139 {
140 // size phi
141 if ( m_colrow[0] < width.colRow()[0] ) { return true; }
142 // size z
143 if ( m_colrow[1] < width.colRow()[1] ) { return true; }
144 return false;
145 }
146
147 // flip logic of <
149 {
150 // size phi
151 if ( m_colrow[0] < width.colRow()[0] ) { return false; }
152 // size z
153 if ( m_colrow[1] < width.colRow()[1] ) { return false; }
154 return true;
155 }
156
157
158 inline void SiWidth::setColumn(const double col)
159 {
160 m_colrow[0] = col;
161 }
162
163 inline void SiWidth::setRow(const double row)
164 {
165 m_colrow[1] = row;
166 }
167
169 {
171 }
172
173 inline void SiWidth::setPhirWidth(const double phir)
174 {
176 }
177 inline void SiWidth::setZWidth(const double zwidth)
178 {
179 m_phirzWidth[Trk::locZ] = zwidth;
180 }
181 inline void SiWidth::setPhirzWidth(const Amg::Vector2D& phirzwidth)
182 {
183 m_phirzWidth = phirzwidth;
184 }
185
186
187} // end of namespace
188
189#endif // INDETPREPRAWDATA_SIWIDTH_H
const double width
SiWidth & operator=(const SiWidth &width)
Definition SiWidth.cxx:41
void setColRow(const Amg::Vector2D &colRow)
Definition SiWidth.h:168
bool operator>(const SiWidth &width) const
Definition SiWidth.h:148
Amg::Vector2D m_phirzWidth
Definition SiWidth.h:105
Amg::Vector2D m_colrow
Definition SiWidth.h:104
SiWidth(SiWidth &&position)=default
SiWidth(const SiWidth &position)
void setRow(const double row)
Definition SiWidth.h:163
double z() const
Definition SiWidth.h:131
void setZWidth(const double zWidth)
Definition SiWidth.h:177
double phiR() const
Definition SiWidth.h:126
const Amg::Vector2D & widthPhiRZ() const
Definition SiWidth.h:121
~SiWidth()=default
const Amg::Vector2D & colRow() const
Definition SiWidth.h:115
void setColumn(const double col)
Definition SiWidth.h:158
bool operator<(const SiWidth &width) const
Definition SiWidth.h:138
void setPhirWidth(const double phirWidth)
Definition SiWidth.h:173
SiWidth & operator=(SiWidth &&width)=default
void setPhirzWidth(const Amg::Vector2D &phirzWidth)
Definition SiWidth.h:181
Eigen::Matrix< double, 2, 1 > Vector2D
Primary Vertex Finder.
MsgStream & operator<<(MsgStream &, const GNNTrackFinderTritonTool &)
@ locPhiR
Definition ParamDefs.h:41
@ locZ
local cylindrical
Definition ParamDefs.h:42
-event-from-file