|
|
#include <GEMGeometryBuilder.h>
|
RCPBoundPlane | boundPlane (const cms::DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const |
|
RCPBoundPlane | boundPlane (const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const |
|
GEMChamber * | buildChamber (cms::DDFilteredView &fv, GEMDetId detId) const |
|
GEMChamber * | buildChamber (DDFilteredView &fv, GEMDetId detId) const |
|
GEMEtaPartition * | buildEtaPartition (cms::DDFilteredView &fv, GEMDetId detId) const |
|
GEMEtaPartition * | buildEtaPartition (DDFilteredView &fv, GEMDetId detId) const |
|
void | buildRegions (GEMGeometry &, const std::vector< GEMSuperChamber * > &) |
|
GEMSuperChamber * | buildSuperChamber (cms::DDFilteredView &fv, GEMDetId detId) const |
|
GEMSuperChamber * | buildSuperChamber (DDFilteredView &fv, GEMDetId detId) const |
|
Definition at line 33 of file GEMGeometryBuilder.h.
◆ RCPBoundPlane
◆ GEMGeometryBuilder()
GEMGeometryBuilder::GEMGeometryBuilder |
( |
| ) |
|
◆ ~GEMGeometryBuilder()
GEMGeometryBuilder::~GEMGeometryBuilder |
( |
| ) |
|
◆ boundPlane() [1/2]
◆ boundPlane() [2/2]
◆ build() [1/2]
Definition at line 306 of file GEMGeometryBuilder.cc.
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;
324 while (fv.firstChild()) {
325 const auto& history = fv.history();
327 GEMDetId detId(gemNum.baseNumberToUnitNumber(
num));
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) {
353 theGeometry.
add(etaPart);
356 if (fv.level() == levelChamb) {
357 if (detId.layer() == 1) {
359 superChambers.emplace_back(gemSuperChamber);
363 }
else if (
num.getLevels() > theSectorLevel) {
365 theGeometry.
add(etaPart);
375 gemChamber->
add(etaPart);
378 theGeometry.
add(gemChamber);
References GEMGeometry::add(), GEMNumberingScheme::baseNumberToUnitNumber(), GEMDetId::chamberIdMask, chambers, TauDecayModes::dec, GEMGeometry::etaPartitions(), ALCARECOTkAlBeamHalo_cff::filter, cms::DDFilteredView::firstChild(), MuonGeometryNumbering::geoHistoryToBaseNumber(), MuonGeometryConstants::getValue(), cms::DDFilteredView::history(), dqmdumpme::k, cms::DDFilteredView::level(), GEMDetId::minStationId0, cms::DDFilteredView::name(), EgammaValidation_cff::num, HLT_FULL_cff::region, and AlCaHLTBitMon_QueryRunRegistry::string.
◆ build() [2/2]
Definition at line 45 of file GEMGeometryBuilder.cc.
58 <<
" First logical part " << fv.logicalPart().name().name();
60 bool doSuper = fv.firstChild();
66 edm::LogVerbatim(
"Geometry") <<
"doSuperChamber = " << doSuper <<
" with " << fv.geoHistory() <<
" Levels "
67 << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
71 std::vector<GEMSuperChamber*> superChambers;
78 edm::LogVerbatim(
"Geometry") <<
"MuonGeometry 1 " << fv.geoHistory() <<
" Levels "
79 << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
81 int rawidCh = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
89 edm::LogVerbatim(
"Geometry") <<
"MuonGeometry 2 " << fv.geoHistory() <<
" Levels "
90 << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
91 gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
96 if (detIdCh.
layer() == 1) {
98 superChambers.push_back(gemSuperChamber);
104 bool doChambers = fv.firstChild();
105 bool loopExecuted =
false;
112 int rawId = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
116 edm::LogVerbatim(
"Geometry") <<
"MuonGeometry 3 " << fv.geoHistory() <<
" Levels "
117 << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
118 gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
124 bool doEtaPart = fv.firstChild();
128 edm::LogVerbatim(
"Geometry") <<
"MuonGeometry 4 " << fv.geoHistory() <<
" Levels "
129 << mdddnum.geoHistoryToBaseNumber(fv.geoHistory()).getLevels();
131 int rawid = gemNum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
134 gemChamber->
add(etaPart);
135 theGeometry.
add(etaPart);
136 doEtaPart = fv.nextSibling();
141 theGeometry.
add(gemChamber);
143 doChambers = fv.nextSibling();
147 doSuper = fv.nextSibling();
References GEMChamber::add(), GEMGeometry::add(), GEMNumberingScheme::baseNumberToUnitNumber(), ALCARECOTkAlBeamHalo_cff::filter, DDFilteredView::firstChild(), DDFilteredView::geoHistory(), MuonGeometryNumbering::geoHistoryToBaseNumber(), GEMDetId::layer(), DDFilteredView::logicalPart(), GEMDetId::minStationId0, DDName::name(), DDBase< N, C >::name(), DDFilteredView::nextSibling(), DDFilteredView::parent(), GEMDetId::station(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by GEMGeometryESModule::produce().
◆ buildChamber() [1/2]
◆ buildChamber() [2/2]
Definition at line 191 of file GEMGeometryBuilder.cc.
References relativeConstraints::chamber, GEMDetId::chamber(), GEMDetId::chamberId(), geant_units::operators::convertMmToCm(), PVValHelper::dy, PVValHelper::dz, funct::false, DDFilteredView::logicalPart(), GEMDetId::minStationId0, DDName::name(), DDBase< N, C >::name(), DDSolid::parameters(), DDLogicalPart::solid(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), and GEMDetId::station().
◆ buildEtaPartition() [1/2]
◆ buildEtaPartition() [2/2]
Definition at line 220 of file GEMGeometryBuilder.cc.
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))
233 nStrips = numbOfStrips.doubles()[0];
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;
References cms::cuda::be, GEMDetId::chamber(), geant_units::operators::convertMmToCm(), DDfetch(), delPhi(), DDValue::doubles(), HLT_FULL_cff::dPhi, GeomDetEnumerators::GEM, 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.
◆ buildRegions()
Definition at line 499 of file GEMGeometryBuilder.cc.
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 ";
References GEMGeometry::add(), relativeConstraints::chamber, GEMGeometry::chamber(), GEMDetId::maxLayerId, GEMDetId::maxLayerId0, GEMDetId::maxStationId, GEMDetId::minLayerId, GEMDetId::minStationId0, Skims_PA_cff::name, nlayers, HLT_FULL_cff::region, relativeConstraints::ring, Validation_hcalonly_cfi::sign, relativeConstraints::station, AlCaHLTBitMon_QueryRunRegistry::string, and createPayload::suffix.
◆ buildSuperChamber() [1/2]
◆ buildSuperChamber() [2/2]
Definition at line 157 of file GEMGeometryBuilder.cc.
172 const double chgap = 2.105;
181 bool isOdd = detId.
chamber() % 2;
References GEMDetId::chamber(), geant_units::operators::convertMmToCm(), PVValHelper::dy, PVValHelper::dz, DDFilteredView::logicalPart(), GEMDetId::minStationId0, DDName::name(), DDBase< N, C >::name(), DDSolid::parameters(), DDLogicalPart::solid(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), GEMDetId::station(), and GEMDetId::superChamberId().
◆ chids
◆ k_ScaleFromDD4Hep
constexpr double GEMGeometryBuilder::k_ScaleFromDD4Hep = (1.0 / dd4hep::cm) |
|
staticconstexprprivate |
RCPBoundPlane boundPlane(const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
const Double_t * rot() const
The absolute rotation of the current node.
DDSolid solidB(void) const
void add(const GEMRegion *region)
Add a GEMRegion to the Geometry.
void buildRegions(GEMGeometry &, const std::vector< GEMSuperChamber * > &)
const std::vector< double > parameters() const
extract shape parameters
constexpr int layer() const
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
constexpr GEMDetId superChamberId() const
static constexpr int32_t maxStationId
static constexpr int32_t minLayerId
Log< level::Warning, false > LogWarning
dd4hep::Solid solidA() const
std::string_view name() const
T get(const std::string &)
extract attribute value
dd4hep::Solid solid() const
GEMChamber * buildChamber(DDFilteredView &fv, GEMDetId detId) const
const Double_t * trans() const
The absolute translation of the current node.
void add(const GEMEtaPartition *roll)
Add EtaPartition to the chamber which takes ownership.
GEMEtaPartition * buildEtaPartition(DDFilteredView &fv, GEMDetId detId) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
static constexpr int32_t minStationId0
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
static constexpr uint32_t chamberIdMask
constexpr int chamber() const
static constexpr int32_t maxLayerId0
static double delPhi(const double phi1, const double phi2)
ReferenceCountingPointer< BoundPlane > RCPBoundPlane
const std::string & name() const
Returns the name.
static char chambers[264][20]
int getValue(const std::string &name) const
GEMSuperChamber * buildSuperChamber(DDFilteredView &fv, GEMDetId detId) const
std::vector< const DDsvalues_type * > specifics() const
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
constexpr uint32_t rawId() const
get the raw id
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
Log< level::Info, true > LogVerbatim
const DDTranslation & translation() const
The absolute translation of the current node.
static constexpr int32_t maxLayerId
constexpr GEMDetId chamberId() const
static constexpr double k_ScaleFromDD4Hep
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
const std::vector< const GEMEtaPartition * > & etaPartitions() const
Return a vector of all GEM eta partitions.
DDSolid solidA(void) const
constexpr NumType convertMmToCm(NumType millimeters)
constexpr int station() const
GEMDetId id() const
Return the GEMDetId of this chamber.
const GEMChamber * chamber(GEMDetId id) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.