ATLAS Offline Software
StripLayer.icc
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONREADOUTGEOMETRYR4_STRIPLAYER_ICC
5 #define MUONREADOUTGEOMETRYR4_STRIPLAYER_ICC
6 
7 namespace MuonGMR4{
8  inline const Amg::Transform3D& StripLayer::toOrigin() const { return m_transform; }
9  inline const StripDesign& StripLayer::design() const { return *m_design;}
10  inline const IdentifierHash StripLayer::hash() const { return m_hash;}
11 
12  inline Amg::Vector3D StripLayer::localStripPos(unsigned int stripNum) const {
13  Amg::Vector3D stripPos{Amg::Vector3D::Zero()};
14  std::optional<Amg::Vector2D> planePos = m_design->center(stripNum);
15  if (!planePos) {
16  return stripPos;
17  }
18  stripPos.block<2,1>(0,0) = std::move(*planePos);
19  return stripPos;
20  }
21  /// Returns the position of the left strip edge (positive local y) expressed in the local frame
22  inline Amg::Vector3D StripLayer::localStripLeftEdge(unsigned int stripNum) const {
23  Amg::Vector3D edgePos{Amg::Vector3D::Zero()};
24  std::optional<Amg::Vector2D> planePos = m_design->leftEdge(stripNum);
25  if (!planePos) {
26  return edgePos;
27  }
28  edgePos.block<2,1>(0,0) = std::move(*planePos);
29  return edgePos;
30  }
31  /// Returns the position of the right strip edge (negative local y) exoressed in the local frame
32  inline Amg::Vector3D StripLayer::localStripRightEdge(unsigned int stripNum) const {
33  Amg::Vector3D edgePos{Amg::Vector3D::Zero()};
34  std::optional<Amg::Vector2D> planePos = m_design->rightEdge(stripNum);
35  if (!planePos) {
36  return edgePos;
37  }
38  edgePos.block<2,1>(0,0) = std::move(*planePos);
39  return edgePos;
40  }
41 
42 
43  inline Amg::Vector3D StripLayer::stripPosition(unsigned int stripNum) const {
44  return toOrigin() * localStripPos(stripNum);
45  }
46 }
47 #endif