77 bool demonstratorGeometry = nGE21 == 1;
80 edm::LogVerbatim(
"Geometry") <<
"Found " << nGE21 <<
" GE2/1 chambers. Demonstrator geometry on? " 81 << demonstratorGeometry;
101 std::vector<GEMSuperChamber*> superChambers;
131 if ((detIdCh.
layer() == 1) || (detIdCh.
layer() == 2 and detIdCh.
station() == 2 and demonstratorGeometry)) {
133 superChambers.push_back(gemSuperChamber);
140 bool loopExecuted =
false;
155 gemChamber = buildChamber(fv, detId);
169 gemChamber->
add(etaPart);
170 theGeometry.
add(etaPart);
176 theGeometry.
add(gemChamber);
189 buildRegions(theGeometry, superChambers, demonstratorGeometry);
207 const double chgap = 2.105;
216 bool isOdd = detId.
chamber() % 2;
260 DDValue numbOfStrips(
"nStrips");
264 std::vector<const DDsvalues_type*>::iterator is =
specs.begin();
266 for (; is !=
specs.end(); is++) {
267 if (
DDfetch(*is, numbOfStrips))
270 nPads = numbOfPads.
doubles()[0];
287 std::vector<float> pars;
288 pars.emplace_back(
be);
289 pars.emplace_back(te);
290 pars.emplace_back(ap);
292 pars.emplace_back(nPads);
293 pars.emplace_back(
dPhi);
295 bool isOdd = detId.
chamber() % 2;
309 bool isOddChamber)
const {
351 static constexpr uint32_t levelChamb = 7;
353 int theLevelPart = muonConstants.
getValue(
"level");
354 int theRingLevel = muonConstants.
getValue(
"mg_ring") / theLevelPart;
355 int theSectorLevel = muonConstants.
getValue(
"mg_sector") / theLevelPart;
360 const auto& history = fvGE2.
history();
365 if (fvGE2.
level() == levelChamb) {
366 if (detId.station() == 2)
372 bool demonstratorGeometry = nGE21 == 1;
374 edm::LogVerbatim(
"Geometry") <<
"Found " << nGE21 <<
" GE2/1 chambers. Demonstrator geometry on? " 375 << demonstratorGeometry;
380 std::vector<GEMSuperChamber*> superChambers;
384 const auto& history = fv.
history();
388 edm::LogVerbatim(
"Geometry") << fv.
name() <<
" with " << history.tags.size() <<
" Levels and ID " << detId
391 <<
":" << theSectorLevel <<
":" << history.tags.size() <<
":" << fv.
level();
392 for (
unsigned int k = 0;
k < history.tags.size(); ++
k)
393 edm::LogVerbatim(
"Geometry") <<
"[" <<
k <<
"] Tag " << history.tags[
k] <<
" Offset " << history.offsets[
k]
394 <<
" copy " << history.copyNos[
k];
398 if (
num.getLevels() == theRingLevel) {
399 if (detId.region() !=
region) {
404 detId =
GEMDetId(detId.region(), detId.ring(), detId.station(), detId.layer(), chamb, 0);
406 superChambers.emplace_back(gemSuperChamber);
407 }
else if (
num.getLevels() == theSectorLevel) {
408 GEMChamber* gemChamber = buildChamber(fv, detId);
412 theGeometry.
add(etaPart);
415 if (fv.
level() == levelChamb) {
416 if ((detId.layer() == 1) || (detId.layer() == 2 and detId.station() == 2 and demonstratorGeometry)) {
418 superChambers.emplace_back(gemSuperChamber);
420 GEMChamber* gemChamber = buildChamber(fv, detId);
422 }
else if (
num.getLevels() > theSectorLevel) {
424 theGeometry.
add(etaPart);
434 gemChamber->add(etaPart);
437 theGeometry.
add(gemChamber);
440 buildRegions(theGeometry, superChambers, demonstratorGeometry);
445 auto solidA = solid.
solidA();
446 std::vector<double> dpar = solidA.dimensions();
448 double dy = k_ScaleFromDD4hep * dpar[3];
449 double dz = k_ScaleFromDD4hep * dpar[2];
450 double dx1 = k_ScaleFromDD4hep * dpar[0];
451 double dx2 = k_ScaleFromDD4hep * dpar[1];
453 auto solidB = solid.solidB();
454 dpar = solidB.dimensions();
456 const double chgap = 2.105;
458 dz += (k_ScaleFromDD4hep * dpar[2]);
462 bool isOdd = detId.
chamber() % 2;
471 auto solidA = solid.
solidA();
472 std::vector<double> dpar = solidA.dimensions();
474 double dy = k_ScaleFromDD4hep * dpar[3];
475 double dz = k_ScaleFromDD4hep * dpar[2];
476 double dx1 = k_ScaleFromDD4hep * dpar[0];
477 double dx2 = k_ScaleFromDD4hep * dpar[1];
479 auto solidB = solid.solidB();
480 dpar = solidB.dimensions();
482 dz += (k_ScaleFromDD4hep * dpar[2]);
484 bool isOdd = detId.
chamber() % 2;
495 auto nPads = fv.
get<
double>(
"nPads");
496 auto dPhi = fv.
get<
double>(
"dPhi");
503 const std::vector<float> pars{
float(k_ScaleFromDD4hep * dpar[0]),
504 float(k_ScaleFromDD4hep * dpar[1]),
505 float(k_ScaleFromDD4hep * dpar[3]),
510 bool isOdd = detId.
chamber() % 2;
514 k_ScaleFromDD4hep * dpar[0], k_ScaleFromDD4hep * dpar[1], k_ScaleFromDD4hep * dpar[3], ti),
527 bool isOddChamber)
const {
529 const Double_t* tran = fv.
trans();
531 k_ScaleFromDD4hep * tran[0], k_ScaleFromDD4hep * tran[1], k_ScaleFromDD4hep * tran[2]);
537 rota.GetComponents(
x, y, z);
559 const std::vector<GEMSuperChamber*>& superChambers,
560 bool demonstratorGeometry) {
562 for (
int re = -1; re <= 1; re = re + 2) {
571 bool foundSuperChamber =
false;
572 for (
int ri = 1; ri <= 1; ++ri) {
574 for (
auto superChamber : superChambers) {
575 const GEMDetId detId(superChamber->id());
576 if (detId.region() != re || detId.station() != st || detId.ring() != ri)
579 foundSuperChamber =
true;
584 GEMDetId chId(detId.region(), detId.ring(), detId.station(), la, detId.chamber(), 0);
588 if (!demonstratorGeometry
or 589 not(chId.region() == 1 and chId.station() == 2 and chId.chamber() == 16 and chId.layer() == 1)) {
596 ring->add(superChamber);
597 theGeometry.
add(superChamber);
599 edm::LogVerbatim(
"Geometry") <<
"Adding super chamber " << detId <<
" to ring: " 600 <<
"re " << re <<
" st " << st <<
" ri " << ri;
605 <<
"re " << re <<
" st " << st;
607 if (foundSuperChamber) {
612 if (!foundSuperChamber) {
614 edm::LogVerbatim(
"Geometry") <<
"No superchamber found: re:" << re <<
" st:" << st;
619 edm::LogVerbatim(
"Geometry") <<
"Adding station " << st <<
" to region " << re;
626 edm::LogVerbatim(
"Geometry") <<
"Adding region " << re <<
" to the geometry ";
int getValue(const std::string &name) const
Log< level::Info, true > LogVerbatim
DDSolid solidA(void) const
bool parent()
set the current node to the parent node ...
constexpr int station() const
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
bool nextSibling()
set the current node to the next sibling ...
GEMChamber * buildChamber(DDFilteredView &fv, GEMDetId detId) const
const Double_t * rot() const
The absolute rotation of the current node.
void buildRegions(GEMGeometry &, const std::vector< GEMSuperChamber *> &, bool demonstratorGeometry)
RCPBoundPlane boundPlane(const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
GEMEtaPartition * buildEtaPartition(DDFilteredView &fv, GEMDetId detId) const
std::string to_string(const V &value)
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
constexpr int layer() const
dd4hep::Solid solidA() const
Compact representation of the geometrical detector hierarchy.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
constexpr int chamber() const
static constexpr int32_t maxLayerId0
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
TkRotation & rotateAxes(const Basic3DVector< T > &newX, const Basic3DVector< T > &newY, const Basic3DVector< T > &newZ)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
std::string_view name() const
const Double_t * trans() const
The absolute translation of the current node.
static double delPhi(const double phi1, const double phi2)
const std::string & name() const
Returns the name.
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
GEMSuperChamber * buildSuperChamber(DDFilteredView &fv, GEMDetId detId) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static constexpr int32_t minStationId0
void build(GEMGeometry &theGeometry, const DDCompactView *cview, const MuonGeometryConstants &muonConstants)
static constexpr int32_t maxStationId
const int level() const
get Iterator level
DDSolid solidB(void) const
bool firstChild()
set the current node to the first child
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
T get(const std::string &)
extract attribute value
std::vector< const DDsvalues_type * > specifics() const
constexpr NumType convertMmToCm(NumType millimeters)
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
static constexpr int32_t maxLayerId
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
dd4hep::Solid solid() const
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
constexpr GEMDetId superChamberId() const
bool firstChild()
set the current node to the first child ...
int baseNumberToUnitNumber(const MuonBaseNumber &) const override
constexpr GEMDetId chamberId() const
Log< level::Warning, false > LogWarning
static char chambers[264][20]
const DDTranslation & translation() const
The absolute translation of the current node.
void add(const GEMEtaPartition *roll)
Add EtaPartition to the chamber which takes ownership.
const std::vector< double > parameters() const
extract shape parameters
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
static constexpr int32_t minLayerId
MuonBaseNumber geoHistoryToBaseNumber(const DDGeoHistory &history) const
const GEMChamber * chamber(GEMDetId id) const
void add(const GEMRegion *region)
Add a GEMRegion to the Geometry.
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.