56 buildGeometry(fview, muonConstants, rig);
71 buildGeometry(fview, muonConstants, rgeo);
79 edm::LogVerbatim(
"DTGeometryParsFromDD") <<
"(0) DTGeometryParsFromDD - DDD ";
96 FEPos =
val.strings()[0];
97 insertChamber(fv,
type, muonConstants, rig);
104 insertSuperLayer(fv,
type, muonConstants, rig);
111 insertLayer(fv,
type, muonConstants, rig);
139 std::vector<double> par;
140 par.emplace_back(DTChamberTag);
141 std::vector<double>
size = extractParameters(fv);
142 par.insert(par.end(),
size.begin(),
size.end());
145 <<
"(1) DDD, Chamber DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
153 rig.
insert(rawid, posRot.first, posRot.second, par);
169 std::vector<double> par;
170 par.emplace_back(DTSuperLayerTag);
171 std::vector<double>
size = extractParameters(fv);
172 par.insert(par.end(),
size.begin(),
size.end());
175 <<
"(2) DDD, Super Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
179 rig.
insert(slId, posRot.first, posRot.second, par);
194 std::vector<double> par;
195 par.emplace_back(DTLayerTag);
196 std::vector<double>
size = extractParameters(fv);
197 par.insert(par.end(),
size.begin(),
size.end());
202 int firstWire = fv.
copyno();
208 std::vector<double> sensSize = extractParameters(fv);
210 par.emplace_back(firstWire);
211 par.emplace_back(WCounter);
212 par.emplace_back(sensSize[1]);
219 <<
"(3) DDD, Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3] <<
" " 220 << par[4] <<
" " << par[5] <<
" " << par[6];
222 rig.
insert(layId, posRot.first, posRot.second, par);
226 std::vector<double> par;
234 par =
A.parameters();
245 std::vector<double> gtran(3);
252 <<
" " << gtran[0] <<
" " << gtran[1] <<
" " << gtran[2];
260 std::vector<double> grmat(9);
273 return std::pair<std::vector<double>, std::vector<double> >(gtran, grmat);
282 edm::LogVerbatim(
"DTGeometryParsFromDD") <<
"(0) DTGeometryParsFromDD - DD4hep ";
287 insertChamber(fv, muonConstants, rig);
291 insertSuperLayer(fv, muonConstants, rig);
296 insertLayer(fv, muonConstants, rig);
310 const Double_t* tr = fv.
trans();
312 std::vector<double> gtran(3);
314 gtran[0] = tr[0] / dd4hep::cm;
315 gtran[1] = tr[1] / dd4hep::cm;
316 gtran[2] = tr[2] / dd4hep::cm;
320 <<
" " << gtran[0] <<
" " << gtran[1] <<
" " << gtran[2];
326 std::vector<double> grmat(9);
340 return std::pair<std::vector<double>, std::vector<double> >(gtran, grmat);
351 std::vector<double> par_temp = fv.
parameters();
352 std::vector<double> par(4);
353 par[0] = DTChamberTag;
354 par[1] = par_temp[0] / dd4hep::mm;
355 par[2] = par_temp[1] / dd4hep::mm;
356 par[3] = par_temp[2] / dd4hep::mm;
360 <<
"(1) DD4hep, Chamber DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
363 rig.
insert(rawid, posRot.first, posRot.second, par);
374 std::vector<double> par_temp = fv.
parameters();
375 std::vector<double> par(4);
376 par[0] = DTSuperLayerTag;
377 par[1] = par_temp[0] / dd4hep::mm;
378 par[2] = par_temp[1] / dd4hep::mm;
379 par[3] = par_temp[2] / dd4hep::mm;
383 <<
"(2) DD4hep, Super Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
386 rig.
insert(slId, posRot.first, posRot.second, par);
397 std::vector<double> par_temp = fv.
parameters();
398 std::vector<double> par(4);
400 par[1] = par_temp[0] / dd4hep::mm;
401 par[2] = par_temp[1] / dd4hep::mm;
402 par[3] = par_temp[2] / dd4hep::mm;
406 int firstWire = fv.
volume()->GetNumber();
408 float wireLength = wpar[1] / dd4hep::mm;
416 par.emplace_back(firstWire);
417 par.emplace_back(WCounter);
418 par.emplace_back(wireLength);
426 <<
"(3) DD4hep, Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3] <<
" " 427 << par[4] <<
" " << par[5] <<
" " << par[6];
429 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