ATLAS Offline Software
Loading...
Searching...
No Matches
NswAsBuilt::CathodeBoardElement Class Reference

Helper class saving all the needed information to compute strips for a particular cathode board. More...

#include <CathodeBoardElement.h>

Collaboration diagram for NswAsBuilt::CathodeBoardElement:

Classes

struct  stgcStrip_t
 The return type of the getStrip method: three points along the strip, in quadruplet coordinate. More...
struct  stgcStripConfiguration_t
struct  stgcStripPoint_t

Public Types

using ParameterClass = Element::ParameterClass

Public Member Functions

 CathodeBoardElement (stgcStripConfiguration_t config, const Element &element)
 Constructor.
stgcStrip_t getStgcStrip (ParameterClass iclass, int stripNumber) const
 Returns three points (center, left, right) of a given strip, in quadruplet coordinates.
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].

Private Attributes

stgcStripConfiguration_t m_config_stgc
const Elementm_element_stgc

Detailed Description

Helper class saving all the needed information to compute strips for a particular cathode board.

This class holds a reference to an Element representing a specific cathode board, and the stripConfiguration: the various pitch vectors to compute a particular strip on this cathode board.

The method getStgcStrip performs the computation of the requested strip in quadruplet coordinates

Definition at line 26 of file CathodeBoardElement.h.

Member Typedef Documentation

◆ ParameterClass

Constructor & Destructor Documentation

◆ CathodeBoardElement()

CathodeBoardElement::CathodeBoardElement ( stgcStripConfiguration_t config,
const Element & element )

Constructor.

Definition at line 10 of file CathodeBoardElement.cxx.

11 : m_config_stgc(std::move(config)), m_element_stgc(element)
12{
13}
stgcStripConfiguration_t m_config_stgc

Member Function Documentation

◆ getPositionAlongStgcStrip()

Amg::Vector3D CathodeBoardElement::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 at line 45 of file CathodeBoardElement.cxx.

45 {
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}
Eigen::Matrix< double, 3, 1 > Vector3D

◆ getStgcStrip()

CathodeBoardElement::stgcStrip_t CathodeBoardElement::getStgcStrip ( ParameterClass iclass,
int stripNumber ) const

Returns three points (center, left, right) of a given strip, in quadruplet coordinates.

Definition at line 18 of file CathodeBoardElement.cxx.

18 {
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}
The return type of the getStrip method: three points along the strip, in quadruplet coordinate.

Member Data Documentation

◆ m_config_stgc

stgcStripConfiguration_t NswAsBuilt::CathodeBoardElement::m_config_stgc
private

Definition at line 81 of file CathodeBoardElement.h.

◆ m_element_stgc

const Element& NswAsBuilt::CathodeBoardElement::m_element_stgc
private

Definition at line 82 of file CathodeBoardElement.h.


The documentation for this class was generated from the following files: