ATLAS Offline Software
Loading...
Searching...
No Matches
MuonChannelDesign.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
5namespace MuonGM{
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
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};
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
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)
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
63}
const PlainObject unit() const
This is a plugin that makes Eigen look like CLHEP & defines some convenience methods.
Eigen::Matrix< double, 2, 1 > Vector2D
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27
double m_firstPos
Position of the first measurement.
void setStereoAngle(double sAngle)
calculate local stereo angle
Amg::Vector2D m_topEdge
Vector describing the right edge of the trapzoid.
Amg::Vector2D m_bottomLeft
Bottom left point of the trapezoid.
void defineDiamond(double HalfShortY, double HalfLongY, double HalfHeight, double ycutout)
Amg::Vector2D m_bottomRight
Bottom right point of the trapezoid.
Amg::Vector2D m_topLeft
Top right point of the trapezoid.
Amg::Vector2D m_bottomEdge
Vector describing the left edge of the trapezoid.
double firstPos() const
Returns the position of the first strip along the x-axis.
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
set the trapezoid dimensions
void setFirstPos(const double pos)
Set the position of the first strip along the x-axis.
Amg::Vector2D m_topRight
Bottom right point of the trapezoid.
Amg::Vector2D m_stereoNormal
Direction pointing to the next strips.
Amg::Vector2D m_stereoDir
Direction of the strips.