40 std::vector<double>
z,
r,
x,
y;
41 for (
size_t i = 0;
i < myRZPoints->size(); ++
i)
43 atts = myRZPoints->getAttributeSet(
i);
44 z.push_back(ev.
eval(nmspace, atts.find(
"z")->second));
45 r.push_back(ev.
eval(nmspace, atts.find(
"r")->second));
55 std::vector<double>
rMax;
57 for (
size_t i = 0;
i < myZSection->size(); ++
i)
59 atts = myZSection->getAttributeSet(
i);
60 z.push_back(ev.
eval(nmspace, atts.find(
"z")->second));
61 r.push_back(ev.
eval(nmspace, atts.find(
"rMin")->second));
62 rMax.push_back(ev.
eval(nmspace, atts.find(
"rMax")->second));
65 if (name ==
"Polycone")
69 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
70 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
75 else if (name ==
"Polyhedra")
79 ,
int (ev.
eval(nmspace, atts.find(
"numSide")->second))
80 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
81 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
88 else if (name ==
"Polycone")
93 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
94 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
98 else if (name ==
"Polyhedra")
103 ,
int (ev.
eval(nmspace, atts.find(
"numSide")->second))
104 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
105 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
110 std::string msg =
"\nDDLPolyGenerator::processElement was called with incorrect name of solid: " +
name;
DDLElementRegistry * myRegistry_
void processElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Processing the element.
void preProcessElement(const std::string &name, const std::string &nmspace, DDCompactView &cpv) override
Called by loadAttributes AFTER attributes are loaded.
DDLPolyGenerator(DDLElementRegistry *myreg)
static DDSolid polycone(const DDName &name, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polycone (refere to Geant3 or Geant4 documentation)
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.
ClhepEvaluator & evaluator()
std::shared_ptr< DDXMLElement > getElement(const std::string &name)
THE most important part. Getting the pointer to a given element type.
DDLSolid processes Box elements.
double eval(const std::string &ns, const std::string &expr)
The main class for processing parsed elements.
virtual void clear(void)
clear this element's contents.
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)
static DDSolid polyhedra(const DDName &name, int sides, double startPhi, double deltaPhi, const std::vector< double > &z, const std::vector< double > &rmin, const std::vector< double > &rmax)
Creates a polyhedra (refere to Geant3 or Geant4 documentation)