197 const char* posistr =
"position";
198 const char* setustr =
"setup";
199 const char* consstr =
"constant";
200 const char* varistr =
"variable";
201 const char* quanstr =
"quantity";
202 const char* rotastr =
"rotation";
203 const char* scalstr =
"scale";
204 const char* elemstr =
"element";
205 const char* istpstr =
"isotope";
206 const char* matestr =
"material";
207 const char* volustr =
"volume";
208 const char* assestr =
"assembly";
209 const char* twtrstr =
"twistedtrap";
210 const char* cutTstr =
"cutTube";
211 const char* bboxstr =
"box";
212 const char* xtrustr =
"xtru";
213 const char* arb8str =
"arb8";
214 const char* tubestr =
"tube";
215 const char* conestr =
"cone";
216 const char* polystr =
"polycone";
217 const char* hypestr =
"hype";
218 const char* trapstr =
"trap";
219 const char* trdstr =
"trd";
220 const char* sphestr =
"sphere";
221 const char* orbstr =
"orb";
222 const char* parastr =
"para";
223 const char* torustr =
"torus";
224 const char* hedrstr =
"polyhedra";
225 const char* eltustr =
"eltube";
226 const char* subtstr =
"subtraction";
227 const char* uniostr =
"union";
228 const char* parbstr =
"paraboloid";
229 const char* intestr =
"intersection";
230 const char* reflstr =
"reflectedSolid";
231 const char* ellistr =
"ellipsoid";
232 const char* elcnstr =
"elcone";
233 const char* usrstr =
"userinfo";
235 Bool_t hasIsotopesExtended;
237 if ((strcmp(
name, posistr)) == 0) {
239 }
else if ((strcmp(
name, rotastr)) == 0) {
241 }
else if ((strcmp(
name, scalstr)) == 0) {
243 }
else if ((strcmp(
name, setustr)) == 0) {
245 }
else if ((strcmp(
name, consstr)) == 0) {
247 }
else if ((strcmp(
name, varistr)) == 0) {
249 }
else if ((strcmp(
name, quanstr)) == 0) {
254 else if (((strcmp(
name,
"atom")) == 0) && ((strcmp(parent, elemstr)) == 0)) {
256 hasIsotopesExtended =
kFALSE;
257 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
259 else if ((strcmp(
name, elemstr) == 0) && !gdml->
HasAttr(node,
"Z")) {
261 hasIsotopesExtended =
kFALSE;
262 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
265 else if ((strcmp(
name, elemstr) == 0) && gdml->
HasAttr(node,
"Z")) {
267 if ((strcmp(gdml->
GetNodeName(childtmp),
"fraction") == 0) ){
269 hasIsotopesExtended =
kTRUE;
270 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);}
275 else if (((strcmp(
name,
"atom")) == 0) && ((strcmp(parent, istpstr)) == 0)) {
280 else if ((strcmp(
name, matestr)) == 0 && gdml->
HasAttr(node,
"Z")) {
287 atom = strcmp(gdml->
GetNodeName(childtmp),
"atom")==0;
290 int z = (atom) ? 1 : 0;
293 else if ((strcmp(
name, matestr)) == 0 && !gdml->
HasAttr(node,
"Z")) {
299 else if ((strcmp(
name, volustr)) == 0) {
301 }
else if ((strcmp(
name, bboxstr)) == 0) {
302 node =
Box(gdml, node, attr);
303 }
else if ((strcmp(
name, ellistr)) == 0) {
305 }
else if ((strcmp(
name, elcnstr)) == 0) {
306 node =
ElCone(gdml, node, attr);
307 }
else if ((strcmp(
name, cutTstr)) == 0) {
308 node =
CutTube(gdml, node, attr);
309 }
else if ((strcmp(
name, arb8str)) == 0) {
310 node =
Arb8(gdml, node, attr);
311 }
else if ((strcmp(
name, tubestr)) == 0) {
312 node =
Tube(gdml, node, attr);
313 }
else if ((strcmp(
name, conestr)) == 0) {
314 node =
Cone(gdml, node, attr);
315 }
else if ((strcmp(
name, polystr)) == 0) {
317 }
else if ((strcmp(
name, trapstr)) == 0) {
318 node =
Trap(gdml, node, attr);
319 }
else if ((strcmp(
name, trdstr)) == 0) {
320 node =
Trd(gdml, node, attr);
321 }
else if ((strcmp(
name, sphestr)) == 0) {
322 node =
Sphere(gdml, node, attr);
323 }
else if ((strcmp(
name, xtrustr)) == 0) {
324 node =
Xtru(gdml, node, attr);
325 }
else if ((strcmp(
name, twtrstr)) == 0) {
327 }
else if ((strcmp(
name, hypestr)) == 0) {
328 node =
Hype(gdml, node, attr);
329 }
else if ((strcmp(
name, orbstr)) == 0) {
330 node =
Orb(gdml, node, attr);
331 }
else if ((strcmp(
name, parastr)) == 0) {
332 node =
Para(gdml, node, attr);
333 }
else if ((strcmp(
name, torustr)) == 0) {
334 node =
Torus(gdml, node, attr);
335 }
else if ((strcmp(
name, eltustr)) == 0) {
336 node =
ElTube(gdml, node, attr);
337 }
else if ((strcmp(
name, hedrstr)) == 0) {
339 }
else if ((strcmp(
name, parbstr)) == 0) {
341 }
else if ((strcmp(
name, subtstr)) == 0) {
342 node =
BooSolid(gdml, node, attr, 1);
343 }
else if ((strcmp(
name, intestr)) == 0) {
344 node =
BooSolid(gdml, node, attr, 2);
345 }
else if ((strcmp(
name, uniostr)) == 0) {
346 node =
BooSolid(gdml, node, attr, 3);
347 }
else if ((strcmp(
name, reflstr)) == 0) {
349 }
else if ((strcmp(
name, assestr)) == 0) {
351 }
else if ((strcmp(
name, usrstr)) == 0) {
354 }
else if (((strcmp(
name,
"gdml")) != 0) && ((strcmp(
name,
"define")) != 0) &&
355 ((strcmp(
name,
"element")) != 0) && ((strcmp(
name,
"materials")) != 0) &&
356 ((strcmp(
name,
"solids")) != 0) && ((strcmp(
name,
"structure")) != 0) &&
357 ((strcmp(
name,
"zplane")) != 0) && ((strcmp(
name,
"first")) != 0) &&
358 ((strcmp(
name,
"second")) != 0) && ((strcmp(
name,
"twoDimVertex")) != 0) &&
359 ((strcmp(
name,
"firstposition")) != 0) && ((strcmp(
name,
"firstpositionref")) != 0) &&
360 ((strcmp(
name,
"firstrotation")) != 0) && ((strcmp(
name,
"firstrotationref")) != 0) &&
361 ((strcmp(
name,
"section")) != 0) && ((strcmp(
name,
"world")) != 0) &&
362 ((strcmp(
name,
"isotope")) != 0)) {
363 std::cout <<
"Error: Unsupported GDML Tag Used :" <<
name <<
". Please Check Geometry/Schema." << std::endl;
396 if ((strcmp(axisString,
"kXAxis")) == 0) {
398 }
else if ((strcmp(axisString,
"kYAxis")) == 0) {
400 }
else if ((strcmp(axisString,
"kZAxis")) == 0) {
402 }
else if ((strcmp(axisString,
"kRho")) == 0) {
404 }
else if ((strcmp(axisString,
"kPhi")) == 0) {
422 if (index >= 0) stripped = stripped(0, index);
423 return stripped.
Data();
442 if (tempattr ==
"name") {
445 if (tempattr ==
"value") {
475 if (tempattr ==
"name") {
478 if (tempattr ==
"value") {
481 if (tempattr ==
"unit") {
502 if (strcmp(unit,
"mm") == 0) {
504 }
else if (strcmp(unit,
"milimeter") == 0) {
506 }
else if (strcmp(unit,
"cm") == 0) {
508 }
else if (strcmp(unit,
"centimeter") == 0) {
510 }
else if (strcmp(unit,
"m") == 0) {
512 }
else if (strcmp(unit,
"meter") == 0) {
514 }
else if (strcmp(unit,
"km") == 0) {
515 retunit =
"100000.0";
516 }
else if (strcmp(unit,
"kilometer") == 0) {
517 retunit =
"100000.0";
518 }
else if (strcmp(unit,
"rad") == 0) {
520 }
else if (strcmp(unit,
"radian") == 0) {
522 }
else if (strcmp(unit,
"deg") == 0) {
524 }
else if (strcmp(unit,
"degree") == 0) {
526 }
else if (strcmp(unit,
"pi") == 0) {
528 }
else if (strcmp(unit,
"avogadro") == 0) {
531 Fatal(
"GetScale",
"Unit <%s> not known", unit);
550 if ((unit ==
"mm") || (unit ==
"milimeter")) {
552 }
else if ((unit ==
"cm") || (unit ==
"centimeter")) {
554 }
else if ((unit ==
"m") || (unit ==
"meter")) {
556 }
else if ((unit ==
"km") || (unit ==
"kilometer")) {
558 }
else if ((unit ==
"rad") || (unit ==
"radian")) {
560 }
else if ((unit ==
"deg") || (unit ==
"degree")) {
562 }
else if ((unit ==
"ev") || (unit ==
"electronvolt")) {
563 retunit = 0.000000001;
564 }
else if ((unit ==
"kev") || (unit ==
"kiloelectronvolt")) {
566 }
else if ((unit ==
"mev") || (unit ==
"megaelectronvolt")) {
568 }
else if ((unit ==
"gev") || (unit ==
"gigaelectronvolt")) {
570 }
else if (unit ==
"pi") {
572 }
else if (unit ==
"avogadro") {
575 Fatal(
"GetScaleVal",
"Unit <%s> not known", sunit);
587 double val = strtod(svalue, &end);
590 while( *end != 0 && isspace(*end) ) ++end;
594 if (*end == 0)
return val;
600 std::string expanded;
601 expanded.reserve(strlen(svalue) * 2);
605 const std::locale &loc = std::locale::classic();
608 const char *p = svalue;
611 for (; *p != 0; ++p) {
612 if (std::isalpha(*p, loc) || *p ==
'_') {
613 const char *pe = p + 1;
616 for (; *pe != 0; ++pe) {
617 if (!isalnum(*pe, loc) && *pe !=
'_') {
620 for (; p < pe; ++p) expanded += *p;
624 for (; p < pe; ++p) expanded += *p;
632 for (; p < pe; ++p) expanded += *p;
640 TFormula f(
"TFormula", expanded.c_str());
643 for (
auto it:
fconsts)
f.SetParameter(it.first.c_str(), it.second);
648 Fatal(
"Value",
"Got bad value %lf from string '%s'", val, svalue);
675 if (tempattr ==
"name") {
677 }
else if (tempattr ==
"x") {
679 }
else if (tempattr ==
"y") {
681 }
else if (tempattr ==
"z") {
683 }
else if (tempattr ==
"unit") {
728 if (tempattr ==
"name") {
730 }
else if (tempattr ==
"x") {
732 }
else if (tempattr ==
"y") {
734 }
else if (tempattr ==
"z") {
736 }
else if (tempattr ==
"unit") {
785 if (tempattr ==
"name") {
787 }
else if (tempattr ==
"x") {
789 }
else if (tempattr ==
"y") {
791 }
else if (tempattr ==
"z") {
833 if (tempattr ==
"name") {
835 }
else if (tempattr ==
"z") {
837 }
else if (tempattr ==
"n") {
852 if (tempattr ==
"value") {
875 Info(
"TGDMLParse",
"Re-use existing isotope: %s",iso->
GetName());
913 if (tempattr ==
"name") {
928 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
936 if (tempattr ==
"n") {
938 }
else if (tempattr ==
"ref") {
946 fracmap[ref.
Data()] =
n;
953 if (ele && ele->
Z() == 0)
957 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
964 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
973 if (hasIsotopesExtended) {
978 if (tempattr ==
"name") {
993 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1001 if (tempattr ==
"n") {
1003 }
else if (tempattr ==
"ref") {
1011 fracmap[ref.
Data()] =
n;
1018 if (ele && ele->
Z() == 0)
1022 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1028 else if (
gDebug >= 2 ) {
1029 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1043 if (tempattr ==
"name") {
1046 }
else if (tempattr ==
"z") {
1048 }
else if (tempattr ==
"formula") {
1064 if (tempattr ==
"value") {
1079 if (ele && ele->
Z() == 0)
1085 else if (
gDebug >= 2 ) {
1086 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1116 Int_t ncompo = 0, mixflag = 2;
1129 while (child != 0) {
1132 if ((strcmp(gdml->
GetNodeName(child),
"atom")) == 0) {
1137 if (tempattr ==
"value") {
1144 if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1149 if (tempattr ==
"value") {
1166 tempconst = gdml->
GetAttr(node,
"Z");
1173 if (tmpname ==
"vacuum") {
1182 Info(
"TGDMLParse",
"Re-use existing material: %s",mat->
GetName());
1188 if (mat_ele && mat_ele->
Z() == 0)
1192 mat_ele =
new TGeoElement(mat_name, mat_name, atoi(tempconst),
a);
1194 else if (
gDebug >= 2 ) {
1195 Info(
"TGDMLParse",
"Re-use existing material-element: %s",mat_ele->
GetName());
1201 while (child != 0) {
1204 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1207 ncompo = ncompo + 1;
1213 if (tempattr ==
"n") {
1215 }
else if (tempattr ==
"ref") {
1225 fracmap[ref.
Data()] =
n;
1229 else if ((strcmp(gdml->
GetNodeName(child),
"composite")) == 0) {
1233 ncompo = ncompo + 1;
1239 if (tempattr ==
"n") {
1241 }
else if (tempattr ==
"ref") {
1251 fracmap[ref.
Data()] =
n;
1254 else if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1259 if (tempattr ==
"value") {
1285 Info(
"TGDMLParse",
"Re-use existing material-mixture: %s",mix->
GetName());
1288 Error(
"TGDMLParse",
"WARNING! Inconsistent material definitions between GDML and TGeoManager");
1293 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1301 natoms = (
Int_t)
f->second;
1330 }
else if (mixflag == 0) {
1335 else if (
gDebug >= 2 ) {
1336 Info(
"TGDMLParse",
"Re-use existing medium: %s",med->
GetName());
1379 while (child != 0) {
1380 if ((strcmp(gdml->
GetNodeName(child),
"solidref")) == 0) {
1382 reftemp = gdml->
GetAttr(child,
"ref");
1389 solidname = reftemp;
1392 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
1396 if ((strcmp(gdml->
GetNodeName(child),
"materialref")) == 0) {
1397 reftemp = gdml->
GetAttr(child,
"ref");
1404 printf(
"Medium: %s, Not Yet Defined!\n", gdml->
GetAttr(child,
"ref"));
1433 while (child != 0) {
1434 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
1447 while (subchild != 0) {
1451 if (tempattr ==
"volumeref") {
1452 reftemp = gdml->
GetAttr(subchild,
"ref");
1459 else if (tempattr ==
"file") {
1460 const char* filevol;
1464 filevol = gdml->
GetAttr(subchild,
"volname");
1469 if (filedoc1 == 0) {
1502 else if (tempattr ==
"position") {
1505 reftemp = gdml->
GetAttr(subchild,
"name");
1510 }
else if (tempattr ==
"positionref") {
1511 reftemp = gdml->
GetAttr(subchild,
"ref");
1516 else std::cout <<
"ERROR! Physvol's position " << reftemp <<
" not found!" << std::endl;
1517 }
else if (tempattr ==
"rotation") {
1520 reftemp = gdml->
GetAttr(subchild,
"name");
1525 }
else if (tempattr ==
"rotationref") {
1526 reftemp = gdml->
GetAttr(subchild,
"ref");
1531 else std::cout <<
"ERROR! Physvol's rotation " << reftemp <<
" not found!" << std::endl;
1532 }
else if (tempattr ==
"scale") {
1535 reftemp = gdml->
GetAttr(subchild,
"name");
1540 }
else if (tempattr ==
"scaleref") {
1541 reftemp = gdml->
GetAttr(subchild,
"ref");
1546 else std::cout <<
"ERROR! Physvol's scale " << reftemp <<
" not found!" << std::endl;
1549 subchild = gdml->
GetNext(subchild);
1563 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
1566 scale3x3[0] = diagonal[0];
1567 scale3x3[4] = diagonal[1];
1568 scale3x3[8] = diagonal[2];
1595 }
else if ((strcmp(gdml->
GetNodeName(child),
"divisionvol")) == 0) {
1611 if (tempattr ==
"axis") {
1613 }
else if (tempattr ==
"number") {
1615 }
else if (tempattr ==
"width") {
1617 }
else if (tempattr ==
"offset") {
1619 }
else if (tempattr ==
"unit") {
1629 while (subchild != 0) {
1633 if (tempattr ==
"volumeref") {
1634 reftemp = gdml->
GetAttr(subchild,
"ref");
1638 divVolref = reftemp;
1641 subchild = gdml->
GetNext(subchild);
1667 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
1678 else if ((strcmp(gdml->
GetNodeName(child),
"replicavol")) == 0) {
1698 if (tempattr ==
"number") {
1706 while (subchild != 0) {
1710 if (tempattr ==
"volumeref") {
1711 reftemp = gdml->
GetAttr(subchild,
"ref");
1715 divVolref = reftemp;
1718 if (tempattr ==
"replicate_along_axis") {
1719 subsubchild = gdml->
GetChild(subchild);
1721 while (subsubchild != 0) {
1722 if ((strcmp(gdml->
GetNodeName(subsubchild),
"width")) == 0) {
1727 if (tempattr ==
"value") {
1730 else if (tempattr ==
"unit"){
1737 else if ((strcmp(gdml->
GetNodeName(subsubchild),
"offset")) == 0) {
1742 if (tempattr ==
"value") {
1745 else if (tempattr ==
"unit"){
1751 else if ((strcmp(gdml->
GetNodeName(subsubchild),
"direction")) == 0) {
1756 if (tempattr ==
"x") {
1759 else if (tempattr ==
"y"){
1762 else if (tempattr ==
"z"){
1765 else if (tempattr ==
"rho"){
1768 else if (tempattr ==
"phi"){
1776 subsubchild = gdml->
GetNext(subsubchild);
1781 subchild = gdml->
GetNext(subchild);
1789 Double_t widthline = wvalue*retwunit;
1790 Double_t offsetline = ovalue*retounit;
1810 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
1819 else if (strcmp(gdml->
GetNodeName(child),
"auxiliary") == 0) {
1820 TString auxType, auxUnit, auxValue;
1823 auxmap =
new TMap();
1884 while (child != 0) {
1888 if (tempattr ==
"first") {
1889 reftemp = gdml->
GetAttr(child,
"ref");
1896 }
else if (tempattr ==
"second") {
1897 reftemp = gdml->
GetAttr(child,
"ref");
1904 }
else if (tempattr ==
"position") {
1907 reftemp = gdml->
GetAttr(child,
"name");
1912 }
else if (tempattr ==
"positionref") {
1913 reftemp = gdml->
GetAttr(child,
"ref");
1920 }
else if (tempattr ==
"rotation") {
1923 reftemp = gdml->
GetAttr(child,
"name");
1928 }
else if (tempattr ==
"rotationref") {
1929 reftemp = gdml->
GetAttr(child,
"ref");
1936 }
else if (tempattr ==
"firstposition") {
1939 reftemp = gdml->
GetAttr(child,
"name");
1944 }
else if (tempattr ==
"firstpositionref") {
1945 reftemp = gdml->
GetAttr(child,
"ref");
1952 }
else if (tempattr ==
"firstrotation") {
1955 reftemp = gdml->
GetAttr(child,
"name");
1960 }
else if (tempattr ==
"firstrotationref") {
1961 reftemp = gdml->
GetAttr(child,
"ref");
1977 Fatal(
"BooSolid",
"Incomplete solid %s, missing shape components",
name.Data());
2005 TString nodename, auxtype, auxtypec, auxvalue, auxvaluec, auxunit, auxunitc;
2011 if (nodename ==
"auxiliary") {
2012 auxtype = gdml->
GetAttr(child,
"auxtype");
2013 auxvalue = gdml->
GetAttr(child,
"auxvalue");
2014 if (auxtype ==
"Region") {
2021 auxtypec = gdml->
GetAttr(subchild,
"auxtype");
2022 auxvaluec = gdml->
GetAttr(subchild,
"auxvalue");
2023 auxunitc = gdml->
GetAttr(subchild,
"auxunit");
2024 if (auxtypec ==
"volume") {
2026 if (region) region->
AddVolume(auxvaluec);
2030 if (region) region->
AddCut(auxtypec, value);
2032 subchild = gdml->
GetNext(subchild);
2078 while (child != 0) {
2079 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
2088 while (subchild != 0) {
2092 if (tempattr ==
"volumeref") {
2093 reftemp = gdml->
GetAttr(subchild,
"ref");
2098 }
else if (tempattr ==
"positionref") {
2099 reftemp = gdml->
GetAttr(subchild,
"ref");
2106 }
else if (tempattr ==
"position") {
2109 reftemp = gdml->
GetAttr(subchild,
"name");
2114 }
else if (tempattr ==
"rotationref") {
2115 reftemp = gdml->
GetAttr(subchild,
"ref");
2122 }
else if (tempattr ==
"rotation") {
2125 reftemp = gdml->
GetAttr(subchild,
"name");
2132 subchild = gdml->
GetNext(subchild);
2162 while (child != 0) {
2164 if ((strcmp(gdml->
GetNodeName(child),
"world") == 0)) {
2167 reftemp = gdml->
GetAttr(child,
"ref");
2204 if (tempattr ==
"name") {
2206 }
else if (tempattr ==
"x") {
2208 }
else if (tempattr ==
"y") {
2210 }
else if (tempattr ==
"z") {
2212 }
else if (tempattr ==
"lunit") {
2264 if (tempattr ==
"name") {
2266 }
else if (tempattr ==
"ax") {
2268 }
else if (tempattr ==
"by") {
2270 }
else if (tempattr ==
"cz") {
2272 }
else if (tempattr ==
"zcut1") {
2274 }
else if (tempattr ==
"zcut2") {
2276 }
else if (tempattr ==
"lunit") {
2300 z1 =
Value(zcut1)*retunit;
2305 z2 =
Value(zcut2)*retunit;
2313 origin[2] = 0.5 * (z1 + z2);
2348 if (tempattr ==
"name") {
2350 }
else if (tempattr ==
"dx") {
2352 }
else if (tempattr ==
"dy") {
2354 }
else if (tempattr ==
"zmax") {
2356 }
else if (tempattr ==
"zcut") {
2358 }
else if (tempattr ==
"lunit") {
2380 Info(
"ElCone",
"ERROR! Parameter zcut = %.12g is not set properly, elcone will not be imported.", z1);
2424 if (tempattr ==
"name") {
2426 }
else if (tempattr ==
"rlo") {
2428 }
else if (tempattr ==
"rhi") {
2430 }
else if (tempattr ==
"dz") {
2432 }
else if (tempattr ==
"lunit") {
2492 if (tempattr ==
"name") {
2494 }
else if (tempattr ==
"v1x") {
2496 }
else if (tempattr ==
"v1y") {
2498 }
else if (tempattr ==
"v2x") {
2500 }
else if (tempattr ==
"v2y") {
2502 }
else if (tempattr ==
"v3x") {
2504 }
else if (tempattr ==
"v3y") {
2506 }
else if (tempattr ==
"v4x") {
2508 }
else if (tempattr ==
"v4y") {
2510 }
else if (tempattr ==
"v5x") {
2512 }
else if (tempattr ==
"v5y") {
2514 }
else if (tempattr ==
"v6x") {
2516 }
else if (tempattr ==
"v6y") {
2518 }
else if (tempattr ==
"v7x") {
2520 }
else if (tempattr ==
"v7y") {
2522 }
else if (tempattr ==
"v8x") {
2524 }
else if (tempattr ==
"v8y") {
2526 }
else if (tempattr ==
"dz") {
2528 }
else if (tempattr ==
"lunit") {
2601 if (tempattr ==
"name") {
2603 }
else if (tempattr ==
"rmin") {
2605 }
else if (tempattr ==
"rmax") {
2607 }
else if (tempattr ==
"z") {
2609 }
else if (tempattr ==
"lunit") {
2611 }
else if (tempattr ==
"aunit") {
2613 }
else if (tempattr ==
"startphi") {
2615 }
else if (tempattr ==
"deltaphi") {
2634 Double_t endphideg = startphideg + deltaphideg;
2637 if (deltaphideg < 360.)
2683 if (tempattr ==
"name") {
2685 }
else if (tempattr ==
"rmin") {
2687 }
else if (tempattr ==
"rmax") {
2689 }
else if (tempattr ==
"z") {
2691 }
else if (tempattr ==
"lunit") {
2693 }
else if (tempattr ==
"aunit") {
2695 }
else if (tempattr ==
"startphi") {
2697 }
else if (tempattr ==
"deltaphi") {
2699 }
else if (tempattr ==
"lowx") {
2701 }
else if (tempattr ==
"lowy") {
2703 }
else if (tempattr ==
"lowz") {
2705 }
else if (tempattr ==
"highx") {
2707 }
else if (tempattr ==
"highy") {
2709 }
else if (tempattr ==
"highz") {
2727 Double_t deltaphiline =
Value(deltaphi)*retaunit + startphiline;
2781 if (tempattr ==
"name") {
2783 }
else if (tempattr ==
"rmin1") {
2785 }
else if (tempattr ==
"rmax1") {
2787 }
else if (tempattr ==
"rmin2") {
2789 }
else if (tempattr ==
"rmax2") {
2791 }
else if (tempattr ==
"z") {
2793 }
else if (tempattr ==
"lunit") {
2795 }
else if (tempattr ==
"aunit") {
2797 }
else if (tempattr ==
"startphi") {
2799 }
else if (tempattr ==
"deltaphi") {
2873 if (tempattr ==
"name") {
2875 }
else if (tempattr ==
"x1") {
2877 }
else if (tempattr ==
"x2") {
2879 }
else if (tempattr ==
"x3") {
2881 }
else if (tempattr ==
"x4") {
2883 }
else if (tempattr ==
"y1") {
2885 }
else if (tempattr ==
"y2") {
2887 }
else if (tempattr ==
"z") {
2889 }
else if (tempattr ==
"lunit") {
2891 }
else if (tempattr ==
"aunit") {
2893 }
else if (tempattr ==
"phi") {
2895 }
else if (tempattr ==
"theta") {
2897 }
else if (tempattr ==
"alpha1") {
2899 }
else if (tempattr ==
"alpha2") {
2966 if (tempattr ==
"name") {
2968 }
else if (tempattr ==
"x1") {
2970 }
else if (tempattr ==
"x2") {
2972 }
else if (tempattr ==
"y1") {
2974 }
else if (tempattr ==
"y2") {
2976 }
else if (tempattr ==
"z") {
2978 }
else if (tempattr ==
"lunit") {
3035 if (tempattr ==
"name") {
3037 }
else if (tempattr ==
"lunit") {
3039 }
else if (tempattr ==
"aunit") {
3041 }
else if (tempattr ==
"startphi") {
3043 }
else if (tempattr ==
"deltaphi") {
3061 while (child != 0) {
3062 numplanes = numplanes + 1;
3069 double **
table =
new double*[numplanes];
3070 for (i = 0; i < numplanes; i++) {
3071 table[i] =
new double[cols];
3077 while (child != 0) {
3078 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3090 if (tempattr ==
"rmin") {
3092 rminline =
Value(rmin)*retlunit;
3093 table[planeno][0] = rminline;
3094 }
else if (tempattr ==
"rmax") {
3096 rmaxline =
Value(rmax)*retlunit;
3097 table[planeno][1] = rmaxline;
3098 }
else if (tempattr ==
"z") {
3100 zline =
Value(z)*retlunit;
3101 table[planeno][2] = zline;
3106 planeno = planeno + 1;
3119 for (
int j = 0; j < numplanes; j++) {
3125 for (i = 0; i < numplanes; i++) {
3159 if (tempattr ==
"name") {
3161 }
else if (tempattr ==
"lunit") {
3163 }
else if (tempattr ==
"aunit") {
3165 }
else if (tempattr ==
"startphi") {
3167 }
else if (tempattr ==
"deltaphi") {
3169 }
else if (tempattr ==
"numsides") {
3188 while (child != 0) {
3189 numplanes = numplanes + 1;
3196 double **
table =
new double*[numplanes];
3197 for (i = 0; i < numplanes; i++) {
3198 table[i] =
new double[cols];
3204 while (child != 0) {
3205 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3216 if (tempattr ==
"rmin") {
3218 rminline =
Value(rmin)*retlunit;
3219 table[planeno][0] = rminline;
3220 }
else if (tempattr ==
"rmax") {
3222 rmaxline =
Value(rmax)*retlunit;
3223 table[planeno][1] = rmaxline;
3224 }
else if (tempattr ==
"z") {
3226 zline =
Value(z)*retlunit;
3227 table[planeno][2] = zline;
3233 planeno = planeno + 1;
3248 for (
int j = 0; j < numplanes; j++) {
3254 for (i = 0; i < numplanes; i++) {
3287 if (tempattr ==
"name") {
3289 }
else if (tempattr ==
"rmin") {
3291 }
else if (tempattr ==
"rmax") {
3293 }
else if (tempattr ==
"lunit") {
3295 }
else if (tempattr ==
"aunit") {
3297 }
else if (tempattr ==
"startphi") {
3299 }
else if (tempattr ==
"deltaphi") {
3301 }
else if (tempattr ==
"starttheta") {
3303 }
else if (tempattr ==
"deltatheta") {
3320 Double_t deltaphiline = startphiline+
Value(deltaphi)*retaunit;
3322 Double_t deltathetaline = startthetaline +
Value(deltatheta)*retaunit;
3362 if (tempattr ==
"name") {
3364 }
else if (tempattr ==
"rmin") {
3366 }
else if (tempattr ==
"rmax") {
3368 }
else if (tempattr ==
"rtor") {
3370 }
else if (tempattr ==
"lunit") {
3372 }
else if (tempattr ==
"aunit") {
3374 }
else if (tempattr ==
"startphi") {
3376 }
else if (tempattr ==
"deltaphi") {
3432 if (tempattr ==
"name") {
3434 }
else if (tempattr ==
"rmin") {
3436 }
else if (tempattr ==
"rmax") {
3438 }
else if (tempattr ==
"z") {
3440 }
else if (tempattr ==
"lunit") {
3442 }
else if (tempattr ==
"aunit") {
3444 }
else if (tempattr ==
"inst") {
3446 }
else if (tempattr ==
"outst") {
3505 if (tempattr ==
"name") {
3507 }
else if (tempattr ==
"x") {
3509 }
else if (tempattr ==
"y") {
3511 }
else if (tempattr ==
"z") {
3513 }
else if (tempattr ==
"lunit") {
3515 }
else if (tempattr ==
"aunit") {
3517 }
else if (tempattr ==
"phi") {
3519 }
else if (tempattr ==
"theta") {
3521 }
else if (tempattr ==
"alpha") {
3588 if (tempattr ==
"name") {
3590 }
else if (tempattr ==
"x1") {
3592 }
else if (tempattr ==
"x2") {
3594 }
else if (tempattr ==
"x3") {
3596 }
else if (tempattr ==
"x4") {
3598 }
else if (tempattr ==
"y1") {
3600 }
else if (tempattr ==
"y2") {
3602 }
else if (tempattr ==
"z") {
3604 }
else if (tempattr ==
"lunit") {
3606 }
else if (tempattr ==
"aunit") {
3608 }
else if (tempattr ==
"phi") {
3610 }
else if (tempattr ==
"theta") {
3612 }
else if (tempattr ==
"alph") {
3617 }
else if (tempattr ==
"phitwist") {
3686 if (tempattr ==
"name") {
3688 }
else if (tempattr ==
"dx") {
3690 }
else if (tempattr ==
"dy") {
3692 }
else if (tempattr ==
"dz") {
3694 }
else if (tempattr ==
"lunit") {
3739 if (tempattr ==
"name") {
3741 }
else if (tempattr ==
"r") {
3743 }
else if (tempattr ==
"lunit") {
3796 if (tempattr ==
"name") {
3798 }
else if (tempattr ==
"lunit") {
3817 while (child != 0) {
3820 if (tempattr ==
"twoDimVertex") {
3821 noverts = noverts + 1;
3822 }
else if (tempattr ==
"section") {
3823 nosects = nosects + 1;
3832 double *vertx =
new double[noverts];
3833 double *verty =
new double[noverts];
3835 double ** section =
new double*[nosects];
3836 for (i = 0; i < nosects; i++) {
3837 section[i] =
new double[cols];
3844 while (child != 0) {
3845 if (strcmp(gdml->
GetNodeName(child),
"twoDimVertex") == 0) {
3854 if (tempattr ==
"x") {
3856 xline =
Value(
x)*retlunit;
3857 vertx[vert] = xline;
3858 }
else if (tempattr ==
"y") {
3860 yline =
Value(
y)*retlunit;
3861 verty[vert] = yline;
3870 else if (strcmp(gdml->
GetNodeName(child),
"section") == 0) {
3881 if (tempattr ==
"zOrder") {
3883 section[sect][0] =
Value(zorder);
3884 }
else if (tempattr ==
"zPosition") {
3886 zposline =
Value(zpos)*retlunit;
3887 section[sect][1] = zposline;
3888 }
else if (tempattr ==
"xOffset") {
3890 xoffline =
Value(xoff)*retlunit;
3891 section[sect][2] = xoffline;
3892 }
else if (tempattr ==
"yOffset") {
3894 yoffline =
Value(yoff)*retlunit;
3895 section[sect][3] = yoffline;
3896 }
else if (tempattr ==
"scalingFactor") {
3898 section[sect][4] =
Value(scale);
3913 for (
int j = 0; j < sect; j++) {
3914 xtru->
DefineSection((
int)section[j][0], section[j][1], section[j][2], section[j][3], section[j][4]);
3920 for (i = 0; i < nosects; i++) {
3921 delete [] section[i];
3939 std::cout <<
"WARNING! The reflectedSolid is obsolete! Use scale transformation instead!" << std::endl;
3959 if (tempattr ==
"name") {
3961 }
else if (tempattr ==
"sx") {
3963 }
else if (tempattr ==
"sy") {
3965 }
else if (tempattr ==
"sz") {
3967 }
else if (tempattr ==
"rx") {
3969 }
else if (tempattr ==
"ry") {
3971 }
else if (tempattr ==
"rz") {
3973 }
else if (tempattr ==
"dx") {
3975 }
else if (tempattr ==
"dy") {
3977 }
else if (tempattr ==
"dz") {
3979 }
else if (tempattr ==
"solid") {
3997 if (atoi(sx) == -1) {
4000 if (atoi(sy) == -1) {
4003 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 Int_t GetSize() const
Return the capacity of the collection, i.e.
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 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
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.
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 volume names and the TGeoVolume 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.
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.
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 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.
static EDefaultUnits GetDefaultUnits()
TList * GetListOfMedia() const
TGeoElementTable * GetElementTable()
Returns material table. Creates it if not existing.
TGeoMedium * GetMedium(const char *medium) const
Search for a named tracking medium. All trailing blanks stripped.
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
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
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.
Reference counted extension which has a pointer to and owns a user defined TObject.
Regions are groups of volumes having a common set of user tracking cuts.
void AddCut(const char *name, Double_t cut)
Add cut to the region.
void AddVolume(TGeoVolume *vol)
Class describing rotations.
virtual void RotateY(Double_t angle)
Rotate about Y axis of the master frame with angle expressed in degrees.
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
virtual const Double_t * GetRotationMatrix() const
void SetMatrix(const Double_t *rot)
virtual void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to ZX.
virtual void RotateX(Double_t angle)
Rotate about X axis of the master frame with angle expressed in degrees.
TGeoHMatrix Inverse() const
Return a temporary inverse of this.
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
Class describing scale transformations.
virtual const Double_t * GetScale() const
A shape scaled by a TGeoScale transformation.
Base abstract class for all shapes.
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
Class describing translations.
virtual const Double_t * GetTranslation() const
TRAP is a general trapezoid, i.e.
A trapezoid with both x and y lengths varying with z.
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a component to the assembly.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
void SetUserExtension(TGeoExtension *ext)
Connect user-defined extension to the volume.
TGeoMedium * GetMedium() const
void ReplayCreation(const TGeoVolume *other)
Recreate the content of the other volume without pointer copying.
Int_t GetNdaughters() const
TGeoShape * GetShape() const
virtual TGeoVolume * Divide(const char *divname, Int_t iaxis, Int_t ndiv, Double_t start, Double_t step, Int_t numed=0, Option_t *option="")
Division a la G3.
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
An extrusion with fixed outline shape in x-y and a sequence of z extents (segments).
Bool_t DefinePolygon(Int_t nvert, const Double_t *xv, const Double_t *yv)
Creates the polygon representing the blueprint of any Xtru section.
virtual void DefineSection(Int_t snum, Double_t z, Double_t x0=0., Double_t y0=0., Double_t scale=1.)
defines z position of a section plane, rmin and rmax at this z.
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection).
The TNamed class is the base class for all named ROOT classes.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetName() const
Returns name of object.
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
Collectable string class.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void ToLower()
Change string to lower-case.
const char * Data() const
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
XMLNodePointer_t GetChild(XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
returns first child of xmlnode
void FreeDoc(XMLDocPointer_t xmldoc)
frees allocated document data and deletes document itself
XMLNodePointer_t DocGetRootElement(XMLDocPointer_t xmldoc)
returns root node of document
Bool_t HasAttr(XMLNodePointer_t xmlnode, const char *name)
checks if node has attribute of specified name
XMLAttrPointer_t GetNextAttr(XMLAttrPointer_t xmlattr)
return next attribute in the list
const char * GetAttrName(XMLAttrPointer_t xmlattr)
return name of the attribute
XMLAttrPointer_t GetFirstAttr(XMLNodePointer_t xmlnode)
return first attribute in the list, namespace (if exists) will be skipped
const char * GetNodeName(XMLNodePointer_t xmlnode)
returns name of xmlnode
const char * GetAttr(XMLNodePointer_t xmlnode, const char *name)
returns value of attribute for xmlnode
XMLDocPointer_t ParseFile(const char *filename, Int_t maxbuf=100000)
Parses content of file and tries to produce xml structures.
void SetSkipComments(Bool_t on=kTRUE)
const char * GetAttrValue(XMLAttrPointer_t xmlattr)
return value of attribute
XMLNodePointer_t GetNext(XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
return next to xmlnode node if realnode==kTRUE, any special nodes in between will be skipped
void ShiftToNext(XMLNodePointer_t &xmlnode, Bool_t realnode=kTRUE)
shifts specified node to next if realnode==kTRUE, any special nodes in between will be skipped
XMLNodePointer_t GetParent(XMLNodePointer_t xmlnode)
returns parent of xmlnode
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
static constexpr double second
constexpr Double_t Na()
Avogadro constant (Avogadro's Number) in .
constexpr Double_t RadToDeg()
Conversion from radian to degree: