132 for (
Int_t i = 0; i < 20; i++)
165 if (gdmldoc ==
nullptr) {
186 "\x1B[31m Found %d GDML entities missing explicit units, while the default "
187 "units are currently ROOT units [cm, deg]. This can cause unexpected behaviour with respect "
188 "to the GDML schema. To remove this warning, either use explicit units or call the static method "
189 "TGeoManager::SetDefaultUnits(kG4Units) before importing the GDML file \x1B[34m%s \x1B[0m",
209 const char *posistr =
"position";
210 const char *setustr =
"setup";
211 const char *consstr =
"constant";
212 const char *varistr =
"variable";
213 const char *quanstr =
"quantity";
214 const char *matrstr =
"matrix";
215 const char *rotastr =
"rotation";
216 const char *scalstr =
"scale";
217 const char *elemstr =
"element";
218 const char *istpstr =
"isotope";
219 const char *matestr =
"material";
220 const char *volustr =
"volume";
221 const char *assestr =
"assembly";
222 const char *twtrstr =
"twistedtrap";
223 const char *cutTstr =
"cutTube";
224 const char *bboxstr =
"box";
225 const char *xtrustr =
"xtru";
226 const char *arb8str =
"arb8";
227 const char *tubestr =
"tube";
228 const char *conestr =
"cone";
229 const char *polystr =
"polycone";
230 const char *hypestr =
"hype";
231 const char *trapstr =
"trap";
232 const char *trdstr =
"trd";
233 const char *sphestr =
"sphere";
234 const char *orbstr =
"orb";
235 const char *parastr =
"para";
236 const char *torustr =
"torus";
237 const char *hedrstr =
"polyhedra";
238 const char *eltustr =
"eltube";
239 const char *subtstr =
"subtraction";
240 const char *uniostr =
"union";
241 const char *parbstr =
"paraboloid";
242 const char *intestr =
"intersection";
243 const char *reflstr =
"reflectedSolid";
244 const char *ssolstr =
"scaledSolid";
245 const char *ellistr =
"ellipsoid";
246 const char *elcnstr =
"elcone";
247 const char *optsstr =
"opticalsurface";
248 const char *skinstr =
"skinsurface";
249 const char *bordstr =
"bordersurface";
250 const char *usrstr =
"userinfo";
251 const char *tslstr =
"tessellated";
253 Bool_t hasIsotopesExtended;
255 if ((strcmp(
name, posistr)) == 0) {
257 }
else if ((strcmp(
name, rotastr)) == 0) {
259 }
else if ((strcmp(
name, scalstr)) == 0) {
261 }
else if ((strcmp(
name, setustr)) == 0) {
263 }
else if ((strcmp(
name, consstr)) == 0) {
265 }
else if ((strcmp(
name, varistr)) == 0) {
267 }
else if ((strcmp(
name, quanstr)) == 0) {
269 }
else if ((strcmp(
name, matrstr)) == 0) {
271 }
else if ((strcmp(
name, optsstr)) == 0) {
273 }
else if ((strcmp(
name, skinstr)) == 0) {
275 }
else if ((strcmp(
name, bordstr)) == 0) {
280 else if (((strcmp(
name,
"atom")) == 0) && ((strcmp(parent, elemstr)) == 0)) {
282 hasIsotopesExtended =
kFALSE;
283 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
284 }
else if ((strcmp(
name, elemstr) == 0) && !gdml->
HasAttr(node,
"Z")) {
286 hasIsotopesExtended =
kFALSE;
287 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
290 else if ((strcmp(
name, elemstr) == 0) && gdml->
HasAttr(node,
"Z")) {
292 if ((strcmp(gdml->
GetNodeName(childtmp),
"fraction") == 0)) {
294 hasIsotopesExtended =
kTRUE;
295 node =
EleProcess(gdml, node, parentn, hasIsotopes, hasIsotopesExtended);
301 else if (((strcmp(
name,
"atom")) == 0) && ((strcmp(parent, istpstr)) == 0)) {
306 else if ((strcmp(
name, matestr)) == 0 && gdml->
HasAttr(node,
"Z")) {
317 int z = (
atom) ? 1 : 0;
319 }
else if ((strcmp(
name, matestr)) == 0 && !gdml->
HasAttr(node,
"Z")) {
325 else if ((strcmp(
name, volustr)) == 0) {
327 }
else if ((strcmp(
name, bboxstr)) == 0) {
329 }
else if ((strcmp(
name, ellistr)) == 0) {
331 }
else if ((strcmp(
name, elcnstr)) == 0) {
333 }
else if ((strcmp(
name, cutTstr)) == 0) {
335 }
else if ((strcmp(
name, arb8str)) == 0) {
337 }
else if ((strcmp(
name, tubestr)) == 0) {
339 }
else if ((strcmp(
name, conestr)) == 0) {
341 }
else if ((strcmp(
name, polystr)) == 0) {
343 }
else if ((strcmp(
name, trapstr)) == 0) {
345 }
else if ((strcmp(
name, trdstr)) == 0) {
347 }
else if ((strcmp(
name, sphestr)) == 0) {
349 }
else if ((strcmp(
name, xtrustr)) == 0) {
351 }
else if ((strcmp(
name, twtrstr)) == 0) {
353 }
else if ((strcmp(
name, hypestr)) == 0) {
355 }
else if ((strcmp(
name, orbstr)) == 0) {
357 }
else if ((strcmp(
name, parastr)) == 0) {
359 }
else if ((strcmp(
name, torustr)) == 0) {
361 }
else if ((strcmp(
name, eltustr)) == 0) {
363 }
else if ((strcmp(
name, hedrstr)) == 0) {
365 }
else if ((strcmp(
name, tslstr)) == 0) {
367 }
else if ((strcmp(
name, parbstr)) == 0) {
369 }
else if ((strcmp(
name, subtstr)) == 0) {
371 }
else if ((strcmp(
name, intestr)) == 0) {
373 }
else if ((strcmp(
name, uniostr)) == 0) {
375 }
else if ((strcmp(
name, reflstr)) == 0) {
377 }
else if ((strcmp(
name, ssolstr)) == 0) {
379 }
else if ((strcmp(
name, assestr)) == 0) {
381 }
else if ((strcmp(
name, usrstr)) == 0) {
384 }
else if (((strcmp(
name,
"gdml")) != 0) && ((strcmp(
name,
"define")) != 0) && ((strcmp(
name,
"element")) != 0) &&
385 ((strcmp(
name,
"materials")) != 0) && ((strcmp(
name,
"solids")) != 0) &&
386 ((strcmp(
name,
"structure")) != 0) && ((strcmp(
name,
"zplane")) != 0) && ((strcmp(
name,
"first")) != 0) &&
387 ((strcmp(
name,
"second")) != 0) && ((strcmp(
name,
"twoDimVertex")) != 0) &&
388 ((strcmp(
name,
"firstposition")) != 0) && ((strcmp(
name,
"firstpositionref")) != 0) &&
389 ((strcmp(
name,
"firstrotation")) != 0) && ((strcmp(
name,
"firstrotationref")) != 0) &&
390 ((strcmp(
name,
"section")) != 0) && ((strcmp(
name,
"world")) != 0) && ((strcmp(
name,
"isotope")) != 0) &&
391 ((strcmp(
name,
"triangular")) != 0) && ((strcmp(
name,
"quadrangular")) != 0)) {
392 std::cout <<
"Error: Unsupported GDML Tag Used :" <<
name <<
". Please Check Geometry/Schema." << std::endl;
398 while (
child !=
nullptr) {
424 if ((strcmp(axisString,
"kXAxis")) == 0) {
426 }
else if ((strcmp(axisString,
"kYAxis")) == 0) {
428 }
else if ((strcmp(axisString,
"kZAxis")) == 0) {
430 }
else if ((strcmp(axisString,
"kRho")) == 0) {
432 }
else if ((strcmp(axisString,
"kPhi")) == 0) {
451 stripped = stripped(0,
index);
452 return stripped.
Data();
467 while (
attr !=
nullptr) {
471 if (tempattr ==
"name") {
474 if (tempattr ==
"value") {
541 while (
attr !=
nullptr) {
545 if (tempattr ==
"name") {
548 if (tempattr ==
"value") {
551 if (tempattr ==
"unit") {
572 while (
attr !=
nullptr) {
576 if (tempattr ==
"name") {
579 if (tempattr ==
"coldim") {
582 if (tempattr ==
"values") {
589 std::stringstream valueStream(values);
590 std::vector<Double_t> valueList;
591 while (!valueStream.eof()) {
592 std::string matrixValue;
593 valueStream >> matrixValue;
595 if (matrixValue.empty())
597 valueList.push_back(
Value(matrixValue.c_str()));
602 if (coldim == 1 && valueList.size() == 1) {
607 for (
size_t i = 0; i < valueList.size(); ++i)
608 matrix->
Set(i / coldim, i % coldim, valueList[i]);
628 while (
attr !=
nullptr) {
632 if (tempattr ==
"name") {
635 if (tempattr ==
"model") {
638 if (tempattr ==
"finish") {
641 if (tempattr ==
"type") {
644 if (tempattr ==
"value") {
653 while (
child !=
nullptr) {
656 while (
attr !=
nullptr) {
659 if (tempattr ==
"name") {
661 }
else if (tempattr ==
"ref") {
665 Error(
"OpticalSurfaceProcess",
"Reference matrix %s for optical surface %s not found", ref.
Data(),
688 if (strcmp(unit,
"mm") == 0) {
690 }
else if (strcmp(unit,
"millimeter") == 0 || strcmp(unit,
"milimeter") == 0) {
692 }
else if (strcmp(unit,
"cm") == 0) {
694 }
else if (strcmp(unit,
"centimeter") == 0) {
696 }
else if (strcmp(unit,
"m") == 0) {
698 }
else if (strcmp(unit,
"meter") == 0) {
700 }
else if (strcmp(unit,
"km") == 0) {
701 retunit =
"100000.0";
702 }
else if (strcmp(unit,
"kilometer") == 0) {
703 retunit =
"100000.0";
704 }
else if (strcmp(unit,
"rad") == 0) {
706 }
else if (strcmp(unit,
"radian") == 0) {
708 }
else if (strcmp(unit,
"deg") == 0) {
710 }
else if (strcmp(unit,
"degree") == 0) {
712 }
else if (strcmp(unit,
"pi") == 0) {
714 }
else if (strcmp(unit,
"avogadro") == 0) {
717 Fatal(
"GetScale",
"Unit <%s> not known", unit);
736 if ((unit ==
"mm") || (unit ==
"millimeter") || (unit ==
"milimeter")) {
738 }
else if ((unit ==
"cm") || (unit ==
"centimeter")) {
740 }
else if ((unit ==
"m") || (unit ==
"meter")) {
742 }
else if ((unit ==
"km") || (unit ==
"kilometer")) {
744 }
else if ((unit ==
"rad") || (unit ==
"radian")) {
746 }
else if ((unit ==
"deg") || (unit ==
"degree")) {
748 }
else if ((unit ==
"ev") || (unit ==
"electronvolt")) {
750 }
else if ((unit ==
"kev") || (unit ==
"kiloelectronvolt")) {
752 }
else if ((unit ==
"mev") || (unit ==
"megaelectronvolt")) {
754 }
else if ((unit ==
"gev") || (unit ==
"gigaelectronvolt")) {
756 }
else if (unit ==
"pi") {
758 }
else if (unit ==
"avogadro") {
761 Fatal(
"GetScaleVal",
"Unit <%s> not known", sunit);
773 double val = strtod(svalue, &end);
776 while (*end != 0 && isspace(*end))
788 std::string expanded;
789 expanded.reserve(strlen(svalue) * 2);
793 const std::locale &loc = std::locale::classic();
796 const char *
p = svalue;
799 for (; *
p != 0; ++
p) {
800 if (std::isalpha(*
p, loc) || *
p ==
'_') {
801 const char *pe =
p + 1;
804 for (; *pe != 0; ++pe) {
805 if (!isalnum(*pe, loc) && *pe !=
'_') {
831 TFormula f(
"TFormula", expanded.c_str());
835 f.SetParameter(it.first.c_str(), it.second);
839 if (std::isnan(val) || std::isinf(val)) {
840 Fatal(
"Value",
"Got bad value %lf from string '%s'", val, svalue);
856 bool unitless_l =
true;
864 while (
attr !=
nullptr) {
869 if (tempattr ==
"name") {
871 }
else if (tempattr ==
"x") {
873 }
else if (tempattr ==
"y") {
875 }
else if (tempattr ==
"z") {
877 }
else if (tempattr ==
"unit") {
913 bool unitless_l =
true;
920 while (
attr !=
nullptr) {
925 if (tempattr ==
"name") {
927 }
else if (tempattr ==
"x") {
929 }
else if (tempattr ==
"y") {
931 }
else if (tempattr ==
"z") {
933 }
else if (tempattr ==
"unit") {
978 while (
attr !=
nullptr) {
983 if (tempattr ==
"name") {
985 }
else if (tempattr ==
"x") {
987 }
else if (tempattr ==
"y") {
989 }
else if (tempattr ==
"z") {
1026 while (
attr !=
nullptr) {
1031 if (tempattr ==
"name") {
1033 }
else if (tempattr ==
"z") {
1035 }
else if (tempattr ==
"n") {
1046 while (
attr !=
nullptr) {
1050 if (tempattr ==
"value") {
1072 }
else if (
gDebug >= 2) {
1073 Info(
"TGDMLParse",
"Re-use existing isotope: %s", iso->
GetName());
1109 while (
attr !=
nullptr) {
1111 if (tempattr ==
"name") {
1123 while (
child !=
nullptr) {
1129 ncompo = ncompo + 1;
1131 while (
attr !=
nullptr) {
1134 if (tempattr ==
"n") {
1136 }
else if (tempattr ==
"ref") {
1144 fracmap[ref.
Data()] =
n;
1151 if (ele && ele->
Z() == 0)
1155 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1166 if (hasIsotopesExtended) {
1168 while (
attr !=
nullptr) {
1171 if (tempattr ==
"name") {
1183 while (
child !=
nullptr) {
1189 ncompo = ncompo + 1;
1191 while (
attr !=
nullptr) {
1194 if (tempattr ==
"n") {
1196 }
else if (tempattr ==
"ref") {
1204 fracmap[ref.
Data()] =
n;
1211 if (ele && ele->
Z() == 0)
1215 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1227 while (
attr !=
nullptr) {
1232 if (tempattr ==
"name") {
1235 }
else if (tempattr ==
"z") {
1237 }
else if (tempattr ==
"formula") {
1248 while (
attr !=
nullptr) {
1253 if (tempattr ==
"value") {
1269 if (ele && ele->
Z() == 0)
1274 }
else if (
gDebug >= 2) {
1275 Info(
"TGDMLParse",
"Re-use existing element: %s", ele->
GetName());
1300 TList properties, constproperties;
1307 Int_t ncompo = 0, mixflag = 2;
1325 while (
child !=
nullptr) {
1330 while (
attr !=
nullptr) {
1334 if (tempattr ==
"name") {
1336 }
else if (tempattr ==
"ref") {
1345 Error(
"MatProcess",
"Reference %s for material %s not found",
property->GetTitle(),
1356 while (
attr !=
nullptr) {
1360 if (tempattr ==
"value") {
1368 while (
attr !=
nullptr) {
1372 if (tempattr ==
"value") {
1382 tempconst = gdml->
GetAttr(node,
"Z");
1389 if (tmpname ==
"vacuum") {
1397 Info(
"TGDMLParse",
"Re-use existing material: %s", mat->
GetName());
1401 TIter next(&properties);
1405 if (constproperties.
GetSize()) {
1407 TIter next(&constproperties);
1415 if (mat_ele && mat_ele->
Z() == 0)
1419 mat_ele =
new TGeoElement(mat_name, mat_name, atoi(tempconst),
a);
1420 }
else if (
gDebug >= 2) {
1421 Info(
"TGDMLParse",
"Re-use existing material-element: %s", mat_ele->
GetName());
1427 while (
child !=
nullptr) {
1432 while (
attr !=
nullptr) {
1436 if (tempattr ==
"name") {
1438 }
else if (tempattr ==
"ref") {
1447 Error(
"MatProcess",
"Reference %s for material %s not found",
property->GetTitle(),
1459 ncompo = ncompo + 1;
1461 while (
attr !=
nullptr) {
1465 if (tempattr ==
"n") {
1467 }
else if (tempattr ==
"ref") {
1475 fracmap[ref.
Data()] =
n;
1482 ncompo = ncompo + 1;
1484 while (
attr !=
nullptr) {
1487 if (tempattr ==
"n") {
1489 }
else if (tempattr ==
"ref") {
1497 fracmap[ref.
Data()] =
n;
1499 while (
attr !=
nullptr) {
1503 if (tempattr ==
"value") {
1527 Info(
"TGDMLParse",
"Re-use existing material-mixture: %s", mix->
GetName());
1529 Fatal(
"TGDMLParse",
"WARNING! Inconsistent material definitions between GDML and TGeoManager");
1534 TIter next(&properties);
1538 if (constproperties.
GetSize()) {
1540 TIter next(&constproperties);
1547 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1549 auto material =
fmatmap.find(
f->first);
1550 if (material !=
fmatmap.end())
1553 auto mixture =
fmixmap.find(
f->first);
1557 auto element =
felemap.find(
f->first);
1559 if ((composite && element !=
felemap.end()) || (!composite && (mattmp || element !=
felemap.end()))) {
1561 natoms = (
Int_t)
f->second;
1581 else if (mixflag == 0)
1588 }
else if (mixflag == 0) {
1591 }
else if (
gDebug >= 2) {
1592 Info(
"TGDMLParse",
"Re-use existing medium: %s", med->
GetName());
1607 while (
attr !=
nullptr) {
1611 if (tempattr ==
"name") {
1614 if (tempattr ==
"surfaceproperty") {
1621 while (
child !=
nullptr) {
1624 while (
attr !=
nullptr) {
1627 if (tempattr ==
"ref") {
1637 Fatal(
"SkinSurfaceProcess",
"Skin surface %s: referenced optical surface %s not defined",
name.Data(),
1653 while (
attr !=
nullptr) {
1657 if (tempattr ==
"name") {
1660 if (tempattr ==
"surfaceproperty") {
1668 while (
child !=
nullptr) {
1671 while (
attr !=
nullptr) {
1674 if (tempattr ==
"ref") {
1683 Fatal(
"BorderSurfaceProcess",
"Border surface %s not referencing two nodes",
name.Data());
1686 Fatal(
"BorderSurfaceProcess",
"Border surface %s: referenced optical surface %s not defined",
name.Data(),
1690 if (!node1 || !node2)
1691 Fatal(
"BorderSurfaceProcess",
"Border surface %s: not found nodes %s [%s] or %s [%s]",
name.Data(),
1692 nodename[0].
Data(), node1 ?
"present" :
"missing", nodename[1].
Data(), node2 ?
"present" :
"missing");
1714 Error(
"GetPosition",
"Position %s not defined",
name);
1733 Error(
"GetRotation",
"Rotation %s not defined",
name);
1752 Error(
"GetScale",
"Scale %s not defined",
name);
1771 Error(
"GetSolid",
"Solid %s not defined",
name);
1790 Error(
"GetVolume",
"Volume %s not defined",
name);
1824 const Double_t *parentrot =
nullptr;
1827 TMap *auxmap =
nullptr;
1829 while (
child !=
nullptr) {
1839 solidname = reftemp;
1842 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
1854 printf(
"Medium: %s, Not Yet Defined!\n", gdml->
GetAttr(
child,
"ref"));
1867 if (reflex ==
nullptr) {
1883 while (
child !=
nullptr) {
1897 while (subchild !=
nullptr) {
1901 if (tempattr ==
"volumeref") {
1902 reftemp = gdml->
GetAttr(subchild,
"ref");
1905 }
else if (tempattr ==
"file") {
1906 const char *filevol;
1910 filevol = gdml->
GetAttr(subchild,
"volname");
1915 if (filedoc1 ==
nullptr) {
1943 }
else if (tempattr ==
"position") {
1946 reftemp = gdml->
GetAttr(subchild,
"name");
1948 }
else if (tempattr ==
"positionref") {
1949 reftemp = gdml->
GetAttr(subchild,
"ref");
1952 Fatal(
"VolProcess",
"Physvol's position %s not found", reftemp.
Data());
1953 }
else if (tempattr ==
"rotation") {
1956 reftemp = gdml->
GetAttr(subchild,
"name");
1958 }
else if (tempattr ==
"rotationref") {
1959 reftemp = gdml->
GetAttr(subchild,
"ref");
1962 Fatal(
"VolProcess",
"Physvol's rotation %s not found", reftemp.
Data());
1963 }
else if (tempattr ==
"scale") {
1966 reftemp = gdml->
GetAttr(subchild,
"name");
1968 }
else if (tempattr ==
"scaleref") {
1969 reftemp = gdml->
GetAttr(subchild,
"ref");
1972 Fatal(
"VolProcess",
"Physvol's scale %s not found", reftemp.
Data());
1975 subchild = gdml->
GetNext(subchild);
1988 if (scl !=
nullptr) {
1991 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
1994 scale3x3[0] = diagonal[0];
1995 scale3x3[4] = diagonal[1];
1996 scale3x3[8] = diagonal[2];
2033 bool unitless_l =
true;
2039 while (
attr !=
nullptr) {
2044 if (tempattr ==
"axis") {
2046 }
else if (tempattr ==
"number") {
2048 }
else if (tempattr ==
"width") {
2050 }
else if (tempattr ==
"offset") {
2052 }
else if (tempattr ==
"unit") {
2062 while (subchild !=
nullptr) {
2066 if (tempattr ==
"volumeref") {
2067 reftemp = gdml->
GetAttr(subchild,
"ref");
2068 local_name = reftemp;
2072 divVolref = reftemp;
2075 subchild = gdml->
GetNext(subchild);
2100 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2119 bool unitless_l =
true;
2127 while (
attr !=
nullptr) {
2132 if (tempattr ==
"number") {
2140 while (subchild !=
nullptr) {
2144 if (tempattr ==
"volumeref") {
2145 reftemp = gdml->
GetAttr(subchild,
"ref");
2146 local_name = reftemp;
2150 divVolref = reftemp;
2153 if (tempattr ==
"replicate_along_axis") {
2154 subsubchild = gdml->
GetChild(subchild);
2156 while (subsubchild !=
nullptr) {
2157 if ((strcmp(gdml->
GetNodeName(subsubchild),
"width")) == 0) {
2159 while (
attr !=
nullptr) {
2162 if (tempattr ==
"value") {
2164 }
else if (tempattr ==
"unit") {
2171 }
else if ((strcmp(gdml->
GetNodeName(subsubchild),
"offset")) == 0) {
2173 while (
attr !=
nullptr) {
2176 if (tempattr ==
"value") {
2178 }
else if (tempattr ==
"unit") {
2184 }
else if ((strcmp(gdml->
GetNodeName(subsubchild),
"direction")) == 0) {
2186 while (
attr !=
nullptr) {
2189 if (tempattr ==
"x") {
2191 }
else if (tempattr ==
"y") {
2193 }
else if (tempattr ==
"z") {
2195 }
else if (tempattr ==
"rho") {
2197 }
else if (tempattr ==
"phi") {
2205 subsubchild = gdml->
GetNext(subsubchild);
2209 subchild = gdml->
GetNext(subchild);
2217 Double_t widthline = wvalue * retwunit;
2218 Double_t offsetline = ovalue * retounit;
2237 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2247 TString auxType, auxUnit, auxValue;
2250 auxmap =
new TMap();
2317 while (
child !=
nullptr) {
2321 if (tempattr ==
"first") {
2325 Fatal(
"BooSolid",
"First solid %s not found", reftemp.
Data());
2326 }
else if (tempattr ==
"second") {
2330 Fatal(
"BooSolid",
"Second solid %s not found", reftemp.
Data());
2331 }
else if (tempattr ==
"position") {
2336 }
else if (tempattr ==
"positionref") {
2340 Fatal(
"BooSolid",
"Second position %s not found", reftemp.
Data());
2341 }
else if (tempattr ==
"rotation") {
2346 }
else if (tempattr ==
"rotationref") {
2350 Fatal(
"BooSolid",
"Second rotation %s not found", reftemp.
Data());
2351 }
else if (tempattr ==
"firstposition") {
2356 }
else if (tempattr ==
"firstpositionref") {
2360 Fatal(
"BooSolid",
"First position %s not found", reftemp.
Data());
2361 }
else if (tempattr ==
"firstrotation") {
2366 }
else if (tempattr ==
"firstrotationref") {
2370 Fatal(
"BooSolid",
"First rotation %s not found", reftemp.
Data());
2403 TString nodename, auxtype, auxtypec, auxvalue, auxvaluec, auxunit, auxunitc;
2409 if (nodename ==
"auxiliary") {
2412 if (auxtype ==
"Region") {
2419 auxtypec = gdml->
GetAttr(subchild,
"auxtype");
2420 auxvaluec = gdml->
GetAttr(subchild,
"auxvalue");
2421 auxunitc = gdml->
GetAttr(subchild,
"auxunit");
2422 if (auxtypec ==
"volume") {
2432 subchild = gdml->
GetNext(subchild);
2477 while (
child !=
nullptr) {
2488 while (subchild !=
nullptr) {
2492 if (tempattr ==
"volumeref") {
2493 reftemp = gdml->
GetAttr(subchild,
"ref");
2495 }
else if (tempattr ==
"positionref") {
2496 reftemp = gdml->
GetAttr(subchild,
"ref");
2499 Fatal(
"AssProcess",
"Position %s not found", reftemp.
Data());
2500 }
else if (tempattr ==
"position") {
2503 reftemp = gdml->
GetAttr(subchild,
"name");
2505 }
else if (tempattr ==
"rotationref") {
2506 reftemp = gdml->
GetAttr(subchild,
"ref");
2509 Fatal(
"AssProcess",
"Rotation %s not found", reftemp.
Data());
2510 }
else if (tempattr ==
"rotation") {
2513 reftemp = gdml->
GetAttr(subchild,
"name");
2515 }
else if (tempattr ==
"scale") {
2518 reftemp = gdml->
GetAttr(subchild,
"name");
2520 }
else if (tempattr ==
"scaleref") {
2521 reftemp = gdml->
GetAttr(subchild,
"ref");
2524 Fatal(
"AssProcess",
"Physvol's scale %s not found", reftemp.
Data());
2527 subchild = gdml->
GetNext(subchild);
2536 if (scl !=
nullptr) {
2539 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
2542 scale3x3[0] = diagonal[0];
2543 scale3x3[4] = diagonal[1];
2544 scale3x3[8] = diagonal[2];
2576 while (
child !=
nullptr) {
2600 bool unitless_l =
true;
2607 while (
attr !=
nullptr) {
2612 if (tempattr ==
"name") {
2614 }
else if (tempattr ==
"x") {
2616 }
else if (tempattr ==
"y") {
2618 }
else if (tempattr ==
"z") {
2620 }
else if (tempattr ==
"lunit") {
2658 bool unitless_l =
true;
2668 while (
attr !=
nullptr) {
2673 if (tempattr ==
"name") {
2675 }
else if (tempattr ==
"ax") {
2677 }
else if (tempattr ==
"by") {
2679 }
else if (tempattr ==
"cz") {
2681 }
else if (tempattr ==
"zcut1") {
2683 }
else if (tempattr ==
"zcut2") {
2685 }
else if (tempattr ==
"lunit") {
2711 z1 =
Value(zcut1) * retunit;
2716 z2 =
Value(zcut2) * retunit;
2724 origin[2] = 0.5 * (z1 + z2);
2746 bool unitless_l =
true;
2754 while (
attr !=
nullptr) {
2759 if (tempattr ==
"name") {
2761 }
else if (tempattr ==
"dx") {
2763 }
else if (tempattr ==
"dy") {
2765 }
else if (tempattr ==
"zmax") {
2767 }
else if (tempattr ==
"zcut") {
2769 }
else if (tempattr ==
"lunit") {
2793 Info(
"ElCone",
"ERROR! Parameter zcut = %.12g is not set properly, elcone will not be imported.", z1);
2825 bool unitless_l =
true;
2832 while (
attr !=
nullptr) {
2837 if (tempattr ==
"name") {
2839 }
else if (tempattr ==
"rlo") {
2841 }
else if (tempattr ==
"rhi") {
2843 }
else if (tempattr ==
"dz") {
2845 }
else if (tempattr ==
"lunit") {
2881 bool unitless_l =
true;
2902 while (
attr !=
nullptr) {
2907 if (tempattr ==
"name") {
2909 }
else if (tempattr ==
"v1x") {
2911 }
else if (tempattr ==
"v1y") {
2913 }
else if (tempattr ==
"v2x") {
2915 }
else if (tempattr ==
"v2y") {
2917 }
else if (tempattr ==
"v3x") {
2919 }
else if (tempattr ==
"v3y") {
2921 }
else if (tempattr ==
"v4x") {
2923 }
else if (tempattr ==
"v4y") {
2925 }
else if (tempattr ==
"v5x") {
2927 }
else if (tempattr ==
"v5y") {
2929 }
else if (tempattr ==
"v6x") {
2931 }
else if (tempattr ==
"v6y") {
2933 }
else if (tempattr ==
"v7x") {
2935 }
else if (tempattr ==
"v7y") {
2937 }
else if (tempattr ==
"v8x") {
2939 }
else if (tempattr ==
"v8y") {
2941 }
else if (tempattr ==
"dz") {
2943 }
else if (tempattr ==
"lunit") {
3003 bool unitless_l =
true;
3004 bool unitless_a =
true;
3013 while (
attr !=
nullptr) {
3018 if (tempattr ==
"name") {
3020 }
else if (tempattr ==
"rmin") {
3022 }
else if (tempattr ==
"rmax") {
3024 }
else if (tempattr ==
"z") {
3026 }
else if (tempattr ==
"lunit") {
3029 }
else if (tempattr ==
"aunit") {
3032 }
else if (tempattr ==
"startphi") {
3034 }
else if (tempattr ==
"deltaphi") {
3054 Double_t endphideg = startphideg + deltaphideg;
3057 if (deltaphideg < 360.)
3077 bool unitless_l =
true;
3078 bool unitless_a =
true;
3093 while (
attr !=
nullptr) {
3098 if (tempattr ==
"name") {
3100 }
else if (tempattr ==
"rmin") {
3102 }
else if (tempattr ==
"rmax") {
3104 }
else if (tempattr ==
"z") {
3106 }
else if (tempattr ==
"lunit") {
3109 }
else if (tempattr ==
"aunit") {
3112 }
else if (tempattr ==
"startphi") {
3114 }
else if (tempattr ==
"deltaphi") {
3116 }
else if (tempattr ==
"lowx") {
3118 }
else if (tempattr ==
"lowy") {
3120 }
else if (tempattr ==
"lowz") {
3122 }
else if (tempattr ==
"highx") {
3124 }
else if (tempattr ==
"highy") {
3126 }
else if (tempattr ==
"highz") {
3145 Double_t deltaphiline =
Value(deltaphi) * retaunit + startphiline;
3154 lowXline, lowYline, lowZline, highXline, highYline, highZline);
3172 bool unitless_l =
true;
3173 bool unitless_a =
true;
3184 while (
attr !=
nullptr) {
3189 if (tempattr ==
"name") {
3191 }
else if (tempattr ==
"rmin1") {
3193 }
else if (tempattr ==
"rmax1") {
3195 }
else if (tempattr ==
"rmin2") {
3197 }
else if (tempattr ==
"rmax2") {
3199 }
else if (tempattr ==
"z") {
3201 }
else if (tempattr ==
"lunit") {
3204 }
else if (tempattr ==
"aunit") {
3207 }
else if (tempattr ==
"startphi") {
3209 }
else if (tempattr ==
"deltaphi") {
3255 bool unitless_l =
true;
3256 bool unitless_a =
true;
3271 while (
attr !=
nullptr) {
3276 if (tempattr ==
"name") {
3278 }
else if (tempattr ==
"x1") {
3280 }
else if (tempattr ==
"x2") {
3282 }
else if (tempattr ==
"x3") {
3284 }
else if (tempattr ==
"x4") {
3286 }
else if (tempattr ==
"y1") {
3288 }
else if (tempattr ==
"y2") {
3290 }
else if (tempattr ==
"z") {
3292 }
else if (tempattr ==
"lunit") {
3295 }
else if (tempattr ==
"aunit") {
3298 }
else if (tempattr ==
"phi") {
3300 }
else if (tempattr ==
"theta") {
3302 }
else if (tempattr ==
"alpha1") {
3304 }
else if (tempattr ==
"alpha2") {
3332 alpha1line, y2line / 2, x3line / 2, x4line / 2, alpha2line);
3349 bool unitless_l =
true;
3358 while (
attr !=
nullptr) {
3363 if (tempattr ==
"name") {
3365 }
else if (tempattr ==
"x1") {
3367 }
else if (tempattr ==
"x2") {
3369 }
else if (tempattr ==
"y1") {
3371 }
else if (tempattr ==
"y2") {
3373 }
else if (tempattr ==
"z") {
3375 }
else if (tempattr ==
"lunit") {
3415 bool unitless_l =
true;
3416 bool unitless_a =
true;
3425 while (
attr !=
nullptr) {
3430 if (tempattr ==
"name") {
3432 }
else if (tempattr ==
"lunit") {
3435 }
else if (tempattr ==
"aunit") {
3438 }
else if (tempattr ==
"startphi") {
3440 }
else if (tempattr ==
"deltaphi") {
3459 while (
child !=
nullptr) {
3460 numplanes = numplanes + 1;
3463 if (numplanes < 2) {
3464 Fatal(
"Polycone",
"Found less than 2 planes for polycone %s",
name.Data());
3471 double **table =
new double *[numplanes];
3472 for (i = 0; i < numplanes; i++) {
3473 table[i] =
new double[cols];
3479 while (
child !=
nullptr) {
3488 while (
attr !=
nullptr) {
3492 if (tempattr ==
"rmin") {
3494 rminline =
Value(rmin) * retlunit;
3495 table[planeno][0] = rminline;
3496 }
else if (tempattr ==
"rmax") {
3498 rmaxline =
Value(rmax) * retlunit;
3499 table[planeno][1] = rmaxline;
3500 }
else if (tempattr ==
"z") {
3502 zline =
Value(z) * retlunit;
3503 table[planeno][2] = zline;
3508 planeno = planeno + 1;
3518 for (
int j = 0; j < numplanes; j++) {
3519 poly->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3524 for (i = 0; i < numplanes; i++) {
3544 bool unitless_l =
true;
3545 bool unitless_a =
true;
3555 while (
attr !=
nullptr) {
3560 if (tempattr ==
"name") {
3562 }
else if (tempattr ==
"lunit") {
3565 }
else if (tempattr ==
"aunit") {
3568 }
else if (tempattr ==
"startphi") {
3570 }
else if (tempattr ==
"deltaphi") {
3572 }
else if (tempattr ==
"numsides") {
3592 while (
child !=
nullptr) {
3593 numplanes = numplanes + 1;
3596 if (numplanes < 2) {
3597 Fatal(
"Polyhedra",
"Found less than 2 planes for polyhedra %s",
name.Data());
3604 double **table =
new double *[numplanes];
3605 for (i = 0; i < numplanes; i++) {
3606 table[i] =
new double[cols];
3612 while (
child !=
nullptr) {
3620 while (
attr !=
nullptr) {
3624 if (tempattr ==
"rmin") {
3626 rminline =
Value(rmin) * retlunit;
3627 table[planeno][0] = rminline;
3628 }
else if (tempattr ==
"rmax") {
3630 rmaxline =
Value(rmax) * retlunit;
3631 table[planeno][1] = rmaxline;
3632 }
else if (tempattr ==
"z") {
3634 zline =
Value(z) * retlunit;
3635 table[planeno][2] = zline;
3641 planeno = planeno + 1;
3652 for (
int j = 0; j < numplanes; j++) {
3653 polyg->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3658 for (i = 0; i < numplanes; i++) {
3677 bool unitless_l =
true;
3678 bool unitless_a =
true;
3688 while (
attr !=
nullptr) {
3692 if (tempattr ==
"name") {
3694 }
else if (tempattr ==
"rmin") {
3696 }
else if (tempattr ==
"rmax") {
3698 }
else if (tempattr ==
"lunit") {
3701 }
else if (tempattr ==
"aunit") {
3704 }
else if (tempattr ==
"startphi") {
3706 }
else if (tempattr ==
"deltaphi") {
3708 }
else if (tempattr ==
"starttheta") {
3710 }
else if (tempattr ==
"deltatheta") {
3728 Double_t deltaphiline = startphiline +
Value(deltaphi) * retaunit;
3730 Double_t deltathetaline = startthetaline +
Value(deltatheta) * retaunit;
3733 new TGeoSphere(
NameShort(
name), rminline, rmaxline, startthetaline, deltathetaline, startphiline, deltaphiline);
3751 bool unitless_l =
true;
3752 bool unitless_a =
true;
3761 while (
attr !=
nullptr) {
3766 if (tempattr ==
"name") {
3768 }
else if (tempattr ==
"rmin") {
3770 }
else if (tempattr ==
"rmax") {
3772 }
else if (tempattr ==
"rtor") {
3774 }
else if (tempattr ==
"lunit") {
3777 }
else if (tempattr ==
"aunit") {
3780 }
else if (tempattr ==
"startphi") {
3782 }
else if (tempattr ==
"deltaphi") {
3821 bool unitless_l =
true;
3822 bool unitless_a =
true;
3831 while (
attr !=
nullptr) {
3835 if (tempattr ==
"name") {
3837 }
else if (tempattr ==
"rmin") {
3839 }
else if (tempattr ==
"rmax") {
3841 }
else if (tempattr ==
"z") {
3843 }
else if (tempattr ==
"lunit") {
3846 }
else if (tempattr ==
"aunit") {
3849 }
else if (tempattr ==
"inst") {
3851 }
else if (tempattr ==
"outst") {
3890 bool unitless_l =
true;
3891 bool unitless_a =
true;
3901 while (
attr !=
nullptr) {
3906 if (tempattr ==
"name") {
3908 }
else if (tempattr ==
"x") {
3910 }
else if (tempattr ==
"y") {
3912 }
else if (tempattr ==
"z") {
3914 }
else if (tempattr ==
"lunit") {
3917 }
else if (tempattr ==
"aunit") {
3920 }
else if (tempattr ==
"phi") {
3922 }
else if (tempattr ==
"theta") {
3924 }
else if (tempattr ==
"alpha") {
3964 bool unitless_l =
true;
3965 bool unitless_a =
true;
3981 while (
attr !=
nullptr) {
3986 if (tempattr ==
"name") {
3988 }
else if (tempattr ==
"x1") {
3990 }
else if (tempattr ==
"x2") {
3992 }
else if (tempattr ==
"x3") {
3994 }
else if (tempattr ==
"x4") {
3996 }
else if (tempattr ==
"y1") {
3998 }
else if (tempattr ==
"y2") {
4000 }
else if (tempattr ==
"z") {
4002 }
else if (tempattr ==
"lunit") {
4005 }
else if (tempattr ==
"aunit") {
4008 }
else if (tempattr ==
"phi") {
4010 }
else if (tempattr ==
"theta") {
4012 }
else if (tempattr ==
"alph") {
4017 }
else if (tempattr ==
"phitwist") {
4046 x2line / 2, alpha1line, y2line / 2, x3line / 2, x4line / 2, alpha2line);
4063 bool unitless_l =
true;
4070 while (
attr !=
nullptr) {
4075 if (tempattr ==
"name") {
4077 }
else if (tempattr ==
"dx") {
4079 }
else if (tempattr ==
"dy") {
4081 }
else if (tempattr ==
"dz") {
4083 }
else if (tempattr ==
"lunit") {
4118 bool unitless_l =
true;
4123 while (
attr !=
nullptr) {
4128 if (tempattr ==
"name") {
4130 }
else if (tempattr ==
"r") {
4132 }
else if (tempattr ==
"lunit") {
4169 bool unitless_l =
true;
4180 while (
attr !=
nullptr) {
4185 if (tempattr ==
"name") {
4187 }
else if (tempattr ==
"lunit") {
4208 while (
child !=
nullptr) {
4211 if (tempattr ==
"twoDimVertex") {
4212 noverts = noverts + 1;
4213 }
else if (tempattr ==
"section") {
4214 nosects = nosects + 1;
4220 if (nosects < 2 || noverts < 3) {
4221 Fatal(
"Xtru",
"Invalid number of sections/vertices found forxtru %s",
name.Data());
4228 double *vertx =
new double[noverts];
4229 double *verty =
new double[noverts];
4231 double **section =
new double *[nosects];
4232 for (i = 0; i < nosects; i++) {
4233 section[i] =
new double[cols];
4240 while (
child !=
nullptr) {
4247 while (
attr !=
nullptr) {
4250 if (tempattr ==
"x") {
4252 xline =
Value(
x) * retlunit;
4253 vertx[vert] = xline;
4254 }
else if (tempattr ==
"y") {
4256 yline =
Value(
y) * retlunit;
4257 verty[vert] = yline;
4274 while (
attr !=
nullptr) {
4277 if (tempattr ==
"zOrder") {
4279 section[sect][0] =
Value(zorder);
4280 }
else if (tempattr ==
"zPosition") {
4282 zposline =
Value(zpos) * retlunit;
4283 section[sect][1] = zposline;
4284 }
else if (tempattr ==
"xOffset") {
4286 xoffline =
Value(xoff) * retlunit;
4287 section[sect][2] = xoffline;
4288 }
else if (tempattr ==
"yOffset") {
4290 yoffline =
Value(yoff) * retlunit;
4291 section[sect][3] = yoffline;
4292 }
else if (tempattr ==
"scalingFactor") {
4294 section[sect][4] =
Value(scale);
4309 for (
int j = 0; j < sect; j++) {
4310 xtru->
DefineSection((
int)section[j][0], section[j][1], section[j][2], section[j][3], section[j][4]);
4316 for (i = 0; i < nosects; i++) {
4317 delete[] section[i];
4335 while (
attr !=
nullptr) {
4338 if (tempattr ==
"name") {
4353 if (trans ==
nullptr)
4355 const double *tr = trans->GetTranslation();
4356 vertices[i].
Set(tr[0], tr[1], tr[2]);
4359 auto AddTriangularFacet = [&](
bool relative) {
4361 vertices[2] += vertices[0] + vertices[1];
4362 vertices[1] += vertices[0];
4364 tsl->AddFacet(vertices[0], vertices[1], vertices[2]);
4367 auto AddQuadrangularFacet = [&](
bool relative) {
4369 vertices[3] += vertices[0] + vertices[1] + vertices[2];
4370 vertices[2] += vertices[0] + vertices[1];
4371 vertices[1] += vertices[0];
4373 tsl->AddFacet(vertices[0], vertices[1], vertices[2], vertices[3]);
4378 while (
child !=
nullptr) {
4381 if (tempattr ==
"triangular") {
4383 bool relative =
false;
4385 while (
attr !=
nullptr) {
4388 if (tempattr ==
"vertex1") {
4392 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4396 else if (tempattr ==
"vertex2") {
4400 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4404 else if (tempattr ==
"vertex3") {
4408 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4412 else if (tempattr ==
"type") {
4415 relative = (
type ==
"relative") ?
true :
false;
4420 AddTriangularFacet(relative);
4423 else if (tempattr ==
"quadrangular") {
4425 bool relative =
false;
4427 while (
attr !=
nullptr) {
4430 if (tempattr ==
"vertex1") {
4434 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4438 else if (tempattr ==
"vertex2") {
4442 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4446 else if (tempattr ==
"vertex3") {
4450 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4454 else if (tempattr ==
"vertex4") {
4458 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4462 else if (tempattr ==
"type") {
4465 relative = (
type ==
"relative") ?
true :
false;
4470 AddQuadrangularFacet(relative);
4474 tsl->CloseShape(
false);
4497 while (
attr !=
nullptr) {
4500 if (tempattr ==
"name") {
4510 while (
child !=
nullptr) {
4513 if (tempattr ==
"solidref") {
4521 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
4523 }
else if (tempattr ==
"scale") {
4528 }
else if (tempattr ==
"scaleref") {
4532 Fatal(
"ScaledSolid",
"Solid's scale %s not found", reftemp.
Data());
4556 std::cout <<
"WARNING! The reflectedSolid is obsolete! Use scale transformation instead!" << std::endl;
4571 while (
attr !=
nullptr) {
4576 if (tempattr ==
"name") {
4578 }
else if (tempattr ==
"sx") {
4580 }
else if (tempattr ==
"sy") {
4582 }
else if (tempattr ==
"sz") {
4584 }
else if (tempattr ==
"rx") {
4586 }
else if (tempattr ==
"ry") {
4588 }
else if (tempattr ==
"rz") {
4590 }
else if (tempattr ==
"dx") {
4592 }
else if (tempattr ==
"dy") {
4594 }
else if (tempattr ==
"dz") {
4596 }
else if (tempattr ==
"solid") {
4614 if (atoi(sx) == -1) {
4617 if (atoi(sy) == -1) {
4620 if (atoi(sz) == -1) {
int Int_t
Signed integer 4 bytes (int)
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
Int_t gDebug
Global variable setting the debug level. Set to 0 to disable, increase it in steps of 1 to increase t...
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)
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 TGDMLRefl for it - containing refl matrix
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 files parsed during entire parsing, with their world volume name
MatrixMap fmatrices
! Map containing matrices defined in the GDML 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 volume names and the TGeoVolume 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 rotation names and the TGeoRotation 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 reflected volume names and the solid ref for it
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 reflection names and the Solid name ir references to
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 material names and the TGeoMaterial for it
SclMap fsclmap
! Map containing scale names and the TGeoScale 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 isotope names and the TGeoIsotope 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 placed volume names and the TGeoNode 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 medium names and the TGeoMedium 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 values of constants declared in the file
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 solid names and the TGeoShape for it
EleMap felemap
! Map containing element names and the TGeoElement 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.
PosMap fposmap
! Map containing position names and the TGeoTranslation for it
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 mixture names and the TGeoMixture for it
XMLNodePointer_t UsrProcess(TXMLEngine *gdml, XMLNodePointer_t node)
User data to be processed.
This class is a helper class for TGDMLParse.
const char * fNameS
! reflected solid name
TGeoMatrix * fMatrix
! matrix of reflected solid
TGeoMatrix * GetMatrix()
This accessor method returns the matrix.
const char * fSolid
! solid name being reflected
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.
Composite shapes are Boolean combinations of two or more shape components.
A cone segment is a cone having a range in phi.
The cones are defined by 5 parameters:
The cut tubes constructor has the form:
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.
An elliptical tube is defined by the two semi-axes A and B.
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)
A hyperboloid is represented as a solid limited by two planes perpendicular to the Z axis (top and bo...
Boolean node representing an intersection between two components.
an isotope defined by the atomic number, number of nucleons and atomic weight (g/mole)
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.
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)
A paraboloid is defined by the revolution surface generated by a parabola and is bounded by two plane...
A polycone is represented by a sequence of tubes/cones, glued together at defined Z planes.
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.
Polygons are defined in the same way as polycones, the difference being just that the segments betwee...
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
TGeoSphere are not just balls having internal and external radii, but sectors of a sphere having defi...
Boolean node representing a subtraction.
The torus is defined by its axial radius, its inner and outer radius.
Class describing translations.
const Double_t * GetTranslation() const override
A trapezoid with only X varying with Z.
A tube segment is a tube having a range in phi.
Boolean node representing a union between two components.
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.
A TGeoXtru shape is represented by the extrusion of an arbitrary polygon with fixed outline between s...
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.
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: .
void Set(double const &a, double const &b, double const &c)