4#ifndef MUONREADOUTGEOMETRYR4_STRIPDESIGN_H
5#define MUONREADOUTGEOMETRYR4_STRIPDESIGN_H
48 const int numFirst = 1);
65 void defineTrapezoid(
double HalfShortY,
double HalfLongY,
double HalfHeight);
68 void defineTrapezoid(
double HalfShortY,
double HalfLongY,
double HalfHeight,
double sAngle);
94 virtual void print(std::ostream&ostr)
const;
222 std::ostream&
operator<<(std::ostream& ostr,
const StripDesign& design);
Cached unique_ptr with atomic update.
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
void defineDiamond(double HalfShortY, double HalfLongY, double HalfHeight, double yCutout)
Defines the edges of the sTGC diamond L3 sector.
double halfWidth() const
Returns the half height of the strip panel.
const Amg::Vector2D & edgeDirRight() const
Returns the unit vector pointing from the right bottom -> right top corner.
Amg::Vector2D m_topLeft
Top right point of the trapezoid.
const Amg::Vector2D & edgeDirTop() const
Returns the unit vector pointing from the top left -> top right corner.
double stereoAngle() const
Returns the value of the stereo angle.
void defineStripLayout(Amg::Vector2D &&posFirst, const double stripPitch, const double stripWidth, const int numStrips, const int numFirst=1)
Defines the layout of the strip detector by specifing the position of the first strip w....
double m_stripWidth
Width of each strip line.
virtual ~StripDesign()=default
bool isFlipped() const
Returns whether the trapezoid is flipped.
double lenRightEdge() const
Length of the dge from bottom right -> top right.
const Amg::Vector2D & cornerTopLeft() const
Returns the top left corner of the trapezoid.
Amg::Vector2D m_bottomRight
Bottom right point of the trapezoid.
Amg::Vector2D m_bottomLeft
Bottom left point of the trapezoid.
bool operator<(const StripDesign &other) const
Odering operator.
int firstStripNumber() const
Returns the number of the first strip.
CxxUtils::CachedUniquePtr< Amg::Vector2D > m_dirRightEdge
Vector describing the right edge of the trapezoid (bottom right -> top right)
AmgSymMatrix(2) m_etaToStereo
Matrix to translate from nominal -> stereo frame.
double m_cutLongEdge
Lenght of the line segment that's cut from the long edge to make the trapezoid diamond shaped.
CheckVector2D center(int stripNumb) const
Returns the bisector of the strip (Global numbering scheme)
bool m_hasStereo
Flag telling whether the strip design has a stereo angle or not.
double lenTopEdge() const
Length of the the edge from top left -> top right.
std::optional< Amg::Vector2D > CheckVector2D
virtual double stripLength(int stripNumb) const
Returns length of the strip.
double distanceToStrip(const Amg::Vector2D &pos, int strip) const
Returns the distance to the strip center along x.
CheckVector2D leftInterSect(const Amg::Vector2D &stripPos, bool uncapped=false) const
const Amg::Vector2D & edgeDirLeft() const
Returns the unit vector pointing from the left bottom -> left top corner.
virtual CheckVector2D rightInterSect(int stripNum, bool uncapped=false) const
double m_lenSlopEdge
Length of the edge connecting the short with the long egde.
const Amg::Vector2D & cornerTopRight() const
Returns the top right corner of the trapezoid.
CheckVector2D leftEdge(int stripNumb) const
Returns the left edge of the strip (Global numbering scheme)
void resetDirCache()
Resets the cache of the directions.
Amg::Vector2D m_stripDir
Orientiation of the strips along the panel.
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
Defines the edges of the trapezoid.
const Amg::Vector2D & firstStripPos() const
Vector indicating the first strip position.
double lenLeftEdge() const
Length of the edge from bottom left -> top left.
AmgSymMatrix(2) m_stereoToEta
Matrixt to translate from stereo -> nominal frame.
int m_numStrips
Number of all strips.
virtual CheckVector2D leftInterSect(int stripNum, bool uncapped=false) const
Returns the intersection of a given strip with the left or right edge of the trapezoid If uncapped is...
double m_yCutout
Stores the diamond cutout length from the SQLite DB file.
CxxUtils::CachedUniquePtr< Amg::Vector2D > m_dirLeftEdge
Vector describing the left adge of the trapezoid (bottom left -> top left)
double yCutout() const
Returns the cutout of the diamond.
double stripPitch() const
Distance between two adjacent strips.
virtual Amg::Vector2D stripPosition(int stripNum) const
Calculates the position of a given strip (Local numbering scheme)
void flipTrapezoid()
Flips the edges of the trapezoid boundaries by 90 degrees clockwise.
double stripWidth() const
Width of a strip.
const Amg::Vector2D & edgeDirBottom() const
Returns the unit vector pointing from the bottom left -> bottom right corner.
double lenBottomEdge() const
Length of the edge from bottom left -> bottom right.
bool m_isFlipped
Flag telling whether the trapezoid has been flipped.
double m_shortHalfY
Trapezoid dimensions.
void setStereoAngle(double stereo)
Amg::Vector2D m_firstStripPos
First strip position.
Amg::Vector2D m_topRight
Bottom right point of the trapezoid.
double m_stripPitch
Distance between 2 adjacent strip centers.
CxxUtils::CachedUniquePtr< Amg::Vector2D > m_dirBotEdge
Vector describing the bottom edge of the trapezoid (bottom left -> bottom right)
int m_channelShift
Shift between the 0-th readout channel and the first strip described by the panel.
double shortHalfHeight() const
Returns the shorter half height of the panel.
double m_stereoAngle
Stereo angle of the strip design.
bool insideTrapezoid(const Amg::Vector2D &extPos) const
Checks whether an external point is inside the trapezoidal area.
virtual int stripNumber(const Amg::Vector2D &pos) const
Calculates the number of the strip whose center is closest to the given point.
CheckVector2D rightEdge(int stripNumb) const
Returns the right edge of the strip (Global numbering scheme)
CheckVector2D rightInterSect(const Amg::Vector2D &stripPos, bool uncapped=false) const
double longHalfHeight() const
Returns the longer half height of the panel.
Amg::Vector2D m_stripNormal
Vector pointing from strip N to the next strip.
virtual void print(std::ostream &ostr) const
Dump properties to the ostr.
CxxUtils::CachedUniquePtr< Amg::Vector2D > m_dirTopEdge
Vector describing the top edge of the trapzoid (top left -> top right)
bool hasStereoAngle() const
Returns whether a stereo angle is defined.
bool insideBoundaries(const Amg::Vector2D &pos) const
Checks wheather the internal point is inside hte trapezoidal area.
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.
CheckVector2D stripCenter(int stripNum) const
Returns the geometrical center of a given strip.
const Amg::Vector2D & stripDir() const
Vector pointing along the strip.
virtual int numStrips() const
Number of strips on the panel.
const Amg::Vector2D & stripNormal() const
Vector pointing to the next strip.
Eigen::Matrix< double, 2, 1 > Vector2D
CachedUniquePtrT< const T > CachedUniquePtr
The ReadoutGeomCnvAlg converts the Run4 Readout geometry build from the GeoModelXML into the legacy M...
std::ostream & operator<<(std::ostream &ostr, const Chamber::defineArgs &args)
GeoModel::TransientConstSharedPtr< StripDesign > StripDesignPtr
bool operator()(const StripDesignPtr &a, const StripDesignPtr &b) const
bool operator()(const StripDesign &a, const StripDesign &b) const