56 buildGeometry(fview, muonConstants, rig);
71 buildGeometry(fview, muonConstants, rgeo);
79 edm::LogVerbatim(
"DTGeometryParsFromDD") <<
"(0) DTGeometryParsFromDD - DDD ";
94 FEPos =
val.strings()[0];
95 insertChamber(fv,
type, muonConstants, rig);
100 insertSuperLayer(fv,
type, muonConstants, rig);
105 insertLayer(fv,
type, muonConstants, rig);
133 std::vector<double> par;
134 par.emplace_back(DTChamberTag);
135 std::vector<double> size = extractParameters(fv);
136 par.insert(par.end(), size.begin(), size.end());
139 <<
"(1) DDD, Chamber DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
147 rig.
insert(rawid, posRot.first, posRot.second, par);
163 std::vector<double> par;
164 par.emplace_back(DTSuperLayerTag);
165 std::vector<double> size = extractParameters(fv);
166 par.insert(par.end(), size.begin(), size.end());
169 <<
"(2) DDD, Super Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
173 rig.
insert(slId, posRot.first, posRot.second, par);
188 std::vector<double> par;
189 par.emplace_back(DTLayerTag);
190 std::vector<double> size = extractParameters(fv);
191 par.insert(par.end(), size.begin(), size.end());
196 int firstWire = fv.
copyno();
202 std::vector<double> sensSize = extractParameters(fv);
204 par.emplace_back(firstWire);
205 par.emplace_back(WCounter);
206 par.emplace_back(sensSize[1]);
213 <<
"(3) DDD, Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3] <<
" " 214 << par[4] <<
" " << par[5] <<
" " << par[6];
216 rig.
insert(layId, posRot.first, posRot.second, par);
220 std::vector<double> par;
228 par =
A.parameters();
239 std::vector<double> gtran(3);
246 <<
" " << gtran[0] <<
" " << gtran[1] <<
" " << gtran[2];
254 std::vector<double> grmat(9);
267 return std::pair<std::vector<double>, std::vector<double> >(gtran, grmat);
276 edm::LogVerbatim(
"DTGeometryParsFromDD") <<
"(0) DTGeometryParsFromDD - DD4hep ";
281 insertChamber(fv, muonConstants, rig);
285 insertSuperLayer(fv, muonConstants, rig);
290 insertLayer(fv, muonConstants, rig);
304 const Double_t* tr = fv.
trans();
306 std::vector<double> gtran(3);
308 gtran[0] = tr[0] / dd4hep::cm;
309 gtran[1] = tr[1] / dd4hep::cm;
310 gtran[2] = tr[2] / dd4hep::cm;
314 <<
" " << gtran[0] <<
" " << gtran[1] <<
" " << gtran[2];
320 std::vector<double> grmat(9);
334 return std::pair<std::vector<double>, std::vector<double> >(gtran, grmat);
345 std::vector<double> par_temp = fv.
parameters();
346 std::vector<double> par(4);
347 par[0] = DTChamberTag;
348 par[1] = par_temp[0] / dd4hep::mm;
349 par[2] = par_temp[1] / dd4hep::mm;
350 par[3] = par_temp[2] / dd4hep::mm;
354 <<
"(1) DD4hep, Chamber DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
357 rig.
insert(rawid, posRot.first, posRot.second, par);
368 std::vector<double> par_temp = fv.
parameters();
369 std::vector<double> par(4);
370 par[0] = DTSuperLayerTag;
371 par[1] = par_temp[0] / dd4hep::mm;
372 par[2] = par_temp[1] / dd4hep::mm;
373 par[3] = par_temp[2] / dd4hep::mm;
377 <<
"(2) DD4hep, Super Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
380 rig.
insert(slId, posRot.first, posRot.second, par);
391 std::vector<double> par_temp = fv.
parameters();
392 std::vector<double> par(4);
394 par[1] = par_temp[0] / dd4hep::mm;
395 par[2] = par_temp[1] / dd4hep::mm;
396 par[3] = par_temp[2] / dd4hep::mm;
400 int firstWire = fv.
volume()->GetNumber();
402 float wireLength = wpar[1] / dd4hep::mm;
410 par.emplace_back(firstWire);
411 par.emplace_back(WCounter);
412 par.emplace_back(wireLength);
420 <<
"(3) DD4hep, Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3] <<
" " 421 << par[4] <<
" " << par[5] <<
" " << par[6];
423 rig.
insert(layId, posRot.first, posRot.second, par);
Log< level::Info, true > LogVerbatim
void up()
set current node to the parent node in the filtered tree
bool parent()
set the current node to the parent node ...
void build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig)
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)
PosRotPair plane(const DDFilteredView &fv) const
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
Compact representation of the geometrical detector hierarchy.
bool sibling()
set the current node to the next sub sibling
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
void down()
set current node to the child node in the filtered tree
A DDSolid represents the shape of a part.
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
virtual ~DTGeometryParsFromDD()
Destructor.
const Double_t * trans() const
The absolute translation of the current node.
void buildGeometry(DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
int baseNumberToUnitNumber(const MuonBaseNumber &num) const override
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
bool nextSibling()
set the current node to the next sibling
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const ExpandedNodes & history()
The numbering history of the current node.
int getDetId(const MuonBaseNumber &num) const
std::vector< double > extractParameters(DDFilteredView &fv) const
get parameter also for boolean solid.
bool parent()
set the current node to the parent node ...
bool firstChild()
set the current node to the first child
DDSolidShape shape(void) const
The type of the solid.
void insertLayer(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the layer
DTGeometryParsFromDD()
Constructor.
DDsvalues_type mergedSpecifics() const
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
void insertChamber(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the chamber
constexpr NumType convertMmToCm(NumType millimeters)
int copyno() const
Copy number associated with the current node.
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
std::pair< std::vector< double >, std::vector< double > > PosRotPair
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
const RotationMatrix rotation() const
const PlacedVolume volume() const
The physical volume of the current node.
void insertSuperLayer(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the SL
bool firstChild()
set the current node to the first child ...
const DDTranslation & translation() const
The absolute translation of the current node.
bool checkChild()
count the number of children matching selection
const std::vector< double > parameters() const
extract shape parameters
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
MuonBaseNumber geoHistoryToBaseNumber(const DDGeoHistory &history) const