ATLAS Offline Software
PadDesign.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 #ifndef MUONREADOUTGEOMETRYR4_PADDESIGN_H
5 #define MUONREADOUTGEOMETRYR4_PADDESIGN_H
6 
8 #include "CxxUtils/ArrayHelper.h"
9 #include <GaudiKernel/SystemOfUnits.h>
10 
11 namespace MuonGMR4{
12 
13 /* The pad readout channels in sTgc chambers consists of 2D structure. Chambers may contain
14  * different number of pads depending on the gasGap. Measurements in the eta direction for pads
15  * are in millimeters, whereas for the phi direction, we have angular measurements in degrees.
16  * same number of wires. Hence, the channel width & pitch vary across the board. The wire group
17  * PadDesign inherits from the StripDesign class and contains functions that can define the geometry
18  * of pad layers. There are several functions to get the corners and center of each individual pads
19  * w.r.t. the center of the chamber. Extra methods will be added according to the needs.
20 */
21 class PadDesign;
23 
24 class PadDesign: public StripDesign {
25  public:
26  PadDesign() = default;
28  bool operator<(const PadDesign& other) const;
29 
34  void definePadRow(const double firstPadPhiDiv,
35  const int numPadPhi,
36  const double anglePadPhi,
37  const int padPhiShift);
42  void definePadColumn(const double firstPadHeight,
43  const int numPadEta,
44  const double padHeight,
45  const int maxPadEta = 18);
47  int numPads() const;
49  double firstPadPhiDiv() const;
51  int numPadPhi() const;
53  double anglePadPhi() const;
55  double padPhiShift() const;
57  double firstPadHeight() const;
59  int numPadEta() const;
61  double padHeight() const;
63  int maxPadEta() const;
65  int padNumber(const int channel) const;
67  std::pair<int, int> padEtaPhi(const int channel) const;
69  int padEta(const int channel) const;
71  int padPhi(const int channel) const;
73  void defineBeamlineRadius(const double radius);
75  double beamlineRadius() const;
77  using localCornerArray = std::array<Amg::Vector2D, 4>;
81  localCornerArray padCorners(const std::pair<int, int>& padEtaPhi) const;
83  Amg::Vector2D stripPosition(int stripNum) const override final;
85  std::pair<int, int> channelNumber(const Amg::Vector2D& hitPos) const;
87  double maxActiveX(const double locY) const;
89  double sectorAngle() const;
90 
91  private:
92  void print(std::ostream& ostr) const override final;
94  double m_firstPadPhiDiv{0.};
96  int m_numPadPhi{0};
98  double m_anglePadPhi{0.};
100  double m_padPhiShift{0.};
102  double m_firstPadHeight{0.};
104  int m_numPadEta{0};
106  double m_padHeight{0.};
108  int m_maxPadEta{18};
110  double m_radius{0.};
112  static constexpr double m_largeSectorAngle{28.};
114  static constexpr double m_smallSectorAngle{17.};
115 };
116 
118  bool operator()(const PadDesignPtr&a, const PadDesignPtr& b) const {
119  return (*a) < (*b);
120  }
121  bool operator()(const PadDesign&a ,const PadDesign& b) const {
122  return a < b;
123  }
124 };
125 
126 }
128 #endif
MuonGMR4::PadDesign::padHeight
double padHeight() const
Returns the height of all the pads that are not adjacent to the bottom edge of the trapezoid active a...
MuonGMR4::PadDesign::maxPadEta
int maxPadEta() const
Returns the maximum number of pads that can be contained in a column of a pad. Used to match the pad ...
MuonGMR4::PadDesign::beamlineRadius
double beamlineRadius() const
Returns the distance between the gasGap center and the beamline.
GeoModel::TransientConstSharedPtr< PadDesign >
MuonGMR4::StripDesign
Definition: StripDesign.h:30
MuonGMR4::PadDesign::m_maxPadEta
int m_maxPadEta
The maximum number of pads that can be contained in a column of a pad. Used to match the pad numberin...
Definition: PadDesign.h:108
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonGMR4::PadDesign::m_padHeight
double m_padHeight
Height of all the pads that are not adjacent to the bottom edge of the trapezoid active area.
Definition: PadDesign.h:106
MuonGMR4::PadDesign::padEta
int padEta(const int channel) const
Returns the Eta index of the pad for the given sequential channel number.
MuonGMR4::PadDesign::m_largeSectorAngle
static constexpr double m_largeSectorAngle
Large sector opening angle.
Definition: PadDesign.h:112
MuonGMR4::PadDesign::maxActiveX
double maxActiveX(const double locY) const
Function gives the maximum active area length available in the local x for the given hit local y.
MuonGMR4::PadDesign::m_numPadPhi
int m_numPadPhi
Number of pads in the Phi direction in the given gasGap layer.
Definition: PadDesign.h:96
MuonGMR4::PadDesign::padNumber
int padNumber(const int channel) const
Returns the pad number in the conventional pad numbering scheme from the sequential channel number.
MuonGMR4::PadDesign::definePadColumn
void definePadColumn(const double firstPadHeight, const int numPadEta, const double padHeight, const int maxPadEta=18)
Defines the Eta direction layout of the pad detector by specifing the height of the first pad in mill...
Definition: PadDesign.cxx:49
StripDesign.h
MuonGMR4::PadDesignSorter::operator()
bool operator()(const PadDesignPtr &a, const PadDesignPtr &b) const
Definition: PadDesign.h:118
PadDesign.icc
MuonGMR4::PadDesign::channelNumber
std::pair< int, int > channelNumber(const Amg::Vector2D &hitPos) const
Function to retrieve the pad eta and phi given a local position coordinate.
MuonGMR4::PadDesign::firstPadHeight
double firstPadHeight() const
Returns the height of the pads that are adjacent to the bottom edge of the trapezoid active area.
MuonGMR4
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
Definition: MdtCalibInput.h:20
MuonGMR4::PadDesignSorter
Definition: PadDesign.h:117
MuonGMR4::PadDesign::padEtaPhi
std::pair< int, int > padEtaPhi(const int channel) const
Returns a pair of Eta and Phi index for the given sequential channel number.
MuonGMR4::PadDesign::numPadPhi
int numPadPhi() const
Returns the number of pads in the Phi direction in the given gasGap layer.
MuonGMR4::PadDesign::defineBeamlineRadius
void defineBeamlineRadius(const double radius)
Extracting the distance from gasGap center to beamline from the local to global transformation of the...
Definition: PadDesign.cxx:60
MuonGMR4::PadDesign::anglePadPhi
double anglePadPhi() const
Returns the angular pitch of the pads in the phi direction.
MuonGMR4::PadDesign::m_padPhiShift
double m_padPhiShift
The staggering shift of inner pad edges in the phi direction.
Definition: PadDesign.h:100
MuonGMR4::PadDesign::botRight
@ botRight
Definition: PadDesign.h:78
ArrayHelper.h
MuonGMR4::PadDesign::padPhiShift
double padPhiShift() const
Returns the staggering shift of inner pad edges in the phi direction.
MuonGMR4::PadDesign::m_smallSectorAngle
static constexpr double m_smallSectorAngle
Small sector opening angle.
Definition: PadDesign.h:114
MuonGMR4::PadDesign::botLeft
@ botLeft
Definition: PadDesign.h:78
MuonGMR4::PadDesign::definePadRow
void definePadRow(const double firstPadPhiDiv, const int numPadPhi, const double anglePadPhi, const int padPhiShift)
Defines the Phi direction layout of the pad detector by specifing the starting angle w....
Definition: PadDesign.cxx:38
MuonGMR4::PadDesign::padCorners
padCorners
Definition: PadDesign.h:78
MuonGMR4::PadDesign::numPadEta
int numPadEta() const
Returns the number of pads in the eta direction in the given layer.
MuonGMR4::PadDesign::localCornerArray
std::array< Amg::Vector2D, 4 > localCornerArray
Defining an array of four vectors to store the pad corner position in the order of the enum defined b...
Definition: PadDesign.h:77
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
MuonGMR4::PadDesign::m_anglePadPhi
double m_anglePadPhi
Angular pitch of the pads in the phi direction.
Definition: PadDesign.h:98
ParticleGun_SamplingFraction.radius
radius
Definition: ParticleGun_SamplingFraction.py:96
MuonGMR4::PadDesign::topLeft
@ topLeft
Definition: PadDesign.h:78
MuonGMR4::PadDesign::sectorAngle
double sectorAngle() const
Function gives the angular width of the sector.
MuonGMR4::PadDesign::print
void print(std::ostream &ostr) const override final
Dump properties to the ostr.
Definition: PadDesign.cxx:18
a
TList * a
Definition: liststreamerinfos.cxx:10
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonGMR4::PadDesign::topRight
@ topRight
Definition: PadDesign.h:78
MuonGMR4::PadDesign::m_radius
double m_radius
Stores the beamline radius extracted from the local to global transformation.
Definition: PadDesign.h:110
MuonGMR4::PadDesign::operator<
bool operator<(const PadDesign &other) const
set sorting operator
Definition: PadDesign.cxx:30
MuonGMR4::PadDesign::padCorners
localCornerArray padCorners(const int channel) const
Returns an array of local pad corner positions given the sequential pad channel or the Eta/Phi Id.
MuonGMR4::PadDesign::PadDesign
PadDesign()=default
MuonGMR4::PadDesign::stripPosition
Amg::Vector2D stripPosition(int stripNum) const override final
Override from stripDesign. This function will give the center of the pad by taking the sequential cha...
MuonGMR4::PadDesign::m_firstPadHeight
double m_firstPadHeight
Height of the pads that are adjacent to the bottom edge of the trapezoid active area.
Definition: PadDesign.h:102
MuonGMR4::PadDesignSorter::operator()
bool operator()(const PadDesign &a, const PadDesign &b) const
Definition: PadDesign.h:121
MuonGMR4::PadDesign
Definition: PadDesign.h:24
MuonGMR4::PadDesign::firstPadPhiDiv
double firstPadPhiDiv() const
Returns the angle of the first pad outer edge w.r.t. the gasGap center from the beamline.
MuonGMR4::PadDesign::m_firstPadPhiDiv
double m_firstPadPhiDiv
Angle of the first pad outer edge w.r.t. the gasGap center from the beamline.
Definition: PadDesign.h:94
MuonGMR4::PadDesign::padPhi
int padPhi(const int channel) const
Returns the Phi index of the pad for the given sequential channel number.
MuonGMR4::PadDesign::m_numPadEta
int m_numPadEta
Number of pads in the eta direction in the given layer.
Definition: PadDesign.h:104
MuonGMR4::PadDesign::numPads
int numPads() const
Returns the total number of pads in a layer.