ATLAS Offline Software
MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 /***************************************************************************
6  The Rpc detector = an assembly module = RPC in amdb
7  ----------------------------------------------------
8 ***************************************************************************/
9 
11 
13 
14 #include <GeoModelKernel/GeoDefinitions.h>
15 #include <GeoModelKernel/GeoLogVol.h>
16 #include <GeoModelKernel/GeoVFullPhysVol.h>
17 #include <GeoModelKernel/GeoVPhysVol.h>
18 
19 #include <cmath>
20 #include <stdexcept>
21 
22 
26 
27 
28 
29 #define THROW_EXCEPTION(MSG) \
30  { \
31  std::stringstream sstr{}; \
32  sstr<<"RpcReadoutElement - "<<idHelperSvc()->toStringDetEl(identify())<<" "<<__LINE__<<": "; \
33  sstr<<MSG; \
34  throw std::runtime_error(sstr.str()); \
35  } \
36 
37 
38 namespace MuonGM {
39 
40  RpcReadoutElement::RpcReadoutElement(GeoVFullPhysVol* pv, const std::string& stName, int zi, int /*fi*/, bool is_mirrored,
43  m_mirrored{is_mirrored} {
44  std::string gVersion = manager()->geometryVersion();
45 
46  m_descratzneg = (zi < 0 && !is_mirrored);
47  setStationName(stName);
48  }
49 
51 
54  void RpcReadoutElement::setNumberOfLayers(const int nlay) { m_nlayers = nlay; }
56  void RpcReadoutElement::setDoubletZ(int doubletZ) { m_dbZ = doubletZ; }
58  double RpcReadoutElement::localStripSCoord(int doubletPhi, bool measphi, int strip) const {
59  bool notintheribs = !inTheRibs();
60  if ((doubletPhi != m_dbPhi && NphiStripPanels() == 1 && notintheribs) ||
61  (NphiStripPanels() != 1 && (doubletPhi < 1 || doubletPhi > NphiStripPanels()))) {
62  THROW_EXCEPTION("doublet Z"<<doubletPhi<<" outside range 1-"<<NphiStripPanels()<<" with doubletZ: "<<m_dbPhi);
63  }
64  if (strip < 1 || strip > Nstrips(measphi)) {
65  THROW_EXCEPTION("strip "<<strip<<" outside range 1-"<<Nstrips(measphi)<<" for measphi="<<measphi);
66  }
67 
68  double local_s = 0.;
69  const int dbphi = std::min(doubletPhi, NphiStripPanels()) - 1;
70  if (measphi)
71  local_s = m_first_phistrip_s[dbphi] + (strip - 1) * StripPitch(measphi);
72  else
73  local_s = m_etastrip_s[dbphi];
74 
75 
76  ATH_MSG_VERBOSE("Ssize, ndvs, nstr/pan, spitch, 1st-strp " << m_Ssize << " " << NphiStripPanels() << " "
77  << m_nphistripsperpanel << " " << m_phistrippitch << " " << m_first_phistrip_s[doubletPhi - 1] << std::endl
78  << "localStripSCoord: local_s is " << local_s << " for doubletPhi: " << doubletPhi
79  << ", measuresPhi: " << measphi << ", strip: " << strip);
80  return local_s;
81  }
82  double RpcReadoutElement::localStripZCoord(bool measphi, int strip) const {
83  if (strip < 1 || strip > Nstrips(measphi)) {
84  THROW_EXCEPTION("Strip "<<strip<<" outside range 1-"<<Nstrips(measphi)<<" for measphi="<<measphi);
85  }
86 
87  double local_z{0};
88  if (!measphi) {
89  local_z = m_first_etastrip_z + (strip - 1) * StripPitch(measphi );
90  } else {
91  local_z = m_phistrip_z;
92  }
93  ATH_MSG_VERBOSE("Zsize, ndvz, nstr/pan, zpitch, 1st-strp " << m_Zsize << " "
94  << m_netastripsperpanel << " " << m_etastrippitch << " " << m_first_etastrip_z << std::endl
95  << "localStripZCoord: local_z is " << local_z << " measuresPhi, " << measphi << ", strip: " << strip );
96  return local_z;
97  }
98 
99  Amg::Vector3D RpcReadoutElement::stripPos(int doubletPhi, int gasGap, bool measphi, int strip) const {
100 
101  ATH_MSG_VERBOSE("stripPos for doubletPhi: " << doubletPhi << ", gasGap:"
102  << gasGap << ", measuresPhi: " << measphi << ", strip:" << strip );
103 
104  // global position of a generic strip !!!!!
105  const Amg::Vector3D localP = localStripPos(doubletPhi, gasGap, measphi, strip);
106 
107  const Amg::Transform3D& rpcTrans{absTransform()};
108 
109  ATH_MSG_VERBOSE("RpcReadoutElement::stripPos got localStripPos " << Amg::toString(localP) << std::endl
110  << "RpcReadoutElement::stripPos gl. transl. R, phi "
111  << rpcTrans.translation().perp() << " " << rpcTrans.translation().phi() << " R-Rsize/2 "
112  << rpcTrans.translation().perp() - m_Rsize * 0.5 );
113 
114  return rpcTrans * localP;
115  }
116 
118  int strip) const {
119 
120  ATH_MSG_VERBOSE("localstripPos for doubletPhi: " << doubletPhi
121  << ", gasGap: " << gasGap << ", mesuresPhi: " << measphi
122  << ", strip: " << strip );
123 
124 
125  // if there's a DED at the bottom, the Rpc is rotated by 180deg around its local y axis
126  // gg numbering is swapped
127  // except for BI chambers (with 3 gas gaps -> this is taken into account in localTopGasGap()
128  // -> eta strip n. 1 (offline id) is "last" eta strip (local)
129  int lstrip = strip;
130 
131  if (!m_hasDEDontop && !measphi) {
132  lstrip = NetaStrips() - strip + 1;
133  }
134  int ldoubletPhi = doubletPhi;
135  // if the station is mirrored, the Rpc is rotated by 180deg around its local x axis
136  // numbering of phi strips must be reversed;
137  // numbering of eta strips is unchanged;
138  // numbering of doubletPhi must be reversed if NphiStripPanels()>1
139  // numbering of doubletZ is unchanged;
140  if (isMirrored()) {
141  if (measphi) lstrip = NphiStrips() - lstrip + 1;
142  if (NphiStripPanels() != 1) {
143  ldoubletPhi = doubletPhi + 1;
144  if (ldoubletPhi > 2) ldoubletPhi = 1;
145  }
146 
147  ATH_MSG_VERBOSE( "localstrippos isMirrored =" << isMirrored() << " lstrip, ldoubletPhi "
148  << lstrip << " " << ldoubletPhi );
149  }
150 
151  // the special case of chambers at Z<0 but not mirrored
152  // numbering of eta strips must be reversed;
153  // numbering of phi strips is unchanged;
154  // numbering of doubletPhi is unchanged;
155  if (m_descratzneg) {
156  if (!measphi) lstrip = NetaStrips() - lstrip + 1;
157  ATH_MSG_VERBOSE("localstrippos special not mirrored at eta<0 = lstrip, ldoublerZ " << lstrip);
158  }
159 
160  // the only RPCs in ATLAS which have 3 gasGaps (layers) are BI RPCs and those only have 1 doubletPhi
161  if (m_nlayers == 3 && ldoubletPhi != 1) {
162  THROW_EXCEPTION("localStripPos() - found ldoubletPhi=" << ldoubletPhi
163  << " for BI RPC which cannot be true, setting to 1");
164  }
165  Amg::Vector3D localP(m_gasGap_xPos[gasGap - 1],
166  localStripSCoord(ldoubletPhi, measphi, lstrip),
167  localStripZCoord(measphi, lstrip));
168  ATH_MSG_VERBOSE("localstrippos = " <<Amg::toString(localP));
169  return localP;
170  }
171 
175  }
176 
180  }
181 
183 
186  }
187 
189  const Amg::Vector3D localP = localGasGapPos(doubletPhi, gasgap);
190  ATH_MSG_VERBOSE("RpcReadoutElement::gasGapPos got localGasGapPos" << Amg::toString(localP,3));
191  return absTransform() * localP;
192  }
195  }
197  double local_s{0.}, local_z{0.};
199  if (numberOfLayers() == 3) {
200  local_s = m_y_translation;
201  local_z = m_z_translation;
202  } else {
203  local_s = NphiStripPanels() != 1 ? -m_Ssize / 4. + (doubletPhi -1) *m_Ssize / 2 : 0;
204  }
205  const Amg::Vector3D localGasGap{m_gasGap_xPos[gasgap -1], local_s, local_z};
206  return localGasGap;
207  }
209  return localToGlobalTransf(id) * x;
210  }
213  }
216  (rotatedRpcModule() ? Amg::getRotateY3D(180. * CLHEP::deg) : Amg::Transform3D::Identity());
217  }
220  return globalToLocalTransf(id) * x;
221  }
222 
224  // P is a point in the global reference frame
225  // we want to have the distance from the side of the phi readout (length travelled along a phi strip) from a signal produced at P)
226  // m_set will not be null but be initialized in "initDesign()" earlier
227  // if it is null the code should crash! - because we're time-critical here a check for null was not implemented
228  unsigned int ndbz{0};
229  for (int dbz = 1 ; dbz <= m_idHelper.doubletZMax(identify()); ++dbz) {
230  const Identifier dbzId = m_idHelper.channelID(identify(), dbz, 1, 1, 0, 1);
231  ndbz+=(manager()->getRpcReadoutElement(dbzId) != nullptr);
232  }
233 
234  double dist = -999.;
235  double zPoint = P.z();
236  double Zsizehalf = getZsize() / 2.;
237  double recenter = REcenter().z();
238  double zLow = recenter - Zsizehalf;
239  double zUp = recenter + Zsizehalf;
240 
241  if (ndbz == 1) {
242  if (zPoint < zLow || zPoint > zUp) {
243  ATH_MSG_DEBUG("RpcReadoutElement with id " << idHelperSvc()->toStringDetEl(identify())
244  << " ::distanceToPhiReadout --- z of the Point " << P.z() << " is out of the rpc-module range (" << zLow << ","
245  << zUp << ")");
247  zPoint = std::clamp(zPoint,zLow, zUp);
248  }
249  if (sideC())
250  dist = zUp - zPoint;
251  else
252  dist = zPoint - zLow;
253 
254  } else {
255  if (zPoint < zLow || zPoint > zUp) {
256  ATH_MSG_DEBUG("RpcReadoutElement with id " << idHelperSvc()->toStringDetEl(identify())
257  << " ::distanceToPhiReadout --- z of the Point " << P.z() << " is out of the rpc-module range (" << zLow << ","
258  << zUp << ") ");
260  zPoint = std::clamp(zPoint, zLow, zUp);
261  }
262  if (m_dbZ == 1 || m_dbZ == 3) {
263  if (sideC())
264  dist = zUp - zPoint;
265  else
266  dist = zPoint - zLow;
267 
268  } else if (m_dbZ == 2) {
269  if (sideC())
270  dist = zPoint - zLow;
271  else
272  dist = zUp - zPoint;
273  }
274  }
275  return dist;
276  }
277 
279 
280  double dist = -999999.;
281  double pAmdbL = GlobalToAmdbLRSCoords(P).x();
282  double myCenterAmdbL = GlobalToAmdbLRSCoords(REcenter()).x();
283  double sdistToCenter = pAmdbL - myCenterAmdbL;
284  if (std::abs(sdistToCenter) > getSsize() * 0.5) {
285  ATH_MSG_DEBUG("RpcReadoutElement with id " << idHelperSvc()->toStringDetEl(identify())
286  << " ::distanceToEtaReadout --- in amdb local frame x of the point " << pAmdbL
287  << " is out of the rpc-module range ("<< myCenterAmdbL - getSsize() * 0.5 << ","
288  << myCenterAmdbL + getSsize() * 0.5 << ")");
289 
290  if (sdistToCenter > 0) {
291  sdistToCenter = getSsize() * 0.5;
292  ATH_MSG_DEBUG("setting distance to " << sdistToCenter);
293  } else if (sdistToCenter < 0) {
294  sdistToCenter = -getSsize() * 0.5;
295  ATH_MSG_DEBUG("setting distance to " << sdistToCenter);
296  }
297  }
298  if (NphiStripPanels() == 2) {
299  dist = getSsize() * 0.5 - std::abs(sdistToCenter);
300  } else {
301  // assumes readout is at smallest phi
302  dist = getSsize() * 0.5 + (sdistToCenter);
303  }
304  return dist;
305  }
306 
308  m_phiDesigns.reserve(NphiStripPanels());
309  m_etaDesigns.reserve(NphiStripPanels());
310 
311  for (int doubletPhi = 1; doubletPhi <= NphiStripPanels(); ++doubletPhi) {
313  const Amg::Vector3D locStripPos1 = gToSurf * stripPos(doubletPhi, 1, true, 1);
314  const Amg::Vector3D locStripPos2 = gToSurf * stripPos(doubletPhi, 1, true, 2);
315 
317  const Amg::Vector3D locStripPosEta1 = gToSurfEta * stripPos(doubletPhi, 1, false, 1);
318  const Amg::Vector3D locStripPosEta2 = gToSurfEta * stripPos(doubletPhi, 1, false, 2);
319 
320  MuonStripDesign phiDesign;
321  phiDesign.nstrips = NphiStrips();
322  phiDesign.stripPitch = StripPitch(1);
323  phiDesign.stripLength = StripLength(1);
324  phiDesign.stripWidth = StripWidth(1);
325 
326  phiDesign.firstStripPos = locStripPos1.block<2,1>(0,0);
327  if (locStripPos2.x() - locStripPos1.x() < 0.) {
328  phiDesign.stripPitch *= -1.;
329  THROW_EXCEPTION("Define a positive definite phi pitch...");
330  }
331  phiDesign.invStripPitch = 1. / phiDesign.stripPitch;
332 
334  phiDesign.stripPosition(1, pos1);
335  phiDesign.stripPosition(2, pos2);
336 
337  if (std::abs(pos1.x() - locStripPos1.x()) > 1e-6) {
338  THROW_EXCEPTION(" bad local strip pos "<<
339  std::endl<<" phi local strip positions " << Amg::toString(locStripPos1) << " "
340  <<Amg::toString(locStripPos2) << " first strip " << phiDesign.firstStripPos
341  << " pitch " << phiDesign.stripPitch << " from calc " << locStripPos2.x() - locStripPos1.x() <<
342  std::endl<<" checking strip position: phi design " << Amg::toString(pos1) << " " << Amg::toString(pos2));
343  }
344 
345  m_phiDesigns.push_back(std::move(phiDesign));
346 
347  MuonStripDesign etaDesign;
348  etaDesign.nstrips = NetaStrips();
349  etaDesign.stripPitch = StripPitch(0);
350  etaDesign.stripLength = StripLength(0);
351  etaDesign.stripWidth = StripWidth(0);
352 
353  etaDesign.firstStripPos = locStripPosEta1.block<2,1>(0,0);
354  if (locStripPosEta2.x() - locStripPosEta1.x() < 0.) {
355  etaDesign.stripPitch *= -1.;
356  }
357  etaDesign.invStripPitch = 1. / etaDesign.stripPitch;
358 
359  etaDesign.stripPosition(1, pos1);
360  etaDesign.stripPosition(2, pos2);
361 
362  if (std::abs(pos1.x() - locStripPosEta1.x()) > 1e-6) {
363  THROW_EXCEPTION(" bad local strip pos "<<std::endl
364  <<" eta local strip positions " << Amg::toString(locStripPosEta1)
365  << " " <<Amg::toString(locStripPosEta2)<< " first strip "
366  << etaDesign.firstStripPos << " pitch " << etaDesign.stripPitch << " from calc "
367  << locStripPosEta2.x() - locStripPosEta1.x() <<std::endl
368  <<" checking strip position: eta design " << Amg::toString(pos1)
369  << " " << Amg::toString(pos2));
370  }
371 
372  m_etaDesigns.push_back(std::move(etaDesign));
373  }
374  }
375 
376 
378 
379  if (m_surfaceData) {
380  ATH_MSG_WARNING("calling fillCache on an already filled cache");
381  return;
382  }
383  m_surfaceData = std::make_unique<SurfaceData>();
384  for (int dbPhi = 1; dbPhi <= NphiStripPanels(); ++dbPhi) {
385  for (int gasGap = 1; gasGap <= numberOfLayers(true); ++gasGap) {
386  Amg::Transform3D trans3D = localToGlobalTransf(dbPhi, gasGap);
387  // surface()
388  Amg::RotationMatrix3D muonTRotation(trans3D.rotation());
389  if (isMirrored()) muonTRotation = muonTRotation * Amg::AngleAxis3D(180. * CLHEP::deg, Amg::Vector3D::UnitX());
390 
391  Amg::RotationMatrix3D surfaceTRotation;
392  surfaceTRotation.col(0) = muonTRotation.col(1);
393  surfaceTRotation.col(1) = muonTRotation.col(2);
394  surfaceTRotation.col(2) = muonTRotation.col(0);
395 
396  for (bool measphi : { true, false}) {
397  const Identifier id = m_idHelper.channelID(identify(), getDoubletZ(), dbPhi, gasGap, measphi , 1);
398 
399  Amg::Transform3D trans(surfaceTRotation);
400  if (!measphi) trans = trans * Amg::getRotateZ3D(isMirrored()? -M_PI_2 : M_PI_2);
401  trans.pretranslate(trans3D.translation());
402 
403  m_surfaceData->m_layerTransforms.push_back(trans);
404  m_surfaceData->m_layerSurfaces.emplace_back(std::make_unique<Trk::PlaneSurface>(*this, id));
405 
406  if (measphi) {
409  m_surfaceData->m_layerCenters.push_back(m_surfaceData->m_layerTransforms.back().translation());
410  m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() *
411  Amg::Vector3D::UnitZ());
412  }
413  }
414  }
415  }
416  m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RectangleBounds>(0.5* StripLength(true),
417  0.5* StripLength(false)));
418  m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RectangleBounds>(0.5* StripLength(false),
419  0.5* StripLength(true)));
420  }
421 
423  if (idHelperSvc()->detElementHash(id) != detectorElementHash()) {
424  return false;
425  }
426  int gasgap = m_idHelper.gasGap(id);
427  if (gasgap < 1 || gasgap > m_nlayers) return false;
428  int strip = m_idHelper.channel(id);
429  if (strip < 1 || strip > Nstrips(m_idHelper.measuresPhi(id))) return false;
430  return true;
431  }
432 
434  return ((getStationName().substr(0, 3) == "BMS") && (getTechnologyName() == "RPC07" || getTechnologyName() == "RPC08"));
435  }
436 
437  int RpcReadoutElement::surfaceHash(int dbPhi, int gasGap, bool measphi ) const {
438  // if there is only one doublet phi we should always use one in the hash calculation
439  if (NphiStripPanels() == 1) dbPhi = 1;
440  if (dbPhi > NphiStripPanels() || gasGap > numberOfLayers(true)) {
441  ATH_MSG_WARNING(" surfaceHash: identifier out of range dbphi " << dbPhi << " max " << NphiStripPanels() << " ch dbphi "
442  << getDoubletPhi() << " gp " << gasGap << " max " << numberOfLayers());
443  return -1;
444  }
445  return (dbPhi - 1) * (2 * NphiStripPanels()) + 2 * (gasGap - 1) + (measphi ? 0 : 1);
446  }
447 
448  int RpcReadoutElement::layerHash(int dbPhi, int gasGap) const {
449  if (NphiStripPanels() == 1) dbPhi = 1;
450 
451  if (dbPhi > NphiStripPanels() || gasGap > numberOfLayers(true)) {
452  ATH_MSG_WARNING(" layerHash: identifier out of range dbphi " << dbPhi << " max " << NphiStripPanels() << " ch dbphi "
453  << getDoubletPhi() << " gp " << gasGap << " max " << numberOfLayers());
454  return -1;
455  }
456  return (dbPhi - 1) * (NphiStripPanels()) + (gasGap - 1);
457  }
458 
460  unsigned int phipanel = std::min(NphiStripPanels(), m_idHelper.doubletPhi(id));
461  if (phipanel > m_phiDesigns.size()) {
462  ATH_MSG_WARNING(" bad identifier, no MuonStripDesign found ");
463  return nullptr;
464  }
465  return m_idHelper.measuresPhi(id) ? &m_phiDesigns[phipanel - 1] : &m_etaDesigns[phipanel - 1];
466  }
467 
468 } // namespace MuonGM
MuonGM::MuonDetectorManager::getRpcReadoutElement
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonDetectorManager.cxx:168
MuonGM::RpcReadoutElement::m_first_etastrip_z
double m_first_etastrip_z
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:243
MuonGM::MuonClusterReadoutElement::transform
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Definition: MuonClusterReadoutElement.h:124
MuonGM::RpcReadoutElement::m_dbR
int m_dbR
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:209
dumpTgcDigiDeadChambers.gasGap
list gasGap
Definition: dumpTgcDigiDeadChambers.py:33
MuonGM::RpcReadoutElement::REcenter
const Amg::Vector3D REcenter() const
center of an RPC RE is not trivially the center of the first surface, overloading MuonClusterReadoutE...
MuonGM::RpcReadoutElement::m_idHelper
const RpcIdHelper & m_idHelper
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:203
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
MuonGM::RpcReadoutElement::gasGapPos
Amg::Vector3D gasGapPos(int doubletPhi, int gasGap) const
Returns the centre of the gasGap.
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:188
JetGeom::recenter
point_t recenter(const point_t &p, const point_t &center)
Definition: cyl_geom.h:226
MuonGM::RpcReadoutElement::NphiStripPanels
int NphiStripPanels() const
returns the number of phi strip panels (1 or 2)
MuonGM::MuonReadoutElement::absTransform
const Amg::Transform3D & absTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:210
MuonGM::MuonReadoutElement::m_Zsize
double m_Zsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:145
MuonGM::RpcReadoutElement::StripLength
double StripLength(bool measphi) const
returns the strip length for the phi or eta plane
MuonGM::RpcReadoutElement::m_first_phistrip_s
std::array< double, s_maxphipanels > m_first_phistrip_s
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:238
RectangleBounds.h
MuonGM::MuonStripDesign::stripPitch
double stripPitch
Definition: MuonStripDesign.h:27
MuonGM::RpcReadoutElement::m_descratzneg
bool m_descratzneg
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:205
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
MuonGM::RpcReadoutElement::RpcReadoutElement
RpcReadoutElement(GeoVFullPhysVol *pv, const std::string &stName, int zi, int fi, bool is_mirrored, MuonDetectorManager *mgr)
constructor
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:40
MuonGM::RpcReadoutElement::setDoubletR
void setDoubletR(int doubletR)
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:55
MuonGM::MuonStripDesign::nstrips
int nstrips
Definition: MuonStripDesign.h:26
MuonGM::RpcReadoutElement::globalToLocalTransf
Amg::Transform3D globalToLocalTransf(const Identifier &id) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:218
MuonGM::RpcReadoutElement::~RpcReadoutElement
~RpcReadoutElement()
destructor
MuonGM::MuonReadoutElement::m_Ssize
double m_Ssize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:143
RpcIdHelper::measuresPhi
bool measuresPhi(const Identifier &id) const override
Definition: RpcIdHelper.cxx:1068
MuonGM::MuonReadoutElement::getZsize
double getZsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:198
MuonGM::RpcReadoutElement::localStripZCoord
double localStripZCoord(bool measphi, int strip) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:82
createCablingJSON.doubletR
int doubletR
Definition: createCablingJSON.py:10
MuonGM::MuonReadoutElement::detectorElementHash
IdentifierHash detectorElementHash() const
Returns the IdentifierHash of the detector element.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:186
deg
#define deg
Definition: SbPolyhedron.cxx:17
MuonGM::RpcReadoutElement::m_hasDEDontop
bool m_hasDEDontop
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:212
MuonGM::MuonReadoutElement::getTechnologyName
const std::string & getTechnologyName() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:188
MuonGM::RpcReadoutElement::localStripSCoord
double localStripSCoord(int doubletPhi, bool measphi, int strip) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:58
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
RpcIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
Definition: RpcIdHelper.cxx:940
x
#define x
MuonGM::RpcReadoutElement::initDesign
void initDesign()
initialize the design classes for this readout element
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:307
MuonGM::MuonStripDesign::invStripPitch
double invStripPitch
Definition: MuonStripDesign.h:28
MuonGM::RpcReadoutElement::globalToLocalCoords
Amg::Vector3D globalToLocalCoords(const Amg::Vector3D &x, const Identifier &id) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:219
Amg::getRotateZ3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Definition: GeoPrimitivesHelpers.h:270
RpcIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: RpcIdHelper.cxx:1066
MuonGM::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:136
MuonGM::RpcReadoutElement::m_etastrip_s
std::array< double, s_maxphipanels > m_etastrip_s
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:239
MuonGM::MuonReadoutElement::getSsize
double getSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:196
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
MuonGM::RpcReadoutElement::m_etaDesigns
std::vector< MuonStripDesign > m_etaDesigns
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:246
MuonGM::RpcReadoutElement::m_etastrippitch
double m_etastrippitch
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:230
GeoVisitVolumes.h
Visitor to process all volumes under a GeoModel node.
MuonGM::RpcReadoutElement::m_dbZ
int m_dbZ
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:210
MuonGM::MuonClusterReadoutElement::m_surfaceData
std::unique_ptr< SurfaceData > m_surfaceData
Definition: MuonClusterReadoutElement.h:120
MuonGM::RpcReadoutElement::localToGlobalCoords
Amg::Vector3D localToGlobalCoords(const Amg::Vector3D &x, const Identifier &id) const
Attention: these transformations do not represent the tracking transformations as obtained by the tra...
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:208
MuonGM::RpcReadoutElement::localToGlobalTransf
Amg::Transform3D localToGlobalTransf(const Identifier &id) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:211
RpcIdHelper::doubletZMax
static int doubletZMax()
Definition: RpcIdHelper.cxx:1090
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MuonGM::MuonReadoutElement::GlobalToAmdbLRSCoords
virtual Amg::Vector3D GlobalToAmdbLRSCoords(const Amg::Vector3D &x) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:149
MuonGM::MuonReadoutElement::getStationName
const std::string & getStationName() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:190
MuonGM::MuonStripDesign::firstStripPos
Amg::Vector2D firstStripPos
Definition: MuonStripDesign.h:33
MuonGM::RpcReadoutElement::distanceToPhiReadout
double distanceToPhiReadout(const Amg::Vector3D &P) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:223
z
#define z
MuonGM::MuonReadoutElement::m_Rsize
double m_Rsize
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:144
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
MuonGM::MuonStripDesign
Definition: MuonStripDesign.h:21
MuonGM::RpcReadoutElement::inTheRibs
bool inTheRibs() const
returns whether the RE is in the ribs of the muon spectrometer
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:433
MuonGM::RpcReadoutElement::m_phistrip_z
double m_phistrip_z
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:242
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
MuonGM::RpcReadoutElement::m_nphistripsperpanel
int m_nphistripsperpanel
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:225
MuonGM::RpcReadoutElement::NphiStrips
int NphiStrips() const
returns the number of phi strips
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
MuonGM::MuonReadoutElement::sideC
bool sideC() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:208
RpcIdHelper::strip
int strip(const Identifier &id) const
Definition: RpcIdHelper.cxx:1070
MuonGM::RpcReadoutElement::setNumberOfLayers
void setNumberOfLayers(const int=2)
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:54
MuonGM::RpcReadoutElement::m_z_translation
double m_z_translation
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:249
MuonGM::RpcReadoutElement::getDoubletPhi
int getDoubletPhi() const
return DoubletPhi value for the given readout element, be aware that one RE can contain two DoubletPh...
Trk::DetectorElemType
DetectorElemType
Definition: TrkDetElementBase.h:39
MuonGM::RpcReadoutElement::getDesign
const MuonStripDesign * getDesign(const Identifier &id) const
returns the MuonStripDesign class for the given identifier
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:459
MuonGM::MuonReadoutElement::manager
const MuonDetectorManager * manager() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:204
MuonGM::RpcReadoutElement::setDoubletPhi
void setDoubletPhi(int doubletPhi)
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:57
MuonGM::RpcReadoutElement::isMirrored
bool isMirrored() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:198
MuonGM::RpcReadoutElement::NetaStrips
int NetaStrips() const
returns the number of eta strips
MuonGM::RpcReadoutElement::setZTranslation
void setZTranslation(const double z)
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:53
MuonGM::MuonStripDesign::stripPosition
bool stripPosition(int strip, Amg::Vector2D &pos) const
calculate local strip position for a given strip number
Definition: MuonStripDesign.h:59
min
#define min(a, b)
Definition: cfImp.cxx:40
MuonGM::RpcReadoutElement::setYTranslation
void setYTranslation(const double y)
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:52
MuonGM::RpcReadoutElement::setDoubletZ
void setDoubletZ(int dobuletZ)
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:56
RpcIdHelper::channel
int channel(const Identifier &id) const override
Definition: RpcIdHelper.cxx:1072
MuonGM::RpcReadoutElement::localStripPos
Amg::Vector3D localStripPos(int doubletPhi, int gasGap, bool measphi, int strip) const
Returns the local strip position in the AMDB frame.
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:117
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
MuonGM::RpcReadoutElement::containsId
virtual bool containsId(const Identifier &id) const override
function to be used to check whether a given Identifier is contained in the readout element
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:422
THROW_EXCEPTION
#define THROW_EXCEPTION(MSG)
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:29
MuonGM::RpcReadoutElement::rotatedRpcModule
bool rotatedRpcModule() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:182
MuonGM::RpcReadoutElement::m_phiDesigns
std::vector< MuonStripDesign > m_phiDesigns
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:245
MuonGM::RpcReadoutElement::surfaceHash
virtual int surfaceHash(const Identifier &id) const override final
returns the hash to be used to look up the surface and transform in the MuonClusterReadoutElement tra...
MuonGM::RpcReadoutElement::stripPos
Amg::Vector3D stripPos(const Identifier &id) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:177
MuonGM::RpcReadoutElement::localGasGapPos
Amg::Vector3D localGasGapPos(const Identifier &id) const
Returns the position of the gasGap w.r.t. rest frame of the chamber.
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:193
MuonGM::RpcReadoutElement::m_nlayers
int m_nlayers
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:213
MuonGM::RpcReadoutElement::layerHash
virtual int layerHash(const Identifier &id) const override final
returns the hash to be used to look up the normal and center in the MuonClusterReadoutElement trackin...
MuonGM::RpcReadoutElement::StripPitch
double StripPitch(bool measphi) const
returns the strip pitch for the phi or eta plane
Amg::getRotateY3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Definition: GeoPrimitivesHelpers.h:261
MuonGM::MuonStripDesign::stripWidth
double stripWidth
Definition: MuonStripDesign.h:30
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MuonGM::RpcReadoutElement::numberOfLayers
virtual int numberOfLayers(bool measphi=true) const override final
number of layers in phi/eta projection, same for eta/phi planes
MuonGM::MuonClusterReadoutElement
Definition: MuonClusterReadoutElement.h:21
MuonGM::RpcReadoutElement::StripWidth
double StripWidth(bool measphi) const
returns the strip width for the phi or eta plane
MuonGM::RpcReadoutElement::fillCache
virtual void fillCache() override final
function to fill tracking cache
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:377
MuonGM::RpcReadoutElement::m_gasGap_xPos
std::array< double, s_nLayers > m_gasGap_xPos
Array caching the distance of the gasGap center to the origin plane in global radial direction.
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:241
MuonGM::RpcReadoutElement::m_phistrippitch
double m_phistrippitch
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:229
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
y
#define y
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
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
python.changerun.pv
pv
Definition: changerun.py:81
GeoPrimitivesToStringConverter.h
MuonGM::RpcReadoutElement::Nstrips
int Nstrips(bool measphi) const
returns the number of strips for the phi or eta plane
MuonGM::RpcReadoutElement::m_dbPhi
int m_dbPhi
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:211
MuonGM::RpcReadoutElement::m_netastripsperpanel
int m_netastripsperpanel
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:226
createCablingJSON.doubletPhi
int doubletPhi
Definition: createCablingJSON.py:11
Amg::AngleAxis3D
Eigen::AngleAxisd AngleAxis3D
Definition: GeoPrimitives.h:45
MuonGM::MuonStripDesign::stripLength
double stripLength
Definition: MuonStripDesign.h:29
python.Logging.manager
manager
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/Logging.py:92
MuonGM::RpcReadoutElement::distanceToEtaReadout
double distanceToEtaReadout(const Amg::Vector3D &P) const
Definition: MuonDetDescr/MuonReadoutGeometry/src/RpcReadoutElement.cxx:278
MuonGM::RpcReadoutElement::m_y_translation
double m_y_translation
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/RpcReadoutElement.h:248
MuonGM::RpcReadoutElement::getDoubletZ
int getDoubletZ() const
return DoubletZ value for the given readout element
MuonGM::Rpc
Definition: Rpc.h:21
generate::Zero
void Zero(TH1D *hin)
Definition: generate.cxx:32
RpcIdHelper::doubletPhi
int doubletPhi(const Identifier &id) const
Definition: RpcIdHelper.cxx:1064
RpcReadoutElement.h