23 #include "CLHEP/Units/GlobalSystemOfUnits.h"
38 DDValue val(attribute, value, 0.0);
56 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"Building the geometry service";
59 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"About to run through the RPC structure\n"
60 <<
" First logical part "
64 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"doSubDets = " << doSubDets;
66 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"start the loop";
70 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"Getting the Muon base Number";
72 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"Start the Rpc Numbering Schema";
77 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"Getting the Unit Number";
79 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"Getting the RPC det Id "<<detid;
84 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"The RPCDetid is "<<rpcid;
86 DDValue numbOfStrips(
"nStrips");
88 std::vector<const DDsvalues_type* > specs(fview.
specifics());
89 std::vector<const DDsvalues_type* >::iterator is=specs.begin();
91 for (;is!=specs.end(); is++){
92 if (
DDfetch( *is, numbOfStrips)){
93 nStrips=int(numbOfStrips.
doubles()[0]);
97 LogDebug(
"RPCGeometryBuilderFromDDD") << ((nStrips == 0 ) ? (
"No strip found!!") : (
""));
112 rota.GetComponents(x,y,z);
115 float(y.X()),
float(y.Y()),
float(y.Z()),
116 float(z.X()),
float(z.Y()),
float(z.Z()));
118 std::vector<float> pars;
125 float width = dpar[0]/cm;
126 float length = dpar[1]/cm;
127 float thickness = dpar[2]/cm;
131 pars.push_back(width);
132 pars.push_back(length);
133 pars.push_back(numbOfStrips.
doubles()[0]);
139 if (tran.z() >-1500. ){
148 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"Barrel "<<name
150 <<
" "<<length<<
" "<<thickness;
153 float be = dpar[4]/cm;
154 float te = dpar[8]/cm;
155 float ap = dpar[0]/cm;
160 pars.push_back(dpar[4]/cm);
161 pars.push_back(dpar[8]/cm);
162 pars.push_back(dpar[0]/cm);
163 pars.push_back(numbOfStrips.
doubles()[0]);
165 LogDebug(
"RPCGeometryBuilderFromDDD") <<
"Forward "<<name
166 <<
" par "<<dpar[4]/cm
167 <<
" "<<dpar[8]/cm<<
" "<<dpar[3]/cm<<
" "
181 LogDebug(
"RPCGeometryBuilderFromDDD") <<
" Number of strips "<<nStrips;
188 std::list<RPCRoll *> rls;
198 for( std::map<
RPCDetId, std::list<RPCRoll *> >::iterator ich=
chids.begin();
199 ich !=
chids.end(); ich++){
201 std::list<RPCRoll * > rls = ich->second;
206 for(std::list<RPCRoll *>::iterator rl=rls.begin();
207 rl!=rls.end(); rl++){
216 for(std::list<RPCRoll *>::iterator rl=rls.begin();
217 rl!=rls.end(); rl++){
virtual int baseNumberToUnitNumber(const MuonBaseNumber &)
void add(RPCRoll *rl)
Add Roll to the chamber which takes ownership.
~RPCGeometryBuilderFromDDD()
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.
const std::vector< double > & doubles() const
a reference to the double-valued values stored in the given instance of DDValue
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.
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.
RPCGeometry * build(const DDCompactView *cview, const MuonDDDConstants &muonConstants)
bool DDfetch(const DDsvalues_type *, DDValue &)
helper for retrieving DDValues from DDsvalues_type *.
void add(RPCRoll *roll)
Add a RPC roll to the Geometry.
TkRotation & rotateAxes(const Basic3DVector< T > &newX, const Basic3DVector< T > &newY, const Basic3DVector< T > &newZ)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DDTranslation
RPCGeometry * buildGeometry(DDFilteredView &fview, const MuonDDDConstants &muonConstants)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
A DD Translation is currently implemented with Root Vector3D.
std::map< RPCDetId, std::list< RPCRoll * > > chids
RPCGeometryBuilderFromDDD(bool comp11)
int sector() const
Sector id: the group of chambers at same phi (and increasing r)
ESHandle< TrackerGeometry > geometry
int subsector() const
SubSector id : some sectors are divided along the phi direction in subsectors (from 1 to 4 in Barrel...
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
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)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
The DDGenericFilter is a runtime-parametrized Filter looking on DDSpecifcs.