CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions
DTGeometryParsFromDD Class Reference

#include <DTGeometryParsFromDD.h>

Public Types

enum  DTDetTag { DTChamberTag, DTSuperLayerTag, DTLayerTag }
 

Public Member Functions

void build (const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig)
 
void build (const cms::DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rgeo)
 
 DTGeometryParsFromDD ()
 Constructor. More...
 
virtual ~DTGeometryParsFromDD ()
 Destructor. More...
 

Private Types

typedef std::pair< std::vector
< double >, std::vector
< double > > 
PosRotPair
 

Private Member Functions

void buildGeometry (DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
 
void buildGeometry (cms::DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
 
std::vector< double > extractParameters (DDFilteredView &fv) const
 get parameter also for boolean solid. More...
 
void insertChamber (DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
 create the chamber More...
 
void insertChamber (cms::DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
 create the chamber More...
 
void insertLayer (DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
 create the layer More...
 
void insertLayer (cms::DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
 create the layer More...
 
void insertSuperLayer (DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
 create the SL More...
 
void insertSuperLayer (cms::DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
 create the SL More...
 
PosRotPair plane (const DDFilteredView &fv) const
 
PosRotPair plane (const cms::DDFilteredView &fv) const
 

Detailed Description

Build the RPCGeometry from the DDD and DD4hep description

DD4hep part added to the original old file (DD version) made by Stefano Lacaprara (INFN LNL)

Author
: Sergio Lo Meo (sergi.nosp@m.o.lo.nosp@m..meo@.nosp@m.cern.nosp@m..ch) Created: Tue, 26 Jan 2021

Definition at line 29 of file DTGeometryParsFromDD.h.

Member Typedef Documentation

typedef std::pair<std::vector<double>, std::vector<double> > DTGeometryParsFromDD::PosRotPair
private

Definition at line 68 of file DTGeometryParsFromDD.h.

Member Enumeration Documentation

Constructor & Destructor Documentation

DTGeometryParsFromDD::DTGeometryParsFromDD ( )

Constructor.

Definition at line 37 of file DTGeometryParsFromDD.cc.

37 {}
DTGeometryParsFromDD::~DTGeometryParsFromDD ( )
virtual

Destructor.

Definition at line 39 of file DTGeometryParsFromDD.cc.

39 {}

Member Function Documentation

void DTGeometryParsFromDD::build ( const DDCompactView cview,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
)

Definition at line 42 of file DTGeometryParsFromDD.cc.

References alcazmumu_cfi::filter, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

Referenced by DTRecoIdealDBLoader::beginRun().

44  {
45  // cout << "DTGeometryParsFromDD::build" << endl;
46  // static const string t0 = "DTGeometryParsFromDD::build";
47  // TimeMe timer(t0,true);
48 
49  std::string attribute = "MuStructure";
50  std::string value = "MuonBarrelDT";
51 
52  // Asking only for the Muon DTs
53  DDSpecificsMatchesValueFilter filter{DDValue(attribute, value, 0.0)};
54  DDFilteredView fview(*cview, filter);
55  buildGeometry(fview, muonConstants, rig);
56  //cout << "RecoIdealGeometry " << rig.size() << endl;
57 }
void buildGeometry(DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
void DTGeometryParsFromDD::build ( const cms::DDCompactView cview,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rgeo 
)

Definition at line 61 of file DTGeometryParsFromDD.cc.

References alcazmumu_cfi::filter, AlCaHLTBitMon_QueryRunRegistry::string, and relativeConstraints::value.

63  {
64  const std::string attribute = "MuStructure";
65  const std::string value = "MuonBarrelDT";
66  const cms::DDFilter filter(attribute, value);
67  cms::DDFilteredView fview(*cview, filter);
68  buildGeometry(fview, muonConstants, rgeo);
69 }
void buildGeometry(DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
void DTGeometryParsFromDD::buildGeometry ( DDFilteredView fv,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
) const
private

Definition at line 72 of file DTGeometryParsFromDD.cc.

References DDfetch(), DDFilteredView::firstChild(), DDFilteredView::mergedSpecifics(), DDFilteredView::nextSibling(), submitPVValidationJobs::params, DDFilteredView::parent(), DDValue::strings(), and hgcalPerformanceValidation::val.

74  {
75  // static const string t0 = "DTGeometryParsFromDD::buildGeometry";
76  // TimeMe timer(t0,true);
77 
78  edm::LogVerbatim("DTGeometryParsFromDD") << "(0) DTGeometryParsFromDD - DDD ";
79 
80  bool doChamber = fv.firstChild();
81 
82  // Loop on chambers
83  int ChamCounter = 0;
84  while (doChamber) {
85  ChamCounter++;
86  DDValue val("Type");
88  string type;
89  if (DDfetch(&params, val))
90  type = val.strings()[0];
91  // FIXME
92  val = DDValue("FEPos");
93  string FEPos;
94  if (DDfetch(&params, val))
95  FEPos = val.strings()[0];
96  insertChamber(fv, type, muonConstants, rig);
97 
98  // Loop on SLs
99  bool doSL = fv.firstChild();
100  int SLCounter = 0;
101  while (doSL) {
102  SLCounter++;
103  insertSuperLayer(fv, type, muonConstants, rig);
104 
105  bool doL = fv.firstChild();
106  int LCounter = 0;
107  // Loop on SLs
108  while (doL) {
109  LCounter++;
110  insertLayer(fv, type, muonConstants, rig);
111 
112  // fv.parent();
113  doL = fv.nextSibling(); // go to next layer
114  } // layers
115 
116  fv.parent();
117  doSL = fv.nextSibling(); // go to next SL
118  } // sls
119 
120  fv.parent();
121  doChamber = fv.nextSibling(); // go to next chamber
122  } // chambers
123 }
Log< level::Info, true > LogVerbatim
void insertSuperLayer(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the SL
bool parent()
set the current node to the parent node ...
bool nextSibling()
set the current node to the next sibling ...
void insertLayer(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the layer
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
Definition: DDsvalues.cc:79
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
Definition: DDsvalues.h:12
void insertChamber(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the chamber
DDsvalues_type mergedSpecifics() const
bool firstChild()
set the current node to the first child ...
void DTGeometryParsFromDD::buildGeometry ( cms::DDFilteredView fv,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
) const
private

Definition at line 264 of file DTGeometryParsFromDD.cc.

References cms::DDFilteredView::down(), cms::DDFilteredView::firstChild(), cms::DDFilteredView::nextSibling(), cms::DDFilteredView::parent(), and cms::DDFilteredView::sibling().

266  {
267  edm::LogVerbatim("DTGeometryParsFromDD") << "(0) DTGeometryParsFromDD - DD4hep ";
268 
269  bool doChamber = fv.firstChild();
270 
271  while (doChamber) {
272  insertChamber(fv, muonConstants, rig);
273 
274  bool doSL = fv.nextSibling();
275  while (doSL) {
276  insertSuperLayer(fv, muonConstants, rig);
277 
278  fv.down();
279  bool doLayers = fv.sibling();
280  while (doLayers) {
281  insertLayer(fv, muonConstants, rig);
282 
283  doLayers = fv.sibling();
284  }
285 
286  doSL = fv.nextSibling();
287  }
288 
289  fv.parent();
290  doChamber = fv.firstChild();
291  }
292 }
Log< level::Info, true > LogVerbatim
void insertSuperLayer(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the SL
void insertLayer(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the layer
bool sibling()
set the current node to the next sub sibling
void down()
set current node to the child node in the filtered tree
bool nextSibling()
set the current node to the next sibling
bool parent()
set the current node to the parent node ...
bool firstChild()
set the current node to the first child
void insertChamber(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the chamber
vector< double > DTGeometryParsFromDD::extractParameters ( DDFilteredView fv) const
private

get parameter also for boolean solid.

Definition at line 213 of file DTGeometryParsFromDD.cc.

References A, cms::cuda::bs, ddbox, DDFilteredView::logicalPart(), DDSolid::parameters(), DDSolid::shape(), DDLogicalPart::solid(), and DDBooleanSolid::solidA().

213  {
214  vector<double> par;
215  if (fv.logicalPart().solid().shape() != DDSolidShape::ddbox) {
217  DDSolid A = bs.solidA();
218  while (A.shape() != DDSolidShape::ddbox) {
219  DDBooleanSolid bs(A);
220  A = bs.solidA();
221  }
222  par = A.parameters();
223  } else {
224  par = fv.logicalPart().solid().parameters();
225  }
226  return par;
227 }
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.
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
DDSolidShape shape(void) const
The type of the solid.
Definition: DDSolid.cc:123
Definition: APVGainStruct.h:7
void DTGeometryParsFromDD::insertChamber ( DDFilteredView fv,
const std::string &  type,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
) const
private

create the chamber

void DTGeometryParsFromDD::insertChamber ( cms::DDFilteredView fv,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
) const
private

create the chamber

Definition at line 327 of file DTGeometryParsFromDD.cc.

References DTNumberingScheme::baseNumberToUnitNumber(), MuonGeometryNumbering::geoHistoryToBaseNumber(), cms::DDFilteredView::history(), RecoIdealGeometry::insert(), and cms::DDFilteredView::parameters().

329  {
330  MuonGeometryNumbering mdddnum(muonConstants);
331  DTNumberingScheme dtnum(muonConstants);
332  int rawid = dtnum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.history()));
333  DTChamberId detId(rawid);
334 
335  vector<double> par_temp = fv.parameters();
336  vector<double> par(4);
337  par[0] = DTChamberTag; //DTChamberTag is the ID of a Chamber
338  par[1] = par_temp[0] / dd4hep::mm;
339  par[2] = par_temp[1] / dd4hep::mm;
340  par[3] = par_temp[2] / dd4hep::mm;
341 
342  edm::LogVerbatim("DTGeometryParsFromDD")
343  << "(1) DD4hep, Chamber DetID " << rawid << " " << par[0] << " " << par[1] << " " << par[2] << " " << par[3];
344  PosRotPair posRot(plane(fv));
345  rig.insert(rawid, posRot.first, posRot.second, par);
346 }
Log< level::Info, true > LogVerbatim
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const ExpandedNodes & history()
The numbering history of the current node.
std::pair< std::vector< double >, std::vector< double > > PosRotPair
const std::vector< double > parameters() const
extract shape parameters
PosRotPair plane(const DDFilteredView &fv) const
void DTGeometryParsFromDD::insertLayer ( DDFilteredView fv,
const std::string &  type,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
) const
private

create the layer

Definition at line 173 of file DTGeometryParsFromDD.cc.

References DDFilteredView::copyno(), DDFilteredView::firstChild(), DDFilteredView::geoHistory(), MuonGeometryNumbering::geoHistoryToBaseNumber(), DTNumberingScheme::getDetId(), RecoIdealGeometry::insert(), DDFilteredView::nextSibling(), and DDFilteredView::parent().

176  {
177  MuonGeometryNumbering mdddnum(muonConstants);
178  DTNumberingScheme dtnum(muonConstants);
179  int rawid = dtnum.getDetId(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
180  DTLayerId layId(rawid);
181  //cout << "inserting Layer " << layId << endl;
182 
183  // Layer specific parameter (size)
184  vector<double> par;
185  par.emplace_back(DTLayerTag);
186  vector<double> size = extractParameters(fv);
187  par.insert(par.end(), size.begin(), size.end());
188 
189  // Loop on wires
190  bool doWire = fv.firstChild();
191  int WCounter = 0;
192  int firstWire = fv.copyno();
193  //float wireLength = par[1]/cm;
194  while (doWire) {
195  WCounter++;
196  doWire = fv.nextSibling(); // next wire
197  }
198  vector<double> sensSize = extractParameters(fv);
199  //int lastWire=fv.copyno();
200  par.emplace_back(firstWire);
201  par.emplace_back(WCounter);
202  par.emplace_back(sensSize[1]);
203  fv.parent();
204 
205  PosRotPair posRot(plane(fv));
206 
207  edm::LogVerbatim("DTGeometryParsFromDD")
208  << "(3) DDD, Layer DetID " << rawid << " " << par[0] << " " << par[1] << " " << par[2] << " " << par[3] << " "
209  << par[4] << " " << par[5] << " " << par[6];
210  rig.insert(layId, posRot.first, posRot.second, par);
211 }
Log< level::Info, true > LogVerbatim
bool parent()
set the current node to the parent node ...
bool nextSibling()
set the current node to the next sibling ...
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
int copyno() const
Copy number associated with the current node.
std::vector< double > extractParameters(DDFilteredView &fv) const
get parameter also for boolean solid.
std::pair< std::vector< double >, std::vector< double > > PosRotPair
bool firstChild()
set the current node to the first child ...
tuple size
Write out results.
PosRotPair plane(const DDFilteredView &fv) const
void DTGeometryParsFromDD::insertLayer ( cms::DDFilteredView fv,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
) const
private

create the layer

Definition at line 369 of file DTGeometryParsFromDD.cc.

References DTNumberingScheme::baseNumberToUnitNumber(), cms::DDFilteredView::checkChild(), cms::DDFilteredView::down(), MuonGeometryNumbering::geoHistoryToBaseNumber(), cms::DDFilteredView::history(), RecoIdealGeometry::insert(), cms::DDFilteredView::parameters(), cms::DDFilteredView::sibling(), cms::DDFilteredView::up(), and cms::DDFilteredView::volume().

371  {
372  MuonGeometryNumbering mdddnum(muonConstants);
373  DTNumberingScheme dtnum(muonConstants);
374  int rawid = dtnum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.history()));
375  DTLayerId layId(rawid);
376 
377  vector<double> par_temp = fv.parameters();
378  vector<double> par(4);
379  par[0] = DTLayerTag; //DTLayerTag is the ID of a Layer
380  par[1] = par_temp[0] / dd4hep::mm;
381  par[2] = par_temp[1] / dd4hep::mm;
382  par[3] = par_temp[2] / dd4hep::mm;
383 
384  fv.down();
385  bool doWire = fv.sibling();
386  int firstWire = fv.volume()->GetNumber();
387  auto const& wpar = fv.parameters();
388  float wireLength = wpar[1] / dd4hep::mm;
389 
390  int WCounter = 0;
391  while (doWire) {
392  doWire = fv.checkChild();
393  WCounter++;
394  }
395 
396  par.emplace_back(firstWire);
397  par.emplace_back(WCounter);
398  par.emplace_back(wireLength);
399 
400  fv.up();
401 
402  PosRotPair posRot(plane(fv));
403 
404  edm::LogVerbatim("DTGeometryParsFromDD")
405  << "(3) DD4hep, Layer DetID " << rawid << " " << par[0] << " " << par[1] << " " << par[2] << " " << par[3] << " "
406  << par[4] << " " << par[5] << " " << par[6];
407  rig.insert(layId, posRot.first, posRot.second, par);
408 }
Log< level::Info, true > LogVerbatim
void up()
set current node to the parent node in the filtered tree
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const PlacedVolume volume() const
The physical volume of the current node.
bool sibling()
set the current node to the next sub sibling
void down()
set current node to the child node in the filtered tree
const ExpandedNodes & history()
The numbering history of the current node.
std::pair< std::vector< double >, std::vector< double > > PosRotPair
const std::vector< double > parameters() const
extract shape parameters
bool checkChild()
count the number of children matching selection
PosRotPair plane(const DDFilteredView &fv) const
void DTGeometryParsFromDD::insertSuperLayer ( DDFilteredView fv,
const std::string &  type,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
) const
private

create the SL

Definition at line 151 of file DTGeometryParsFromDD.cc.

References DDFilteredView::geoHistory(), MuonGeometryNumbering::geoHistoryToBaseNumber(), DTNumberingScheme::getDetId(), and RecoIdealGeometry::insert().

154  {
155  MuonGeometryNumbering mdddnum(muonConstants);
156  DTNumberingScheme dtnum(muonConstants);
157  int rawid = dtnum.getDetId(mdddnum.geoHistoryToBaseNumber(fv.geoHistory()));
158  DTSuperLayerId slId(rawid);
159  //cout << "inserting SuperLayer " << slId << endl;
160 
161  // Slayer specific parameter (size)
162  vector<double> par;
163  par.emplace_back(DTSuperLayerTag);
164  vector<double> size = extractParameters(fv);
165  par.insert(par.end(), size.begin(), size.end());
166  edm::LogVerbatim("DTGeometryParsFromDD")
167  << "(2) DDD, Super Layer DetID " << rawid << " " << par[0] << " " << par[1] << " " << par[2] << " " << par[3];
168  // Ok this is the slayer position...
169  PosRotPair posRot(plane(fv));
170  rig.insert(slId, posRot.first, posRot.second, par);
171 }
Log< level::Info, true > LogVerbatim
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
std::vector< double > extractParameters(DDFilteredView &fv) const
get parameter also for boolean solid.
std::pair< std::vector< double >, std::vector< double > > PosRotPair
tuple size
Write out results.
PosRotPair plane(const DDFilteredView &fv) const
void DTGeometryParsFromDD::insertSuperLayer ( cms::DDFilteredView fv,
const MuonGeometryConstants muonConstants,
RecoIdealGeometry rig 
) const
private

create the SL

Definition at line 348 of file DTGeometryParsFromDD.cc.

References DTNumberingScheme::baseNumberToUnitNumber(), MuonGeometryNumbering::geoHistoryToBaseNumber(), cms::DDFilteredView::history(), RecoIdealGeometry::insert(), and cms::DDFilteredView::parameters().

350  {
351  MuonGeometryNumbering mdddnum(muonConstants);
352  DTNumberingScheme dtnum(muonConstants);
353  int rawid = dtnum.baseNumberToUnitNumber(mdddnum.geoHistoryToBaseNumber(fv.history()));
354  DTSuperLayerId slId(rawid);
355 
356  vector<double> par_temp = fv.parameters();
357  vector<double> par(4);
358  par[0] = DTSuperLayerTag; //DTSuperLayerTag is the ID of a SuperLayer
359  par[1] = par_temp[0] / dd4hep::mm;
360  par[2] = par_temp[1] / dd4hep::mm;
361  par[3] = par_temp[2] / dd4hep::mm;
362 
363  edm::LogVerbatim("DTGeometryParsFromDD")
364  << "(2) DD4hep, Super Layer DetID " << rawid << " " << par[0] << " " << par[1] << " " << par[2] << " " << par[3];
365  PosRotPair posRot(plane(fv));
366  rig.insert(slId, posRot.first, posRot.second, par);
367 }
Log< level::Info, true > LogVerbatim
bool insert(DetId id, const std::vector< double > &trans, const std::vector< double > &rot, const std::vector< double > &pars)
const ExpandedNodes & history()
The numbering history of the current node.
std::pair< std::vector< double >, std::vector< double > > PosRotPair
const std::vector< double > parameters() const
extract shape parameters
PosRotPair plane(const DDFilteredView &fv) const
DTGeometryParsFromDD::PosRotPair DTGeometryParsFromDD::plane ( const DDFilteredView fv) const
private

Definition at line 229 of file DTGeometryParsFromDD.cc.

References angle_units::operators::convertMmToCm(), idealTransformation::rotation, DDFilteredView::rotation(), and DDFilteredView::translation().

229  {
230  // extract the position
231  const DDTranslation& trans(fv.translation());
232 
233  std::vector<double> gtran(3);
234  gtran[0] = convertMmToCm(trans.x());
235  gtran[1] = convertMmToCm(trans.y());
236  gtran[2] = convertMmToCm(trans.z());
237 
238  edm::LogVerbatim("DTGeometryParsFromDD") << "(4) DDD, Position "
239  << " " << gtran[0] << " " << gtran[1] << " " << gtran[2];
240  // now the rotation
241  // 'active' and 'passive' rotations are inverse to each other
242  const DDRotationMatrix& rotation = fv.rotation(); //REMOVED .Inverse();
243  DD3Vector x, y, z;
244  rotation.GetComponents(x, y, z);
245 
246  std::vector<double> grmat(9);
247  grmat[0] = x.X();
248  grmat[1] = x.Y();
249  grmat[2] = x.Z();
250 
251  grmat[3] = y.X();
252  grmat[4] = y.Y();
253  grmat[5] = y.Z();
254 
255  grmat[6] = z.X();
256  grmat[7] = z.Y();
257  grmat[8] = z.Z();
258 
259  return pair<std::vector<double>, std::vector<double> >(gtran, grmat);
260 }
Log< level::Info, true > LogVerbatim
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >> DD3Vector
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
constexpr NumType convertMmToCm(NumType millimeters)
Definition: angle_units.h:44
const DDTranslation & translation() const
The absolute translation of the current node.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
Definition: DDTranslation.h:7
DTGeometryParsFromDD::PosRotPair DTGeometryParsFromDD::plane ( const cms::DDFilteredView fv) const
private

Definition at line 294 of file DTGeometryParsFromDD.cc.

References idealTransformation::rotation, cms::DDFilteredView::rotation(), and cms::DDFilteredView::trans().

294  {
295  const Double_t* tr = fv.trans();
296 
297  std::vector<double> gtran(3);
298 
299  gtran[0] = tr[0] / dd4hep::cm;
300  gtran[1] = tr[1] / dd4hep::cm;
301  gtran[2] = tr[2] / dd4hep::cm;
302 
303  edm::LogVerbatim("DTGeometryParsFromDD") << "(4) DD4hep, Position "
304  << " " << gtran[0] << " " << gtran[1] << " " << gtran[2];
305 
307  DD3Vector x, y, z;
308  rotation.GetComponents(x, y, z);
309 
310  std::vector<double> grmat(9);
311 
312  grmat[0] = x.X();
313  grmat[1] = x.Y();
314  grmat[2] = x.Z();
315 
316  grmat[3] = y.X();
317  grmat[4] = y.Y();
318  grmat[5] = y.Z();
319 
320  grmat[6] = z.X();
321  grmat[7] = z.Y();
322  grmat[8] = z.Z();
323 
324  return pair<std::vector<double>, std::vector<double> >(gtran, grmat);
325 }
Log< level::Info, true > LogVerbatim
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >> DD3Vector
const RotationMatrix rotation() const
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const Double_t * trans() const
The absolute translation of the current node.