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  DDCompactView& cpv )
17 {
20  double zbot(0.), ztop(0.);
21  if( atts.find( "zBottomCut" ) != atts.end() )
22  {
23  zbot = ev.eval( nmspace, atts.find( "zBottomCut" )->second );
24  }
25  if( atts.find( "zTopCut" ) != atts.end() )
26  {
27  ztop = ev.eval( nmspace, atts.find( "zTopCut" )->second );
28  }
29  DDSolid ddel = DDSolidFactory::ellipsoid( getDDName( nmspace ),
30  ev.eval(nmspace, atts.find("xSemiAxis")->second),
31  ev.eval(nmspace, atts.find("ySemiAxis")->second),
32  ev.eval(nmspace, atts.find("zSemiAxis")->second),
33  zbot,
34  ztop );
35  DDLSolid::setReference( nmspace, cpv );
36 }
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:72
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:38
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:1033
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:79
void setReference(const std::string &nmspace, DDCompactView &cpv)
Definition: DDLSolid.cc:16