ATLAS Offline Software
MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <GaudiKernel/IMessageSvc.h>
8 #include <cassert>
9 #include <cstdlib>
10 
11 #include <cmath>
12 #include <ostream>
13 
15 
16 #include "CxxUtils/StringUtils.h"
17 
23 
24 #define THROW_EXCEPT(MESSAGE) \
25  { \
26  std::stringstream except_sstr{}; \
27  except_sstr<<__FILE__<<":"<<__LINE__<<" ("; \
28  except_sstr<<idHelperSvc()->toString(identify())<<") "; \
29  except_sstr<<MESSAGE; \
30  throw std::runtime_error(except_sstr.str()); \
31  }
32 
33 namespace MuonGM {
34 
35  TgcReadoutElement::TgcReadoutElement(GeoVFullPhysVol* pv, const std::string& stName, MuonDetectorManager* mgr) :
37  setStationName(stName);
38  // get the setting of the caching flag from the manager
39  }
43  m_readoutParams = std::move(pars);
44  }
45  void TgcReadoutElement::setFrameThickness(const double frameH, const double frameAB) {
46  m_frameH = frameH;
47  m_frameAB = frameAB;
48  }
50  return m_gasPlaneZ[gg - 1] * Amg::Vector3D::UnitX();
51  }
52 
53  double TgcReadoutElement::length() const { return getRsize() - 2. * frameZwidth(); }
54  double TgcReadoutElement::frameZwidth() const { return m_frameH; }
55  double TgcReadoutElement::frameXwidth() const { return m_frameAB; }
56  double TgcReadoutElement::wireGangBottomX(int gasGap, int gang) const {
57 #ifndef NDEBUG
58  if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
59 #endif
60  return wireGangLocalX(gasGap, gang) - 0.5* gangRadialLength(gasGap, gang);
61  }
62 
63  double TgcReadoutElement::wireGangTopX(int gasGap, int gang) const {
64 #ifndef NDEBUG
65  if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
66 #endif
67  return wireGangLocalX(gasGap, gang) + 0.5 * gangRadialLength(gasGap, gang);
68  }
69 
70  // Access to wire gang dimensions (simple trapezoid with length along z)
71 
72  double TgcReadoutElement::gangRadialLength(int gasGap, int gang) const {
73 #ifndef NDEBUG
74  if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
75 #endif
76  return wirePitch() * nWires(gasGap, gang);
77  }
78 
79  double TgcReadoutElement::gangShortWidth(int gasGap, int gang) const {
80 #ifndef NDEBUG
81  if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
82 #endif
83  return chamberWidth(wireGangBottomX(gasGap, gang)) - frameXwidth() * 2.;
84  }
85 
86  double TgcReadoutElement::gangLongWidth(int gasGap, int gang) const {
87 #ifndef NDEBUG
88  if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
89 #endif
90  return chamberWidth(wireGangTopX(gasGap, gang)) - frameXwidth() * 2.;
91  }
92  double TgcReadoutElement::gangCentralWidth(int gasGap, int gang) const {
93 #ifndef NDEBUG
94  if (!validGang(gasGap, gang)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire gang "<<gang<<" given.");
95 #endif
96  return chamberWidth(wireGangLocalX(gasGap, gang)) - frameXwidth() * 2.;
97  }
98 
100  // number of strips in exclusive phi coverage of a chamber in T[1-3] and T4
101  constexpr std::array<double, 4> nDivInChamberPhi{29.5, 29.5, 29.5, 31.5};
102  double dphi{0.};
103 
104  int iStation = CxxUtils::atoi(&getStationType()[1]);
105  if (iStation != 4 || getStationType()[2] != 'E') { // except for station T4E
106  dphi = 360. * CLHEP::degree / (nPhiChambers()) / nDivInChamberPhi[iStation - 1];
107  } else { // T4E
108  dphi = 360. * CLHEP::degree / 36. / nDivInChamberPhi[iStation - 1];
109  }
110  return dphi;
111  }
112 
113  double TgcReadoutElement::stripDeltaPhi(int gasGap, int strip) const {
114  double dphi = stripDeltaPhi();
115  // half strip
116  if ((strip >= 31 && ((getStationEta() > 0 && gasGap == 1) || (getStationEta() < 0 && gasGap != 1))) ||
117  (strip <= 2 && ((getStationEta() > 0 && gasGap != 1) || (getStationEta() < 0 && gasGap == 1))))
118  dphi = dphi / 2.;
119 
120  return dphi;
121  }
122 
123  double TgcReadoutElement::stripCenterLocX(int gasGap, int strip, double z) const {
124 #ifndef NDEBUG
125  if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
126 #endif
127  const auto [flip, pickStrip] = stripNumberToFetch(gasGap, strip);
128  return flip * stripLocalX(pickStrip, z, m_readoutParams->stripCenter(pickStrip));
129  }
130  double TgcReadoutElement::stripLowEdgeLocX(int gasGap, int strip, double z) const {
131 #ifndef NDEBUG
132  if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & wire strip "<<strip<<" given.");
133 #endif
134  const auto [flip, pickStrip] = stripNumberToFetch(gasGap, strip-1);
135  return flip * stripLocalX(pickStrip, z, 0.5*(stripPosOnLargeBase(pickStrip) + stripPosOnShortBase(pickStrip)));
136  }
137 
138  double TgcReadoutElement::stripHighEdgeLocX(int gasGap, int strip, double z) const {
139 #ifndef NDEBUG
140  if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
141 #endif
142  const auto [flip, pickStrip] = stripNumberToFetch(gasGap, strip+1);
143  return flip * stripLocalX(pickStrip, z, 0.5*(stripPosOnLargeBase(pickStrip) + stripPosOnShortBase(pickStrip)));
144  }
145 
146  double TgcReadoutElement::stripWidth(int gasGap, int strip) const {
148  return std::abs(stripShortWidth(gasGap, strip) + stripLongWidth(gasGap, strip)) / 2.;
149  }
150  double TgcReadoutElement::stripShortWidth(int gasGap, int strip) const {
151  // projection of strip on local X axis at min(Z)
152 #ifndef NDEBUG
153  if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
154 #endif
155  if ((getStationEta() > 0 && gasGap == 1) || (getStationEta() < 0 && gasGap != 1)) {
156  return stripPosOnShortBase(strip + 1) - stripPosOnShortBase(strip);
157  } else {
158  return -(stripPosOnShortBase(33 - strip) - stripPosOnShortBase(33 - (strip - 1)));
159  }
160  }
161 
162  double TgcReadoutElement::stripLongWidth(int gasGap, int strip) const {
163  // projection of strip on local X axis at max(Z)
164 #ifndef NDEBUG
165  if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
166 #endif
167 
168  if ((getStationEta() > 0 && gasGap == 1) || (getStationEta() < 0 && gasGap != 1)) {
169  return stripPosOnLargeBase(strip + 1) - stripPosOnLargeBase(strip);
170  } else {
171  return -(stripPosOnLargeBase(33 - strip) - stripPosOnLargeBase(33 - (strip - 1)));
172  }
173  }
174 
175 
176  double TgcReadoutElement::stripPitch(int gasGap, int strip) const {
177  return stripPitch(gasGap, strip, 0.);
178  }
179 
180  double TgcReadoutElement::stripPitch(int gasGap, int strip, double z) const {
182  #ifndef NDEBUG
183  if (!validStrip(gasGap, strip)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" & strip "<<strip<<" given.");
184  #endif
185  if (1 < strip && strip < 32) {
186  double stripCurrCen = stripCenterLocX(gasGap, strip, z);
187  double stripNextCen = stripCenterLocX(gasGap, strip + 1, z);
188  double stripPrevCen = stripCenterLocX(gasGap, strip - 1, z);
189  return std::max(stripNextCen - stripCurrCen , stripCurrCen - stripPrevCen);
190  } else if (strip == 1) {
191  return stripCenterLocX(gasGap, strip + 1, z) - stripCenterLocX(gasGap, strip, z);
192  } else if (strip == 32) {
193  return stripCenterLocX(gasGap, strip, z) - stripCenterLocX(gasGap, strip - 1, z);
194  }
195  return 0.;
196  }
197 
198  // Monte Carlo debug (returns strip or gang corresponding with the position)
199  int TgcReadoutElement::findGang(int gasGap, const Amg::Vector3D& localPos) const {
200 #ifndef NDEBUG
201  if (!validGap(gasGap)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" given.");
202 #endif
203  double z = localPos.z();
204  for (int gang = 1; gang <= nWireGangs(gasGap); ++gang) {
205  if (z < wireGangTopX(gasGap, gang)) return gang;
206  }
207  return nWireGangs(gasGap);
208  }
209 
210  int TgcReadoutElement::findStrip(int gasGap, const Amg::Vector3D& localPos) const {
211 #ifndef NDEBUG
212  if (!validGap(gasGap)) THROW_EXCEPT("Invalid gasGap "<<gasGap<<" given.");
213 #endif
214  double x = localPos.x();
215  double z = localPos.z();
216  for (int strip = 1; strip <= nStrips(gasGap); ++strip) {
217  if (stripLowEdgeLocX(gasGap, strip, z) < x && x < stripHighEdgeLocX(gasGap, strip, z)) return strip;
218  }
219  return nStrips(gasGap);
220  }
221 
223  bool isValid = (1 <= gasGap && gasGap <= nGasGaps());
224  if (!isValid) {
225  ATH_MSG_WARNING( " gas gap is out of range; limits are 1-" << nGasGaps() );
226  }
227  return isValid;
228  }
229 
230  bool TgcReadoutElement::validGang(int gasGap, int gang) const {
231  return validGap(gasGap) && (1 <= gang && gang <= (nWireGangs(gasGap) + 1));
232  }
233 
234  bool TgcReadoutElement::validStrip(int gasGap, int strip) const {
235  return validGap(gasGap) && (1 <= strip && strip <= nStrips(gasGap));
236  }
237 
239  if (m_surfaceData) {
240  ATH_MSG_WARNING( "calling fillCache on an already filled cache" );
241  return;
242  }
243  m_surfaceData = std::make_unique<SurfaceData>();
244  m_stripSlope = 1. / (getRsize() - 2. * physicalDistanceFromBase());
245  m_locMinPhi = -std::atan2((getLongSsize() - getSsize()) / 2, length());
246  m_locMaxPhi = std::atan2((getLongSsize() - getSsize()) / 2, length());
247 
248  // loop over all gas gaps
249  for (int gp = 1; gp <= nGasGaps(); ++gp) {
250  // loop over phi/eta projections
251  for (bool isStrip : {false, true}) {
253  const Amg::Translation3D xfp{localGasGapPos(gp)};
254  Amg::Transform3D trans3D = absTransform() * xfp;
255  Amg::RotationMatrix3D muonTRotation(trans3D.rotation());
256  Amg::RotationMatrix3D surfaceTRotation{Amg::RotationMatrix3D::Identity()};
257  surfaceTRotation.col(0) = muonTRotation.col(1);
258  surfaceTRotation.col(1) = muonTRotation.col(2);
259  surfaceTRotation.col(2) = muonTRotation.col(0);
260  Amg::Transform3D trans(surfaceTRotation);
261  if (!isStrip) trans = trans * Amg::getRotateZ3D(M_PI / 2);
262  Amg::Translation3D t(trans3D.translation());
263  trans.pretranslate(trans3D.translation());
264  m_surfaceData->m_layerTransforms.push_back(std::move(trans));
265  m_surfaceData->m_layerSurfaces.emplace_back(std::make_unique<Trk::PlaneSurface>(*this, id));
266 
267  if (isStrip) {
268  m_surfaceData->m_layerCenters.push_back(m_surfaceData->m_layerTransforms.back().translation());
269  m_surfaceData->m_layerNormals.push_back(m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D::UnitZ());
270  }
271  }
272  }
273 
274  m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::TrapezoidBounds>(getSsize() / 2.,
275  getLongSsize() / 2.,
276  getRsize() / 2.)); // phi measurement
277  m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RotatedTrapezoidBounds>(getRsize() / 2.,
278  getSsize() / 2.,
279  getLongSsize() / 2.)); // eta measurement
280  }
281 
283  int gasGap = m_idHelper.gasGap(id);
284  if (gasGap < 1 || gasGap > nGasGaps()) return false;
285 
286  int isStrip = m_idHelper.isStrip(id);
287  int ch = m_idHelper.channel(id);
288  if (isStrip == 0) {
289  if (ch < 1 || ch > nWireGangs(gasGap)) return false;
290  } else if (isStrip == 1) {
291  if (ch < 1 || ch > nStrips(gasGap)) return false;
292  } else
293  return false;
294 
295  return true;
296  }
297 
299  THROW_EXCEPT("distanceToReadout() -- method not implemented");
300  return 0.;
301  }
303  THROW_EXCEPT("stripNumber() -- method not implemented");
304  return 0. ;
305  }
308  Amg::Vector3D gpos = channelPos(id);
309  if (!surface(id).globalToLocal(gpos, gpos, pos)) {
310  ATH_MSG_WARNING( " stripPosition:: globalToLocal failed " <<Amg::toString(surface(id).transform().inverse() * gpos,2));
311  return false;
312  }
313  return true;
314  }
316  const Amg::Vector3D& etaHitPos,
317  const Amg::Vector3D& phiHitPos) const {
318 
319 
320  const Amg::Transform3D globToLoc{transform(stripId).inverse()};
321  const Amg::Vector3D lEtaHitPos = globToLoc * etaHitPos;
322  const Amg::Vector3D lPhiHitPos = globToLoc * phiHitPos;
323  const Amg::Vector3D phiHitDir = localStripDir(stripId);
324 
325  ATH_MSG_VERBOSE("local space piont 2D "<<idHelperSvc()->toString(stripId)
326  <<"eta hit: "<<Amg::toString(lEtaHitPos)<<" phi hit:"<<Amg::toString(lPhiHitPos)
327  <<"phi dir: "<<Amg::toString(phiHitDir));
328  return lPhiHitPos +
329  Amg::intersect<3>(lEtaHitPos, Amg::Vector3D::UnitX(), lPhiHitPos, phiHitDir).value_or(0) * phiHitDir;
330 
331  }
334  if (!spacePointPosition(phiId, etaId, gpos) ||
335  !surface(phiId).globalToLocal(gpos, gpos, pos)) {
336  ATH_MSG_WARNING( " stripPosition:: globalToLocal failed " << Amg::toString(surface(phiId).transform().inverse() * gpos,2));
337  return false;
338  }
339  return true;
340  }
342  // get orientation angle of strip to rotate back from local frame to strip
343  if (nStrips(m_idHelper.gasGap(phiId)) <= 1) {
344  ATH_MSG_VERBOSE("No strips defined for plane "<<idHelperSvc()->toString(phiId));
346  return false;
347  }
348  pos = transform(phiId) * localSpacePoint(phiId, channelPos(etaId), channelPos(phiId));
349  return true;
350  }
351 
352 } // namespace MuonGM
353 #undef THROW_EXCEPT
TrapezoidBounds.h
MuonGM::TgcReadoutElement::physicalDistanceFromBase
double physicalDistanceFromBase() const
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MuonGM::TgcReadoutElement::stripPosOnShortBase
double stripPosOnShortBase(int strip) const
MuonGM::TgcReadoutElement::m_readout_name
std::string m_readout_name
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:278
MuonGM::MuonClusterReadoutElement::transform
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Definition: MuonClusterReadoutElement.h:124
GeoModel::TransientConstSharedPtr< TgcReadoutParams >
MuonGM::TgcReadoutElement::m_idHelper
const TgcIdHelper & m_idHelper
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:273
MuonGM::TgcReadoutElement::m_frameAB
double m_frameAB
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:289
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
sendEI_SPB.ch
ch
Definition: sendEI_SPB.py:35
MuonGM::TgcReadoutElement::distanceToReadout
virtual double distanceToReadout(const Amg::Vector2D &pos, const Identifier &id) const override
distance to readout.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:298
MuonGM::TgcReadoutElement::localStripDir
Amg::Vector3D localStripDir(int gasGap, int strip) const
Returns the local strip direction of a strip.
MuonGM::MuonReadoutElement::absTransform
const Amg::Transform3D & absTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:210
max
#define max(a, b)
Definition: cfImp.cxx:41
MuonGM::TgcReadoutElement::chamberWidth
double chamberWidth(double z) const
MuonGM::TgcReadoutElement::spacePointPosition
virtual bool spacePointPosition(const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const override
space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in th...
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:332
TgcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: TgcIdHelper.cxx:642
MuonGM::TgcReadoutElement::stripHighEdgeLocX
double stripHighEdgeLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the right edge of the strip at a given local radial position.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:138
MuonGM::TgcReadoutElement::stripNumber
virtual int stripNumber(const Amg::Vector2D &pos, const Identifier &id) const override final
strip number corresponding to local position.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:302
MuonGM::TgcReadoutElement::m_locMaxPhi
double m_locMaxPhi
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:284
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonGM::TgcReadoutElement::stripDeltaPhi
double stripDeltaPhi() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:99
MuonGM::TgcReadoutElement::nPhiChambers
int nPhiChambers() const
StringUtils.h
MuonGM::TgcReadoutElement::stripCenterLocX
double stripCenterLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the strip center at a given local radial position.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:123
MuonGM::TgcReadoutElement::validGap
bool validGap(int gasGap) const
Returns whether the gasGap is within the allowed range [1-nGasGaps()].
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:222
M_PI
#define M_PI
Definition: ActiveFraction.h:11
MuonGM::TgcReadoutElement::wireGangBottomX
double wireGangBottomX(int gasGap, int gangNum) const
Returns the local X of the bottom wire in the wireGang i in gasGap j.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:56
athena.value
value
Definition: athena.py:122
MuonGM::TgcReadoutElement::findGang
int findGang(int gasGap, const Amg::Vector3D &extPos) const
Returns the gang number that's closest to the given external position.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:199
MuonGM::TgcReadoutElement::m_stripSlope
double m_stripSlope
Cache of the function call 1.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:282
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
isValid
bool isValid(const T &p)
Definition: AtlasPID.h:214
MuonGM::MuonReadoutElement::getLongSsize
double getLongSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:199
MuonGM::TgcReadoutElement::stripPosition
virtual bool stripPosition(const Identifier &id, Amg::Vector2D &pos) const override
strip position If the strip number is outside the range of valid strips, the function will return fal...
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:306
x
#define x
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
MuonGM::TgcReadoutElement::stripLowEdgeLocX
double stripLowEdgeLocX(int gasGap, int strip, double radialPos) const
Returns the local X of the left edge of the strip at a given local radial position.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:130
MuonGM::TgcReadoutElement::nGasGaps
int nGasGaps() const
Returns the number of gas gaps associated with the readout element (2 or 3)
TgcReadoutParams.h
MuonGM::TgcReadoutElement::channelPos
Amg::Vector3D channelPos(const Identifier &id) const
Returns the position of the active channel (wireGang or strip)
Amg::getRotateZ3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Definition: GeoPrimitivesHelpers.h:270
TgcIdHelper::channel
int channel(const Identifier &id) const override
Definition: TgcIdHelper.cxx:649
MuonGM::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:136
MuonGM::MuonReadoutElement::getSsize
double getSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:196
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
python.compareNtuple.rName
rName
Definition: compareNtuple.py:22
MuonGM::MuonClusterReadoutElement::m_surfaceData
std::unique_ptr< SurfaceData > m_surfaceData
Definition: MuonClusterReadoutElement.h:120
MuonGM::TgcReadoutElement::setPlaneZ
void setPlaneZ(double value, int gasGap)
Set the local Z coordinate of the i-th gasGap [1-3].
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:40
MuonGM::TgcReadoutElement::wireGangTopX
double wireGangTopX(int gasGap, int gangNum) const
Returns the local X of the top wire in the wireGang i in gasGap j.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:63
THROW_EXCEPT
#define THROW_EXCEPT(MESSAGE)
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:24
MuonGM::TgcReadoutElement::stripNumberToFetch
std::pair< double, int > stripNumberToFetch(int gasGap, int inStrip) const
Returns whether a strip needs to be flipped and the final strip number parsed to the TgcReadoutParams...
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGM::TgcReadoutElement::gangLongWidth
double gangLongWidth(int gasGap, int gang) const
Returns the length of the most top wire in the gang.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:86
MuonGM::TgcReadoutElement::containsId
virtual bool containsId(const Identifier &id) const override
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:282
MuonGM::TgcReadoutElement::stripWidth
double stripWidth(int gasGap, int strip) const
Returns the width of a given strip in the gasGap i.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:146
EventPrimitivesToStringConverter.h
z
#define z
MuonGM::TgcReadoutElement::m_gasPlaneZ
std::array< double, s_maxGasGap > m_gasPlaneZ
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:276
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
MuonGM::TgcReadoutElement::localGasGapPos
Amg::Vector3D localGasGapPos(int gg) const
Returns the local position of the gasGap in the AMDB coordinate system.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:49
MuonGM::TgcReadoutElement::frameXwidth
double frameXwidth() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:55
MuonGM::TgcReadoutElement::gangShortWidth
double gangShortWidth(int gasGap, int gang) const
Returns the length of the most bottom wire in the gang.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:79
MuonGM::TgcReadoutElement::nWires
int nWires(int gasGap) const
Returns the total number of wires in a given gas gap.
MuonGM::TgcReadoutElement::validStrip
bool validStrip(int gasGap, int strip) const
Returns whether the strip in the given gasgap is within the allowed range
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:234
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGM::TgcReadoutElement::gangRadialLength
double gangRadialLength(int gasGap, int gang) const
Returns the length of the wire gang along the radial direction [pitch x N_{wire}^{gang}].
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:72
MuonGM::TgcReadoutElement::localSpacePoint
Amg::Vector3D localSpacePoint(const Identifier &stripId, const Amg::Vector3D &etaHitPos, const Amg::Vector3D &phiHitPos) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:315
Trk::DetectorElemType
DetectorElemType
Definition: TrkDetElementBase.h:39
MuonGM::TgcReadoutElement::m_locMinPhi
double m_locMinPhi
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:283
MuonGM::TgcReadoutElement::gangCentralWidth
double gangCentralWidth(int gasGap, int gang) const
Returns the length of the central wire in the gang.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:92
MuonGM::TgcReadoutElement::nStrips
int nStrips(int gasGap) const
Returns the number of strips in a given gas gap.
TgcIdHelper::isStrip
int isStrip(const Identifier &id) const
isStrip corresponds to measuresPhi
Definition: TgcIdHelper.cxx:645
MuonGM::TgcReadoutElement::validGang
bool validGang(int gasGap, int wireGang) const
Returns whether the wire gang in the given gasgap is within the allowed range.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:230
MuonGM::TgcReadoutElement::nWireGangs
int nWireGangs(int gasGap) const
Returns the number of wire gangs (Random grouping of wires) in a given gas gap.
MuonGM::MuonReadoutElement::setStationName
void setStationName(const std::string &)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:169
MuonGM::TgcReadoutElement::m_readoutParams
GeoModel::TransientConstSharedPtr< TgcReadoutParams > m_readoutParams
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:279
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
dumpTgcDigiThreshold.isStrip
list isStrip
Definition: dumpTgcDigiThreshold.py:33
MuonGM::TgcReadoutElement::stripLongWidth
double stripLongWidth(int, int) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:162
MuonGM::TgcReadoutElement::wireGangLocalX
double wireGangLocalX(const int gasGap, const int gangNum) const
Returns the local X of the wire gang in gasGap i
MuonGM::Tgc
Definition: Tgc.h:18
MuonGM::TgcReadoutElement::frameZwidth
double frameZwidth() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:54
MuonGM::TgcReadoutElement::TgcReadoutElement
TgcReadoutElement(GeoVFullPhysVol *pv, const std::string &stName, MuonDetectorManager *mgr)
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:35
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGM::TgcReadoutElement::wirePitch
double wirePitch() const
Returns the pitch of the wires.
MuonGM::TgcReadoutElement::setReadOutName
void setReadOutName(const std::string &rName)
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:41
MuonDetectorManager.h
MuonGM::TgcReadoutElement::setReadOutParams
void setReadOutParams(GeoModel::TransientConstSharedPtr< TgcReadoutParams > pars)
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:42
MuonGM::TgcReadoutElement::stripShortWidth
double stripShortWidth(int, int) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:150
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
MuonGM::MuonClusterReadoutElement
Definition: MuonClusterReadoutElement.h:21
MuonGM::TgcReadoutElement::stripPitch
double stripPitch(int gasGap, int strip) const
Returns the pitch of the given strip in gasGap i.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:176
MuonGM::MuonReadoutElement::getRsize
double getRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:197
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:49
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
Amg::RotationMatrix3D
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Definition: GeoPrimitives.h:49
PlaneSurface.h
MuonGM::MuonReadoutElement::getStationType
std::string getStationType() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:189
Amg::Translation3D
Eigen::Translation< double, 3 > Translation3D
Definition: GeoPrimitives.h:44
MuonGM::MuonReadoutElement::identify
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:184
MuonGM::TgcReadoutElement::stripPosOnLargeBase
double stripPosOnLargeBase(int strip) const
MuonGM::TgcReadoutElement::length
double length() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:53
python.changerun.pv
pv
Definition: changerun.py:81
MuonGM::TgcReadoutElement::findStrip
int findStrip(int gasGap, const Amg::Vector3D &extPos) const
Returns the strip number that's closest to the given external position.
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:210
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
TgcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int gasGap, int isStrip, int channel) const
Definition: TgcIdHelper.cxx:583
TgcReadoutElement.h
MuonGM::TgcReadoutElement::stripLocalX
double stripLocalX(const int stripNum, const double locY, const double refPoint) const
Returns the local X given the reference point E.g.
RotatedTrapezoidBounds.h
MuonGM::TgcReadoutElement::setFrameThickness
void setFrameThickness(const double frameH, const double frameAB)
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:45
MuonGM::TgcReadoutElement::fillCache
virtual void fillCache() override
Definition: MuonDetDescr/MuonReadoutGeometry/src/TgcReadoutElement.cxx:238
NSWL1::globalToLocal
Polygon globalToLocal(const Polygon &pol, float z, const Trk::PlaneSurface &surf)
Definition: GeoUtils.cxx:103
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
MuonGM::MuonReadoutElement::getStationEta
int getStationEta() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:193
MuonGM::TgcReadoutElement::m_frameH
double m_frameH
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/TgcReadoutElement.h:288
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32