CMS 3D CMS Logo

DDLEllipsoid.cc
Go to the documentation of this file.
7 
8 class DDCompactView;
9 
11  : DDLSolid( myreg )
12 {}
13 
14 void
16 {
19  double zbot(0.), ztop(0.);
20  if( atts.find( "zBottomCut" ) != atts.end() )
21  {
22  zbot = ev.eval( nmspace, atts.find( "zBottomCut" )->second );
23  }
24  if( atts.find( "zTopCut" ) != atts.end() )
25  {
26  ztop = ev.eval( nmspace, atts.find( "zTopCut" )->second );
27  }
28  DDSolid ddel = DDSolidFactory::ellipsoid( getDDName( nmspace ),
29  ev.eval(nmspace, atts.find("xSemiAxis")->second),
30  ev.eval(nmspace, atts.find("ySemiAxis")->second),
31  ev.eval(nmspace, atts.find("zSemiAxis")->second),
32  zbot,
33  ztop );
34  DDLSolid::setReference( nmspace, cpv );
35 }
DDLElementRegistry * myRegistry_
Definition: DDXMLElement.h:172
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
Definition: DDXMLElement.cc:73
DDLEllipsoid(DDLElementRegistry *myreg)
Definition: DDLEllipsoid.cc:10
bool ev
type of data representation of DDCompactView
Definition: DDCompactView.h:90
std::map< std::string, std::string > DDXMLAttribute
Definition: DDXMLElement.h:45
A DDSolid represents the shape of a part.
Definition: DDSolid.h:37
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
Definition: DDLEllipsoid.cc:15
ClhepEvaluator & evaluator()
static DDSolid ellipsoid(const DDName &name, double xSemiAxis, double ySemiAxis, double zSemiAxis, double zBottomCut=0., double zTopCut=0.)
Definition: DDSolid.cc:865
DDLSolid processes Box elements.
Definition: DDLSolid.h:30
double eval(const std::string &ns, const std::string &expr)
The main class for processing parsed elements.
virtual const DDName getDDName(const std::string &defaultNS, const std::string &attname=std::string("name"), size_t aIndex=0)
Definition: DDXMLElement.cc:80
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:17