169 const char* posistr =
"position";
170 const char* setustr =
"setup";
171 const char* consstr =
"constant";
172 const char* varistr =
"variable";
173 const char* rotastr =
"rotation";
174 const char* scalstr =
"scale";
175 const char* elemstr =
"element";
176 const char* istpstr =
"isotope";
177 const char* matestr =
"material";
178 const char* volustr =
"volume";
179 const char* assestr =
"assembly";
180 const char* twtrstr =
"twistedtrap";
181 const char* cutTstr =
"cutTube";
182 const char* bboxstr =
"box";
183 const char* xtrustr =
"xtru";
184 const char* arb8str =
"arb8";
185 const char* tubestr =
"tube";
186 const char* conestr =
"cone";
187 const char* polystr =
"polycone";
188 const char* hypestr =
"hype";
189 const char* trapstr =
"trap";
190 const char* trdstr =
"trd";
191 const char* sphestr =
"sphere";
192 const char* orbstr =
"orb";
193 const char* parastr =
"para";
194 const char* torustr =
"torus";
195 const char* hedrstr =
"polyhedra";
196 const char* eltustr =
"eltube";
197 const char* subtstr =
"subtraction";
198 const char* uniostr =
"union";
199 const char* parbstr =
"paraboloid";
200 const char* intestr =
"intersection";
201 const char* reflstr =
"reflectedSolid";
202 const char* ellistr =
"ellipsoid";
203 const char* elcnstr =
"elcone";
204 const char* usrstr =
"userinfo";
206 Bool_t hasIsotopesExtended;
208 if ((strcmp(name, posistr)) == 0) {
210 }
else if ((strcmp(name, rotastr)) == 0) {
212 }
else if ((strcmp(name, scalstr)) == 0) {
214 }
else if ((strcmp(name, setustr)) == 0) {
216 }
else if ((strcmp(name, consstr)) == 0) {
218 }
else if ((strcmp(name, varistr)) == 0) {
223 else if (((strcmp(name,
"atom")) == 0) && ((strcmp(parent, elemstr)) == 0)) {
225 hasIsotopesExtended =
kFALSE;
226 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
228 else if ((strcmp(name, elemstr) == 0) && !gdml->
HasAttr(node,
"Z")) {
230 hasIsotopesExtended =
kFALSE;
231 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
234 else if ((strcmp(name, elemstr) == 0) && gdml->
HasAttr(node,
"Z")) {
236 if ((strcmp(gdml->
GetNodeName(childtmp),
"fraction") == 0) ){
238 hasIsotopesExtended =
kTRUE;
239 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);}
244 else if (((strcmp(name,
"atom")) == 0) && ((strcmp(parent, istpstr)) == 0)) {
249 else if ((strcmp(name, matestr)) == 0 && gdml->
HasAttr(node,
"Z")) {
256 atom = strcmp(gdml->
GetNodeName(childtmp),
"atom")==0;
259 int z = (atom) ? 1 : 0;
262 else if ((strcmp(name, matestr)) == 0 && !gdml->
HasAttr(node,
"Z")) {
268 else if ((strcmp(name, volustr)) == 0) {
270 }
else if ((strcmp(name, bboxstr)) == 0) {
271 node =
Box(gdml, node, attr);
272 }
else if ((strcmp(name, ellistr)) == 0) {
274 }
else if ((strcmp(name, elcnstr)) == 0) {
275 node =
ElCone(gdml, node, attr);
276 }
else if ((strcmp(name, cutTstr)) == 0) {
277 node =
CutTube(gdml, node, attr);
278 }
else if ((strcmp(name, arb8str)) == 0) {
279 node =
Arb8(gdml, node, attr);
280 }
else if ((strcmp(name, tubestr)) == 0) {
281 node =
Tube(gdml, node, attr);
282 }
else if ((strcmp(name, conestr)) == 0) {
283 node =
Cone(gdml, node, attr);
284 }
else if ((strcmp(name, polystr)) == 0) {
286 }
else if ((strcmp(name, trapstr)) == 0) {
287 node =
Trap(gdml, node, attr);
288 }
else if ((strcmp(name, trdstr)) == 0) {
289 node =
Trd(gdml, node, attr);
290 }
else if ((strcmp(name, sphestr)) == 0) {
291 node =
Sphere(gdml, node, attr);
292 }
else if ((strcmp(name, xtrustr)) == 0) {
293 node =
Xtru(gdml, node, attr);
294 }
else if ((strcmp(name, twtrstr)) == 0) {
296 }
else if ((strcmp(name, hypestr)) == 0) {
297 node =
Hype(gdml, node, attr);
298 }
else if ((strcmp(name, orbstr)) == 0) {
299 node =
Orb(gdml, node, attr);
300 }
else if ((strcmp(name, parastr)) == 0) {
301 node =
Para(gdml, node, attr);
302 }
else if ((strcmp(name, torustr)) == 0) {
303 node =
Torus(gdml, node, attr);
304 }
else if ((strcmp(name, eltustr)) == 0) {
305 node =
ElTube(gdml, node, attr);
306 }
else if ((strcmp(name, hedrstr)) == 0) {
308 }
else if ((strcmp(name, parbstr)) == 0) {
310 }
else if ((strcmp(name, subtstr)) == 0) {
311 node =
BooSolid(gdml, node, attr, 1);
312 }
else if ((strcmp(name, intestr)) == 0) {
313 node =
BooSolid(gdml, node, attr, 2);
314 }
else if ((strcmp(name, uniostr)) == 0) {
315 node =
BooSolid(gdml, node, attr, 3);
316 }
else if ((strcmp(name, reflstr)) == 0) {
318 }
else if ((strcmp(name, assestr)) == 0) {
320 }
else if ((strcmp(name, usrstr)) == 0) {
323 }
else if (((strcmp(name,
"gdml")) != 0) && ((strcmp(name,
"define")) != 0) &&
324 ((strcmp(name,
"element")) != 0) && ((strcmp(name,
"materials")) != 0) &&
325 ((strcmp(name,
"solids")) != 0) && ((strcmp(name,
"structure")) != 0) &&
326 ((strcmp(name,
"zplane")) != 0) && ((strcmp(name,
"first")) != 0) &&
327 ((strcmp(name,
"second")) != 0) && ((strcmp(name,
"twoDimVertex")) != 0) &&
328 ((strcmp(name,
"firstposition")) != 0) && ((strcmp(name,
"firstpositionref")) != 0) &&
329 ((strcmp(name,
"firstrotation")) != 0) && ((strcmp(name,
"firstrotationref")) != 0) &&
330 ((strcmp(name,
"section")) != 0) && ((strcmp(name,
"world")) != 0) &&
331 ((strcmp(name,
"isotope")) != 0)) {
332 std::cout <<
"Error: Unsupported GDML Tag Used :" << name <<
". Please Check Geometry/Schema." << std::endl;
365 if ((strcmp(axisString,
"kXAxis")) == 0) {
367 }
else if ((strcmp(axisString,
"kYAxis")) == 0) {
369 }
else if ((strcmp(axisString,
"kZAxis")) == 0) {
371 }
else if ((strcmp(axisString,
"kRho")) == 0) {
373 }
else if ((strcmp(axisString,
"kPhi")) == 0) {
391 if (index >= 0) stripped = stripped(0, index);
392 return stripped.
Data();
411 if (tempattr ==
"name") {
414 if (tempattr ==
"value") {
438 if (strcmp(unit,
"mm") == 0) {
440 }
else if (strcmp(unit,
"milimeter") == 0) {
442 }
else if (strcmp(unit,
"cm") == 0) {
444 }
else if (strcmp(unit,
"centimeter") == 0) {
446 }
else if (strcmp(unit,
"m") == 0) {
448 }
else if (strcmp(unit,
"meter") == 0) {
450 }
else if (strcmp(unit,
"km") == 0) {
451 retunit =
"100000.0";
452 }
else if (strcmp(unit,
"kilometer") == 0) {
453 retunit =
"100000.0";
454 }
else if (strcmp(unit,
"rad") == 0) {
456 }
else if (strcmp(unit,
"radian") == 0) {
458 }
else if (strcmp(unit,
"deg") == 0) {
460 }
else if (strcmp(unit,
"degree") == 0) {
462 }
else if (strcmp(unit,
"pi") == 0) {
464 }
else if (strcmp(unit,
"avogadro") == 0) {
467 Fatal(
"GetScale",
"Unit <%s> not known", unit);
486 if ((unit ==
"mm") || (unit ==
"milimeter")) {
488 }
else if ((unit ==
"cm") || (unit ==
"centimeter")) {
490 }
else if ((unit ==
"m") || (unit ==
"meter")) {
492 }
else if ((unit ==
"km") || (unit ==
"kilometer")) {
494 }
else if ((unit ==
"rad") || (unit ==
"radian")) {
496 }
else if ((unit ==
"deg") || (unit ==
"degree")) {
498 }
else if ((unit ==
"ev") || (unit ==
"electronvolt")) {
499 retunit = 0.000000001;
500 }
else if ((unit ==
"kev") || (unit ==
"kiloelectronvolt")) {
502 }
else if ((unit ==
"mev") || (unit ==
"megaelectronvolt")) {
504 }
else if ((unit ==
"gev") || (unit ==
"gigaelectronvolt")) {
506 }
else if (unit ==
"pi") {
508 }
else if (unit ==
"avogadro") {
511 Fatal(
"GetScaleVal",
"Unit <%s> not known", sunit);
523 double val = strtod(svalue, &end);
526 while( *end != 0 && isspace(*end) ) ++end;
530 if (*end == 0)
return val;
536 std::string expanded;
537 expanded.reserve(strlen(svalue) * 2);
541 const std::locale &loc = std::locale::classic();
544 const char *p = svalue;
547 for (; *p != 0; ++p) {
548 if (std::isalpha(*p, loc) || *p ==
'_') {
560 for (; *p != 0; ++p) {
561 if (!isalnum(*p, loc) && *p !=
'_') {
569 if (*p == 0) expanded +=
']';
572 TFormula f(
"TFormula", expanded.c_str());
575 for (
auto it:
fconsts)
f.SetParameter(it.first.c_str(), it.second);
580 Fatal(
"Value",
"Got bad value %lf from string '%s'", val, svalue);
607 if (tempattr ==
"name") {
609 }
else if (tempattr ==
"x") {
611 }
else if (tempattr ==
"y") {
613 }
else if (tempattr ==
"z") {
615 }
else if (tempattr ==
"unit") {
660 if (tempattr ==
"name") {
662 }
else if (tempattr ==
"x") {
664 }
else if (tempattr ==
"y") {
666 }
else if (tempattr ==
"z") {
668 }
else if (tempattr ==
"unit") {
717 if (tempattr ==
"name") {
719 }
else if (tempattr ==
"x") {
721 }
else if (tempattr ==
"y") {
723 }
else if (tempattr ==
"z") {
765 if (tempattr ==
"name") {
767 }
else if (tempattr ==
"z") {
769 }
else if (tempattr ==
"n") {
784 if (tempattr ==
"value") {
807 Info(
"TGDMLParse",
"Re-use existing isotope: %s",iso->
GetName());
845 if (tempattr ==
"name") {
860 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
868 if (tempattr ==
"n") {
870 }
else if (tempattr ==
"ref") {
878 fracmap[ref.
Data()] =
n;
885 if (ele && ele->
Z() == 0)
889 for (fractions
f = fracmap.begin();
f != fracmap.end(); ++
f) {
896 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
905 if (hasIsotopesExtended) {
910 if (tempattr ==
"name") {
925 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
933 if (tempattr ==
"n") {
935 }
else if (tempattr ==
"ref") {
943 fracmap[ref.
Data()] =
n;
950 if (ele && ele->
Z() == 0)
954 for (fractions
f = fracmap.begin();
f != fracmap.end(); ++
f) {
961 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
975 if (tempattr ==
"name") {
978 }
else if (tempattr ==
"z") {
980 }
else if (tempattr ==
"formula") {
996 if (tempattr ==
"value") {
1011 if (ele && ele->
Z() == 0)
1017 else if (
gDebug >= 2 ) {
1018 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1048 Int_t ncompo = 0, mixflag = 2;
1061 while (child != 0) {
1064 if ((strcmp(gdml->
GetNodeName(child),
"atom")) == 0) {
1069 if (tempattr ==
"value") {
1076 if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1081 if (tempattr ==
"value") {
1091 name = gdml->
GetAttr(node,
"name");
1098 tempconst = gdml->
GetAttr(node,
"Z");
1105 if (tmpname ==
"vacuum") {
1114 Info(
"TGDMLParse",
"Re-use existing material: %s",mat->
GetName());
1120 if (mat_ele && mat_ele->
Z() == 0)
1124 mat_ele =
new TGeoElement(mat_name, mat_name, atoi(tempconst), a);
1126 else if (
gDebug >= 2 ) {
1127 Info(
"TGDMLParse",
"Re-use existing material-element: %s",mat_ele->
GetName());
1133 while (child != 0) {
1136 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1139 ncompo = ncompo + 1;
1145 if (tempattr ==
"n") {
1147 }
else if (tempattr ==
"ref") {
1157 fracmap[ref.
Data()] =
n;
1161 else if ((strcmp(gdml->
GetNodeName(child),
"composite")) == 0) {
1165 ncompo = ncompo + 1;
1171 if (tempattr ==
"n") {
1173 }
else if (tempattr ==
"ref") {
1183 fracmap[ref.
Data()] =
n;
1186 else if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1191 if (tempattr ==
"value") {
1203 name = gdml->
GetAttr(node,
"name");
1217 Info(
"TGDMLParse",
"Re-use existing material-mixture: %s",mix->
GetName());
1220 Error(
"TGDMLParse",
"WARNING! Inconsistent material definitions between GDML and TGeoManager");
1225 for (fractions
f = fracmap.begin();
f != fracmap.end(); ++
f) {
1233 natoms = (
Int_t)
f->second;
1262 }
else if (mixflag == 0) {
1267 else if (
gDebug >= 2 ) {
1268 Info(
"TGDMLParse",
"Re-use existing medium: %s",med->
GetName());
1311 while (child != 0) {
1312 if ((strcmp(gdml->
GetNodeName(child),
"solidref")) == 0) {
1314 reftemp = gdml->
GetAttr(child,
"ref");
1321 solidname = reftemp;
1324 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
1328 if ((strcmp(gdml->
GetNodeName(child),
"materialref")) == 0) {
1329 reftemp = gdml->
GetAttr(child,
"ref");
1336 printf(
"Medium: %s, Not Yet Defined!\n", gdml->
GetAttr(child,
"ref"));
1343 name = gdml->
GetAttr(node,
"name");
1365 while (child != 0) {
1366 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
1379 while (subchild != 0) {
1383 if (tempattr ==
"volumeref") {
1384 reftemp = gdml->
GetAttr(subchild,
"ref");
1391 else if (tempattr ==
"file") {
1392 const char* filevol;
1396 filevol = gdml->
GetAttr(subchild,
"volname");
1401 if (filedoc1 == 0) {
1434 else if (tempattr ==
"position") {
1437 reftemp = gdml->
GetAttr(subchild,
"name");
1442 }
else if (tempattr ==
"positionref") {
1443 reftemp = gdml->
GetAttr(subchild,
"ref");
1448 else std::cout <<
"ERROR! Physvol's position " << reftemp <<
" not found!" << std::endl;
1449 }
else if (tempattr ==
"rotation") {
1452 reftemp = gdml->
GetAttr(subchild,
"name");
1457 }
else if (tempattr ==
"rotationref") {
1458 reftemp = gdml->
GetAttr(subchild,
"ref");
1463 else std::cout <<
"ERROR! Physvol's rotation " << reftemp <<
" not found!" << std::endl;
1464 }
else if (tempattr ==
"scale") {
1467 reftemp = gdml->
GetAttr(subchild,
"name");
1472 }
else if (tempattr ==
"scaleref") {
1473 reftemp = gdml->
GetAttr(subchild,
"ref");
1478 else std::cout <<
"ERROR! Physvol's scale " << reftemp <<
" not found!" << std::endl;
1481 subchild = gdml->
GetNext(subchild);
1495 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
1498 scale3x3[0] = diagonal[0];
1499 scale3x3[4] = diagonal[1];
1500 scale3x3[8] = diagonal[2];
1524 vol->
AddNode(lv, copynum, transform);
1527 }
else if ((strcmp(gdml->
GetNodeName(child),
"divisionvol")) == 0) {
1543 if (tempattr ==
"axis") {
1545 }
else if (tempattr ==
"number") {
1547 }
else if (tempattr ==
"width") {
1549 }
else if (tempattr ==
"offset") {
1551 }
else if (tempattr ==
"unit") {
1561 while (subchild != 0) {
1565 if (tempattr ==
"volumeref") {
1566 reftemp = gdml->
GetAttr(subchild,
"ref");
1570 divVolref = reftemp;
1573 subchild = gdml->
GetNext(subchild);
1599 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
1610 else if ((strcmp(gdml->
GetNodeName(child),
"replicavol")) == 0) {
1630 if (tempattr ==
"number") {
1638 while (subchild != 0) {
1642 if (tempattr ==
"volumeref") {
1643 reftemp = gdml->
GetAttr(subchild,
"ref");
1647 divVolref = reftemp;
1650 if (tempattr ==
"replicate_along_axis") {
1651 subsubchild = gdml->
GetChild(subchild);
1653 while (subsubchild != 0) {
1654 if ((strcmp(gdml->
GetNodeName(subsubchild),
"width")) == 0) {
1659 if (tempattr ==
"value") {
1662 else if (tempattr ==
"unit"){
1669 else if ((strcmp(gdml->
GetNodeName(subsubchild),
"offset")) == 0) {
1674 if (tempattr ==
"value") {
1677 else if (tempattr ==
"unit"){
1683 else if ((strcmp(gdml->
GetNodeName(subsubchild),
"direction")) == 0) {
1688 if (tempattr ==
"x") {
1691 else if (tempattr ==
"y"){
1694 else if (tempattr ==
"z"){
1697 else if (tempattr ==
"rho"){
1700 else if (tempattr ==
"phi"){
1708 subsubchild = gdml->
GetNext(subsubchild);
1713 subchild = gdml->
GetNext(subchild);
1721 Double_t widthline = wvalue*retwunit;
1722 Double_t offsetline = ovalue*retounit;
1742 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
1751 else if (strcmp(gdml->
GetNodeName(child),
"auxiliary") == 0) {
1752 TString auxType, auxUnit, auxValue;
1754 printf(
"Auxiliary values for volume %s\n",vol->
GetName());
1755 auxmap =
new TMap();
1767 printf(
" %s: %s\n", auxType.
Data(), auxValue.
Data());
1816 while (child != 0) {
1820 if (tempattr ==
"first") {
1821 reftemp = gdml->
GetAttr(child,
"ref");
1828 }
else if (tempattr ==
"second") {
1829 reftemp = gdml->
GetAttr(child,
"ref");
1836 }
else if (tempattr ==
"position") {
1839 reftemp = gdml->
GetAttr(child,
"name");
1844 }
else if (tempattr ==
"positionref") {
1845 reftemp = gdml->
GetAttr(child,
"ref");
1852 }
else if (tempattr ==
"rotation") {
1855 reftemp = gdml->
GetAttr(child,
"name");
1860 }
else if (tempattr ==
"rotationref") {
1861 reftemp = gdml->
GetAttr(child,
"ref");
1868 }
else if (tempattr ==
"firstposition") {
1871 reftemp = gdml->
GetAttr(child,
"name");
1876 }
else if (tempattr ==
"firstpositionref") {
1877 reftemp = gdml->
GetAttr(child,
"ref");
1884 }
else if (tempattr ==
"firstrotation") {
1887 reftemp = gdml->
GetAttr(child,
"name");
1892 }
else if (tempattr ==
"firstrotationref") {
1893 reftemp = gdml->
GetAttr(child,
"ref");
1908 if (!first || !second) {
1909 Fatal(
"BooSolid",
"Incomplete solid %s, missing shape components", name.
Data());
1937 TString nodename, auxtype, auxtypec, auxvalue, auxvaluec, auxunit, auxunitc;
1943 if (nodename ==
"auxiliary") {
1944 auxtype = gdml->
GetAttr(child,
"auxtype");
1945 auxvalue = gdml->
GetAttr(child,
"auxvalue");
1946 if (auxtype ==
"Region") {
1953 auxtypec = gdml->
GetAttr(subchild,
"auxtype");
1954 auxvaluec = gdml->
GetAttr(subchild,
"auxvalue");
1955 auxunitc = gdml->
GetAttr(subchild,
"auxunit");
1956 if (auxtypec ==
"volume") {
1958 if (region) region->
AddVolume(auxvaluec);
1962 if (region) region->
AddCut(auxtypec, value);
1964 subchild = gdml->
GetNext(subchild);
2010 while (child != 0) {
2011 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
2020 while (subchild != 0) {
2024 if (tempattr ==
"volumeref") {
2025 reftemp = gdml->
GetAttr(subchild,
"ref");
2030 }
else if (tempattr ==
"positionref") {
2031 reftemp = gdml->
GetAttr(subchild,
"ref");
2038 }
else if (tempattr ==
"position") {
2041 reftemp = gdml->
GetAttr(subchild,
"name");
2046 }
else if (tempattr ==
"rotationref") {
2047 reftemp = gdml->
GetAttr(subchild,
"ref");
2054 }
else if (tempattr ==
"rotation") {
2057 reftemp = gdml->
GetAttr(subchild,
"name");
2064 subchild = gdml->
GetNext(subchild);
2070 assem->
AddNode(lv, copynum, matr);
2094 while (child != 0) {
2096 if ((strcmp(gdml->
GetNodeName(child),
"world") == 0)) {
2099 reftemp = gdml->
GetAttr(child,
"ref");
2136 if (tempattr ==
"name") {
2138 }
else if (tempattr ==
"x") {
2140 }
else if (tempattr ==
"y") {
2142 }
else if (tempattr ==
"z") {
2144 }
else if (tempattr ==
"lunit") {
2196 if (tempattr ==
"name") {
2198 }
else if (tempattr ==
"ax") {
2200 }
else if (tempattr ==
"by") {
2202 }
else if (tempattr ==
"cz") {
2204 }
else if (tempattr ==
"zcut1") {
2206 }
else if (tempattr ==
"zcut2") {
2208 }
else if (tempattr ==
"lunit") {
2232 z1 =
Value(zcut1)*retunit;
2237 z2 =
Value(zcut2)*retunit;
2245 origin[2] = 0.5 * (z1 + z2);
2280 if (tempattr ==
"name") {
2282 }
else if (tempattr ==
"dx") {
2284 }
else if (tempattr ==
"dy") {
2286 }
else if (tempattr ==
"zmax") {
2288 }
else if (tempattr ==
"zcut") {
2290 }
else if (tempattr ==
"lunit") {
2312 Info(
"ElCone",
"ERROR! Parameter zcut = %.12g is not set properly, elcone will not be imported.", z1);
2356 if (tempattr ==
"name") {
2358 }
else if (tempattr ==
"rlo") {
2360 }
else if (tempattr ==
"rhi") {
2362 }
else if (tempattr ==
"dz") {
2364 }
else if (tempattr ==
"lunit") {
2424 if (tempattr ==
"name") {
2426 }
else if (tempattr ==
"v1x") {
2428 }
else if (tempattr ==
"v1y") {
2430 }
else if (tempattr ==
"v2x") {
2432 }
else if (tempattr ==
"v2y") {
2434 }
else if (tempattr ==
"v3x") {
2436 }
else if (tempattr ==
"v3y") {
2438 }
else if (tempattr ==
"v4x") {
2440 }
else if (tempattr ==
"v4y") {
2442 }
else if (tempattr ==
"v5x") {
2444 }
else if (tempattr ==
"v5y") {
2446 }
else if (tempattr ==
"v6x") {
2448 }
else if (tempattr ==
"v6y") {
2450 }
else if (tempattr ==
"v7x") {
2452 }
else if (tempattr ==
"v7y") {
2454 }
else if (tempattr ==
"v8x") {
2456 }
else if (tempattr ==
"v8y") {
2458 }
else if (tempattr ==
"dz") {
2460 }
else if (tempattr ==
"lunit") {
2533 if (tempattr ==
"name") {
2535 }
else if (tempattr ==
"rmin") {
2537 }
else if (tempattr ==
"rmax") {
2539 }
else if (tempattr ==
"z") {
2541 }
else if (tempattr ==
"lunit") {
2543 }
else if (tempattr ==
"aunit") {
2545 }
else if (tempattr ==
"startphi") {
2547 }
else if (tempattr ==
"deltaphi") {
2566 Double_t endphideg = startphideg + deltaphideg;
2569 if (deltaphideg < 360.)
2615 if (tempattr ==
"name") {
2617 }
else if (tempattr ==
"rmin") {
2619 }
else if (tempattr ==
"rmax") {
2621 }
else if (tempattr ==
"z") {
2623 }
else if (tempattr ==
"lunit") {
2625 }
else if (tempattr ==
"aunit") {
2627 }
else if (tempattr ==
"startphi") {
2629 }
else if (tempattr ==
"deltaphi") {
2631 }
else if (tempattr ==
"lowx") {
2633 }
else if (tempattr ==
"lowy") {
2635 }
else if (tempattr ==
"lowz") {
2637 }
else if (tempattr ==
"highx") {
2639 }
else if (tempattr ==
"highy") {
2641 }
else if (tempattr ==
"highz") {
2659 Double_t deltaphiline =
Value(deltaphi)*retaunit + startphiline;
2713 if (tempattr ==
"name") {
2715 }
else if (tempattr ==
"rmin1") {
2717 }
else if (tempattr ==
"rmax1") {
2719 }
else if (tempattr ==
"rmin2") {
2721 }
else if (tempattr ==
"rmax2") {
2723 }
else if (tempattr ==
"z") {
2725 }
else if (tempattr ==
"lunit") {
2727 }
else if (tempattr ==
"aunit") {
2729 }
else if (tempattr ==
"startphi") {
2731 }
else if (tempattr ==
"deltaphi") {
2805 if (tempattr ==
"name") {
2807 }
else if (tempattr ==
"x1") {
2809 }
else if (tempattr ==
"x2") {
2811 }
else if (tempattr ==
"x3") {
2813 }
else if (tempattr ==
"x4") {
2815 }
else if (tempattr ==
"y1") {
2817 }
else if (tempattr ==
"y2") {
2819 }
else if (tempattr ==
"z") {
2821 }
else if (tempattr ==
"lunit") {
2823 }
else if (tempattr ==
"aunit") {
2825 }
else if (tempattr ==
"phi") {
2827 }
else if (tempattr ==
"theta") {
2829 }
else if (tempattr ==
"alpha1") {
2831 }
else if (tempattr ==
"alpha2") {
2898 if (tempattr ==
"name") {
2900 }
else if (tempattr ==
"x1") {
2902 }
else if (tempattr ==
"x2") {
2904 }
else if (tempattr ==
"y1") {
2906 }
else if (tempattr ==
"y2") {
2908 }
else if (tempattr ==
"z") {
2910 }
else if (tempattr ==
"lunit") {
2967 if (tempattr ==
"name") {
2969 }
else if (tempattr ==
"lunit") {
2971 }
else if (tempattr ==
"aunit") {
2973 }
else if (tempattr ==
"startphi") {
2975 }
else if (tempattr ==
"deltaphi") {
2993 while (child != 0) {
2994 numplanes = numplanes + 1;
3001 double ** table =
new double*[numplanes];
3002 for (i = 0; i < numplanes; i++) {
3003 table[i] =
new double[cols];
3009 while (child != 0) {
3010 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3022 if (tempattr ==
"rmin") {
3024 rminline =
Value(rmin)*retlunit;
3025 table[planeno][0] = rminline;
3026 }
else if (tempattr ==
"rmax") {
3028 rmaxline =
Value(rmax)*retlunit;
3029 table[planeno][1] = rmaxline;
3030 }
else if (tempattr ==
"z") {
3032 zline =
Value(z)*retlunit;
3033 table[planeno][2] = zline;
3038 planeno = planeno + 1;
3051 for (
int j = 0; j < numplanes; j++) {
3052 poly->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3057 for (i = 0; i < numplanes; i++) {
3091 if (tempattr ==
"name") {
3093 }
else if (tempattr ==
"lunit") {
3095 }
else if (tempattr ==
"aunit") {
3097 }
else if (tempattr ==
"startphi") {
3099 }
else if (tempattr ==
"deltaphi") {
3101 }
else if (tempattr ==
"numsides") {
3120 while (child != 0) {
3121 numplanes = numplanes + 1;
3128 double ** table =
new double*[numplanes];
3129 for (i = 0; i < numplanes; i++) {
3130 table[i] =
new double[cols];
3136 while (child != 0) {
3137 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3148 if (tempattr ==
"rmin") {
3150 rminline =
Value(rmin)*retlunit;
3151 table[planeno][0] = rminline;
3152 }
else if (tempattr ==
"rmax") {
3154 rmaxline =
Value(rmax)*retlunit;
3155 table[planeno][1] = rmaxline;
3156 }
else if (tempattr ==
"z") {
3158 zline =
Value(z)*retlunit;
3159 table[planeno][2] = zline;
3165 planeno = planeno + 1;
3180 for (
int j = 0; j < numplanes; j++) {
3181 polyg->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3186 for (i = 0; i < numplanes; i++) {
3219 if (tempattr ==
"name") {
3221 }
else if (tempattr ==
"rmin") {
3223 }
else if (tempattr ==
"rmax") {
3225 }
else if (tempattr ==
"lunit") {
3227 }
else if (tempattr ==
"aunit") {
3229 }
else if (tempattr ==
"startphi") {
3231 }
else if (tempattr ==
"deltaphi") {
3233 }
else if (tempattr ==
"starttheta") {
3235 }
else if (tempattr ==
"deltatheta") {
3252 Double_t deltaphiline = startphiline+
Value(deltaphi)*retaunit;
3254 Double_t deltathetaline = startthetaline +
Value(deltatheta)*retaunit;
3294 if (tempattr ==
"name") {
3296 }
else if (tempattr ==
"rmin") {
3298 }
else if (tempattr ==
"rmax") {
3300 }
else if (tempattr ==
"rtor") {
3302 }
else if (tempattr ==
"lunit") {
3304 }
else if (tempattr ==
"aunit") {
3306 }
else if (tempattr ==
"startphi") {
3308 }
else if (tempattr ==
"deltaphi") {
3364 if (tempattr ==
"name") {
3366 }
else if (tempattr ==
"rmin") {
3368 }
else if (tempattr ==
"rmax") {
3370 }
else if (tempattr ==
"z") {
3372 }
else if (tempattr ==
"lunit") {
3374 }
else if (tempattr ==
"aunit") {
3376 }
else if (tempattr ==
"inst") {
3378 }
else if (tempattr ==
"outst") {
3437 if (tempattr ==
"name") {
3439 }
else if (tempattr ==
"x") {
3441 }
else if (tempattr ==
"y") {
3443 }
else if (tempattr ==
"z") {
3445 }
else if (tempattr ==
"lunit") {
3447 }
else if (tempattr ==
"aunit") {
3449 }
else if (tempattr ==
"phi") {
3451 }
else if (tempattr ==
"theta") {
3453 }
else if (tempattr ==
"alpha") {
3520 if (tempattr ==
"name") {
3522 }
else if (tempattr ==
"x1") {
3524 }
else if (tempattr ==
"x2") {
3526 }
else if (tempattr ==
"x3") {
3528 }
else if (tempattr ==
"x4") {
3530 }
else if (tempattr ==
"y1") {
3532 }
else if (tempattr ==
"y2") {
3534 }
else if (tempattr ==
"z") {
3536 }
else if (tempattr ==
"lunit") {
3538 }
else if (tempattr ==
"aunit") {
3540 }
else if (tempattr ==
"phi") {
3542 }
else if (tempattr ==
"theta") {
3544 }
else if (tempattr ==
"alph") {
3549 }
else if (tempattr ==
"phitwist") {
3618 if (tempattr ==
"name") {
3620 }
else if (tempattr ==
"dx") {
3622 }
else if (tempattr ==
"dy") {
3624 }
else if (tempattr ==
"dz") {
3626 }
else if (tempattr ==
"lunit") {
3671 if (tempattr ==
"name") {
3673 }
else if (tempattr ==
"r") {
3675 }
else if (tempattr ==
"lunit") {
3728 if (tempattr ==
"name") {
3730 }
else if (tempattr ==
"lunit") {
3749 while (child != 0) {
3752 if (tempattr ==
"twoDimVertex") {
3753 noverts = noverts + 1;
3754 }
else if (tempattr ==
"section") {
3755 nosects = nosects + 1;
3764 double *vertx =
new double[noverts];
3765 double *verty =
new double[noverts];
3767 double ** section =
new double*[nosects];
3768 for (i = 0; i < nosects; i++) {
3769 section[i] =
new double[cols];
3776 while (child != 0) {
3777 if (strcmp(gdml->
GetNodeName(child),
"twoDimVertex") == 0) {
3786 if (tempattr ==
"x") {
3788 xline =
Value(x)*retlunit;
3789 vertx[vert] = xline;
3790 }
else if (tempattr ==
"y") {
3792 yline =
Value(y)*retlunit;
3793 verty[vert] = yline;
3802 else if (strcmp(gdml->
GetNodeName(child),
"section") == 0) {
3813 if (tempattr ==
"zOrder") {
3815 section[sect][0] =
Value(zorder);
3816 }
else if (tempattr ==
"zPosition") {
3818 zposline =
Value(zpos)*retlunit;
3819 section[sect][1] = zposline;
3820 }
else if (tempattr ==
"xOffset") {
3822 xoffline =
Value(xoff)*retlunit;
3823 section[sect][2] = xoffline;
3824 }
else if (tempattr ==
"yOffset") {
3826 yoffline =
Value(yoff)*retlunit;
3827 section[sect][3] = yoffline;
3828 }
else if (tempattr ==
"scalingFactor") {
3830 section[sect][4] =
Value(scale);
3845 for (
int j = 0; j < sect; j++) {
3846 xtru->
DefineSection((
int)section[j][0], section[j][1], section[j][2], section[j][3], section[j][4]);
3852 for (i = 0; i < nosects; i++) {
3853 delete [] section[i];
3871 std::cout <<
"WARNING! The reflectedSolid is obsolete! Use scale transformation instead!" << std::endl;
3891 if (tempattr ==
"name") {
3893 }
else if (tempattr ==
"sx") {
3895 }
else if (tempattr ==
"sy") {
3897 }
else if (tempattr ==
"sz") {
3899 }
else if (tempattr ==
"rx") {
3901 }
else if (tempattr ==
"ry") {
3903 }
else if (tempattr ==
"rz") {
3905 }
else if (tempattr ==
"dx") {
3907 }
else if (tempattr ==
"dy") {
3909 }
else if (tempattr ==
"dz") {
3911 }
else if (tempattr ==
"solid") {
3925 rot->RotateZ(-(
Value(rz)));
3926 rot->RotateY(-(
Value(ry)));
3927 rot->RotateX(-(
Value(rx)));
3929 if (atoi(sx) == -1) {
3930 rot->ReflectX(
kTRUE);
3932 if (atoi(sy) == -1) {
3933 rot->ReflectY(
kTRUE);
3935 if (atoi(sz) == -1) {
3936 rot->ReflectZ(
kTRUE);
virtual const char * GetName() const
Returns name of object.
XMLNodePointer_t UsrProcess(TXMLEngine *gdml, XMLNodePointer_t node)
User data to be processed.
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 TwistTrap(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a TwistTrap may be declared.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
The manager class for any TGeo geometry.
RotMap frotmap
Map containing position names and the TGeoTranslation for it.
XMLNodePointer_t Trd(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Trd may be declared.
MatMap fmatmap
Map containing element names and the TGeoElement for it.
Collectable string class.
void MultiplyLeft(const TGeoMatrix *left)
multiply to the left with an other transformation if right is identity matrix, just return ...
Gtra is a twisted trapezoid.
Geometrical transformation package.
XMLNodePointer_t Paraboloid(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Paraboloid may be declared.
image html pict1_TGaxis_012 png width
Define new text attributes for the label number "labNum".
XMLNodePointer_t Xtru(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Xtru may be declared.
virtual const Double_t * GetRotationMatrix() const =0
virtual void SetName(const char *name)
Set the name of the TNamed.
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...
EleMap felemap
Map containing isotope names and the TGeoIsotope for it.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
TGeoElementTable * GetElementTable()
Returns material table. Creates it if not existing.
virtual void RotateX(Double_t angle)
Rotate about X axis of the master frame with angle expressed in degrees.
XMLNodePointer_t Cone(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a cone may be declared.
void SetTranslation(const Double_t *vect)
void Add(TObject *obj)
This function may not be used (but we need to provide it since it is a pure virtual in TCollection)...
Class describing translations.
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.
Int_t AddRegion(TGeoRegion *region)
Add a new region of volumes.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
TString GetScale(const char *unit)
Throughout the GDML file, a unit can de specified.
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 ...
Matrix class used for computing global transformations Should NOT be used for node definition...
Base class describing materials.
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return ...
XMLNodePointer_t IsoProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLNodePointer_t parentn)
In the material section of the GDML file, an isotope may 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.
void ToLower()
Change string to lower-case.
void SetSkipComments(Bool_t on=kTRUE)
void ReplayCreation(const TGeoVolume *other)
Recreate the content of the other volume without pointer copying.
TGeoIsotope * FindIsotope(const char *name) const
Find existing isotope by name. Not optimized for a big number of isotopes.
A shape scaled by a TGeoScale transformation.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual const Double_t * GetScale() const
XMLAttrPointer_t GetNextAttr(XMLAttrPointer_t xmlattr)
return next attribute in the list
TGeoHMatrix Inverse() const
Return a temporary inverse of this.
void FreeDoc(XMLDocPointer_t xmldoc)
frees allocated document data and deletes document itself
double GetScaleVal(const char *unit)
Throughout the GDML file, a unit can de specified.
TList * GetListOfMaterials() const
virtual TObject * FindObject(const char *name) const
Delete a TObjLink object.
ReflectionsMap freflectmap
Map containing volume names and the TGeoVolume for it.
Int_t GetNdaughters() const
TGeoMaterial * GetMaterial(const char *matname) const
Search for a named material. All trailing blanks stripped.
TList * GetListOfMedia() const
const char * fCurrentFile
XMLNodePointer_t SclProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, rotations can be declared.
This class contains the implementation of the GDML parser associated to all the supported GDML elemen...
TObject * Last() const
Return the object in the last filled slot. Returns 0 if no entries.
static const double x2[5]
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.
double Evaluate(const char *evalline)
Takes a string containing a mathematical expression and returns the value of the expression.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
A phi segment of a conical tube.
The TNamed class is the base class for all named ROOT classes.
TGeoMatrix * GetMatrix()
This accessor method returns the matrix.
TGeoVolume * GDMLReadFile(const char *filename="test.gdml")
Creates the new instance of the XMLEngine called 'gdml', using the filename >> then parses the file a...
void AddIsotope(TGeoIsotope *isotope, Double_t relativeAbundance)
Add an isotope for this element. All isotopes have to be isotopes of the same element.
Base class for chemical elements.
static const double x4[22]
XMLNodePointer_t Arb8(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Arb8 may be declared.
TGeoMedium * GetMedium() const
double Value(const char *svalue) const
Convert number in string format to double value.
virtual void SetVertex(Int_t vnum, Double_t x, Double_t y)
Set values for a given vertex.
TRAP is a general trapezoid, i.e.
virtual void RotateY(Double_t angle)
Rotate about Y axis of the master frame with angle expressed in degrees.
FileMap ffilemap
Map containing reflected volume names and the solid ref for it.
ConstMap fconsts
Map containing files parsed during entire parsing, with their world volume name.
virtual const Double_t * GetTranslation() const
static constexpr double second
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.
This class is a helper class for TGDMLParse.
const char * GetNodeName(XMLNodePointer_t xmlnode)
returns name of xmlnode
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.
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
XMLNodePointer_t Sphere(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Sphere may be declared.
virtual const Double_t * GetRotationMatrix() const
XMLNodePointer_t Orb(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Orb may be declared.
Class handling Boolean composition of shapes.
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 trapezoid with both x and y lengths varying with z.
XMLNodePointer_t PosProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, positions 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 Box(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a box may be declared.
XMLNodePointer_t Ellipsoid(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an ellipsoid may be declared.
Base abstract class for all shapes.
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 ...
std::map< std::string, double > FracMap
Class describing rotation + translation.
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 Trap(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Trap may be declared.
Regions are groups of volumes having a common set of user tracking cuts.
Hyperboloid class defined by 5 parameters.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
const char * GetAttrValue(XMLAttrPointer_t xmlattr)
return value of attribute
TGeoElement * FindElement(const char *name) const
Search an element by symbol or full name Exact matching.
XMLNodePointer_t RotProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, rotations can be declared.
XMLAttrPointer_t GetFirstAttr(XMLNodePointer_t xmlnode)
return first attribute in the list, namespace (if exists) will be skipped
TXMLEngine * fFileEngine[20]
XMLNodePointer_t Hype(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Hype may be declared.
IsoMap fisomap
Map containing scale names and the TGeoScale for it.
constexpr Double_t Na()
Avogadro constant (Avogadro's Number) in .
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a component to the assembly.
void SetUserExtension(TGeoExtension *ext)
Connect user-defined extension to the volume.
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
XMLNodePointer_t TopProcess(TXMLEngine *gdml, XMLNodePointer_t node)
In the setup section of the GDML file, the top volume need to be declared.
Class describing rotations.
Bool_t HasAttr(XMLNodePointer_t xmlnode, const char *name)
checks if node has attribute of specified name
TGeoMedium * GetMedium(const char *medium) const
Search for a named tracking medium. All trailing blanks stripped.
A tube segment cut with 2 planes.
XMLDocPointer_t ParseFile(const char *filename, Int_t maxbuf=100000)
Parses content of file and tries to produce xml structures.
An extrusion with fixed outline shape in x-y and a sequence of z extents (segments).
Class describing scale transformations.
static const double x1[5]
XMLNodePointer_t Polyhedra(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Polyhedra may be declared.
R__EXTERN TGeoManager * gGeoManager
virtual Bool_t IsMixture() const
const char * GetAttr(XMLNodePointer_t xmlnode, const char *name)
returns value of attribute for xmlnode
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
MixMap fmixmap
Map containing medium names and the TGeoMedium for it.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
void AddVolume(TGeoVolume *vol)
Reference counted extension which has a pointer to and owns a user defined TObject.
Int_t SetAxis(const char *axisString)
When using the 'divide' process in the geometry this function sets the variable 'axis' depending on w...
An arbitrary trapezoid with less than 8 vertices standing on two parallel planes perpendicular to Z a...
Media are used to store properties related to tracking and which are useful only when using geometry ...
const char * NameShort(const char *name)
This function looks thru a string for the chars '0x' next to each other, when it finds this...
void SetMatrix(const Double_t *rot)
MedMap fmedmap
Map containing material names and the TGeoMaterial for it.
you should not use this method at all Int_t Int_t z
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
SclMap fsclmap
Map containing rotation names and the TGeoRotation for it.
SolMap fsolmap
Map containing mixture names and the TGeoMixture for it.
const char * ParseGDML(TXMLEngine *gdml, XMLNodePointer_t node)
This function recursively moves thru the DOM tree of the GDML file.
ReflVolMap freflvolmap
Map containing reflection names and the TGDMLRefl for it - containing refl matrix.
VolMap fvolmap
Map containing solid names and the TGeoShape for it.
XMLNodePointer_t GetChild(XMLNodePointer_t xmlnode, Bool_t realnode=kTRUE)
returns first child of xmlnode
Base class for Boolean operations between two shapes.
XMLNodePointer_t GetParent(XMLNodePointer_t xmlnode)
returns parent of xmlnode
void SetRotation(const Double_t *matrix)
XMLNodePointer_t DocGetRootElement(XMLDocPointer_t xmldoc)
returns root node of document
XMLNodePointer_t ElTube(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a ElTube may be declared.
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.
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
ReflSolidMap freflsolidmap
Map containing reflection names and the Solid name ir references to.
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 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...
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
TGeoShape * GetShape() const
XMLNodePointer_t Tube(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Tube may be declared.
void AddCut(const char *name, Double_t cut)
Add cut to the region.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
XMLNodePointer_t AssProcess(TXMLEngine *gdml, XMLNodePointer_t node)
In the structure section of the GDML file, assembly volumes can be declared.
XMLNodePointer_t VolProcess(TXMLEngine *gdml, XMLNodePointer_t node)
In the structure section of the GDML file, volumes can be declared.
const char * GetAttrName(XMLAttrPointer_t xmlattr)
return name of the attribute
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.
Bool_t DefinePolygon(Int_t nvert, const Double_t *xv, const Double_t *yv)
Creates the polygon representing the blueprint of any Xtru section.
static const double x3[11]
const char * Data() const