Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:55:08

0001 #include "DetectorDescription/Parser/src/DDLSphere.h"
0002 #include "DetectorDescription/Core/interface/DDSolid.h"
0003 #include "DetectorDescription/Core/interface/ClhepEvaluator.h"
0004 #include "DetectorDescription/Parser/interface/DDLElementRegistry.h"
0005 #include "DetectorDescription/Parser/src/DDLSolid.h"
0006 #include "DetectorDescription/Parser/src/DDXMLElement.h"
0007 
0008 #include <map>
0009 #include <utility>
0010 
0011 class DDCompactView;
0012 
0013 DDLSphere::DDLSphere(DDLElementRegistry* myreg) : DDLSolid(myreg) {}
0014 
0015 // Upon encountering the end of the Sphere element, call DDCore.
0016 void DDLSphere::processElement(const std::string& name, const std::string& nmspace, DDCompactView& cpv) {
0017   ClhepEvaluator& ev = myRegistry_->evaluator();
0018   DDXMLAttribute atts = getAttributeSet();
0019   DDSolid ddsphere = DDSolidFactory::sphere(getDDName(nmspace),
0020                                             ev.eval(nmspace, atts.find("innerRadius")->second),
0021                                             ev.eval(nmspace, atts.find("outerRadius")->second),
0022                                             ev.eval(nmspace, atts.find("startPhi")->second),
0023                                             ev.eval(nmspace, atts.find("deltaPhi")->second),
0024                                             ev.eval(nmspace, atts.find("startTheta")->second),
0025                                             ev.eval(nmspace, atts.find("deltaTheta")->second));
0026 
0027   DDLSolid::setReference(nmspace, cpv);
0028 }