33 std::vector<double>
z,
r,
x,
y;
34 for (
size_t i = 0;
i < myRZPoints->size(); ++
i) {
35 atts = myRZPoints->getAttributeSet(
i);
36 z.emplace_back(ev.
eval(nmspace, atts.find(
"z")->second));
37 r.emplace_back(ev.
eval(nmspace, atts.find(
"r")->second));
46 std::vector<double> rMax;
48 for (
size_t i = 0;
i < myZSection->size(); ++
i) {
49 atts = myZSection->getAttributeSet(
i);
50 z.emplace_back(ev.
eval(nmspace, atts.find(
"z")->second));
51 r.emplace_back(ev.
eval(nmspace, atts.find(
"rMin")->second));
52 rMax.emplace_back(ev.
eval(nmspace, atts.find(
"rMax")->second));
55 if (name ==
"Polycone")
58 ev.
eval(nmspace, atts.find(
"startPhi")->second),
59 ev.
eval(nmspace, atts.find(
"deltaPhi")->second),
63 }
else if (name ==
"Polyhedra")
66 int(ev.
eval(nmspace, atts.find(
"numSide")->second)),
67 ev.
eval(nmspace, atts.find(
"startPhi")->second),
68 ev.
eval(nmspace, atts.find(
"deltaPhi")->second),
74 }
else if (name ==
"Polycone")
78 ev.
eval(nmspace, atts.find(
"startPhi")->second),
79 ev.
eval(nmspace, atts.find(
"deltaPhi")->second),
82 }
else if (name ==
"Polyhedra")
86 int(ev.
eval(nmspace, atts.find(
"numSide")->second)),
87 ev.
eval(nmspace, atts.find(
"startPhi")->second),
88 ev.
eval(nmspace, atts.find(
"deltaPhi")->second),
92 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.
Compact representation of the geometrical detector hierarchy.
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)