ATLAS Offline Software
MMReadoutElement.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 MM detector = an assembly module = STGC in amdb
7  ----------------------------------------------------
8 ***************************************************************************/
9 
11 
13 #include <GaudiKernel/IMessageSvc.h>
14 #include <GeoModelKernel/GeoLogVol.h>
15 #include <GeoModelKernel/GeoShape.h>
16 #include <GeoModelKernel/GeoVFullPhysVol.h>
17 #include <GeoModelKernel/GeoVPhysVol.h>
18 #include <cstdlib>
19 
20 #include <cmath>
21 #include <memory>
22 #include <utility>
23 
24 #include "GaudiKernel/SystemOfUnits.h"
25 #include "GeoModelHelpers/getChildNodesWithTrf.h"
26 #include "GeoModelHelpers/StringUtils.h"
27 #include "GeoModelHelpers/GeoShapeUtils.h"
28 
29 #include "GeoModelKernel/GeoFullPhysVol.h"
30 #include "GeoModelKernel/GeoShapeSubtraction.h"
31 #include "GeoModelKernel/GeoTrd.h"
39 
40 #include "GaudiKernel/ISvcLocator.h"
46 
47 
48 #define THROW_EXCEPTION(MSG) \
49  { \
50  std::stringstream sstr{}; \
51  sstr<<"MMReadoutElement - "<<idHelperSvc()->toStringDetEl(identify())<<" "<<__LINE__<<": "; \
52  sstr<<MSG; \
53  throw std::runtime_error(sstr.str()); \
54  } \
55 
56 namespace {
57  template <class ObjType, size_t N> void assign(const std::vector<ObjType>& in,
58  std::array<ObjType, N>& out) {
59  for (size_t k =0 ; k < std::min(in.size(), N) ; ++k){
60  out[k] = in[k];
61  }
62  }
63 }
64 
65 using namespace GeoStrUtils;
66 namespace MuonGM {
67 
68  //============================================================================
69  MMReadoutElement::MMReadoutElement(GeoVFullPhysVol* pv, const std::string& stName, int zi, int fi, int mL, MuonDetectorManager* mgr, const NswPassivationDbData* passivData)
71  m_passivData(passivData),
72  m_ml(mL) {
73 
74  std::string fixName = (stName[2] == 'L') ? "MML" : "MMS";
75  setStationName(fixName);
76  setChamberLayer(mL);
77  Identifier id = mgr->mmIdHelper()->channelID(fixName, zi, fi, mL, 1, 1);
78  setIdentifier(id);
79 
80 
81  if (mgr->MinimalGeoFlag()) {
82  return;
83  }
84  bool foundShape = false;
85  const PVConstLink pvc {getMaterialGeom()};
86  const GeoTrd* trd=dynamic_cast<const GeoTrd *> (pvc->getLogVol()->getShape());
87  if (trd) {
88  m_sWidthChamber = 2*trd->getYHalfLength1(); // bottom base length (full chamber)
89  m_lWidthChamber = 2*trd->getYHalfLength2(); // top base length (full chamber)
90  m_lengthChamber = 2*trd->getZHalfLength(); // height of the trapezoid (full chamber)
91  } else {
92  ATH_MSG_DEBUG("Expected a GeoTrd but got "<<printGeoShape(pvc->getLogVol()->getShape()));
93  }
94 
95  std::vector<GeoChildNodeWithTrf> children{getChildrenWithRef(pvc, false)};
96  for (const GeoChildNodeWithTrf& child : children) {
97  ATH_MSG_VERBOSE("Child node "<<child.nodeName<<" "<<child.volume->getLogVol()->getName());
98  if (child.volume->getLogVol()->getName().find("Sensitive") == std::string::npos) {
99  continue;
100  }
101  ++m_nlayers;
102  if (m_nlayers > 4) {
103  THROW_EXCEPTION("number of MM layers > 4: increase transform array size" );
104  }
105  m_Xlg[m_nlayers - 1] = child.transform;
106  // save layer dimensions
107  if (foundShape) {
108  continue;
109  }
110  const GeoShape* childShape = child.volume->getLogVol()->getShape();
111  while (childShape->typeID() != GeoTrd::getClassTypeID()){
112  auto [opA, opB] = getOps(childShape);
113  ATH_MSG_VERBOSE("Operands are "<<printGeoShape(opA)<<", "<<printGeoShape(opB));
114  childShape = opA;
115  }
116  const GeoTrd* trd = dynamic_cast<const GeoTrd*>(childShape);
117  m_halfX = trd->getZHalfLength();
118  // adjust phi dimensions according to the active area
119  m_minHalfY = trd->getYHalfLength1();
120  m_maxHalfY = trd->getYHalfLength2();
121  foundShape = true;
122  }
123 
124  if (!foundShape) {
125  THROW_EXCEPTION(" failed to initialize dimensions of this chamber " );
126  }
127  }
128 
129 
130  //============================================================================
132 
133  //============================================================================
135 
136  ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap
137  IGeoDbTagSvc* geoDbTag{nullptr};
138  if (svcLocator->service("GeoDbTagSvc",geoDbTag).isFailure()) {
139  THROW_EXCEPTION("Could not locate GeoDbTagSvc");
140  }
141  IRDBAccessSvc *accessSvc{nullptr};
142  if (svcLocator->service(geoDbTag->getParamSvcName(),accessSvc).isFailure()) {
143  THROW_EXCEPTION("Could not locate " << geoDbTag->getParamSvcName() );
144  }
145  const char sector_l = getStationName()[2];
146  IRDBRecordset_ptr wmmRec = accessSvc->getRecordsetPtr("WMM","","");
147  for (unsigned int ind = 0; ind < wmmRec->size(); ind++) {
148  std::string WMM_TYPE = (*wmmRec)[ind]->getString("WMM_TYPE");
149  if (sector_l != WMM_TYPE[4]){
150  continue;
151  }
152  if (std::abs(getStationEta())!=(int) (WMM_TYPE[6]-'0')) {
153  continue;
154  }
155  if (m_ml != (int) (WMM_TYPE[12]-'0')){
156  continue;
157  }
158  const double Tck = (*wmmRec)[ind]->getDouble("Tck");
159  const double activeBottomLength = (*wmmRec)[ind]->getDouble("activeBottomLength");
160  const double activeH = (*wmmRec)[ind]->getDouble("activeH");
161  const double activeTopLength = (*wmmRec)[ind]->getDouble("activeTopLength");
162  const double gasTck = (*wmmRec)[ind]->getDouble("gasTck");
163  const int nMissedBottomEta = (*wmmRec)[ind]->getInt("nMissedBottomEta");
164  const int nMissedBottomStereo = (*wmmRec)[ind]->getInt("nMissedBottomStereo");
165  const int nMissedTopEta = (*wmmRec)[ind]->getInt("nMissedTopEta");
166  const int nMissedTopStereo = (*wmmRec)[ind]->getInt("nMissedTopStereo");
167 
168  assign(tokenizeInt((*wmmRec)[ind]->getString("readoutSide"), ";"), m_readoutSide);
169  const std::vector<double> stereoAngle{tokenizeDouble((*wmmRec)[ind]->getString("stereoAngle"), ";")};
170  const double stripPitch = (*wmmRec)[ind]->getDouble("stripPitch");
171  const int totalStrips = (*wmmRec)[ind]->getInt ("totalStrips");
172  const double ylFrame = (*wmmRec)[ind]->getDouble("ylFrame");
173  const double ysFrame = (*wmmRec)[ind]->getDouble("ysFrame");
174 
175  m_tckChamber = Tck; // thickness (full chamber)
176  m_halfX = activeH / 2; // 0.5*radial_size (active area)
177  m_minHalfY = activeBottomLength / 2; // 0.5*bottom length (active area)
178  m_maxHalfY = activeTopLength / 2; // 0.5*top length (active area)
179  m_offset = -0.5*(ylFrame - ysFrame); // radial dist. of active area center w.r.t. chamber center
180  for (int il = 0; il < m_nlayers; il++) {
181  // identifier of the first channel to retrieve max number of strips
182  Identifier id = m_idHelper.channelID(identify(), m_ml, il + 1, 1);
183  int chMax = m_idHelper.channelMax(id);
184  if (chMax < 0) {
185  THROW_EXCEPTION("MMReadoutElement -- Max number of strips not a valid value" );
186  }
187  MuonChannelDesign& design = m_etaDesign[il];
188 
191  design.inputPitch = stripPitch;
192  design.thickness = gasTck;
193  design.nMissedTopEta = nMissedTopEta; // #of eta strips that are not connected to any FE board
194  design.nMissedBottomEta = nMissedBottomEta;
195  design.nMissedTopStereo = nMissedTopStereo; // #of stereo strips that are not connected to any FE board
196  design.nMissedBottomStereo = nMissedBottomStereo;
197  design.totalStrips = totalStrips;
201  design.inputWidth = stripPitch * std::cos(design.stereoAngle());
202 
203  if (!design.hasStereoAngle()) { // eta layers
204  design.nch = design.totalStrips - design.nMissedBottomEta - design.nMissedTopEta;
205  design.setFirstPos(-0.5 * design.xSize() + stripPitch);
206  } else { // stereo layers
207  design.nch = design.totalStrips - design.nMissedBottomStereo - design.nMissedTopStereo;
208  design.setFirstPos( -0.5 * design.xSize() + (1 + design.nMissedBottomStereo - design.nMissedBottomEta) * stripPitch);
209  }
210  ATH_MSG_DEBUG("initDesign:" << getStationName() << " layer " << il
211  << ", strip pitch " << design.inputPitch << ", nstrips " << design.nch
212  << " stereo " << design.stereoAngle() / Gaudi::Units::degree );
213  }
214  }
215  }
216 
217 
219  if (m_ml < 1 || m_ml > 2) {
220  THROW_EXCEPTION("MMReadoutElement -- Unexpected Multilayer: m_ml= " << m_ml );
221  return;
222  }
223  // Get the detector configuration.
224  ISvcLocator* svcLocator = Gaudi::svcLocator(); // from Bootstrap
225  IGeoDbTagSvc* geoDbTag{nullptr};
226  if (svcLocator->service("GeoDbTagSvc",geoDbTag).isFailure()) {
227  THROW_EXCEPTION("Could not locate GeoDbTagSvc");
228  }
229  if (geoDbTag->getSqliteReader()) {
231  return;
232  }
233  char side = getStationEta() < 0 ? 'C' : 'A';
234  char sector_l = getStationName().substr(2, 1) == "L" ? 'L' : 'S';
235  // Initialize from database:
236 
237  MMDetectorHelper aHelper;
238  MMDetectorDescription* mm = aHelper.Get_MMDetector(sector_l, std::abs(getStationEta()), getStationPhi(), m_ml, side);
239  MMReadoutParameters roParam = mm->GetReadoutParameters();
240 
241  double ylFrame = mm->ylFrame();
242  double ysFrame = mm->ysFrame();
243  double pitch = roParam.stripPitch;
244  m_sWidthChamber = mm->sWidth(); // bottom base length (full chamber)
245  m_lWidthChamber = mm->lWidth(); // top base length (full chamber)
246  m_lengthChamber = mm->Length(); // height of the trapezoid (full chamber)
247  m_tckChamber = mm->Tck(); // thickness (full chamber)
248  m_halfX = roParam.activeH / 2; // 0.5*radial_size (active area)
249  m_minHalfY = roParam.activeBottomLength / 2; // 0.5*bottom length (active area)
250  m_maxHalfY = roParam.activeTopLength / 2; // 0.5*top length (active area)
251  m_offset = -0.5*(ylFrame - ysFrame); // radial dist. of active area center w.r.t. chamber center
252  assign(roParam.readoutSide, m_readoutSide);
253 
254  for (int il = 0; il < m_nlayers; il++) {
255  // identifier of the first channel to retrieve max number of strips
256  Identifier id = m_idHelper.channelID(identify(), m_ml, il + 1, 1);
257  int chMax = m_idHelper.channelMax(id);
258  if (chMax < 0) {
259  THROW_EXCEPTION("MMReadoutElement -- Max number of strips not a valid value" );
260  }
261  MuonChannelDesign& design = m_etaDesign[il];
262 
265  design.inputPitch = pitch;
266  design.thickness = roParam.gasThickness;
267  design.nMissedTopEta = roParam.nMissedTopEta; // #of eta strips that are not connected to any FE board
268  design.nMissedBottomEta = roParam.nMissedBottomEta;
269  design.nMissedTopStereo = roParam.nMissedTopStereo; // #of stereo strips that are not connected to any FE board
270  design.nMissedBottomStereo = roParam.nMissedBottomStereo;
271  design.totalStrips = roParam.tStrips;
273  design.defineTrapezoid(m_minHalfY, m_maxHalfY,m_halfX, - roParam.stereoAngle.at(il));
275  design.inputWidth = pitch * std::cos(design.stereoAngle());
276 
277  if (!design.hasStereoAngle()) { // eta layers
278  design.nch = design.totalStrips - design.nMissedBottomEta - design.nMissedTopEta;
279  design.setFirstPos(-0.5 * design.xSize() + pitch);
280  } else { // stereo layers
281  design.nch = design.totalStrips - design.nMissedBottomStereo - design.nMissedTopStereo;
282  design.setFirstPos( -0.5 * design.xSize() +
283  (1 + design.nMissedBottomStereo - design.nMissedBottomEta) * pitch);
284  }
285 
286  ATH_MSG_DEBUG("initDesign:" << getStationName() << " layer " << il << ", strip pitch " << design.inputPitch
287  << ", nstrips " << design.nch << " stereo " << design.stereoAngle() / Gaudi::Units::degree );
288  }
289  }
290 
291 
292  //============================================================================
294 
295  if (m_surfaceData) {
296  ATH_MSG_WARNING("calling fillCache on an already filled cache" );
297  return;
298  }
299  m_surfaceData = std::make_unique<SurfaceData>();
300 
301 
302  for (int layer = 0; layer < m_nlayers; ++layer) {
303  // identifier of the first channel
304  Identifier id = m_idHelper.channelID(identify(), m_ml, layer + 1, 1);
305  const double sAngle = m_etaDesign[layer].stereoAngle();
306  m_surfaceData->m_layerSurfaces.emplace_back(std::make_unique<Trk::PlaneSurface>(*this,id));
307  m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RotatedTrapezoidBounds>(m_halfX, m_minHalfY, m_maxHalfY, sAngle));
308 
309  m_surfaceData->m_layerTransforms.push_back(
310  absTransform() // transformation from chamber to ATLAS frame
311  * m_delta // rotations (a-lines) from the alignment group
312  * m_Xlg[layer] // x-shift of the gas-gap center w.r.t. quadruplet center
313  * Amg::getTranslateZ3D(m_offset) // z-shift to volume center
314  * Amg::getRotateY3D(-90. * CLHEP::deg) // x<->z because of GeoTrd definition
315  * Amg::getRotateZ3D(sAngle));
316 
317  // surface info (center, normal)
318  m_surfaceData->m_layerCenters.emplace_back(m_surfaceData->m_layerTransforms.back().translation());
319  m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() * (-Amg::Vector3D::UnitZ()));
320 
321  ATH_MSG_DEBUG("MMReadoutElement layer " << layer << " sAngle " << sAngle << " phi direction MM eta strip "
322  << (m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D::UnitY()).phi() );
323  }
324  }
325 
326 
327  //============================================================================
328  bool MMReadoutElement::containsId(const Identifier& id) const {
329  if (m_idHelper.stationEta(id) != getStationEta()) return false;
330  if (m_idHelper.stationPhi(id) != getStationPhi()) return false;
331 
332  if (m_idHelper.multilayerID(id) != m_ml) return false;
333 
334  int gasgap = m_idHelper.gasGap(id);
335  if (gasgap < 1 || gasgap > m_nlayers) return false;
336 
337  int strip = m_idHelper.channel(id);
338  return strip >= 1 && strip <= m_etaDesign[gasgap - 1].totalStrips;
339  }
340 
341 
342  //============================================================================
343  Amg::Vector3D MMReadoutElement::localToGlobalCoords(const Amg::Vector3D& locPos, const Identifier& id) const {
344  int gg = m_idHelper.gasGap(id);
345  //const MuonChannelDesign* design = getDesign(id);
346  Amg::Vector3D locPos_ML = (m_Xlg[gg - 1]) * Amg::getTranslateZ3D(m_offset) *
347  // (design->hasStereoAngle() ?
348  // Amg::AngleAxis3D(90. * CLHEP::deg, Amg::Vector3D::UnitY()) * Amg::AngleAxis3D(design->stereoAngle(), Amg::Vector3D::UnitZ()) *
349  // Amg::AngleAxis3D(-90. * CLHEP::deg, Amg::Vector3D::UnitY()) : AmgSymMatrix(3)::Identity())*
350  locPos;
351 
352  ATH_MSG_DEBUG("position coordinates in the gas-gap r.f.: " << Amg::toString(locPos) );
353  ATH_MSG_DEBUG("position coordinates in the multilayer r.f.: " << Amg::toString(locPos_ML) );
354  return absTransform() * m_delta * locPos_ML;
355  }
356 
357 
358  //============================================================================
360  // amdb frame (s, z, t) = chamber frame (y, z, x)
361  if (aline) {
362  m_delta = aline.delta();
363  // The origin of the rotation axes is at the center of the active area
364  // in the z (radial) direction. Account for this shift in the definition
365  // of m_delta so that it can be applied on chamber frame coordinates.
366  m_ALinePar = &aline;
368  refreshCache();
369  } else {
370  clearALinePar();
371  }
372  }
373  //============================================================================
375  if (has_ALines()) {
376  m_ALinePar = nullptr;
377  m_delta = Amg::Transform3D::Identity();
378  refreshCache();
379  }
380  }
381 
382  //============================================================================
384  ATH_MSG_VERBOSE("Setting B-line for " << idHelperSvc()->toStringDetEl(identify())<<" "<<bLine);
385  m_BLinePar = &bLine;
386  }
387  //============================================================================
389 
390  // note: amdb frame (s, z, t) = chamber frame (y, z, x)
391  if (!has_BLines()) return;
392 
393  double t0 = locPosML.x();
394  double s0 = locPosML.y();
395  double z0 = locPosML.z();
396  double width = m_sWidthChamber + (m_lWidthChamber - m_sWidthChamber)*(z0/m_lengthChamber + 0.5); // because z0 is in [-length/2, length/2]
397 
398  double s_rel = s0/(width/2.); // in [-1, 1]
399  double z_rel = z0/(m_lengthChamber/2.); // in [-1, 1]
400  double t_rel = t0/(m_tckChamber/2.); // in [-1, 1]
401 
402  // b-line parameters
403  using Parameter = BLinePar::Parameter;
404  double bp = m_BLinePar->getParameter(Parameter::bp);
406  double sp = m_BLinePar->getParameter(Parameter::sp);
407  double sn = m_BLinePar->getParameter(Parameter::sn);
408  double tw = m_BLinePar->getParameter(Parameter::tw);
409  double eg = m_BLinePar->getParameter(Parameter::eg)*1.e-3;
410  double ep = m_BLinePar->getParameter(Parameter::ep)*1.e-3;
411  double en = m_BLinePar->getParameter(Parameter::en)*1.e-3;
412 
413  double ds{0.}, dz{0.}, dt{0.};
414 
415  if (bp != 0 || bn != 0)
416  dt += 0.5*(s_rel*s_rel - 1)*((bp + bn) + (bp - bn)*z_rel);
417 
418  if (sp != 0 || sn != 0)
419  dt += 0.5*(z_rel*z_rel - 1)*((sp + sn) + (sp - sn)*s_rel);
420 
421  if (tw != 0) {
422  dt -= tw*s_rel*z_rel;
423  dz += tw*s_rel*t_rel*m_tckChamber/m_lengthChamber;
424  }
425 
426  if (eg != 0) {
427  dt += t0*eg;
428  ds += s0*eg;
429  dz += z0*eg;
430  }
431 
432  if (ep != 0 || en != 0) {
433  // the formulas below differ from those in Christoph's talk
434  // because are origin for NSW is at the center of the chamber,
435  // whereas in the talk (i.e. MDTs), it is at the bottom!
436  double delta = s_rel*s_rel * ((ep + en)*s_rel/6 + (ep - en)/4);
437  double phi = s_rel * ((ep + en)*s_rel + (ep - en)) / 2;
438  dt += phi*t0;
439  ds += delta*width/2;
440  dz += phi*z0;
441  }
442 
443  locPosML[0] += dt;
444  locPosML[1] += ds;
445  locPosML[2] += dz;
446  }
447 
448 
449  //============================================================================
450  bool MMReadoutElement::spacePointPosition(const Identifier& layerId, const Amg::Vector2D& lpos, Amg::Vector3D& pos) const {
451 
452  pos = Amg::Vector3D(lpos.x(), lpos.y(), 0.);
453 
454  const MuonChannelDesign* design = getDesign(layerId);
455  if (!design) {
456  ATH_MSG_WARNING("Unable to get MuonChannelDesign, therefore cannot provide position corrections. Returning." );
457  return false;
458  }
459 
460  bool conditionsApplied{false};
461  Amg::Transform3D trfToML{Amg::Transform3D::Identity()};
462 
463 #ifndef SIMULATIONBASE
464  //*********************
465  // As-Built (MuonNswAsBuilt is not included in AthSimulation)
466  //*********************
468  if (sc) {
469 
470  // express the local position w.r.t. the nearest active strip
471  Amg::Vector2D rel_pos;
472  int istrip = design->positionRelativeToStrip(lpos, rel_pos);
473  if (istrip < 0) {
474  ATH_MSG_WARNING("As-built corrections are provided only within the active area. Returning." );
475  return false;
476  }
477 
478  // setup strip calculator
481  strip_id.ilayer = m_idHelper.gasGap(layerId);
482  strip_id.istrip = istrip;
483 
484  // get the position coordinates, in the chamber frame, from NswAsBuilt.
485  // Applying a 2.75mm correction along the layer normal, since NswAsBuilt considers the layer
486  // on the readout strips, whereas Athena wants it at the middle of the drift gap.
487  NswAsBuilt::StripCalculator::position_t calcPos = sc->getPositionAlongStrip(NswAsBuilt::Element::ParameterClass::CORRECTION, strip_id, rel_pos.y(), rel_pos.x());
488 
490  pos = calcPos.pos;
491  pos[0] += strip_id.ilayer%2 ? -2.75 : 2.75;
492 
493  // signal that pos is now in the chamber reference frame
494  // (don't go back to the layer frame yet, since we may apply b-lines later on)
495  trfToML = m_delta.inverse()*absTransform().inverse()*transform(layerId);
496  conditionsApplied = true;
497  } else {
498  ATH_MSG_DEBUG( "No as-built corrections provided for "<<idHelperSvc()->toStringDetEl(identify())<<" layer: "<<strip_id.ilayer);
499  }
500  }
501 #endif
502 
503  //*********************
504  // B-Lines
505  //*********************
506  if (has_BLines()) {
507  // go to the multilayer reference frame if we are not already there
508  if (!conditionsApplied) {
509  trfToML = m_delta.inverse()*absTransform().inverse()*transform(layerId);
510  pos = trfToML*pos;
511 
512  // signal that pos is now in the multilayer reference frame
513  conditionsApplied = true;
514  }
516  }
517 
518  // back to the layer reference frame from where we started
519  if (conditionsApplied) pos = trfToML.inverse()*pos;
520 
521  return true;
522  }
523 
524 } // namespace MuonGM
MuonGM::MMReadoutElement::setDelta
void setDelta(const ALinePar &aline)
Definition: MMReadoutElement.cxx:359
MuonGM::MMReadoutElement::containsId
virtual bool containsId(const Identifier &id) const override final
function to be used to check whether a given Identifier is contained in the readout element
Definition: MMReadoutElement.cxx:328
PlotCalibFromCool.il
il
Definition: PlotCalibFromCool.py:381
python.changerun.bn
bn
Definition: changerun.py:79
MMReadoutParameters::activeH
double activeH
Definition: MMDetectorDescription.h:30
NswAsBuilt::StripCalculator::position_t
Definition: StripCalculator.h:58
MuonGM::MuonClusterReadoutElement::transform
virtual const Amg::Transform3D & transform() const override
Return local to global transform.
Definition: MuonClusterReadoutElement.h:124
MuonGM::MuonChannelDesign::inputPitch
double inputPitch
Definition: MuonChannelDesign.h:35
checkxAOD.ds
ds
Definition: Tools/PyUtils/bin/checkxAOD.py:257
MMReadoutParameters::nMissedTopEta
int nMissedTopEta
Definition: MMDetectorDescription.h:34
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
CxxUtils::tokenizeDouble
std::vector< double > tokenizeDouble(const std::string &the_str, std::string_view delimiter)
Definition: Control/CxxUtils/Root/StringUtils.cxx:34
MMReadoutParameters::tStrips
int tStrips
Definition: MMDetectorDescription.h:42
beamspotPlotBcids.k
k
Definition: beamspotPlotBcids.py:524
MuonGM::MuonChannelDesign::xSize
double xSize() const
Definition: MuonChannelDesign.h:478
MuonGM::MuonReadoutElement::absTransform
const Amg::Transform3D & absTransform() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:210
MMDetectorDescription.h
MuonGM::MMReadoutElement::m_readoutSide
std::array< int, 4 > m_readoutSide
Definition: MMReadoutElement.h:176
MMReadoutParameters::activeBottomLength
double activeBottomLength
Definition: MMDetectorDescription.h:28
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:64
MuonGM::MMReadoutElement::initDesign
void initDesign()
initialize the design classes for this readout element
Definition: MMReadoutElement.cxx:218
AthCheckMacros.h
ParticleTest.eg
eg
Definition: ParticleTest.py:29
MMReadoutParameters::readoutSide
std::vector< int > readoutSide
Definition: MMDetectorDescription.h:24
NswAsBuilt::stripIdentifier_t::quadruplet
quadrupletIdentifier_t quadruplet
Definition: MuonSpectrometer/MuonDetDescr/MuonNSWAsBuilt/MuonNSWAsBuilt/Identifier.h:82
NswAsBuilt::StripCalculator::IsValid::VALID
@ VALID
MuonGM::MuonChannelDesign::defineTrapezoid
void defineTrapezoid(double HalfShortY, double HalfLongY, double HalfHeight)
set the trapezoid dimensions
Definition: MuonChannelDesign.cxx:25
ALinePar
Definition: ALinePar.h:15
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
CxxUtils::tokenizeInt
std::vector< int > tokenizeInt(const std::string &the_str, std::string_view delimiter)
Definition: Control/CxxUtils/Root/StringUtils.cxx:55
ALinePar.h
MmIdHelper::channelMax
static int channelMax()
Definition: MmIdHelper.cxx:831
MuonGM::MuonChannelDesign::inputWidth
double inputWidth
Definition: MuonChannelDesign.h:36
MMReadoutParameters::activeTopLength
double activeTopLength
Definition: MMDetectorDescription.h:29
Amg::getTranslateZ3D
Amg::Transform3D getTranslateZ3D(const double Z)
: Returns a shift transformation along the z-axis
Definition: GeoPrimitivesHelpers.h:285
MuonGM::MuonReadoutElement::largeSector
bool largeSector() const
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:49
MuonGM::MMReadoutElement::getDesign
const MuonChannelDesign * getDesign(const Identifier &id) const
returns the MuonChannelDesign class for the given identifier
Definition: MMReadoutElement.h:193
MuonGM::MuonChannelDesign::nMissedBottomEta
int nMissedBottomEta
Definition: MuonChannelDesign.h:44
ALFA_EventTPCnv_Dict::t0
std::vector< ALFA_RawData_p1 > t0
Definition: ALFA_EventTPCnvDict.h:42
MuonGM::MMReadoutElement::initDesignSqLite
void initDesignSqLite()
Definition: MMReadoutElement.cxx:134
deg
#define deg
Definition: SbPolyhedron.cxx:17
MM
@ MM
Definition: RegSelEnums.h:38
MuonGM::MMReadoutElement::fillCache
virtual void fillCache() override final
function to fill tracking cache
Definition: MMReadoutElement.cxx:293
MuonGM::MMReadoutElement::m_Xlg
std::array< Amg::Transform3D, 4 > m_Xlg
Definition: MMReadoutElement.h:178
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
BLinePar::getParameter
float getParameter(const Parameter p) const
Returns a given parameter.
Definition: BLinePar.h:39
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
MuonGM::MuonDetectorManager::getMMAsBuiltCalculator
const NswAsBuilt::StripCalculator * getMMAsBuiltCalculator() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:207
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
THROW_EXCEPTION
#define THROW_EXCEPTION(MSG)
Definition: MMReadoutElement.cxx:48
MuonGM::MuonChannelDesign::hasStereoAngle
double hasStereoAngle() const
returns whether the stereo angle is non-zero
Definition: MuonChannelDesign.h:78
MuonGM::MMReadoutElement::has_BLines
bool has_BLines() const
Definition: MMReadoutElement.h:132
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
Amg::getRotateZ3D
Amg::Transform3D getRotateZ3D(double angle)
get a rotation transformation around Z-axis
Definition: GeoPrimitivesHelpers.h:270
TRT::Hit::side
@ side
Definition: HitInfo.h:83
MuonGM::MMReadoutElement::m_sWidthChamber
double m_sWidthChamber
Definition: MMReadoutElement.h:169
MuonGM::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:136
MuonGM::MMReadoutElement::m_tckChamber
double m_tckChamber
Definition: MMReadoutElement.h:172
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
MuonGM::MMReadoutElement::localToGlobalCoords
Amg::Vector3D localToGlobalCoords(const Amg::Vector3D &locPos, const Identifier &id) const
simHit local (SD) To Global position - to be used by MuonGeoAdaprors only
Definition: MMReadoutElement.cxx:343
MuonGM::MMReadoutElement::m_nlayers
int m_nlayers
Definition: MMReadoutElement.h:157
MuonGM::MuonReadoutElement::refreshCache
void refreshCache()
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:177
MmIdHelper::multilayerID
Identifier multilayerID(const Identifier &channeldID) const
Definition: MmIdHelper.cxx:276
MuonGM::MuonClusterReadoutElement::m_surfaceData
std::unique_ptr< SurfaceData > m_surfaceData
Definition: MuonClusterReadoutElement.h:120
MMReadoutElement.h
NswAsBuilt::StripCalculator::position_t::isvalid
IsValid isvalid
Definition: StripCalculator.h:59
CorrContainer.h
IRDBAccessSvc.h
Definition of the abstract IRDBAccessSvc interface.
Amg::toString
std::string toString(const Translation3D &translation, int precision=4)
GeoPrimitvesToStringConverter.
Definition: GeoPrimitivesToStringConverter.h:40
MMDetectorDescription
Definition: MMDetectorDescription.h:45
NswPassivationDbData
Definition: NswPassivationDbData.h:20
MuonGM::MuonReadoutElement::getStationName
const std::string & getStationName() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:190
MuonGM::MMReadoutElement::~MMReadoutElement
~MMReadoutElement()
destructor
MuonGM::MuonChannelDesign::DetType::MM
@ MM
MuonGM::MMReadoutElement::has_ALines
bool has_ALines() const
Definition: MMReadoutElement.h:131
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
MMReadoutParameters::gasThickness
double gasThickness
Definition: MMDetectorDescription.h:20
MuonGM::MuonReadoutElement::setIdentifier
void setIdentifier(const Identifier &id)
Sets the Identifier, hashes & station names.
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:156
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloNoise_fillDB.dt
dt
Definition: CaloNoise_fillDB.py:58
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
NswAsBuilt::stripIdentifier_t
Athena indices of a MM strip.
Definition: MuonSpectrometer/MuonDetDescr/MuonNSWAsBuilt/MuonNSWAsBuilt/Identifier.h:81
Amg::Transform3D
Eigen::Affine3d Transform3D
Definition: GeoPrimitives.h:46
NswAsBuilt::quadrupletIdentifier_t::MML
@ MML
Definition: MuonSpectrometer/MuonDetDescr/MuonNSWAsBuilt/MuonNSWAsBuilt/Identifier.h:28
MuonGM::MMReadoutElement::m_BLinePar
const BLinePar * m_BLinePar
Definition: MMReadoutElement.h:175
MMReadoutParameters::stripPitch
double stripPitch
Definition: MMDetectorDescription.h:19
MuonGM::MMReadoutElement::m_minHalfY
double m_minHalfY
Definition: MMReadoutElement.h:165
Trk::DetectorElemType
DetectorElemType
Definition: TrkDetElementBase.h:39
MuonGM::MMReadoutElement::setBLinePar
void setBLinePar(const BLinePar &bLine)
read B-line (chamber-deformation) parameters
Definition: MMReadoutElement.cxx:383
IGeoDbTagSvc
Definition: IGeoDbTagSvc.h:26
MuonGM::MuonReadoutElement::manager
const MuonDetectorManager * manager() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:204
TRT::Track::z0
@ z0
Definition: InnerDetector/InDetCalibEvent/TRT_CalibData/TRT_CalibData/TrackInfo.h:63
MMDetectorHelper::Get_MMDetector
MMDetectorDescription * Get_MMDetector(char type, int ieta, int iphi, int layer=1, char side='A')
Definition: MMDetectorHelper.cxx:41
NswAsBuilt::StripCalculator::position_t::pos
Amg::Vector3D pos
Definition: StripCalculator.h:60
ALinePar::delta
Amg::Transform3D delta() const
Definition: ALinePar.cxx:45
MuonGM::MMReadoutElement::m_delta
Amg::Transform3D m_delta
Definition: MMReadoutElement.h:173
MuonGM::MMReadoutElement::m_lengthChamber
double m_lengthChamber
Definition: MMReadoutElement.h:171
MuonGM::MMReadoutElement::clearALinePar
void clearALinePar()
Definition: MMReadoutElement.cxx:374
BLinePar
Definition: BLinePar.h:14
MuonGM::MMReadoutElement::setChamberLayer
void setChamberLayer(int ml)
set methods only to be used by MuonGeoModel
Definition: MMReadoutElement.h:118
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
min
#define min(a, b)
Definition: cfImp.cxx:40
MuonGM::MuonReadoutElement::setStationName
void setStationName(const std::string &)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:169
MuonIdHelper::stationPhi
int stationPhi(const Identifier &id) const
Definition: MuonIdHelper.cxx:814
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
MuonGM::MuonChannelDesign::nMissedTopStereo
int nMissedTopStereo
Definition: MuonChannelDesign.h:45
MuonGM::MMReadoutElement::m_etaDesign
std::array< MuonChannelDesign, 4 > m_etaDesign
Definition: MMReadoutElement.h:155
IdentifierHash.h
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
MuonGM::MMReadoutElement::m_idHelper
const MmIdHelper & m_idHelper
Definition: MMReadoutElement.h:150
MuonGM::MMReadoutElement::m_ml
int m_ml
Definition: MMReadoutElement.h:161
MuonGM::MuonChannelDesign::totalStrips
int totalStrips
Definition: MuonChannelDesign.h:47
MuonGM::MMReadoutElement::m_maxHalfY
double m_maxHalfY
Definition: MMReadoutElement.h:166
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:809
Amg::getRotateY3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Definition: GeoPrimitivesHelpers.h:261
test_pythinning.out
out
Definition: test_pythinning.py:94
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
MMReadoutParameters::nMissedTopStereo
int nMissedTopStereo
Definition: MMDetectorDescription.h:36
MMReadoutParameters::stereoAngle
std::vector< double > stereoAngle
Definition: MMDetectorDescription.h:23
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
MuonGM::MuonClusterReadoutElement
Definition: MuonClusterReadoutElement.h:21
MMReadoutParameters::nMissedBottomStereo
int nMissedBottomStereo
Definition: MMDetectorDescription.h:37
MuonGM::MMReadoutElement::posOnDefChamber
void posOnDefChamber(Amg::Vector3D &locPosML) const
transform a position (in chamber-frame coordinates) to the deformed-chamber geometry
Definition: MMReadoutElement.cxx:388
MuonGM::MuonChannelDesign::type
ChannelType type
Definition: MuonChannelDesign.h:32
BLinePar::Parameter
Parameter
Definition: BLinePar.h:21
MuonGM::MuonChannelDesign
Definition: MuonChannelDesign.h:24
NswAsBuilt::stripIdentifier_t::ilayer
int ilayer
Definition: MuonSpectrometer/MuonDetDescr/MuonNSWAsBuilt/MuonNSWAsBuilt/Identifier.h:83
IRDBRecord.h
Definition of the abstract IRDBRecord interface.
MmIdHelper::channel
int channel(const Identifier &id) const override
Definition: MmIdHelper.cxx:800
Base_Fragment.width
width
Definition: Sherpa_i/share/common/Base_Fragment.py:59
MmIdHelper::gasGap
int gasGap(const Identifier &id) const override
get the hashes
Definition: MmIdHelper.cxx:798
NswAsBuilt::quadrupletIdentifier_t::MMS
@ MMS
Definition: MuonSpectrometer/MuonDetDescr/MuonNSWAsBuilt/MuonNSWAsBuilt/Identifier.h:27
MuonGM::MMReadoutElement::spacePointPosition
virtual bool spacePointPosition(const Identifier &phiId, const Identifier &etaId, Amg::Vector2D &pos) const override final
space point position for a given pair of phi and eta identifiers The LocalPosition is expressed in th...
Definition: MMReadoutElement.h:312
MuonGM::MMReadoutElement::stereoAngle
double stereoAngle(const Identifier &id) const
Wrapper to MuonChannelDesign::stereoAngle()
Definition: MMReadoutElement.h:215
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
MuonGM::MuonChannelDesign::detType
DetType detType
Definition: MuonChannelDesign.h:33
PlaneSurface.h
NswAsBuilt::stripIdentifier_t::istrip
int istrip
Definition: MuonSpectrometer/MuonDetDescr/MuonNSWAsBuilt/MuonNSWAsBuilt/Identifier.h:84
MuonGM::MuonChannelDesign::stereoAngle
double stereoAngle() const
returns the stereo angle
Definition: MuonChannelDesign.h:73
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
MMReadoutParameters::nMissedBottomEta
int nMissedBottomEta
Definition: MMDetectorDescription.h:35
python.DecayParser.children
children
Definition: DecayParser.py:32
checkFileSG.fi
fi
Definition: checkFileSG.py:65
MuonGM::MuonChannelDesign::nMissedTopEta
int nMissedTopEta
Definition: MuonChannelDesign.h:43
MuonGM::MuonChannelDesign::nch
int nch
Definition: MuonChannelDesign.h:34
NswAsBuilt::StripCalculator
Definition: StripCalculator.h:30
MuonGM::MuonChannelDesign::setFirstPos
void setFirstPos(const double pos)
Set the position of the first strip along the x-axis.
Definition: MuonChannelDesign.cxx:60
NswAsBuilt::Element::ParameterClass::CORRECTION
@ CORRECTION
MMDetectorHelper
Definition: MMDetectorHelper.h:24
IRDBRecordset.h
Definition of the abstract IRDBRecordset interface.
MuonGM::MMReadoutElement::m_ALinePar
const ALinePar * m_ALinePar
Definition: MMReadoutElement.h:174
MuonGM::MMReadoutElement::m_halfX
double m_halfX
Definition: MMReadoutElement.h:164
RotatedTrapezoidBounds.h
MmIdHelper::channelID
Identifier channelID(int stationName, int stationEta, int stationPhi, int multilayer, int gasGap, int channel) const
Definition: MmIdHelper.cxx:736
MMDetectorHelper.h
MuonGM::MMReadoutElement::m_offset
double m_offset
Definition: MMReadoutElement.h:167
python.SystemOfUnits.degree
tuple degree
Definition: SystemOfUnits.py:106
MuonGM::MuonChannelDesign::thickness
double thickness
Definition: MuonChannelDesign.h:42
MuonGM::MuonReadoutElement::getStationPhi
int getStationPhi() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:194
IGeoDbTagSvc.h
MuonGM::MMReadoutElement::m_lWidthChamber
double m_lWidthChamber
Definition: MMReadoutElement.h:170
MMReadoutParameters
Definition: MMDetectorDescription.h:18
checkFileSG.ind
list ind
Definition: checkFileSG.py:118
MuonGM::MuonReadoutElement::getStationEta
int getStationEta() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:193
MuonGM::MuonChannelDesign::ChannelType::etaStrip
@ etaStrip
MuonGM::MuonChannelDesign::nMissedBottomStereo
int nMissedBottomStereo
Definition: MuonChannelDesign.h:46