CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GEMGeometryBuilder.cc
Go to the documentation of this file.
1 /*
2 //\class GEMGeometryBuilder
3 
4  Description: GEM Geometry builder from DD and DD4hep
5  DD4hep part added to the original old file (DD version) made by M. Maggi (INFN Bari)
6  Sergio Lo Meo (sergio.lo.meo@cern.ch) following what Ianna Osburne made for DTs (DD4hep migration)
7  Updated by Sunanda Banerjee (Fermilab) to make it working for dd4hep
8  Updated: 7 August 2020
9 */
13 
19 
24 
27 
29 
31 
32 #include <algorithm>
33 #include <iostream>
34 #include <string>
35 
36 using namespace geant_units::operators;
37 
38 //#define EDM_ML_DEBUG
39 
41 
43 
44 // DDD
46  const DDCompactView* cview,
47  const MuonGeometryConstants& muonConstants) {
48  std::string attribute = "MuStructure";
49  std::string value = "MuonEndCapGEM";
50 
51  // Asking only for the MuonGEM's
52  DDSpecificsMatchesValueFilter filter{DDValue(attribute, value, 0.0)};
53  DDFilteredView fv(*cview, filter);
54 
55 #ifdef EDM_ML_DEBUG
56  edm::LogVerbatim("Geometry") << "Building the geometry service";
57  edm::LogVerbatim("Geometry") << "About to run through the GEM structure\n"
58  << " First logical part " << fv.logicalPart().name().name();
59 #endif
60  bool doSuper = fv.firstChild();
61 
62  MuonGeometryNumbering mdddnum(muonConstants);
63  GEMNumberingScheme gemNum(muonConstants);
64 
65 #ifdef EDM_ML_DEBUG
66  edm::LogVerbatim("Geometry") << "doSuperChamber = " << doSuper << " with " << fv.geoHistory() << " Levels "
67  << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
68  ;
69 #endif
70  // loop over superchambers
71  std::vector<GEMSuperChamber*> superChambers;
72  while (doSuper) {
73  // getting chamber id from eta partitions
74  fv.firstChild();
75  fv.firstChild();
76 
77 #ifdef EDM_ML_DEBUG
78  edm::LogVerbatim("Geometry") << "MuonGeometry 1 " << fv.geoHistory() << " Levels "
79  << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
80 #endif
81  int rawidCh = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
82  GEMDetId detIdCh = GEMDetId(rawidCh);
83 
84  // back to chambers
85 
86  fv.parent();
87  fv.parent();
88 #ifdef EDM_ML_DEBUG
89  edm::LogVerbatim("Geometry") << "MuonGeometry 2 " << fv.geoHistory() << " Levels "
90  << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
92 #endif
93  // currently there is no superchamber in the geometry
94  // only 2 chambers are present separated by a gap.
95  // making superchamber out of the first chamber layer including the gap between chambers
96  if (detIdCh.layer() == 1) { // only make superChambers when doing layer 1
97  GEMSuperChamber* gemSuperChamber = buildSuperChamber(fv, detIdCh);
98  superChambers.push_back(gemSuperChamber);
99  }
100  GEMChamber* gemChamber = ((detIdCh.station() == GEMDetId::minStationId0) ? nullptr : buildChamber(fv, detIdCh));
101 
102  // loop over chambers
103  // only 1 chamber
104  bool doChambers = fv.firstChild();
105  bool loopExecuted = false;
106 
107  while (doChambers) {
108  loopExecuted = true;
109 
110  if (detIdCh.station() == GEMDetId::minStationId0) {
111  fv.firstChild();
112  int rawId = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
113  GEMDetId detId = GEMDetId(rawId);
114  fv.parent();
115 #ifdef EDM_ML_DEBUG
116  edm::LogVerbatim("Geometry") << "MuonGeometry 3 " << fv.geoHistory() << " Levels "
117  << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
119 #endif
120  gemChamber = buildChamber(fv, detId);
121  }
122 
123  // loop over GEMEtaPartitions
124  bool doEtaPart = fv.firstChild();
125 
126  while (doEtaPart) {
127 #ifdef EDM_ML_DEBUG
128  edm::LogVerbatim("Geometry") << "MuonGeometry 4 " << fv.geoHistory() << " Levels "
129  << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
130 #endif
131  int rawid = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
132  GEMDetId detId = GEMDetId(rawid);
133  GEMEtaPartition* etaPart = buildEtaPartition(fv, detId);
134  gemChamber->add(etaPart);
135  theGeometry.add(etaPart);
136  doEtaPart = fv.nextSibling();
137  }
138 
139  fv.parent();
140 
141  theGeometry.add(gemChamber);
142 
143  doChambers = fv.nextSibling();
144  }
145  fv.parent();
146 
147  doSuper = fv.nextSibling();
148 
149  if (!loopExecuted) {
150  delete gemChamber;
151  }
152  }
153 
154  buildRegions(theGeometry, superChambers);
155 }
156 
158 #ifdef EDM_ML_DEBUG
159  edm::LogVerbatim("Geometry") << "buildSuperChamber " << fv.logicalPart().name().name() << " " << detId;
160 #endif
162  bool ge0Station = detId.station() == GEMDetId::minStationId0;
163  std::vector<double> dpar = ge0Station ? solid.parameters() : solid.solidA().parameters();
164 
165  double dy = convertMmToCm(dpar[0]); //length is along local Y
166  double dz = convertMmToCm(dpar[3]); // thickness is long local Z
167  double dx1 = convertMmToCm(dpar[4]); // bottom width is along local X
168  double dx2 = convertMmToCm(dpar[8]); // top width is along local X
169 
170  if (!ge0Station) {
171  const int nch = 2;
172  const double chgap = 2.105;
173 
174  dpar = solid.solidB().parameters();
175 
176  dz += convertMmToCm(dpar[3]); // chamber thickness
177  dz *= nch; // 2 chambers in superchamber
178  dz += chgap; // gap between chambers
179  }
180 
181  bool isOdd = detId.chamber() % 2;
182  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dx1, dx2, dy, dz), isOdd));
183 
184 #ifdef EDM_ML_DEBUG
185  edm::LogVerbatim("Geometry") << "size " << dx1 << " " << dx2 << " " << dy << " " << dz;
186 #endif
187  GEMSuperChamber* superChamber = new GEMSuperChamber(detId.superChamberId(), surf);
188  return superChamber;
189 }
190 
192 #ifdef EDM_ML_DEBUG
193  edm::LogVerbatim("Geometry") << "buildChamber " << fv.logicalPart().name().name() << " " << detId;
194 #endif
196  bool ge0Station = detId.station() == GEMDetId::minStationId0;
197  std::vector<double> dpar = ge0Station ? solid.parameters() : solid.solidA().parameters();
198 
199  double dy = convertMmToCm(dpar[0]); //length is along local Y
200  double dz = convertMmToCm(dpar[3]); // thickness is long local Z
201  double dx1 = convertMmToCm(dpar[4]); // bottom width is along local X
202  double dx2 = convertMmToCm(dpar[8]); // top width is along local X
203 
204  if (!ge0Station) {
205  dpar = solid.solidB().parameters();
206  dz += convertMmToCm(dpar[3]); // chamber thickness
207  }
208 
209  bool isOdd = ge0Station ? false : detId.chamber() % 2;
210 
211  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dx1, dx2, dy, dz), isOdd));
212 
213 #ifdef EDM_ML_DEBUG
214  edm::LogVerbatim("Geometry") << "size " << dx1 << " " << dx2 << " " << dy << " " << dz;
215 #endif
216  GEMChamber* chamber = new GEMChamber(detId.chamberId(), surf);
217  return chamber;
218 }
219 
221 #ifdef EDM_ML_DEBUG
222  edm::LogVerbatim("Geometry") << "buildEtaPartition " << fv.logicalPart().name().name() << " " << detId;
223 #endif
224  // EtaPartition specific parameter (nstrips and npads)
225  DDValue numbOfStrips("nStrips");
226  DDValue numbOfPads("nPads");
227  DDValue delPhi("dPhi");
228  std::vector<const DDsvalues_type*> specs(fv.specifics());
229  std::vector<const DDsvalues_type*>::iterator is = specs.begin();
230  double nStrips = 0., nPads = 0., dPhi = 0.;
231  for (; is != specs.end(); is++) {
232  if (DDfetch(*is, numbOfStrips))
233  nStrips = numbOfStrips.doubles()[0];
234  if (DDfetch(*is, numbOfPads))
235  nPads = numbOfPads.doubles()[0];
236  if (DDfetch(*is, delPhi))
237  dPhi = delPhi.doubles()[0];
238  }
239 #ifdef EDM_ML_DEBUG
240  edm::LogVerbatim("Geometry") << ((nStrips == 0.) ? ("No nStrips found!!")
241  : ("Number of strips: " + std::to_string(nStrips)));
242  edm::LogVerbatim("Geometry") << ((nPads == 0.) ? ("No nPads found!!") : ("Number of pads: " + std::to_string(nPads)));
243 #endif
244  // EtaPartition specific parameter (size)
245  std::vector<double> dpar = fv.logicalPart().solid().parameters();
246 
247  double be = convertMmToCm(dpar[4]); // half bottom edge
248  double te = convertMmToCm(dpar[8]); // half top edge
249  double ap = convertMmToCm(dpar[0]); // half apothem
250  double ti = 0.4; // half thickness
251 
252  std::vector<float> pars;
253  pars.emplace_back(be);
254  pars.emplace_back(te);
255  pars.emplace_back(ap);
256  pars.emplace_back(nStrips);
257  pars.emplace_back(nPads);
258  pars.emplace_back(dPhi);
259 
260  bool isOdd = detId.chamber() % 2;
261  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(be, te, ap, ti), isOdd));
262  std::string name = fv.logicalPart().name().name();
264 
265 #ifdef EDM_ML_DEBUG
266  edm::LogVerbatim("Geometry") << "size " << be << " " << te << " " << ap << " " << ti;
267 #endif
268  GEMEtaPartition* etaPartition = new GEMEtaPartition(detId, surf, e_p_specs);
269  return etaPartition;
270 }
271 
273  Bounds* bounds,
274  bool isOddChamber) const {
275  // extract the position
276  const DDTranslation& trans(fv.translation());
277  const Surface::PositionType posResult(convertMmToCm(trans.x()), convertMmToCm(trans.y()), convertMmToCm(trans.z()));
278 
279  // now the rotation
280  const DDRotationMatrix& rotation = fv.rotation();
281  DD3Vector x, y, z;
282  rotation.GetComponents(x, y, z);
283 
284  Surface::RotationType rotResult(float(x.X()),
285  float(x.Y()),
286  float(x.Z()),
287  float(y.X()),
288  float(y.Y()),
289  float(y.Z()),
290  float(z.X()),
291  float(z.Y()),
292  float(z.Z()));
293 
294  //Change of axes for the forward
295  Basic3DVector<float> newX(1., 0., 0.);
296  Basic3DVector<float> newY(0., 0., -1.);
297  Basic3DVector<float> newZ(0., 1., 0.);
298 
299  rotResult.rotateAxes(newX, newY, newZ);
300 
301  return RCPBoundPlane(new BoundPlane(posResult, rotResult, bounds));
302 }
303 
304 // DD4hep
305 
307  const cms::DDCompactView* cview,
308  const MuonGeometryConstants& muonConstants) {
309  std::string attribute = "MuStructure";
310  std::string value = "MuonEndCapGEM";
311  const cms::DDFilter filter(attribute, value);
312  cms::DDFilteredView fv(*cview, filter);
313 
314  MuonGeometryNumbering mdddnum(muonConstants);
315  GEMNumberingScheme gemNum(muonConstants);
316  static constexpr uint32_t levelChamb = 7;
317  int chamb(0), region(0);
318  int theLevelPart = muonConstants.getValue("level");
319  int theRingLevel = muonConstants.getValue("mg_ring") / theLevelPart;
320  int theSectorLevel = muonConstants.getValue("mg_sector") / theLevelPart;
321  std::vector<GEMSuperChamber*> superChambers;
322  std::vector<GEMChamber*> chambers;
323 
324  while (fv.firstChild()) {
325  const auto& history = fv.history();
327  GEMDetId detId(gemNum.baseNumberToUnitNumber(num));
328 #ifdef EDM_ML_DEBUG
329  edm::LogVerbatim("Geometry") << fv.name() << " with " << history.tags.size() << " Levels and ID " << detId
330  << " Mask " << std::hex << GEMDetId::chamberIdMask << std::dec << " and "
331  << GEMDetId(((detId.rawId()) & GEMDetId::chamberIdMask)) << " Levels " << theRingLevel
332  << ":" << theSectorLevel << ":" << history.tags.size() << ":" << fv.level();
333  for (unsigned int k = 0; k < history.tags.size(); ++k)
334  edm::LogVerbatim("Geometry") << "[" << k << "] Tag " << history.tags[k] << " Offset " << history.offsets[k]
335  << " copy " << history.copyNos[k];
336 #endif
337 
338  if (detId.station() == GEMDetId::minStationId0) {
339  if (num.getLevels() == theRingLevel) {
340  if (detId.region() != region) {
341  region = detId.region();
342  chamb = 0;
343  }
344  ++chamb;
345  detId = GEMDetId(detId.region(), detId.ring(), detId.station(), detId.layer(), chamb, 0);
346  GEMSuperChamber* gemSuperChamber = buildSuperChamber(fv, detId);
347  superChambers.emplace_back(gemSuperChamber);
348  } else if (num.getLevels() == theSectorLevel) {
349  GEMChamber* gemChamber = buildChamber(fv, detId);
350  chambers.emplace_back(gemChamber);
351  } else {
352  GEMEtaPartition* etaPart = buildEtaPartition(fv, detId);
353  theGeometry.add(etaPart);
354  }
355  } else {
356  if (fv.level() == levelChamb) {
357  if (detId.layer() == 1) {
358  GEMSuperChamber* gemSuperChamber = buildSuperChamber(fv, detId);
359  superChambers.emplace_back(gemSuperChamber);
360  }
361  GEMChamber* gemChamber = buildChamber(fv, detId);
362  chambers.emplace_back(gemChamber);
363  } else if (num.getLevels() > theSectorLevel) {
364  GEMEtaPartition* etaPart = buildEtaPartition(fv, detId);
365  theGeometry.add(etaPart);
366  }
367  }
368  }
369 
370  auto& partitions = theGeometry.etaPartitions();
371  for (auto& gemChamber : chambers) {
372  uint32_t id0 = ((gemChamber->id().rawId()) & GEMDetId::chamberIdMask);
373  for (auto& etaPart : partitions) {
374  if (((etaPart->id().rawId()) & GEMDetId::chamberIdMask) == id0) {
375  gemChamber->add(etaPart);
376  }
377  }
378  theGeometry.add(gemChamber);
379  }
380 
381  buildRegions(theGeometry, superChambers);
382 }
383 
385  cms::DDSolid solid(fv.solid());
386  auto solidA = solid.solidA();
387  std::vector<double> dpar = solidA.dimensions();
388 
389  double dy = k_ScaleFromDD4hep * dpar[3]; //length is along local Y
390  double dz = k_ScaleFromDD4hep * dpar[2]; // thickness is long local Z
391  double dx1 = k_ScaleFromDD4hep * dpar[0]; // bottom width is along local X
392  double dx2 = k_ScaleFromDD4hep * dpar[1]; // top width is along loc
393 
394  auto solidB = solid.solidB();
395  dpar = solidB.dimensions();
396  const int nch = 2;
397  const double chgap = 2.105;
398 
399  dz += (k_ScaleFromDD4hep * dpar[2]); // chamber thickness
400  dz *= nch; // 2 chambers in superchamber
401  dz += chgap; // gap between chambers
402 
403  bool isOdd = detId.chamber() % 2;
404  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dx1, dx2, dy, dz), isOdd));
405 
406  GEMSuperChamber* superChamber = new GEMSuperChamber(detId.superChamberId(), surf);
407  return superChamber;
408 }
409 
411  cms::DDSolid solid(fv.solid());
412  auto solidA = solid.solidA();
413  std::vector<double> dpar = solidA.dimensions();
414 
415  double dy = k_ScaleFromDD4hep * dpar[3]; //length is along local Y
416  double dz = k_ScaleFromDD4hep * dpar[2]; // thickness is long local Z
417  double dx1 = k_ScaleFromDD4hep * dpar[0]; // bottom width is along local X
418  double dx2 = k_ScaleFromDD4hep * dpar[1]; // top width is along local X
419 
420  auto solidB = solid.solidB();
421  dpar = solidB.dimensions();
422 
423  dz += (k_ScaleFromDD4hep * dpar[2]); // chamber thickness
424 
425  bool isOdd = detId.chamber() % 2;
426  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dx1, dx2, dy, dz), isOdd));
427 
428  GEMChamber* chamber = new GEMChamber(detId.chamberId(), surf);
429  return chamber;
430 }
431 
433  // EtaPartition specific parameter (nstrips and npads)
434 
435  auto nStrips = fv.get<double>("nStrips");
436  auto nPads = fv.get<double>("nPads");
437  auto dPhi = fv.get<double>("dPhi");
438  // EtaPartition specific parameter (size)
439 
440  std::vector<double> dpar = fv.parameters();
441 
442  double ti = 0.4; // half thickness
443 
444  const std::vector<float> pars{float(k_ScaleFromDD4hep * dpar[0]),
445  float(k_ScaleFromDD4hep * dpar[1]),
446  float(k_ScaleFromDD4hep * dpar[3]),
447  float(nStrips),
448  float(nPads),
449  float(dPhi)};
450 
451  bool isOdd = detId.chamber() % 2;
452  RCPBoundPlane surf(
453  boundPlane(fv,
455  k_ScaleFromDD4hep * dpar[0], k_ScaleFromDD4hep * dpar[1], k_ScaleFromDD4hep * dpar[3], ti),
456  isOdd));
457 
458  std::string_view name = fv.name();
459 
461 
462  GEMEtaPartition* etaPartition = new GEMEtaPartition(detId, surf, e_p_specs);
463  return etaPartition;
464 }
465 
467  Bounds* bounds,
468  bool isOddChamber) const {
469  // extract the position
470  const Double_t* tran = fv.trans();
471  Surface::PositionType posResult(
472  k_ScaleFromDD4hep * tran[0], k_ScaleFromDD4hep * tran[1], k_ScaleFromDD4hep * tran[2]);
473 
474  // now the rotation
475  DDRotationMatrix rota;
476  fv.rot(rota);
477  DD3Vector x, y, z;
478  rota.GetComponents(x, y, z);
479  Surface::RotationType rotResult(float(x.X()),
480  float(x.Y()),
481  float(x.Z()),
482  float(y.X()),
483  float(y.Y()),
484  float(y.Z()),
485  float(z.X()),
486  float(z.Y()),
487  float(z.Z()));
488 
489  //Change of axes for the forward
490  Basic3DVector<float> newX(1., 0., 0.);
491  Basic3DVector<float> newY(0., 0., -1.);
492  Basic3DVector<float> newZ(0., 1., 0.);
493 
494  rotResult.rotateAxes(newX, newY, newZ);
495 
496  return RCPBoundPlane(new BoundPlane(posResult, rotResult, bounds));
497 }
498 
499 void GEMGeometryBuilder::buildRegions(GEMGeometry& theGeometry, const std::vector<GEMSuperChamber*>& superChambers) {
500  // construct the regions, stations and rings.
501  for (int re = -1; re <= 1; re = re + 2) {
502  GEMRegion* region = new GEMRegion(re);
503  for (int st = GEMDetId::minStationId0; st <= GEMDetId::maxStationId; ++st) {
504  bool ge0Station = st == GEMDetId::minStationId0;
505  GEMStation* station = new GEMStation(re, st);
506  std::string sign(re == -1 ? "-" : "");
507  std::string suffix = ge0Station ? "" : "/1";
508  std::string name = "GE" + sign + std::to_string(st) + suffix;
509  station->setName(name);
510  bool foundSuperChamber = false;
511  for (int ri = 1; ri <= 1; ++ri) {
512  GEMRing* ring = new GEMRing(re, st, ri);
513  for (auto superChamber : superChambers) {
514  const GEMDetId detId(superChamber->id());
515  if (detId.region() != re || detId.station() != st || detId.ring() != ri)
516  continue;
517 
518  foundSuperChamber = true;
520 
521  // GEMDetId::minLayerId is to id the superchamber, so minLayerId+1 is the first layer
522  for (int la = GEMDetId::minLayerId + 1; la <= nlayers; ++la) {
523  GEMDetId chId(detId.region(), detId.ring(), detId.station(), la, detId.chamber(), 0);
524  auto chamber = theGeometry.chamber(chId);
525  if (!chamber) {
526  edm::LogWarning("GEMGeometryBuilder") << "Missing chamber " << chId;
527  } else {
528  superChamber->add(chamber);
529  }
530  }
531  ring->add(superChamber);
532  theGeometry.add(superChamber);
533 #ifdef EDM_ML_DEBUG
534  edm::LogVerbatim("Geometry") << "Adding super chamber " << detId << " to ring: "
535  << "re " << re << " st " << st << " ri " << ri;
536 #endif
537  }
538 #ifdef EDM_ML_DEBUG
539  edm::LogVerbatim("Geometry") << "Adding ring " << ri << " to station "
540  << "re " << re << " st " << st;
541 #endif
542  if (foundSuperChamber) {
543  station->add(ring);
544  theGeometry.add(ring);
545  }
546  }
547  if (!foundSuperChamber) {
548 #ifdef EDM_ML_DEBUG
549  edm::LogVerbatim("Geometry") << "No superchamber found: re:" << re << " st:" << st;
550 #endif
551  delete station;
552  } else {
553 #ifdef EDM_ML_DEBUG
554  edm::LogVerbatim("Geometry") << "Adding station " << st << " to region " << re;
555 #endif
556  region->add(station);
557  theGeometry.add(station);
558  }
559  }
560 #ifdef EDM_ML_DEBUG
561  edm::LogVerbatim("Geometry") << "Adding region " << re << " to the geometry ";
562 #endif
563  theGeometry.add(region);
564  }
565 }
Log< level::Info, true > LogVerbatim
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:125
bool parent()
set the current node to the parent node ...
MuonBaseNumber geoHistoryToBaseNumber(const DDGeoHistory &history) const
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
Definition: DDValue.cc:111
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >> DD3Vector
int getValue(const std::string &name) const
const N & name() const
Definition: DDBase.h:59
bool nextSibling()
set the current node to the next sibling ...
dd4hep::Solid solidA() const
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
double sign(double x)
Plane BoundPlane
Definition: Plane.h:94
GEMEtaPartition * buildEtaPartition(DDFilteredView &fv, GEMDetId detId) const
void buildRegions(GEMGeometry &, const std::vector< GEMSuperChamber * > &)
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
tuple nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
void add(GEMRing *ring)
Add ring to the station which takes ownership.
Definition: GEMStation.cc:22
void add(GEMSuperChamber *ch)
Add super chamber to the ring which takes ownership.
Definition: GEMRing.cc:14
static constexpr int32_t maxLayerId0
Definition: GEMDetId.h:31
TkRotation & rotateAxes(const Basic3DVector< T > &newX, const Basic3DVector< T > &newY, const Basic3DVector< T > &newZ)
DDSolid solidB(void) const
Definition: DDSolid.cc:472
static double delPhi(const double phi1, const double phi2)
RCPBoundPlane boundPlane(const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const ExpandedNodes & history()
The numbering history of the current node.
static constexpr uint32_t chamberIdMask
Definition: GEMDetId.h:70
static constexpr int32_t minStationId0
Definition: GEMDetId.h:24
void build(GEMGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
static constexpr int32_t maxStationId
Definition: GEMDetId.h:27
const Double_t * rot() const
The absolute rotation of the current node.
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
Definition: GEMGeometry.cc:40
constexpr GEMDetId chamberId() const
Definition: GEMDetId.h:204
void setName(std::string name)
Set the station name.
Definition: GEMStation.cc:66
std::string_view name() const
bool firstChild()
set the current node to the first child
DDSolid solidA(void) const
Definition: DDSolid.cc:470
T get(const std::string &)
extract attribute value
const Double_t * trans() const
The absolute translation of the current node.
GEMChamber * buildChamber(DDFilteredView &fv, GEMDetId detId) const
constexpr int chamber() const
Definition: GEMDetId.h:183
constexpr int layer() const
Definition: GEMDetId.h:190
const GEMChamber * chamber(GEMDetId id) const
Definition: GEMGeometry.cc:73
constexpr int station() const
Definition: GEMDetId.h:179
static constexpr int32_t maxLayerId
Definition: GEMDetId.h:32
bool firstChild()
set the current node to the first child ...
constexpr NumType convertMmToCm(NumType millimeters)
Definition: GeantUnits.h:63
int baseNumberToUnitNumber(const MuonBaseNumber &) const override
void add(GEMStation *st)
Add station to the region which takes ownership.
Definition: GEMRegion.cc:20
GEMSuperChamber * buildSuperChamber(DDFilteredView &fv, GEMDetId detId) const
Definition: Bounds.h:18
const std::vector< double > parameters() const
extract shape parameters
const DDTranslation & translation() const
The absolute translation of the current node.
constexpr GEMDetId superChamberId() const
Definition: GEMDetId.h:207
std::vector< const DDsvalues_type * > specifics() const
Log< level::Warning, false > LogWarning
const int level() const
get Iterator level
static char chambers[264][20]
Definition: ReadPGInfo.cc:243
void add(const GEMEtaPartition *roll)
Add EtaPartition to the chamber which takes ownership.
Definition: GEMChamber.cc:21
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
static constexpr int32_t minLayerId
Definition: GEMDetId.h:30
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
dd4hep::Solid solid() const
void add(const GEMRegion *region)
Add a GEMRegion to the Geometry.
Definition: GEMGeometry.cc:81