ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
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

Definition at line 29 of file PcbElement.h.

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 { }

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);
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)
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 }

◆ 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:
fitman.sy
sy
Definition: fitman.py:524
NswAsBuilt::PcbElement::m_element
const Element & m_element
Definition: PcbElement.h:63
python.compressB64.sx
string sx
Definition: compressB64.py:96
NswAsBuilt::PcbElement::stripPoint_t::pitchvector
Amg::Vector3D pitchvector
Definition: PcbElement.h:34
NswAsBuilt::PcbElement::stripConfiguration_t::centralStripNumber
int centralStripNumber
Definition: PcbElement.h:39
NswAsBuilt::PcbElement::stripConfiguration_t::leftPoint
stripPoint_t leftPoint
Definition: PcbElement.h:41
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
NswAsBuilt::PcbElement::stripConfiguration_t::rightPoint
stripPoint_t rightPoint
Definition: PcbElement.h:42
NswAsBuilt::PcbElement::stripPoint_t::pos
Amg::Vector3D pos
Definition: PcbElement.h:33
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
NswAsBuilt::Element::transformToFrame
void transformToFrame(ParameterClass iclass, const VectorSetRef &local, const Element *frame) const
Definition: Element.cxx:40
NswAsBuilt::PcbElement::m_config
stripConfiguration_t m_config
Definition: PcbElement.h:62
NswAsBuilt::PcbElement::stripConfiguration_t::centerPoint
stripPoint_t centerPoint
Definition: PcbElement.h:40
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32