ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDetDescr
MuonNSWAsBuilt
src
PcbElement.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/PcbElement.h
"
8
using namespace
NswAsBuilt
;
9
10
11
//===============================================================================
12
PcbElement::PcbElement
(
stripConfiguration_t
config,
const
Element
& element)
13
:
m_config
(
std
::move(config)),
m_element
(element)
14
{ }
15
16
17
//===============================================================================
18
PcbElement::strip_t
PcbElement::getStrip
(
ParameterClass
iclass,
int
stripNumber)
const
19
{
20
int
npitch = stripNumber -
m_config
.centralStripNumber;
21
Eigen::Matrix3d vectorset;
22
vectorset.col(0) =
m_config
.centerPoint.pos + npitch *
m_config
.centerPoint.pitchvector;
23
vectorset.col(1) =
m_config
.leftPoint.pos + npitch *
m_config
.leftPoint.pitchvector;
24
vectorset.col(2) =
m_config
.rightPoint.pos + npitch *
m_config
.rightPoint.pitchvector;
25
26
m_element
.transformToFrame(iclass, vectorset,
nullptr
);
27
28
strip_t
ret;
29
ret.
center
= vectorset.col(0);
30
ret.
left
= vectorset.col(1);
31
ret.
right
= vectorset.col(2);
32
return
ret;
33
}
34
35
36
//===============================================================================
37
Amg::Vector3D
PcbElement::getPositionAlongStrip
(
ParameterClass
iclass,
int
stripNumber,
double
sx,
double
sy)
const
38
{
39
// sx is expected to be in [-1, 1]
40
// sy is expected to be in [-0.5, 0.5] (i.e. in a dx band of 1 pitch)
41
double
npitch = sy + (stripNumber -
m_config
.centralStripNumber);
42
Amg::Vector3D
center =
m_config
.centerPoint.pos + npitch *
m_config
.centerPoint.pitchvector;
43
Amg::Vector3D
left =
m_config
.leftPoint.pos + npitch *
m_config
.leftPoint.pitchvector;
44
Amg::Vector3D
right =
m_config
.rightPoint.pos + npitch *
m_config
.rightPoint.pitchvector;
45
46
// Get strip-local coordinate of point along strip
47
// Note: left, center and right are exactly in line in local coordinates
48
// (i.e. strip is not deformed in local coordinates)
49
Amg::Vector3D
ret{Amg::Vector3D::Zero()};
50
if
(sx < 0.0)
51
ret = (sx+1.0)*center - sx*left;
52
else
53
ret = (1.0-sx)*center + sx*right;
54
55
m_element
.transformToFrame(iclass, ret,
nullptr
);
56
return
ret;
57
}
58
59
60
PcbElement.h
NswAsBuilt::Element
Element: a node in a hierarchy of alignment frames.
Definition
Element.h:52
NswAsBuilt::PcbElement::getPositionAlongStrip
Amg::Vector3D getPositionAlongStrip(ParameterClass iclass, int stripNumber, double sx, double sy) const
Definition
PcbElement.cxx:37
NswAsBuilt::PcbElement::m_element
const Element & m_element
Definition
PcbElement.h:63
NswAsBuilt::PcbElement::ParameterClass
Element::ParameterClass ParameterClass
Definition
PcbElement.h:29
NswAsBuilt::PcbElement::PcbElement
PcbElement(stripConfiguration_t config, const Element &element)
Definition
PcbElement.cxx:12
NswAsBuilt::PcbElement::getStrip
strip_t getStrip(ParameterClass iclass, int stripNumber) const
Definition
PcbElement.cxx:18
NswAsBuilt::PcbElement::m_config
stripConfiguration_t m_config
Definition
PcbElement.h:62
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition
GeoPrimitives.h:47
NswAsBuilt
Definition
CathodeBoardElement.h:12
std
STL namespace.
NswAsBuilt::PcbElement::stripConfiguration_t
Definition
PcbElement.h:38
NswAsBuilt::PcbElement::strip_t
Definition
PcbElement.h:49
NswAsBuilt::PcbElement::strip_t::center
Amg::Vector3D center
Definition
PcbElement.h:50
NswAsBuilt::PcbElement::strip_t::left
Amg::Vector3D left
Definition
PcbElement.h:51
NswAsBuilt::PcbElement::strip_t::right
Amg::Vector3D right
Definition
PcbElement.h:52
Generated on
for ATLAS Offline Software by
1.17.0