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 if ( matrixValue.empty() )
continue;
586 valueList.push_back(
Value(matrixValue.c_str()));
591 for (
size_t i=0; i<valueList.size(); ++i)
592 matrix->
Set(i/coldim, i%coldim, valueList[i]);
616 if (tempattr ==
"name") {
619 if (tempattr ==
"model") {
622 if (tempattr ==
"finish") {
625 if (tempattr ==
"type") {
628 if (tempattr ==
"value") {
639 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
643 if (tempattr ==
"name") {
645 }
else if (tempattr ==
"ref") {
649 Error(
"OpticalSurfaceProcess",
"Reference matrix %s for optical surface %s not found", ref.
Data(),
name.Data());
671 if (strcmp(unit,
"mm") == 0) {
673 }
else if (strcmp(unit,
"millimeter") == 0 || strcmp(unit,
"milimeter") == 0) {
675 }
else if (strcmp(unit,
"cm") == 0) {
677 }
else if (strcmp(unit,
"centimeter") == 0) {
679 }
else if (strcmp(unit,
"m") == 0) {
681 }
else if (strcmp(unit,
"meter") == 0) {
683 }
else if (strcmp(unit,
"km") == 0) {
684 retunit =
"100000.0";
685 }
else if (strcmp(unit,
"kilometer") == 0) {
686 retunit =
"100000.0";
687 }
else if (strcmp(unit,
"rad") == 0) {
689 }
else if (strcmp(unit,
"radian") == 0) {
691 }
else if (strcmp(unit,
"deg") == 0) {
693 }
else if (strcmp(unit,
"degree") == 0) {
695 }
else if (strcmp(unit,
"pi") == 0) {
697 }
else if (strcmp(unit,
"avogadro") == 0) {
700 Fatal(
"GetScale",
"Unit <%s> not known", unit);
719 if ((unit ==
"mm") || (unit ==
"millimeter") || (unit ==
"milimeter")) {
721 }
else if ((unit ==
"cm") || (unit ==
"centimeter")) {
723 }
else if ((unit ==
"m") || (unit ==
"meter")) {
725 }
else if ((unit ==
"km") || (unit ==
"kilometer")) {
727 }
else if ((unit ==
"rad") || (unit ==
"radian")) {
729 }
else if ((unit ==
"deg") || (unit ==
"degree")) {
731 }
else if ((unit ==
"ev") || (unit ==
"electronvolt")) {
732 retunit = 0.000000001;
733 }
else if ((unit ==
"kev") || (unit ==
"kiloelectronvolt")) {
735 }
else if ((unit ==
"mev") || (unit ==
"megaelectronvolt")) {
737 }
else if ((unit ==
"gev") || (unit ==
"gigaelectronvolt")) {
739 }
else if (unit ==
"pi") {
741 }
else if (unit ==
"avogadro") {
744 Fatal(
"GetScaleVal",
"Unit <%s> not known", sunit);
756 double val = strtod(svalue, &end);
759 while( *end != 0 && isspace(*end) ) ++end;
763 if (*end == 0)
return val;
769 std::string expanded;
770 expanded.reserve(strlen(svalue) * 2);
774 const std::locale &loc = std::locale::classic();
777 const char *p = svalue;
780 for (; *p != 0; ++p) {
781 if (std::isalpha(*p, loc) || *p ==
'_') {
782 const char *pe = p + 1;
785 for (; *pe != 0; ++pe) {
786 if (!isalnum(*pe, loc) && *pe !=
'_') {
789 for (; p < pe; ++p) expanded += *p;
793 for (; p < pe; ++p) expanded += *p;
801 for (; p < pe; ++p) expanded += *p;
809 TFormula f(
"TFormula", expanded.c_str());
812 for (
auto it:
fconsts)
f.SetParameter(it.first.c_str(), it.second);
817 Fatal(
"Value",
"Got bad value %lf from string '%s'", val, svalue);
844 if (tempattr ==
"name") {
846 }
else if (tempattr ==
"x") {
848 }
else if (tempattr ==
"y") {
850 }
else if (tempattr ==
"z") {
852 }
else if (tempattr ==
"unit") {
897 if (tempattr ==
"name") {
899 }
else if (tempattr ==
"x") {
901 }
else if (tempattr ==
"y") {
903 }
else if (tempattr ==
"z") {
905 }
else if (tempattr ==
"unit") {
954 if (tempattr ==
"name") {
956 }
else if (tempattr ==
"x") {
958 }
else if (tempattr ==
"y") {
960 }
else if (tempattr ==
"z") {
1002 if (tempattr ==
"name") {
1004 }
else if (tempattr ==
"z") {
1006 }
else if (tempattr ==
"n") {
1021 if (tempattr ==
"value") {
1043 else if (
gDebug >= 2 ) {
1044 Info(
"TGDMLParse",
"Re-use existing isotope: %s",iso->
GetName());
1082 if (tempattr ==
"name") {
1094 while (child != 0) {
1097 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1100 ncompo = ncompo + 1;
1105 if (tempattr ==
"n") {
1107 }
else if (tempattr ==
"ref") {
1115 fracmap[ref.
Data()] =
n;
1122 if (ele && ele->
Z() == 0)
1126 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1132 else if (
gDebug >= 2 ) {
1133 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1142 if (hasIsotopesExtended) {
1147 if (tempattr ==
"name") {
1159 while (child != 0) {
1162 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1165 ncompo = ncompo + 1;
1170 if (tempattr ==
"n") {
1172 }
else if (tempattr ==
"ref") {
1180 fracmap[ref.
Data()] =
n;
1187 if (ele && ele->
Z() == 0)
1191 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1197 else if (
gDebug >= 2 ) {
1198 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1212 if (tempattr ==
"name") {
1215 }
else if (tempattr ==
"z") {
1217 }
else if (tempattr ==
"formula") {
1233 if (tempattr ==
"value") {
1248 if (ele && ele->
Z() == 0)
1254 else if (
gDebug >= 2 ) {
1255 Info(
"TGDMLParse",
"Re-use existing element: %s",ele->
GetName());
1281 TList properties, constproperties;
1288 Int_t ncompo = 0, mixflag = 2;
1306 while (child != 0) {
1309 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
1315 if (tempattr ==
"name") {
1318 else if(tempattr ==
"ref") {
1321 if (matrix) properties.
Add(property);
1326 Error(
"MatProcess",
"Reference %s for material %s not found", property->GetTitle(),
name.Data());
1328 constproperties.
Add(property);
1335 if ((strcmp(gdml->
GetNodeName(child),
"atom")) == 0) {
1340 if (tempattr ==
"value") {
1347 if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1352 if (tempattr ==
"value") {
1362 tempconst = gdml->
GetAttr(node,
"Z");
1369 if (tmpname ==
"vacuum") {
1378 Info(
"TGDMLParse",
"Re-use existing material: %s",mat->
GetName());
1382 TIter next(&properties);
1383 while ((property = (
TNamed*)next()))
1386 if (constproperties.
GetSize()) {
1388 TIter next(&constproperties);
1389 while ((property = (
TNamed*)next()))
1396 if (mat_ele && mat_ele->
Z() == 0)
1400 mat_ele =
new TGeoElement(mat_name, mat_name, atoi(tempconst),
a);
1402 else if (
gDebug >= 2 ) {
1403 Info(
"TGDMLParse",
"Re-use existing material-element: %s",mat_ele->
GetName());
1409 while (child != 0) {
1412 if ((strcmp(gdml->
GetNodeName(child),
"property")) == 0) {
1418 if (tempattr ==
"name") {
1421 else if(tempattr ==
"ref") {
1424 if (matrix) properties.
Add(property);
1429 Error(
"MatProcess",
"Reference %s for material %s not found", property->GetTitle(),
name.Data());
1431 constproperties.
Add(property);
1437 if ((strcmp(gdml->
GetNodeName(child),
"fraction")) == 0) {
1440 ncompo = ncompo + 1;
1446 if (tempattr ==
"n") {
1448 }
else if (tempattr ==
"ref") {
1456 fracmap[ref.
Data()] =
n;
1459 else if ((strcmp(gdml->
GetNodeName(child),
"composite")) == 0) {
1463 ncompo = ncompo + 1;
1468 if (tempattr ==
"n") {
1470 }
else if (tempattr ==
"ref") {
1478 fracmap[ref.
Data()] =
n;
1480 else if ((strcmp(gdml->
GetNodeName(child),
"D")) == 0) {
1485 if (tempattr ==
"value") {
1509 Info(
"TGDMLParse",
"Re-use existing material-mixture: %s",mix->
GetName());
1512 Error(
"TGDMLParse",
"WARNING! Inconsistent material definitions between GDML and TGeoManager");
1516 TIter next(&properties);
1517 while ((property = (
TNamed*)next()))
1520 if (constproperties.
GetSize()) {
1522 TIter next(&constproperties);
1523 while ((property = (
TNamed*)next()))
1529 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1537 natoms = (
Int_t)
f->second;
1563 }
else if (mixflag == 0) {
1568 else if (
gDebug >= 2 ) {
1569 Info(
"TGDMLParse",
"Re-use existing medium: %s",med->
GetName());
1588 if (tempattr ==
"name") {
1591 if (tempattr ==
"surfaceproperty") {
1598 while (child != 0) {
1600 if ((strcmp(gdml->
GetNodeName(child),
"volumeref")) == 0) {
1604 if (tempattr ==
"ref") {
1614 Fatal(
"SkinSurfaceProcess",
"Skin surface %s: referenced optical surface %s not defined",
1634 if (tempattr ==
"name") {
1637 if (tempattr ==
"surfaceproperty") {
1645 while (child != 0) {
1647 if ((strcmp(gdml->
GetNodeName(child),
"physvolref")) == 0) {
1651 if (tempattr ==
"ref") {
1660 Fatal(
"BorderSurfaceProcess",
"Border surface %s not referencing two nodes",
name.Data());
1663 Fatal(
"BorderSurfaceProcess",
"Border surface %s: referenced optical surface %s not defined",
1667 if (!node1 || !node2)
1668 Fatal(
"BorderSurfaceProcess",
"Border surface %s: not found nodes %s [%s] or %s [%s]",
1670 nodename[0].
Data(), node1 ?
"present" :
"missing",
1671 nodename[1].
Data(), node2 ?
"present" :
"missing");
1713 while (child != 0) {
1714 if ((strcmp(gdml->
GetNodeName(child),
"solidref")) == 0) {
1716 reftemp = gdml->
GetAttr(child,
"ref");
1723 solidname = reftemp;
1726 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
1730 if ((strcmp(gdml->
GetNodeName(child),
"materialref")) == 0) {
1731 reftemp = gdml->
GetAttr(child,
"ref");
1738 printf(
"Medium: %s, Not Yet Defined!\n", gdml->
GetAttr(child,
"ref"));
1767 while (child != 0) {
1768 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
1781 while (subchild != 0) {
1785 if (tempattr ==
"volumeref") {
1786 reftemp = gdml->
GetAttr(subchild,
"ref");
1793 else if (tempattr ==
"file") {
1794 const char* filevol;
1798 filevol = gdml->
GetAttr(subchild,
"volname");
1803 if (filedoc1 == 0) {
1836 else if (tempattr ==
"position") {
1839 reftemp = gdml->
GetAttr(subchild,
"name");
1844 }
else if (tempattr ==
"positionref") {
1845 reftemp = gdml->
GetAttr(subchild,
"ref");
1850 else std::cout <<
"ERROR! Physvol's position " << reftemp <<
" not found!" << std::endl;
1851 }
else if (tempattr ==
"rotation") {
1854 reftemp = gdml->
GetAttr(subchild,
"name");
1859 }
else if (tempattr ==
"rotationref") {
1860 reftemp = gdml->
GetAttr(subchild,
"ref");
1865 else std::cout <<
"ERROR! Physvol's rotation " << reftemp <<
" not found!" << std::endl;
1866 }
else if (tempattr ==
"scale") {
1869 reftemp = gdml->
GetAttr(subchild,
"name");
1874 }
else if (tempattr ==
"scaleref") {
1875 reftemp = gdml->
GetAttr(subchild,
"ref");
1880 else std::cout <<
"ERROR! Physvol's scale " << reftemp <<
" not found!" << std::endl;
1883 subchild = gdml->
GetNext(subchild);
1897 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
1900 scale3x3[0] = diagonal[0];
1901 scale3x3[4] = diagonal[1];
1902 scale3x3[8] = diagonal[2];
1931 }
else if ((strcmp(gdml->
GetNodeName(child),
"divisionvol")) == 0) {
1947 if (tempattr ==
"axis") {
1949 }
else if (tempattr ==
"number") {
1951 }
else if (tempattr ==
"width") {
1953 }
else if (tempattr ==
"offset") {
1955 }
else if (tempattr ==
"unit") {
1965 while (subchild != 0) {
1969 if (tempattr ==
"volumeref") {
1970 reftemp = gdml->
GetAttr(subchild,
"ref");
1974 divVolref = reftemp;
1977 subchild = gdml->
GetNext(subchild);
2003 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2014 else if ((strcmp(gdml->
GetNodeName(child),
"replicavol")) == 0) {
2034 if (tempattr ==
"number") {
2042 while (subchild != 0) {
2046 if (tempattr ==
"volumeref") {
2047 reftemp = gdml->
GetAttr(subchild,
"ref");
2051 divVolref = reftemp;
2054 if (tempattr ==
"replicate_along_axis") {
2055 subsubchild = gdml->
GetChild(subchild);
2057 while (subsubchild != 0) {
2058 if ((strcmp(gdml->
GetNodeName(subsubchild),
"width")) == 0) {
2063 if (tempattr ==
"value") {
2066 else if (tempattr ==
"unit"){
2073 else if ((strcmp(gdml->
GetNodeName(subsubchild),
"offset")) == 0) {
2078 if (tempattr ==
"value") {
2081 else if (tempattr ==
"unit"){
2087 else if ((strcmp(gdml->
GetNodeName(subsubchild),
"direction")) == 0) {
2092 if (tempattr ==
"x") {
2095 else if (tempattr ==
"y"){
2098 else if (tempattr ==
"z"){
2101 else if (tempattr ==
"rho"){
2104 else if (tempattr ==
"phi"){
2112 subsubchild = gdml->
GetNext(subsubchild);
2117 subchild = gdml->
GetNext(subchild);
2125 Double_t widthline = wvalue*retwunit;
2126 Double_t offsetline = ovalue*retounit;
2146 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2155 else if (strcmp(gdml->
GetNodeName(child),
"auxiliary") == 0) {
2156 TString auxType, auxUnit, auxValue;
2159 auxmap =
new TMap();
2220 while (child != 0) {
2224 if (tempattr ==
"first") {
2225 reftemp = gdml->
GetAttr(child,
"ref");
2232 }
else if (tempattr ==
"second") {
2233 reftemp = gdml->
GetAttr(child,
"ref");
2240 }
else if (tempattr ==
"position") {
2243 reftemp = gdml->
GetAttr(child,
"name");
2248 }
else if (tempattr ==
"positionref") {
2249 reftemp = gdml->
GetAttr(child,
"ref");
2256 }
else if (tempattr ==
"rotation") {
2259 reftemp = gdml->
GetAttr(child,
"name");
2264 }
else if (tempattr ==
"rotationref") {
2265 reftemp = gdml->
GetAttr(child,
"ref");
2272 }
else if (tempattr ==
"firstposition") {
2275 reftemp = gdml->
GetAttr(child,
"name");
2280 }
else if (tempattr ==
"firstpositionref") {
2281 reftemp = gdml->
GetAttr(child,
"ref");
2288 }
else if (tempattr ==
"firstrotation") {
2291 reftemp = gdml->
GetAttr(child,
"name");
2296 }
else if (tempattr ==
"firstrotationref") {
2297 reftemp = gdml->
GetAttr(child,
"ref");
2313 Fatal(
"BooSolid",
"Incomplete solid %s, missing shape components",
name.Data());
2341 TString nodename, auxtype, auxtypec, auxvalue, auxvaluec, auxunit, auxunitc;
2347 if (nodename ==
"auxiliary") {
2348 auxtype = gdml->
GetAttr(child,
"auxtype");
2349 auxvalue = gdml->
GetAttr(child,
"auxvalue");
2350 if (auxtype ==
"Region") {
2357 auxtypec = gdml->
GetAttr(subchild,
"auxtype");
2358 auxvaluec = gdml->
GetAttr(subchild,
"auxvalue");
2359 auxunitc = gdml->
GetAttr(subchild,
"auxunit");
2360 if (auxtypec ==
"volume") {
2362 if (region) region->
AddVolume(auxvaluec);
2366 if (region) region->
AddCut(auxtypec, value);
2368 subchild = gdml->
GetNext(subchild);
2414 while (child != 0) {
2415 if ((strcmp(gdml->
GetNodeName(child),
"physvol")) == 0) {
2424 while (subchild != 0) {
2428 if (tempattr ==
"volumeref") {
2429 reftemp = gdml->
GetAttr(subchild,
"ref");
2434 }
else if (tempattr ==
"positionref") {
2435 reftemp = gdml->
GetAttr(subchild,
"ref");
2442 }
else if (tempattr ==
"position") {
2445 reftemp = gdml->
GetAttr(subchild,
"name");
2450 }
else if (tempattr ==
"rotationref") {
2451 reftemp = gdml->
GetAttr(subchild,
"ref");
2458 }
else if (tempattr ==
"rotation") {
2461 reftemp = gdml->
GetAttr(subchild,
"name");
2468 subchild = gdml->
GetNext(subchild);
2499 while (child != 0) {
2501 if ((strcmp(gdml->
GetNodeName(child),
"world") == 0)) {
2504 reftemp = gdml->
GetAttr(child,
"ref");
2541 if (tempattr ==
"name") {
2543 }
else if (tempattr ==
"x") {
2545 }
else if (tempattr ==
"y") {
2547 }
else if (tempattr ==
"z") {
2549 }
else if (tempattr ==
"lunit") {
2601 if (tempattr ==
"name") {
2603 }
else if (tempattr ==
"ax") {
2605 }
else if (tempattr ==
"by") {
2607 }
else if (tempattr ==
"cz") {
2609 }
else if (tempattr ==
"zcut1") {
2611 }
else if (tempattr ==
"zcut2") {
2613 }
else if (tempattr ==
"lunit") {
2637 z1 =
Value(zcut1)*retunit;
2642 z2 =
Value(zcut2)*retunit;
2650 origin[2] = 0.5 * (z1 + z2);
2685 if (tempattr ==
"name") {
2687 }
else if (tempattr ==
"dx") {
2689 }
else if (tempattr ==
"dy") {
2691 }
else if (tempattr ==
"zmax") {
2693 }
else if (tempattr ==
"zcut") {
2695 }
else if (tempattr ==
"lunit") {
2717 Info(
"ElCone",
"ERROR! Parameter zcut = %.12g is not set properly, elcone will not be imported.", z1);
2761 if (tempattr ==
"name") {
2763 }
else if (tempattr ==
"rlo") {
2765 }
else if (tempattr ==
"rhi") {
2767 }
else if (tempattr ==
"dz") {
2769 }
else if (tempattr ==
"lunit") {
2829 if (tempattr ==
"name") {
2831 }
else if (tempattr ==
"v1x") {
2833 }
else if (tempattr ==
"v1y") {
2835 }
else if (tempattr ==
"v2x") {
2837 }
else if (tempattr ==
"v2y") {
2839 }
else if (tempattr ==
"v3x") {
2841 }
else if (tempattr ==
"v3y") {
2843 }
else if (tempattr ==
"v4x") {
2845 }
else if (tempattr ==
"v4y") {
2847 }
else if (tempattr ==
"v5x") {
2849 }
else if (tempattr ==
"v5y") {
2851 }
else if (tempattr ==
"v6x") {
2853 }
else if (tempattr ==
"v6y") {
2855 }
else if (tempattr ==
"v7x") {
2857 }
else if (tempattr ==
"v7y") {
2859 }
else if (tempattr ==
"v8x") {
2861 }
else if (tempattr ==
"v8y") {
2863 }
else if (tempattr ==
"dz") {
2865 }
else if (tempattr ==
"lunit") {
2938 if (tempattr ==
"name") {
2940 }
else if (tempattr ==
"rmin") {
2942 }
else if (tempattr ==
"rmax") {
2944 }
else if (tempattr ==
"z") {
2946 }
else if (tempattr ==
"lunit") {
2948 }
else if (tempattr ==
"aunit") {
2950 }
else if (tempattr ==
"startphi") {
2952 }
else if (tempattr ==
"deltaphi") {
2971 Double_t endphideg = startphideg + deltaphideg;
2974 if (deltaphideg < 360.)
3020 if (tempattr ==
"name") {
3022 }
else if (tempattr ==
"rmin") {
3024 }
else if (tempattr ==
"rmax") {
3026 }
else if (tempattr ==
"z") {
3028 }
else if (tempattr ==
"lunit") {
3030 }
else if (tempattr ==
"aunit") {
3032 }
else if (tempattr ==
"startphi") {
3034 }
else if (tempattr ==
"deltaphi") {
3036 }
else if (tempattr ==
"lowx") {
3038 }
else if (tempattr ==
"lowy") {
3040 }
else if (tempattr ==
"lowz") {
3042 }
else if (tempattr ==
"highx") {
3044 }
else if (tempattr ==
"highy") {
3046 }
else if (tempattr ==
"highz") {
3064 Double_t deltaphiline =
Value(deltaphi)*retaunit + startphiline;
3118 if (tempattr ==
"name") {
3120 }
else if (tempattr ==
"rmin1") {
3122 }
else if (tempattr ==
"rmax1") {
3124 }
else if (tempattr ==
"rmin2") {
3126 }
else if (tempattr ==
"rmax2") {
3128 }
else if (tempattr ==
"z") {
3130 }
else if (tempattr ==
"lunit") {
3132 }
else if (tempattr ==
"aunit") {
3134 }
else if (tempattr ==
"startphi") {
3136 }
else if (tempattr ==
"deltaphi") {
3210 if (tempattr ==
"name") {
3212 }
else if (tempattr ==
"x1") {
3214 }
else if (tempattr ==
"x2") {
3216 }
else if (tempattr ==
"x3") {
3218 }
else if (tempattr ==
"x4") {
3220 }
else if (tempattr ==
"y1") {
3222 }
else if (tempattr ==
"y2") {
3224 }
else if (tempattr ==
"z") {
3226 }
else if (tempattr ==
"lunit") {
3228 }
else if (tempattr ==
"aunit") {
3230 }
else if (tempattr ==
"phi") {
3232 }
else if (tempattr ==
"theta") {
3234 }
else if (tempattr ==
"alpha1") {
3236 }
else if (tempattr ==
"alpha2") {
3303 if (tempattr ==
"name") {
3305 }
else if (tempattr ==
"x1") {
3307 }
else if (tempattr ==
"x2") {
3309 }
else if (tempattr ==
"y1") {
3311 }
else if (tempattr ==
"y2") {
3313 }
else if (tempattr ==
"z") {
3315 }
else if (tempattr ==
"lunit") {
3372 if (tempattr ==
"name") {
3374 }
else if (tempattr ==
"lunit") {
3376 }
else if (tempattr ==
"aunit") {
3378 }
else if (tempattr ==
"startphi") {
3380 }
else if (tempattr ==
"deltaphi") {
3398 while (child != 0) {
3399 numplanes = numplanes + 1;
3406 double ** table =
new double*[numplanes];
3407 for (i = 0; i < numplanes; i++) {
3408 table[i] =
new double[cols];
3414 while (child != 0) {
3415 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3427 if (tempattr ==
"rmin") {
3429 rminline =
Value(rmin)*retlunit;
3430 table[planeno][0] = rminline;
3431 }
else if (tempattr ==
"rmax") {
3433 rmaxline =
Value(rmax)*retlunit;
3434 table[planeno][1] = rmaxline;
3435 }
else if (tempattr ==
"z") {
3437 zline =
Value(z)*retlunit;
3438 table[planeno][2] = zline;
3443 planeno = planeno + 1;
3456 for (
int j = 0; j < numplanes; j++) {
3457 poly->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3462 for (i = 0; i < numplanes; i++) {
3496 if (tempattr ==
"name") {
3498 }
else if (tempattr ==
"lunit") {
3500 }
else if (tempattr ==
"aunit") {
3502 }
else if (tempattr ==
"startphi") {
3504 }
else if (tempattr ==
"deltaphi") {
3506 }
else if (tempattr ==
"numsides") {
3525 while (child != 0) {
3526 numplanes = numplanes + 1;
3533 double ** table =
new double*[numplanes];
3534 for (i = 0; i < numplanes; i++) {
3535 table[i] =
new double[cols];
3541 while (child != 0) {
3542 if (strcmp(gdml->
GetNodeName(child),
"zplane") == 0) {
3553 if (tempattr ==
"rmin") {
3555 rminline =
Value(rmin)*retlunit;
3556 table[planeno][0] = rminline;
3557 }
else if (tempattr ==
"rmax") {
3559 rmaxline =
Value(rmax)*retlunit;
3560 table[planeno][1] = rmaxline;
3561 }
else if (tempattr ==
"z") {
3563 zline =
Value(z)*retlunit;
3564 table[planeno][2] = zline;
3570 planeno = planeno + 1;
3585 for (
int j = 0; j < numplanes; j++) {
3586 polyg->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3591 for (i = 0; i < numplanes; i++) {
3624 if (tempattr ==
"name") {
3626 }
else if (tempattr ==
"rmin") {
3628 }
else if (tempattr ==
"rmax") {
3630 }
else if (tempattr ==
"lunit") {
3632 }
else if (tempattr ==
"aunit") {
3634 }
else if (tempattr ==
"startphi") {
3636 }
else if (tempattr ==
"deltaphi") {
3638 }
else if (tempattr ==
"starttheta") {
3640 }
else if (tempattr ==
"deltatheta") {
3657 Double_t deltaphiline = startphiline+
Value(deltaphi)*retaunit;
3659 Double_t deltathetaline = startthetaline +
Value(deltatheta)*retaunit;
3699 if (tempattr ==
"name") {
3701 }
else if (tempattr ==
"rmin") {
3703 }
else if (tempattr ==
"rmax") {
3705 }
else if (tempattr ==
"rtor") {
3707 }
else if (tempattr ==
"lunit") {
3709 }
else if (tempattr ==
"aunit") {
3711 }
else if (tempattr ==
"startphi") {
3713 }
else if (tempattr ==
"deltaphi") {
3769 if (tempattr ==
"name") {
3771 }
else if (tempattr ==
"rmin") {
3773 }
else if (tempattr ==
"rmax") {
3775 }
else if (tempattr ==
"z") {
3777 }
else if (tempattr ==
"lunit") {
3779 }
else if (tempattr ==
"aunit") {
3781 }
else if (tempattr ==
"inst") {
3783 }
else if (tempattr ==
"outst") {
3842 if (tempattr ==
"name") {
3844 }
else if (tempattr ==
"x") {
3846 }
else if (tempattr ==
"y") {
3848 }
else if (tempattr ==
"z") {
3850 }
else if (tempattr ==
"lunit") {
3852 }
else if (tempattr ==
"aunit") {
3854 }
else if (tempattr ==
"phi") {
3856 }
else if (tempattr ==
"theta") {
3858 }
else if (tempattr ==
"alpha") {
3925 if (tempattr ==
"name") {
3927 }
else if (tempattr ==
"x1") {
3929 }
else if (tempattr ==
"x2") {
3931 }
else if (tempattr ==
"x3") {
3933 }
else if (tempattr ==
"x4") {
3935 }
else if (tempattr ==
"y1") {
3937 }
else if (tempattr ==
"y2") {
3939 }
else if (tempattr ==
"z") {
3941 }
else if (tempattr ==
"lunit") {
3943 }
else if (tempattr ==
"aunit") {
3945 }
else if (tempattr ==
"phi") {
3947 }
else if (tempattr ==
"theta") {
3949 }
else if (tempattr ==
"alph") {
3954 }
else if (tempattr ==
"phitwist") {
4023 if (tempattr ==
"name") {
4025 }
else if (tempattr ==
"dx") {
4027 }
else if (tempattr ==
"dy") {
4029 }
else if (tempattr ==
"dz") {
4031 }
else if (tempattr ==
"lunit") {
4076 if (tempattr ==
"name") {
4078 }
else if (tempattr ==
"r") {
4080 }
else if (tempattr ==
"lunit") {
4133 if (tempattr ==
"name") {
4135 }
else if (tempattr ==
"lunit") {
4154 while (child != 0) {
4157 if (tempattr ==
"twoDimVertex") {
4158 noverts = noverts + 1;
4159 }
else if (tempattr ==
"section") {
4160 nosects = nosects + 1;
4169 double *vertx =
new double[noverts];
4170 double *verty =
new double[noverts];
4172 double ** section =
new double*[nosects];
4173 for (i = 0; i < nosects; i++) {
4174 section[i] =
new double[cols];
4181 while (child != 0) {
4182 if (strcmp(gdml->
GetNodeName(child),
"twoDimVertex") == 0) {
4191 if (tempattr ==
"x") {
4193 xline =
Value(
x)*retlunit;
4194 vertx[vert] = xline;
4195 }
else if (tempattr ==
"y") {
4197 yline =
Value(
y)*retlunit;
4198 verty[vert] = yline;
4207 else if (strcmp(gdml->
GetNodeName(child),
"section") == 0) {
4218 if (tempattr ==
"zOrder") {
4220 section[sect][0] =
Value(zorder);
4221 }
else if (tempattr ==
"zPosition") {
4223 zposline =
Value(zpos)*retlunit;
4224 section[sect][1] = zposline;
4225 }
else if (tempattr ==
"xOffset") {
4227 xoffline =
Value(xoff)*retlunit;
4228 section[sect][2] = xoffline;
4229 }
else if (tempattr ==
"yOffset") {
4231 yoffline =
Value(yoff)*retlunit;
4232 section[sect][3] = yoffline;
4233 }
else if (tempattr ==
"scalingFactor") {
4235 section[sect][4] =
Value(scale);
4250 for (
int j = 0; j < sect; j++) {
4251 xtru->
DefineSection((
int)section[j][0], section[j][1], section[j][2], section[j][3], section[j][4]);
4257 for (i = 0; i < nosects; i++) {
4258 delete [] section[i];
4276 std::cout <<
"WARNING! The reflectedSolid is obsolete! Use scale transformation instead!" << std::endl;
4296 if (tempattr ==
"name") {
4298 }
else if (tempattr ==
"sx") {
4300 }
else if (tempattr ==
"sy") {
4302 }
else if (tempattr ==
"sz") {
4304 }
else if (tempattr ==
"rx") {
4306 }
else if (tempattr ==
"ry") {
4308 }
else if (tempattr ==
"rz") {
4310 }
else if (tempattr ==
"dx") {
4312 }
else if (tempattr ==
"dy") {
4314 }
else if (tempattr ==
"dz") {
4316 }
else if (tempattr ==
"solid") {
4334 if (atoi(sx) == -1) {
4337 if (atoi(sy) == -1) {
4340 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: