CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Member Functions | Private Attributes
GEMGeometryBuilderFromDDD Class Reference

#include <GEMGeometryBuilderFromDDD.h>

Public Member Functions

void build (GEMGeometry &theGeometry, const cms::DDCompactView *cview, const MuonGeometryConstants &muonConstants)
 
void build (GEMGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
 
 GEMGeometryBuilderFromDDD ()
 
 ~GEMGeometryBuilderFromDDD ()
 

Private Types

typedef ReferenceCountingPointer< BoundPlaneRCPBoundPlane
 

Private Member Functions

RCPBoundPlane boundPlane (const cms::DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
 
RCPBoundPlane boundPlane (const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
 
GEMChamberbuildChamber (cms::DDFilteredView &fv, GEMDetId detId) const
 
GEMChamberbuildChamber (DDFilteredView &fv, GEMDetId detId) const
 
GEMEtaPartitionbuildEtaPartition (cms::DDFilteredView &fv, GEMDetId detId) const
 
GEMEtaPartitionbuildEtaPartition (DDFilteredView &fv, GEMDetId detId) const
 
GEMSuperChamberbuildSuperChamber (cms::DDFilteredView &fv, GEMDetId detId) const
 
GEMSuperChamberbuildSuperChamber (DDFilteredView &fv, GEMDetId detId) const
 

Private Attributes

std::map< GEMDetId, std::vector< GEMDetId > > chids
 

Detailed Description

Definition at line 34 of file GEMGeometryBuilderFromDDD.h.

Member Typedef Documentation

◆ RCPBoundPlane

Definition at line 49 of file GEMGeometryBuilderFromDDD.h.

Constructor & Destructor Documentation

◆ GEMGeometryBuilderFromDDD()

GEMGeometryBuilderFromDDD::GEMGeometryBuilderFromDDD ( )

Definition at line 40 of file GEMGeometryBuilderFromDDD.cc.

40 {}

◆ ~GEMGeometryBuilderFromDDD()

GEMGeometryBuilderFromDDD::~GEMGeometryBuilderFromDDD ( )

Definition at line 42 of file GEMGeometryBuilderFromDDD.cc.

42 {}

Member Function Documentation

◆ boundPlane() [1/2]

GEMGeometryBuilderFromDDD::RCPBoundPlane GEMGeometryBuilderFromDDD::boundPlane ( const cms::DDFilteredView fv,
Bounds bounds,
bool  isOddChamber 
) const
private

Definition at line 506 of file GEMGeometryBuilderFromDDD.cc.

508  {
509  // extract the position
510  const Double_t* tran = fv.trans();
511  Surface::PositionType posResult(tran[0], tran[1], tran[2]);
512 
513  // now the rotation
514  DDRotationMatrix rota;
515  fv.rot(rota);
516  DD3Vector x, y, z;
517  rota.GetComponents(x, y, z);
518  Surface::RotationType rotResult(float(x.X()),
519  float(x.Y()),
520  float(x.Z()),
521  float(y.X()),
522  float(y.Y()),
523  float(y.Z()),
524  float(z.X()),
525  float(z.Y()),
526  float(z.Z()));
527 
528  //Change of axes for the forward
529  Basic3DVector<float> newX(1., 0., 0.);
530  Basic3DVector<float> newY(0., 0., -1.);
531  Basic3DVector<float> newZ(0., 1., 0.);
532 
533  rotResult.rotateAxes(newX, newY, newZ);
534 
535  return RCPBoundPlane(new BoundPlane(posResult, rotResult, bounds));
536 }

References cms::DDFilteredView::rot(), TkRotation< T >::rotateAxes(), and cms::DDFilteredView::trans().

◆ boundPlane() [2/2]

GEMGeometryBuilderFromDDD::RCPBoundPlane GEMGeometryBuilderFromDDD::boundPlane ( const DDFilteredView fv,
Bounds bounds,
bool  isOddChamber 
) const
private

Definition at line 304 of file GEMGeometryBuilderFromDDD.cc.

306  {
307  // extract the position
308  const DDTranslation& trans(fv.translation());
309  const Surface::PositionType posResult(float(trans.x() / cm), float(trans.y() / cm), float(trans.z() / cm));
310 
311  // now the rotation
312  const DDRotationMatrix& rotation = fv.rotation();
313  DD3Vector x, y, z;
314  rotation.GetComponents(x, y, z);
315 
316  Surface::RotationType rotResult(float(x.X()),
317  float(x.Y()),
318  float(x.Z()),
319  float(y.X()),
320  float(y.Y()),
321  float(y.Z()),
322  float(z.X()),
323  float(z.Y()),
324  float(z.Z()));
325 
326  //Change of axes for the forward
327  Basic3DVector<float> newX(1., 0., 0.);
328  Basic3DVector<float> newY(0., 0., -1.);
329  Basic3DVector<float> newZ(0., 1., 0.);
330 
331  rotResult.rotateAxes(newX, newY, newZ);
332 
333  return RCPBoundPlane(new BoundPlane(posResult, rotResult, bounds));
334 }

References TkRotation< T >::rotateAxes(), idealTransformation::rotation, DDFilteredView::rotation(), and DDFilteredView::translation().

◆ build() [1/2]

void GEMGeometryBuilderFromDDD::build ( GEMGeometry theGeometry,
const cms::DDCompactView cview,
const MuonGeometryConstants muonConstants 
)

Definition at line 338 of file GEMGeometryBuilderFromDDD.cc.

340  {
341  std::string attribute = "MuStructure";
342  std::string value = "MuonEndCapGEM";
343  cms::DDFilteredView fv(cview->detector(), cview->detector()->worldVolume());
344  cms::DDSpecParRefs refs;
345  const cms::DDSpecParRegistry& mypar = cview->specpars();
346  mypar.filter(refs, attribute, value);
347  fv.mergedSpecifics(refs);
348 
349  bool doChambers = fv.firstChild();
350 
351  // loop over superchambers
352  std::vector<GEMSuperChamber*> superChambers;
353 
354  while (doChambers) {
355  MuonDDDNumbering mdddnum(muonConstants);
356  GEMNumberingScheme gemNum(muonConstants);
357  int rawidCh = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.history()));
358  GEMDetId detIdCh = GEMDetId(rawidCh);
359 
360  if (detIdCh.layer() == 1) { // only make superChambers when doing layer 1
361  GEMSuperChamber* gemSuperChamber = buildSuperChamber(fv, detIdCh);
362  superChambers.push_back(gemSuperChamber);
363  }
364 
365  // GEMChamber* gemChamber = ((detIdCh.station() == GEMDetId::minStationId0) ? nullptr : buildChamber(fv, detIdCh));
366  GEMChamber* gemChamber = buildChamber(fv, detIdCh);
367 
368  fv.down();
369  fv.down();
370  bool doEtaPart = fv.nextSibling();
371  while (doEtaPart) {
372  int rawid = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.history()));
373  GEMDetId detId = GEMDetId(rawid);
374  GEMEtaPartition* etaPart = buildEtaPartition(fv, detId);
375 
376  gemChamber->add(etaPart);
377 
378  theGeometry.add(etaPart);
379  doEtaPart = fv.sibling();
380  }
381  theGeometry.add(gemChamber);
382  fv.up();
383  fv.up();
384  fv.up();
385 
386  doChambers = fv.firstChild();
387 
388  } // close while Chambers
389 
390  // construct the regions, stations and rings.
391  for (int re = -1; re <= 1; re = re + 2) {
392  GEMRegion* region = new GEMRegion(re);
393  for (int st = 1; st <= GEMDetId::maxStationId; ++st) {
394  GEMStation* station = new GEMStation(re, st);
395  std::string sign(re == -1 ? "-" : "");
396  std::string name("GE" + sign + std::to_string(st) + "/1");
397  station->setName(name);
398  for (int ri = 1; ri <= 1; ++ri) {
399  GEMRing* ring = new GEMRing(re, st, ri);
400  for (auto superChamber : superChambers) {
401  const GEMDetId detId(superChamber->id());
402  if (detId.region() != re || detId.station() != st || detId.ring() != ri)
403  continue;
404 
405  superChamber->add(
406  theGeometry.chamber(GEMDetId(detId.region(), detId.ring(), detId.station(), 1, detId.chamber(), 0)));
407  superChamber->add(
408  theGeometry.chamber(GEMDetId(detId.region(), detId.ring(), detId.station(), 2, detId.chamber(), 0)));
409 
410  ring->add(superChamber);
411  theGeometry.add(superChamber);
412 
413  LogDebug("GEMGeometryBuilderFromDDD") << "Adding super chamber " << detId << " to ring: "
414  << "re " << re << " st " << st << " ri " << ri << std::endl;
415  }
416  LogDebug("GEMGeometryBuilderFromDDD") << "Adding ring " << ri << " to station "
417  << "re " << re << " st " << st << std::endl;
418 
419  station->add(ring);
420  theGeometry.add(ring);
421  }
422  LogDebug("GEMGeometryBuilderFromDDD") << "Adding station " << st << " to region " << re << std::endl;
423 
424  region->add(station);
425  theGeometry.add(station);
426  }
427  LogDebug("GEMGeometryBuilderFromDDD") << "Adding region " << re << " to the geometry " << std::endl;
428 
429  theGeometry.add(region);
430  }
431 }

References GEMChamber::add(), GEMGeometry::add(), GEMNumberingScheme::baseNumberToUnitNumber(), GEMGeometry::chamber(), cms::DDCompactView::detector(), cms::DDSpecParRegistry::filter(), MuonDDDNumbering::geoHistoryToBaseNumber(), GEMDetId::layer(), LogDebug, GEMDetId::maxStationId, Skims_PA_cff::name, HLT_2018_cff::region, relativeConstraints::ring, Validation_hcalonly_cfi::sign, cms::DDCompactView::specpars(), relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and cms::DDDetector::worldVolume().

◆ build() [2/2]

void GEMGeometryBuilderFromDDD::build ( GEMGeometry theGeometry,
const DDCompactView cview,
const MuonGeometryConstants muonConstants 
)

Definition at line 45 of file GEMGeometryBuilderFromDDD.cc.

47  {
48  std::string attribute = "MuStructure";
49  std::string value = "MuonEndCapGEM";
50 
51  // Asking only for the MuonGEM's
53  DDFilteredView fv(*cview, filter);
54 
55  LogDebug("GEMGeometryBuilderFromDDD") << "Building the geometry service";
56  LogDebug("GEMGeometryBuilderFromDDD") << "About to run through the GEM structure\n"
57  << " First logical part " << fv.logicalPart().name().name();
58 
59  bool doSuper = fv.firstChild();
60 
61  LogDebug("GEMGeometryBuilderFromDDD") << "doSuperChamber = " << doSuper;
62  // loop over superchambers
63  std::vector<GEMSuperChamber*> superChambers;
64 
65  while (doSuper) {
66  // getting chamber id from eta partitions
67  fv.firstChild();
68  fv.firstChild();
69 
70  MuonDDDNumbering mdddnumCh(muonConstants);
71  GEMNumberingScheme gemNumCh(muonConstants);
72  int rawidCh = gemNumCh.baseNumberToUnitNumber(mdddnumCh.geoHistoryToBaseNumber(fv.geoHistory()));
73  GEMDetId detIdCh = GEMDetId(rawidCh);
74 
75  // back to chambers
76 
77  fv.parent();
78  fv.parent();
79 
80  // currently there is no superchamber in the geometry
81  // only 2 chambers are present separated by a gap.
82  // making superchamber out of the first chamber layer including the gap between chambers
83  if (detIdCh.layer() == 1) { // only make superChambers when doing layer 1
84  GEMSuperChamber* gemSuperChamber = buildSuperChamber(fv, detIdCh);
85  superChambers.push_back(gemSuperChamber);
86  }
87  GEMChamber* gemChamber = ((detIdCh.station() == GEMDetId::minStationId0) ? nullptr : buildChamber(fv, detIdCh));
88 
89  // loop over chambers
90  // only 1 chamber
91  bool doChambers = fv.firstChild();
92  bool loopExecuted = false;
93 
94  while (doChambers) {
95  loopExecuted = true;
96 
97  if (detIdCh.station() == GEMDetId::minStationId0) {
98  fv.firstChild();
99  MuonDDDNumbering mdddnum(muonConstants);
100  GEMNumberingScheme ge0Num(muonConstants);
101  int rawId = ge0Num.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
102  GEMDetId detId = GEMDetId(rawId);
103  fv.parent();
104 
105  gemChamber = buildChamber(fv, detId);
106  }
107 
108  // loop over GEMEtaPartitions
109  bool doEtaPart = fv.firstChild();
110 
111  while (doEtaPart) {
112  MuonDDDNumbering mdddnum(muonConstants);
113  GEMNumberingScheme gemNum(muonConstants);
114  int rawid = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
115  GEMDetId detId = GEMDetId(rawid);
116  GEMEtaPartition* etaPart = buildEtaPartition(fv, detId);
117  gemChamber->add(etaPart);
118  theGeometry.add(etaPart);
119  doEtaPart = fv.nextSibling();
120  }
121 
122  fv.parent();
123 
124  theGeometry.add(gemChamber);
125 
126  doChambers = fv.nextSibling();
127  }
128  fv.parent();
129 
130  doSuper = fv.nextSibling();
131 
132  if (!loopExecuted) {
133  delete gemChamber;
134  }
135  }
136 
137  // construct the regions, stations and rings.
138  for (int re = -1; re <= 1; re = re + 2) {
139  GEMRegion* region = new GEMRegion(re);
140  for (int st = GEMDetId::minStationId0; st <= GEMDetId::maxStationId; ++st) {
141  bool ge0Station = st == GEMDetId::minStationId0;
142  GEMStation* station = new GEMStation(re, st);
143  std::string sign(re == -1 ? "-" : "");
144  std::string suffix = ge0Station ? "" : "/1";
145  std::string name = "GE" + sign + std::to_string(st) + suffix;
146  station->setName(name);
147  bool foundSuperChamber = false;
148  for (int ri = 1; ri <= 1; ++ri) {
149  GEMRing* ring = new GEMRing(re, st, ri);
150  for (auto superChamber : superChambers) {
151  const GEMDetId detId(superChamber->id());
152  if (detId.region() != re || detId.station() != st || detId.ring() != ri)
153  continue;
154 
155  foundSuperChamber = true;
157 
158  // GEMDetId::minLayerId is to id the superchamber, so minLayerId+1 is the first layer
159  for (int la = GEMDetId::minLayerId + 1; la <= nlayers; ++la) {
160  GEMDetId chId(detId.region(), detId.ring(), detId.station(), la, detId.chamber(), 0);
161  auto chamber = theGeometry.chamber(chId);
162  if (!chamber) {
163  edm::LogWarning("GEMGeometryBuilderFromDDD") << "Missing chamber " << chId << std::endl;
164  }
165  superChamber->add(chamber);
166  }
167  ring->add(superChamber);
168  theGeometry.add(superChamber);
169  LogDebug("GEMGeometryBuilderFromDDD") << "Adding super chamber " << detId << " to ring: "
170  << "re " << re << " st " << st << " ri " << ri << std::endl;
171  }
172  LogDebug("GEMGeometryBuilderFromDDD") << "Adding ring " << ri << " to station "
173  << "re " << re << " st " << st << std::endl;
174  if (!foundSuperChamber) {
175  delete ring;
176  } else {
177  station->add(ring);
178  theGeometry.add(ring);
179  }
180  }
181  if (!foundSuperChamber) {
182  LogDebug("GEMGeometryBuilderFromDDD") << "No superchamber found: re:" << re << " st:" << st << std::endl;
183  delete station;
184  } else {
185  LogDebug("GEMGeometryBuilderFromDDD") << "Adding station " << st << " to region " << re << std::endl;
186  region->add(station);
187  theGeometry.add(station);
188  }
189  }
190  LogDebug("GEMGeometryBuilderFromDDD") << "Adding region " << re << " to the geometry " << std::endl;
191 
192  theGeometry.add(region);
193  }
194 }

References GEMChamber::add(), GEMGeometry::add(), GEMNumberingScheme::baseNumberToUnitNumber(), relativeConstraints::chamber, GEMGeometry::chamber(), ALCARECOTkAlBeamHalo_cff::filter, DDFilteredView::firstChild(), DDFilteredView::geoHistory(), MuonDDDNumbering::geoHistoryToBaseNumber(), GEMDetId::layer(), LogDebug, DDFilteredView::logicalPart(), GEMDetId::maxLayerId, GEMDetId::maxLayerId0, GEMDetId::maxStationId, GEMDetId::minLayerId, GEMDetId::minStationId0, Skims_PA_cff::name, DDName::name(), DDBase< N, C >::name(), DDFilteredView::nextSibling(), nlayers, DDFilteredView::parent(), HLT_2018_cff::region, relativeConstraints::ring, Validation_hcalonly_cfi::sign, relativeConstraints::station, GEMDetId::station(), AlCaHLTBitMon_QueryRunRegistry::string, and createPayload::suffix.

Referenced by GEMGeometryESModule::produce().

◆ buildChamber() [1/2]

GEMChamber * GEMGeometryBuilderFromDDD::buildChamber ( cms::DDFilteredView fv,
GEMDetId  detId 
) const
private

Definition at line 459 of file GEMGeometryBuilderFromDDD.cc.

459  {
460  cms::DDSolid solid(fv.solid());
461  auto solidA = solid.solidA();
462  std::vector<double> dpar = solidA.dimensions();
463 
464  double dy = dpar[3]; //length is along local Y
465  double dz = dpar[2]; // thickness is long local Z
466  double dx1 = dpar[0]; // bottom width is along local X
467  double dx2 = dpar[1]; // top width is along local X
468 
469  auto solidB = solid.solidB();
470  dpar = solidB.dimensions();
471 
472  dz += dpar[2]; // chamber thickness
473 
474  bool isOdd = detId.chamber() % 2;
475  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dx1, dx2, dy, dz), isOdd));
476 
477  GEMChamber* chamber = new GEMChamber(detId.chamberId(), surf);
478  return chamber;
479 }

References relativeConstraints::chamber, GEMDetId::chamber(), GEMDetId::chamberId(), PVValHelper::dy, PVValHelper::dz, cms::DDFilteredView::solid(), and cms::DDSolid::solidA().

◆ buildChamber() [2/2]

GEMChamber * GEMGeometryBuilderFromDDD::buildChamber ( DDFilteredView fv,
GEMDetId  detId 
) const
private

Definition at line 229 of file GEMGeometryBuilderFromDDD.cc.

229  {
230  LogDebug("GEMGeometryBuilderFromDDD") << "buildChamber " << fv.logicalPart().name().name() << " " << detId
231  << std::endl;
232 
234  bool ge0Station = detId.station() == GEMDetId::minStationId0;
235  std::vector<double> dpar = ge0Station ? solid.parameters() : solid.solidA().parameters();
236 
237  double dy = geant_units::operators::convertMmToCm(dpar[0]); //length is along local Y
238  double dz = geant_units::operators::convertMmToCm(dpar[3]); // thickness is long local Z
239  double dx1 = geant_units::operators::convertMmToCm(dpar[4]); // bottom width is along local X
240  double dx2 = geant_units::operators::convertMmToCm(dpar[8]); // top width is along local X
241 
242  if (!ge0Station) {
243  dpar = solid.solidB().parameters();
244  dz += geant_units::operators::convertMmToCm(dpar[3]); // chamber thickness
245  }
246 
247  bool isOdd = ge0Station ? false : detId.chamber() % 2;
248 
249  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dx1, dx2, dy, dz), isOdd));
250 
251  LogDebug("GEMGeometryBuilderFromDDD") << "size " << dx1 << " " << dx2 << " " << dy << " " << dz << std::endl;
252 
253  GEMChamber* chamber = new GEMChamber(detId.chamberId(), surf);
254  return chamber;
255 }

References relativeConstraints::chamber, GEMDetId::chamber(), GEMDetId::chamberId(), geant_units::operators::convertMmToCm(), PVValHelper::dy, PVValHelper::dz, funct::false, LogDebug, DDFilteredView::logicalPart(), GEMDetId::minStationId0, DDName::name(), DDBase< N, C >::name(), DDSolid::parameters(), DDLogicalPart::solid(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), and GEMDetId::station().

◆ buildEtaPartition() [1/2]

GEMEtaPartition * GEMGeometryBuilderFromDDD::buildEtaPartition ( cms::DDFilteredView fv,
GEMDetId  detId 
) const
private

Definition at line 481 of file GEMGeometryBuilderFromDDD.cc.

481  {
482  // EtaPartition specific parameter (nstrips and npads)
483 
484  auto nStrips = fv.get<double>("nStrips");
485  auto nPads = fv.get<double>("nPads");
486 
487  // EtaPartition specific parameter (size)
488 
489  std::vector<double> dpar = fv.parameters();
490 
491  double ti = 0.4; // half thickness
492 
493  const std::vector<float> pars{float(dpar[0]), float(dpar[1]), float(dpar[3]), float(nStrips), float(nPads)};
494 
495  bool isOdd = detId.chamber() % 2;
496  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dpar[0], dpar[1], dpar[3], ti), isOdd));
497 
498  std::string_view name = fv.name();
499 
501 
502  GEMEtaPartition* etaPartition = new GEMEtaPartition(detId, surf, e_p_specs);
503  return etaPartition;
504 }

References GEMDetId::chamber(), dqmMemoryStats::float, GeomDetEnumerators::GEM, cms::DDFilteredView::get(), Skims_PA_cff::name, cms::DDFilteredView::name(), me0TriggerPseudoDigis_cff::nStrips, cms::DDFilteredView::parameters(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ buildEtaPartition() [2/2]

GEMEtaPartition * GEMGeometryBuilderFromDDD::buildEtaPartition ( DDFilteredView fv,
GEMDetId  detId 
) const
private

Definition at line 257 of file GEMGeometryBuilderFromDDD.cc.

257  {
258  LogDebug("GEMGeometryBuilderFromDDD") << "buildEtaPartition " << fv.logicalPart().name().name() << " " << detId
259  << std::endl;
260 
261  // EtaPartition specific parameter (nstrips and npads)
262  DDValue numbOfStrips("nStrips");
263  DDValue numbOfPads("nPads");
264  std::vector<const DDsvalues_type*> specs(fv.specifics());
265  std::vector<const DDsvalues_type*>::iterator is = specs.begin();
266  double nStrips = 0., nPads = 0.;
267  for (; is != specs.end(); is++) {
268  if (DDfetch(*is, numbOfStrips))
269  nStrips = numbOfStrips.doubles()[0];
270  if (DDfetch(*is, numbOfPads))
271  nPads = numbOfPads.doubles()[0];
272  }
273  LogDebug("GEMGeometryBuilderFromDDD") << ((nStrips == 0.) ? ("No nStrips found!!")
274  : ("Number of strips: " + std::to_string(nStrips)));
275  LogDebug("GEMGeometryBuilderFromDDD") << ((nPads == 0.) ? ("No nPads found!!")
276  : ("Number of pads: " + std::to_string(nPads)));
277 
278  // EtaPartition specific parameter (size)
279  std::vector<double> dpar = fv.logicalPart().solid().parameters();
280 
281  double be = geant_units::operators::convertMmToCm(dpar[4]); // half bottom edge
282  double te = geant_units::operators::convertMmToCm(dpar[8]); // half top edge
283  double ap = geant_units::operators::convertMmToCm(dpar[0]); // half apothem
284  double ti = 0.4; // half thickness
285 
286  std::vector<float> pars;
287  pars.emplace_back(be);
288  pars.emplace_back(te);
289  pars.emplace_back(ap);
290  pars.emplace_back(nStrips);
291  pars.emplace_back(nPads);
292 
293  bool isOdd = detId.chamber() % 2;
294  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(be, te, ap, ti), isOdd));
295  std::string name = fv.logicalPart().name().name();
297 
298  LogDebug("GEMGeometryBuilderFromDDD") << "size " << be << " " << te << " " << ap << " " << ti << std::endl;
299 
300  GEMEtaPartition* etaPartition = new GEMEtaPartition(detId, surf, e_p_specs);
301  return etaPartition;
302 }

References cms::cuda::be, GEMDetId::chamber(), geant_units::operators::convertMmToCm(), DDfetch(), DDValue::doubles(), GeomDetEnumerators::GEM, LogDebug, DDFilteredView::logicalPart(), Skims_PA_cff::name, DDName::name(), DDBase< N, C >::name(), me0TriggerPseudoDigis_cff::nStrips, DDSolid::parameters(), DDLogicalPart::solid(), DDFilteredView::specifics(), HistogramManager_cfi::specs, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ buildSuperChamber() [1/2]

GEMSuperChamber * GEMGeometryBuilderFromDDD::buildSuperChamber ( cms::DDFilteredView fv,
GEMDetId  detId 
) const
private

Definition at line 433 of file GEMGeometryBuilderFromDDD.cc.

433  {
434  cms::DDSolid solid(fv.solid());
435  auto solidA = solid.solidA();
436  std::vector<double> dpar = solidA.dimensions();
437 
438  double dy = dpar[3]; //length is along local Y
439  double dz = dpar[2]; // thickness is long local Z
440  double dx1 = dpar[0]; // bottom width is along local X
441  double dx2 = dpar[1]; // top width is along loc
442 
443  auto solidB = solid.solidB();
444  dpar = solidB.dimensions();
445  const int nch = 2;
446  const double chgap = 2.105;
447 
448  dz += dpar[2]; // chamber thickness
449  dz *= nch; // 2 chambers in superchamber
450  dz += chgap; // gap between chambers
451 
452  bool isOdd = detId.chamber() % 2;
453  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dx1, dx2, dy, dz), isOdd));
454 
455  GEMSuperChamber* superChamber = new GEMSuperChamber(detId.superChamberId(), surf);
456  return superChamber;
457 }

References GEMDetId::chamber(), PVValHelper::dy, PVValHelper::dz, cms::DDFilteredView::solid(), cms::DDSolid::solidA(), and GEMDetId::superChamberId().

◆ buildSuperChamber() [2/2]

GEMSuperChamber * GEMGeometryBuilderFromDDD::buildSuperChamber ( DDFilteredView fv,
GEMDetId  detId 
) const
private

Definition at line 196 of file GEMGeometryBuilderFromDDD.cc.

196  {
197  LogDebug("GEMGeometryBuilderFromDDD") << "buildSuperChamber " << fv.logicalPart().name().name() << " " << detId
198  << std::endl;
199 
201  bool ge0Station = detId.station() == GEMDetId::minStationId0;
202  std::vector<double> dpar = ge0Station ? solid.parameters() : solid.solidA().parameters();
203 
204  double dy = geant_units::operators::convertMmToCm(dpar[0]); //length is along local Y
205  double dz = geant_units::operators::convertMmToCm(dpar[3]); // thickness is long local Z
206  double dx1 = geant_units::operators::convertMmToCm(dpar[4]); // bottom width is along local X
207  double dx2 = geant_units::operators::convertMmToCm(dpar[8]); // top width is along local X
208 
209  if (!ge0Station) {
210  const int nch = 2;
211  const double chgap = 2.105;
212 
213  dpar = solid.solidB().parameters();
214 
215  dz += geant_units::operators::convertMmToCm(dpar[3]); // chamber thickness
216  dz *= nch; // 2 chambers in superchamber
217  dz += chgap; // gap between chambers
218  }
219 
220  bool isOdd = detId.chamber() % 2;
221  RCPBoundPlane surf(boundPlane(fv, new TrapezoidalPlaneBounds(dx1, dx2, dy, dz), isOdd));
222 
223  LogDebug("GEMGeometryBuilderFromDDD") << "size " << dx1 << " " << dx2 << " " << dy << " " << dz << std::endl;
224 
225  GEMSuperChamber* superChamber = new GEMSuperChamber(detId.superChamberId(), surf);
226  return superChamber;
227 }

References GEMDetId::chamber(), geant_units::operators::convertMmToCm(), PVValHelper::dy, PVValHelper::dz, LogDebug, DDFilteredView::logicalPart(), GEMDetId::minStationId0, DDName::name(), DDBase< N, C >::name(), DDSolid::parameters(), DDLogicalPart::solid(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), GEMDetId::station(), and GEMDetId::superChamberId().

Member Data Documentation

◆ chids

std::map<GEMDetId, std::vector<GEMDetId> > GEMGeometryBuilderFromDDD::chids
private

Definition at line 46 of file GEMGeometryBuilderFromDDD.h.

cms::DDSolid
Definition: DDFilteredView.h:31
cms::DDFilteredView::rot
const Double_t * rot() const
The absolute rotation of the current node.
Definition: DDFilteredView.cc:120
DDBooleanSolid::solidB
DDSolid solidB(void) const
Definition: DDSolid.cc:468
TkRotation< float >
MuonDDDNumbering
Definition: MuonDDDNumbering.h:24
DDAxes::y
GEMNumberingScheme
Definition: GEMNumberingScheme.h:9
GEMGeometry::add
void add(const GEMRegion *region)
Add a GEMRegion to the Geometry.
Definition: GEMGeometry.cc:81
GEMGeometryBuilderFromDDD::boundPlane
RCPBoundPlane boundPlane(const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
Definition: GEMGeometryBuilderFromDDD.cc:304
cms::DDFilteredView::parameters
const std::vector< double > parameters() const
extract shape parameters
Definition: DDFilteredView.cc:448
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
funct::false
false
Definition: Factorize.h:34
GEMDetId::ring
constexpr int ring() const
Definition: GEMDetId.h:170
GEMSuperChamber
Definition: GEMSuperChamber.h:19
GEMDetId::layer
constexpr int layer() const
Definition: GEMDetId.h:184
GEMDetId::region
constexpr int region() const
Definition: GEMDetId.h:165
relativeConstraints.station
station
Definition: relativeConstraints.py:67
DDFilteredView::logicalPart
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
Definition: DDFilteredView.cc:16
HistogramManager_cfi.specs
specs
Definition: HistogramManager_cfi.py:80
GEMEtaPartition
Definition: GEMEtaPartition.h:12
cms::DDSpecParRegistry
Definition: DDSpecParRegistry.h:32
GEMDetId::superChamberId
constexpr GEMDetId superChamberId() const
Definition: GEMDetId.h:196
Validation_hcalonly_cfi.sign
sign
Definition: Validation_hcalonly_cfi.py:32
GEMDetId::maxStationId
static constexpr int32_t maxStationId
Definition: GEMDetId.h:26
DDAxes::x
GEMDetId::minLayerId
static constexpr int32_t minLayerId
Definition: GEMDetId.h:29
cms::DDFilteredView
Definition: DDFilteredView.h:65
DDRotationMatrix
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
Definition: DDRotationMatrix.h:8
cms::DDSolid::solidA
dd4hep::Solid solidA() const
Definition: DDFilteredView.cc:17
DD3Vector
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
Definition: DDTranslation.h:6
createPayload.suffix
suffix
Definition: createPayload.py:281
cms::DDFilteredView::name
std::string_view name() const
Definition: DDFilteredView.cc:606
DDBooleanSolid
Definition: DDSolid.h:173
cms::DDFilteredView::solid
dd4hep::Solid solid() const
Definition: DDFilteredView.cc:608
cms::DDFilteredView::trans
const Double_t * trans() const
The absolute translation of the current node.
Definition: DDFilteredView.cc:101
GEMGeometryBuilderFromDDD::buildEtaPartition
GEMEtaPartition * buildEtaPartition(DDFilteredView &fv, GEMDetId detId) const
Definition: GEMGeometryBuilderFromDDD.cc:257
DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
cms::DDFilteredView::get
T get(const std::string &) const
extract attribute value
GEMDetId::minStationId0
static constexpr int32_t minStationId0
Definition: GEMDetId.h:23
GEMStation
Definition: GEMStation.h:19
DDBase::name
const N & name() const
Definition: DDBase.h:59
DDAxes::z
DDfetch
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
Point3DBase< float, GlobalTag >
GEMGeometryBuilderFromDDD::buildSuperChamber
GEMSuperChamber * buildSuperChamber(DDFilteredView &fv, GEMDetId detId) const
Definition: GEMGeometryBuilderFromDDD.cc:196
ALCARECOTkAlBeamHalo_cff.filter
filter
Definition: ALCARECOTkAlBeamHalo_cff.py:27
cms::DDSpecParRefs
std::vector< const DDSpecPar * > DDSpecParRefs
Definition: DDSpecParRegistry.h:30
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
GEMRing
Definition: GEMRing.h:18
edm::LogWarning
Definition: MessageLogger.h:141
GEMDetId::chamber
constexpr int chamber() const
Definition: GEMDetId.h:177
GEMDetId::maxLayerId0
static constexpr int32_t maxLayerId0
Definition: GEMDetId.h:30
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:670
idealTransformation.rotation
dictionary rotation
Definition: idealTransformation.py:1
GEMDetId
Definition: GEMDetId.h:17
value
Definition: value.py:1
DDName::name
const std::string & name() const
Returns the name.
Definition: DDName.cc:40
PVValHelper::dy
Definition: PVValidationHelpers.h:49
TrapezoidalPlaneBounds
Definition: TrapezoidalPlaneBounds.h:15
cms::DDCompactView::specpars
DDSpecParRegistry const & specpars() const
Definition: DDCompactView.h:33
DDFilteredView::specifics
std::vector< const DDsvalues_type * > specifics() const
Definition: DDFilteredView.cc:32
me0TriggerPseudoDigis_cff.nStrips
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
Definition: me0TriggerPseudoDigis_cff.py:26
GEMChamber
Definition: GEMChamber.h:19
BoundPlane
Plane BoundPlane
Definition: Plane.h:94
PVValHelper::dz
Definition: PVValidationHelpers.h:50
DDValue
Definition: DDValue.h:21
DDFilteredView::translation
const DDTranslation & translation() const
The absolute translation of the current node.
Definition: DDFilteredView.cc:26
GEMDetId::maxLayerId
static constexpr int32_t maxLayerId
Definition: GEMDetId.h:31
cms::DDSpecParRegistry::filter
void filter(DDSpecParRefs &, const std::string &, const std::string &="") const
Definition: DDSpecparRegistry.cc:98
GEMDetId::chamberId
constexpr GEMDetId chamberId() const
Definition: GEMDetId.h:193
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
HLT_2018_cff.region
region
Definition: HLT_2018_cff.py:81479
DDSolid::parameters
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:121
relativeConstraints.chamber
chamber
Definition: relativeConstraints.py:53
GeomDetEnumerators::GEM
Definition: GeomDetEnumerators.h:21
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
DDSpecificsMatchesValueFilter
Definition: DDFilter.h:70
DDFilteredView::rotation
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
Definition: DDFilteredView.cc:28
DDBooleanSolid::solidA
DDSolid solidA(void) const
Definition: DDSolid.cc:466
GEMGeometryBuilderFromDDD::buildChamber
GEMChamber * buildChamber(DDFilteredView &fv, GEMDetId detId) const
Definition: GEMGeometryBuilderFromDDD.cc:229
DDFilteredView
Definition: DDFilteredView.h:20
geant_units::operators::convertMmToCm
constexpr NumType convertMmToCm(NumType millimeters)
Definition: GeantUnits.h:62
GEMDetId::station
constexpr int station() const
Definition: GEMDetId.h:173
cms::cuda::be
int be
Definition: HistoContainer.h:126
GEMRegion
Definition: GEMRegion.h:19
GEMGeometry::chamber
const GEMChamber * chamber(GEMDetId id) const
Definition: GEMGeometry.cc:73
DDLogicalPart::solid
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
Definition: DDLogicalPart.cc:120
cms::DDDetector::worldVolume
Volume worldVolume() const
Handle to the world volume containing everything.
Definition: DDDetector.cc:41
GEMEtaPartitionSpecs
Definition: GEMEtaPartitionSpecs.h:18
cms::DDCompactView::detector
const cms::DDDetector * detector() const
Definition: DDCompactView.h:32
Basic3DVector< float >
GEMChamber::add
void add(GEMEtaPartition *roll)
Add EtaPartition to the chamber which takes ownership.
Definition: GEMChamber.cc:21
nlayers
Definition: HIMultiTrackSelector.h:48
GEMGeometryBuilderFromDDD::RCPBoundPlane
ReferenceCountingPointer< BoundPlane > RCPBoundPlane
Definition: GEMGeometryBuilderFromDDD.h:49