25 #include "CLHEP/Units/GlobalSystemOfUnits.h" 30 #include <boost/lexical_cast.hpp> 34 LogDebug(
"ME0GeometryBuilderfromDDD") <<
"[ME0GeometryBuilderFromDDD::constructor]";
54 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Building the geometry service";
57 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"About to run through the ME0 structure\n" 58 <<
" First logical part " 64 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"doSubDets = " << doSubDets;
66 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"start the loop";
73 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Getting the Muon base Number";
76 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Start the ME0 Numbering Schema";
80 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"ME0 eta partition rawId: " << rollDetId.rawId() <<
", detId: " << rollDetId;
83 ME0DetId chamberId(rollDetId.chamberId());
84 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"ME0 chamber rawId: " << chamberId.rawId() <<
", detId: " << chamberId;
90 if (rollDetId.roll()==1) ++nChambers;
105 rota.GetComponents(x,y,z);
108 float(y.X()),
float(y.Y()),
float(y.Z()),
109 float(z.X()),
float(z.Y()),
float(z.Z()));
111 float be = dpar[4]/cm;
112 float te = dpar[8]/cm;
113 float ap = dpar[0]/cm;
119 std::vector<float> pars;
123 float nStrips = -999.;
125 pars.push_back(nStrips);
126 pars.push_back(nPads);
128 LogDebug(
"ME0GeometryBuilderFromDDD")
129 <<
"ME0 " << name <<
" par " << be <<
" " << te <<
" " << ap <<
" " << dpar[0];
145 ME0DetId rollDetId2(rollDetId.region(),rollDetId.layer(),rollDetId.station(),1);
149 ME0DetId layerDetId(rollDetId.layerId());
168 std::vector<ME0DetId> vDetId;
170 int oldLayerNumber = 1;
171 for (
unsigned i=1;
i<=partitions.size(); ++
i){
172 ME0DetId detId(partitions.at(
i-1)->id());
173 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Making ME0DetId = " <<detId;
180 const int layerNumber(detId.layer());
181 if (layerNumber < oldLayerNumber ||
i == partitions.size()) {
184 if (
i == partitions.size()) vDetId.push_back(detId);
187 ME0DetId chamberId(fId.chamberId());
188 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"ME0DetId = " << fId ;
189 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"ME0ChamberId = " << chamberId ;
197 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Creating chamber " << chamberId <<
" with " << vDetId.size() <<
" eta partitions";
199 for(
auto id : vDetId){
200 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Adding eta partition " <<
id <<
" to ME0 chamber";
204 LogDebug(
"ME0GeometryBuilderFromDDD") <<
"Adding the chamber to the geometry";
208 vDetId.push_back(detId);
209 oldLayerNumber = layerNumber;
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()
bool nextSibling()
set the current node to the next sibling ...
const DDRotationMatrix & rotation() const
The absolute rotation of the current node.
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.
void add(ME0Layer *layer)
Add Layer to the chamber which takes ownership.
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 &)
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.