ATLAS Offline Software
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 
8 using namespace NswAsBuilt;
9 
10 
11 //===============================================================================
13  : m_config(std::move(config)), m_element(element)
14 { }
15 
16 
17 //===============================================================================
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);
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 }
58 
59 
60 
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::PcbElement
PcbElement(stripConfiguration_t config, const Element &element)
Definition: PcbElement.cxx:12
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::strip_t
Definition: PcbElement.h:49
NswAsBuilt::PcbElement::getPositionAlongStrip
Amg::Vector3D getPositionAlongStrip(ParameterClass iclass, int stripNumber, double sx, double sy) const
Definition: PcbElement.cxx:37
NswAsBuilt::PcbElement::strip_t::right
Amg::Vector3D right
Definition: PcbElement.h:52
PcbElement.h
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::ParameterClass
ParameterClass
Definition: Element.h:63
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::getStrip
strip_t getStrip(ParameterClass iclass, int stripNumber) const
Definition: PcbElement.cxx:18
NswAsBuilt
Definition: CathodeBoardElement.h:12
NswAsBuilt::Element
Element: a node in a hierarchy of alignment frames.
Definition: Element.h:52
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
Definition: PcbElement.h:38
NswAsBuilt::PcbElement::stripConfiguration_t::centerPoint
stripPoint_t centerPoint
Definition: PcbElement.h:40
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32