71 std::vector<GEMSuperChamber*> superChambers;
96 if (detIdCh.
layer() == 1) {
98 superChambers.push_back(gemSuperChamber);
105 bool loopExecuted =
false;
120 gemChamber = buildChamber(fv, detId);
134 gemChamber->
add(etaPart);
135 theGeometry.
add(etaPart);
141 theGeometry.
add(gemChamber);
154 buildRegions(theGeometry, superChambers);
172 const double chgap = 2.105;
181 bool isOdd = detId.
chamber() % 2;
225 DDValue numbOfStrips(
"nStrips");
229 std::vector<const DDsvalues_type*>::iterator is =
specs.begin();
231 for (; is !=
specs.end(); is++) {
232 if (
DDfetch(*is, numbOfStrips))
235 nPads = numbOfPads.
doubles()[0];
241 : (
"Number of strips: " + std::to_string(
nStrips)));
242 edm::LogVerbatim(
"Geometry") << ((nPads == 0.) ? (
"No nPads found!!") : (
"Number of pads: " + std::to_string(nPads)));
252 std::vector<float> pars;
253 pars.emplace_back(
be);
254 pars.emplace_back(te);
255 pars.emplace_back(ap);
257 pars.emplace_back(nPads);
258 pars.emplace_back(
dPhi);
260 bool isOdd = detId.
chamber() % 2;
274 bool isOddChamber)
const {
316 static constexpr uint32_t levelChamb = 7;
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;
325 const auto& history = fv.
history();
329 edm::LogVerbatim(
"Geometry") << fv.
name() <<
" with " << history.tags.size() <<
" Levels and ID " << detId
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];
339 if (
num.getLevels() == theRingLevel) {
340 if (detId.region() !=
region) {
345 detId =
GEMDetId(detId.region(), detId.ring(), detId.station(), detId.layer(), chamb, 0);
347 superChambers.emplace_back(gemSuperChamber);
348 }
else if (
num.getLevels() == theSectorLevel) {
349 GEMChamber* gemChamber = buildChamber(fv, detId);
353 theGeometry.
add(etaPart);
356 if (fv.
level() == levelChamb) {
357 if (detId.layer() == 1) {
359 superChambers.emplace_back(gemSuperChamber);
361 GEMChamber* gemChamber = buildChamber(fv, detId);
363 }
else if (
num.getLevels() > theSectorLevel) {
365 theGeometry.
add(etaPart);
375 gemChamber->add(etaPart);
378 theGeometry.
add(gemChamber);
381 buildRegions(theGeometry, superChambers);
386 auto solidA = solid.
solidA();
387 std::vector<double> dpar = solidA.dimensions();
389 double dy = k_ScaleFromDD4Hep * dpar[3];
390 double dz = k_ScaleFromDD4Hep * dpar[2];
391 double dx1 = k_ScaleFromDD4Hep * dpar[0];
392 double dx2 = k_ScaleFromDD4Hep * dpar[1];
394 auto solidB = solid.solidB();
395 dpar = solidB.dimensions();
397 const double chgap = 2.105;
399 dz += (k_ScaleFromDD4Hep * dpar[2]);
403 bool isOdd = detId.
chamber() % 2;
412 auto solidA = solid.
solidA();
413 std::vector<double> dpar = solidA.dimensions();
415 double dy = k_ScaleFromDD4Hep * dpar[3];
416 double dz = k_ScaleFromDD4Hep * dpar[2];
417 double dx1 = k_ScaleFromDD4Hep * dpar[0];
418 double dx2 = k_ScaleFromDD4Hep * dpar[1];
420 auto solidB = solid.solidB();
421 dpar = solidB.dimensions();
423 dz += (k_ScaleFromDD4Hep * dpar[2]);
425 bool isOdd = detId.
chamber() % 2;
436 auto nPads = fv.
get<
double>(
"nPads");
437 auto dPhi = fv.
get<
double>(
"dPhi");
444 const std::vector<float> pars{
float(k_ScaleFromDD4Hep * dpar[0]),
445 float(k_ScaleFromDD4Hep * dpar[1]),
446 float(k_ScaleFromDD4Hep * dpar[3]),
451 bool isOdd = detId.
chamber() % 2;
455 k_ScaleFromDD4Hep * dpar[0], k_ScaleFromDD4Hep * dpar[1], k_ScaleFromDD4Hep * dpar[3], ti),
468 bool isOddChamber)
const {
470 const Double_t* tran = fv.
trans();
472 k_ScaleFromDD4Hep * tran[0], k_ScaleFromDD4Hep * tran[1], k_ScaleFromDD4Hep * tran[2]);
478 rota.GetComponents(x, y, z);
501 for (
int re = -1; re <= 1; re = re + 2) {
510 bool foundSuperChamber =
false;
511 for (
int ri = 1; ri <= 1; ++ri) {
513 for (
auto superChamber : superChambers) {
514 const GEMDetId detId(superChamber->id());
515 if (detId.region() != re || detId.station() != st || detId.ring() != ri)
518 foundSuperChamber =
true;
523 GEMDetId chId(detId.region(), detId.ring(), detId.station(), la, detId.chamber(), 0);
530 ring->add(superChamber);
531 theGeometry.
add(superChamber);
533 edm::LogVerbatim(
"Geometry") <<
"Adding super chamber " << detId <<
" to ring: "
534 <<
"re " << re <<
" st " << st <<
" ri " << ri;
539 <<
"re " << re <<
" st " << st;
541 if (foundSuperChamber) {
546 if (!foundSuperChamber) {
548 edm::LogVerbatim(
"Geometry") <<
"No superchamber found: re:" << re <<
" st:" << st;
553 edm::LogVerbatim(
"Geometry") <<
"Adding station " << st <<
" to region " << re;
560 edm::LogVerbatim(
"Geometry") <<
"Adding region " << re <<
" to the geometry ";