|
|
#include <GEMGeometryParsFromDD.h>
|
void | buildChamber (cms::DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo) |
|
void | buildChamber (DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo) |
|
void | buildEtaPartition (cms::DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo) |
|
void | buildEtaPartition (DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo) |
|
void | buildGeometry (cms::DDFilteredView &fview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rgeo) |
|
void | buildGeometry (DDFilteredView &fview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rgeo) |
|
void | buildSuperChamber (cms::DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo) |
|
void | buildSuperChamber (DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo) |
|
std::vector< double > | getRotation (cms::DDFilteredView &fv) |
|
std::vector< double > | getRotation (DDFilteredView &fv) |
|
std::vector< double > | getTranslation (cms::DDFilteredView &fv) |
|
std::vector< double > | getTranslation (DDFilteredView &fv) |
|
Definition at line 28 of file GEMGeometryParsFromDD.h.
◆ GEMGeometryParsFromDD()
GEMGeometryParsFromDD::GEMGeometryParsFromDD |
( |
| ) |
|
◆ ~GEMGeometryParsFromDD()
GEMGeometryParsFromDD::~GEMGeometryParsFromDD |
( |
| ) |
|
◆ build() [1/2]
◆ build() [2/2]
◆ buildChamber() [1/2]
Definition at line 313 of file GEMGeometryParsFromDD.cc.
315 auto solidA = solid.
solidA();
316 std::vector<double> dpar = solidA.dimensions();
318 double dy = dpar[3] / dd4hep::mm;
319 double dz = dpar[2] / dd4hep::mm;
320 double dx1 = dpar[0] / dd4hep::mm;
321 double dx2 = dpar[1] / dd4hep::mm;
323 auto solidB = solid.solidB();
324 dpar = solidB.dimensions();
326 dz += (dpar[2] / dd4hep::mm);
331 std::vector<double> pars{dx1, dx2,
dy,
dz};
336 <<
"(4) DD4HEP, Chamber DetID " << gemid.
rawId() <<
" Name " <<
std::string(
name) <<
" dx1 " << dx1 <<
" dx2 "
337 << dx2 <<
" dy " <<
dy <<
" dz " <<
dz;
References GEMDetId::chamberId(), PVValHelper::dy, PVValHelper::dz, getRotation(), getTranslation(), RecoIdealGeometry::insert(), Skims_PA_cff::name, cms::DDFilteredView::name(), DetId::rawId(), cms::DDFilteredView::solid(), cms::DDSolid::solidA(), and AlCaHLTBitMon_QueryRunRegistry::string.
◆ buildChamber() [2/2]
Definition at line 134 of file GEMGeometryParsFromDD.cc.
142 double dx1 = dpar[4];
143 double dx2 = dpar[8];
149 std::vector<double> pars{dx1, dx2,
dy,
dz};
153 LogDebug(
"GEMGeometryParsFromDD") <<
"dimension dx1 " << dx1 <<
", dx2 " << dx2 <<
", dy " <<
dy <<
", dz " <<
dz;
156 <<
" dx2 " << dx2 <<
" dy " <<
dy <<
" dz " <<
dz;
References GEMDetId::chamberId(), PVValHelper::dy, PVValHelper::dz, getRotation(), getTranslation(), RecoIdealGeometry::insert(), LogDebug, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), DDSolid::parameters(), DetId::rawId(), DDLogicalPart::solid(), DDBooleanSolid::solidA(), and DDBooleanSolid::solidB().
Referenced by buildGeometry().
◆ buildEtaPartition() [1/2]
Definition at line 341 of file GEMGeometryParsFromDD.cc.
343 auto nPads = fv.
get<
double>(
"nPads");
344 auto dPhi = fv.
get<
double>(
"dPhi");
349 double dx1 = dpar[0] / dd4hep::mm;
350 double dx2 = dpar[1] / dd4hep::mm;
351 double dy = dpar[3] / dd4hep::mm;
352 double dz = dpar[2] / dd4hep::mm;
359 <<
"(5) DD4HEP, Eta Partion DetID " << detId.
rawId() <<
" Name " <<
std::string(
name) <<
" dx1 " << dx1 <<
" dx2 "
360 << dx2 <<
" dy " <<
dy <<
" dz " <<
dz <<
" nStrips " <<
nStrips <<
" nPads " << nPads <<
" dPhi " <<
dPhi;
References HLT_FULL_cff::dPhi, PVValHelper::dy, PVValHelper::dz, cms::DDFilteredView::get(), getRotation(), getTranslation(), RecoIdealGeometry::insert(), Skims_PA_cff::name, cms::DDFilteredView::name(), me0TriggerPseudoDigis_cff::nStrips, cms::DDFilteredView::parameters(), DetId::rawId(), and AlCaHLTBitMon_QueryRunRegistry::string.
◆ buildEtaPartition() [2/2]
Definition at line 160 of file GEMGeometryParsFromDD.cc.
165 DDValue numbOfStrips(
"nStrips");
170 for (
auto const& is :
specs) {
172 nStrips = numbOfStrips.doubles()[0];
174 nPads = numbOfPads.doubles()[0];
178 LogDebug(
"GEMGeometryParsFromDD") << ((
nStrips == 0.) ? (
"No nStrips found!!")
179 : (
"Number of strips: " + std::to_string(
nStrips)));
180 LogDebug(
"GEMGeometryParsFromDD") << ((nPads == 0.) ? (
"No nPads found!!")
181 : (
"Number of pads: " + std::to_string(nPads)));
188 double dx1 = dpar[4];
189 double dx2 = dpar[8];
195 LogDebug(
"GEMGeometryParsFromDD") <<
" dx1 " << dx1 <<
" dx2 " << dx2 <<
" dy " <<
dy <<
" dz " <<
dz <<
" nStrips "
196 <<
nStrips <<
" nPads " << nPads <<
" dPhi " <<
dPhi;
200 <<
" dx2 " << dx2 <<
" dy " <<
dy <<
" dz " <<
dz <<
" nStrips " <<
nStrips <<
" nPads " << nPads <<
" dPhi "
References DDfetch(), delPhi(), DDValue::doubles(), HLT_FULL_cff::dPhi, PVValHelper::dy, PVValHelper::dz, getRotation(), getTranslation(), RecoIdealGeometry::insert(), LogDebug, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), me0TriggerPseudoDigis_cff::nStrips, DDSolid::parameters(), DetId::rawId(), DDLogicalPart::solid(), DDFilteredView::specifics(), and HistogramManager_cfi::specs.
Referenced by buildGeometry().
◆ buildGeometry() [1/2]
Definition at line 236 of file GEMGeometryParsFromDD.cc.
239 edm::LogVerbatim(
"GEMGeometryParsFromDD") <<
"(0) GEMGeometryParsFromDD - DD4HEP ";
243 static constexpr uint32_t levelChamb = 7;
245 int theLevelPart = muonConstants.
getValue(
"level");
246 int theRingLevel = muonConstants.
getValue(
"mg_ring") / theLevelPart;
247 int theSectorLevel = muonConstants.
getValue(
"mg_sector") / theLevelPart;
249 while (fv.firstChild()) {
250 const auto& history = fv.history();
252 GEMDetId detId(gemNum.baseNumberToUnitNumber(
num));
255 if (
num.getLevels() == theRingLevel) {
256 if (detId.region() !=
region) {
261 detId =
GEMDetId(detId.region(), detId.ring(), detId.station(), detId.layer(), chamb, 0);
263 }
else if (
num.getLevels() == theSectorLevel) {
269 if (fv.level() == levelChamb) {
270 if (detId.layer() == 1) {
274 }
else if (
num.getLevels() > theSectorLevel) {
References GEMNumberingScheme::baseNumberToUnitNumber(), buildChamber(), buildEtaPartition(), buildSuperChamber(), cms::DDFilteredView::firstChild(), MuonGeometryNumbering::geoHistoryToBaseNumber(), MuonGeometryConstants::getValue(), cms::DDFilteredView::history(), cms::DDFilteredView::level(), GEMDetId::minStationId0, EgammaValidation_cff::num, and HLT_FULL_cff::region.
◆ buildGeometry() [2/2]
Definition at line 50 of file GEMGeometryParsFromDD.cc.
53 LogDebug(
"GEMGeometryParsFromDD") <<
"Building the geometry service";
54 LogDebug(
"GEMGeometryParsFromDD") <<
"About to run through the GEM structure\n"
55 <<
" First logical part " << fv.logicalPart().name().name();
57 edm::LogVerbatim(
"GEMGeometryParsFromDD") <<
"(0) GEMGeometryParsFromDD - DDD ";
61 bool doSuper = fv.firstChild();
63 LogDebug(
"GEMGeometryParsFromDD") <<
"doSuperChamber = " << doSuper;
70 GEMDetId(gemNumbering.baseNumberToUnitNumber(muonDDDNumbering.geoHistoryToBaseNumber(fv.geoHistory())));
78 if (detIdCh.
layer() == 1) {
85 bool doChambers = fv.firstChild();
88 bool doEtaPart = fv.firstChild();
91 GEMDetId(gemNumbering.baseNumberToUnitNumber(muonDDDNumbering.geoHistoryToBaseNumber(fv.geoHistory())));
94 doEtaPart = fv.nextSibling();
97 doChambers = fv.nextSibling();
100 doSuper = fv.nextSibling();
References GEMNumberingScheme::baseNumberToUnitNumber(), buildChamber(), buildEtaPartition(), buildSuperChamber(), DDFilteredView::firstChild(), DDFilteredView::geoHistory(), MuonGeometryNumbering::geoHistoryToBaseNumber(), GEMDetId::layer(), LogDebug, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), DDFilteredView::nextSibling(), and DDFilteredView::parent().
Referenced by build().
◆ buildSuperChamber() [1/2]
Definition at line 281 of file GEMGeometryParsFromDD.cc.
283 auto solidA = solid.
solidA();
284 std::vector<double> dpar = solidA.dimensions();
286 double dy = dpar[3] / dd4hep::mm;
287 double dz = dpar[2] / dd4hep::mm;
288 double dx1 = dpar[0] / dd4hep::mm;
289 double dx2 = dpar[1] / dd4hep::mm;
291 auto solidB = solid.solidB();
292 dpar = solidB.dimensions();
294 const double chgap = 2.105;
299 dz += (dpar[2] / dd4hep::mm);
303 std::vector<double> pars{dx1, dx2,
dy,
dz};
308 <<
"(3) DD4HEP, SuperChamber DetID " << gemid.
rawId() <<
" Name " <<
std::string(
name) <<
" dx1 " << dx1
309 <<
" dx2 " << dx2 <<
" dy " <<
dy <<
" dz " <<
dz;
References PVValHelper::dy, PVValHelper::dz, getRotation(), getTranslation(), RecoIdealGeometry::insert(), Skims_PA_cff::name, cms::DDFilteredView::name(), DetId::rawId(), cms::DDFilteredView::solid(), cms::DDSolid::solidA(), AlCaHLTBitMon_QueryRunRegistry::string, and GEMDetId::superChamberId().
◆ buildSuperChamber() [2/2]
Definition at line 104 of file GEMGeometryParsFromDD.cc.
115 double dx1 = dpar[4];
116 double dx2 = dpar[8];
123 std::vector<double> pars{dx1, dx2,
dy,
dz};
127 LogDebug(
"GEMGeometryParsFromDD") <<
"dimension dx1 " << dx1 <<
", dx2 " << dx2 <<
", dy " <<
dy <<
", dz " <<
dz;
130 <<
" dx2 " << dx2 <<
" dy " <<
dy <<
" dz " <<
dz;
References PVValHelper::dy, PVValHelper::dz, getRotation(), getTranslation(), RecoIdealGeometry::insert(), LogDebug, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), DDSolid::parameters(), DetId::rawId(), DDLogicalPart::solid(), DDBooleanSolid::solidA(), DDBooleanSolid::solidB(), and GEMDetId::superChamberId().
Referenced by buildGeometry().
◆ getRotation() [1/2]
Definition at line 375 of file GEMGeometryParsFromDD.cc.
379 rota.GetComponents(
x,
y,
z);
380 const std::vector<double>
rot = {
x.X(),
x.Y(),
x.Z(),
y.X(),
y.Y(),
y.Z(),
z.X(),
z.Y(),
z.Z()};
382 <<
"(2) DD4HEP, rot matrix " <<
rot[0] <<
" " <<
rot[1] <<
" " <<
rot[2] <<
" " <<
rot[3] <<
" " <<
rot[4]
383 <<
" " <<
rot[5] <<
" " <<
rot[6] <<
" " <<
rot[7] <<
" " <<
rot[8];
References cms::DDFilteredView::rot(), makeMuonMisalignmentScenario::rot, x, y, and z.
◆ getRotation() [2/2]
std::vector< double > GEMGeometryParsFromDD::getRotation |
( |
DDFilteredView & |
fv | ) |
|
|
private |
Definition at line 212 of file GEMGeometryParsFromDD.cc.
215 rota.GetComponents(
x,
y,
z);
217 <<
"(2) DDD, rot matrix " <<
x.X() <<
" " <<
x.Y() <<
" " <<
x.Z() <<
" " <<
y.X() <<
" " <<
y.Y() <<
" "
218 <<
y.Z() <<
" " <<
z.X() <<
" " <<
z.Y() <<
" " <<
z.Z();
219 return {
x.X(),
x.Y(),
x.Z(),
y.X(),
y.Y(),
y.Z(),
z.X(),
z.Y(),
z.Z()};
References DDFilteredView::rotation(), x, y, and z.
Referenced by buildChamber(), buildEtaPartition(), and buildSuperChamber().
◆ getTranslation() [1/2]
◆ getTranslation() [2/2]
std::vector< double > GEMGeometryParsFromDD::getTranslation |
( |
DDFilteredView & |
fv | ) |
|
|
private |
const Double_t * rot() const
The absolute rotation of the current node.
DDSolid solidB(void) const
const std::vector< double > parameters() const
extract shape parameters
constexpr int layer() const
std::vector< double > getRotation(DDFilteredView &fv)
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
constexpr GEMDetId superChamberId() const
dd4hep::Solid solidA() const
std::string_view name() const
const Translation translation() const
T get(const std::string &)
extract attribute value
dd4hep::Solid solid() const
void buildSuperChamber(DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo)
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 double delPhi(const double phi1, const double phi2)
const std::string & name() const
Returns the name.
int getValue(const std::string &name) 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...
void buildEtaPartition(DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo)
constexpr uint32_t rawId() const
get the raw id
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
void buildChamber(DDFilteredView &fv, GEMDetId detId, RecoIdealGeometry &rgeo)
Log< level::Info, true > LogVerbatim
const DDTranslation & translation() const
The absolute translation of the current node.
constexpr GEMDetId chamberId() const
std::vector< double > getTranslation(DDFilteredView &fv)
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
void buildGeometry(DDFilteredView &fview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rgeo)
DDSolid solidA(void) const
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.