17 #include "CLHEP/Units/GlobalSystemOfUnits.h" 49 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"Building the geometry service";
50 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"About to run through the ME0 structure\n" 51 <<
"Top level logical part: " 59 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"doChamber = fv.firstChild() = " << testChambers;
61 while (testChambers) {
71 LogTrace(
"ME0GeometryBuilderFromDDD")<<
"back to layer "<<fv.
parent();
72 LogTrace(
"ME0GeometryBuilderFromDDD")<<
"back to chamb "<<fv.
parent();
74 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"In DoChambers Loop :: ME0DetId " 75 << detId <<
" = " << detId.
rawId()
76 <<
" (which belongs to ME0Chamber " 77 << detIdCh <<
" = " << detIdCh.
rawId() <<
")";
80 std::vector<double> dpar2 = solid2.
parameters();
81 std::stringstream parameters2;
82 for(
unsigned int i=0;
i<dpar2.size(); ++
i) {
83 parameters2 <<
" dpar["<<
i<<
"]="<< dpar2[
i]/10 <<
"cm ";
85 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"Second level parameters: vector with size = "<<dpar2.size()<<
" and elements "<<parameters2.str();
89 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"doLayer = fv.firstChild() = " << doLayers;
99 LogTrace(
"ME0GeometryBuilderFromDDD")<<
"back to layer "<<fv.
parent();
100 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"In DoLayers Loop :: ME0DetId "<<detId<<
" = "<<detId.
rawId()<<
" (which belongs to ME0Layer "<<detIdLa<<
" = "<<detIdLa.
rawId()<<
")";
103 std::vector<double> dpar3 = solid3.
parameters();
104 std::stringstream parameters3;
105 for(
unsigned int i=0;
i<dpar3.size(); ++
i) {
106 parameters3 <<
" dpar["<<
i<<
"]="<< dpar3[
i]/10 <<
"cm ";
108 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"Third level parameters: vector with size = "<<dpar3.size()<<
" and elements "<<parameters3.str();
111 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"doEtaPart = fv.firstChild() = " << doEtaParts;
113 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"In DoEtaParts Loop :: ME0DetId "<<detId<<
" = "<<detId.
rawId();
116 std::vector<double> dpar4 = solid4.
parameters();
117 std::stringstream parameters4;
118 for(
unsigned int i=0;
i<dpar4.size(); ++
i) {
119 parameters4 <<
" dpar["<<
i<<
"]="<< dpar4[
i]/10 <<
"cm ";
121 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"Fourth level parameters: vector with size = "<<dpar4.size()<<
" and elements "<<parameters4.str();
124 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"doEtaPart = fv.nextSibling() = " << doEtaParts;
127 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"went back to parent :: name = "<<fv.
logicalPart().
name().
name()<<
" will now ask for nextSibling";
129 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"doLayer = fv.nextSibling() = " << doLayers;
132 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"went back to parent :: name = "<<fv.
logicalPart().
name().
name()<<
" will now ask for nextSibling";
134 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"doChamber = fv.nextSibling() = " << testChambers;
158 geometry->
add(me0Chamber);
174 me0Chamber->
add(me0Layer);
175 geometry->
add(me0Layer);
189 me0Layer->
add(etaPart);
190 geometry->
add(etaPart);
209 std::vector<double> dpar = solid.
parameters();
210 double L = dpar[0]/cm;
211 double T = dpar[3]/cm;
212 double b = dpar[4]/cm;
213 double B = dpar[8]/cm;
218 LogTrace(
"ME0GeometryBuilderFromDDD") <<
" dpar is vector with size = "<<dpar.size()<<std::endl;
219 for(
unsigned int i=0;
i<dpar.size(); ++
i) {
220 LogTrace(
"ME0GeometryBuilderFromDDD") <<
" dpar ["<<
i<<
"] = "<< dpar[
i]/10 <<
" cm "<<std::endl;
222 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"size b: "<< b <<
"cm, B: " << B <<
"cm, L: " << L <<
"cm, T: " << T <<
"cm "<<std::endl;
236 std::vector<double> dpar = solid.
parameters();
237 double L = dpar[0]/cm;
238 double t = dpar[3]/cm;
239 double b = dpar[4]/cm;
240 double B = dpar[8]/cm;
247 LogTrace(
"ME0GeometryBuilderFromDDD") <<
" dpar is vector with size = "<<dpar.size()<<std::endl;
248 for(
unsigned int i=0;
i<dpar.size(); ++
i) {
249 LogTrace(
"ME0GeometryBuilderFromDDD") <<
" dpar ["<<
i<<
"] = "<< dpar[
i]/10 <<
" cm "<<std::endl;
251 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"size b: "<< b <<
"cm, B: " << B <<
"cm, L: " << L <<
"cm, t: " << t <<
"cm "<<std::endl;
264 DDValue numbOfStrips(
"nStrips");
267 std::vector<const DDsvalues_type* >::iterator is =
specs.begin();
268 double nStrips = 0., nPads = 0.;
269 for (;is !=
specs.end(); is++){
270 if (
DDfetch( *is, numbOfStrips)) nStrips = numbOfStrips.
doubles()[0];
273 LogTrace(
"ME0GeometryBuilderFromDDD")
274 << ((nStrips == 0. ) ? (
"No nStrips found!!") : (
"Number of strips: " + std::to_string(nStrips)));
275 LogTrace(
"ME0GeometryBuilderFromDDD")
276 << ((nPads == 0. ) ? (
"No nPads found!!") : (
"Number of pads: " + std::to_string(nPads)));
280 double b = dpar[4]/cm;
281 double B = dpar[8]/cm;
282 double L = dpar[0]/cm;
283 double t = dpar[3]/cm;
287 LogTrace(
"ME0GeometryBuilderFromDDD") <<
" dpar is vector with size = "<<dpar.size()<<std::endl;
288 for(
unsigned int i=0;
i<dpar.size(); ++
i) {
289 LogTrace(
"ME0GeometryBuilderFromDDD") <<
" dpar ["<<
i<<
"] = "<< dpar[
i]/10 <<
" cm "<<std::endl;
291 LogTrace(
"ME0GeometryBuilderFromDDD") <<
"size b: "<< b <<
"cm, B: " << B <<
"cm, L: " << L <<
"cm, t: " << t <<
"cm "<<std::endl;
294 std::vector<float> pars;
295 pars.emplace_back(b);
296 pars.emplace_back(B);
297 pars.emplace_back(L);
298 pars.emplace_back(nStrips);
299 pars.emplace_back(nPads);
312 Bounds* bounds,
bool isOddChamber)
const {
317 float(trans.z()/cm));
327 rotation.GetComponents(x,y,z);
336 float(y.X()),
float(y.Y()),
float(y.Z()),
337 float(z.X()),
float(z.Y()),
float(z.Z()));
ReferenceCountingPointer< BoundPlane > ME0BoundPlane
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
bool parent()
set the current node to the parent node ...
ME0DetId layerId() const
Return the corresponding LayerId (mask eta partition)
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
ME0Geometry * build(const DDCompactView *cview, const MuonDDDConstants &muonConstants)
ME0GeometryBuilderFromDDD()
ME0DetId chamberId() const
Return the corresponding ChamberId (mask layers)
bool nextSibling()
set the current node to the next sibling ...
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
ME0Chamber * buildChamber(DDFilteredView &fv, ME0DetId detId) const
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
type of data representation of DDCompactView
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
void add(ME0Layer *layer)
Add Layer to the chamber which takes ownership.
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
TkRotation & rotateAxes(const Basic3DVector< T > &newX, const Basic3DVector< T > &newY, const Basic3DVector< T > &newZ)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
uint32_t rawId() const
get the raw id
int baseNumberToUnitNumber(const MuonBaseNumber &) override
ME0BoundPlane boundPlane(const DDFilteredView &fv, Bounds *bounds, bool isOddChamber) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
ME0Geometry * buildGeometry(DDFilteredView &fview, const MuonDDDConstants &muonConstants)
void add(const ME0EtaPartition *roll)
Add EtaPartition to the layer which takes ownership.
static const std::string B
void add(ME0EtaPartition *etaPartition)
Add a ME0 etaPartition to the Geometry.
ESHandle< TrackerGeometry > geometry
~ME0GeometryBuilderFromDDD()
bool firstChild()
set the current node to the first child ...
const DDTranslation & translation() const
The absolute translation of the current node.
std::vector< const DDsvalues_type * > specifics() const
ME0EtaPartition * buildEtaPartition(DDFilteredView &fv, ME0DetId detId) const
MuonBaseNumber geoHistoryToBaseNumber(const DDGeoHistory &history)
ROOT::Math::Rotation3D DDRotationMatrix
A DDRotationMatrix is currently implemented with a ROOT Rotation3D.
const std::string & name() const
Returns the name.
ME0Layer * buildLayer(DDFilteredView &fv, ME0DetId detId) const