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

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

#include <PcbElement.h>

Collaboration diagram for NswAsBuilt::PcbElement:

Classes

struct  strip_t
struct  stripConfiguration_t
struct  stripPoint_t

Public Types

using ParameterClass = Element::ParameterClass

Public Member Functions

 PcbElement (stripConfiguration_t config, const Element &element)
strip_t getStrip (ParameterClass iclass, int stripNumber) const
Amg::Vector3D getPositionAlongStrip (ParameterClass iclass, int stripNumber, double sx, double sy) const

Private Attributes

stripConfiguration_t m_config
const Elementm_element

Detailed Description

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

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

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

Definition at line 26 of file PcbElement.h.

Member Typedef Documentation

◆ ParameterClass

Constructor & Destructor Documentation

◆ PcbElement()

PcbElement::PcbElement ( stripConfiguration_t config,
const Element & element )

Definition at line 12 of file PcbElement.cxx.

13 : m_config(std::move(config)), m_element(element)
14{ }
const Element & m_element
Definition PcbElement.h:63
stripConfiguration_t m_config
Definition PcbElement.h:62

Member Function Documentation

◆ getPositionAlongStrip()

Amg::Vector3D PcbElement::getPositionAlongStrip ( ParameterClass iclass,
int stripNumber,
double sx,
double sy ) const

Definition at line 37 of file PcbElement.cxx.

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

◆ getStrip()

PcbElement::strip_t PcbElement::getStrip ( ParameterClass iclass,
int stripNumber ) const

Definition at line 18 of file PcbElement.cxx.

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}

Member Data Documentation

◆ m_config

stripConfiguration_t NswAsBuilt::PcbElement::m_config
private

Definition at line 62 of file PcbElement.h.

◆ m_element

const Element& NswAsBuilt::PcbElement::m_element
private

Definition at line 63 of file PcbElement.h.


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