204 const char* posistr =
"position";
205 const char* setustr =
"setup";
206 const char* consstr =
"constant";
207 const char* varistr =
"variable";
208 const char* quanstr =
"quantity";
209 const char* matrstr =
"matrix";
210 const char* rotastr =
"rotation";
211 const char* scalstr =
"scale";
212 const char* elemstr =
"element";
213 const char* istpstr =
"isotope";
214 const char* matestr =
"material";
215 const char* volustr =
"volume";
216 const char* assestr =
"assembly";
217 const char* twtrstr =
"twistedtrap";
218 const char* cutTstr =
"cutTube";
219 const char* bboxstr =
"box";
220 const char* xtrustr =
"xtru";
221 const char* arb8str =
"arb8";
222 const char* tubestr =
"tube";
223 const char* conestr =
"cone";
224 const char* polystr =
"polycone";
225 const char* hypestr =
"hype";
226 const char* trapstr =
"trap";
227 const char* trdstr =
"trd";
228 const char* sphestr =
"sphere";
229 const char* orbstr =
"orb";
230 const char* parastr =
"para";
231 const char* torustr =
"torus";
232 const char* hedrstr =
"polyhedra";
233 const char* eltustr =
"eltube";
234 const char* subtstr =
"subtraction";
235 const char* uniostr =
"union";
236 const char* parbstr =
"paraboloid";
237 const char* intestr =
"intersection";
238 const char* reflstr =
"reflectedSolid";
239 const char* ellistr =
"ellipsoid";
240 const char* elcnstr =
"elcone";
241 const char* optsstr =
"opticalsurface";
242 const char* skinstr =
"skinsurface";
243 const char* bordstr =
"bordersurface";
244 const char* usrstr =
"userinfo";
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);
278 else if ((strcmp(
name, elemstr) == 0) && !gdml->
HasAttr(node,
"Z")) {
280 hasIsotopesExtended =
kFALSE;
281 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
284 else if ((strcmp(
name, elemstr) == 0) && gdml->
HasAttr(node,
"Z")) {
286 if ((strcmp(gdml->
GetNodeName(childtmp),
"fraction") == 0) ){
288 hasIsotopesExtended =
kTRUE;
289 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")) {
306 atom = strcmp(gdml->
GetNodeName(childtmp),
"atom")==0;
309 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, parbstr)) == 0) {
360 }
else if ((strcmp(
name, subtstr)) == 0) {
361 node =
BooSolid(gdml, node, attr, 1);
362 }
else if ((strcmp(
name, intestr)) == 0) {
363 node =
BooSolid(gdml, node, attr, 2);
364 }
else if ((strcmp(
name, uniostr)) == 0) {
365 node =
BooSolid(gdml, node, attr, 3);
366 }
else if ((strcmp(
name, reflstr)) == 0) {
368 }
else if ((strcmp(
name, assestr)) == 0) {
370 }
else if ((strcmp(
name, usrstr)) == 0) {
373 }
else if (((strcmp(
name,
"gdml")) != 0) && ((strcmp(
name,
"define")) != 0) &&
374 ((strcmp(
name,
"element")) != 0) && ((strcmp(
name,
"materials")) != 0) &&
375 ((strcmp(
name,
"solids")) != 0) && ((strcmp(
name,
"structure")) != 0) &&
376 ((strcmp(
name,
"zplane")) != 0) && ((strcmp(
name,
"first")) != 0) &&
377 ((strcmp(
name,
"second")) != 0) && ((strcmp(
name,
"twoDimVertex")) != 0) &&
378 ((strcmp(
name,
"firstposition")) != 0) && ((strcmp(
name,
"firstpositionref")) != 0) &&
379 ((strcmp(
name,
"firstrotation")) != 0) && ((strcmp(
name,
"firstrotationref")) != 0) &&
380 ((strcmp(
name,
"section")) != 0) && ((strcmp(
name,
"world")) != 0) &&
381 ((strcmp(
name,
"isotope")) != 0)) {
382 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) {
441 if (index >= 0) stripped = stripped(0, index);
442 return stripped.
Data();
461 if (tempattr ==
"name") {
464 if (tempattr ==
"value") {
534 if (tempattr ==
"name") {
537 if (tempattr ==
"value") {
540 if (tempattr ==
"unit") {
565 if (tempattr ==
"name") {
568 if (tempattr ==
"coldim") {
571 if (tempattr ==
"values") {
578 std::stringstream valueStream(values);
579 std::vector<Double_t> valueList;
580 while (!valueStream.eof())
582 std::string matrixValue;
583 valueStream >> matrixValue;
585 valueList.push_back(
Value(matrixValue.c_str()));
590 for (
size_t i=0; i<valueList.size(); ++i)
591 matrix->
Set(i/coldim, i%coldim, valueList[i]);
615 if (tempattr ==
"name") {
618 if (tempattr ==
"model") {
621 if (tempattr ==
"finish") {
624 if (tempattr ==
"type") {
627 if (tempattr ==
"value") {
638 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
642 if (tempattr ==
"name") {
644 }
else if (tempattr ==
"ref") {
648 Error(
"OpticalSurfaceProcess",
"Reference matrix %s for optical surface %s not found", ref.
Data(),
name.Data());
670 if (strcmp(unit,
"mm") == 0) {
672 }
else if (strcmp(unit,
"millimeter") == 0 || strcmp(unit,
"milimeter") == 0) {
674 }
else if (strcmp(unit,
"cm") == 0) {
676 }
else if (strcmp(unit,
"centimeter") == 0) {
678 }
else if (strcmp(unit,
"m") == 0) {
680 }
else if (strcmp(unit,
"meter") == 0) {
682 }
else if (strcmp(unit,
"km") == 0) {
683 retunit =
"100000.0";
684 }
else if (strcmp(unit,
"kilometer") == 0) {
685 retunit =
"100000.0";
686 }
else if (strcmp(unit,
"rad") == 0) {
688 }
else if (strcmp(unit,
"radian") == 0) {
690 }
else if (strcmp(unit,
"deg") == 0) {
692 }
else if (strcmp(unit,
"degree") == 0) {
694 }
else if (strcmp(unit,
"pi") == 0) {
696 }
else if (strcmp(unit,
"avogadro") == 0) {
699 Fatal(
"GetScale",
"Unit <%s> not known", unit);
718 if ((unit ==
"mm") || (unit ==
"millimeter") || (unit ==
"milimeter")) {
720 }
else if ((unit ==
"cm") || (unit ==
"centimeter")) {
722 }
else if ((unit ==
"m") || (unit ==
"meter")) {
724 }
else if ((unit ==
"km") || (unit ==
"kilometer")) {
726 }
else if ((unit ==
"rad") || (unit ==
"radian")) {
728 }
else if ((unit ==
"deg") || (unit ==
"degree")) {
730 }
else if ((unit ==
"ev") || (unit ==
"electronvolt")) {
731 retunit = 0.000000001;
732 }
else if ((unit ==
"kev") || (unit ==
"kiloelectronvolt")) {
734 }
else if ((unit ==
"mev") || (unit ==
"megaelectronvolt")) {
736 }
else if ((unit ==
"gev") || (unit ==
"gigaelectronvolt")) {
738 }
else if (unit ==
"pi") {
740 }
else if (unit ==
"avogadro") {
743 Fatal(
"GetScaleVal",
"Unit <%s> not known", sunit);
755 double val = strtod(svalue, &end);
758 while( *end != 0 && isspace(*end) ) ++end;
762 if (*end == 0)
return val;
768 std::string expanded;
769 expanded.reserve(strlen(svalue) * 2);
773 const std::locale &loc = std::locale::classic();
776 const char *p = svalue;
779 for (; *p != 0; ++p) {
780 if (std::isalpha(*p, loc) || *p ==
'_') {
781 const char *pe = p + 1;
784 for (; *pe != 0; ++pe) {
785 if (!isalnum(*pe, loc) && *pe !=
'_') {
788 for (; p < pe; ++p) expanded += *p;
792 for (; p < pe; ++p) expanded += *p;
800 for (; p < pe; ++p) expanded += *p;
808 TFormula f(
"TFormula", expanded.c_str());
811 for (
auto it:
fconsts)
f.SetParameter(it.first.c_str(), it.second);
816 Fatal(
"Value",
"Got bad value %lf from string '%s'", val, svalue);
843 if (tempattr ==
"name") {
845 }
else if (tempattr ==
"x") {
847 }
else if (tempattr ==
"y") {
849 }
else if (tempattr ==
"z") {
851 }
else if (tempattr ==
"unit") {
896 if (tempattr ==
"name") {
898 }
else if (tempattr ==
"x") {
900 }
else if (tempattr ==
"y") {
902 }
else if (tempattr ==
"z") {
904 }
else if (tempattr ==
"unit") {
953 if (tempattr ==
"name") {
955 }
else if (tempattr ==
"x") {
957 }
else if (tempattr ==
"y") {
959 }
else if (tempattr ==
"z") {
1001 if (tempattr ==
"name") {
1003 }
else if (tempattr ==
"z") {
1005 }
else if (tempattr ==
"n") {
1020 if (tempattr ==
"value") {
1042 else if (
gDebug >= 2 ) {
1043 Info(
"TGDMLParse",
"Re-use existing isotope: %s",iso->
GetName());
1081 if (tempattr ==
"name") {
1093 while (child != 0) {
1096 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1099 ncompo = ncompo + 1;
1104 if (tempattr ==
"n") {
1106 }
else if (tempattr ==
"ref") {
1114 fracmap[ref.
Data()] =
n;
1121 if (ele && ele->
Z() == 0)
1125 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1131 else if (
gDebug >= 2 ) {
1132 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1141 if (hasIsotopesExtended) {
1146 if (tempattr ==
"name") {
1158 while (child != 0) {
1161 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1164 ncompo = ncompo + 1;
1169 if (tempattr ==
"n") {
1171 }
else if (tempattr ==
"ref") {
1179 fracmap[ref.
Data()] =
n;
1186 if (ele && ele->
Z() == 0)
1190 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1196 else if (
gDebug >= 2 ) {
1197 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1211 if (tempattr ==
"name") {
1214 }
else if (tempattr ==
"z") {
1216 }
else if (tempattr ==
"formula") {
1232 if (tempattr ==
"value") {
1247 if (ele && ele->
Z() == 0)
1253 else if (
gDebug >= 2 ) {
1254 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1280 TList properties, constproperties;
1287 Int_t ncompo = 0, mixflag = 2;
1305 while (child != 0) {
1308 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
1314 if (tempattr ==
"name") {
1317 else if(tempattr ==
"ref") {
1320 if (matrix) properties.
Add(property);
1325 Error(
"MatProcess",
"Reference %s for material %s not found", property->GetTitle(),
name.Data());
1327 constproperties.
Add(property);
1334 if ((strcmp(gdml->
GetNodeName(child),
"atom")) == 0) {
1339 if (tempattr ==
"value") {
1346 if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1351 if (tempattr ==
"value") {
1361 tempconst = gdml->
GetAttr(node,
"Z");
1368 if (tmpname ==
"vacuum") {
1377 Info(
"TGDMLParse",
"Re-use existing material: %s",mat->
GetName());
1381 TIter next(&properties);
1382 while ((property = (
TNamed*)next()))
1385 if (constproperties.
GetSize()) {
1387 TIter next(&constproperties);
1388 while ((property = (
TNamed*)next()))
1395 if (mat_ele && mat_ele->
Z() == 0)
1399 mat_ele =
new TGeoElement(mat_name, mat_name, atoi(tempconst),
a);
1401 else if (
gDebug >= 2 ) {
1402 Info(
"TGDMLParse",
"Re-use existing material-element: %s",mat_ele->
GetName());
1408 while (child != 0) {
1411 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
1417 if (tempattr ==
"name") {
1420 else if(tempattr ==
"ref") {
1423 if (matrix) properties.
Add(property);
1428 Error(
"MatProcess",
"Reference %s for material %s not found", property->GetTitle(),
name.Data());
1430 constproperties.
Add(property);
1436 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1439 ncompo = ncompo + 1;
1445 if (tempattr ==
"n") {
1447 }
else if (tempattr ==
"ref") {
1455 fracmap[ref.
Data()] =
n;
1458 else if ((strcmp(gdml->
GetNodeName(child),
"composite")) == 0) {
1462 ncompo = ncompo + 1;
1467 if (tempattr ==
"n") {
1469 }
else if (tempattr ==
"ref") {
1477 fracmap[ref.
Data()] =
n;
1479 else if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1484 if (tempattr ==
"value") {
1508 Info(
"TGDMLParse",
"Re-use existing material-mixture: %s",mix->
GetName());
1511 Error(
"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;
1562 }
else if (mixflag == 0) {
1567 else if (
gDebug >= 2 ) {
1568 Info(
"TGDMLParse",
"Re-use existing medium: %s",med->
GetName());
1587 if (tempattr ==
"name") {
1590 if (tempattr ==
"surfaceproperty") {
1597 while (child != 0) {
1599 if ((strcmp(gdml->
GetNodeName(child),
"volumeref")) == 0) {
1603 if (tempattr ==
"ref") {
1613 Fatal(
"SkinSurfaceProcess",
"Skin surface %s: referenced optical surface %s not defined",
1633 if (tempattr ==
"name") {
1636 if (tempattr ==
"surfaceproperty") {
1644 while (child != 0) {
1646 if ((strcmp(gdml->
GetNodeName(child),
"physvolref")) == 0) {
1650 if (tempattr ==
"ref") {
1659 Fatal(
"BorderSurfaceProcess",
"Border surface %s not referencing two nodes",
name.Data());
1662 Fatal(
"BorderSurfaceProcess",
"Border surface %s: referenced optical surface %s not defined",
1666 if (!node1 || !node2)
1667 Fatal(
"BorderSurfaceProcess",
"Border surface %s: not found nodes %s or %s",
1710 while (child != 0) {
1711 if ((strcmp(gdml->
GetNodeName(child),
"solidref")) == 0) {
1713 reftemp = gdml->
GetAttr(child,
"ref");
1720 solidname = reftemp;
1723 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
1727 if ((strcmp(gdml->
GetNodeName(child),
"materialref")) == 0) {
1728 reftemp = gdml->
GetAttr(child,
"ref");
1735 printf(
"Medium: %s, Not Yet Defined!\n", gdml->
GetAttr(child,
"ref"));
1764 while (child != 0) {
1765 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
1778 while (subchild != 0) {
1782 if (tempattr ==
"volumeref") {
1783 reftemp = gdml->
GetAttr(subchild,
"ref");
1790 else if (tempattr ==
"file") {
1791 const char* filevol;
1795 filevol = gdml->
GetAttr(subchild,
"volname");
1800 if (filedoc1 == 0) {
1833 else if (tempattr ==
"position") {
1836 reftemp = gdml->
GetAttr(subchild,
"name");
1841 }
else if (tempattr ==
"positionref") {
1842 reftemp = gdml->
GetAttr(subchild,
"ref");
1847 else std::cout <<
"ERROR! Physvol's position " << reftemp <<
" not found!" << std::endl;
1848 }
else if (tempattr ==
"rotation") {
1851 reftemp = gdml->
GetAttr(subchild,
"name");
1856 }
else if (tempattr ==
"rotationref") {
1857 reftemp = gdml->
GetAttr(subchild,
"ref");
1862 else 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");
1877 else std::cout <<
"ERROR! Physvol's scale " << reftemp <<
" not found!" << std::endl;
1880 subchild = gdml->
GetNext(subchild);
1894 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
1897 scale3x3[0] = diagonal[0];
1898 scale3x3[4] = diagonal[1];
1899 scale3x3[8] = diagonal[2];
1928 }
else if ((strcmp(gdml->
GetNodeName(child),
"divisionvol")) == 0) {
1944 if (tempattr ==
"axis") {
1946 }
else if (tempattr ==
"number") {
1948 }
else if (tempattr ==
"width") {
1950 }
else if (tempattr ==
"offset") {
1952 }
else if (tempattr ==
"unit") {
1962 while (subchild != 0) {
1966 if (tempattr ==
"volumeref") {
1967 reftemp = gdml->
GetAttr(subchild,
"ref");
1971 divVolref = reftemp;
1974 subchild = gdml->
GetNext(subchild);
2000 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2011 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") {
2063 else if (tempattr ==
"unit"){
2070 else if ((strcmp(gdml->
GetNodeName(subsubchild),
"offset")) == 0) {
2075 if (tempattr ==
"value") {
2078 else if (tempattr ==
"unit"){
2084 else if ((strcmp(gdml->
GetNodeName(subsubchild),
"direction")) == 0) {
2089 if (tempattr ==
"x") {
2092 else if (tempattr ==
"y"){
2095 else if (tempattr ==
"z"){
2098 else if (tempattr ==
"rho"){
2101 else if (tempattr ==
"phi"){
2109 subsubchild = gdml->
GetNext(subsubchild);
2114 subchild = gdml->
GetNext(subchild);
2122 Double_t widthline = wvalue*retwunit;
2123 Double_t offsetline = ovalue*retounit;
2143 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2152 else if (strcmp(gdml->
GetNodeName(child),
"auxiliary") == 0) {
2153 TString auxType, auxUnit, auxValue;
2156 auxmap =
new TMap();
2217 while (child != 0) {
2221 if (tempattr ==
"first") {
2222 reftemp = gdml->
GetAttr(child,
"ref");
2229 }
else if (tempattr ==
"second") {
2230 reftemp = gdml->
GetAttr(child,
"ref");
2237 }
else if (tempattr ==
"position") {
2240 reftemp = gdml->
GetAttr(child,
"name");
2245 }
else if (tempattr ==
"positionref") {
2246 reftemp = gdml->
GetAttr(child,
"ref");
2253 }
else if (tempattr ==
"rotation") {
2256 reftemp = gdml->
GetAttr(child,
"name");
2261 }
else if (tempattr ==
"rotationref") {
2262 reftemp = gdml->
GetAttr(child,
"ref");
2269 }
else if (tempattr ==
"firstposition") {
2272 reftemp = gdml->
GetAttr(child,
"name");
2277 }
else if (tempattr ==
"firstpositionref") {
2278 reftemp = gdml->
GetAttr(child,
"ref");
2285 }
else if (tempattr ==
"firstrotation") {
2288 reftemp = gdml->
GetAttr(child,
"name");
2293 }
else if (tempattr ==
"firstrotationref") {
2294 reftemp = gdml->
GetAttr(child,
"ref");
2310 Fatal(
"BooSolid",
"Incomplete solid %s, missing shape components",
name.Data());
2338 TString nodename, auxtype, auxtypec, auxvalue, auxvaluec, auxunit, auxunitc;
2344 if (nodename ==
"auxiliary") {
2345 auxtype = gdml->
GetAttr(child,
"auxtype");
2346 auxvalue = gdml->
GetAttr(child,
"auxvalue");
2347 if (auxtype ==
"Region") {
2354 auxtypec = gdml->
GetAttr(subchild,
"auxtype");
2355 auxvaluec = gdml->
GetAttr(subchild,
"auxvalue");
2356 auxunitc = gdml->
GetAttr(subchild,
"auxunit");
2357 if (auxtypec ==
"volume") {
2359 if (region) region->
AddVolume(auxvaluec);
2363 if (region) region->
AddCut(auxtypec, value);
2365 subchild = gdml->
GetNext(subchild);
2411 while (child != 0) {
2412 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
2421 while (subchild != 0) {
2425 if (tempattr ==
"volumeref") {
2426 reftemp = gdml->
GetAttr(subchild,
"ref");
2431 }
else if (tempattr ==
"positionref") {
2432 reftemp = gdml->
GetAttr(subchild,
"ref");
2439 }
else if (tempattr ==
"position") {
2442 reftemp = gdml->
GetAttr(subchild,
"name");
2447 }
else if (tempattr ==
"rotationref") {
2448 reftemp = gdml->
GetAttr(subchild,
"ref");
2455 }
else if (tempattr ==
"rotation") {
2458 reftemp = gdml->
GetAttr(subchild,
"name");
2465 subchild = gdml->
GetNext(subchild);
2496 while (child != 0) {
2498 if ((strcmp(gdml->
GetNodeName(child),
"world") == 0)) {
2501 reftemp = gdml->
GetAttr(child,
"ref");
2538 if (tempattr ==
"name") {
2540 }
else if (tempattr ==
"x") {
2542 }
else if (tempattr ==
"y") {
2544 }
else if (tempattr ==
"z") {
2546 }
else if (tempattr ==
"lunit") {
2598 if (tempattr ==
"name") {
2600 }
else if (tempattr ==
"ax") {
2602 }
else if (tempattr ==
"by") {
2604 }
else if (tempattr ==
"cz") {
2606 }
else if (tempattr ==
"zcut1") {
2608 }
else if (tempattr ==
"zcut2") {
2610 }
else if (tempattr ==
"lunit") {
2634 z1 =
Value(zcut1)*retunit;
2639 z2 =
Value(zcut2)*retunit;
2647 origin[2] = 0.5 * (z1 + z2);
2682 if (tempattr ==
"name") {
2684 }
else if (tempattr ==
"dx") {
2686 }
else if (tempattr ==
"dy") {
2688 }
else if (tempattr ==
"zmax") {
2690 }
else if (tempattr ==
"zcut") {
2692 }
else if (tempattr ==
"lunit") {
2714 Info(
"ElCone",
"ERROR! Parameter zcut = %.12g is not set properly, elcone will not be imported.", z1);
2758 if (tempattr ==
"name") {
2760 }
else if (tempattr ==
"rlo") {
2762 }
else if (tempattr ==
"rhi") {
2764 }
else if (tempattr ==
"dz") {
2766 }
else if (tempattr ==
"lunit") {
2826 if (tempattr ==
"name") {
2828 }
else if (tempattr ==
"v1x") {
2830 }
else if (tempattr ==
"v1y") {
2832 }
else if (tempattr ==
"v2x") {
2834 }
else if (tempattr ==
"v2y") {
2836 }
else if (tempattr ==
"v3x") {
2838 }
else if (tempattr ==
"v3y") {
2840 }
else if (tempattr ==
"v4x") {
2842 }
else if (tempattr ==
"v4y") {
2844 }
else if (tempattr ==
"v5x") {
2846 }
else if (tempattr ==
"v5y") {
2848 }
else if (tempattr ==
"v6x") {
2850 }
else if (tempattr ==
"v6y") {
2852 }
else if (tempattr ==
"v7x") {
2854 }
else if (tempattr ==
"v7y") {
2856 }
else if (tempattr ==
"v8x") {
2858 }
else if (tempattr ==
"v8y") {
2860 }
else if (tempattr ==
"dz") {
2862 }
else if (tempattr ==
"lunit") {
2935 if (tempattr ==
"name") {
2937 }
else if (tempattr ==
"rmin") {
2939 }
else if (tempattr ==
"rmax") {
2941 }
else if (tempattr ==
"z") {
2943 }
else if (tempattr ==
"lunit") {
2945 }
else if (tempattr ==
"aunit") {
2947 }
else if (tempattr ==
"startphi") {
2949 }
else if (tempattr ==
"deltaphi") {
2968 Double_t endphideg = startphideg + deltaphideg;
2971 if (deltaphideg < 360.)
3017 if (tempattr ==
"name") {
3019 }
else if (tempattr ==
"rmin") {
3021 }
else if (tempattr ==
"rmax") {
3023 }
else if (tempattr ==
"z") {
3025 }
else if (tempattr ==
"lunit") {
3027 }
else if (tempattr ==
"aunit") {
3029 }
else if (tempattr ==
"startphi") {
3031 }
else if (tempattr ==
"deltaphi") {
3033 }
else if (tempattr ==
"lowx") {
3035 }
else if (tempattr ==
"lowy") {
3037 }
else if (tempattr ==
"lowz") {
3039 }
else if (tempattr ==
"highx") {
3041 }
else if (tempattr ==
"highy") {
3043 }
else if (tempattr ==
"highz") {
3061 Double_t deltaphiline =
Value(deltaphi)*retaunit + startphiline;
3115 if (tempattr ==
"name") {
3117 }
else if (tempattr ==
"rmin1") {
3119 }
else if (tempattr ==
"rmax1") {
3121 }
else if (tempattr ==
"rmin2") {
3123 }
else if (tempattr ==
"rmax2") {
3125 }
else if (tempattr ==
"z") {
3127 }
else if (tempattr ==
"lunit") {
3129 }
else if (tempattr ==
"aunit") {
3131 }
else if (tempattr ==
"startphi") {
3133 }
else if (tempattr ==
"deltaphi") {
3207 if (tempattr ==
"name") {
3209 }
else if (tempattr ==
"x1") {
3211 }
else if (tempattr ==
"x2") {
3213 }
else if (tempattr ==
"x3") {
3215 }
else if (tempattr ==
"x4") {
3217 }
else if (tempattr ==
"y1") {
3219 }
else if (tempattr ==
"y2") {
3221 }
else if (tempattr ==
"z") {
3223 }
else if (tempattr ==
"lunit") {
3225 }
else if (tempattr ==
"aunit") {
3227 }
else if (tempattr ==
"phi") {
3229 }
else if (tempattr ==
"theta") {
3231 }
else if (tempattr ==
"alpha1") {
3233 }
else if (tempattr ==
"alpha2") {
3300 if (tempattr ==
"name") {
3302 }
else if (tempattr ==
"x1") {
3304 }
else if (tempattr ==
"x2") {
3306 }
else if (tempattr ==
"y1") {
3308 }
else if (tempattr ==
"y2") {
3310 }
else if (tempattr ==
"z") {
3312 }
else if (tempattr ==
"lunit") {
3369 if (tempattr ==
"name") {
3371 }
else if (tempattr ==
"lunit") {
3373 }
else if (tempattr ==
"aunit") {
3375 }
else if (tempattr ==
"startphi") {
3377 }
else if (tempattr ==
"deltaphi") {
3395 while (child != 0) {
3396 numplanes = numplanes + 1;
3403 double ** table =
new double*[numplanes];
3404 for (i = 0; i < numplanes; i++) {
3405 table[i] =
new double[cols];
3411 while (child != 0) {
3412 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3424 if (tempattr ==
"rmin") {
3426 rminline =
Value(rmin)*retlunit;
3427 table[planeno][0] = rminline;
3428 }
else if (tempattr ==
"rmax") {
3430 rmaxline =
Value(rmax)*retlunit;
3431 table[planeno][1] = rmaxline;
3432 }
else if (tempattr ==
"z") {
3434 zline =
Value(z)*retlunit;
3435 table[planeno][2] = zline;
3440 planeno = planeno + 1;
3453 for (
int j = 0; j < numplanes; j++) {
3454 poly->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3459 for (i = 0; i < numplanes; i++) {
3493 if (tempattr ==
"name") {
3495 }
else if (tempattr ==
"lunit") {
3497 }
else if (tempattr ==
"aunit") {
3499 }
else if (tempattr ==
"startphi") {
3501 }
else if (tempattr ==
"deltaphi") {
3503 }
else if (tempattr ==
"numsides") {
3522 while (child != 0) {
3523 numplanes = numplanes + 1;
3530 double ** table =
new double*[numplanes];
3531 for (i = 0; i < numplanes; i++) {
3532 table[i] =
new double[cols];
3538 while (child != 0) {
3539 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3550 if (tempattr ==
"rmin") {
3552 rminline =
Value(rmin)*retlunit;
3553 table[planeno][0] = rminline;
3554 }
else if (tempattr ==
"rmax") {
3556 rmaxline =
Value(rmax)*retlunit;
3557 table[planeno][1] = rmaxline;
3558 }
else if (tempattr ==
"z") {
3560 zline =
Value(z)*retlunit;
3561 table[planeno][2] = zline;
3567 planeno = planeno + 1;
3582 for (
int j = 0; j < numplanes; j++) {
3583 polyg->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3588 for (i = 0; i < numplanes; i++) {
3621 if (tempattr ==
"name") {
3623 }
else if (tempattr ==
"rmin") {
3625 }
else if (tempattr ==
"rmax") {
3627 }
else if (tempattr ==
"lunit") {
3629 }
else if (tempattr ==
"aunit") {
3631 }
else if (tempattr ==
"startphi") {
3633 }
else if (tempattr ==
"deltaphi") {
3635 }
else if (tempattr ==
"starttheta") {
3637 }
else if (tempattr ==
"deltatheta") {
3654 Double_t deltaphiline = startphiline+
Value(deltaphi)*retaunit;
3656 Double_t deltathetaline = startthetaline +
Value(deltatheta)*retaunit;
3696 if (tempattr ==
"name") {
3698 }
else if (tempattr ==
"rmin") {
3700 }
else if (tempattr ==
"rmax") {
3702 }
else if (tempattr ==
"rtor") {
3704 }
else if (tempattr ==
"lunit") {
3706 }
else if (tempattr ==
"aunit") {
3708 }
else if (tempattr ==
"startphi") {
3710 }
else if (tempattr ==
"deltaphi") {
3766 if (tempattr ==
"name") {
3768 }
else if (tempattr ==
"rmin") {
3770 }
else if (tempattr ==
"rmax") {
3772 }
else if (tempattr ==
"z") {
3774 }
else if (tempattr ==
"lunit") {
3776 }
else if (tempattr ==
"aunit") {
3778 }
else if (tempattr ==
"inst") {
3780 }
else if (tempattr ==
"outst") {
3839 if (tempattr ==
"name") {
3841 }
else if (tempattr ==
"x") {
3843 }
else if (tempattr ==
"y") {
3845 }
else if (tempattr ==
"z") {
3847 }
else if (tempattr ==
"lunit") {
3849 }
else if (tempattr ==
"aunit") {
3851 }
else if (tempattr ==
"phi") {
3853 }
else if (tempattr ==
"theta") {
3855 }
else if (tempattr ==
"alpha") {
3922 if (tempattr ==
"name") {
3924 }
else if (tempattr ==
"x1") {
3926 }
else if (tempattr ==
"x2") {
3928 }
else if (tempattr ==
"x3") {
3930 }
else if (tempattr ==
"x4") {
3932 }
else if (tempattr ==
"y1") {
3934 }
else if (tempattr ==
"y2") {
3936 }
else if (tempattr ==
"z") {
3938 }
else if (tempattr ==
"lunit") {
3940 }
else if (tempattr ==
"aunit") {
3942 }
else if (tempattr ==
"phi") {
3944 }
else if (tempattr ==
"theta") {
3946 }
else if (tempattr ==
"alph") {
3951 }
else if (tempattr ==
"phitwist") {
4020 if (tempattr ==
"name") {
4022 }
else if (tempattr ==
"dx") {
4024 }
else if (tempattr ==
"dy") {
4026 }
else if (tempattr ==
"dz") {
4028 }
else if (tempattr ==
"lunit") {
4073 if (tempattr ==
"name") {
4075 }
else if (tempattr ==
"r") {
4077 }
else if (tempattr ==
"lunit") {
4130 if (tempattr ==
"name") {
4132 }
else if (tempattr ==
"lunit") {
4151 while (child != 0) {
4154 if (tempattr ==
"twoDimVertex") {
4155 noverts = noverts + 1;
4156 }
else if (tempattr ==
"section") {
4157 nosects = nosects + 1;
4166 double *vertx =
new double[noverts];
4167 double *verty =
new double[noverts];
4169 double ** section =
new double*[nosects];
4170 for (i = 0; i < nosects; i++) {
4171 section[i] =
new double[cols];
4178 while (child != 0) {
4179 if (strcmp(gdml->
GetNodeName(child),
"twoDimVertex") == 0) {
4188 if (tempattr ==
"x") {
4190 xline =
Value(
x)*retlunit;
4191 vertx[vert] = xline;
4192 }
else if (tempattr ==
"y") {
4194 yline =
Value(
y)*retlunit;
4195 verty[vert] = yline;
4204 else if (strcmp(gdml->
GetNodeName(child),
"section") == 0) {
4215 if (tempattr ==
"zOrder") {
4217 section[sect][0] =
Value(zorder);
4218 }
else if (tempattr ==
"zPosition") {
4220 zposline =
Value(zpos)*retlunit;
4221 section[sect][1] = zposline;
4222 }
else if (tempattr ==
"xOffset") {
4224 xoffline =
Value(xoff)*retlunit;
4225 section[sect][2] = xoffline;
4226 }
else if (tempattr ==
"yOffset") {
4228 yoffline =
Value(yoff)*retlunit;
4229 section[sect][3] = yoffline;
4230 }
else if (tempattr ==
"scalingFactor") {
4232 section[sect][4] =
Value(scale);
4247 for (
int j = 0; j < sect; j++) {
4248 xtru->
DefineSection((
int)section[j][0], section[j][1], section[j][2], section[j][3], section[j][4]);
4254 for (i = 0; i < nosects; i++) {
4255 delete [] section[i];
4273 std::cout <<
"WARNING! The reflectedSolid is obsolete! Use scale transformation instead!" << std::endl;
4293 if (tempattr ==
"name") {
4295 }
else if (tempattr ==
"sx") {
4297 }
else if (tempattr ==
"sy") {
4299 }
else if (tempattr ==
"sz") {
4301 }
else if (tempattr ==
"rx") {
4303 }
else if (tempattr ==
"ry") {
4305 }
else if (tempattr ==
"rz") {
4307 }
else if (tempattr ==
"dx") {
4309 }
else if (tempattr ==
"dy") {
4311 }
else if (tempattr ==
"dz") {
4313 }
else if (tempattr ==
"solid") {
4331 if (atoi(sx) == -1) {
4334 if (atoi(sy) == -1) {
4337 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,...
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.
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 void Add(TObject *obj)
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
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 * GetTitle() const
Returns title of object.
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 rad
static constexpr double GeV
static constexpr double deg
static constexpr double us
static constexpr double s
static constexpr double pi
static constexpr double mm
static constexpr double km
static constexpr double keV
static constexpr double ns
static constexpr double second
static constexpr double cm
static constexpr double ms
static constexpr double twopi
static constexpr double kg
static constexpr double mg
static constexpr double eV
static constexpr double MeV
constexpr Double_t Na()
Avogadro constant (Avogadro's Number) in .
constexpr Double_t RadToDeg()
Conversion from radian to degree: