ATLAS Offline Software
MuonChannelDesign.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  properties of a plane based detector allowing for a stereo angle
7  ----------------------------------------------------------------------
8 ***************************************************************************/
9 
10 #ifndef MUONREADOUTGEOMETRY_MUONCHANNELDESIGN_H
11 #define MUONREADOUTGEOMETRY_MUONCHANNELDESIGN_H
12 
14 #include "GaudiKernel/MsgStream.h"
18 #include "cmath"
19 namespace MuonGM {
20 
21  struct MuonChannelDesign {
22  public:
24  enum class ChannelType { etaStrip, phiStrip };
25  enum class DetType { MM, STGC, Other };
28  int nch{-1}; // total #of active strips
29  double inputPitch{0.}; // we use this param to define the pitch for MM
30  double inputWidth{0.};
31  double inputLength{0.};
32  double firstPitch{0.}; // Pitch of 1st strip or number of wires in 1st group
33  double groupWidth{0.}; // Number of Wires per group
34  double nGroups{0.}; // Number of Wire groups
35  double wireCutout{0.};
36  double thickness{0.}; // gas thickness
37  int nMissedTopEta{0}; // #of strips that are not connected to any FE boards (MM)
41  int totalStrips{0}; // total strips per MM module
42 
44  double distanceToReadout(const Amg::Vector2D& pos) const;
45 
47  double distanceToChannel(const Amg::Vector2D& pos, int nChannel) const;
48 
50  int channelNumber(const Amg::Vector2D& pos) const;
51 
53  int wireGroupNumber(const Amg::Vector2D& pos) const;
54 
56  int wireNumber(const Amg::Vector2D& pos) const;
57 
59  double channelWidth() const;
60 
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);
65 
67  double stereoAngle() const { return m_sAngle; }
68 
69  double yCutout() const { return m_yCutout; }
70 
72  double hasStereoAngle() const {return m_hasStereo;}
73 
75  double isDiamondShape() const {return m_isDiamond;}
76 
78  const AmgSymMatrix(2)& rotation() const { return m_rotMat; }
79 
81  double channelLength(int channel) const;
82 
84  double channelHalfLength(int st, bool left) const;
85 
87  double gasGapThickness() const { return thickness; }
88 
90  bool center(int channel, Amg::Vector2D& pos) const;
92  bool leftEdge(int channel, Amg::Vector2D& pos) const;
94  bool rightEdge(int channel, Amg::Vector2D& pos) const;
96  int numberOfMissingTopStrips() const;
98  int numberOfMissingBottomStrips() const;
99 
100  // radial distance (active area)
101  double xSize() const;
102  // top length (active area)
103  double maxYSize() const;
104  // bottom length (active area)
105  double minYSize() const;
106 
112  double passivatedLength(double passivWidth, bool left) const;
114  double passivatedHeight(double passivHeight, bool edge) const;
115 
117  void setFirstPos(const double pos);
118 
120  double firstPos() const;
121 
126  int positionRelativeToStrip(const Amg::Vector2D& lpos, Amg::Vector2D& rel_pos) const;
127 
128  private:
130  bool channelPosition(int channel, Amg::Vector2D& pos) const;
132  // - For MM, it accounts for routed stereo strips by also checking the intersection with the trapezoid bases.
133  // - For sTGC, it accounts for the rectangular region of QL3 returning -0.5*m_maxYSize for x > 0.
134  // In case uncapped is set to true these special boundary tests are not applied,
135  // and the intersection of the extended strip line with the side of the trapezoid is returned.
136  bool leftInterSect(int channel, Amg::Vector2D& pos, bool uncapped = false) const;
138  bool rightInterSect(int channel, Amg::Vector2D& pos, bool uncapped = false) const;
140  bool geomCenter(int channel, Amg::Vector2D& pos) const;
141 
143  void setStereoAngle(double sAngle);
144 
145  bool m_hasStereo{false};
146  bool m_isDiamond{false};
147  double m_sAngle{0.}; // stereo angle
148  double m_yCutout{0.};
154  double m_firstPos{0.};
167 
168  AmgSymMatrix(2) m_rotMat{AmgSymMatrix(2)::Identity()};
169 
170  double m_maxHorSize{0.}; // Maximum length of the horizontal edges
171  double m_xSize{0.}; // radial distance (active area)
172  double m_minYSize{0.}; // bottom length (active area)
173  double m_maxYSize{0.}; // top length (active area)
174 
175  };
176 
177  //============================================================================
178  inline double MuonChannelDesign::distanceToChannel(const Amg::Vector2D& pos, int chNum) const {
180  if (!center(chNum, cen)) return std::numeric_limits<float>::max();
181 
182  return (pos - cen).x();
183  }
184 
185 
186  //============================================================================
187  inline double MuonChannelDesign::distanceToReadout(const Amg::Vector2D& pos) const {
188  throw std::runtime_error("MuonChannelDesign::distanceToReadout() - is not properly defined");
189  return pos.dot(pos);
190  }
191 
192 
193 
194  //============================================================================
195  inline int MuonChannelDesign::channelNumber(const Amg::Vector2D& pos) const {
196 
197  int chNum{-1};
199  // ** MM strips: keeping cases outside the active area, but within the envelope,
200  // to avoid warnings from MuonPRDTest. Those channels are removed from digitization.
201  const Amg::Vector2D posInEta = m_rotMat.inverse()*pos;
202  const double xMid = (posInEta - firstPos()*Amg::Vector2D::UnitX()).dot(m_stereoNormal) / m_stereoNormal.x();
203  const int missedBottom = numberOfMissingBottomStrips();
204 
205  // first position is always 1/2 pitch above the center of the first active strip
206  chNum = static_cast<int>(std::floor( xMid / inputPitch)) + missedBottom + 2;
207  if (chNum < 1 || chNum > totalStrips) chNum = -1;
208 
209  } else if (type == ChannelType::phiStrip && detType == DetType::STGC) {
210 
211  // ** sTGC wires: return the wire group
212  chNum = wireGroupNumber(pos);
213 
214  } else {
215 
216  // ** All other cases
217  chNum = (int)std::floor( (pos.x() - firstPos()) / inputPitch ) + 2;
218  if (chNum < 1 || chNum > nch) chNum = -1;
219  }
220 
221  return chNum;
222  }
223 
224 
225  //============================================================================
226  inline int MuonChannelDesign::wireGroupNumber(const Amg::Vector2D& pos) const {
227 
228  // The wires in the 1st gas volume of QL1, QS1 can not be read for digits
230 
231  // Get the wire number associated to the position
232  int wire_number = wireNumber(pos);
233 
234  // Find the wire group associated to the wire number.
235  // For wires, firstPitch is the number of wires in the 1st group.
236  int grNumber{-1};
237  if (wire_number <= firstPitch) {
238  grNumber = 1;
239  } else {
240  grNumber = (wire_number - 1 - firstPitch) / groupWidth + 2; // 20 wires per group,
241  // Case a hit is positionned after the last wire but inside the gas volume.
242  // Especially important for QL3. We still consider the digit active.
243  if (grNumber > nGroups && pos.x() < 0.5 * m_maxYSize) grNumber = nGroups;
244  }
245 
246  // If hit is in an inactive wire region of QL1/QS1, return 63 (invalid).
247  // This allows better tracking of hits.
248  if (wireCutout != 0. && pos.y() < 0.5 * m_xSize - wireCutout) return 63;
249  if (grNumber < 1 || grNumber > nGroups) return -1;
250 
251  return grNumber;
252  }
253 
254 
255  //============================================================================
256  inline int MuonChannelDesign::wireNumber(const Amg::Vector2D& pos) const {
257 
258  // Only determine wire number for sTGC wire surfaces
259  int wire_number{-1};
261  if ((pos.x() > -0.5 * m_maxYSize) && (pos.x() < firstPos())) { // before first wire
262  wire_number = 1;
263  } else {
264  wire_number = (pos.x() - firstPos()) / inputPitch + 1;
265  if (wire_number < 1 || wire_number > nch) {
266  MsgStream log(Athena::getMessageSvc(), "MuonChannelDesign");
267  if (log.level() <= MSG::DEBUG) {
268  log << MSG::DEBUG << "sTGC wire number out of range: wire number = " << wire_number << " local pos = (" << pos.x() << ", " << pos.y() << ")" << endmsg;
269  }
270  }
271  }
272  }
273 
274  return wire_number;
275  }
276 
277 
278  //============================================================================
279  inline int MuonChannelDesign::positionRelativeToStrip(const Amg::Vector2D& lpos, Amg::Vector2D& rel_pos) const {
280 
281  if (type != ChannelType::etaStrip) return -1;
282 
283  // if the lpos is out of bounds, express it w.r.t. the nearest active strip.
284  // it's not our job to boundary check.
285  int istrip = channelNumber(lpos);
286  if (istrip < 0) return istrip;
287  istrip = std::max (istrip, numberOfMissingBottomStrips() + 1);
288  istrip = std::min (istrip, numberOfMissingBottomStrips() + nch);
289 
290  // get the intersection of the eta and stereo strips in the local reference frame
292  channelPosition(istrip, chan_pos);
293  chan_pos = rotation() * chan_pos;
294 
295  // strip edge in the local reference frame (note that the uncapped option is set to true)
296  Amg::Vector2D edge_pos{Amg::Vector2D::Zero()};
297  (lpos.y() > 0) ? rightInterSect(istrip, edge_pos, true) : leftInterSect(istrip, edge_pos, true);
298  edge_pos = rotation() * edge_pos;
299 
300  rel_pos[0] = (lpos - chan_pos).x() / channelWidth();
301  rel_pos[1] = (lpos - chan_pos).y() / std::abs( edge_pos.y() - chan_pos.y() );
302 
303  return istrip;
304  }
305 
306 
307  //============================================================================
308  inline bool MuonChannelDesign::channelPosition(int st, Amg::Vector2D& pos) const {
309 
310  if (type == ChannelType::phiStrip) {
311 
312  if (st < 1 || st > nch) return false;
313 
314  if (detType == DetType::STGC) {
315 
317  if (st > nGroups || st == 63) return false; // 63 is defined as an unactive digit
318 
319  // calculate the end of the first wire group (accounts for staggering).
320  // for wires, firstPitch is the number of wires in the first group
321  double firstX = firstPos() + (firstPitch - 1) * inputPitch;
322  double locX{0.};
323 
324  if (st == 1) {
325  // first group: average the starting and ending x of the group
326  locX = 0.5 * (-0.5 * m_maxYSize + firstX);
327  } else if (st == nGroups) {
328  // last group: average the starting and ending x of the group
329  locX = 0.5 * (0.5 * m_maxYSize + firstX + (nGroups - 2) * groupWidth * inputPitch);
330  } else {
331  locX = firstX + groupWidth * inputPitch * (st - 1.5);
332  }
333 
334  pos[0] = locX;
335  pos[1] = 0.;
336 
337  } else {
338 
340  double dY = 0.5 * (m_maxYSize - m_minYSize);
341  double locY = firstPos() + (st-1)*inputPitch;
342  double locX{0.};
343 
344  if (std::abs(locY) > 0.5*m_minYSize) {
345  locX = 0.5 * m_xSize *(1. - (0.5*m_maxYSize - std::abs(locY)) / dY);
346  }
347  pos[0] = locY;
348  pos[1] = locX;
349  }
350 
351  } else if (detType == DetType::MM) {
352 
354  const int nMissedBottom = numberOfMissingBottomStrips();
355  if (st <= nMissedBottom || st > nMissedBottom + nch) return false;
356 
357  // firstPos is 1/2 pitch above the center of the first active strip.
358  pos = (firstPos() + inputPitch* (st - nMissedBottom - 1.5)) * Amg::Vector2D::UnitX();
359  } else {
360 
362  if (st < 1 || st > nch) return false;
363 
364  double x = firstPos() + (st - 1.5)*inputPitch;
365  if (detType == DetType::STGC) {
366  if (firstPitch == inputPitch && st == nch) x -= inputWidth/4.; // case last strip is a half-strip
367  if (firstPitch < inputPitch && st == 1) x += inputWidth/4.; // case first strip is a half-strip
368  }
369 
370  pos[0] = x;
371  pos[1] = 0;
372  }
373 
374  return true;
375  }
376 
377  //============================================================================
378  inline double MuonChannelDesign::channelHalfLength(int st, bool left) const {
380  if (!geomCenter(st,cen) || (left&& !leftInterSect(st, side)) || (!left && !rightInterSect(st, side))) return -0.5;
381  if (type == ChannelType::etaStrip && detType == DetType::MM && (st < 1 || st > totalStrips)) return -0.5;
382  // default case:
383  return (cen - side).mag();
384  }
385 
386 
387  //============================================================================
388  inline double MuonChannelDesign::channelLength(int st) const {
390  if(!leftInterSect(st,left)|| !rightInterSect(st, right)) return -0.5;
391  return (left - right).mag();
392  }
393 
394 
395  //============================================================================
396  inline double MuonChannelDesign::channelWidth() const {
397 
398  if (detType == DetType::STGC) {
399  // eta strips: return the pitch (3.2mm), not the width (2.7mm)
400  // phi wires: return width of full wire group
402  }
403 
404  return inputWidth;
405  }
406 
407  //============================================================================
408  inline bool MuonChannelDesign::geomCenter(int channel, Amg::Vector2D& pos) const {
410  if (!leftInterSect(channel,l_pos) || !rightInterSect(channel,r_pos)) return false;
411  pos = 0.5 * (l_pos + r_pos);
412  return true;
413  }
414 
415  //============================================================================
416  inline bool MuonChannelDesign::leftInterSect(int channel, Amg::Vector2D& pos, bool uncapped /*= false*/) const {
419  if (!channelPosition(channel, chanPos)) return false;
420 
422  if (!uncapped && m_isDiamond && chanPos.x() > 0) {
423  pos = Amg::Vector2D(chanPos.x(), -0.5*m_maxYSize);
424  return true;
425  }
426 
427  std::optional<double> lambda = Amg::intersect<2>(chanPos, m_stereoDir, m_bottomLeft, m_bottomEdge);
428  if (!lambda) return false;
431  if (!uncapped && m_hasStereo && ( (*lambda) < 0. || (*lambda) > m_maxHorSize)) {
432  const Amg::Vector2D e_y{0., 1.};
433  const std::optional<double> bottom_line = Amg::intersect<2>(m_stereoDir.x() > 0.? m_bottomLeft: m_bottomRight, e_y, chanPos, m_stereoDir);
434  if (bottom_line) {
435  pos = chanPos + (*bottom_line)* m_stereoDir;
436  return true;
437  }
438  }
439  pos = (m_bottomLeft + (*lambda) * m_bottomEdge);
440  return true;
441  }
442 
443  //============================================================================
444  inline bool MuonChannelDesign::rightInterSect(int channel, Amg::Vector2D& pos, bool uncapped /*= false*/) const {
447  if (!channelPosition(channel, chanPos)) return false;
448 
450  if (!uncapped && m_isDiamond && chanPos.x() > 0) {
451  pos = Amg::Vector2D(chanPos.x(), 0.5*m_maxYSize);
452  return true;
453  }
454 
456  const std::optional<double> lambda =Amg::intersect<2>(chanPos, m_stereoDir, m_topRight, m_topEdge);
457  if (!lambda) return false;
460  if (!uncapped && m_hasStereo&& ( (*lambda) < 0 || (*lambda) > m_maxHorSize)) {
461  const Amg::Vector2D e_y{0., 1.};
462  const std::optional<double> top_line =Amg::intersect<2>(m_stereoDir.x() > 0. ? m_topRight: m_topLeft, e_y, chanPos, m_stereoDir);
463  if (top_line) {
464  pos = chanPos + (*top_line) * m_stereoDir;
465  return true;
466  }
467  }
468  pos = (m_topRight + (*lambda) * m_topEdge);
469  return true;
470  }
471 
472  //============================================================================
475  inline double MuonChannelDesign::xSize() const {return m_xSize;}
476  inline double MuonChannelDesign::maxYSize() const {return m_maxYSize;}
477  inline double MuonChannelDesign::minYSize() const {return m_minYSize;}
478  inline double MuonChannelDesign::firstPos() const {return m_firstPos;}
479 
480  //============================================================================
482  if (!geomCenter(channel, pos)) return false;
483  pos = m_rotMat * pos;
484  return true;
485  }
486 
487  //============================================================================
488  inline bool MuonChannelDesign::leftEdge(int channel, Amg::Vector2D& pos) const {
489  if (!leftInterSect(channel, pos)) return false;
490  pos = m_rotMat * pos;
491  return true;
492  }
493 
494  //============================================================================
495  inline bool MuonChannelDesign::rightEdge(int channel, Amg::Vector2D& pos) const {
496  if (!rightInterSect(channel, pos)) return false;
497  pos = m_rotMat * pos;
498  return true;
499  }
500 
501 
502  //============================================================================
503  // The passivated length
504  inline double MuonChannelDesign::passivatedLength(double passivWidth, bool left) const{
505  const Amg::Vector2D& edge = (left ? m_bottomEdge : m_topEdge);
506  return passivWidth * std::abs(m_stereoDir.x() *edge.y() - m_stereoDir.y()* edge.x());
507  }
508 
509  //============================================================================
510  inline double MuonChannelDesign::passivatedHeight(double passivHeight, bool edge_pcb) const{
511  return passivHeight*std::abs(edge_pcb? m_stereoDir.x() : 1.);
512  }
513 
514 } // namespace MuonGM
515 #endif // MUONREADOUTGEOMETRY_MUONCHANNELDESIGN_H
MuonGM::MuonChannelDesign::m_maxHorSize
double m_maxHorSize
Definition: MuonChannelDesign.h:176
MuonGM::MuonChannelDesign::inputPitch
double inputPitch
Definition: MuonChannelDesign.h:35
MuonGM::MuonChannelDesign::positionRelativeToStrip
int positionRelativeToStrip(const Amg::Vector2D &lpos, Amg::Vector2D &rel_pos) const
STRIPS ONLY.
Definition: MuonChannelDesign.h:282
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
MuonGM::MuonChannelDesign::firstPos
double firstPos() const
Returns the position of the first strip along the x-axis.
Definition: MuonChannelDesign.h:481
MuonGM::MuonChannelDesign::xSize
double xSize() const
Definition: MuonChannelDesign.h:478
MuonGM::MuonChannelDesign::m_bottomEdge
Amg::Vector2D m_bottomEdge
Vector describing the left edge of the trapezoid.
Definition: MuonChannelDesign.h:164
MuonGM::MuonChannelDesign::m_topLeft
Amg::Vector2D m_topLeft
Top right point of the trapezoid.
Definition: MuonChannelDesign.h:170
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:24
getMessageSvc.h
singleton-like access to IMessageSvc via open function and helper
Trk::locX
@ locX
Definition: ParamDefs.h:37
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
MuonGM::MuonChannelDesign::MuonChannelDesign
MuonChannelDesign()
Definition: MuonChannelDesign.cxx:6
MuonGM::MuonChannelDesign::groupWidth
double groupWidth
Definition: MuonChannelDesign.h:39
MuonGM::MuonChannelDesign::defineTrapezoid
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
set the trapezoid dimensions
Definition: MuonChannelDesign.cxx:25
MuonGM::MuonChannelDesign::channelNumber
int channelNumber(const Amg::Vector2D &pos) const
calculate local channel number, range 1=nstrips like identifiers. Returns -1 if out of range
Definition: MuonChannelDesign.h:198
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
MuonGM::MuonChannelDesign::m_minYSize
double m_minYSize
Definition: MuonChannelDesign.h:178
MuonGM::MuonChannelDesign::firstPitch
double firstPitch
Definition: MuonChannelDesign.h:38
min
constexpr double min()
Definition: ap_fixedTest.cxx:26
MuonGM::MuonChannelDesign::inputWidth
double inputWidth
Definition: MuonChannelDesign.h:36
MuonGM::MuonChannelDesign::nMissedBottomEta
int nMissedBottomEta
Definition: MuonChannelDesign.h:44
CaloCondBlobAlgs_fillNoiseFromASCII.nChannel
nChannel
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:91
MuonGM::MuonChannelDesign::m_stereoDir
Amg::Vector2D m_stereoDir
Direction of the strips.
Definition: MuonChannelDesign.h:156
MuonGM::MuonChannelDesign::numberOfMissingTopStrips
int numberOfMissingTopStrips() const
Returns the number of missing top strips.
Definition: MuonChannelDesign.h:476
MuonGM::MuonChannelDesign::wireCutout
double wireCutout
Definition: MuonChannelDesign.h:41
MuonGM::MuonChannelDesign::distanceToReadout
double distanceToReadout(const Amg::Vector2D &pos) const
distance to readout
Definition: MuonChannelDesign.h:190
MuonGM::MuonChannelDesign::inputLength
double inputLength
Definition: MuonChannelDesign.h:37
MuonGM::MuonChannelDesign::defineDiamond
void defineDiamond(double HalfShortY, double HalfLongY, double HalfHeight, double ycutout)
Definition: MuonChannelDesign.cxx:42
MuonGM::MuonChannelDesign::m_topEdge
Amg::Vector2D m_topEdge
Vector describing the right edge of the trapzoid.
Definition: MuonChannelDesign.h:162
MuonGM::MuonChannelDesign::m_isDiamond
bool m_isDiamond
Definition: MuonChannelDesign.h:152
MuonGM::MuonChannelDesign::m_yCutout
double m_yCutout
Definition: MuonChannelDesign.h:154
x
#define x
MuonGM::MuonChannelDesign::hasStereoAngle
double hasStereoAngle() const
returns whether the stereo angle is non-zero
Definition: MuonChannelDesign.h:78
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
MuonGM::MuonChannelDesign::m_topRight
Amg::Vector2D m_topRight
Bottom right point of the trapezoid.
Definition: MuonChannelDesign.h:172
MuonGM::MuonChannelDesign::geomCenter
bool geomCenter(int channel, Amg::Vector2D &pos) const
Returns the geometrical strip center.
Definition: MuonChannelDesign.h:411
TRT::Hit::side
@ side
Definition: HitInfo.h:83
MuonGM::MuonChannelDesign::ChannelType::phiStrip
@ phiStrip
GeoPrimitives.h
MuonGM::MuonChannelDesign::ChannelType
ChannelType
Definition: MuonChannelDesign.h:30
MuonGM::MuonChannelDesign::minYSize
double minYSize() const
Definition: MuonChannelDesign.h:480
MuonGM::MuonChannelDesign::AmgSymMatrix
const AmgSymMatrix(2) &rotation() const
returns the rotation matrix between eta <-> phi layer
Definition: MuonChannelDesign.h:84
MuonGM::MuonChannelDesign::DetType::MM
@ MM
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
xAOD::rotation
rotation
Definition: TrackSurface_v1.cxx:15
MuonGM::MuonChannelDesign::wireGroupNumber
int wireGroupNumber(const Amg::Vector2D &pos) const
calculate local wire group number, range 1=64 like identifiers. Returns -1 if out of range
Definition: MuonChannelDesign.h:229
MuonGM::MuonChannelDesign::gasGapThickness
double gasGapThickness() const
thickness of gas gap
Definition: MuonChannelDesign.h:93
MuonGM::MuonChannelDesign::passivatedLength
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...
Definition: MuonChannelDesign.h:507
MuonGM::MuonChannelDesign::m_sAngle
double m_sAngle
Definition: MuonChannelDesign.h:153
MuonGM::MuonChannelDesign::m_bottomRight
Amg::Vector2D m_bottomRight
Bottom right point of the trapezoid.
Definition: MuonChannelDesign.h:168
dot.dot
def dot(G, fn, nodesToHighlight=[])
Definition: dot.py:5
MuonGM::MuonChannelDesign::channelPosition
bool channelPosition(int channel, Amg::Vector2D &pos) const
calculate local channel position for a given channel number
Definition: MuonChannelDesign.h:311
GlobalUtilities.h
MuonGM::MuonChannelDesign::center
bool center(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the center on the strip.
Definition: MuonChannelDesign.h:484
EventPrimitives.h
MuonGM::MuonChannelDesign::nMissedTopStereo
int nMissedTopStereo
Definition: MuonChannelDesign.h:45
MuonGM::MuonChannelDesign::rightInterSect
bool rightInterSect(int channel, Amg::Vector2D &pos, bool uncapped=false) const
Returns the right edge of the strip.
Definition: MuonChannelDesign.h:447
MuonGM::MuonChannelDesign::leftInterSect
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:
Definition: MuonChannelDesign.h:419
MuonGM::MuonChannelDesign::totalStrips
int totalStrips
Definition: MuonChannelDesign.h:47
MuonGM::MuonChannelDesign::wireNumber
int wireNumber(const Amg::Vector2D &pos) const
calculate the sTGC wire number. The method can return a value outside the range [1,...
Definition: MuonChannelDesign.h:259
MuonGM::MuonChannelDesign::DetType::STGC
@ STGC
MuonGM::MuonChannelDesign::m_stereoNormal
Amg::Vector2D m_stereoNormal
Direction pointing to the next strips.
Definition: MuonChannelDesign.h:158
MuonGM::MuonChannelDesign::passivatedHeight
double passivatedHeight(double passivHeight, bool edge) const
Passivation is applied parallel to.
Definition: MuonChannelDesign.h:513
MuonGM::MuonChannelDesign::m_hasStereo
bool m_hasStereo
Definition: MuonChannelDesign.h:151
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonGM::MuonChannelDesign::channelLength
double channelLength(int channel) const
STRIPS ONLY: calculate channel length for a given strip number.
Definition: MuonChannelDesign.h:391
MuonGM::MuonChannelDesign::channelHalfLength
double channelHalfLength(int st, bool left) const
STRIPS ONLY: calculate channel length on the given side of the x axis (for MM stereo strips)
Definition: MuonChannelDesign.h:381
MuonGM::MuonChannelDesign::type
ChannelType type
Definition: MuonChannelDesign.h:32
MuonGM::MuonChannelDesign::rightEdge
bool rightEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the right edge of the strip.
Definition: MuonChannelDesign.h:498
y
#define y
MuonGM::MuonChannelDesign::maxYSize
double maxYSize() const
Definition: MuonChannelDesign.h:479
MuonGM::MuonChannelDesign::detType
DetType detType
Definition: MuonChannelDesign.h:33
MuonGM::MuonChannelDesign::m_firstPos
double m_firstPos
Position of the first measurement.
Definition: MuonChannelDesign.h:160
DEBUG
#define DEBUG
Definition: page_access.h:11
MuonGM::MuonChannelDesign::yCutout
double yCutout() const
Definition: MuonChannelDesign.h:75
MuonGM::MuonChannelDesign::stereoAngle
double stereoAngle() const
returns the stereo angle
Definition: MuonChannelDesign.h:73
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
MuonGM::MuonChannelDesign::nMissedTopEta
int nMissedTopEta
Definition: MuonChannelDesign.h:43
MuonGM::MuonChannelDesign::nch
int nch
Definition: MuonChannelDesign.h:34
MuonGM::MuonChannelDesign::nGroups
double nGroups
Definition: MuonChannelDesign.h:40
MuonGM::MuonChannelDesign::numberOfMissingBottomStrips
int numberOfMissingBottomStrips() const
Returns the number of missing bottom strips.
Definition: MuonChannelDesign.h:477
MuonGM::MuonChannelDesign::setFirstPos
void setFirstPos(const double pos)
Set the position of the first strip along the x-axis.
Definition: MuonChannelDesign.cxx:60
MuonGM::MuonChannelDesign::m_bottomLeft
Amg::Vector2D m_bottomLeft
Bottom left point of the trapezoid.
Definition: MuonChannelDesign.h:166
DetType
Definition: DetType.h:10
MuonGM::MuonChannelDesign::m_maxYSize
double m_maxYSize
Definition: MuonChannelDesign.h:179
MuonGM::MuonChannelDesign::channelWidth
double channelWidth() const
calculate local channel width
Definition: MuonChannelDesign.h:399
MuonGM::MuonChannelDesign::setStereoAngle
void setStereoAngle(double sAngle)
calculate local stereo angle
Definition: MuonChannelDesign.cxx:15
MuonGM::MuonChannelDesign::m_xSize
double m_xSize
Definition: MuonChannelDesign.h:177
MuonGM::MuonChannelDesign::DetType::Other
@ Other
MuonGM::MuonChannelDesign::thickness
double thickness
Definition: MuonChannelDesign.h:42
MuonGM::MuonChannelDesign::isDiamondShape
double isDiamondShape() const
returns whether it's a diamond shape (sTGC QL3)
Definition: MuonChannelDesign.h:81
MuonGM::MuonChannelDesign::ChannelType::etaStrip
@ etaStrip
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
MuonGM::MuonChannelDesign::nMissedBottomStereo
int nMissedBottomStereo
Definition: MuonChannelDesign.h:46
MuonGM::MuonChannelDesign::leftEdge
bool leftEdge(int channel, Amg::Vector2D &pos) const
STRIPS ONLY: Returns the left edge of the strip.
Definition: MuonChannelDesign.h:491
MuonGM::MuonChannelDesign::distanceToChannel
double distanceToChannel(const Amg::Vector2D &pos, int nChannel) const
distance to channel - residual
Definition: MuonChannelDesign.h:181