ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonNSWAsBuilt
src
CathodeBoardElement.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include <utility>
6
7
#include "
MuonNSWAsBuilt/CathodeBoardElement.h
"
8
using namespace
NswAsBuilt
;
9
10
CathodeBoardElement::CathodeBoardElement
(
stgcStripConfiguration_t
config,
const
Element
& element)
11
:
m_config_stgc
(
std
::move(config)),
m_element_stgc
(element)
12
{
13
}
14
/* In the sTGC strip (cathode) boards due to the staggering, the first/last strip could be a half
15
* or a full strip depending on the strip_board_type. Therefore first and last strip are handled
16
* separately from second or any i-strip
17
*/
18
CathodeBoardElement::stgcStrip_t
CathodeBoardElement::getStgcStrip
(
ParameterClass
iclass,
int
stripNumber)
const
{
19
Eigen::Matrix3d vectorset{Eigen::Matrix3d::Identity()};
20
if
(stripNumber == 1){
21
vectorset.col(0) =
m_config_stgc
.fCenterPoint.pos;
22
vectorset.col(1) =
m_config_stgc
.fLeftPoint.pos;
23
vectorset.col(2) =
m_config_stgc
.fRightPoint.pos;
24
}
25
else
if
(stripNumber ==
m_config_stgc
.lastStripNumber){
26
vectorset.col(0) =
m_config_stgc
.lCenterPoint.pos;
27
vectorset.col(1) =
m_config_stgc
.lLeftPoint.pos;
28
vectorset.col(2) =
m_config_stgc
.lRightPoint.pos;
29
}
30
else
{
31
vectorset.col(0) =
m_config_stgc
.sCenterPoint.pos + (stripNumber - 2) *
m_config_stgc
.sCenterPoint.pitch;
32
vectorset.col(1) =
m_config_stgc
.sLeftPoint.pos + (stripNumber - 2) *
m_config_stgc
.sLeftPoint.pitch;
33
vectorset.col(2) =
m_config_stgc
.sRightPoint.pos + (stripNumber - 2) *
m_config_stgc
.sRightPoint.pitch;
34
}
35
36
m_element_stgc
.transformToFrame(iclass, vectorset,
nullptr
);
37
38
stgcStrip_t
ret;
39
ret.
center
= vectorset.col(0);
40
ret.
left
= vectorset.col(1);
41
ret.
right
= vectorset.col(2);
42
return
ret;
43
}
44
45
Amg::Vector3D
CathodeBoardElement::getPositionAlongStgcStrip
(
ParameterClass
iclass,
int
stripNumber,
double
sx,
double
sy)
const
{
46
Amg::Vector3D
center{Amg::Vector3D::Zero()}, left{Amg::Vector3D::Zero()}, right{Amg::Vector3D::Zero()};
47
if
(stripNumber == 1){
48
center =
m_config_stgc
.fCenterPoint.pos;
49
left =
m_config_stgc
.fLeftPoint.pos;
50
right =
m_config_stgc
.fRightPoint.pos;
51
}
52
else
if
(stripNumber ==
m_config_stgc
.lastStripNumber){
53
center =
m_config_stgc
.lCenterPoint.pos;
54
left =
m_config_stgc
.lLeftPoint.pos;
55
right =
m_config_stgc
.lRightPoint.pos;
56
}
57
else
{
58
center =
m_config_stgc
.sCenterPoint.pos + (stripNumber - 2) *
m_config_stgc
.sCenterPoint.pitch;
59
left =
m_config_stgc
.sLeftPoint.pos + (stripNumber - 2) *
m_config_stgc
.sLeftPoint.pitch;
60
right =
m_config_stgc
.sRightPoint.pos + (stripNumber - 2) *
m_config_stgc
.sRightPoint.pitch;
61
}
62
63
// sy is the radial distance from the strip center / pitch, so in [-0.5, 0.5]
64
center += sy *
m_config_stgc
.sCenterPoint.pitch;
65
left += sy *
m_config_stgc
.sLeftPoint.pitch;
66
right += sy *
m_config_stgc
.sRightPoint.pitch;
67
68
// Get strip-local coordinate of point along strip
69
// Note: left, center and right are exactly in line in local coordinates
70
// (i.e. strip is not deformed in local coordinates)
71
Amg::Vector3D
ret = center;
72
if
(sx < 0.0) {
73
ret = (sx+1.0)*center - sx*left;
74
}
else
{
75
ret = (1.0-sx)*center + sx*right;
76
}
77
m_element_stgc
.transformToFrame(iclass, ret,
nullptr
);
78
return
ret;
79
}
80
CathodeBoardElement.h
NswAsBuilt::CathodeBoardElement::m_element_stgc
const Element & m_element_stgc
Definition
CathodeBoardElement.h:82
NswAsBuilt::CathodeBoardElement::m_config_stgc
stgcStripConfiguration_t m_config_stgc
Definition
CathodeBoardElement.h:81
NswAsBuilt::CathodeBoardElement::getStgcStrip
stgcStrip_t getStgcStrip(ParameterClass iclass, int stripNumber) const
Returns three points (center, left, right) of a given strip, in quadruplet coordinates.
Definition
CathodeBoardElement.cxx:18
NswAsBuilt::CathodeBoardElement::CathodeBoardElement
CathodeBoardElement(stgcStripConfiguration_t config, const Element &element)
Constructor.
Definition
CathodeBoardElement.cxx:10
NswAsBuilt::CathodeBoardElement::ParameterClass
Element::ParameterClass ParameterClass
Definition
CathodeBoardElement.h:28
NswAsBuilt::CathodeBoardElement::getPositionAlongStgcStrip
Amg::Vector3D getPositionAlongStgcStrip(ParameterClass iclass, int stripNumber, double sx, double sy) const
Returns a point on the strip, parameterized by second coordinate s, in [-1,+1].
Definition
CathodeBoardElement.cxx:45
NswAsBuilt::Element
Element: a node in a hierarchy of alignment frames.
Definition
Element.h:52
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
NswAsBuilt
Definition
CathodeBoardElement.h:12
std
STL namespace.
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t
Definition
CathodeBoardElement.h:38
NswAsBuilt::CathodeBoardElement::stgcStrip_t
The return type of the getStrip method: three points along the strip, in quadruplet coordinate.
Definition
CathodeBoardElement.h:61
NswAsBuilt::CathodeBoardElement::stgcStrip_t::right
Amg::Vector3D right
Definition
CathodeBoardElement.h:64
NswAsBuilt::CathodeBoardElement::stgcStrip_t::center
Amg::Vector3D center
Definition
CathodeBoardElement.h:62
NswAsBuilt::CathodeBoardElement::stgcStrip_t::left
Amg::Vector3D left
Definition
CathodeBoardElement.h:63
Generated on
for ATLAS Offline Software by
1.17.0