39 std::vector<double>
z,
r,
x,
y;
40 for (
size_t i = 0;
i < myRZPoints->size(); ++
i)
42 atts = myRZPoints->getAttributeSet(
i);
43 z.emplace_back(ev.
eval(nmspace, atts.find(
"z")->second));
44 r.emplace_back(ev.
eval(nmspace, atts.find(
"r")->second));
54 std::vector<double>
rMax;
56 for (
size_t i = 0;
i < myZSection->size(); ++
i)
58 atts = myZSection->getAttributeSet(
i);
59 z.emplace_back(ev.
eval(nmspace, atts.find(
"z")->second));
60 r.emplace_back(ev.
eval(nmspace, atts.find(
"rMin")->second));
61 rMax.emplace_back(ev.
eval(nmspace, atts.find(
"rMax")->second));
64 if (name ==
"Polycone")
68 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
69 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
74 else if (name ==
"Polyhedra")
78 ,
int (ev.
eval(nmspace, atts.find(
"numSide")->second))
79 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
80 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
87 else if (name ==
"Polycone")
92 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
93 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
97 else if (name ==
"Polyhedra")
102 ,
int (ev.
eval(nmspace, atts.find(
"numSide")->second))
103 , ev.
eval(nmspace, atts.find(
"startPhi")->second)
104 , ev.
eval(nmspace, atts.find(
"deltaPhi")->second)
109 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)