ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonReadoutGeometry
src
MuonChannelDesign.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
#include "
MuonReadoutGeometry/MuonChannelDesign.h
"
5
namespace
MuonGM
{
6
MuonChannelDesign::MuonChannelDesign
() {
7
m_rotMat.setIdentity();
8
}
9
10
void
MuonChannelDesign::defineTrapezoid
(
double
HalfShortY,
double
HalfLongY,
double
HalfHeight,
double
sAngle){
11
defineTrapezoid
(HalfShortY,HalfLongY, HalfHeight);
12
setStereoAngle
(sAngle);
13
}
14
15
void
MuonChannelDesign::setStereoAngle
(
double
sAngle) {
16
if
(
m_isDiamond
)
return
;
// forbid diamond shape with stereo strips
17
m_sAngle
= sAngle;
18
m_hasStereo
= (sAngle !=0.);
19
Eigen::Rotation2D rot{sAngle};
20
m_stereoDir
= rot *
m_stereoDir
;
21
m_stereoNormal
= rot *
m_stereoNormal
;
22
m_rotMat = Eigen::Rotation2D{-sAngle};
23
}
24
25
void
MuonChannelDesign::defineTrapezoid
(
double
HalfShortY,
double
HalfLongY,
double
HalfHeight) {
26
m_bottomLeft
=
Amg::Vector2D
{-HalfHeight, -HalfShortY};
27
m_bottomRight
=
Amg::Vector2D
{HalfHeight, -HalfLongY};
28
m_topLeft
=
Amg::Vector2D
{-HalfHeight, HalfShortY};
29
m_topRight
=
Amg::Vector2D
{HalfHeight, HalfLongY};
30
31
m_bottomEdge
= (
m_bottomRight
-
m_bottomLeft
).
unit
();
32
m_topEdge
= (
m_topLeft
-
m_topRight
);
33
m_maxHorSize
= std::hypot(
m_topEdge
.x(),
m_topEdge
.y());
34
m_topEdge
=
m_topEdge
.unit();
35
36
m_xSize
= 2.*HalfHeight;
// radial length (active area)
37
m_minYSize
= 2.*HalfShortY;
// bottom length (active area)
38
m_maxYSize
= 2.*HalfLongY;
// top length (active area)
39
inputLength
=
m_minYSize
;
40
}
41
42
void
MuonChannelDesign::defineDiamond
(
double
HalfShortY,
double
HalfLongY,
double
HalfHeight,
double
ycutout) {
43
44
// define a trapezoid region
45
double
HalfLongY_uncut = HalfLongY + ycutout * (HalfLongY - HalfShortY)/(2*HalfHeight - ycutout);
46
defineTrapezoid
(HalfShortY, HalfLongY_uncut, HalfHeight);
47
48
// move the origin to the cutout base
49
Amg::Vector2D
offset(ycutout - HalfHeight, 0.);
50
m_bottomLeft
+= offset;
51
m_bottomRight
+= offset;
52
m_topLeft
+= offset;
53
m_topRight
+= offset;
54
55
m_isDiamond
=
true
;
56
m_yCutout
= ycutout;
57
m_maxYSize
= 2*HalfLongY;
58
}
59
60
void
MuonChannelDesign::setFirstPos
(
const
double
firstPos
) {
61
m_firstPos
=
firstPos
;
62
}
63
}
unit
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Definition
AmgMatrixBasePlugin.h:21
MuonChannelDesign.h
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition
GeoPrimitives.h:48
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition
GeoMuonHits.h:27
MuonGM::MuonChannelDesign::m_maxYSize
double m_maxYSize
Definition
MuonChannelDesign.h:173
MuonGM::MuonChannelDesign::m_firstPos
double m_firstPos
Position of the first measurement.
Definition
MuonChannelDesign.h:154
MuonGM::MuonChannelDesign::m_maxHorSize
double m_maxHorSize
Definition
MuonChannelDesign.h:170
MuonGM::MuonChannelDesign::setStereoAngle
void setStereoAngle(double sAngle)
calculate local stereo angle
Definition
MuonChannelDesign.cxx:15
MuonGM::MuonChannelDesign::m_topEdge
Amg::Vector2D m_topEdge
Vector describing the right edge of the trapzoid.
Definition
MuonChannelDesign.h:156
MuonGM::MuonChannelDesign::m_yCutout
double m_yCutout
Definition
MuonChannelDesign.h:148
MuonGM::MuonChannelDesign::m_hasStereo
bool m_hasStereo
Definition
MuonChannelDesign.h:145
MuonGM::MuonChannelDesign::m_bottomLeft
Amg::Vector2D m_bottomLeft
Bottom left point of the trapezoid.
Definition
MuonChannelDesign.h:160
MuonGM::MuonChannelDesign::MuonChannelDesign
MuonChannelDesign()
Definition
MuonChannelDesign.cxx:6
MuonGM::MuonChannelDesign::defineDiamond
void defineDiamond(double HalfShortY, double HalfLongY, double HalfHeight, double ycutout)
Definition
MuonChannelDesign.cxx:42
MuonGM::MuonChannelDesign::m_bottomRight
Amg::Vector2D m_bottomRight
Bottom right point of the trapezoid.
Definition
MuonChannelDesign.h:162
MuonGM::MuonChannelDesign::m_minYSize
double m_minYSize
Definition
MuonChannelDesign.h:172
MuonGM::MuonChannelDesign::m_topLeft
Amg::Vector2D m_topLeft
Top right point of the trapezoid.
Definition
MuonChannelDesign.h:164
MuonGM::MuonChannelDesign::m_bottomEdge
Amg::Vector2D m_bottomEdge
Vector describing the left edge of the trapezoid.
Definition
MuonChannelDesign.h:158
MuonGM::MuonChannelDesign::firstPos
double firstPos() const
Returns the position of the first strip along the x-axis.
Definition
MuonChannelDesign.h:473
MuonGM::MuonChannelDesign::defineTrapezoid
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
set the trapezoid dimensions
Definition
MuonChannelDesign.cxx:25
MuonGM::MuonChannelDesign::m_sAngle
double m_sAngle
Definition
MuonChannelDesign.h:147
MuonGM::MuonChannelDesign::setFirstPos
void setFirstPos(const double pos)
Set the position of the first strip along the x-axis.
Definition
MuonChannelDesign.cxx:60
MuonGM::MuonChannelDesign::m_topRight
Amg::Vector2D m_topRight
Bottom right point of the trapezoid.
Definition
MuonChannelDesign.h:166
MuonGM::MuonChannelDesign::m_xSize
double m_xSize
Definition
MuonChannelDesign.h:171
MuonGM::MuonChannelDesign::m_stereoNormal
Amg::Vector2D m_stereoNormal
Direction pointing to the next strips.
Definition
MuonChannelDesign.h:152
MuonGM::MuonChannelDesign::m_isDiamond
bool m_isDiamond
Definition
MuonChannelDesign.h:146
MuonGM::MuonChannelDesign::m_stereoDir
Amg::Vector2D m_stereoDir
Direction of the strips.
Definition
MuonChannelDesign.h:150
MuonGM::MuonChannelDesign::inputLength
double inputLength
Definition
MuonChannelDesign.h:31
Generated on
for ATLAS Offline Software by
1.17.0