ATLAS Offline Software
Classes | Public Types | Public Member Functions | Private Attributes | List of all members
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. More...
 
stgcStrip_t getStgcStrip (ParameterClass iclass, int stripNumber) const
 Returns three points (center, left, right) of a given strip, in quadruplet coordinates. More...
 
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]. More...
 

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

Definition at line 28 of file CathodeBoardElement.h.

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 }

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  {
47  if (stripNumber == 1){
51  }
52  else if (stripNumber == m_config_stgc.lastStripNumber){
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 }

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

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:
fitman.sy
sy
Definition: fitman.py:524
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::fCenterPoint
stgcStripPoint_t fCenterPoint
Definition: CathodeBoardElement.h:40
NswAsBuilt::CathodeBoardElement::m_config_stgc
stgcStripConfiguration_t m_config_stgc
Definition: CathodeBoardElement.h:81
NswAsBuilt::CathodeBoardElement::stgcStripPoint_t::pitch
Amg::Vector3D pitch
Definition: CathodeBoardElement.h:35
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::lastStripNumber
int lastStripNumber
Definition: CathodeBoardElement.h:39
python.compressB64.sx
string sx
Definition: compressB64.py:96
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::sRightPoint
stgcStripPoint_t sRightPoint
Definition: CathodeBoardElement.h:45
config
Definition: PhysicsAnalysis/AnalysisCommon/AssociationUtils/python/config.py:1
NswAsBuilt::CathodeBoardElement::stgcStripPoint_t::pos
Amg::Vector3D pos
Definition: CathodeBoardElement.h:34
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::fLeftPoint
stgcStripPoint_t fLeftPoint
Definition: CathodeBoardElement.h:41
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::sLeftPoint
stgcStripPoint_t sLeftPoint
Definition: CathodeBoardElement.h:44
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::sCenterPoint
stgcStripPoint_t sCenterPoint
Definition: CathodeBoardElement.h:43
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::lLeftPoint
stgcStripPoint_t lLeftPoint
Definition: CathodeBoardElement.h:47
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::lRightPoint
stgcStripPoint_t lRightPoint
Definition: CathodeBoardElement.h:48
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
NswAsBuilt::CathodeBoardElement::m_element_stgc
const Element & m_element_stgc
Definition: CathodeBoardElement.h:82
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::fRightPoint
stgcStripPoint_t fRightPoint
Definition: CathodeBoardElement.h:42
NswAsBuilt::Element::transformToFrame
void transformToFrame(ParameterClass iclass, const VectorSetRef &local, const Element *frame) const
Definition: Element.cxx:40
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
NswAsBuilt::CathodeBoardElement::stgcStripConfiguration_t::lCenterPoint
stgcStripPoint_t lCenterPoint
Definition: CathodeBoardElement.h:46