ATLAS Offline Software
Loading...
Searching...
No Matches
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_RE(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
38namespace MuonGM {
39
40 RpcReadoutElement::RpcReadoutElement(GeoVFullPhysVol* pv, const std::string& stName, int zi, int /*fi*/, bool is_mirrored,
42 MuonClusterReadoutElement(pv, mgr, Trk::DetectorElemType::Rpc),
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; }
55 void RpcReadoutElement::setDoubletR(int doubletR) { m_dbR = doubletR;}
56 void RpcReadoutElement::setDoubletZ(int doubletZ) { m_dbZ = doubletZ; }
57 void RpcReadoutElement::setDoubletPhi(int doubletPhi) { m_dbPhi = doubletPhi; }
59 const MuonStripDesign* design = getDesign(id);
60 THROW_EXCEPTION_RE("Method is not implemented");
61 return design ? design->distanceToReadout(pos) : 0.;
62 }
63 double RpcReadoutElement::localStripSCoord(int doubletPhi, bool measphi, int strip) const {
64 bool notintheribs = !inTheRibs();
65 if ((doubletPhi != m_dbPhi && NphiStripPanels() == 1 && notintheribs) ||
66 (NphiStripPanels() != 1 && (doubletPhi < 1 || doubletPhi > NphiStripPanels()))) {
67 THROW_EXCEPTION_RE("doublet Z"<<doubletPhi<<" outside range 1-"<<NphiStripPanels()<<" with doubletZ: "<<m_dbPhi);
68 }
69 if (strip < 1 || strip > Nstrips(measphi)) {
70 THROW_EXCEPTION_RE("strip "<<strip<<" outside range 1-"<<Nstrips(measphi)<<" for measphi="<<measphi);
71 }
72
73 double local_s = 0.;
74 const int dbphi = std::min(doubletPhi, NphiStripPanels()) - 1;
75 if (measphi)
76 local_s = m_first_phistrip_s[dbphi] + (strip - 1) * StripPitch(measphi);
77 else
78 local_s = m_etastrip_s[dbphi];
79
80
81 ATH_MSG_VERBOSE("Ssize, ndvs, nstr/pan, spitch, 1st-strp " << m_Ssize << " " << NphiStripPanels() << " "
82 << m_nphistripsperpanel << " " << m_phistrippitch << " " << m_first_phistrip_s[doubletPhi - 1] << std::endl
83 << "localStripSCoord: local_s is " << local_s << " for doubletPhi: " << doubletPhi
84 << ", measuresPhi: " << measphi << ", strip: " << strip);
85 return local_s;
86 }
87 double RpcReadoutElement::localStripZCoord(bool measphi, int strip) const {
88 if (strip < 1 || strip > Nstrips(measphi)) {
89 THROW_EXCEPTION_RE("Strip "<<strip<<" outside range 1-"<<Nstrips(measphi)<<" for measphi="<<measphi);
90 }
91
92 double local_z{0};
93 if (!measphi) {
94 local_z = m_first_etastrip_z + (strip - 1) * StripPitch(measphi);
95 } else {
96 local_z = m_phistrip_z;
97 }
98 ATH_MSG_VERBOSE(idHelperSvc()->toStringDetEl(identify())<<", strip: "<<strip<<", zpitch: "<<StripPitch(measphi)
99 <<", ndvz:" << m_netastripsperpanel<<", 1st-strp: " << m_first_etastrip_z
100 << ", localStripZCoord: local_z is " << local_z << " measuresPhi, " << measphi << ", strip: " << strip );
101 return local_z;
102 }
103
104 Amg::Vector3D RpcReadoutElement::stripPos(int doubletPhi, int gasGap, bool measphi, int strip) const {
105
106 ATH_MSG_VERBOSE("stripPos for doubletPhi: " << doubletPhi << ", gasGap:"
107 << gasGap << ", measuresPhi: " << measphi << ", strip:" << strip );
108
109 // global position of a generic strip !!!!!
110 const Amg::Vector3D localP = localStripPos(doubletPhi, gasGap, measphi, strip);
111
112 const Amg::Transform3D& rpcTrans{absTransform()};
113
114 ATH_MSG_VERBOSE("RpcReadoutElement::stripPos got localStripPos " << Amg::toString(localP) << std::endl
115 << "RpcReadoutElement::stripPos gl. transl. R, phi "
116 << rpcTrans.translation().perp() << " " << rpcTrans.translation().phi() << " R-Rsize/2 "
117 << rpcTrans.translation().perp() - m_Rsize * 0.5 );
118
119 return rpcTrans * localP;
120 }
121
122 Amg::Vector3D RpcReadoutElement::localStripPos(int doubletPhi, int gasGap, bool measphi,
123 int strip) const {
124
125 ATH_MSG_VERBOSE("localstripPos for doubletPhi: " << doubletPhi
126 << ", gasGap: " << gasGap << ", mesuresPhi: " << measphi
127 << ", strip: " << strip );
128
129
130 // if there's a DED at the bottom, the Rpc is rotated by 180deg around its local y axis
131 // gg numbering is swapped
132 // except for BI chambers (with 3 gas gaps -> this is taken into account in localTopGasGap()
133 // -> eta strip n. 1 (offline id) is "last" eta strip (local)
134 int lstrip = strip;
135
136 if (!m_hasDEDontop && !measphi) {
137 lstrip = NetaStrips() - strip + 1;
138 }
139 int ldoubletPhi = doubletPhi;
140 // if the station is mirrored, the Rpc is rotated by 180deg around its local x axis
141 // numbering of phi strips must be reversed;
142 // numbering of eta strips is unchanged;
143 // numbering of doubletPhi must be reversed if NphiStripPanels()>1
144 // numbering of doubletZ is unchanged;
145 if (isMirrored()) {
146 if (measphi) lstrip = NphiStrips() - lstrip + 1;
147 if (NphiStripPanels() != 1) {
148 ldoubletPhi = doubletPhi + 1;
149 if (ldoubletPhi > 2) ldoubletPhi = 1;
150 }
151
152 ATH_MSG_VERBOSE( "localstrippos isMirrored =" << isMirrored() << " lstrip, ldoubletPhi "
153 << lstrip << " " << ldoubletPhi );
154 }
155
156 // the special case of chambers at Z<0 but not mirrored
157 // numbering of eta strips must be reversed;
158 // numbering of phi strips is unchanged;
159 // numbering of doubletPhi is unchanged;
160 if (m_descratzneg) {
161 if (!measphi) lstrip = NetaStrips() - lstrip + 1;
162 ATH_MSG_VERBOSE("localstrippos special not mirrored at eta<0 = lstrip, ldoublerZ " << lstrip);
163 }
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
173 return localStripPos(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id),
174 m_idHelper.measuresPhi(id), m_idHelper.strip(id));
175 }
176
178 return stripPos(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id),
179 m_idHelper.measuresPhi(id), m_idHelper.strip(id));
180 }
181
183
185 return gasGapPos(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id));
186 }
187
188 Amg::Vector3D RpcReadoutElement::gasGapPos(int doubletPhi, int gasgap) const {
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 }
194 return localGasGapPos(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id));
195 }
196 Amg::Vector3D RpcReadoutElement::localGasGapPos(int doubletPhi, int gasgap) const {
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 }
212 return localToGlobalTransf(m_idHelper.doubletPhi(id), m_idHelper.gasGap(id));
213 }
215 return absTransform() * Amg::Translation3D{localGasGapPos(dbPhi, gasGap)} *
216 (rotatedRpcModule() ? Amg::getRotateY3D(180. * CLHEP::deg) : Amg::Transform3D::Identity());
217 }
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) {
312 const Amg::Transform3D gToSurf = MuonClusterReadoutElement::transform(surfaceHash(doubletPhi, 1, 1)).inverse();
313 const Amg::Vector3D locStripPos1 = gToSurf * stripPos(doubletPhi, 1, true, 1);
314 const Amg::Vector3D locStripPos2 = gToSurf * stripPos(doubletPhi, 1, true, 2);
315
316 const Amg::Transform3D gToSurfEta = MuonClusterReadoutElement::transform(surfaceHash(doubletPhi, 1, 0)).inverse();
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_RE("Define a positive definite phi pitch...");
330 }
331 phiDesign.invStripPitch = 1. / phiDesign.stripPitch;
332
333 Amg::Vector2D pos1{Amg::Vector2D::Zero()}, pos2{Amg::Vector2D::Zero()};
334 phiDesign.stripPosition(1, pos1);
335 phiDesign.stripPosition(2, pos2);
336
337 if (std::abs(pos1.x() - locStripPos1.x()) > 1e-6) {
338 THROW_EXCEPTION_RE(" 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_RE(" 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
407 if (!measphi) {
410 m_surfaceData->m_layerCenters.push_back(m_surfaceData->m_layerTransforms.back().translation());
411 m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() *
412 Amg::Vector3D::UnitZ());
413 }
414 }
415 }
416 }
417 m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RectangleBounds>(0.5* StripLength(true),
418 0.5* StripLength(false)));
419 m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RectangleBounds>(0.5* StripLength(false),
420 0.5* StripLength(true)));
421 }
422
424 if (idHelperSvc()->detElementHash(id) != detectorElementHash()) {
425 return false;
426 }
427 int gasgap = m_idHelper.gasGap(id);
428 if (gasgap < 1 || gasgap > m_nlayers) return false;
429 int strip = m_idHelper.channel(id);
430 if (strip < 1 || strip > Nstrips(m_idHelper.measuresPhi(id))) return false;
431 return true;
432 }
433
435 return ((getStationName().substr(0, 3) == "BMS") && (getTechnologyName() == "RPC07" || getTechnologyName() == "RPC08"));
436 }
437
438 int RpcReadoutElement::surfaceHash(int dbPhi, int gasGap, bool measphi ) const {
439 // if there is only one doublet phi we should always use one in the hash calculation
440 if (NphiStripPanels() == 1) dbPhi = 1;
441 if (dbPhi > NphiStripPanels() || gasGap > numberOfLayers(true)) {
442 ATH_MSG_WARNING(" surfaceHash: identifier out of range dbphi " << dbPhi << " max " << NphiStripPanels() << " ch dbphi "
443 << getDoubletPhi() << " gp " << gasGap << " max " << numberOfLayers());
444 return -1;
445 }
446 return (dbPhi - 1) * (2 * NphiStripPanels()) + 2 * (gasGap - 1) + (measphi ? 0 : 1);
447 }
448
449 int RpcReadoutElement::layerHash(int dbPhi, int gasGap) const {
450 if (NphiStripPanels() == 1) dbPhi = 1;
451
452 if (dbPhi > NphiStripPanels() || gasGap > numberOfLayers(true)) {
453 ATH_MSG_WARNING(" layerHash: identifier out of range dbphi " << dbPhi << " max " << NphiStripPanels() << " ch dbphi "
454 << getDoubletPhi() << " gp " << gasGap << " max " << numberOfLayers());
455 return -1;
456 }
457 return (dbPhi - 1) * (NphiStripPanels()) + (gasGap - 1);
458 }
459
461 unsigned int phipanel = std::min(NphiStripPanels(), m_idHelper.doubletPhi(id));
462 if (phipanel > m_phiDesigns.size()) {
463 ATH_MSG_WARNING(" bad identifier, no MuonStripDesign found ");
464 return nullptr;
465 }
466 return m_idHelper.measuresPhi(id) ? &m_phiDesigns[phipanel - 1] : &m_etaDesigns[phipanel - 1];
467 }
468
469} // namespace MuonGM
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Visitor to process all volumes under a GeoModel node.
static Double_t P(Double_t *tt, Double_t *par)
#define y
#define x
#define z
std::unique_ptr< SurfaceData > m_surfaceData
MuonClusterReadoutElement(GeoVFullPhysVol *pv, MuonDetectorManager *mgr, Trk::DetectorElemType detType)
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
const RpcReadoutElement * getRpcReadoutElement(const Identifier &id) const
access via extended identifier (requires unpacking)
const std::string & geometryVersion() const
it can be Rome-Initial or P03, or ... it's the name of the layout
IdentifierHash detectorElementHash() const
Returns the IdentifierHash of the detector element.
virtual Amg::Vector3D GlobalToAmdbLRSCoords(const Amg::Vector3D &x) const
Identifier identify() const override final
Returns the ATLAS Identifier of the MuonReadOutElement.
int getDoubletPhi() const
return DoubletPhi value for the given readout element, be aware that one RE can contain two DoubletPh...
void initDesign()
initialize the design classes for this readout element
int NphiStripPanels() const
returns the number of phi strip panels (1 or 2)
Amg::Transform3D globalToLocalTransf(const Identifier &id) const
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...
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...
double StripLength(bool measphi) const
returns the strip length for the phi or eta plane
Amg::Vector3D localStripPos(int doubletPhi, int gasGap, bool measphi, int strip) const
Returns the local strip position in the AMDB frame.
Amg::Vector3D localGasGapPos(const Identifier &id) const
Returns the position of the gasGap w.r.t. rest frame of the chamber.
int NphiStrips() const
returns the number of phi strips
int NetaStrips() const
returns the number of eta strips
~RpcReadoutElement()
destructor
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...
int getDoubletZ() const
return DoubletZ value for the given readout element
Amg::Transform3D localToGlobalTransf(const Identifier &id) const
double localStripSCoord(int doubletPhi, bool measphi, int strip) const
std::array< double, s_nLayers > m_gasGap_xPos
Array caching the distance of the gasGap center to the origin plane in global radial direction.
Amg::Vector3D globalToLocalCoords(const Amg::Vector3D &x, const Identifier &id) const
virtual void fillCache() override final
function to fill tracking cache
Amg::Vector3D gasGapPos(int doubletPhi, int gasGap) const
Returns the centre of the gasGap.
const Amg::Vector3D REcenter() const
center of an RPC RE is not trivially the center of the first surface, overloading MuonClusterReadoutE...
int Nstrips(bool measphi) const
returns the number of strips for the phi or eta plane
virtual int numberOfLayers(bool measphi=true) const override final
number of layers in phi/eta projection, same for eta/phi planes
bool inTheRibs() const
returns whether the RE is in the ribs of the muon spectrometer
virtual double distanceToReadout(const Amg::Vector2D &pos, const Identifier &id) const override final
distance to readout.
RpcReadoutElement(GeoVFullPhysVol *pv, const std::string &stName, int zi, int fi, bool is_mirrored, MuonDetectorManager *mgr)
constructor
double StripWidth(bool measphi) const
returns the strip width for the phi or eta plane
double StripPitch(bool measphi) const
returns the strip pitch for the phi or eta plane
const MuonStripDesign * getDesign(const Identifier &id) const
returns the MuonStripDesign class for the given identifier
virtual bool containsId(const Identifier &id) const override
function to be used to check whether a given Identifier is contained in the readout element
Eigen::AngleAxisd AngleAxis3D
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Eigen::Matrix< double, 3, 3 > RotationMatrix3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Eigen::Affine3d Transform3D
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Eigen::Translation< double, 3 > Translation3D
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27
Ensure that the ATLAS eigen extensions are properly loaded.
bool stripPosition(int strip, Amg::Vector2D &pos) const
calculate local strip position for a given strip number
double distanceToReadout(const Amg::Vector2D &pos) const
distance to readout