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  setSsize(2*trd->getYHalfLength1());
89  setLongSsize( 2*trd->getYHalfLength2());
90  setRsize(2*trd->getZHalfLength());
91  setZsize(trd->getXHalfLength1());
92 
93  } else {
94  ATH_MSG_DEBUG("Expected a GeoTrd but got "<<printGeoShape(pvc->getLogVol()->getShape()));
95  }
96 
97  std::vector<GeoChildNodeWithTrf> children{getAllSubVolumes(pvc)};
98  for (const GeoChildNodeWithTrf& child : children) {
99  ATH_MSG_VERBOSE("Child node "<<child.nodeName<<" "<<child.volume->getLogVol()->getName());
100  if (child.volume->getLogVol()->getName().find("Sensitive") == std::string::npos &&
102  child.volume->getLogVol()->getName() != "actMicroMegaGas") {
103  continue;
104  }
105  ++m_nlayers;
106  if (m_nlayers > 4) {
107  THROW_EXCEPTION("number of MM layers > 4: increase transform array size" );
108  }
109  m_Xlg[m_nlayers - 1] = child.transform;
110  // save layer dimensions
111  if (foundShape) {
112  continue;
113  }
114  const GeoShape* childShape = child.volume->getLogVol()->getShape();
115  while (childShape->typeID() != GeoTrd::getClassTypeID()){
116  auto [opA, opB] = getOps(childShape);
117  ATH_MSG_VERBOSE("Operands are "<<printGeoShape(opA)<<", "<<printGeoShape(opB));
118  childShape = opA;
119  }
120  const GeoTrd* trd = dynamic_cast<const GeoTrd*>(childShape);
121  m_halfX = trd->getZHalfLength();
122  // adjust phi dimensions according to the active area
123  m_minHalfY = trd->getYHalfLength1();
124  m_maxHalfY = trd->getYHalfLength2();
125  foundShape = true;
126  }
127 
128  if (!foundShape) {
129  THROW_EXCEPTION(" failed to initialize dimensions of this chamber " );
130  }
131  }
132 
133 
134  //============================================================================
136 
137  //============================================================================
139 
140  SmartIF<IGeoDbTagSvc> geoDbTag{Gaudi::svcLocator()->service("GeoDbTagSvc")};
141  if (!geoDbTag) {
142  THROW_EXCEPTION("Could not locate GeoDbTagSvc");
143  }
144  SmartIF<IRDBAccessSvc> accessSvc{Gaudi::svcLocator()->service(geoDbTag->getParamSvcName())};
145  if (!accessSvc) {
146  THROW_EXCEPTION("Could not locate " << geoDbTag->getParamSvcName() );
147  }
148  const char sector_l = getStationName()[2];
149  IRDBRecordset_ptr wmmRec = accessSvc->getRecordsetPtr("WMM","","");
150  for (unsigned int ind = 0; ind < wmmRec->size(); ind++) {
151  std::string WMM_TYPE = (*wmmRec)[ind]->getString("WMM_TYPE");
152  if (sector_l != WMM_TYPE[4]){
153  continue;
154  }
155  if (std::abs(getStationEta())!=(int) (WMM_TYPE[6]-'0')) {
156  continue;
157  }
158  if (m_ml != (int) (WMM_TYPE[12]-'0')){
159  continue;
160  }
161  const double Tck = (*wmmRec)[ind]->getDouble("Tck");
162  const double activeBottomLength = (*wmmRec)[ind]->getDouble("activeBottomLength");
163  const double activeH = (*wmmRec)[ind]->getDouble("activeH");
164  const double activeTopLength = (*wmmRec)[ind]->getDouble("activeTopLength");
165  const double gasTck = (*wmmRec)[ind]->getDouble("gasTck");
166  const int nMissedBottomEta = (*wmmRec)[ind]->getInt("nMissedBottomEta");
167  const int nMissedBottomStereo = (*wmmRec)[ind]->getInt("nMissedBottomStereo");
168  const int nMissedTopEta = (*wmmRec)[ind]->getInt("nMissedTopEta");
169  const int nMissedTopStereo = (*wmmRec)[ind]->getInt("nMissedTopStereo");
170 
171  assign(tokenizeInt((*wmmRec)[ind]->getString("readoutSide"), ";"), m_readoutSide);
172  const std::vector<double> stereoAngle{tokenizeDouble((*wmmRec)[ind]->getString("stereoAngle"), ";")};
173  const double stripPitch = (*wmmRec)[ind]->getDouble("stripPitch");
174  const int totalStrips = (*wmmRec)[ind]->getInt ("totalStrips");
175  const double ylFrame = (*wmmRec)[ind]->getDouble("ylFrame");
176  const double ysFrame = (*wmmRec)[ind]->getDouble("ysFrame");
177 
178  setZsize(Tck); // thickness (full chamber)
179  m_halfX = activeH / 2; // 0.5*radial_size (active area)
180  m_minHalfY = activeBottomLength / 2; // 0.5*bottom length (active area)
181  m_maxHalfY = activeTopLength / 2; // 0.5*top length (active area)
182  m_offset = -0.5*(ylFrame - ysFrame); // radial dist. of active area center w.r.t. chamber center
183  for (int il = 0; il < m_nlayers; il++) {
184  // identifier of the first channel to retrieve max number of strips
185  Identifier id = m_idHelper.channelID(identify(), m_ml, il + 1, 1);
186  int chMax = m_idHelper.channelMax(id);
187  if (chMax < 0) {
188  THROW_EXCEPTION("MMReadoutElement -- Max number of strips not a valid value" );
189  }
190  MuonChannelDesign& design = m_etaDesign[il];
191 
194  design.inputPitch = stripPitch;
195  design.thickness = gasTck;
196  design.nMissedTopEta = nMissedTopEta; // #of eta strips that are not connected to any FE board
197  design.nMissedBottomEta = nMissedBottomEta;
198  design.nMissedTopStereo = nMissedTopStereo; // #of stereo strips that are not connected to any FE board
199  design.nMissedBottomStereo = nMissedBottomStereo;
200  design.totalStrips = totalStrips;
204  design.inputWidth = stripPitch * std::cos(design.stereoAngle());
205 
206  if (!design.hasStereoAngle()) { // eta layers
207  design.nch = design.totalStrips - design.nMissedBottomEta - design.nMissedTopEta;
208  design.setFirstPos(-0.5 * design.xSize() + stripPitch);
209  } else { // stereo layers
210  design.nch = design.totalStrips - design.nMissedBottomStereo - design.nMissedTopStereo;
211  design.setFirstPos( -0.5 * design.xSize() + (1 + design.nMissedBottomStereo - design.nMissedBottomEta) * stripPitch);
212  }
213  ATH_MSG_DEBUG("initDesign:" << getStationName() << " layer " << il
214  << ", strip pitch " << design.inputPitch << ", nstrips " << design.nch
215  << " stereo " << design.stereoAngle() / Gaudi::Units::degree );
216  }
217  }
218  }
219 
220 
222  if (m_ml < 1 || m_ml > 2) {
223  THROW_EXCEPTION("MMReadoutElement -- Unexpected Multilayer: m_ml= " << m_ml );
224  return;
225  }
226  // Get the detector configuration.
227  SmartIF<IGeoDbTagSvc> geoDbTag{Gaudi::svcLocator()->service("GeoDbTagSvc")};
228  if (!geoDbTag) {
229  THROW_EXCEPTION("Could not locate GeoDbTagSvc");
230  }
231  if (geoDbTag->getSqliteReader()) {
233  return;
234  }
235  char side = getStationEta() < 0 ? 'C' : 'A';
236  char sector_l = getStationName().substr(2, 1) == "L" ? 'L' : 'S';
237  // Initialize from database:
238 
239  MMDetectorHelper aHelper;
240  MMDetectorDescription* mm = aHelper.Get_MMDetector(sector_l, std::abs(getStationEta()), getStationPhi(), m_ml, side);
241  MMReadoutParameters roParam = mm->GetReadoutParameters();
242 
243  double ylFrame = mm->ylFrame();
244  double ysFrame = mm->ysFrame();
245  double pitch = roParam.stripPitch;
246 
247 
248 
249 
250  setSsize(mm->sWidth()); // bottom base length (full chamber)
251  setLongSsize(mm->lWidth()); // top base length (full chamber)
252  setRsize(mm->Length()); // height of the trapezoid (full chamber)
253  setZsize(mm->Tck()); // thickness (full chamber)
254  m_halfX = roParam.activeH / 2; // 0.5*radial_size (active area)
255  m_minHalfY = roParam.activeBottomLength / 2; // 0.5*bottom length (active area)
256  m_maxHalfY = roParam.activeTopLength / 2; // 0.5*top length (active area)
257  m_offset = -0.5*(ylFrame - ysFrame); // radial dist. of active area center w.r.t. chamber center
258  assign(roParam.readoutSide, m_readoutSide);
259 
260  for (int il = 0; il < m_nlayers; il++) {
261  // identifier of the first channel to retrieve max number of strips
262  Identifier id = m_idHelper.channelID(identify(), m_ml, il + 1, 1);
263  int chMax = m_idHelper.channelMax(id);
264  if (chMax < 0) {
265  THROW_EXCEPTION("MMReadoutElement -- Max number of strips not a valid value" );
266  }
267  MuonChannelDesign& design = m_etaDesign[il];
268 
271  design.inputPitch = pitch;
272  design.thickness = roParam.gasThickness;
273  design.nMissedTopEta = roParam.nMissedTopEta; // #of eta strips that are not connected to any FE board
274  design.nMissedBottomEta = roParam.nMissedBottomEta;
275  design.nMissedTopStereo = roParam.nMissedTopStereo; // #of stereo strips that are not connected to any FE board
276  design.nMissedBottomStereo = roParam.nMissedBottomStereo;
277  design.totalStrips = roParam.tStrips;
279  design.defineTrapezoid(m_minHalfY, m_maxHalfY,m_halfX, - roParam.stereoAngle.at(il));
281  design.inputWidth = pitch * std::cos(design.stereoAngle());
282 
283  if (!design.hasStereoAngle()) { // eta layers
284  design.nch = design.totalStrips - design.nMissedBottomEta - design.nMissedTopEta;
285  design.setFirstPos(-0.5 * design.xSize() + pitch);
286  } else { // stereo layers
287  design.nch = design.totalStrips - design.nMissedBottomStereo - design.nMissedTopStereo;
288  design.setFirstPos( -0.5 * design.xSize() +
289  (1 + design.nMissedBottomStereo - design.nMissedBottomEta) * pitch);
290  }
291 
292  ATH_MSG_DEBUG("initDesign:" << getStationName() << " layer " << il << ", strip pitch " << design.inputPitch
293  << ", nstrips " << design.nch << " stereo " << design.stereoAngle() / Gaudi::Units::degree );
294  }
295  }
296 
297 
298  //============================================================================
300 
301  if (m_surfaceData) {
302  ATH_MSG_WARNING("calling fillCache on an already filled cache" );
303  return;
304  }
305  m_surfaceData = std::make_unique<SurfaceData>();
306 
307 
308  for (int layer = 0; layer < m_nlayers; ++layer) {
309  // identifier of the first channel
311  const double sAngle = m_etaDesign[layer].stereoAngle();
312  m_surfaceData->m_layerSurfaces.emplace_back(std::make_unique<Trk::PlaneSurface>(*this,id));
313  m_surfaceData->m_surfBounds.emplace_back(std::make_unique<Trk::RotatedTrapezoidBounds>(m_halfX, m_minHalfY, m_maxHalfY, sAngle));
314 
315  m_surfaceData->m_layerTransforms.push_back(
316  absTransform() // transformation from chamber to ATLAS frame
317  * m_delta // rotations (a-lines) from the alignment group
318  * m_Xlg[layer] // x-shift of the gas-gap center w.r.t. quadruplet center
319  * Amg::getTranslateZ3D(m_offset) // z-shift to volume center
320  * Amg::getRotateY3D(-90. * CLHEP::deg) // x<->z because of GeoTrd definition
321  * Amg::getRotateZ3D(sAngle));
322 
323  // surface info (center, normal)
324  m_surfaceData->m_layerCenters.emplace_back(m_surfaceData->m_layerTransforms.back().translation());
325  m_surfaceData->m_layerNormals.emplace_back(m_surfaceData->m_layerTransforms.back().linear() * (-Amg::Vector3D::UnitZ()));
326 
327  ATH_MSG_DEBUG("MMReadoutElement layer " << layer << " sAngle " << sAngle << " phi direction MM eta strip "
328  << (m_surfaceData->m_layerTransforms.back().linear() * Amg::Vector3D::UnitY()).phi() );
329  }
330  }
331 
332 
333  //============================================================================
334  bool MMReadoutElement::containsId(const Identifier& id) const {
335  if (m_idHelper.stationEta(id) != getStationEta()) return false;
336  if (m_idHelper.stationPhi(id) != getStationPhi()) return false;
337 
338  if (m_idHelper.multilayerID(id) != m_ml) return false;
339 
340  int gasgap = m_idHelper.gasGap(id);
341  if (gasgap < 1 || gasgap > m_nlayers) return false;
342 
343  int strip = m_idHelper.channel(id);
344  return strip >= 1 && strip <= m_etaDesign[gasgap - 1].totalStrips;
345  }
346 
347 
348  //============================================================================
350  int gg = m_idHelper.gasGap(id);
351  //const MuonChannelDesign* design = getDesign(id);
352  Amg::Vector3D locPos_ML = (m_Xlg[gg - 1]) * Amg::getTranslateZ3D(m_offset) *
353  // (design->hasStereoAngle() ?
354  // Amg::AngleAxis3D(90. * CLHEP::deg, Amg::Vector3D::UnitY()) * Amg::AngleAxis3D(design->stereoAngle(), Amg::Vector3D::UnitZ()) *
355  // Amg::AngleAxis3D(-90. * CLHEP::deg, Amg::Vector3D::UnitY()) : AmgSymMatrix(3)::Identity())*
356  locPos;
357 
358  ATH_MSG_DEBUG("position coordinates in the gas-gap r.f.: " << Amg::toString(locPos) );
359  ATH_MSG_DEBUG("position coordinates in the multilayer r.f.: " << Amg::toString(locPos_ML) );
360  return absTransform() * m_delta * locPos_ML;
361  }
362 
363 
364  //============================================================================
366  // amdb frame (s, z, t) = chamber frame (y, z, x)
367  if (aline) {
368  m_delta = aline.delta();
369  // The origin of the rotation axes is at the center of the active area
370  // in the z (radial) direction. Account for this shift in the definition
371  // of m_delta so that it can be applied on chamber frame coordinates.
372  m_ALinePar = &aline;
374  refreshCache();
375  } else {
376  clearALinePar();
377  }
378  }
379  //============================================================================
381  if (has_ALines()) {
382  m_ALinePar = nullptr;
383  m_delta = Amg::Transform3D::Identity();
384  refreshCache();
385  }
386  }
387 
388  //============================================================================
390  ATH_MSG_VERBOSE("Setting B-line for " << idHelperSvc()->toStringDetEl(identify())<<" "<<bLine);
391  m_BLinePar = &bLine;
392  }
393  //============================================================================
395 
396  // note: amdb frame (s, z, t) = chamber frame (y, z, x)
397  if (!has_BLines()) return;
398 
399  double t0 = locPosML.x();
400  double s0 = locPosML.y();
401  double z0 = locPosML.z();
402  double width = getSsize() + (getLongSsize() - getSsize())*(z0/getRsize() + 0.5); // because z0 is in [-length/2, length/2]
403 
404  double s_rel = s0/(width/2.); // in [-1, 1]
405  double z_rel = z0/(getRsize()/2.); // in [-1, 1]
406  double t_rel = t0/(getZsize()/2.); // in [-1, 1]
407 
408  // b-line parameters
409  using Parameter = BLinePar::Parameter;
410  double bp = m_BLinePar->getParameter(Parameter::bp);
412  double sp = m_BLinePar->getParameter(Parameter::sp);
413  double sn = m_BLinePar->getParameter(Parameter::sn);
414  double tw = m_BLinePar->getParameter(Parameter::tw);
415  double eg = m_BLinePar->getParameter(Parameter::eg)*1.e-3;
416  double ep = m_BLinePar->getParameter(Parameter::ep)*1.e-3;
417  double en = m_BLinePar->getParameter(Parameter::en)*1.e-3;
418 
419  double ds{0.}, dz{0.}, dt{0.};
420 
421  if (bp != 0 || bn != 0)
422  dt += 0.5*(s_rel*s_rel - 1)*((bp + bn) + (bp - bn)*z_rel);
423 
424  if (sp != 0 || sn != 0)
425  dt += 0.5*(z_rel*z_rel - 1)*((sp + sn) + (sp - sn)*s_rel);
426 
427  if (tw != 0) {
428  dt -= tw*s_rel*z_rel;
429  dz += tw*s_rel*t_rel*getZsize()/getRsize();
430  }
431 
432  if (eg != 0) {
433  dt += t0*eg;
434  ds += s0*eg;
435  dz += z0*eg;
436  }
437 
438  if (ep != 0 || en != 0) {
439  // the formulas below differ from those in Christoph's talk
440  // because are origin for NSW is at the center of the chamber,
441  // whereas in the talk (i.e. MDTs), it is at the bottom!
442  double delta = s_rel*s_rel * ((ep + en)*s_rel/6 + (ep - en)/4);
443  double phi = s_rel * ((ep + en)*s_rel + (ep - en)) / 2;
444  dt += phi*t0;
445  ds += delta*width/2;
446  dz += phi*z0;
447  }
448 
449  locPosML[0] += dt;
450  locPosML[1] += ds;
451  locPosML[2] += dz;
452  }
453 
454 
455  //============================================================================
457 
458  pos = Amg::Vector3D(lpos.x(), lpos.y(), 0.);
459 
460  const MuonChannelDesign* design = getDesign(layerId);
461  if (!design) {
462  ATH_MSG_WARNING("Unable to get MuonChannelDesign, therefore cannot provide position corrections. Returning." );
463  return false;
464  }
465 
466  bool conditionsApplied{false};
467  Amg::Transform3D trfToML{Amg::Transform3D::Identity()};
468 
469 #ifndef SIMULATIONBASE
470  //*********************
471  // As-Built (MuonNswAsBuilt is not included in AthSimulation)
472  //*********************
474  if (sc) {
475 
476  // express the local position w.r.t. the nearest active strip
477  Amg::Vector2D rel_pos;
478  int istrip = design->positionRelativeToStrip(lpos, rel_pos);
479  if (istrip < 0) {
480  ATH_MSG_WARNING("As-built corrections are provided only within the active area. Returning." );
481  return false;
482  }
483 
484  // setup strip calculator
487  strip_id.ilayer = m_idHelper.gasGap(layerId);
488  strip_id.istrip = istrip;
489 
490  // get the position coordinates, in the chamber frame, from NswAsBuilt.
491  // Applying a 2.75mm correction along the layer normal, since NswAsBuilt considers the layer
492  // on the readout strips, whereas Athena wants it at the middle of the drift gap.
493  NswAsBuilt::StripCalculator::position_t calcPos = sc->getPositionAlongStrip(NswAsBuilt::Element::ParameterClass::CORRECTION, strip_id, rel_pos.y(), rel_pos.x());
494 
496  pos = calcPos.pos;
497  pos[0] += strip_id.ilayer%2 ? -2.75 : 2.75;
498 
499  // signal that pos is now in the chamber reference frame
500  // (don't go back to the layer frame yet, since we may apply b-lines later on)
501  trfToML = m_delta.inverse()*absTransform().inverse()*transform(layerId);
502  conditionsApplied = true;
503  } else {
504  ATH_MSG_DEBUG( "No as-built corrections provided for "<<idHelperSvc()->toStringDetEl(identify())<<" layer: "<<strip_id.ilayer);
505  }
506  }
507 #endif
508 
509  //*********************
510  // B-Lines
511  //*********************
512  if (has_BLines()) {
513  // go to the multilayer reference frame if we are not already there
514  if (!conditionsApplied) {
515  trfToML = m_delta.inverse()*absTransform().inverse()*transform(layerId);
516  pos = trfToML*pos;
517 
518  // signal that pos is now in the multilayer reference frame
519  conditionsApplied = true;
520  }
522  }
523 
524  // back to the layer reference frame from where we started
525  if (conditionsApplied) pos = trfToML.inverse()*pos;
526 
527  return true;
528  }
529 
530 } // namespace MuonGM
MuonGM::MMReadoutElement::setDelta
void setDelta(const ALinePar &aline)
Definition: MMReadoutElement.cxx:365
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:334
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:258
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
MuonGM::MuonReadoutElement::setZsize
void setZsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:176
MMReadoutParameters::tStrips
int tStrips
Definition: MMDetectorDescription.h:42
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:174
MMReadoutParameters::activeBottomLength
double activeBottomLength
Definition: MMDetectorDescription.h:28
MuonGM::MMReadoutElement::initDesign
void initDesign()
initialize the design classes for this readout element
Definition: MMReadoutElement.cxx:221
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:191
MuonGM::MuonChannelDesign::nMissedBottomEta
int nMissedBottomEta
Definition: MuonChannelDesign.h:44
MuonGM::MMReadoutElement::initDesignSqLite
void initDesignSqLite()
Definition: MMReadoutElement.cxx:138
MuonGM::MuonReadoutElement::getZsize
double getZsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:198
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
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:299
MuonGM::MMReadoutElement::m_Xlg
std::array< Amg::Transform3D, 4 > m_Xlg
Definition: MMReadoutElement.h:176
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
BLinePar::getParameter
float getParameter(const Parameter p) const
Returns a given parameter.
Definition: BLinePar.h:40
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
MuonGM::MuonDetectorManager::getMMAsBuiltCalculator
const NswAsBuilt::StripCalculator * getMMAsBuiltCalculator() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:151
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
THROW_EXCEPTION
#define THROW_EXCEPTION(MSG)
Definition: MMReadoutElement.cxx:48
MuonGM::MuonReadoutElement::getLongSsize
double getLongSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:199
MuonGM::MuonReadoutElement::setSsize
void setSsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:174
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:134
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::MuonReadoutElement::idHelperSvc
const Muon::IMuonIdHelperSvc * idHelperSvc() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:136
MuonGM::MuonReadoutElement::getSsize
double getSsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:196
BchCleanup.mgr
mgr
Definition: BchCleanup.py:294
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:349
MuonGM::MuonReadoutElement::setRsize
void setRsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:175
MuonGM::MMReadoutElement::m_nlayers
int m_nlayers
Definition: MMReadoutElement.h:159
MuonGM::MuonReadoutElement::refreshCache
void refreshCache()
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:177
MmIdHelper::multilayerID
Identifier multilayerID(const Identifier &channeldID) const
Definition: MmIdHelper.cxx:277
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:133
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:173
MMReadoutParameters::stripPitch
double stripPitch
Definition: MMDetectorDescription.h:19
MuonGM::MMReadoutElement::m_minHalfY
double m_minHalfY
Definition: MMReadoutElement.h:167
Trk::DetectorElemType
DetectorElemType
Definition: TrkDetElementBase.h:39
MuonGM::MMReadoutElement::setBLinePar
void setBLinePar(const BLinePar &bLine)
read B-line (chamber-deformation) parameters
Definition: MMReadoutElement.cxx:389
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:171
MuonGM::MuonReadoutElement::setLongSsize
void setLongSsize(double)
Definition: MuonDetDescr/MuonReadoutGeometry/src/MuonReadoutElement.cxx:171
MuonGM::MMReadoutElement::clearALinePar
void clearALinePar()
Definition: MMReadoutElement.cxx:380
BLinePar
Definition: BLinePar.h:14
MuonGM::MMReadoutElement::setChamberLayer
void setChamberLayer(int ml)
set methods only to be used by MuonGeoModel
Definition: MMReadoutElement.h:120
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:810
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:157
IdentifierHash.h
PlotCalibFromCool.en
en
Definition: PlotCalibFromCool.py:399
MuonGM::MMReadoutElement::m_idHelper
const MmIdHelper & m_idHelper
Definition: MMReadoutElement.h:152
MuonGM::MMReadoutElement::m_ml
int m_ml
Definition: MMReadoutElement.h:163
MuonGM::MuonChannelDesign::totalStrips
int totalStrips
Definition: MuonChannelDesign.h:47
MuonGM::MMReadoutElement::m_maxHalfY
double m_maxHalfY
Definition: MMReadoutElement.h:168
MuonIdHelper::stationEta
int stationEta(const Identifier &id) const
Definition: MuonIdHelper.cxx:805
Amg::getRotateY3D
Amg::Transform3D getRotateY3D(double angle)
get a rotation transformation around Y-axis
Definition: GeoPrimitivesHelpers.h:261
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:394
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
MuonGM::MuonReadoutElement::getRsize
double getRsize() const
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonReadoutElement.h:197
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:310
MuonGM::MMReadoutElement::stereoAngle
double stereoAngle(const Identifier &id) const
Wrapper to MuonChannelDesign::stereoAngle()
Definition: MMReadoutElement.h:213
MuonGM::MuonDetectorManager
The MuonDetectorManager stores the transient representation of the Muon Spectrometer geometry and pro...
Definition: MuonDetDescr/MuonReadoutGeometry/MuonReadoutGeometry/MuonDetectorManager.h:50
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:172
MuonGM::MMReadoutElement::m_halfX
double m_halfX
Definition: MMReadoutElement.h:166
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:169
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
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
fitman.k
k
Definition: fitman.py:528
MuonGM::MuonChannelDesign::nMissedBottomStereo
int nMissedBottomStereo
Definition: MuonChannelDesign.h:46
Identifier
Definition: IdentifierFieldParser.cxx:14