133 for (
Int_t i = 0; i < 20; i++)
166 if (gdmldoc ==
nullptr) {
187 "\x1B[31m Found %d GDML entities missing explicit units, while the default "
188 "units are currently ROOT units [cm, deg]. This can cause unexpected behaviour with respect "
189 "to the GDML schema. To remove this warning, either use explicit units or call the static method "
190 "TGeoManager::SetDefaultUnits(kG4Units) before importing the GDML file \x1B[34m%s \x1B[0m",
210 const char *posistr =
"position";
211 const char *setustr =
"setup";
212 const char *consstr =
"constant";
213 const char *varistr =
"variable";
214 const char *quanstr =
"quantity";
215 const char *matrstr =
"matrix";
216 const char *rotastr =
"rotation";
217 const char *scalstr =
"scale";
218 const char *elemstr =
"element";
219 const char *istpstr =
"isotope";
220 const char *matestr =
"material";
221 const char *volustr =
"volume";
222 const char *assestr =
"assembly";
223 const char *twtrstr =
"twistedtrap";
224 const char *cutTstr =
"cutTube";
225 const char *bboxstr =
"box";
226 const char *xtrustr =
"xtru";
227 const char *arb8str =
"arb8";
228 const char *tubestr =
"tube";
229 const char *conestr =
"cone";
230 const char *polystr =
"polycone";
231 const char *hypestr =
"hype";
232 const char *trapstr =
"trap";
233 const char *trdstr =
"trd";
234 const char *sphestr =
"sphere";
235 const char *orbstr =
"orb";
236 const char *parastr =
"para";
237 const char *torustr =
"torus";
238 const char *hedrstr =
"polyhedra";
239 const char *eltustr =
"eltube";
240 const char *subtstr =
"subtraction";
241 const char *uniostr =
"union";
242 const char *parbstr =
"paraboloid";
243 const char *intestr =
"intersection";
244 const char *reflstr =
"reflectedSolid";
245 const char *ssolstr =
"scaledSolid";
246 const char *ellistr =
"ellipsoid";
247 const char *elcnstr =
"elcone";
248 const char *optsstr =
"opticalsurface";
249 const char *skinstr =
"skinsurface";
250 const char *bordstr =
"bordersurface";
251 const char *usrstr =
"userinfo";
252 const char *tslstr =
"tessellated";
254 Bool_t hasIsotopesExtended;
256 if ((strcmp(
name, posistr)) == 0) {
258 }
else if ((strcmp(
name, rotastr)) == 0) {
260 }
else if ((strcmp(
name, scalstr)) == 0) {
262 }
else if ((strcmp(
name, setustr)) == 0) {
264 }
else if ((strcmp(
name, consstr)) == 0) {
266 }
else if ((strcmp(
name, varistr)) == 0) {
268 }
else if ((strcmp(
name, quanstr)) == 0) {
270 }
else if ((strcmp(
name, matrstr)) == 0) {
272 }
else if ((strcmp(
name, optsstr)) == 0) {
274 }
else if ((strcmp(
name, skinstr)) == 0) {
276 }
else if ((strcmp(
name, bordstr)) == 0) {
281 else if (((strcmp(
name,
"atom")) == 0) && ((strcmp(parent, elemstr)) == 0)) {
283 hasIsotopesExtended =
kFALSE;
284 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
285 }
else if ((strcmp(
name, elemstr) == 0) && !gdml->
HasAttr(node,
"Z")) {
287 hasIsotopesExtended =
kFALSE;
288 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
291 else if ((strcmp(
name, elemstr) == 0) && gdml->
HasAttr(node,
"Z")) {
293 if ((strcmp(gdml->
GetNodeName(childtmp),
"fraction") == 0)) {
295 hasIsotopesExtended =
kTRUE;
296 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
302 else if (((strcmp(
name,
"atom")) == 0) && ((strcmp(parent, istpstr)) == 0)) {
307 else if ((strcmp(
name, matestr)) == 0 && gdml->
HasAttr(node,
"Z")) {
318 int z = (
atom) ? 1 : 0;
320 }
else if ((strcmp(
name, matestr)) == 0 && !gdml->
HasAttr(node,
"Z")) {
326 else if ((strcmp(
name, volustr)) == 0) {
328 }
else if ((strcmp(
name, bboxstr)) == 0) {
330 }
else if ((strcmp(
name, ellistr)) == 0) {
332 }
else if ((strcmp(
name, elcnstr)) == 0) {
334 }
else if ((strcmp(
name, cutTstr)) == 0) {
336 }
else if ((strcmp(
name, arb8str)) == 0) {
338 }
else if ((strcmp(
name, tubestr)) == 0) {
340 }
else if ((strcmp(
name, conestr)) == 0) {
342 }
else if ((strcmp(
name, polystr)) == 0) {
344 }
else if ((strcmp(
name, trapstr)) == 0) {
346 }
else if ((strcmp(
name, trdstr)) == 0) {
348 }
else if ((strcmp(
name, sphestr)) == 0) {
350 }
else if ((strcmp(
name, xtrustr)) == 0) {
352 }
else if ((strcmp(
name, twtrstr)) == 0) {
354 }
else if ((strcmp(
name, hypestr)) == 0) {
356 }
else if ((strcmp(
name, orbstr)) == 0) {
358 }
else if ((strcmp(
name, parastr)) == 0) {
360 }
else if ((strcmp(
name, torustr)) == 0) {
362 }
else if ((strcmp(
name, eltustr)) == 0) {
364 }
else if ((strcmp(
name, hedrstr)) == 0) {
366 }
else if ((strcmp(
name, tslstr)) == 0) {
368 }
else if ((strcmp(
name, parbstr)) == 0) {
370 }
else if ((strcmp(
name, subtstr)) == 0) {
372 }
else if ((strcmp(
name, intestr)) == 0) {
374 }
else if ((strcmp(
name, uniostr)) == 0) {
376 }
else if ((strcmp(
name, reflstr)) == 0) {
378 }
else if ((strcmp(
name, ssolstr)) == 0) {
380 }
else if ((strcmp(
name, assestr)) == 0) {
382 }
else if ((strcmp(
name, usrstr)) == 0) {
385 }
else if (((strcmp(
name,
"gdml")) != 0) && ((strcmp(
name,
"define")) != 0) && ((strcmp(
name,
"element")) != 0) &&
386 ((strcmp(
name,
"materials")) != 0) && ((strcmp(
name,
"solids")) != 0) &&
387 ((strcmp(
name,
"structure")) != 0) && ((strcmp(
name,
"zplane")) != 0) && ((strcmp(
name,
"first")) != 0) &&
388 ((strcmp(
name,
"second")) != 0) && ((strcmp(
name,
"twoDimVertex")) != 0) &&
389 ((strcmp(
name,
"firstposition")) != 0) && ((strcmp(
name,
"firstpositionref")) != 0) &&
390 ((strcmp(
name,
"firstrotation")) != 0) && ((strcmp(
name,
"firstrotationref")) != 0) &&
391 ((strcmp(
name,
"section")) != 0) && ((strcmp(
name,
"world")) != 0) && ((strcmp(
name,
"isotope")) != 0) &&
392 ((strcmp(
name,
"triangular")) != 0) && ((strcmp(
name,
"quadrangular")) != 0)) {
393 std::cout <<
"Error: Unsupported GDML Tag Used :" <<
name <<
". Please Check Geometry/Schema." << std::endl;
399 while (
child !=
nullptr) {
425 if ((strcmp(axisString,
"kXAxis")) == 0) {
427 }
else if ((strcmp(axisString,
"kYAxis")) == 0) {
429 }
else if ((strcmp(axisString,
"kZAxis")) == 0) {
431 }
else if ((strcmp(axisString,
"kRho")) == 0) {
433 }
else if ((strcmp(axisString,
"kPhi")) == 0) {
452 stripped = stripped(0,
index);
453 return stripped.
Data();
468 while (
attr !=
nullptr) {
472 if (tempattr ==
"name") {
475 if (tempattr ==
"value") {
542 while (
attr !=
nullptr) {
546 if (tempattr ==
"name") {
549 if (tempattr ==
"value") {
552 if (tempattr ==
"unit") {
573 while (
attr !=
nullptr) {
577 if (tempattr ==
"name") {
580 if (tempattr ==
"coldim") {
583 if (tempattr ==
"values") {
590 std::stringstream valueStream(values);
591 std::vector<Double_t> valueList;
592 while (!valueStream.eof()) {
593 std::string matrixValue;
594 valueStream >> matrixValue;
596 if (matrixValue.empty())
598 valueList.push_back(
Value(matrixValue.c_str()));
603 if (coldim == 1 && valueList.size() == 1) {
608 for (
size_t i = 0; i < valueList.size(); ++i)
609 matrix->
Set(i / coldim, i % coldim, valueList[i]);
629 while (
attr !=
nullptr) {
633 if (tempattr ==
"name") {
636 if (tempattr ==
"model") {
639 if (tempattr ==
"finish") {
642 if (tempattr ==
"type") {
645 if (tempattr ==
"value") {
654 while (
child !=
nullptr) {
657 while (
attr !=
nullptr) {
660 if (tempattr ==
"name") {
662 }
else if (tempattr ==
"ref") {
666 Error(
"OpticalSurfaceProcess",
"Reference matrix %s for optical surface %s not found", ref.
Data(),
689 if (strcmp(unit,
"mm") == 0) {
691 }
else if (strcmp(unit,
"millimeter") == 0 || strcmp(unit,
"milimeter") == 0) {
693 }
else if (strcmp(unit,
"cm") == 0) {
695 }
else if (strcmp(unit,
"centimeter") == 0) {
697 }
else if (strcmp(unit,
"m") == 0) {
699 }
else if (strcmp(unit,
"meter") == 0) {
701 }
else if (strcmp(unit,
"km") == 0) {
702 retunit =
"100000.0";
703 }
else if (strcmp(unit,
"kilometer") == 0) {
704 retunit =
"100000.0";
705 }
else if (strcmp(unit,
"rad") == 0) {
707 }
else if (strcmp(unit,
"radian") == 0) {
709 }
else if (strcmp(unit,
"deg") == 0) {
711 }
else if (strcmp(unit,
"degree") == 0) {
713 }
else if (strcmp(unit,
"pi") == 0) {
715 }
else if (strcmp(unit,
"avogadro") == 0) {
718 Fatal(
"GetScale",
"Unit <%s> not known", unit);
737 if ((unit ==
"mm") || (unit ==
"millimeter") || (unit ==
"milimeter")) {
739 }
else if ((unit ==
"cm") || (unit ==
"centimeter")) {
741 }
else if ((unit ==
"m") || (unit ==
"meter")) {
743 }
else if ((unit ==
"km") || (unit ==
"kilometer")) {
745 }
else if ((unit ==
"rad") || (unit ==
"radian")) {
747 }
else if ((unit ==
"deg") || (unit ==
"degree")) {
749 }
else if ((unit ==
"ev") || (unit ==
"electronvolt")) {
751 }
else if ((unit ==
"kev") || (unit ==
"kiloelectronvolt")) {
753 }
else if ((unit ==
"mev") || (unit ==
"megaelectronvolt")) {
755 }
else if ((unit ==
"gev") || (unit ==
"gigaelectronvolt")) {
757 }
else if (unit ==
"pi") {
759 }
else if (unit ==
"avogadro") {
762 Fatal(
"GetScaleVal",
"Unit <%s> not known", sunit);
774 double val = strtod(svalue, &end);
777 while (*end != 0 && isspace(*end))
789 std::string expanded;
790 expanded.reserve(strlen(svalue) * 2);
794 const std::locale &loc = std::locale::classic();
797 const char *
p = svalue;
800 for (; *
p != 0; ++
p) {
801 if (std::isalpha(*
p, loc) || *
p ==
'_') {
802 const char *pe =
p + 1;
805 for (; *pe != 0; ++pe) {
806 if (!isalnum(*pe, loc) && *pe !=
'_') {
832 TFormula f(
"TFormula", expanded.c_str());
836 f.SetParameter(it.first.c_str(), it.second);
840 if (std::isnan(val) || std::isinf(val)) {
841 Fatal(
"Value",
"Got bad value %lf from string '%s'", val, svalue);
857 bool unitless_l =
true;
865 while (
attr !=
nullptr) {
870 if (tempattr ==
"name") {
872 }
else if (tempattr ==
"x") {
874 }
else if (tempattr ==
"y") {
876 }
else if (tempattr ==
"z") {
878 }
else if (tempattr ==
"unit") {
914 bool unitless_l =
true;
921 while (
attr !=
nullptr) {
926 if (tempattr ==
"name") {
928 }
else if (tempattr ==
"x") {
930 }
else if (tempattr ==
"y") {
932 }
else if (tempattr ==
"z") {
934 }
else if (tempattr ==
"unit") {
979 while (
attr !=
nullptr) {
984 if (tempattr ==
"name") {
986 }
else if (tempattr ==
"x") {
988 }
else if (tempattr ==
"y") {
990 }
else if (tempattr ==
"z") {
1027 while (
attr !=
nullptr) {
1032 if (tempattr ==
"name") {
1034 }
else if (tempattr ==
"z") {
1036 }
else if (tempattr ==
"n") {
1047 while (
attr !=
nullptr) {
1051 if (tempattr ==
"value") {
1073 }
else if (
gDebug >= 2) {
1074 Info(
"TGDMLParse",
"Re-use existing isotope: %s", iso->
GetName());
1110 while (
attr !=
nullptr) {
1112 if (tempattr ==
"name") {
1124 while (
child !=
nullptr) {
1130 ncompo = ncompo + 1;
1132 while (
attr !=
nullptr) {
1135 if (tempattr ==
"n") {
1137 }
else if (tempattr ==
"ref") {
1145 fracmap[ref.
Data()] =
n;
1152 if (ele && ele->
Z() == 0)
1156 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1167 if (hasIsotopesExtended) {
1169 while (
attr !=
nullptr) {
1172 if (tempattr ==
"name") {
1184 while (
child !=
nullptr) {
1190 ncompo = ncompo + 1;
1192 while (
attr !=
nullptr) {
1195 if (tempattr ==
"n") {
1197 }
else if (tempattr ==
"ref") {
1205 fracmap[ref.
Data()] =
n;
1212 if (ele && ele->
Z() == 0)
1216 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1228 while (
attr !=
nullptr) {
1233 if (tempattr ==
"name") {
1236 }
else if (tempattr ==
"z") {
1238 }
else if (tempattr ==
"formula") {
1249 while (
attr !=
nullptr) {
1254 if (tempattr ==
"value") {
1270 if (ele && ele->
Z() == 0)
1275 }
else if (
gDebug >= 2) {
1276 Info(
"TGDMLParse",
"Re-use existing element: %s", ele->
GetName());
1301 TList properties, constproperties;
1308 Int_t ncompo = 0, mixflag = 2;
1327 while (
child !=
nullptr) {
1332 while (
attr !=
nullptr) {
1336 if (tempattr ==
"name") {
1338 }
else if (tempattr ==
"ref") {
1347 Error(
"MatProcess",
"Reference %s for material %s not found",
property->GetTitle(),
1358 while (
attr !=
nullptr) {
1362 if (tempattr ==
"value") {
1370 while (
attr !=
nullptr) {
1374 if (tempattr ==
"value") {
1384 tempconst = gdml->
GetAttr(node,
"Z");
1391 if (tmpname ==
"vacuum") {
1399 Info(
"TGDMLParse",
"Re-use existing material: %s", mat->
GetName());
1403 TIter next(&properties);
1407 if (constproperties.
GetSize()) {
1409 TIter next(&constproperties);
1417 if (mat_ele && mat_ele->
Z() == 0)
1421 mat_ele =
new TGeoElement(mat_name, mat_name, atoi(tempconst),
a);
1422 }
else if (
gDebug >= 2) {
1423 Info(
"TGDMLParse",
"Re-use existing material-element: %s", mat_ele->
GetName());
1429 while (
child !=
nullptr) {
1434 while (
attr !=
nullptr) {
1438 if (tempattr ==
"name") {
1440 }
else if (tempattr ==
"ref") {
1449 Error(
"MatProcess",
"Reference %s for material %s not found",
property->GetTitle(),
1461 ncompo = ncompo + 1;
1463 while (
attr !=
nullptr) {
1467 if (tempattr ==
"n") {
1469 }
else if (tempattr ==
"ref") {
1477 fracmap[ref.
Data()] =
n;
1484 ncompo = ncompo + 1;
1486 while (
attr !=
nullptr) {
1489 if (tempattr ==
"n") {
1491 }
else if (tempattr ==
"ref") {
1499 fracmap[ref.
Data()] =
n;
1501 while (
attr !=
nullptr) {
1505 if (tempattr ==
"value") {
1529 Info(
"TGDMLParse",
"Re-use existing material-mixture: %s", mix->
GetName());
1531 Fatal(
"TGDMLParse",
"WARNING! Inconsistent material definitions between GDML and TGeoManager");
1536 TIter next(&properties);
1540 if (constproperties.
GetSize()) {
1542 TIter next(&constproperties);
1549 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1557 natoms = (
Int_t)
f->second;
1582 }
else if (mixflag == 0) {
1586 }
else if (
gDebug >= 2) {
1587 Info(
"TGDMLParse",
"Re-use existing medium: %s", med->
GetName());
1602 while (
attr !=
nullptr) {
1606 if (tempattr ==
"name") {
1609 if (tempattr ==
"surfaceproperty") {
1616 while (
child !=
nullptr) {
1619 while (
attr !=
nullptr) {
1622 if (tempattr ==
"ref") {
1632 Fatal(
"SkinSurfaceProcess",
"Skin surface %s: referenced optical surface %s not defined",
name.Data(),
1648 while (
attr !=
nullptr) {
1652 if (tempattr ==
"name") {
1655 if (tempattr ==
"surfaceproperty") {
1663 while (
child !=
nullptr) {
1666 while (
attr !=
nullptr) {
1669 if (tempattr ==
"ref") {
1678 Fatal(
"BorderSurfaceProcess",
"Border surface %s not referencing two nodes",
name.Data());
1681 Fatal(
"BorderSurfaceProcess",
"Border surface %s: referenced optical surface %s not defined",
name.Data(),
1685 if (!node1 || !node2)
1686 Fatal(
"BorderSurfaceProcess",
"Border surface %s: not found nodes %s [%s] or %s [%s]",
name.Data(),
1687 nodename[0].
Data(), node1 ?
"present" :
"missing", nodename[1].
Data(), node2 ?
"present" :
"missing");
1709 Error(
"GetPosition",
"Position %s not defined",
name);
1728 Error(
"GetRotation",
"Rotation %s not defined",
name);
1747 Error(
"GetScale",
"Scale %s not defined",
name);
1766 Error(
"GetSolid",
"Solid %s not defined",
name);
1785 Error(
"GetVolume",
"Volume %s not defined",
name);
1819 const Double_t *parentrot =
nullptr;
1822 TMap *auxmap =
nullptr;
1824 while (
child !=
nullptr) {
1834 solidname = reftemp;
1837 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
1849 printf(
"Medium: %s, Not Yet Defined!\n", gdml->
GetAttr(
child,
"ref"));
1862 if (reflex ==
nullptr) {
1878 while (
child !=
nullptr) {
1892 while (subchild !=
nullptr) {
1896 if (tempattr ==
"volumeref") {
1897 reftemp = gdml->
GetAttr(subchild,
"ref");
1900 }
else if (tempattr ==
"file") {
1901 const char *filevol;
1905 filevol = gdml->
GetAttr(subchild,
"volname");
1910 if (filedoc1 ==
nullptr) {
1938 }
else if (tempattr ==
"position") {
1941 reftemp = gdml->
GetAttr(subchild,
"name");
1943 }
else if (tempattr ==
"positionref") {
1944 reftemp = gdml->
GetAttr(subchild,
"ref");
1947 Fatal(
"VolProcess",
"Physvol's position %s not found", reftemp.
Data());
1948 }
else if (tempattr ==
"rotation") {
1951 reftemp = gdml->
GetAttr(subchild,
"name");
1953 }
else if (tempattr ==
"rotationref") {
1954 reftemp = gdml->
GetAttr(subchild,
"ref");
1957 Fatal(
"VolProcess",
"Physvol's rotation %s not found", reftemp.
Data());
1958 }
else if (tempattr ==
"scale") {
1961 reftemp = gdml->
GetAttr(subchild,
"name");
1963 }
else if (tempattr ==
"scaleref") {
1964 reftemp = gdml->
GetAttr(subchild,
"ref");
1967 Fatal(
"VolProcess",
"Physvol's scale %s not found", reftemp.
Data());
1970 subchild = gdml->
GetNext(subchild);
1983 if (scl !=
nullptr) {
1986 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
1989 scale3x3[0] = diagonal[0];
1990 scale3x3[4] = diagonal[1];
1991 scale3x3[8] = diagonal[2];
2028 bool unitless_l =
true;
2034 while (
attr !=
nullptr) {
2039 if (tempattr ==
"axis") {
2041 }
else if (tempattr ==
"number") {
2043 }
else if (tempattr ==
"width") {
2045 }
else if (tempattr ==
"offset") {
2047 }
else if (tempattr ==
"unit") {
2057 while (subchild !=
nullptr) {
2061 if (tempattr ==
"volumeref") {
2062 reftemp = gdml->
GetAttr(subchild,
"ref");
2063 local_name = reftemp;
2067 divVolref = reftemp;
2070 subchild = gdml->
GetNext(subchild);
2095 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2114 bool unitless_l =
true;
2122 while (
attr !=
nullptr) {
2127 if (tempattr ==
"number") {
2135 while (subchild !=
nullptr) {
2139 if (tempattr ==
"volumeref") {
2140 reftemp = gdml->
GetAttr(subchild,
"ref");
2141 local_name = reftemp;
2145 divVolref = reftemp;
2148 if (tempattr ==
"replicate_along_axis") {
2149 subsubchild = gdml->
GetChild(subchild);
2151 while (subsubchild !=
nullptr) {
2152 if ((strcmp(gdml->
GetNodeName(subsubchild),
"width")) == 0) {
2154 while (
attr !=
nullptr) {
2157 if (tempattr ==
"value") {
2159 }
else if (tempattr ==
"unit") {
2166 }
else if ((strcmp(gdml->
GetNodeName(subsubchild),
"offset")) == 0) {
2168 while (
attr !=
nullptr) {
2171 if (tempattr ==
"value") {
2173 }
else if (tempattr ==
"unit") {
2179 }
else if ((strcmp(gdml->
GetNodeName(subsubchild),
"direction")) == 0) {
2181 while (
attr !=
nullptr) {
2184 if (tempattr ==
"x") {
2186 }
else if (tempattr ==
"y") {
2188 }
else if (tempattr ==
"z") {
2190 }
else if (tempattr ==
"rho") {
2192 }
else if (tempattr ==
"phi") {
2200 subsubchild = gdml->
GetNext(subsubchild);
2204 subchild = gdml->
GetNext(subchild);
2212 Double_t widthline = wvalue * retwunit;
2213 Double_t offsetline = ovalue * retounit;
2232 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2242 TString auxType, auxUnit, auxValue;
2245 auxmap =
new TMap();
2310 while (
child !=
nullptr) {
2314 if (tempattr ==
"first") {
2318 Fatal(
"BooSolid",
"First solid %s not found", reftemp.
Data());
2319 }
else if (tempattr ==
"second") {
2323 Fatal(
"BooSolid",
"Second solid %s not found", reftemp.
Data());
2324 }
else if (tempattr ==
"position") {
2329 }
else if (tempattr ==
"positionref") {
2333 Fatal(
"BooSolid",
"Second position %s not found", reftemp.
Data());
2334 }
else if (tempattr ==
"rotation") {
2339 }
else if (tempattr ==
"rotationref") {
2343 Fatal(
"BooSolid",
"Second rotation %s not found", reftemp.
Data());
2344 }
else if (tempattr ==
"firstposition") {
2349 }
else if (tempattr ==
"firstpositionref") {
2353 Fatal(
"BooSolid",
"First position %s not found", reftemp.
Data());
2354 }
else if (tempattr ==
"firstrotation") {
2359 }
else if (tempattr ==
"firstrotationref") {
2363 Fatal(
"BooSolid",
"First rotation %s not found", reftemp.
Data());
2396 TString nodename, auxtype, auxtypec, auxvalue, auxvaluec, auxunit, auxunitc;
2402 if (nodename ==
"auxiliary") {
2405 if (auxtype ==
"Region") {
2412 auxtypec = gdml->
GetAttr(subchild,
"auxtype");
2413 auxvaluec = gdml->
GetAttr(subchild,
"auxvalue");
2414 auxunitc = gdml->
GetAttr(subchild,
"auxunit");
2415 if (auxtypec ==
"volume") {
2425 subchild = gdml->
GetNext(subchild);
2470 while (
child !=
nullptr) {
2480 while (subchild !=
nullptr) {
2484 if (tempattr ==
"volumeref") {
2485 reftemp = gdml->
GetAttr(subchild,
"ref");
2487 }
else if (tempattr ==
"positionref") {
2488 reftemp = gdml->
GetAttr(subchild,
"ref");
2491 Fatal(
"AssProcess",
"Position %s not found", reftemp.
Data());
2492 }
else if (tempattr ==
"position") {
2495 reftemp = gdml->
GetAttr(subchild,
"name");
2497 }
else if (tempattr ==
"rotationref") {
2498 reftemp = gdml->
GetAttr(subchild,
"ref");
2501 Fatal(
"AssProcess",
"Rotation %s not found", reftemp.
Data());
2502 }
else if (tempattr ==
"rotation") {
2505 reftemp = gdml->
GetAttr(subchild,
"name");
2509 subchild = gdml->
GetNext(subchild);
2540 while (
child !=
nullptr) {
2564 bool unitless_l =
true;
2571 while (
attr !=
nullptr) {
2576 if (tempattr ==
"name") {
2578 }
else if (tempattr ==
"x") {
2580 }
else if (tempattr ==
"y") {
2582 }
else if (tempattr ==
"z") {
2584 }
else if (tempattr ==
"lunit") {
2622 bool unitless_l =
true;
2632 while (
attr !=
nullptr) {
2637 if (tempattr ==
"name") {
2639 }
else if (tempattr ==
"ax") {
2641 }
else if (tempattr ==
"by") {
2643 }
else if (tempattr ==
"cz") {
2645 }
else if (tempattr ==
"zcut1") {
2647 }
else if (tempattr ==
"zcut2") {
2649 }
else if (tempattr ==
"lunit") {
2675 z1 =
Value(zcut1) * retunit;
2680 z2 =
Value(zcut2) * retunit;
2688 origin[2] = 0.5 * (z1 + z2);
2710 bool unitless_l =
true;
2718 while (
attr !=
nullptr) {
2723 if (tempattr ==
"name") {
2725 }
else if (tempattr ==
"dx") {
2727 }
else if (tempattr ==
"dy") {
2729 }
else if (tempattr ==
"zmax") {
2731 }
else if (tempattr ==
"zcut") {
2733 }
else if (tempattr ==
"lunit") {
2757 Info(
"ElCone",
"ERROR! Parameter zcut = %.12g is not set properly, elcone will not be imported.", z1);
2789 bool unitless_l =
true;
2796 while (
attr !=
nullptr) {
2801 if (tempattr ==
"name") {
2803 }
else if (tempattr ==
"rlo") {
2805 }
else if (tempattr ==
"rhi") {
2807 }
else if (tempattr ==
"dz") {
2809 }
else if (tempattr ==
"lunit") {
2845 bool unitless_l =
true;
2866 while (
attr !=
nullptr) {
2871 if (tempattr ==
"name") {
2873 }
else if (tempattr ==
"v1x") {
2875 }
else if (tempattr ==
"v1y") {
2877 }
else if (tempattr ==
"v2x") {
2879 }
else if (tempattr ==
"v2y") {
2881 }
else if (tempattr ==
"v3x") {
2883 }
else if (tempattr ==
"v3y") {
2885 }
else if (tempattr ==
"v4x") {
2887 }
else if (tempattr ==
"v4y") {
2889 }
else if (tempattr ==
"v5x") {
2891 }
else if (tempattr ==
"v5y") {
2893 }
else if (tempattr ==
"v6x") {
2895 }
else if (tempattr ==
"v6y") {
2897 }
else if (tempattr ==
"v7x") {
2899 }
else if (tempattr ==
"v7y") {
2901 }
else if (tempattr ==
"v8x") {
2903 }
else if (tempattr ==
"v8y") {
2905 }
else if (tempattr ==
"dz") {
2907 }
else if (tempattr ==
"lunit") {
2967 bool unitless_l =
true;
2968 bool unitless_a =
true;
2977 while (
attr !=
nullptr) {
2982 if (tempattr ==
"name") {
2984 }
else if (tempattr ==
"rmin") {
2986 }
else if (tempattr ==
"rmax") {
2988 }
else if (tempattr ==
"z") {
2990 }
else if (tempattr ==
"lunit") {
2993 }
else if (tempattr ==
"aunit") {
2996 }
else if (tempattr ==
"startphi") {
2998 }
else if (tempattr ==
"deltaphi") {
3018 Double_t endphideg = startphideg + deltaphideg;
3021 if (deltaphideg < 360.)
3041 bool unitless_l =
true;
3042 bool unitless_a =
true;
3057 while (
attr !=
nullptr) {
3062 if (tempattr ==
"name") {
3064 }
else if (tempattr ==
"rmin") {
3066 }
else if (tempattr ==
"rmax") {
3068 }
else if (tempattr ==
"z") {
3070 }
else if (tempattr ==
"lunit") {
3073 }
else if (tempattr ==
"aunit") {
3076 }
else if (tempattr ==
"startphi") {
3078 }
else if (tempattr ==
"deltaphi") {
3080 }
else if (tempattr ==
"lowx") {
3082 }
else if (tempattr ==
"lowy") {
3084 }
else if (tempattr ==
"lowz") {
3086 }
else if (tempattr ==
"highx") {
3088 }
else if (tempattr ==
"highy") {
3090 }
else if (tempattr ==
"highz") {
3109 Double_t deltaphiline =
Value(deltaphi) * retaunit + startphiline;
3118 lowXline, lowYline, lowZline, highXline, highYline, highZline);
3136 bool unitless_l =
true;
3137 bool unitless_a =
true;
3148 while (
attr !=
nullptr) {
3153 if (tempattr ==
"name") {
3155 }
else if (tempattr ==
"rmin1") {
3157 }
else if (tempattr ==
"rmax1") {
3159 }
else if (tempattr ==
"rmin2") {
3161 }
else if (tempattr ==
"rmax2") {
3163 }
else if (tempattr ==
"z") {
3165 }
else if (tempattr ==
"lunit") {
3168 }
else if (tempattr ==
"aunit") {
3171 }
else if (tempattr ==
"startphi") {
3173 }
else if (tempattr ==
"deltaphi") {
3219 bool unitless_l =
true;
3220 bool unitless_a =
true;
3235 while (
attr !=
nullptr) {
3240 if (tempattr ==
"name") {
3242 }
else if (tempattr ==
"x1") {
3244 }
else if (tempattr ==
"x2") {
3246 }
else if (tempattr ==
"x3") {
3248 }
else if (tempattr ==
"x4") {
3250 }
else if (tempattr ==
"y1") {
3252 }
else if (tempattr ==
"y2") {
3254 }
else if (tempattr ==
"z") {
3256 }
else if (tempattr ==
"lunit") {
3259 }
else if (tempattr ==
"aunit") {
3262 }
else if (tempattr ==
"phi") {
3264 }
else if (tempattr ==
"theta") {
3266 }
else if (tempattr ==
"alpha1") {
3268 }
else if (tempattr ==
"alpha2") {
3296 alpha1line, y2line / 2, x3line / 2, x4line / 2, alpha2line);
3313 bool unitless_l =
true;
3322 while (
attr !=
nullptr) {
3327 if (tempattr ==
"name") {
3329 }
else if (tempattr ==
"x1") {
3331 }
else if (tempattr ==
"x2") {
3333 }
else if (tempattr ==
"y1") {
3335 }
else if (tempattr ==
"y2") {
3337 }
else if (tempattr ==
"z") {
3339 }
else if (tempattr ==
"lunit") {
3379 bool unitless_l =
true;
3380 bool unitless_a =
true;
3389 while (
attr !=
nullptr) {
3394 if (tempattr ==
"name") {
3396 }
else if (tempattr ==
"lunit") {
3399 }
else if (tempattr ==
"aunit") {
3402 }
else if (tempattr ==
"startphi") {
3404 }
else if (tempattr ==
"deltaphi") {
3423 while (
child !=
nullptr) {
3424 numplanes = numplanes + 1;
3427 if (numplanes < 2) {
3428 Fatal(
"Polycone",
"Found less than 2 planes for polycone %s",
name.Data());
3435 double **table =
new double *[numplanes];
3436 for (i = 0; i < numplanes; i++) {
3437 table[i] =
new double[cols];
3443 while (
child !=
nullptr) {
3452 while (
attr !=
nullptr) {
3456 if (tempattr ==
"rmin") {
3458 rminline =
Value(rmin) * retlunit;
3459 table[planeno][0] = rminline;
3460 }
else if (tempattr ==
"rmax") {
3462 rmaxline =
Value(rmax) * retlunit;
3463 table[planeno][1] = rmaxline;
3464 }
else if (tempattr ==
"z") {
3466 zline =
Value(z) * retlunit;
3467 table[planeno][2] = zline;
3472 planeno = planeno + 1;
3482 for (
int j = 0; j < numplanes; j++) {
3483 poly->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3488 for (i = 0; i < numplanes; i++) {
3508 bool unitless_l =
true;
3509 bool unitless_a =
true;
3519 while (
attr !=
nullptr) {
3524 if (tempattr ==
"name") {
3526 }
else if (tempattr ==
"lunit") {
3529 }
else if (tempattr ==
"aunit") {
3532 }
else if (tempattr ==
"startphi") {
3534 }
else if (tempattr ==
"deltaphi") {
3536 }
else if (tempattr ==
"numsides") {
3556 while (
child !=
nullptr) {
3557 numplanes = numplanes + 1;
3560 if (numplanes < 2) {
3561 Fatal(
"Polyhedra",
"Found less than 2 planes for polyhedra %s",
name.Data());
3568 double **table =
new double *[numplanes];
3569 for (i = 0; i < numplanes; i++) {
3570 table[i] =
new double[cols];
3576 while (
child !=
nullptr) {
3584 while (
attr !=
nullptr) {
3588 if (tempattr ==
"rmin") {
3590 rminline =
Value(rmin) * retlunit;
3591 table[planeno][0] = rminline;
3592 }
else if (tempattr ==
"rmax") {
3594 rmaxline =
Value(rmax) * retlunit;
3595 table[planeno][1] = rmaxline;
3596 }
else if (tempattr ==
"z") {
3598 zline =
Value(z) * retlunit;
3599 table[planeno][2] = zline;
3605 planeno = planeno + 1;
3616 for (
int j = 0; j < numplanes; j++) {
3617 polyg->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3622 for (i = 0; i < numplanes; i++) {
3641 bool unitless_l =
true;
3642 bool unitless_a =
true;
3652 while (
attr !=
nullptr) {
3656 if (tempattr ==
"name") {
3658 }
else if (tempattr ==
"rmin") {
3660 }
else if (tempattr ==
"rmax") {
3662 }
else if (tempattr ==
"lunit") {
3665 }
else if (tempattr ==
"aunit") {
3668 }
else if (tempattr ==
"startphi") {
3670 }
else if (tempattr ==
"deltaphi") {
3672 }
else if (tempattr ==
"starttheta") {
3674 }
else if (tempattr ==
"deltatheta") {
3692 Double_t deltaphiline = startphiline +
Value(deltaphi) * retaunit;
3694 Double_t deltathetaline = startthetaline +
Value(deltatheta) * retaunit;
3697 new TGeoSphere(
NameShort(
name), rminline, rmaxline, startthetaline, deltathetaline, startphiline, deltaphiline);
3715 bool unitless_l =
true;
3716 bool unitless_a =
true;
3725 while (
attr !=
nullptr) {
3730 if (tempattr ==
"name") {
3732 }
else if (tempattr ==
"rmin") {
3734 }
else if (tempattr ==
"rmax") {
3736 }
else if (tempattr ==
"rtor") {
3738 }
else if (tempattr ==
"lunit") {
3741 }
else if (tempattr ==
"aunit") {
3744 }
else if (tempattr ==
"startphi") {
3746 }
else if (tempattr ==
"deltaphi") {
3785 bool unitless_l =
true;
3786 bool unitless_a =
true;
3795 while (
attr !=
nullptr) {
3799 if (tempattr ==
"name") {
3801 }
else if (tempattr ==
"rmin") {
3803 }
else if (tempattr ==
"rmax") {
3805 }
else if (tempattr ==
"z") {
3807 }
else if (tempattr ==
"lunit") {
3810 }
else if (tempattr ==
"aunit") {
3813 }
else if (tempattr ==
"inst") {
3815 }
else if (tempattr ==
"outst") {
3854 bool unitless_l =
true;
3855 bool unitless_a =
true;
3865 while (
attr !=
nullptr) {
3870 if (tempattr ==
"name") {
3872 }
else if (tempattr ==
"x") {
3874 }
else if (tempattr ==
"y") {
3876 }
else if (tempattr ==
"z") {
3878 }
else if (tempattr ==
"lunit") {
3881 }
else if (tempattr ==
"aunit") {
3884 }
else if (tempattr ==
"phi") {
3886 }
else if (tempattr ==
"theta") {
3888 }
else if (tempattr ==
"alpha") {
3928 bool unitless_l =
true;
3929 bool unitless_a =
true;
3945 while (
attr !=
nullptr) {
3950 if (tempattr ==
"name") {
3952 }
else if (tempattr ==
"x1") {
3954 }
else if (tempattr ==
"x2") {
3956 }
else if (tempattr ==
"x3") {
3958 }
else if (tempattr ==
"x4") {
3960 }
else if (tempattr ==
"y1") {
3962 }
else if (tempattr ==
"y2") {
3964 }
else if (tempattr ==
"z") {
3966 }
else if (tempattr ==
"lunit") {
3969 }
else if (tempattr ==
"aunit") {
3972 }
else if (tempattr ==
"phi") {
3974 }
else if (tempattr ==
"theta") {
3976 }
else if (tempattr ==
"alph") {
3981 }
else if (tempattr ==
"phitwist") {
4010 x2line / 2, alpha1line, y2line / 2, x3line / 2, x4line / 2, alpha2line);
4027 bool unitless_l =
true;
4034 while (
attr !=
nullptr) {
4039 if (tempattr ==
"name") {
4041 }
else if (tempattr ==
"dx") {
4043 }
else if (tempattr ==
"dy") {
4045 }
else if (tempattr ==
"dz") {
4047 }
else if (tempattr ==
"lunit") {
4082 bool unitless_l =
true;
4087 while (
attr !=
nullptr) {
4092 if (tempattr ==
"name") {
4094 }
else if (tempattr ==
"r") {
4096 }
else if (tempattr ==
"lunit") {
4133 bool unitless_l =
true;
4144 while (
attr !=
nullptr) {
4149 if (tempattr ==
"name") {
4151 }
else if (tempattr ==
"lunit") {
4172 while (
child !=
nullptr) {
4175 if (tempattr ==
"twoDimVertex") {
4176 noverts = noverts + 1;
4177 }
else if (tempattr ==
"section") {
4178 nosects = nosects + 1;
4184 if (nosects < 2 || noverts < 3) {
4185 Fatal(
"Xtru",
"Invalid number of sections/vertices found forxtru %s",
name.Data());
4192 double *vertx =
new double[noverts];
4193 double *verty =
new double[noverts];
4195 double **section =
new double *[nosects];
4196 for (i = 0; i < nosects; i++) {
4197 section[i] =
new double[cols];
4204 while (
child !=
nullptr) {
4211 while (
attr !=
nullptr) {
4214 if (tempattr ==
"x") {
4216 xline =
Value(
x) * retlunit;
4217 vertx[vert] = xline;
4218 }
else if (tempattr ==
"y") {
4220 yline =
Value(
y) * retlunit;
4221 verty[vert] = yline;
4238 while (
attr !=
nullptr) {
4241 if (tempattr ==
"zOrder") {
4243 section[sect][0] =
Value(zorder);
4244 }
else if (tempattr ==
"zPosition") {
4246 zposline =
Value(zpos) * retlunit;
4247 section[sect][1] = zposline;
4248 }
else if (tempattr ==
"xOffset") {
4250 xoffline =
Value(xoff) * retlunit;
4251 section[sect][2] = xoffline;
4252 }
else if (tempattr ==
"yOffset") {
4254 yoffline =
Value(yoff) * retlunit;
4255 section[sect][3] = yoffline;
4256 }
else if (tempattr ==
"scalingFactor") {
4258 section[sect][4] =
Value(scale);
4273 for (
int j = 0; j < sect; j++) {
4274 xtru->
DefineSection((
int)section[j][0], section[j][1], section[j][2], section[j][3], section[j][4]);
4280 for (i = 0; i < nosects; i++) {
4281 delete[] section[i];
4299 while (
attr !=
nullptr) {
4302 if (tempattr ==
"name") {
4317 if (trans ==
nullptr)
4319 const double *tr = trans->GetTranslation();
4320 vertices[i].
Set(tr[0], tr[1], tr[2]);
4323 auto AddTriangularFacet = [&](
bool relative) {
4325 vertices[2] += vertices[0] + vertices[1];
4326 vertices[1] += vertices[0];
4328 tsl->AddFacet(vertices[0], vertices[1], vertices[2]);
4331 auto AddQuadrangularFacet = [&](
bool relative) {
4333 vertices[3] += vertices[0] + vertices[1] + vertices[2];
4334 vertices[2] += vertices[0] + vertices[1];
4335 vertices[1] += vertices[0];
4337 tsl->AddFacet(vertices[0], vertices[1], vertices[2], vertices[3]);
4342 while (
child !=
nullptr) {
4345 if (tempattr ==
"triangular") {
4347 bool relative =
false;
4349 while (
attr !=
nullptr) {
4352 if (tempattr ==
"vertex1") {
4356 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4360 else if (tempattr ==
"vertex2") {
4364 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4368 else if (tempattr ==
"vertex3") {
4372 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4376 else if (tempattr ==
"type") {
4379 relative = (
type ==
"relative") ?
true :
false;
4384 AddTriangularFacet(relative);
4387 else if (tempattr ==
"quadrangular") {
4389 bool relative =
false;
4391 while (
attr !=
nullptr) {
4394 if (tempattr ==
"vertex1") {
4398 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4402 else if (tempattr ==
"vertex2") {
4406 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4410 else if (tempattr ==
"vertex3") {
4414 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4418 else if (tempattr ==
"vertex4") {
4422 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4426 else if (tempattr ==
"type") {
4429 relative = (
type ==
"relative") ?
true :
false;
4434 AddQuadrangularFacet(relative);
4438 tsl->CloseShape(
false);
4461 while (
attr !=
nullptr) {
4464 if (tempattr ==
"name") {
4474 while (
child !=
nullptr) {
4477 if (tempattr ==
"solidref") {
4485 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
4487 }
else if (tempattr ==
"scale") {
4492 }
else if (tempattr ==
"scaleref") {
4496 Fatal(
"ScaledSolid",
"Solid's scale %s not found", reftemp.
Data());
4520 std::cout <<
"WARNING! The reflectedSolid is obsolete! Use scale transformation instead!" << std::endl;
4535 while (
attr !=
nullptr) {
4540 if (tempattr ==
"name") {
4542 }
else if (tempattr ==
"sx") {
4544 }
else if (tempattr ==
"sy") {
4546 }
else if (tempattr ==
"sz") {
4548 }
else if (tempattr ==
"rx") {
4550 }
else if (tempattr ==
"ry") {
4552 }
else if (tempattr ==
"rz") {
4554 }
else if (tempattr ==
"dx") {
4556 }
else if (tempattr ==
"dy") {
4558 }
else if (tempattr ==
"dz") {
4560 }
else if (tempattr ==
"solid") {
4578 if (atoi(sx) == -1) {
4581 if (atoi(sy) == -1) {
4584 if (atoi(sz) == -1) {
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t atom
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h offset
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t child
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void xpos
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t attr
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void ypos
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t property
Option_t Option_t TPoint TPoint const char y1
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.
TGeoVolume * GetVolume(const char *name)
TGeoScale * GetScaleObj(const char *name)
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
TGeoRotation * GetRotation(const char *name)
void DefineConstants()
Define constant expressions used.
const char * NameShort(const char *name)
This function looks thru a string for the chars '0x' next to each other, when it finds this,...
XMLNodePointer_t Orb(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Orb may be declared.
FileMap ffilemap
Map containing reflected volume names and the solid ref for it.
MatrixMap fmatrices
Map containing values of constants declared in the file.
XMLNodePointer_t Hype(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Hype may be declared.
VolMap fvolmap
Map containing solid names and the TGeoShape for it.
double GetScaleVal(const char *unit)
Throughout the GDML file, a unit can de specified.
std::string fDefault_lunit
XMLNodePointer_t BooSolid(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr, int num)
In the solid section of the GDML file, boolean solids can be declared.
XMLNodePointer_t Para(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Para may be declared.
XMLNodePointer_t Arb8(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an Arb8 may be declared.
RotMap frotmap
Map containing position names and the TGeoTranslation for it.
XMLNodePointer_t PosProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, positions can be declared.
ReflVolMap freflvolmap
Map containing reflection names and the TGDMLRefl for it - containing refl matrix.
XMLNodePointer_t Sphere(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Sphere may be declared.
ReflectionsMap freflectmap
Map containing placed volume names and the TGeoNode for it.
XMLNodePointer_t Trap(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Trap may be declared.
std::map< std::string, double > FracMap
XMLNodePointer_t EleProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLNodePointer_t parentn, Bool_t hasIsotopes, Bool_t hasIsotopesExtended)
When the element keyword is found, this function is called, and the name and values of the element ar...
XMLNodePointer_t Polyhedra(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Polyhedra may be declared.
XMLNodePointer_t Cone(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a cone may be declared.
XMLNodePointer_t ElCone(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, an elliptical cone may be declared.
MatMap fmatmap
Map containing element names and the TGeoElement for it.
SclMap fsclmap
Map containing rotation names and the TGeoRotation for it.
XMLNodePointer_t MatrixProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the define section of the GDML file, matrices These are referenced by other GDML tags,...
XMLNodePointer_t Tessellated(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a tessellated shape may be declared.
IsoMap fisomap
Map containing scale names and the TGeoScale for it.
XMLNodePointer_t IsoProcess(TXMLEngine *gdml, XMLNodePointer_t node, XMLNodePointer_t parentn)
In the material section of the GDML file, an isotope may be declared.
PvolMap fpvolmap
Map containing volume names and the TGeoVolume for it.
double Value(const char *svalue) const
Convert number in string format to double value.
TGeoTranslation * GetPosition(const char *name)
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.
TGeoShape * GetSolid(const char *name)
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.
XMLNodePointer_t ScaledSolid(TXMLEngine *gdml, XMLNodePointer_t node, XMLAttrPointer_t attr)
In the solids section of the GDML file, a Scaled Solid may be declared when the scaledSolid keyword i...
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
virtual void SetVertex(Int_t vnum, Double_t x, Double_t y)
Base class for Boolean operations between two shapes.
Class describing rotation + translation.
Composite shapes are Boolean combinations of two or more shape components.
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.
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)
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...
This is a wrapper class to G4OpticalSurface.
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)
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.
void RotateX(Double_t angle) override
Rotate about X axis of the master frame with angle expressed in degrees.
void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to XY.
const Double_t * GetRotationMatrix() const override
void RotateY(Double_t angle) override
Rotate about Y axis of the master frame with angle expressed in degrees.
void SetMatrix(const Double_t *rot)
void RotateZ(Double_t angle) override
Rotate about Z axis of the master frame with angle expressed in degrees.
void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to ZX.
void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE) override
Multiply by a reflection respect to YZ.
TGeoHMatrix Inverse() const override
Return a temporary inverse of this.
Class describing scale transformations.
const Double_t * GetScale() const override
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.
const Double_t * GetTranslation() const override
TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="") override
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.
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
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 DefineSection(Int_t snum, Double_t z, Double_t x0=0., Double_t y0=0., Double_t scale=1.)
Bool_t DefinePolygon(Int_t nvert, const Double_t *xv, const Double_t *yv)
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
void Add(TObject *obj) override
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
void Add(TObject *obj) override
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.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
TObject * Last() const override
Return the object in the last filled slot. Returns 0 if no entries.
Collectable string class.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
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 GeV
static constexpr double us
static constexpr double s
static constexpr double mm
static constexpr double g
static constexpr double km
static constexpr double keV
static constexpr double ns
static constexpr double m
static constexpr double cm
static constexpr double ms
static constexpr double kg
static constexpr double mg
static constexpr double eV
static constexpr double MeV
static constexpr double mg
static constexpr double us
static constexpr double ms
static constexpr double s
static constexpr double mm
static constexpr double MeV
static constexpr double pi
static constexpr double keV
static constexpr double GeV
static constexpr double twopi
static constexpr double rad
static constexpr double kg
static constexpr double cm
static constexpr double m
static constexpr double ns
static constexpr double deg
static constexpr double eV
static constexpr double g
static constexpr double km
constexpr Double_t Na()
Avogadro constant (Avogadro's Number) in .
constexpr Double_t RadToDeg()
Conversion from radian to degree: .
Typedefs used by the geometry group.
void Set(double const &a, double const &b, double const &c)