20 #include "CLHEP/Units/GlobalSystemOfUnits.h"
33 DCOUT_V(
'P',
"DDLTubs::processElement started");
37 bool cutInside(
false);
39 if (atts.find(
"cutInside") != atts.end()) {
40 cutInside = (atts.find(
"cutInside")->second ==
"true") ?
true :
false;
46 ev.
eval(nmspace, atts.find(
"dz")->second),
47 ev.
eval(nmspace, atts.find(
"rMin")->second),
48 ev.
eval(nmspace, atts.find(
"rMax")->second),
49 ev.
eval(nmspace, atts.find(
"startPhi")->second),
50 ev.
eval(nmspace, atts.find(
"deltaPhi")->second));
52 else if (name ==
"Tube")
55 ev.
eval(nmspace, atts.find(
"dz")->second),
56 ev.
eval(nmspace, atts.find(
"rMin")->second),
57 ev.
eval(nmspace, atts.find(
"rMax")->second),
61 else if (name ==
"TruncTubs")
64 ev.
eval(nmspace, atts.find(
"zHalf")->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(
"cutAtStart")->second),
70 ev.
eval(nmspace, atts.find(
"cutAtDelta")->second),
75 std::string
msg =
"\nDDLTubs::processElement could not process element.";
80 DCOUT_V(
'P',
"DDLTubs::processElement completed");
DDLTubs(DDLElementRegistry *myreg)
Constructor.
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv)
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.
~DDLTubs(void)
Destructor.
type of data representation of DDCompactView
std::map< std::string, std::string > DDXMLAttribute
A DDSolid represents the shape of a part.
static value_type & instance()
Interface of an Expression 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)
#define DCOUT_V(M_v_Y, M_v_S)
DDLSolid processes Box elements.
virtual double eval(const std::string &ns, const std::string &expr)=0
evaluate an expression expr inside the local namespace
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)