|
ATLAS Offline Software
|
Go to the documentation of this file.
10 #ifndef MUONREADOUTGEOMETRY_MUONCHANNELDESIGN_H
11 #define MUONREADOUTGEOMETRY_MUONCHANNELDESIGN_H
14 #include "GaudiKernel/MsgStream.h"
21 struct MuonChannelDesign {
62 void defineTrapezoid(
double HalfShortY,
double HalfLongY,
double HalfHeight);
63 void defineTrapezoid(
double HalfShortY,
double HalfLongY,
double HalfHeight,
double sAngle);
64 void defineDiamond(
double HalfShortY,
double HalfLongY,
double HalfHeight,
double ycutout);
101 double xSize()
const;
182 return (
pos - cen).x();
188 throw std::runtime_error(
"MuonChannelDesign::distanceToReadout() - is not properly defined");
206 chNum =
static_cast<int>(std::floor( xMid /
inputPitch)) + missedBottom + 2;
218 if (chNum < 1 || chNum >
nch) chNum = -1;
249 if (grNumber < 1 || grNumber >
nGroups)
return -1;
265 if (wire_number < 1 || wire_number >
nch) {
268 log <<
MSG::DEBUG <<
"sTGC wire number out of range: wire number = " << wire_number <<
" local pos = (" <<
pos.x() <<
", " <<
pos.y() <<
")" <<
endmsg;
286 if (istrip < 0)
return istrip;
301 rel_pos[1] = (lpos - chan_pos).
y() / std::abs( edge_pos.y() - chan_pos.y() );
312 if (st < 1 || st >
nch)
return false;
317 if (st >
nGroups || st == 63)
return false;
355 if (st <= nMissedBottom || st > nMissedBottom +
nch)
return false;
362 if (st < 1 || st >
nch)
return false;
383 return (cen -
side).mag();
391 return (left - right).mag();
411 pos = 0.5 * (l_pos + r_pos);
428 if (!lambda)
return false;
457 if (!lambda)
return false;
511 return passivHeight*std::abs(edge_pcb?
m_stereoDir.x() : 1.);
515 #endif // MUONREADOUTGEOMETRY_MUONCHANNELDESIGN_H
int positionRelativeToStrip(const Amg::Vector2D &lpos, Amg::Vector2D &rel_pos) const
STRIPS ONLY.
Ensure that the Athena extensions are properly loaded.
double firstPos() const
Returns the position of the first strip along the x-axis.
Amg::Vector2D m_bottomEdge
Vector describing the left edge of the trapezoid.
Amg::Vector2D m_topLeft
Top right point of the trapezoid.
singleton-like access to IMessageSvc via open function and helper
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
set the trapezoid dimensions
int channelNumber(const Amg::Vector2D &pos) const
calculate local channel number, range 1=nstrips like identifiers. Returns -1 if out of range
Eigen::Matrix< double, 2, 1 > Vector2D
Amg::Vector2D m_stereoDir
Direction of the strips.
int numberOfMissingTopStrips() const
Returns the number of missing top strips.
double distanceToReadout(const Amg::Vector2D &pos) const
distance to readout
void defineDiamond(double HalfShortY, double HalfLongY, double HalfHeight, double ycutout)
Amg::Vector2D m_topEdge
Vector describing the right edge of the trapzoid.
double hasStereoAngle() const
returns whether the stereo angle is non-zero
IMessageSvc * getMessageSvc(bool quiet=false)
Amg::Vector2D m_topRight
Bottom right point of the trapezoid.
bool geomCenter(int channel, Amg::Vector2D &pos) const
Returns the geometrical strip center.
const AmgSymMatrix(2) &rotation() const
returns the rotation matrix between eta <-> phi layer
int wireGroupNumber(const Amg::Vector2D &pos) const
calculate local wire group number, range 1=64 like identifiers. Returns -1 if out of range
double gasGapThickness() const
thickness of gas gap
double passivatedLength(double passivWidth, bool left) const
top edge -> left edge bottom edge -> right edge a rectangle with height H parallel to the inclined ed...
Amg::Vector2D m_bottomRight
Bottom right point of the trapezoid.
def dot(G, fn, nodesToHighlight=[])
bool channelPosition(int channel, Amg::Vector2D &pos) const
calculate local channel position for a given channel number
bool center(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the center on the strip.
bool rightInterSect(int channel, Amg::Vector2D &pos, bool uncapped=false) const
Returns the right edge of the strip.
bool leftInterSect(int channel, Amg::Vector2D &pos, bool uncapped=false) const
Returns the intersection of the strip with the left edge of the trapezoid. Special cases:
int wireNumber(const Amg::Vector2D &pos) const
calculate the sTGC wire number. The method can return a value outside the range [1,...
Amg::Vector2D m_stereoNormal
Direction pointing to the next strips.
double passivatedHeight(double passivHeight, bool edge) const
Passivation is applied parallel to.
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.
double channelHalfLength(int st, bool left) const
STRIPS ONLY: calculate channel length on the given side of the x axis (for MM stereo strips)
bool rightEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the right edge of the strip.
double m_firstPos
Position of the first measurement.
double stereoAngle() const
returns the stereo angle
int numberOfMissingBottomStrips() const
Returns the number of missing bottom strips.
void setFirstPos(const double pos)
Set the position of the first strip along the x-axis.
Amg::Vector2D m_bottomLeft
Bottom left point of the trapezoid.
double channelWidth() const
calculate local channel width
void setStereoAngle(double sAngle)
calculate local stereo angle
double isDiamondShape() const
returns whether it's a diamond shape (sTGC QL3)
bool leftEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the left edge of the strip.
double distanceToChannel(const Amg::Vector2D &pos, int nChannel) const
distance to channel - residual