ATLAS Offline Software
Loading...
Searching...
No Matches
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
9#include <GaudiKernel/SystemOfUnits.h>
10
11namespace 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*/
21class PadDesign;
23
24class 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 std::pair<int, int> padNumber(const int SeqChannel) 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>;
80 localCornerArray padCorners(const int channel) const;
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.};
98 double m_anglePadPhi{0.};
100 double m_padPhiShift{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
static Double_t a
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
double m_firstPadHeight
Height of the pads that are adjacent to the bottom edge of the trapezoid active area.
Definition PadDesign.h:102
double beamlineRadius() const
Returns the distance between the gasGap center and the beamline.
int numPadPhi() const
Returns the number of pads in the Phi direction in the given gasGap layer.
double m_anglePadPhi
Angular pitch of the pads in the phi direction.
Definition PadDesign.h:98
std::pair< int, int > padNumber(const int SeqChannel) const
Returns the pad (eta,phi) for a given pad number in sequence (1,2,3,...18,19,20......
void print(std::ostream &ostr) const override final
Dump properties to the ostr.
Definition PadDesign.cxx:18
int numPadEta() const
Returns the number of pads in the eta direction in the given layer.
double sectorAngle() const
Function gives the angular width of the sector.
double padPhiShift() const
Returns the staggering shift of inner pad edges in the phi direction.
double m_padPhiShift
The staggering shift of inner pad edges in the phi direction.
Definition PadDesign.h:100
int m_numPadPhi
Number of pads in the Phi direction in the given gasGap layer.
Definition PadDesign.h:96
static constexpr double m_largeSectorAngle
Large sector opening angle.
Definition PadDesign.h:112
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
static constexpr double m_smallSectorAngle
Small sector opening angle.
Definition PadDesign.h:114
int numPads() const
Returns the total number of pads in a layer.
int maxPadEta() const
Returns the maximum number of pads that can be contained in a column of a pad. Used to match the pad ...
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
int m_numPadEta
Number of pads in the eta direction in the given layer.
Definition PadDesign.h:104
double firstPadHeight() const
Returns the height of the pads that are adjacent to the bottom edge of the trapezoid active area.
double m_firstPadPhiDiv
Angle of the first pad outer edge w.r.t. the gasGap center from the beamline.
Definition PadDesign.h:94
double m_radius
Stores the beamline radius extracted from the local to global transformation.
Definition PadDesign.h:110
double maxActiveX(const double locY) const
Function gives the maximum active area length available in the local x for the given hit local y.
double anglePadPhi() const
Returns the angular pitch of the pads in the phi direction.
bool operator<(const PadDesign &other) const
set sorting operator
Definition PadDesign.cxx:30
std::pair< int, int > channelNumber(const Amg::Vector2D &hitPos) const
Function to retrieve the pad eta and phi given a local position coordinate.
int padEta(const int channel) const
Returns the Eta index of the pad for the given conventional pad number.
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
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
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
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
double padHeight() const
Returns the height of all the pads that are not adjacent to the bottom edge of the trapezoid active a...
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...
std::pair< int, int > padEtaPhi(const int channel) const
Returns a pair of Eta and Phi index for the given conventional pad number.
double firstPadPhiDiv() const
Returns the angle of the first pad outer edge w.r.t. the gasGap center from the beamline.
int padPhi(const int channel) const
Returns the Phi index of the pad for the given conventional pad number.
localCornerArray padCorners(const int channel) const
Returns an array of local pad corner positions given the sequential pad channel or the Eta/Phi Id.
Eigen::Matrix< double, 2, 1 > Vector2D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
GeoModel::TransientConstSharedPtr< PadDesign > PadDesignPtr
Definition PadDesign.h:22
bool operator()(const PadDesign &a, const PadDesign &b) const
Definition PadDesign.h:121
bool operator()(const PadDesignPtr &a, const PadDesignPtr &b) const
Definition PadDesign.h:118