25 #include "CLHEP/Units/GlobalSystemOfUnits.h"
30 #include <boost/lexical_cast.hpp>
34 LogDebug(
"ME0GeometryBuilderfromDDD") <<
"[ME0GeometryBuilderFromDDD::constructor]";
44 DDValue val(attribute, value, 0.0);
62 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Building the geometry service";
65 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"About to run through the ME0 structure\n"
66 <<
" First logical part "
72 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"doSubDets = " << doSubDets;
74 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"start the loop";
81 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Getting the Muon base Number";
84 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Start the ME0 Numbering Schema";
88 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"ME0 eta partition rawId: " << rollDetId.rawId() <<
", detId: " << rollDetId;
91 ME0DetId chamberId(rollDetId.chamberId());
92 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"ME0 chamber rawId: " << chamberId.rawId() <<
", detId: " << chamberId;
98 if (rollDetId.roll()==1) ++nChambers;
113 rota.GetComponents(x,y,z);
116 float(y.X()),
float(y.Y()),
float(y.Z()),
117 float(z.X()),
float(z.Y()),
float(z.Z()));
119 float be = dpar[4]/cm;
120 float te = dpar[8]/cm;
121 float ap = dpar[0]/cm;
127 std::vector<float> pars;
131 float nStrips = -999.;
133 pars.push_back(nStrips);
134 pars.push_back(nPads);
136 LogDebug(
"ME0GeometryBuilderFromDDD")
137 <<
"ME0 " << name <<
" par " << be <<
" " << te <<
" " << ap <<
" " << dpar[0];
162 std::vector<ME0DetId> vDetId;
164 int oldLayerNumber = 1;
165 for (
unsigned i=1;
i<=partitions.size(); ++
i){
166 ME0DetId detId(partitions.at(
i-1)->id());
167 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Making ME0DetId = " <<detId;
175 if (
layerNumber < oldLayerNumber ||
i == partitions.size()) {
178 if (
i == partitions.size()) vDetId.push_back(detId);
181 ME0DetId chamberId(fId.chamberId());
182 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"ME0DetId = " << fId ;
183 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"ME0ChamberId = " << chamberId ;
191 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Creating chamber " << chamberId <<
" with " << vDetId.size() <<
" eta partitions";
193 for(
auto id : vDetId){
194 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Adding eta partition " <<
id <<
" to ME0 chamber";
198 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Adding the chamber to the geometry";
202 vDetId.push_back(detId);
const std::vector< double > & parameters(void) const
Give the parameters of the solid.
const DDLogicalPart & logicalPart() const
The logical-part of the current node in the filtered-view.
ME0Geometry * build(const DDCompactView *cview, const MuonDDDConstants &muonConstants)
ME0GeometryBuilderFromDDD()
void addFilter(const DDFilter &, DDLogOp op=DDLogOp::AND)
bool nextSibling()
set the current node to the next sibling ...
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
void add(ME0EtaPartition *roll)
Add EtaPartition to the chamber which takes ownership.
const DDSolid & solid(void) const
Returns a reference object of the solid being the shape of this LogicalPart.
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return a etaPartition given its id.
type of data representation of DDCompactView
const DDGeoHistory & geoHistory() const
The list of ancestors up to the root-node of the current node.
TkRotation & rotateAxes(const Basic3DVector< T > &newX, const Basic3DVector< T > &newY, const Basic3DVector< T > &newZ)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
ME0Geometry * buildGeometry(DDFilteredView &fview, const MuonDDDConstants &muonConstants)
const std::vector< ME0EtaPartition const * > & etaPartitions() const
Return a vector of all ME0 eta partitions.
virtual int baseNumberToUnitNumber(const MuonBaseNumber &)
unsigned int layerNumber(align::ID, const TrackerTopology *)
Layer number increases with rho from 1 to 8.
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.
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.
void setCriteria(const DDValue &nameVal, DDCompOp, DDLogOp l=DDLogOp::AND, bool asString=true, bool merged=true)
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.