7 #include "CLHEP/Units/GlobalSystemOfUnits.h" 8 #include "CLHEP/Units/SystemOfUnits.h" 25 bool cutInside(
false);
27 if (atts.find(
"cutInside") != atts.end()) {
28 cutInside = (atts.find(
"cutInside")->second ==
"true") ?
true :
false;
34 ev.
eval(nmspace, atts.find(
"dz")->second),
35 ev.
eval(nmspace, atts.find(
"rMin")->second),
36 ev.
eval(nmspace, atts.find(
"rMax")->second),
37 ev.
eval(nmspace, atts.find(
"startPhi")->second),
38 ev.
eval(nmspace, atts.find(
"deltaPhi")->second));
40 else if (name ==
"Tube")
43 ev.
eval(nmspace, atts.find(
"dz")->second),
44 ev.
eval(nmspace, atts.find(
"rMin")->second),
45 ev.
eval(nmspace, atts.find(
"rMax")->second),
49 else if (name ==
"TruncTubs")
52 ev.
eval(nmspace, atts.find(
"zHalf")->second),
53 ev.
eval(nmspace, atts.find(
"rMin")->second),
54 ev.
eval(nmspace, atts.find(
"rMax")->second),
55 ev.
eval(nmspace, atts.find(
"startPhi")->second),
56 ev.
eval(nmspace, atts.find(
"deltaPhi")->second),
57 ev.
eval(nmspace, atts.find(
"cutAtStart")->second),
58 ev.
eval(nmspace, atts.find(
"cutAtDelta")->second),
61 else if (name ==
"CutTubs")
64 ev.
eval(nmspace, atts.find(
"dz")->second),
65 ev.
eval(nmspace, atts.find(
"rMin")->second),
66 ev.
eval(nmspace, atts.find(
"rMax")->second),
67 ev.
eval(nmspace, atts.find(
"startPhi")->second),
68 ev.
eval(nmspace, atts.find(
"deltaPhi")->second),
69 ev.
eval(nmspace, atts.find(
"lx")->second),
70 ev.
eval(nmspace, atts.find(
"ly")->second),
71 ev.
eval(nmspace, atts.find(
"lz")->second),
72 ev.
eval(nmspace, atts.find(
"tx")->second),
73 ev.
eval(nmspace, atts.find(
"ty")->second),
74 ev.
eval(nmspace, atts.find(
"tz")->second));
78 std::string msg =
"\nDDLTubs::processElement could not process element.";
DDLTubs(DDLElementRegistry *myreg)
DDLElementRegistry * myRegistry_
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
virtual const DDXMLAttribute & getAttributeSet(size_t aIndex=0) const
Get a "row" of attributes, i.e. one attribute set.
void throwError(const std::string &keyMessage) const
format std::string for throw an error.
type of data representation of DDCompactView
std::map< std::string, std::string > DDXMLAttribute
A DDSolid represents the shape of a part.
static DDSolid cuttubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi, double lx, double ly, double lz, double tx, double ty, double tz)
ClhepEvaluator & evaluator()
static DDSolid tubs(const DDName &name, double zhalf, double rIn, double rOut, double startPhi, double deltaPhi)
static DDSolid truncTubs(const DDName &name, double zHalf, double rIn, double rOut, double startPhi, double deltaPhi, double cutAtStart, double cutAtDelta, bool cutInside)
DDLSolid processes Box elements.
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)
void setReference(const std::string &nmspace, DDCompactView &cpv)