Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
StripLayer.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONREADOUTGEOMETRYR4_STRIPLAYER_ICC
5 #define MUONREADOUTGEOMETRYR4_STRIPLAYER_ICC
6 
7 #include "GaudiKernel/SystemOfUnits.h"
8 
9 namespace MuonGMR4{
10  inline const Amg::Transform3D& StripLayer::toOrigin() const { return m_transform->getDefTransform(); }
11  inline bool StripLayer::hasPhiDesign() const {
12  assert(m_phiDesign && m_etaDesign);
13  return m_phiDesign != m_etaDesign;
14  }
15  inline const StripDesign& StripLayer::design(bool phiView) const {
16  return phiView ? *m_phiDesign :*m_etaDesign;
17  }
18  inline const IdentifierHash StripLayer::hash() const { return m_hash; }
19 
20  inline Amg::Vector3D StripLayer::to3D(CheckVector2D&& vec, const bool phiView) const {
21  if (!vec) {
22  return Amg::Vector3D::Zero();
23  }
24  Amg::Vector3D pos{Amg::Vector3D::Zero()};
25  if (!phiView || !hasPhiDesign()) {
26  pos.block<2,1>(0, 0) = std::move(*vec);
27  } else {
28  const Eigen::Rotation2D rot{90.*Gaudi::Units::deg};
29  pos.block<2,1>(0,0) = rot * (*vec);
30  }
31  return pos;
32  }
33  inline Amg::Vector3D StripLayer::localStripPosition(unsigned int stripNum, bool phiView) const {
34  return to3D(design(phiView).center(stripNum), phiView);
35  }
36  inline Amg::Vector3D StripLayer::localStripLeftEdge(unsigned int stripNum, bool phiView) const {
37  return to3D(design(phiView).leftEdge(stripNum), phiView);
38  }
39  inline Amg::Vector3D StripLayer::localStripRightEdge(unsigned int stripNum, bool phiView) const {
40  return to3D(design(phiView).rightEdge(stripNum), phiView);
41  }
42 }
43 #endif