5#include <GaudiKernel/SystemOfUnits.h>
7 constexpr double tolerance = 0.001 * Gaudi::Units::mm;
10#define ORDER_PROP(PROP) \
12 if (std::abs(PROP - other.PROP) > tolerance) { \
13 return PROP < other.PROP; \
19 ostr<<
"Dimension -- width x height [mm]: "<<
halfWidth() * Gaudi::Units::mm<<
" x ";
35 return static_cast<const StripDesign&
>(*this) < other;
72 double botLeftPoint{0.};
73 double botRightPoint{0.};
74 double topLeftPoint{0.};
75 double topRightPoint{0.};
98 double tanRight = std::tan(phiRight * Gaudi::Units::deg);
99 double tanLeft = std::tan(phiLeft * Gaudi::Units::deg);
104 botLeftPoint = -botBase * tanLeft;
105 botRightPoint = -botBase * tanRight;
106 topLeftPoint = -topBase * tanLeft;
107 topRightPoint = -topBase * tanRight;
109 double cosRight = botBase / std::hypot(botRightPoint, botBase);
110 double cosLeft = botBase / std::hypot(botLeftPoint, botBase);
146 if (botEdge > topEdge) {
150 if (botLeftPoint > botRightPoint) {
154 if (topLeftPoint > topRightPoint) {
constexpr std::array< T, N > make_array(const T &def_val)
Helper function to initialize in-place arrays with non-zero values.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ORDER_PROP(PROP)
Helper macro to facilliate the ordering.
double m_firstPadHeight
Height of the pads that are adjacent to the bottom edge of the trapezoid active area.
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.
void print(std::ostream &ostr) const override final
Dump properties to the ostr.
int numPadEta() const
Returns the number of pads in the eta direction in the given layer.
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.
int m_numPadPhi
Number of pads in the Phi direction in the given gasGap layer.
void defineBeamlineRadius(const double radius)
Extracting the distance from gasGap center to beamline from the local to global transformation of the...
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...
int m_numPadEta
Number of pads in the eta direction in the given layer.
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.
double m_radius
Stores the beamline radius extracted from the local to global transformation.
double anglePadPhi() const
Returns the angular pitch of the pads in the phi direction.
bool operator<(const PadDesign &other) const
set sorting operator
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...
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....
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...
double m_padHeight
Height of all the pads that are not adjacent to the bottom edge of the trapezoid active area.
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.
double halfWidth() const
Returns the half height of the strip panel.
double stereoAngle() const
Returns the value of the stereo angle.
const Amg::Vector2D & cornerTopLeft() const
Returns the top left corner of the trapezoid.
int firstStripNumber() const
Returns the number of the first strip.
const Amg::Vector2D & cornerTopRight() const
Returns the top right corner of the trapezoid.
double yCutout() const
Returns the cutout of the diamond.
double shortHalfHeight() const
Returns the shorter half height of the panel.
double longHalfHeight() const
Returns the longer half height of the panel.
bool hasStereoAngle() const
Returns whether a stereo angle is defined.
const Amg::Vector2D & cornerBotRight() const
Returns the bottom right corner of the trapezoid.
const Amg::Vector2D & cornerBotLeft() const
Returns the bottom left corner of the trapezoid.
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 2, 1 > Vector2D
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
void swap(ElementLinkVector< DOBJ > &lhs, ElementLinkVector< DOBJ > &rhs)