134 for (
Int_t i = 0; i < 20; i++)
203 const char *posistr =
"position";
204 const char *setustr =
"setup";
205 const char *consstr =
"constant";
206 const char *varistr =
"variable";
207 const char *quanstr =
"quantity";
208 const char *matrstr =
"matrix";
209 const char *rotastr =
"rotation";
210 const char *scalstr =
"scale";
211 const char *elemstr =
"element";
212 const char *istpstr =
"isotope";
213 const char *matestr =
"material";
214 const char *volustr =
"volume";
215 const char *assestr =
"assembly";
216 const char *twtrstr =
"twistedtrap";
217 const char *cutTstr =
"cutTube";
218 const char *bboxstr =
"box";
219 const char *xtrustr =
"xtru";
220 const char *arb8str =
"arb8";
221 const char *tubestr =
"tube";
222 const char *conestr =
"cone";
223 const char *polystr =
"polycone";
224 const char *hypestr =
"hype";
225 const char *trapstr =
"trap";
226 const char *trdstr =
"trd";
227 const char *sphestr =
"sphere";
228 const char *orbstr =
"orb";
229 const char *parastr =
"para";
230 const char *torustr =
"torus";
231 const char *hedrstr =
"polyhedra";
232 const char *eltustr =
"eltube";
233 const char *subtstr =
"subtraction";
234 const char *uniostr =
"union";
235 const char *parbstr =
"paraboloid";
236 const char *intestr =
"intersection";
237 const char *reflstr =
"reflectedSolid";
238 const char *ellistr =
"ellipsoid";
239 const char *elcnstr =
"elcone";
240 const char *optsstr =
"opticalsurface";
241 const char *skinstr =
"skinsurface";
242 const char *bordstr =
"bordersurface";
243 const char *usrstr =
"userinfo";
244 const char *tslstr =
"tessellated";
246 Bool_t hasIsotopesExtended;
248 if ((strcmp(
name, posistr)) == 0) {
250 }
else if ((strcmp(
name, rotastr)) == 0) {
252 }
else if ((strcmp(
name, scalstr)) == 0) {
254 }
else if ((strcmp(
name, setustr)) == 0) {
256 }
else if ((strcmp(
name, consstr)) == 0) {
258 }
else if ((strcmp(
name, varistr)) == 0) {
260 }
else if ((strcmp(
name, quanstr)) == 0) {
262 }
else if ((strcmp(
name, matrstr)) == 0) {
264 }
else if ((strcmp(
name, optsstr)) == 0) {
266 }
else if ((strcmp(
name, skinstr)) == 0) {
268 }
else if ((strcmp(
name, bordstr)) == 0) {
273 else if (((strcmp(
name,
"atom")) == 0) && ((strcmp(parent, elemstr)) == 0)) {
275 hasIsotopesExtended =
kFALSE;
276 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
277 }
else if ((strcmp(
name, elemstr) == 0) && !gdml->
HasAttr(node,
"Z")) {
279 hasIsotopesExtended =
kFALSE;
280 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
283 else if ((strcmp(
name, elemstr) == 0) && gdml->
HasAttr(node,
"Z")) {
285 if ((strcmp(gdml->
GetNodeName(childtmp),
"fraction") == 0)) {
287 hasIsotopesExtended =
kTRUE;
288 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
294 else if (((strcmp(
name,
"atom")) == 0) && ((strcmp(parent, istpstr)) == 0)) {
299 else if ((strcmp(
name, matestr)) == 0 && gdml->
HasAttr(node,
"Z")) {
307 atom = strcmp(gdml->
GetNodeName(childtmp),
"atom") == 0;
310 int z = (atom) ? 1 : 0;
312 }
else if ((strcmp(
name, matestr)) == 0 && !gdml->
HasAttr(node,
"Z")) {
318 else if ((strcmp(
name, volustr)) == 0) {
320 }
else if ((strcmp(
name, bboxstr)) == 0) {
321 node =
Box(gdml, node, attr);
322 }
else if ((strcmp(
name, ellistr)) == 0) {
324 }
else if ((strcmp(
name, elcnstr)) == 0) {
325 node =
ElCone(gdml, node, attr);
326 }
else if ((strcmp(
name, cutTstr)) == 0) {
327 node =
CutTube(gdml, node, attr);
328 }
else if ((strcmp(
name, arb8str)) == 0) {
329 node =
Arb8(gdml, node, attr);
330 }
else if ((strcmp(
name, tubestr)) == 0) {
331 node =
Tube(gdml, node, attr);
332 }
else if ((strcmp(
name, conestr)) == 0) {
333 node =
Cone(gdml, node, attr);
334 }
else if ((strcmp(
name, polystr)) == 0) {
336 }
else if ((strcmp(
name, trapstr)) == 0) {
337 node =
Trap(gdml, node, attr);
338 }
else if ((strcmp(
name, trdstr)) == 0) {
339 node =
Trd(gdml, node, attr);
340 }
else if ((strcmp(
name, sphestr)) == 0) {
341 node =
Sphere(gdml, node, attr);
342 }
else if ((strcmp(
name, xtrustr)) == 0) {
343 node =
Xtru(gdml, node, attr);
344 }
else if ((strcmp(
name, twtrstr)) == 0) {
346 }
else if ((strcmp(
name, hypestr)) == 0) {
347 node =
Hype(gdml, node, attr);
348 }
else if ((strcmp(
name, orbstr)) == 0) {
349 node =
Orb(gdml, node, attr);
350 }
else if ((strcmp(
name, parastr)) == 0) {
351 node =
Para(gdml, node, attr);
352 }
else if ((strcmp(
name, torustr)) == 0) {
353 node =
Torus(gdml, node, attr);
354 }
else if ((strcmp(
name, eltustr)) == 0) {
355 node =
ElTube(gdml, node, attr);
356 }
else if ((strcmp(
name, hedrstr)) == 0) {
358 }
else if ((strcmp(
name, tslstr)) == 0) {
360 }
else if ((strcmp(
name, parbstr)) == 0) {
362 }
else if ((strcmp(
name, subtstr)) == 0) {
363 node =
BooSolid(gdml, node, attr, 1);
364 }
else if ((strcmp(
name, intestr)) == 0) {
365 node =
BooSolid(gdml, node, attr, 2);
366 }
else if ((strcmp(
name, uniostr)) == 0) {
367 node =
BooSolid(gdml, node, attr, 3);
368 }
else if ((strcmp(
name, reflstr)) == 0) {
370 }
else if ((strcmp(
name, assestr)) == 0) {
372 }
else if ((strcmp(
name, usrstr)) == 0) {
375 }
else if (((strcmp(
name,
"gdml")) != 0) && ((strcmp(
name,
"define")) != 0) && ((strcmp(
name,
"element")) != 0) &&
376 ((strcmp(
name,
"materials")) != 0) && ((strcmp(
name,
"solids")) != 0) &&
377 ((strcmp(
name,
"structure")) != 0) && ((strcmp(
name,
"zplane")) != 0) && ((strcmp(
name,
"first")) != 0) &&
378 ((strcmp(
name,
"second")) != 0) && ((strcmp(
name,
"twoDimVertex")) != 0) &&
379 ((strcmp(
name,
"firstposition")) != 0) && ((strcmp(
name,
"firstpositionref")) != 0) &&
380 ((strcmp(
name,
"firstrotation")) != 0) && ((strcmp(
name,
"firstrotationref")) != 0) &&
381 ((strcmp(
name,
"section")) != 0) && ((strcmp(
name,
"world")) != 0) && ((strcmp(
name,
"isotope")) != 0) &&
382 ((strcmp(
name,
"triangular")) != 0) && ((strcmp(
name,
"quadrangular")) != 0)) {
383 std::cout <<
"Error: Unsupported GDML Tag Used :" <<
name <<
". Please Check Geometry/Schema." << std::endl;
415 if ((strcmp(axisString,
"kXAxis")) == 0) {
417 }
else if ((strcmp(axisString,
"kYAxis")) == 0) {
419 }
else if ((strcmp(axisString,
"kZAxis")) == 0) {
421 }
else if ((strcmp(axisString,
"kRho")) == 0) {
423 }
else if ((strcmp(axisString,
"kPhi")) == 0) {
442 stripped = stripped(0, index);
443 return stripped.
Data();
462 if (tempattr ==
"name") {
465 if (tempattr ==
"value") {
536 if (tempattr ==
"name") {
539 if (tempattr ==
"value") {
542 if (tempattr ==
"unit") {
567 if (tempattr ==
"name") {
570 if (tempattr ==
"coldim") {
573 if (tempattr ==
"values") {
580 std::stringstream valueStream(values);
581 std::vector<Double_t> valueList;
582 while (!valueStream.eof()) {
583 std::string matrixValue;
584 valueStream >> matrixValue;
586 if (matrixValue.empty())
588 valueList.push_back(
Value(matrixValue.c_str()));
593 for (
size_t i = 0; i < valueList.size(); ++i)
594 matrix->
Set(i / coldim, i % coldim, valueList[i]);
618 if (tempattr ==
"name") {
621 if (tempattr ==
"model") {
624 if (tempattr ==
"finish") {
627 if (tempattr ==
"type") {
630 if (tempattr ==
"value") {
641 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
645 if (tempattr ==
"name") {
647 }
else if (tempattr ==
"ref") {
651 Error(
"OpticalSurfaceProcess",
"Reference matrix %s for optical surface %s not found", ref.
Data(),
674 if (strcmp(unit,
"mm") == 0) {
676 }
else if (strcmp(unit,
"millimeter") == 0 || strcmp(unit,
"milimeter") == 0) {
678 }
else if (strcmp(unit,
"cm") == 0) {
680 }
else if (strcmp(unit,
"centimeter") == 0) {
682 }
else if (strcmp(unit,
"m") == 0) {
684 }
else if (strcmp(unit,
"meter") == 0) {
686 }
else if (strcmp(unit,
"km") == 0) {
687 retunit =
"100000.0";
688 }
else if (strcmp(unit,
"kilometer") == 0) {
689 retunit =
"100000.0";
690 }
else if (strcmp(unit,
"rad") == 0) {
692 }
else if (strcmp(unit,
"radian") == 0) {
694 }
else if (strcmp(unit,
"deg") == 0) {
696 }
else if (strcmp(unit,
"degree") == 0) {
698 }
else if (strcmp(unit,
"pi") == 0) {
700 }
else if (strcmp(unit,
"avogadro") == 0) {
703 Fatal(
"GetScale",
"Unit <%s> not known", unit);
722 if ((unit ==
"mm") || (unit ==
"millimeter") || (unit ==
"milimeter")) {
724 }
else if ((unit ==
"cm") || (unit ==
"centimeter")) {
726 }
else if ((unit ==
"m") || (unit ==
"meter")) {
728 }
else if ((unit ==
"km") || (unit ==
"kilometer")) {
730 }
else if ((unit ==
"rad") || (unit ==
"radian")) {
732 }
else if ((unit ==
"deg") || (unit ==
"degree")) {
734 }
else if ((unit ==
"ev") || (unit ==
"electronvolt")) {
736 }
else if ((unit ==
"kev") || (unit ==
"kiloelectronvolt")) {
738 }
else if ((unit ==
"mev") || (unit ==
"megaelectronvolt")) {
740 }
else if ((unit ==
"gev") || (unit ==
"gigaelectronvolt")) {
742 }
else if (unit ==
"pi") {
744 }
else if (unit ==
"avogadro") {
747 Fatal(
"GetScaleVal",
"Unit <%s> not known", sunit);
759 double val = strtod(svalue, &end);
762 while (*end != 0 && isspace(*end))
774 std::string expanded;
775 expanded.reserve(strlen(svalue) * 2);
779 const std::locale &loc = std::locale::classic();
782 const char *p = svalue;
785 for (; *p != 0; ++p) {
786 if (std::isalpha(*p, loc) || *p ==
'_') {
787 const char *pe = p + 1;
790 for (; *pe != 0; ++pe) {
791 if (!isalnum(*pe, loc) && *pe !=
'_') {
817 TFormula f(
"TFormula", expanded.c_str());
821 f.SetParameter(it.first.c_str(), it.second);
826 Fatal(
"Value",
"Got bad value %lf from string '%s'", val, svalue);
853 if (tempattr ==
"name") {
855 }
else if (tempattr ==
"x") {
857 }
else if (tempattr ==
"y") {
859 }
else if (tempattr ==
"z") {
861 }
else if (tempattr ==
"unit") {
905 if (tempattr ==
"name") {
907 }
else if (tempattr ==
"x") {
909 }
else if (tempattr ==
"y") {
911 }
else if (tempattr ==
"z") {
913 }
else if (tempattr ==
"unit") {
961 if (tempattr ==
"name") {
963 }
else if (tempattr ==
"x") {
965 }
else if (tempattr ==
"y") {
967 }
else if (tempattr ==
"z") {
1009 if (tempattr ==
"name") {
1011 }
else if (tempattr ==
"z") {
1013 }
else if (tempattr ==
"n") {
1028 if (tempattr ==
"value") {
1049 }
else if (
gDebug >= 2) {
1050 Info(
"TGDMLParse",
"Re-use existing isotope: %s", iso->
GetName());
1088 if (tempattr ==
"name") {
1100 while (child != 0) {
1103 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1106 ncompo = ncompo + 1;
1111 if (tempattr ==
"n") {
1113 }
else if (tempattr ==
"ref") {
1121 fracmap[ref.
Data()] =
n;
1128 if (ele && ele->
Z() == 0)
1132 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1137 }
else if (
gDebug >= 2) {
1138 Info(
"TGDMLParse",
"Re-use existing element: %s", ele->
GetName());
1146 if (hasIsotopesExtended) {
1151 if (tempattr ==
"name") {
1163 while (child != 0) {
1166 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1169 ncompo = ncompo + 1;
1174 if (tempattr ==
"n") {
1176 }
else if (tempattr ==
"ref") {
1184 fracmap[ref.
Data()] =
n;
1191 if (ele && ele->
Z() == 0)
1195 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1200 }
else if (
gDebug >= 2) {
1201 Info(
"TGDMLParse",
"Re-use existing element: %s", ele->
GetName());
1215 if (tempattr ==
"name") {
1218 }
else if (tempattr ==
"z") {
1220 }
else if (tempattr ==
"formula") {
1236 if (tempattr ==
"value") {
1251 if (ele && ele->
Z() == 0)
1256 }
else if (
gDebug >= 2) {
1257 Info(
"TGDMLParse",
"Re-use existing element: %s", ele->
GetName());
1282 TList properties, constproperties;
1289 Int_t ncompo = 0, mixflag = 2;
1307 while (child != 0) {
1310 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
1316 if (tempattr ==
"name") {
1318 }
else if (tempattr ==
"ref") {
1322 properties.
Add(property);
1327 Error(
"MatProcess",
"Reference %s for material %s not found", property->GetTitle(),
1330 constproperties.
Add(property);
1337 if ((strcmp(gdml->
GetNodeName(child),
"atom")) == 0) {
1342 if (tempattr ==
"value") {
1349 if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1354 if (tempattr ==
"value") {
1364 tempconst = gdml->
GetAttr(node,
"Z");
1371 if (tmpname ==
"vacuum") {
1379 Info(
"TGDMLParse",
"Re-use existing material: %s", mat->
GetName());
1383 TIter next(&properties);
1384 while ((property = (
TNamed *)next()))
1387 if (constproperties.
GetSize()) {
1389 TIter next(&constproperties);
1390 while ((property = (
TNamed *)next()))
1397 if (mat_ele && mat_ele->
Z() == 0)
1401 mat_ele =
new TGeoElement(mat_name, mat_name, atoi(tempconst),
a);
1402 }
else if (
gDebug >= 2) {
1403 Info(
"TGDMLParse",
"Re-use existing material-element: %s", mat_ele->
GetName());
1409 while (child != 0) {
1412 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
1418 if (tempattr ==
"name") {
1420 }
else if (tempattr ==
"ref") {
1424 properties.
Add(property);
1429 Error(
"MatProcess",
"Reference %s for material %s not found", property->GetTitle(),
1432 constproperties.
Add(property);
1438 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1441 ncompo = ncompo + 1;
1447 if (tempattr ==
"n") {
1449 }
else if (tempattr ==
"ref") {
1457 fracmap[ref.
Data()] =
n;
1460 else if ((strcmp(gdml->
GetNodeName(child),
"composite")) == 0) {
1464 ncompo = ncompo + 1;
1469 if (tempattr ==
"n") {
1471 }
else if (tempattr ==
"ref") {
1479 fracmap[ref.
Data()] =
n;
1480 }
else if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1485 if (tempattr ==
"value") {
1508 Info(
"TGDMLParse",
"Re-use existing material-mixture: %s", mix->
GetName());
1510 Fatal(
"TGDMLParse",
"WARNING! Inconsistent material definitions between GDML and TGeoManager");
1515 TIter next(&properties);
1516 while ((property = (
TNamed *)next()))
1519 if (constproperties.
GetSize()) {
1521 TIter next(&constproperties);
1522 while ((property = (
TNamed *)next()))
1528 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1536 natoms = (
Int_t)
f->second;
1561 }
else if (mixflag == 0) {
1565 }
else if (
gDebug >= 2) {
1566 Info(
"TGDMLParse",
"Re-use existing medium: %s", med->
GetName());
1585 if (tempattr ==
"name") {
1588 if (tempattr ==
"surfaceproperty") {
1595 while (child != 0) {
1597 if ((strcmp(gdml->
GetNodeName(child),
"volumeref")) == 0) {
1601 if (tempattr ==
"ref") {
1611 Fatal(
"SkinSurfaceProcess",
"Skin surface %s: referenced optical surface %s not defined",
name.Data(),
1631 if (tempattr ==
"name") {
1634 if (tempattr ==
"surfaceproperty") {
1642 while (child != 0) {
1644 if ((strcmp(gdml->
GetNodeName(child),
"physvolref")) == 0) {
1648 if (tempattr ==
"ref") {
1657 Fatal(
"BorderSurfaceProcess",
"Border surface %s not referencing two nodes",
name.Data());
1660 Fatal(
"BorderSurfaceProcess",
"Border surface %s: referenced optical surface %s not defined",
name.Data(),
1664 if (!node1 || !node2)
1665 Fatal(
"BorderSurfaceProcess",
"Border surface %s: not found nodes %s [%s] or %s [%s]",
name.Data(),
1666 nodename[0].
Data(), node1 ?
"present" :
"missing", nodename[1].
Data(), node2 ?
"present" :
"missing");
1708 while (child != 0) {
1709 if ((strcmp(gdml->
GetNodeName(child),
"solidref")) == 0) {
1711 reftemp = gdml->
GetAttr(child,
"ref");
1718 solidname = reftemp;
1721 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
1725 if ((strcmp(gdml->
GetNodeName(child),
"materialref")) == 0) {
1726 reftemp = gdml->
GetAttr(child,
"ref");
1733 printf(
"Medium: %s, Not Yet Defined!\n", gdml->
GetAttr(child,
"ref"));
1762 while (child != 0) {
1763 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
1776 while (subchild != 0) {
1780 if (tempattr ==
"volumeref") {
1781 reftemp = gdml->
GetAttr(subchild,
"ref");
1787 }
else if (tempattr ==
"file") {
1788 const char *filevol;
1792 filevol = gdml->
GetAttr(subchild,
"volname");
1797 if (filedoc1 == 0) {
1829 }
else if (tempattr ==
"position") {
1832 reftemp = gdml->
GetAttr(subchild,
"name");
1837 }
else if (tempattr ==
"positionref") {
1838 reftemp = gdml->
GetAttr(subchild,
"ref");
1845 std::cout <<
"ERROR! Physvol's position " << reftemp <<
" not found!" << std::endl;
1846 }
else if (tempattr ==
"rotation") {
1849 reftemp = gdml->
GetAttr(subchild,
"name");
1854 }
else if (tempattr ==
"rotationref") {
1855 reftemp = gdml->
GetAttr(subchild,
"ref");
1862 std::cout <<
"ERROR! Physvol's rotation " << reftemp <<
" not found!" << std::endl;
1863 }
else if (tempattr ==
"scale") {
1866 reftemp = gdml->
GetAttr(subchild,
"name");
1871 }
else if (tempattr ==
"scaleref") {
1872 reftemp = gdml->
GetAttr(subchild,
"ref");
1879 std::cout <<
"ERROR! Physvol's scale " << reftemp <<
" not found!" << std::endl;
1882 subchild = gdml->
GetNext(subchild);
1898 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
1901 scale3x3[0] = diagonal[0];
1902 scale3x3[4] = diagonal[1];
1903 scale3x3[8] = diagonal[2];
1932 }
else if ((strcmp(gdml->
GetNodeName(child),
"divisionvol")) == 0) {
1948 if (tempattr ==
"axis") {
1950 }
else if (tempattr ==
"number") {
1952 }
else if (tempattr ==
"width") {
1954 }
else if (tempattr ==
"offset") {
1956 }
else if (tempattr ==
"unit") {
1965 while (subchild != 0) {
1969 if (tempattr ==
"volumeref") {
1970 reftemp = gdml->
GetAttr(subchild,
"ref");
1974 divVolref = reftemp;
1977 subchild = gdml->
GetNext(subchild);
2002 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2012 else if ((strcmp(gdml->
GetNodeName(child),
"replicavol")) == 0) {
2031 if (tempattr ==
"number") {
2039 while (subchild != 0) {
2043 if (tempattr ==
"volumeref") {
2044 reftemp = gdml->
GetAttr(subchild,
"ref");
2048 divVolref = reftemp;
2051 if (tempattr ==
"replicate_along_axis") {
2052 subsubchild = gdml->
GetChild(subchild);
2054 while (subsubchild != 0) {
2055 if ((strcmp(gdml->
GetNodeName(subsubchild),
"width")) == 0) {
2060 if (tempattr ==
"value") {
2062 }
else if (tempattr ==
"unit") {
2068 }
else if ((strcmp(gdml->
GetNodeName(subsubchild),
"offset")) == 0) {
2073 if (tempattr ==
"value") {
2075 }
else if (tempattr ==
"unit") {
2080 }
else if ((strcmp(gdml->
GetNodeName(subsubchild),
"direction")) == 0) {
2085 if (tempattr ==
"x") {
2087 }
else if (tempattr ==
"y") {
2089 }
else if (tempattr ==
"z") {
2091 }
else if (tempattr ==
"rho") {
2093 }
else if (tempattr ==
"phi") {
2101 subsubchild = gdml->
GetNext(subsubchild);
2105 subchild = gdml->
GetNext(subchild);
2112 Double_t widthline = wvalue * retwunit;
2113 Double_t offsetline = ovalue * retounit;
2133 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2142 else if (strcmp(gdml->
GetNodeName(child),
"auxiliary") == 0) {
2143 TString auxType, auxUnit, auxValue;
2146 auxmap =
new TMap();
2153 else if (!strcmp(gdml->
GetAttrName(attr),
"auxvalue"))
2155 else if (!strcmp(gdml->
GetAttrName(attr),
"auxunit"))
2210 while (child != 0) {
2214 if (tempattr ==
"first") {
2215 reftemp = gdml->
GetAttr(child,
"ref");
2222 }
else if (tempattr ==
"second") {
2223 reftemp = gdml->
GetAttr(child,
"ref");
2230 }
else if (tempattr ==
"position") {
2233 reftemp = gdml->
GetAttr(child,
"name");
2238 }
else if (tempattr ==
"positionref") {
2239 reftemp = gdml->
GetAttr(child,
"ref");
2246 }
else if (tempattr ==
"rotation") {
2249 reftemp = gdml->
GetAttr(child,
"name");
2254 }
else if (tempattr ==
"rotationref") {
2255 reftemp = gdml->
GetAttr(child,
"ref");
2262 }
else if (tempattr ==
"firstposition") {
2265 reftemp = gdml->
GetAttr(child,
"name");
2270 }
else if (tempattr ==
"firstpositionref") {
2271 reftemp = gdml->
GetAttr(child,
"ref");
2278 }
else if (tempattr ==
"firstrotation") {
2281 reftemp = gdml->
GetAttr(child,
"name");
2286 }
else if (tempattr ==
"firstrotationref") {
2287 reftemp = gdml->
GetAttr(child,
"ref");
2303 Fatal(
"BooSolid",
"Incomplete solid %s, missing shape components",
name.Data());
2330 TString nodename, auxtype, auxtypec, auxvalue, auxvaluec, auxunit, auxunitc;
2336 if (nodename ==
"auxiliary") {
2337 auxtype = gdml->
GetAttr(child,
"auxtype");
2338 auxvalue = gdml->
GetAttr(child,
"auxvalue");
2339 if (auxtype ==
"Region") {
2346 auxtypec = gdml->
GetAttr(subchild,
"auxtype");
2347 auxvaluec = gdml->
GetAttr(subchild,
"auxvalue");
2348 auxunitc = gdml->
GetAttr(subchild,
"auxunit");
2349 if (auxtypec ==
"volume") {
2357 region->
AddCut(auxtypec, value);
2359 subchild = gdml->
GetNext(subchild);
2404 while (child != 0) {
2405 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
2414 while (subchild != 0) {
2418 if (tempattr ==
"volumeref") {
2419 reftemp = gdml->
GetAttr(subchild,
"ref");
2424 }
else if (tempattr ==
"positionref") {
2425 reftemp = gdml->
GetAttr(subchild,
"ref");
2432 }
else if (tempattr ==
"position") {
2435 reftemp = gdml->
GetAttr(subchild,
"name");
2440 }
else if (tempattr ==
"rotationref") {
2441 reftemp = gdml->
GetAttr(subchild,
"ref");
2448 }
else if (tempattr ==
"rotation") {
2451 reftemp = gdml->
GetAttr(subchild,
"name");
2458 subchild = gdml->
GetNext(subchild);
2489 while (child != 0) {
2491 if ((strcmp(gdml->
GetNodeName(child),
"world") == 0)) {
2494 reftemp = gdml->
GetAttr(child,
"ref");
2528 if (tempattr ==
"name") {
2530 }
else if (tempattr ==
"x") {
2532 }
else if (tempattr ==
"y") {
2534 }
else if (tempattr ==
"z") {
2536 }
else if (tempattr ==
"lunit") {
2586 if (tempattr ==
"name") {
2588 }
else if (tempattr ==
"ax") {
2590 }
else if (tempattr ==
"by") {
2592 }
else if (tempattr ==
"cz") {
2594 }
else if (tempattr ==
"zcut1") {
2596 }
else if (tempattr ==
"zcut2") {
2598 }
else if (tempattr ==
"lunit") {
2622 z1 =
Value(zcut1) * retunit;
2627 z2 =
Value(zcut2) * retunit;
2635 origin[2] = 0.5 * (z1 + z2);
2669 if (tempattr ==
"name") {
2671 }
else if (tempattr ==
"dx") {
2673 }
else if (tempattr ==
"dy") {
2675 }
else if (tempattr ==
"zmax") {
2677 }
else if (tempattr ==
"zcut") {
2679 }
else if (tempattr ==
"lunit") {
2701 Info(
"ElCone",
"ERROR! Parameter zcut = %.12g is not set properly, elcone will not be imported.", z1);
2744 if (tempattr ==
"name") {
2746 }
else if (tempattr ==
"rlo") {
2748 }
else if (tempattr ==
"rhi") {
2750 }
else if (tempattr ==
"dz") {
2752 }
else if (tempattr ==
"lunit") {
2811 if (tempattr ==
"name") {
2813 }
else if (tempattr ==
"v1x") {
2815 }
else if (tempattr ==
"v1y") {
2817 }
else if (tempattr ==
"v2x") {
2819 }
else if (tempattr ==
"v2y") {
2821 }
else if (tempattr ==
"v3x") {
2823 }
else if (tempattr ==
"v3y") {
2825 }
else if (tempattr ==
"v4x") {
2827 }
else if (tempattr ==
"v4y") {
2829 }
else if (tempattr ==
"v5x") {
2831 }
else if (tempattr ==
"v5y") {
2833 }
else if (tempattr ==
"v6x") {
2835 }
else if (tempattr ==
"v6y") {
2837 }
else if (tempattr ==
"v7x") {
2839 }
else if (tempattr ==
"v7y") {
2841 }
else if (tempattr ==
"v8x") {
2843 }
else if (tempattr ==
"v8y") {
2845 }
else if (tempattr ==
"dz") {
2847 }
else if (tempattr ==
"lunit") {
2918 if (tempattr ==
"name") {
2920 }
else if (tempattr ==
"rmin") {
2922 }
else if (tempattr ==
"rmax") {
2924 }
else if (tempattr ==
"z") {
2926 }
else if (tempattr ==
"lunit") {
2928 }
else if (tempattr ==
"aunit") {
2930 }
else if (tempattr ==
"startphi") {
2932 }
else if (tempattr ==
"deltaphi") {
2951 Double_t endphideg = startphideg + deltaphideg;
2954 if (deltaphideg < 360.)
2993 if (tempattr ==
"name") {
2995 }
else if (tempattr ==
"rmin") {
2997 }
else if (tempattr ==
"rmax") {
2999 }
else if (tempattr ==
"z") {
3001 }
else if (tempattr ==
"lunit") {
3003 }
else if (tempattr ==
"aunit") {
3005 }
else if (tempattr ==
"startphi") {
3007 }
else if (tempattr ==
"deltaphi") {
3009 }
else if (tempattr ==
"lowx") {
3011 }
else if (tempattr ==
"lowy") {
3013 }
else if (tempattr ==
"lowz") {
3015 }
else if (tempattr ==
"highx") {
3017 }
else if (tempattr ==
"highy") {
3019 }
else if (tempattr ==
"highz") {
3037 Double_t deltaphiline =
Value(deltaphi) * retaunit + startphiline;
3046 lowXline, lowYline, lowZline, highXline, highYline, highZline);
3079 if (tempattr ==
"name") {
3081 }
else if (tempattr ==
"rmin1") {
3083 }
else if (tempattr ==
"rmax1") {
3085 }
else if (tempattr ==
"rmin2") {
3087 }
else if (tempattr ==
"rmax2") {
3089 }
else if (tempattr ==
"z") {
3091 }
else if (tempattr ==
"lunit") {
3093 }
else if (tempattr ==
"aunit") {
3095 }
else if (tempattr ==
"startphi") {
3097 }
else if (tempattr ==
"deltaphi") {
3161 if (tempattr ==
"name") {
3163 }
else if (tempattr ==
"x1") {
3165 }
else if (tempattr ==
"x2") {
3167 }
else if (tempattr ==
"x3") {
3169 }
else if (tempattr ==
"x4") {
3171 }
else if (tempattr ==
"y1") {
3173 }
else if (tempattr ==
"y2") {
3175 }
else if (tempattr ==
"z") {
3177 }
else if (tempattr ==
"lunit") {
3179 }
else if (tempattr ==
"aunit") {
3181 }
else if (tempattr ==
"phi") {
3183 }
else if (tempattr ==
"theta") {
3185 }
else if (tempattr ==
"alpha1") {
3187 }
else if (tempattr ==
"alpha2") {
3214 alpha1line, y2line / 2, x3line / 2, x4line / 2, alpha2line);
3244 if (tempattr ==
"name") {
3246 }
else if (tempattr ==
"x1") {
3248 }
else if (tempattr ==
"x2") {
3250 }
else if (tempattr ==
"y1") {
3252 }
else if (tempattr ==
"y2") {
3254 }
else if (tempattr ==
"z") {
3256 }
else if (tempattr ==
"lunit") {
3307 if (tempattr ==
"name") {
3309 }
else if (tempattr ==
"lunit") {
3311 }
else if (tempattr ==
"aunit") {
3313 }
else if (tempattr ==
"startphi") {
3315 }
else if (tempattr ==
"deltaphi") {
3333 while (child != 0) {
3334 numplanes = numplanes + 1;
3337 if (numplanes < 2) {
3338 Fatal(
"Polycone",
"Found less than 2 planes for polycone %s",
name.Data());
3345 double **table =
new double *[numplanes];
3346 for (i = 0; i < numplanes; i++) {
3347 table[i] =
new double[cols];
3353 while (child != 0) {
3354 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3366 if (tempattr ==
"rmin") {
3368 rminline =
Value(rmin) * retlunit;
3369 table[planeno][0] = rminline;
3370 }
else if (tempattr ==
"rmax") {
3372 rmaxline =
Value(rmax) * retlunit;
3373 table[planeno][1] = rmaxline;
3374 }
else if (tempattr ==
"z") {
3376 zline =
Value(z) * retlunit;
3377 table[planeno][2] = zline;
3382 planeno = planeno + 1;
3392 for (
int j = 0; j < numplanes; j++) {
3393 poly->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3398 for (i = 0; i < numplanes; i++) {
3432 if (tempattr ==
"name") {
3434 }
else if (tempattr ==
"lunit") {
3436 }
else if (tempattr ==
"aunit") {
3438 }
else if (tempattr ==
"startphi") {
3440 }
else if (tempattr ==
"deltaphi") {
3442 }
else if (tempattr ==
"numsides") {
3461 while (child != 0) {
3462 numplanes = numplanes + 1;
3465 if (numplanes < 2) {
3466 Fatal(
"Polyhedra",
"Found less than 2 planes for polyhedra %s",
name.Data());
3473 double **table =
new double *[numplanes];
3474 for (i = 0; i < numplanes; i++) {
3475 table[i] =
new double[cols];
3481 while (child != 0) {
3482 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3493 if (tempattr ==
"rmin") {
3495 rminline =
Value(rmin) * retlunit;
3496 table[planeno][0] = rminline;
3497 }
else if (tempattr ==
"rmax") {
3499 rmaxline =
Value(rmax) * retlunit;
3500 table[planeno][1] = rmaxline;
3501 }
else if (tempattr ==
"z") {
3503 zline =
Value(z) * retlunit;
3504 table[planeno][2] = zline;
3510 planeno = planeno + 1;
3521 for (
int j = 0; j < numplanes; j++) {
3522 polyg->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3527 for (i = 0; i < numplanes; i++) {
3559 if (tempattr ==
"name") {
3561 }
else if (tempattr ==
"rmin") {
3563 }
else if (tempattr ==
"rmax") {
3565 }
else if (tempattr ==
"lunit") {
3567 }
else if (tempattr ==
"aunit") {
3569 }
else if (tempattr ==
"startphi") {
3571 }
else if (tempattr ==
"deltaphi") {
3573 }
else if (tempattr ==
"starttheta") {
3575 }
else if (tempattr ==
"deltatheta") {
3592 Double_t deltaphiline = startphiline +
Value(deltaphi) * retaunit;
3594 Double_t deltathetaline = startthetaline +
Value(deltatheta) * retaunit;
3597 new TGeoSphere(
NameShort(
name), rminline, rmaxline, startthetaline, deltathetaline, startphiline, deltaphiline);
3628 if (tempattr ==
"name") {
3630 }
else if (tempattr ==
"rmin") {
3632 }
else if (tempattr ==
"rmax") {
3634 }
else if (tempattr ==
"rtor") {
3636 }
else if (tempattr ==
"lunit") {
3638 }
else if (tempattr ==
"aunit") {
3640 }
else if (tempattr ==
"startphi") {
3642 }
else if (tempattr ==
"deltaphi") {
3692 if (tempattr ==
"name") {
3694 }
else if (tempattr ==
"rmin") {
3696 }
else if (tempattr ==
"rmax") {
3698 }
else if (tempattr ==
"z") {
3700 }
else if (tempattr ==
"lunit") {
3702 }
else if (tempattr ==
"aunit") {
3704 }
else if (tempattr ==
"inst") {
3706 }
else if (tempattr ==
"outst") {
3758 if (tempattr ==
"name") {
3760 }
else if (tempattr ==
"x") {
3762 }
else if (tempattr ==
"y") {
3764 }
else if (tempattr ==
"z") {
3766 }
else if (tempattr ==
"lunit") {
3768 }
else if (tempattr ==
"aunit") {
3770 }
else if (tempattr ==
"phi") {
3772 }
else if (tempattr ==
"theta") {
3774 }
else if (tempattr ==
"alpha") {
3833 if (tempattr ==
"name") {
3835 }
else if (tempattr ==
"x1") {
3837 }
else if (tempattr ==
"x2") {
3839 }
else if (tempattr ==
"x3") {
3841 }
else if (tempattr ==
"x4") {
3843 }
else if (tempattr ==
"y1") {
3845 }
else if (tempattr ==
"y2") {
3847 }
else if (tempattr ==
"z") {
3849 }
else if (tempattr ==
"lunit") {
3851 }
else if (tempattr ==
"aunit") {
3853 }
else if (tempattr ==
"phi") {
3855 }
else if (tempattr ==
"theta") {
3857 }
else if (tempattr ==
"alph") {
3862 }
else if (tempattr ==
"phitwist") {
3890 x2line / 2, alpha1line, y2line / 2, x3line / 2, x4line / 2, alpha2line);
3918 if (tempattr ==
"name") {
3920 }
else if (tempattr ==
"dx") {
3922 }
else if (tempattr ==
"dy") {
3924 }
else if (tempattr ==
"dz") {
3926 }
else if (tempattr ==
"lunit") {
3968 if (tempattr ==
"name") {
3970 }
else if (tempattr ==
"r") {
3972 }
else if (tempattr ==
"lunit") {
4023 if (tempattr ==
"name") {
4025 }
else if (tempattr ==
"lunit") {
4044 while (child != 0) {
4047 if (tempattr ==
"twoDimVertex") {
4048 noverts = noverts + 1;
4049 }
else if (tempattr ==
"section") {
4050 nosects = nosects + 1;
4056 if (nosects < 2 || noverts < 3) {
4057 Fatal(
"Xtru",
"Invalid number of sections/vertices found forxtru %s",
name.Data());
4064 double *vertx =
new double[noverts];
4065 double *verty =
new double[noverts];
4067 double **section =
new double *[nosects];
4068 for (i = 0; i < nosects; i++) {
4069 section[i] =
new double[cols];
4076 while (child != 0) {
4077 if (strcmp(gdml->
GetNodeName(child),
"twoDimVertex") == 0) {
4086 if (tempattr ==
"x") {
4088 xline =
Value(
x) * retlunit;
4089 vertx[vert] = xline;
4090 }
else if (tempattr ==
"y") {
4092 yline =
Value(
y) * retlunit;
4093 verty[vert] = yline;
4102 else if (strcmp(gdml->
GetNodeName(child),
"section") == 0) {
4113 if (tempattr ==
"zOrder") {
4115 section[sect][0] =
Value(zorder);
4116 }
else if (tempattr ==
"zPosition") {
4118 zposline =
Value(zpos) * retlunit;
4119 section[sect][1] = zposline;
4120 }
else if (tempattr ==
"xOffset") {
4122 xoffline =
Value(xoff) * retlunit;
4123 section[sect][2] = xoffline;
4124 }
else if (tempattr ==
"yOffset") {
4126 yoffline =
Value(yoff) * retlunit;
4127 section[sect][3] = yoffline;
4128 }
else if (tempattr ==
"scalingFactor") {
4130 section[sect][4] =
Value(scale);
4145 for (
int j = 0; j < sect; j++) {
4146 xtru->
DefineSection((
int)section[j][0], section[j][1], section[j][2], section[j][3], section[j][4]);
4152 for (i = 0; i < nosects; i++) {
4153 delete[] section[i];
4171 while (attr !=
nullptr) {
4174 if (tempattr ==
"name") {
4189 if (trans ==
nullptr)
4191 const double *tr = trans->GetTranslation();
4192 vertices[i].Set(tr[0], tr[1], tr[2]);
4195 auto AddTriangularFacet = [&](
bool relative) {
4197 vertices[2] += vertices[0] + vertices[1];
4198 vertices[1] += vertices[0];
4200 tsl->AddFacet(vertices[0], vertices[1], vertices[2]);
4203 auto AddQuadrangularFacet = [&](
bool relative) {
4205 vertices[3] += vertices[0] + vertices[1] + vertices[2];
4206 vertices[2] += vertices[0] + vertices[1];
4207 vertices[1] += vertices[0];
4209 tsl->AddFacet(vertices[0], vertices[1], vertices[2], vertices[3]);
4214 while (child !=
nullptr) {
4217 if (tempattr ==
"triangular") {
4220 while (attr !=
nullptr) {
4223 if (tempattr ==
"vertex1") {
4228 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4232 else if (tempattr ==
"vertex2") {
4237 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4241 else if (tempattr ==
"vertex3") {
4246 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4250 else if (tempattr ==
"type") {
4253 bool relative = (
type ==
"relative") ?
true :
false;
4254 AddTriangularFacet(relative);
4262 else if (tempattr ==
"quadrangular") {
4265 while (attr !=
nullptr) {
4268 if (tempattr ==
"vertex1") {
4273 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4277 else if (tempattr ==
"vertex2") {
4282 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4286 else if (tempattr ==
"vertex3") {
4291 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4295 else if (tempattr ==
"vertex4") {
4300 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4304 else if (tempattr ==
"type") {
4307 bool relative = (
type ==
"relative") ?
true :
false;
4308 AddQuadrangularFacet(relative);
4316 tsl->CloseShape(
false);
4335 std::cout <<
"WARNING! The reflectedSolid is obsolete! Use scale transformation instead!" << std::endl;
4355 if (tempattr ==
"name") {
4357 }
else if (tempattr ==
"sx") {
4359 }
else if (tempattr ==
"sy") {
4361 }
else if (tempattr ==
"sz") {
4363 }
else if (tempattr ==
"rx") {
4365 }
else if (tempattr ==
"ry") {
4367 }
else if (tempattr ==
"rz") {
4369 }
else if (tempattr ==
"dx") {
4371 }
else if (tempattr ==
"dy") {
4373 }
else if (tempattr ==
"dz") {
4375 }
else if (tempattr ==
"solid") {
4393 if (atoi(sx) == -1) {
4396 if (atoi(sy) == -1) {
4399 if (atoi(sz) == -1) {
static const double x2[5]
static const double x4[22]
static const double x1[5]
static const double x3[11]
include TDocParser_001 C image html pict1_TDocParser_001 png width
R__EXTERN TGeoManager * gGeoManager
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
This class is used in the process of reading and writing the GDML "matrix" tag.
void Set(size_t r, size_t c, Double_t a)
void SetMatrixAsString(const char *mat)
This class contains the implementation of the GDML parser associated to all the supported GDML elemen...
XMLNodePointer_t Ellipsoid(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an ellipsoid may be declared.
double Evaluate(const char *evalline)
Takes a string containing a mathematical expression and returns the value of the expression.
TGeoVolume * GDMLReadFile(const char *filename="test.gdml")
Creates the new instance of the XMLEngine called 'gdml', using the filename >> then parses the file a...
XMLNodePointer_t Reflection(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Reflected Solid may be declared when the ReflectedSolid key...
XMLNodePointer_t TopProcess(TXMLEngine *gdml, XMLNodePointer_t node)
In the setup section of the GDML file, the top volume need to be declared.
ReflSolidMap freflsolidmap
Map containing reflection names and the Solid name ir references to.
const char * ParseGDML(TXMLEngine *gdml, XMLNodePointer_t node)
This function recursively moves thru the DOM tree of the GDML file.
XMLNodePointer_t SclProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, rotations can be declared.
XMLNodePointer_t BorderSurfaceProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the structure section of the GDML file, border surfaces can be declared.
XMLNodePointer_t Trd(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Trd may be declared.
const char * fCurrentFile
void DefineConstants()
Define constant expressions used.
const char * NameShort(const char *name)
This function looks thru a string for the chars '0x' next to each other, when it finds this,...
XMLNodePointer_t Orb(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Orb may be declared.
FileMap ffilemap
Map containing reflected volume names and the solid ref for it.
MatrixMap fmatrices
Map containing values of constants declared in the file.
XMLNodePointer_t Hype(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Hype may be declared.
VolMap fvolmap
Map containing solid names and the TGeoShape for it.
double GetScaleVal(const char *unit)
Throughout the GDML file, a unit can de specified.
std::string fDefault_lunit
XMLNodePointer_t BooSolid(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int num)
In the solid section of the GDML file, boolean solids can be declared.
XMLNodePointer_t Para(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Para may be declared.
XMLNodePointer_t Arb8(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Arb8 may be declared.
RotMap frotmap
Map containing position names and the TGeoTranslation for it.
XMLNodePointer_t PosProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, positions can be declared.
ReflVolMap freflvolmap
Map containing reflection names and the TGDMLRefl for it - containing refl matrix.
XMLNodePointer_t Sphere(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Sphere may be declared.
ReflectionsMap freflectmap
Map containing placed volume names and the TGeoNode for it.
XMLNodePointer_t Trap(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Trap may be declared.
std::map< std::string, double > FracMap
XMLNodePointer_t EleProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLNodePointer_t parentn, Bool_t hasIsotopes, Bool_t hasIsotopesExtended)
When the element keyword is found, this function is called, and the name and values of the element ar...
XMLNodePointer_t Polyhedra(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Polyhedra may be declared.
XMLNodePointer_t Cone(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a cone may be declared.
XMLNodePointer_t ElCone(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an elliptical cone may be declared.
MatMap fmatmap
Map containing element names and the TGeoElement for it.
SclMap fsclmap
Map containing rotation names and the TGeoRotation for it.
XMLNodePointer_t MatrixProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, matrices These are referenced by other GDML tags,...
XMLNodePointer_t Tessellated(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a tessellated shape may be declared.
IsoMap fisomap
Map containing scale names and the TGeoScale for it.
XMLNodePointer_t IsoProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLNodePointer_t parentn)
In the material section of the GDML file, an isotope may be declared.
PvolMap fpvolmap
Map containing volume names and the TGeoVolume for it.
double Value(const char *svalue) const
Convert number in string format to double value.
XMLNodePointer_t TwistTrap(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a TwistTrap may be declared.
MedMap fmedmap
Map containing material names and the TGeoMaterial for it.
XMLNodePointer_t Paraboloid(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Paraboloid may be declared.
Int_t SetAxis(const char *axisString)
When using the 'divide' process in the geometry this function sets the variable 'axis' depending on w...
ConstMap fconsts
Map containing files parsed during entire parsing, with their world volume name.
std::string fDefault_aunit
XMLNodePointer_t QuantityProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, quantities can be declared.
XMLNodePointer_t Polycone(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Polycone may be declared.
XMLNodePointer_t Box(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a box may be declared.
SolMap fsolmap
Map containing mixture names and the TGeoMixture for it.
EleMap felemap
Map containing isotope names and the TGeoIsotope for it.
XMLNodePointer_t Tube(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Tube may be declared.
TString GetScale(const char *unit)
Throughout the GDML file, a unit can de specified.
XMLNodePointer_t AssProcess(TXMLEngine *gdml, XMLNodePointer_t node)
In the structure section of the GDML file, assembly volumes can be declared.
TXMLEngine * fFileEngine[20]
XMLNodePointer_t RotProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, rotations can be declared.
XMLNodePointer_t Torus(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Torus may be declared.
XMLNodePointer_t ConProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, constants can be declared.
XMLNodePointer_t VolProcess(TXMLEngine *gdml, XMLNodePointer_t node)
In the structure section of the GDML file, volumes can be declared.
XMLNodePointer_t OpticalSurfaceProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, optical surfaces can be defined.
XMLNodePointer_t SkinSurfaceProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the structure section of the GDML file, skin surfaces can be declared.
XMLNodePointer_t ElTube(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a ElTube may be declared.
XMLNodePointer_t Xtru(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Xtru may be declared.
XMLNodePointer_t MatProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int z)
In the materials section of the GDML file, materials can be declared.
XMLNodePointer_t CutTube(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Cut Tube may be declared.
MixMap fmixmap
Map containing medium names and the TGeoMedium for it.
XMLNodePointer_t UsrProcess(TXMLEngine *gdml, XMLNodePointer_t node)
User data to be processed.
This class is a helper class for TGDMLParse.
TGeoMatrix * fMatrix
solid name being reflected
TGeoMatrix * GetMatrix()
This accessor method returns the matrix.
const char * fSolid
reflected solid name
An arbitrary trapezoid with less than 8 vertices standing on two parallel planes perpendicular to Z a...
virtual void SetVertex(Int_t vnum, Double_t x, Double_t y)
Set values for a given vertex.
Base class for Boolean operations between two shapes.
Class describing rotation + translation.
Class handling Boolean composition of shapes.
A phi segment of a conical tube.
A tube segment cut with 2 planes.
TGeoIsotope * FindIsotope(const char *name) const
Find existing isotope by name. Not optimized for a big number of isotopes.
TGeoElement * FindElement(const char *name) const
Search an element by symbol or full name Exact matching.
Base class for chemical elements.
void AddIsotope(TGeoIsotope *isotope, Double_t relativeAbundance)
Add an isotope for this element. All isotopes have to be isotopes of the same element.
Gtra is a twisted trapezoid.
Matrix class used for computing global transformations Should NOT be used for node definition.
void SetRotation(const Double_t *matrix)
void MultiplyLeft(const TGeoMatrix *left)
multiply to the left with an other transformation if right is identity matrix, just return
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return
void SetTranslation(const Double_t *vect)
Hyperboloid class defined by 5 parameters.
The manager class for any TGeo geometry.
void AddSkinSurface(TGeoSkinSurface *surf)
Add skin surface;.
static EDefaultUnits GetDefaultUnits()
TList * GetListOfMedia() const
TGeoElementTable * GetElementTable()
Returns material table. Creates it if not existing.
void AddGDMLMatrix(TGDMLMatrix *mat)
Add GDML matrix;.
void AddBorderSurface(TGeoBorderSurface *surf)
Add border surface;.
void AddOpticalSurface(TGeoOpticalSurface *optsurf)
Add optical surface;.
TGeoMedium * GetMedium(const char *medium) const
Search for a named tracking medium. All trailing blanks stripped.
Double_t GetProperty(const char *name, Bool_t *error=nullptr) const
Get a user-defined property.
TGeoOpticalSurface * GetOpticalSurface(const char *name) const
Get optical surface with a given name;.
Bool_t AddProperty(const char *property, Double_t value)
Add a user-defined property. Returns true if added, false if existing.
TGeoMaterial * GetMaterial(const char *matname) const
Search for a named material. All trailing blanks stripped.
Int_t AddRegion(TGeoRegion *region)
Add a new region of volumes.
TList * GetListOfMaterials() const
Base class describing materials.
virtual Bool_t IsMixture() const
bool AddConstProperty(const char *property, const char *ref)
bool AddProperty(const char *property, const char *ref)
Geometrical transformation package.
virtual const Double_t * GetRotationMatrix() const =0
Media are used to store properties related to tracking and which are useful only when using geometry ...
void AddElement(Double_t a, Double_t z, Double_t weight)
add an element to the mixture using fraction by weight Check if the element is already defined
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
static ESurfaceType StringToType(const char *type)
bool AddProperty(const char *property, const char *ref)
static ESurfaceFinish StringToFinish(const char *finish)
static ESurfaceModel StringToModel(const char *model)
virtual void DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax)
Defines z position of a section plane, rmin and rmax at this z.