|
|
Go to the documentation of this file.
55 buildGeometry(fview, muonConstants, rig);
68 buildGeometry(fview, muonConstants, rgeo);
78 edm::LogVerbatim(
"DTGeometryParsFromDD") <<
"(0) DTGeometryParsFromDD - DDD ";
95 FEPos =
val.strings()[0];
96 insertChamber(fv,
type, muonConstants, rig);
103 insertSuperLayer(fv,
type, muonConstants, rig);
110 insertLayer(fv,
type, muonConstants, rig);
131 int rawid = dtnum.getDetId(mdddnum.geoHistoryToBaseNumber(fv.
geoHistory()));
137 par.emplace_back(DTChamberTag);
138 vector<double>
size = extractParameters(fv);
139 par.insert(par.end(),
size.begin(),
size.end());
141 <<
"(1) DDD, Chamber DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
147 PosRotPair posRot(plane(fv));
148 rig.
insert(rawid, posRot.first, posRot.second, par);
163 par.emplace_back(DTSuperLayerTag);
164 vector<double>
size = extractParameters(fv);
165 par.insert(par.end(),
size.begin(),
size.end());
167 <<
"(2) DDD, Super Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
170 rig.
insert(slId, posRot.first, posRot.second, par);
185 par.emplace_back(DTLayerTag);
186 vector<double>
size = extractParameters(fv);
187 par.insert(par.end(),
size.begin(),
size.end());
192 int firstWire = fv.
copyno();
198 vector<double> sensSize = extractParameters(fv);
200 par.emplace_back(firstWire);
201 par.emplace_back(WCounter);
202 par.emplace_back(sensSize[1]);
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);
222 par =
A.parameters();
233 std::vector<double> gtran(3);
239 <<
" " << gtran[0] <<
" " << gtran[1] <<
" " << gtran[2];
246 std::vector<double> grmat(9);
259 return pair<std::vector<double>, std::vector<double> >(gtran, grmat);
267 edm::LogVerbatim(
"DTGeometryParsFromDD") <<
"(0) DTGeometryParsFromDD - DD4HEP ";
272 insertChamber(fv, muonConstants, rig);
276 insertSuperLayer(fv, muonConstants, rig);
281 insertLayer(fv, muonConstants, rig);
295 const Double_t* tr = fv.
trans();
297 std::vector<double> gtran(3);
299 gtran[0] = tr[0] / dd4hep::cm;
300 gtran[1] = tr[1] / dd4hep::cm;
301 gtran[2] = tr[2] / dd4hep::cm;
304 <<
" " << gtran[0] <<
" " << gtran[1] <<
" " << gtran[2];
310 std::vector<double> grmat(9);
324 return pair<std::vector<double>, std::vector<double> >(gtran, grmat);
336 vector<double> par(4);
337 par[0] = DTChamberTag;
338 par[1] = par_temp[0] / dd4hep::mm;
339 par[2] = par_temp[1] / dd4hep::mm;
340 par[3] = par_temp[2] / dd4hep::mm;
343 <<
"(1) DD4HEP, Chamber DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
345 rig.
insert(rawid, posRot.first, posRot.second, par);
357 vector<double> par(4);
358 par[0] = DTSuperLayerTag;
359 par[1] = par_temp[0] / dd4hep::mm;
360 par[2] = par_temp[1] / dd4hep::mm;
361 par[3] = par_temp[2] / dd4hep::mm;
364 <<
"(2) DD4HEP, Super Layer DetID " << rawid <<
" " << par[0] <<
" " << par[1] <<
" " << par[2] <<
" " << par[3];
366 rig.
insert(slId, posRot.first, posRot.second, par);
378 vector<double> par(4);
380 par[1] = par_temp[0] / dd4hep::mm;
381 par[2] = par_temp[1] / dd4hep::mm;
382 par[3] = par_temp[2] / dd4hep::mm;
386 int firstWire = fv.
volume()->GetNumber();
388 float wireLength = wpar[1] / dd4hep::mm;
396 par.emplace_back(firstWire);
397 par.emplace_back(WCounter);
398 par.emplace_back(wireLength);
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);
const RotationMatrix rotation() const
const PlacedVolume volume() const
The physical volume of the current node.
void insertLayer(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the layer
const std::vector< double > parameters() const
extract shape parameters
bool sibling()
set the current node to the next sub sibling
MuonBaseNumber geoHistoryToBaseNumber(const DDGeoHistory &history) const
void insertChamber(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the chamber
DDsvalues_type mergedSpecifics() const
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
bool parent()
set the current node to the parent node ...
bool parent()
set the current node to the parent node ...
bool nextSibling()
set the current node to the next sibling
int getDetId(const MuonBaseNumber &num) const
DDSolidShape shape(void) const
The type of the solid.
PosRotPair plane(const DDFilteredView &fv) const
const Double_t * trans() const
The absolute translation of the current node.
bool firstChild()
set the current node to the first child ...
void buildGeometry(DDFilteredView &fv, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
DTGeometryParsFromDD()
Constructor.
Compact representation of the geometrical detector hierarchy.
virtual ~DTGeometryParsFromDD()
Destructor.
bool firstChild()
set the current node to the first child
bool nextSibling()
set the current node to the next sibling ...
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
int baseNumberToUnitNumber(const MuonBaseNumber &num) const override
void down()
set current node to the child node in the filtered tree
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
std::vector< double > extractParameters(DDFilteredView &fv) const
get parameter also for boolean solid.
const ExpandedNodes & history()
The numbering history of the current node.
void up()
set current node to the parent node in the filtered tree
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
void build(const DDCompactView *cview, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
bool checkChild()
count the number of children matching selection
Log< level::Info, true > LogVerbatim
const DDTranslation & translation() const
The absolute translation of the current node.
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
A DDSolid represents the shape of a part.
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
constexpr NumType convertMmToCm(NumType millimeters)
void insertSuperLayer(DDFilteredView &fv, const std::string &type, const MuonGeometryConstants &muonConstants, RecoIdealGeometry &rig) const
create the SL
std::vector< std::pair< unsigned int, DDValue > > DDsvalues_type
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.
int copyno() const
Copy number associated with the current node.