CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
ME0GeometryParsFromDD Class Reference

#include <ME0GeometryParsFromDD.h>

Public Member Functions

void build (const DDCompactView *, const MuonGeometryConstants &, RecoIdealGeometry &)
 
void build (const cms::DDCompactView *, const MuonGeometryConstants &, RecoIdealGeometry &)
 
 ME0GeometryParsFromDD (void)
 
 ~ME0GeometryParsFromDD (void)
 

Private Member Functions

void buildChamber (DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
 
void buildChamber (cms::DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
 
void buildEtaPartition (DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
 
void buildEtaPartition (cms::DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
 
void buildGeometry (DDFilteredView &, const MuonGeometryConstants &, RecoIdealGeometry &)
 
void buildGeometry (cms::DDFilteredView &, const MuonGeometryConstants &, RecoIdealGeometry &)
 
void buildLayer (DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
 
void buildLayer (cms::DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
 
std::vector< double > getDimension (DDFilteredView &fv)
 
std::vector< double > getDimension (cms::DDFilteredView &fv)
 
std::vector< double > getRotation (DDFilteredView &fv)
 
std::vector< double > getRotation (cms::DDFilteredView &fv)
 
std::vector< double > getTranslation (DDFilteredView &fv)
 
std::vector< double > getTranslation (cms::DDFilteredView &fv)
 

Detailed Description

Definition at line 25 of file ME0GeometryParsFromDD.h.

Constructor & Destructor Documentation

◆ ME0GeometryParsFromDD()

ME0GeometryParsFromDD::ME0GeometryParsFromDD ( void  )
inline

Definition at line 27 of file ME0GeometryParsFromDD.h.

27 {}

◆ ~ME0GeometryParsFromDD()

ME0GeometryParsFromDD::~ME0GeometryParsFromDD ( void  )
inline

Definition at line 29 of file ME0GeometryParsFromDD.h.

29 {}

Member Function Documentation

◆ build() [1/2]

void ME0GeometryParsFromDD::build ( const DDCompactView cview,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rgeo 
)

Definition at line 29 of file ME0GeometryParsFromDD.cc.

References buildGeometry(), ALCARECOTkAlBeamHalo_cff::filter, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ME0RecoIdealDBLoader::beginRun().

31  {
32  std::string attribute = "MuStructure";
33  std::string value = "MuonEndCapME0";
34 
35  // Asking only for the MuonME0's
37  DDFilteredView fview(*cview, filter);
38 
39  this->buildGeometry(fview, muonConstants, rgeo);
40 }
Definition: value.py:1
void buildGeometry(DDFilteredView &, const MuonGeometryConstants &, RecoIdealGeometry &)

◆ build() [2/2]

void ME0GeometryParsFromDD::build ( const cms::DDCompactView cview,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rgeo 
)

Definition at line 186 of file ME0GeometryParsFromDD.cc.

References buildGeometry(), ALCARECOTkAlBeamHalo_cff::filter, and AlCaHLTBitMon_QueryRunRegistry::string.

188  {
189  std::string attribute = "MuStructure";
190  std::string value = "MuonEndCapME0";
191  const cms::DDFilter filter(attribute, value);
192  cms::DDFilteredView fview(*cview, filter);
193  this->buildGeometry(fview, muonConstants, rgeo);
194 }
Definition: value.py:1
void buildGeometry(DDFilteredView &, const MuonGeometryConstants &, RecoIdealGeometry &)

◆ buildChamber() [1/2]

void ME0GeometryParsFromDD::buildChamber ( DDFilteredView fv,
ME0DetId  detId,
RecoIdealGeometry rgeo 
)
private

Definition at line 97 of file ME0GeometryParsFromDD.cc.

References hcalRecHitTable_cff::detId, getDimension(), getRotation(), getTranslation(), RecoIdealGeometry::insert(), LogDebug, DDFilteredView::logicalPart(), DDName::name(), and DDBase< N, C >::name().

Referenced by buildGeometry().

97  {
98  LogDebug("ME0GeometryParsFromDD") << "buildChamber " << fv.logicalPart().name().name() << " " << detId << std::endl;
99 
100  std::vector<double> pars = getDimension(fv);
101  std::vector<double> vtra = getTranslation(fv);
102  std::vector<double> vrot = getRotation(fv);
103  edm::LogVerbatim("ME0GeometryParsFromDD")
104  << "(4) DDD, Chamber DetID " << detId.chamberId().rawId() << " Name " << fv.logicalPart().name().name();
105 
106  rgeo.insert(detId.chamberId().rawId(), vtra, vrot, pars, {fv.logicalPart().name().name()});
107 }
Log< level::Info, true > LogVerbatim
std::vector< double > getDimension(DDFilteredView &fv)
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
std::vector< double > getRotation(DDFilteredView &fv)
const N & name() const
Definition: DDBase.h:59
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
std::vector< double > getTranslation(DDFilteredView &fv)
#define LogDebug(id)

◆ buildChamber() [2/2]

void ME0GeometryParsFromDD::buildChamber ( cms::DDFilteredView fv,
ME0DetId  detId,
RecoIdealGeometry rgeo 
)
private

Definition at line 224 of file ME0GeometryParsFromDD.cc.

References hcalRecHitTable_cff::detId, getDimension(), getRotation(), getTranslation(), RecoIdealGeometry::insert(), Skims_PA_cff::name, cms::DDFilteredView::name(), and AlCaHLTBitMon_QueryRunRegistry::string.

224  {
225  std::string_view name = fv.name();
226  std::vector<double> pars = getDimension(fv);
227  std::vector<double> vtra = getTranslation(fv);
228  std::vector<double> vrot = getRotation(fv);
229 
230  edm::LogVerbatim("ME0GeometryParsFromDD")
231  << "(4) DD4hep, Chamber DetID " << detId.chamberId().rawId() << " Name " << std::string(name);
232 
233  rgeo.insert(detId.chamberId().rawId(), vtra, vrot, pars, {std::string(name)});
234 }
Log< level::Info, true > LogVerbatim
std::vector< double > getDimension(DDFilteredView &fv)
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
std::string_view name() const
std::vector< double > getRotation(DDFilteredView &fv)
std::vector< double > getTranslation(DDFilteredView &fv)

◆ buildEtaPartition() [1/2]

void ME0GeometryParsFromDD::buildEtaPartition ( DDFilteredView fv,
ME0DetId  detId,
RecoIdealGeometry rgeo 
)
private

Definition at line 121 of file ME0GeometryParsFromDD.cc.

References DDfetch(), hcalRecHitTable_cff::detId, DDValue::doubles(), getDimension(), getRotation(), getTranslation(), RecoIdealGeometry::insert(), LogDebug, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), me0TriggerPseudoDigis_cff::nStrips, DDFilteredView::specifics(), HistogramManager_cfi::specs, and to_string().

Referenced by buildGeometry().

121  {
122  LogDebug("ME0GeometryParsFromDD") << "buildEtaPartition " << fv.logicalPart().name().name() << " " << detId
123  << std::endl;
124 
125  // EtaPartition specific parameter (nstrips and npads)
126  DDValue numbOfStrips("nStrips");
127  DDValue numbOfPads("nPads");
128  const std::vector<const DDsvalues_type*>& specs = fv.specifics();
129  double nStrips = 0., nPads = 0.;
130  for (auto const& is : specs) {
131  if (DDfetch(is, numbOfStrips))
132  nStrips = numbOfStrips.doubles()[0];
133  if (DDfetch(is, numbOfPads))
134  nPads = numbOfPads.doubles()[0];
135  }
136  LogDebug("ME0GeometryParsFromDD") << ((nStrips == 0.) ? ("No nStrips found!!")
137  : ("Number of strips: " + std::to_string(nStrips)));
138  LogDebug("ME0GeometryParsFromDD") << ((nPads == 0.) ? ("No nPads found!!")
139  : ("Number of pads: " + std::to_string(nPads)));
140 
141  std::vector<double> pars = getDimension(fv);
142  pars.emplace_back(nStrips);
143  pars.emplace_back(nPads);
144  std::vector<double> vtra = getTranslation(fv);
145  std::vector<double> vrot = getRotation(fv);
146 
147  edm::LogVerbatim("ME0GeometryParsFromDD")
148  << "(6) DDD, Eta Partion DetID " << detId.rawId() << " Name " << fv.logicalPart().name().name() << " nStrips "
149  << nStrips << " nPads " << nPads;
150 
151  rgeo.insert(detId.rawId(), vtra, vrot, pars, {fv.logicalPart().name().name()});
152 }
Log< level::Info, true > LogVerbatim
std::vector< double > getDimension(DDFilteredView &fv)
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
static std::string to_string(const XMLCh *ch)
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
std::vector< double > getRotation(DDFilteredView &fv)
const N & name() const
Definition: DDBase.h:59
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
std::vector< const DDsvalues_type * > specifics() const
std::vector< double > getTranslation(DDFilteredView &fv)
#define LogDebug(id)

◆ buildEtaPartition() [2/2]

void ME0GeometryParsFromDD::buildEtaPartition ( cms::DDFilteredView fv,
ME0DetId  detId,
RecoIdealGeometry rgeo 
)
private

Definition at line 247 of file ME0GeometryParsFromDD.cc.

References hcalRecHitTable_cff::detId, cms::DDFilteredView::get(), getDimension(), getRotation(), getTranslation(), RecoIdealGeometry::insert(), Skims_PA_cff::name, cms::DDFilteredView::name(), me0TriggerPseudoDigis_cff::nStrips, and AlCaHLTBitMon_QueryRunRegistry::string.

247  {
248  auto nStrips = fv.get<double>("nStrips");
249  auto nPads = fv.get<double>("nPads");
250  std::string_view name = fv.name();
251  std::vector<double> pars = getDimension(fv);
252  pars.emplace_back(nStrips);
253  pars.emplace_back(nPads);
254  std::vector<double> vtra = getTranslation(fv);
255  std::vector<double> vrot = getRotation(fv);
256 
257  edm::LogVerbatim("ME0GeometryParsFromDD") << "(6) DD4hep, Eta Partion DetID " << detId.rawId() << " Name "
258  << std::string(name) << " nStrips " << nStrips << " nPads " << nPads;
259 
260  rgeo.insert(detId.rawId(), vtra, vrot, pars, {std::string(name)});
261 }
Log< level::Info, true > LogVerbatim
std::vector< double > getDimension(DDFilteredView &fv)
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
std::string_view name() const
std::vector< double > getRotation(DDFilteredView &fv)
T get(const std::string &)
extract attribute value
std::vector< double > getTranslation(DDFilteredView &fv)

◆ buildGeometry() [1/2]

void ME0GeometryParsFromDD::buildGeometry ( DDFilteredView fv,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rgeo 
)
private

Definition at line 42 of file ME0GeometryParsFromDD.cc.

References ME0NumberingScheme::baseNumberToUnitNumber(), buildChamber(), buildEtaPartition(), buildLayer(), hcalRecHitTable_cff::detId, DDFilteredView::firstChild(), DDFilteredView::geoHistory(), MuonGeometryNumbering::geoHistoryToBaseNumber(), LogDebug, DDFilteredView::logicalPart(), DDName::name(), DDBase< N, C >::name(), DDFilteredView::nextSibling(), and DDFilteredView::parent().

Referenced by build().

44  {
45  LogDebug("ME0GeometryParsFromDD") << "Building the geometry service";
46  LogDebug("ME0GeometryParsFromDD") << "About to run through the ME0 structure\n"
47  << " First logical part " << fv.logicalPart().name().name();
48 
49  edm::LogVerbatim("ME0GeometryParsFromDD") << "(0) ME0GeometryParsFromDD - DDD ";
50  MuonGeometryNumbering muonDDDNumbering(muonConstants);
51  ME0NumberingScheme me0Numbering(muonConstants);
52 
53  bool doChambers = fv.firstChild();
54  LogDebug("ME0GeometryParsFromDD") << "doChamber = " << doChambers;
55  // loop over superchambers
56  while (doChambers) {
57  // getting chamber id from eta partitions
58  fv.firstChild();
59  fv.firstChild();
60  ME0DetId detIdCh =
61  ME0DetId(me0Numbering.baseNumberToUnitNumber(muonDDDNumbering.geoHistoryToBaseNumber(fv.geoHistory())));
62  // back to chambers
63  fv.parent();
64  fv.parent();
65 
66  buildChamber(fv, detIdCh, rgeo);
67 
68  // loop over chambers
69  // only 1 chamber
70  bool doLayers = fv.firstChild();
71  while (doLayers) {
72  // get layer ID
73  fv.firstChild();
74  ME0DetId detIdLa =
75  ME0DetId(me0Numbering.baseNumberToUnitNumber(muonDDDNumbering.geoHistoryToBaseNumber(fv.geoHistory())));
76  fv.parent();
77  // build layer
78  buildLayer(fv, detIdLa, rgeo);
79 
80  // loop over ME0EtaPartitions
81  bool doEtaPart = fv.firstChild();
82  while (doEtaPart) {
83  ME0DetId detId =
84  ME0DetId(me0Numbering.baseNumberToUnitNumber(muonDDDNumbering.geoHistoryToBaseNumber(fv.geoHistory())));
85  buildEtaPartition(fv, detId, rgeo);
86 
87  doEtaPart = fv.nextSibling();
88  }
89  fv.parent();
90  doLayers = fv.nextSibling();
91  }
92  fv.parent();
93  doChambers = fv.nextSibling();
94  }
95 }
Log< level::Info, true > LogVerbatim
bool parent()
set the current node to the parent node ...
void buildEtaPartition(DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
bool nextSibling()
set the current node to the next sibling ...
void buildChamber(DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
const N & name() const
Definition: DDBase.h:59
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
bool firstChild()
set the current node to the first child ...
void buildLayer(DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
#define LogDebug(id)

◆ buildGeometry() [2/2]

void ME0GeometryParsFromDD::buildGeometry ( cms::DDFilteredView fv,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rgeo 
)
private

Definition at line 196 of file ME0GeometryParsFromDD.cc.

References ME0NumberingScheme::baseNumberToUnitNumber(), buildChamber(), buildEtaPartition(), buildLayer(), ALPAKA_ACCELERATOR_NAMESPACE::brokenline::constexpr(), hcalRecHitTable_cff::detId, cms::DDFilteredView::firstChild(), MuonGeometryNumbering::geoHistoryToBaseNumber(), MuonGeometryConstants::getValue(), cms::DDFilteredView::history(), cms::DDFilteredView::level(), and EgammaValidation_cff::num.

198  {
199  edm::LogVerbatim("ME0GeometryParsFromDD") << "(0) ME0GeometryParsFromDD - DD4hep ";
200 
201  MuonGeometryNumbering mdddnum(muonConstants);
202  ME0NumberingScheme me0Num(muonConstants);
203 
204  static constexpr uint32_t levelChamber = 7;
205  static constexpr uint32_t levelLayer = 8;
206  uint32_t theLevelPart = muonConstants.getValue("level");
207  uint32_t theSectorLevel = muonConstants.getValue("m0_sector") / theLevelPart;
208 
209  while (fv.firstChild()) {
210  const auto& history = fv.history();
211  MuonBaseNumber num(mdddnum.geoHistoryToBaseNumber(history));
212  ME0DetId detId(me0Num.baseNumberToUnitNumber(num));
213 
214  if (fv.level() == levelChamber) {
215  buildChamber(fv, detId, rgeo);
216  } else if (fv.level() == levelLayer) {
217  buildLayer(fv, detId, rgeo);
218  } else if (history.tags.size() > theSectorLevel) {
219  buildEtaPartition(fv, detId, rgeo);
220  }
221  } // end while
222 } // end buildGeometry
int getValue(const std::string &name) const
Log< level::Info, true > LogVerbatim
void buildEtaPartition(DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
void buildChamber(DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)
const ExpandedNodes & history()
The numbering history of the current node.
const int level() const
get Iterator level
bool firstChild()
set the current node to the first child
void buildLayer(DDFilteredView &fv, ME0DetId detId, RecoIdealGeometry &rgeo)

◆ buildLayer() [1/2]

void ME0GeometryParsFromDD::buildLayer ( DDFilteredView fv,
ME0DetId  detId,
RecoIdealGeometry rgeo 
)
private

Definition at line 109 of file ME0GeometryParsFromDD.cc.

References hcalRecHitTable_cff::detId, getDimension(), getRotation(), getTranslation(), RecoIdealGeometry::insert(), LogDebug, DDFilteredView::logicalPart(), DDName::name(), and DDBase< N, C >::name().

Referenced by buildGeometry().

109  {
110  LogDebug("ME0GeometryParsFromDD") << "buildLayer " << fv.logicalPart().name().name() << " " << detId << std::endl;
111 
112  std::vector<double> pars = getDimension(fv);
113  std::vector<double> vtra = getTranslation(fv);
114  std::vector<double> vrot = getRotation(fv);
115 
116  edm::LogVerbatim("ME0GeometryParsFromDD")
117  << "(5) DDD, Layer DetID " << detId.layerId().rawId() << " Name " << fv.logicalPart().name().name();
118  rgeo.insert(detId.layerId().rawId(), vtra, vrot, pars, {fv.logicalPart().name().name()});
119 }
Log< level::Info, true > LogVerbatim
std::vector< double > getDimension(DDFilteredView &fv)
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const std::string & name() const
Returns the name.
Definition: DDName.cc:41
std::vector< double > getRotation(DDFilteredView &fv)
const N & name() const
Definition: DDBase.h:59
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
std::vector< double > getTranslation(DDFilteredView &fv)
#define LogDebug(id)

◆ buildLayer() [2/2]

void ME0GeometryParsFromDD::buildLayer ( cms::DDFilteredView fv,
ME0DetId  detId,
RecoIdealGeometry rgeo 
)
private

Definition at line 236 of file ME0GeometryParsFromDD.cc.

References hcalRecHitTable_cff::detId, getDimension(), getRotation(), getTranslation(), RecoIdealGeometry::insert(), Skims_PA_cff::name, cms::DDFilteredView::name(), and AlCaHLTBitMon_QueryRunRegistry::string.

236  {
237  std::string_view name = fv.name();
238  std::vector<double> pars = getDimension(fv);
239  std::vector<double> vtra = getTranslation(fv);
240  std::vector<double> vrot = getRotation(fv);
241 
242  edm::LogVerbatim("ME0GeometryParsFromDD")
243  << "(5) DD4hep, Layer DetID " << detId.layerId().rawId() << " Name " << std::string(name);
244  rgeo.insert(detId.layerId().rawId(), vtra, vrot, pars, {std::string(name)});
245 }
Log< level::Info, true > LogVerbatim
std::vector< double > getDimension(DDFilteredView &fv)
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
std::string_view name() const
std::vector< double > getRotation(DDFilteredView &fv)
std::vector< double > getTranslation(DDFilteredView &fv)

◆ getDimension() [1/2]

std::vector< double > ME0GeometryParsFromDD::getDimension ( DDFilteredView fv)
private

Definition at line 154 of file ME0GeometryParsFromDD.cc.

References LogDebug, DDFilteredView::logicalPart(), DDSolid::parameters(), and DDLogicalPart::solid().

Referenced by buildChamber(), buildEtaPartition(), and buildLayer().

154  {
155  std::vector<double> dpar = fv.logicalPart().solid().parameters();
156  //dpar[4] bottom width is along local X
157  //dpar[8] top width is along local X
158  //dpar[3] thickness is long local Z
159  //dpar[0] length is along local Y
160  LogDebug("ME0GeometryParsFromDD") << "dimension dx1 " << dpar[4] << ", dx2 " << dpar[8] << ", dy " << dpar[0]
161  << ", dz " << dpar[3];
162  edm::LogVerbatim("ME0GeometryParsFromDD")
163  << "(1) DDD, dimension dx1 " << dpar[4] << ", dx2 " << dpar[8] << ", dy " << dpar[0] << ", dz " << dpar[3];
164  return {dpar[4], dpar[8], dpar[0], dpar[3]};
165 }
Log< level::Info, true > LogVerbatim
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Definition: DDSolid.cc:125
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
#define LogDebug(id)

◆ getDimension() [2/2]

std::vector< double > ME0GeometryParsFromDD::getDimension ( cms::DDFilteredView fv)
private

Definition at line 263 of file ME0GeometryParsFromDD.cc.

References cms::DDFilteredView::parameters().

263  {
264  std::vector<double> dpar = fv.parameters();
265 
266  edm::LogVerbatim("ME0GeometryParsFromDD")
267  << "(1) DD4hep, dimension dx1 " << dpar[0] / dd4hep::mm << ", dx2 " << dpar[1] / dd4hep::mm << ", dy "
268  << dpar[3] / dd4hep::mm << ", dz " << dpar[2] / dd4hep::mm;
269 
270  return {dpar[0] / dd4hep::mm, dpar[1] / dd4hep::mm, dpar[3] / dd4hep::mm, dpar[2] / dd4hep::mm};
271 }
Log< level::Info, true > LogVerbatim
const std::vector< double > parameters() const
extract shape parameters

◆ getRotation() [1/2]

std::vector< double > ME0GeometryParsFromDD::getRotation ( DDFilteredView fv)
private

Definition at line 174 of file ME0GeometryParsFromDD.cc.

References DDFilteredView::rotation(), x, y, and z.

Referenced by buildChamber(), buildEtaPartition(), and buildLayer().

174  {
175  const DDRotationMatrix& rota = fv.rotation(); //.Inverse();
176  DD3Vector x, y, z;
177  rota.GetComponents(x, y, z);
178  edm::LogVerbatim("ME0GeometryParsFromDD")
179  << "(3) DDD, rot matrix " << x.X() << " " << x.Y() << " " << x.Z() << " " << y.X() << " " << y.Y() << " "
180  << y.Z() << " " << z.X() << " " << z.Y() << " " << z.Z();
181  return {x.X(), x.Y(), x.Z(), y.X(), y.Y(), y.Z(), z.X(), z.Y(), z.Z()};
182 }
Log< level::Info, true > LogVerbatim
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.

◆ getRotation() [2/2]

std::vector< double > ME0GeometryParsFromDD::getRotation ( cms::DDFilteredView fv)
private

Definition at line 284 of file ME0GeometryParsFromDD.cc.

References cms::DDFilteredView::rot(), makeMuonMisalignmentScenario::rot, x, y, and z.

284  {
285  DDRotationMatrix rota;
286  fv.rot(rota);
287  DD3Vector x, y, z;
288  rota.GetComponents(x, y, z);
289  const std::vector<double> rot = {x.X(), x.Y(), x.Z(), y.X(), y.Y(), y.Z(), z.X(), z.Y(), z.Z()};
290  edm::LogVerbatim("ME0GeometryParsFromDD")
291  << "(3) DD4hep, rot matrix " << rot[0] << " " << rot[1] << " " << rot[2] << " " << rot[3] << " " << rot[4]
292  << " " << rot[5] << " " << rot[6] << " " << rot[7] << " " << rot[8];
293  return {rot[0], rot[1], rot[2], rot[3], rot[4], rot[5], rot[6], rot[7], rot[8]};
294 }
Log< level::Info, true > LogVerbatim
const Double_t * rot() const
The absolute rotation of the current node.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.

◆ getTranslation() [1/2]

std::vector< double > ME0GeometryParsFromDD::getTranslation ( DDFilteredView fv)
private

Definition at line 167 of file ME0GeometryParsFromDD.cc.

References DDFilteredView::translation().

Referenced by buildChamber(), buildEtaPartition(), and buildLayer().

167  {
168  const DDTranslation& tran = fv.translation();
169  edm::LogVerbatim("ME0GeometryParsFromDD")
170  << "(2) DDD, tran vector " << tran.x() << " " << tran.y() << " " << tran.z();
171  return {tran.x(), tran.y(), tran.z()};
172 }
Log< level::Info, true > LogVerbatim
const DDTranslation & translation() const
The absolute translation of the current node.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7

◆ getTranslation() [2/2]

std::vector< double > ME0GeometryParsFromDD::getTranslation ( cms::DDFilteredView fv)
private

Definition at line 273 of file ME0GeometryParsFromDD.cc.

References cms::DDFilteredView::translation().

273  {
274  std::vector<double> tran(3);
275  tran[0] = static_cast<double>(fv.translation().X()) / dd4hep::mm;
276  tran[1] = static_cast<double>(fv.translation().Y()) / dd4hep::mm;
277  tran[2] = static_cast<double>(fv.translation().Z()) / dd4hep::mm;
278 
279  edm::LogVerbatim("ME0GeometryParsFromDD")
280  << "(2) DD4hep, tran vector " << tran[0] << " " << tran[1] << " " << tran[2];
281  return {tran[0], tran[1], tran[2]};
282 }
Log< level::Info, true > LogVerbatim
const Translation translation() const