133 for (
Int_t i = 0; i < 20; i++)
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 *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, assestr)) == 0) {
379 }
else if ((strcmp(
name, usrstr)) == 0) {
382 }
else if (((strcmp(
name,
"gdml")) != 0) && ((strcmp(
name,
"define")) != 0) && ((strcmp(
name,
"element")) != 0) &&
383 ((strcmp(
name,
"materials")) != 0) && ((strcmp(
name,
"solids")) != 0) &&
384 ((strcmp(
name,
"structure")) != 0) && ((strcmp(
name,
"zplane")) != 0) && ((strcmp(
name,
"first")) != 0) &&
385 ((strcmp(
name,
"second")) != 0) && ((strcmp(
name,
"twoDimVertex")) != 0) &&
386 ((strcmp(
name,
"firstposition")) != 0) && ((strcmp(
name,
"firstpositionref")) != 0) &&
387 ((strcmp(
name,
"firstrotation")) != 0) && ((strcmp(
name,
"firstrotationref")) != 0) &&
388 ((strcmp(
name,
"section")) != 0) && ((strcmp(
name,
"world")) != 0) && ((strcmp(
name,
"isotope")) != 0) &&
389 ((strcmp(
name,
"triangular")) != 0) && ((strcmp(
name,
"quadrangular")) != 0)) {
390 std::cout <<
"Error: Unsupported GDML Tag Used :" <<
name <<
". Please Check Geometry/Schema." << std::endl;
422 if ((strcmp(axisString,
"kXAxis")) == 0) {
424 }
else if ((strcmp(axisString,
"kYAxis")) == 0) {
426 }
else if ((strcmp(axisString,
"kZAxis")) == 0) {
428 }
else if ((strcmp(axisString,
"kRho")) == 0) {
430 }
else if ((strcmp(axisString,
"kPhi")) == 0) {
449 stripped = stripped(0,
index);
450 return stripped.
Data();
469 if (tempattr ==
"name") {
472 if (tempattr ==
"value") {
543 if (tempattr ==
"name") {
546 if (tempattr ==
"value") {
549 if (tempattr ==
"unit") {
574 if (tempattr ==
"name") {
577 if (tempattr ==
"coldim") {
580 if (tempattr ==
"values") {
587 std::stringstream valueStream(values);
588 std::vector<Double_t> valueList;
589 while (!valueStream.eof()) {
590 std::string matrixValue;
591 valueStream >> matrixValue;
593 if (matrixValue.empty())
595 valueList.push_back(
Value(matrixValue.c_str()));
600 if ( coldim == 1 && valueList.size() == 1 ) {
606 for (
size_t i = 0; i < valueList.size(); ++i)
607 matrix->
Set(i / coldim, i % coldim, valueList[i]);
631 if (tempattr ==
"name") {
634 if (tempattr ==
"model") {
637 if (tempattr ==
"finish") {
640 if (tempattr ==
"type") {
643 if (tempattr ==
"value") {
658 if (tempattr ==
"name") {
660 }
else if (tempattr ==
"ref") {
664 Error(
"OpticalSurfaceProcess",
"Reference matrix %s for optical surface %s not found", ref.
Data(),
687 if (strcmp(unit,
"mm") == 0) {
689 }
else if (strcmp(unit,
"millimeter") == 0 || strcmp(unit,
"milimeter") == 0) {
691 }
else if (strcmp(unit,
"cm") == 0) {
693 }
else if (strcmp(unit,
"centimeter") == 0) {
695 }
else if (strcmp(unit,
"m") == 0) {
697 }
else if (strcmp(unit,
"meter") == 0) {
699 }
else if (strcmp(unit,
"km") == 0) {
700 retunit =
"100000.0";
701 }
else if (strcmp(unit,
"kilometer") == 0) {
702 retunit =
"100000.0";
703 }
else if (strcmp(unit,
"rad") == 0) {
705 }
else if (strcmp(unit,
"radian") == 0) {
707 }
else if (strcmp(unit,
"deg") == 0) {
709 }
else if (strcmp(unit,
"degree") == 0) {
711 }
else if (strcmp(unit,
"pi") == 0) {
713 }
else if (strcmp(unit,
"avogadro") == 0) {
716 Fatal(
"GetScale",
"Unit <%s> not known", unit);
735 if ((unit ==
"mm") || (unit ==
"millimeter") || (unit ==
"milimeter")) {
737 }
else if ((unit ==
"cm") || (unit ==
"centimeter")) {
739 }
else if ((unit ==
"m") || (unit ==
"meter")) {
741 }
else if ((unit ==
"km") || (unit ==
"kilometer")) {
743 }
else if ((unit ==
"rad") || (unit ==
"radian")) {
745 }
else if ((unit ==
"deg") || (unit ==
"degree")) {
747 }
else if ((unit ==
"ev") || (unit ==
"electronvolt")) {
749 }
else if ((unit ==
"kev") || (unit ==
"kiloelectronvolt")) {
751 }
else if ((unit ==
"mev") || (unit ==
"megaelectronvolt")) {
753 }
else if ((unit ==
"gev") || (unit ==
"gigaelectronvolt")) {
755 }
else if (unit ==
"pi") {
757 }
else if (unit ==
"avogadro") {
760 Fatal(
"GetScaleVal",
"Unit <%s> not known", sunit);
772 double val = strtod(svalue, &end);
775 while (*end != 0 && isspace(*end))
787 std::string expanded;
788 expanded.reserve(strlen(svalue) * 2);
792 const std::locale &loc = std::locale::classic();
795 const char *
p = svalue;
798 for (; *
p != 0; ++
p) {
799 if (std::isalpha(*
p, loc) || *
p ==
'_') {
800 const char *pe =
p + 1;
803 for (; *pe != 0; ++pe) {
804 if (!isalnum(*pe, loc) && *pe !=
'_') {
830 TFormula f(
"TFormula", expanded.c_str());
834 f.SetParameter(it.first.c_str(), it.second);
838 if (std::isnan(val) || std::isinf(val)) {
839 Fatal(
"Value",
"Got bad value %lf from string '%s'", val, svalue);
855 bool unitless_l =
true;
868 if (tempattr ==
"name") {
870 }
else if (tempattr ==
"x") {
872 }
else if (tempattr ==
"y") {
874 }
else if (tempattr ==
"z") {
876 }
else if (tempattr ==
"unit") {
912 bool unitless_l =
true;
924 if (tempattr ==
"name") {
926 }
else if (tempattr ==
"x") {
928 }
else if (tempattr ==
"y") {
930 }
else if (tempattr ==
"z") {
932 }
else if (tempattr ==
"unit") {
982 if (tempattr ==
"name") {
984 }
else if (tempattr ==
"x") {
986 }
else if (tempattr ==
"y") {
988 }
else if (tempattr ==
"z") {
1030 if (tempattr ==
"name") {
1032 }
else if (tempattr ==
"z") {
1034 }
else if (tempattr ==
"n") {
1049 if (tempattr ==
"value") {
1071 }
else if (
gDebug >= 2) {
1072 Info(
"TGDMLParse",
"Re-use existing isotope: %s", iso->
GetName());
1110 if (tempattr ==
"name") {
1122 while (
child != 0) {
1128 ncompo = ncompo + 1;
1133 if (tempattr ==
"n") {
1135 }
else if (tempattr ==
"ref") {
1143 fracmap[ref.
Data()] =
n;
1150 if (ele && ele->
Z() == 0)
1154 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1165 if (hasIsotopesExtended) {
1170 if (tempattr ==
"name") {
1182 while (
child != 0) {
1188 ncompo = ncompo + 1;
1193 if (tempattr ==
"n") {
1195 }
else if (tempattr ==
"ref") {
1203 fracmap[ref.
Data()] =
n;
1210 if (ele && ele->
Z() == 0)
1214 for (
fractions f = fracmap.begin();
f != fracmap.end(); ++
f) {
1231 if (tempattr ==
"name") {
1234 }
else if (tempattr ==
"z") {
1236 }
else if (tempattr ==
"formula") {
1252 if (tempattr ==
"value") {
1268 if (ele && ele->
Z() == 0)
1273 }
else if (
gDebug >= 2) {
1274 Info(
"TGDMLParse",
"Re-use existing element: %s", ele->
GetName());
1299 TList properties, constproperties;
1306 Int_t ncompo = 0, mixflag = 2;
1325 while (
child != 0) {
1334 if (tempattr ==
"name") {
1336 }
else if (tempattr ==
"ref") {
1345 Error(
"MatProcess",
"Reference %s for material %s not found",
property->GetTitle(),
1360 if (tempattr ==
"value") {
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 != 0) {
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;
1465 if (tempattr ==
"n") {
1467 }
else if (tempattr ==
"ref") {
1475 fracmap[ref.
Data()] =
n;
1482 ncompo = ncompo + 1;
1487 if (tempattr ==
"n") {
1489 }
else if (tempattr ==
"ref") {
1497 fracmap[ref.
Data()] =
n;
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) {
1555 natoms = (
Int_t)
f->second;
1580 }
else if (mixflag == 0) {
1584 }
else if (
gDebug >= 2) {
1585 Info(
"TGDMLParse",
"Re-use existing medium: %s", med->
GetName());
1604 if (tempattr ==
"name") {
1607 if (tempattr ==
"surfaceproperty") {
1614 while (
child != 0) {
1620 if (tempattr ==
"ref") {
1630 Fatal(
"SkinSurfaceProcess",
"Skin surface %s: referenced optical surface %s not defined",
name.Data(),
1650 if (tempattr ==
"name") {
1653 if (tempattr ==
"surfaceproperty") {
1661 while (
child != 0) {
1667 if (tempattr ==
"ref") {
1676 Fatal(
"BorderSurfaceProcess",
"Border surface %s not referencing two nodes",
name.Data());
1679 Fatal(
"BorderSurfaceProcess",
"Border surface %s: referenced optical surface %s not defined",
name.Data(),
1683 if (!node1 || !node2)
1684 Fatal(
"BorderSurfaceProcess",
"Border surface %s: not found nodes %s [%s] or %s [%s]",
name.Data(),
1685 nodename[0].
Data(), node1 ?
"present" :
"missing", nodename[1].
Data(), node2 ?
"present" :
"missing");
1707 Error(
"GetPosition",
"Position %s not defined",
name);
1726 Error(
"GetRotation",
"Rotation %s not defined",
name);
1745 Error(
"GetScale",
"Scale %s not defined",
name);
1764 Error(
"GetSolid",
"Solid %s not defined",
name);
1783 Error(
"GetVolume",
"Volume %s not defined",
name);
1822 while (
child != 0) {
1832 solidname = reftemp;
1835 printf(
"Solid: %s, Not Yet Defined!\n", reftemp.
Data());
1847 printf(
"Medium: %s, Not Yet Defined!\n", gdml->
GetAttr(
child,
"ref"));
1876 while (
child != 0) {
1890 while (subchild != 0) {
1894 if (tempattr ==
"volumeref") {
1895 reftemp = gdml->
GetAttr(subchild,
"ref");
1898 }
else if (tempattr ==
"file") {
1899 const char *filevol;
1903 filevol = gdml->
GetAttr(subchild,
"volname");
1908 if (filedoc1 == 0) {
1924 if (filevol) volref = filevol;
1935 }
else if (tempattr ==
"position") {
1938 reftemp = gdml->
GetAttr(subchild,
"name");
1940 }
else if (tempattr ==
"positionref") {
1941 reftemp = gdml->
GetAttr(subchild,
"ref");
1944 Fatal(
"VolProcess",
"Physvol's position %s not found", reftemp.
Data());
1945 }
else if (tempattr ==
"rotation") {
1948 reftemp = gdml->
GetAttr(subchild,
"name");
1950 }
else if (tempattr ==
"rotationref") {
1951 reftemp = gdml->
GetAttr(subchild,
"ref");
1954 Fatal(
"VolProcess",
"Physvol's rotation %s not found", reftemp.
Data());
1955 }
else if (tempattr ==
"scale") {
1958 reftemp = gdml->
GetAttr(subchild,
"name");
1960 }
else if (tempattr ==
"scaleref") {
1961 reftemp = gdml->
GetAttr(subchild,
"ref");
1964 Fatal(
"VolProcess",
"Physvol's scale %s not found", reftemp.
Data());
1967 subchild = gdml->
GetNext(subchild);
1983 memset(scale3x3, 0, 9 *
sizeof(
Double_t));
1986 scale3x3[0] = diagonal[0];
1987 scale3x3[4] = diagonal[1];
1988 scale3x3[8] = diagonal[2];
2025 bool unitless_l =
true;
2036 if (tempattr ==
"axis") {
2038 }
else if (tempattr ==
"number") {
2040 }
else if (tempattr ==
"width") {
2042 }
else if (tempattr ==
"offset") {
2044 }
else if (tempattr ==
"unit") {
2054 while (subchild != 0) {
2058 if (tempattr ==
"volumeref") {
2059 reftemp = gdml->
GetAttr(subchild,
"ref");
2060 local_name = reftemp;
2064 divVolref = reftemp;
2067 subchild = gdml->
GetNext(subchild);
2092 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2111 bool unitless_l =
true;
2124 if (tempattr ==
"number") {
2132 while (subchild != 0) {
2136 if (tempattr ==
"volumeref") {
2137 reftemp = gdml->
GetAttr(subchild,
"ref");
2138 local_name = reftemp;
2142 divVolref = reftemp;
2145 if (tempattr ==
"replicate_along_axis") {
2146 subsubchild = gdml->
GetChild(subchild);
2148 while (subsubchild != 0) {
2149 if ((strcmp(gdml->
GetNodeName(subsubchild),
"width")) == 0) {
2154 if (tempattr ==
"value") {
2156 }
else if (tempattr ==
"unit") {
2163 }
else if ((strcmp(gdml->
GetNodeName(subsubchild),
"offset")) == 0) {
2168 if (tempattr ==
"value") {
2170 }
else if (tempattr ==
"unit") {
2176 }
else if ((strcmp(gdml->
GetNodeName(subsubchild),
"direction")) == 0) {
2181 if (tempattr ==
"x") {
2183 }
else if (tempattr ==
"y") {
2185 }
else if (tempattr ==
"z") {
2187 }
else if (tempattr ==
"rho") {
2189 }
else if (tempattr ==
"phi") {
2197 subsubchild = gdml->
GetNext(subsubchild);
2201 subchild = gdml->
GetNext(subchild);
2209 Double_t widthline = wvalue * retwunit;
2210 Double_t offsetline = ovalue * retounit;
2229 Fatal(
"VolProcess",
"Cannot divide volume %s", vol->
GetName());
2239 TString auxType, auxUnit, auxValue;
2242 auxmap =
new TMap();
2307 while (
child != 0) {
2311 if (tempattr ==
"first") {
2315 Fatal(
"BooSolid",
"First solid %s not found", reftemp.
Data());
2316 }
else if (tempattr ==
"second") {
2320 Fatal(
"BooSolid",
"Second solid %s not found", reftemp.
Data());
2321 }
else if (tempattr ==
"position") {
2326 }
else if (tempattr ==
"positionref") {
2330 Fatal(
"BooSolid",
"Second position %s not found", reftemp.
Data());
2331 }
else if (tempattr ==
"rotation") {
2336 }
else if (tempattr ==
"rotationref") {
2340 Fatal(
"BooSolid",
"Second rotation %s not found", reftemp.
Data());
2341 }
else if (tempattr ==
"firstposition") {
2346 }
else if (tempattr ==
"firstpositionref") {
2350 Fatal(
"BooSolid",
"First position %s not found", reftemp.
Data());
2351 }
else if (tempattr ==
"firstrotation") {
2356 }
else if (tempattr ==
"firstrotationref") {
2360 Fatal(
"BooSolid",
"First rotation %s not found", reftemp.
Data());
2393 TString nodename, auxtype, auxtypec, auxvalue, auxvaluec, auxunit, auxunitc;
2399 if (nodename ==
"auxiliary") {
2402 if (auxtype ==
"Region") {
2409 auxtypec = gdml->
GetAttr(subchild,
"auxtype");
2410 auxvaluec = gdml->
GetAttr(subchild,
"auxvalue");
2411 auxunitc = gdml->
GetAttr(subchild,
"auxunit");
2412 if (auxtypec ==
"volume") {
2422 subchild = gdml->
GetNext(subchild);
2467 while (
child != 0) {
2477 while (subchild != 0) {
2481 if (tempattr ==
"volumeref") {
2482 reftemp = gdml->
GetAttr(subchild,
"ref");
2484 }
else if (tempattr ==
"positionref") {
2485 reftemp = gdml->
GetAttr(subchild,
"ref");
2488 Fatal(
"AssProcess",
"Position %s not found", reftemp.
Data());
2489 }
else if (tempattr ==
"position") {
2492 reftemp = gdml->
GetAttr(subchild,
"name");
2494 }
else if (tempattr ==
"rotationref") {
2495 reftemp = gdml->
GetAttr(subchild,
"ref");
2498 Fatal(
"AssProcess",
"Rotation %s not found", reftemp.
Data());
2499 }
else if (tempattr ==
"rotation") {
2502 reftemp = gdml->
GetAttr(subchild,
"name");
2506 subchild = gdml->
GetNext(subchild);
2537 while (
child != 0) {
2561 bool unitless_l =
true;
2573 if (tempattr ==
"name") {
2575 }
else if (tempattr ==
"x") {
2577 }
else if (tempattr ==
"y") {
2579 }
else if (tempattr ==
"z") {
2581 }
else if (tempattr ==
"lunit") {
2619 bool unitless_l =
true;
2634 if (tempattr ==
"name") {
2636 }
else if (tempattr ==
"ax") {
2638 }
else if (tempattr ==
"by") {
2640 }
else if (tempattr ==
"cz") {
2642 }
else if (tempattr ==
"zcut1") {
2644 }
else if (tempattr ==
"zcut2") {
2646 }
else if (tempattr ==
"lunit") {
2672 z1 =
Value(zcut1) * retunit;
2677 z2 =
Value(zcut2) * retunit;
2685 origin[2] = 0.5 * (z1 + z2);
2707 bool unitless_l =
true;
2720 if (tempattr ==
"name") {
2722 }
else if (tempattr ==
"dx") {
2724 }
else if (tempattr ==
"dy") {
2726 }
else if (tempattr ==
"zmax") {
2728 }
else if (tempattr ==
"zcut") {
2730 }
else if (tempattr ==
"lunit") {
2754 Info(
"ElCone",
"ERROR! Parameter zcut = %.12g is not set properly, elcone will not be imported.", z1);
2786 bool unitless_l =
true;
2798 if (tempattr ==
"name") {
2800 }
else if (tempattr ==
"rlo") {
2802 }
else if (tempattr ==
"rhi") {
2804 }
else if (tempattr ==
"dz") {
2806 }
else if (tempattr ==
"lunit") {
2842 bool unitless_l =
true;
2868 if (tempattr ==
"name") {
2870 }
else if (tempattr ==
"v1x") {
2872 }
else if (tempattr ==
"v1y") {
2874 }
else if (tempattr ==
"v2x") {
2876 }
else if (tempattr ==
"v2y") {
2878 }
else if (tempattr ==
"v3x") {
2880 }
else if (tempattr ==
"v3y") {
2882 }
else if (tempattr ==
"v4x") {
2884 }
else if (tempattr ==
"v4y") {
2886 }
else if (tempattr ==
"v5x") {
2888 }
else if (tempattr ==
"v5y") {
2890 }
else if (tempattr ==
"v6x") {
2892 }
else if (tempattr ==
"v6y") {
2894 }
else if (tempattr ==
"v7x") {
2896 }
else if (tempattr ==
"v7y") {
2898 }
else if (tempattr ==
"v8x") {
2900 }
else if (tempattr ==
"v8y") {
2902 }
else if (tempattr ==
"dz") {
2904 }
else if (tempattr ==
"lunit") {
2964 bool unitless_l =
true;
2965 bool unitless_a =
true;
2979 if (tempattr ==
"name") {
2981 }
else if (tempattr ==
"rmin") {
2983 }
else if (tempattr ==
"rmax") {
2985 }
else if (tempattr ==
"z") {
2987 }
else if (tempattr ==
"lunit") {
2990 }
else if (tempattr ==
"aunit") {
2993 }
else if (tempattr ==
"startphi") {
2995 }
else if (tempattr ==
"deltaphi") {
3015 Double_t endphideg = startphideg + deltaphideg;
3018 if (deltaphideg < 360.)
3038 bool unitless_l =
true;
3039 bool unitless_a =
true;
3059 if (tempattr ==
"name") {
3061 }
else if (tempattr ==
"rmin") {
3063 }
else if (tempattr ==
"rmax") {
3065 }
else if (tempattr ==
"z") {
3067 }
else if (tempattr ==
"lunit") {
3070 }
else if (tempattr ==
"aunit") {
3073 }
else if (tempattr ==
"startphi") {
3075 }
else if (tempattr ==
"deltaphi") {
3077 }
else if (tempattr ==
"lowx") {
3079 }
else if (tempattr ==
"lowy") {
3081 }
else if (tempattr ==
"lowz") {
3083 }
else if (tempattr ==
"highx") {
3085 }
else if (tempattr ==
"highy") {
3087 }
else if (tempattr ==
"highz") {
3106 Double_t deltaphiline =
Value(deltaphi) * retaunit + startphiline;
3115 lowXline, lowYline, lowZline, highXline, highYline, highZline);
3133 bool unitless_l =
true;
3134 bool unitless_a =
true;
3150 if (tempattr ==
"name") {
3152 }
else if (tempattr ==
"rmin1") {
3154 }
else if (tempattr ==
"rmax1") {
3156 }
else if (tempattr ==
"rmin2") {
3158 }
else if (tempattr ==
"rmax2") {
3160 }
else if (tempattr ==
"z") {
3162 }
else if (tempattr ==
"lunit") {
3165 }
else if (tempattr ==
"aunit") {
3168 }
else if (tempattr ==
"startphi") {
3170 }
else if (tempattr ==
"deltaphi") {
3216 bool unitless_l =
true;
3217 bool unitless_a =
true;
3237 if (tempattr ==
"name") {
3239 }
else if (tempattr ==
"x1") {
3241 }
else if (tempattr ==
"x2") {
3243 }
else if (tempattr ==
"x3") {
3245 }
else if (tempattr ==
"x4") {
3247 }
else if (tempattr ==
"y1") {
3249 }
else if (tempattr ==
"y2") {
3251 }
else if (tempattr ==
"z") {
3253 }
else if (tempattr ==
"lunit") {
3256 }
else if (tempattr ==
"aunit") {
3259 }
else if (tempattr ==
"phi") {
3261 }
else if (tempattr ==
"theta") {
3263 }
else if (tempattr ==
"alpha1") {
3265 }
else if (tempattr ==
"alpha2") {
3293 alpha1line, y2line / 2, x3line / 2, x4line / 2, alpha2line);
3310 bool unitless_l =
true;
3324 if (tempattr ==
"name") {
3326 }
else if (tempattr ==
"x1") {
3328 }
else if (tempattr ==
"x2") {
3330 }
else if (tempattr ==
"y1") {
3332 }
else if (tempattr ==
"y2") {
3334 }
else if (tempattr ==
"z") {
3336 }
else if (tempattr ==
"lunit") {
3376 bool unitless_l =
true;
3377 bool unitless_a =
true;
3391 if (tempattr ==
"name") {
3393 }
else if (tempattr ==
"lunit") {
3396 }
else if (tempattr ==
"aunit") {
3399 }
else if (tempattr ==
"startphi") {
3401 }
else if (tempattr ==
"deltaphi") {
3420 while (
child != 0) {
3421 numplanes = numplanes + 1;
3424 if (numplanes < 2) {
3425 Fatal(
"Polycone",
"Found less than 2 planes for polycone %s",
name.Data());
3432 double **table =
new double *[numplanes];
3433 for (i = 0; i < numplanes; i++) {
3434 table[i] =
new double[cols];
3440 while (
child != 0) {
3453 if (tempattr ==
"rmin") {
3455 rminline =
Value(rmin) * retlunit;
3456 table[planeno][0] = rminline;
3457 }
else if (tempattr ==
"rmax") {
3459 rmaxline =
Value(rmax) * retlunit;
3460 table[planeno][1] = rmaxline;
3461 }
else if (tempattr ==
"z") {
3463 zline =
Value(z) * retlunit;
3464 table[planeno][2] = zline;
3469 planeno = planeno + 1;
3479 for (
int j = 0; j < numplanes; j++) {
3480 poly->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3485 for (i = 0; i < numplanes; i++) {
3505 bool unitless_l =
true;
3506 bool unitless_a =
true;
3521 if (tempattr ==
"name") {
3523 }
else if (tempattr ==
"lunit") {
3526 }
else if (tempattr ==
"aunit") {
3529 }
else if (tempattr ==
"startphi") {
3531 }
else if (tempattr ==
"deltaphi") {
3533 }
else if (tempattr ==
"numsides") {
3553 while (
child != 0) {
3554 numplanes = numplanes + 1;
3557 if (numplanes < 2) {
3558 Fatal(
"Polyhedra",
"Found less than 2 planes for polyhedra %s",
name.Data());
3565 double **table =
new double *[numplanes];
3566 for (i = 0; i < numplanes; i++) {
3567 table[i] =
new double[cols];
3573 while (
child != 0) {
3585 if (tempattr ==
"rmin") {
3587 rminline =
Value(rmin) * retlunit;
3588 table[planeno][0] = rminline;
3589 }
else if (tempattr ==
"rmax") {
3591 rmaxline =
Value(rmax) * retlunit;
3592 table[planeno][1] = rmaxline;
3593 }
else if (tempattr ==
"z") {
3595 zline =
Value(z) * retlunit;
3596 table[planeno][2] = zline;
3602 planeno = planeno + 1;
3613 for (
int j = 0; j < numplanes; j++) {
3614 polyg->
DefineSection(zno, table[j][2], table[j][0], table[j][1]);
3619 for (i = 0; i < numplanes; i++) {
3638 bool unitless_l =
true;
3639 bool unitless_a =
true;
3653 if (tempattr ==
"name") {
3655 }
else if (tempattr ==
"rmin") {
3657 }
else if (tempattr ==
"rmax") {
3659 }
else if (tempattr ==
"lunit") {
3662 }
else if (tempattr ==
"aunit") {
3665 }
else if (tempattr ==
"startphi") {
3667 }
else if (tempattr ==
"deltaphi") {
3669 }
else if (tempattr ==
"starttheta") {
3671 }
else if (tempattr ==
"deltatheta") {
3689 Double_t deltaphiline = startphiline +
Value(deltaphi) * retaunit;
3691 Double_t deltathetaline = startthetaline +
Value(deltatheta) * retaunit;
3694 new TGeoSphere(
NameShort(
name), rminline, rmaxline, startthetaline, deltathetaline, startphiline, deltaphiline);
3712 bool unitless_l =
true;
3713 bool unitless_a =
true;
3727 if (tempattr ==
"name") {
3729 }
else if (tempattr ==
"rmin") {
3731 }
else if (tempattr ==
"rmax") {
3733 }
else if (tempattr ==
"rtor") {
3735 }
else if (tempattr ==
"lunit") {
3738 }
else if (tempattr ==
"aunit") {
3741 }
else if (tempattr ==
"startphi") {
3743 }
else if (tempattr ==
"deltaphi") {
3782 bool unitless_l =
true;
3783 bool unitless_a =
true;
3796 if (tempattr ==
"name") {
3798 }
else if (tempattr ==
"rmin") {
3800 }
else if (tempattr ==
"rmax") {
3802 }
else if (tempattr ==
"z") {
3804 }
else if (tempattr ==
"lunit") {
3807 }
else if (tempattr ==
"aunit") {
3810 }
else if (tempattr ==
"inst") {
3812 }
else if (tempattr ==
"outst") {
3851 bool unitless_l =
true;
3852 bool unitless_a =
true;
3867 if (tempattr ==
"name") {
3869 }
else if (tempattr ==
"x") {
3871 }
else if (tempattr ==
"y") {
3873 }
else if (tempattr ==
"z") {
3875 }
else if (tempattr ==
"lunit") {
3878 }
else if (tempattr ==
"aunit") {
3881 }
else if (tempattr ==
"phi") {
3883 }
else if (tempattr ==
"theta") {
3885 }
else if (tempattr ==
"alpha") {
3925 bool unitless_l =
true;
3926 bool unitless_a =
true;
3947 if (tempattr ==
"name") {
3949 }
else if (tempattr ==
"x1") {
3951 }
else if (tempattr ==
"x2") {
3953 }
else if (tempattr ==
"x3") {
3955 }
else if (tempattr ==
"x4") {
3957 }
else if (tempattr ==
"y1") {
3959 }
else if (tempattr ==
"y2") {
3961 }
else if (tempattr ==
"z") {
3963 }
else if (tempattr ==
"lunit") {
3966 }
else if (tempattr ==
"aunit") {
3969 }
else if (tempattr ==
"phi") {
3971 }
else if (tempattr ==
"theta") {
3973 }
else if (tempattr ==
"alph") {
3978 }
else if (tempattr ==
"phitwist") {
4007 x2line / 2, alpha1line, y2line / 2, x3line / 2, x4line / 2, alpha2line);
4024 bool unitless_l =
true;
4036 if (tempattr ==
"name") {
4038 }
else if (tempattr ==
"dx") {
4040 }
else if (tempattr ==
"dy") {
4042 }
else if (tempattr ==
"dz") {
4044 }
else if (tempattr ==
"lunit") {
4079 bool unitless_l =
true;
4089 if (tempattr ==
"name") {
4091 }
else if (tempattr ==
"r") {
4093 }
else if (tempattr ==
"lunit") {
4130 bool unitless_l =
true;
4146 if (tempattr ==
"name") {
4148 }
else if (tempattr ==
"lunit") {
4169 while (
child != 0) {
4172 if (tempattr ==
"twoDimVertex") {
4173 noverts = noverts + 1;
4174 }
else if (tempattr ==
"section") {
4175 nosects = nosects + 1;
4181 if (nosects < 2 || noverts < 3) {
4182 Fatal(
"Xtru",
"Invalid number of sections/vertices found forxtru %s",
name.Data());
4189 double *vertx =
new double[noverts];
4190 double *verty =
new double[noverts];
4192 double **section =
new double *[nosects];
4193 for (i = 0; i < nosects; i++) {
4194 section[i] =
new double[cols];
4201 while (
child != 0) {
4211 if (tempattr ==
"x") {
4213 xline =
Value(
x) * retlunit;
4214 vertx[vert] = xline;
4215 }
else if (tempattr ==
"y") {
4217 yline =
Value(
y) * retlunit;
4218 verty[vert] = yline;
4238 if (tempattr ==
"zOrder") {
4240 section[sect][0] =
Value(zorder);
4241 }
else if (tempattr ==
"zPosition") {
4243 zposline =
Value(zpos) * retlunit;
4244 section[sect][1] = zposline;
4245 }
else if (tempattr ==
"xOffset") {
4247 xoffline =
Value(xoff) * retlunit;
4248 section[sect][2] = xoffline;
4249 }
else if (tempattr ==
"yOffset") {
4251 yoffline =
Value(yoff) * retlunit;
4252 section[sect][3] = yoffline;
4253 }
else if (tempattr ==
"scalingFactor") {
4255 section[sect][4] =
Value(scale);
4270 for (
int j = 0; j < sect; j++) {
4271 xtru->
DefineSection((
int)section[j][0], section[j][1], section[j][2], section[j][3], section[j][4]);
4277 for (i = 0; i < nosects; i++) {
4278 delete[] section[i];
4296 while (
attr !=
nullptr) {
4299 if (tempattr ==
"name") {
4314 if (trans ==
nullptr)
4316 const double *tr = trans->GetTranslation();
4317 vertices[i].
Set(tr[0], tr[1], tr[2]);
4320 auto AddTriangularFacet = [&](
bool relative) {
4322 vertices[2] += vertices[0] + vertices[1];
4323 vertices[1] += vertices[0];
4325 tsl->AddFacet(vertices[0], vertices[1], vertices[2]);
4328 auto AddQuadrangularFacet = [&](
bool relative) {
4330 vertices[3] += vertices[0] + vertices[1] + vertices[2];
4331 vertices[2] += vertices[0] + vertices[1];
4332 vertices[1] += vertices[0];
4334 tsl->AddFacet(vertices[0], vertices[1], vertices[2], vertices[3]);
4339 while (
child !=
nullptr) {
4342 if (tempattr ==
"triangular") {
4344 bool relative =
false;
4346 while (
attr !=
nullptr) {
4349 if (tempattr ==
"vertex1") {
4353 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4357 else if (tempattr ==
"vertex2") {
4361 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4365 else if (tempattr ==
"vertex3") {
4369 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4373 else if (tempattr ==
"type") {
4376 relative = (
type ==
"relative") ?
true :
false;
4381 AddTriangularFacet(relative);
4384 else if (tempattr ==
"quadrangular") {
4386 bool relative =
false;
4388 while (
attr !=
nullptr) {
4391 if (tempattr ==
"vertex1") {
4395 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4399 else if (tempattr ==
"vertex2") {
4403 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4407 else if (tempattr ==
"vertex3") {
4411 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4415 else if (tempattr ==
"vertex4") {
4419 Fatal(
"Tessellated",
"Vertex %s not defined", vname.
Data());
4423 else if (tempattr ==
"type") {
4426 relative = (
type ==
"relative") ?
true :
false;
4431 AddQuadrangularFacet(relative);
4435 tsl->CloseShape(
false);
4454 std::cout <<
"WARNING! The reflectedSolid is obsolete! Use scale transformation instead!" << std::endl;
4474 if (tempattr ==
"name") {
4476 }
else if (tempattr ==
"sx") {
4478 }
else if (tempattr ==
"sy") {
4480 }
else if (tempattr ==
"sz") {
4482 }
else if (tempattr ==
"rx") {
4484 }
else if (tempattr ==
"ry") {
4486 }
else if (tempattr ==
"rz") {
4488 }
else if (tempattr ==
"dx") {
4490 }
else if (tempattr ==
"dy") {
4492 }
else if (tempattr ==
"dz") {
4494 }
else if (tempattr ==
"solid") {
4512 if (atoi(sx) == -1) {
4515 if (atoi(sy) == -1) {
4518 if (atoi(sz) == -1) {
static const double x4[22]
static const double x3[11]
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.
MixMap fmixmap
Map containing medium names and the TGeoMedium for it.
XMLNodePointer_t UsrProcess(TXMLEngine *gdml, XMLNodePointer_t node)
User data to be processed.
This class is a helper class for TGDMLParse.
TGeoMatrix * fMatrix
solid name being reflected
TGeoMatrix * GetMatrix()
This accessor method returns the matrix.
const char * fSolid
reflected solid name
An arbitrary trapezoid with less than 8 vertices standing on two parallel planes perpendicular to Z a...
virtual void SetVertex(Int_t vnum, Double_t x, Double_t y)
Set values for a given vertex.
Base class for Boolean operations between two shapes.
Class describing rotation + translation.
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...
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)
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.
virtual void RotateY(Double_t angle)
Rotate about Y axis of the master frame with angle expressed in degrees.
virtual void ReflectX(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to YZ.
virtual void ReflectZ(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to XY.
virtual const Double_t * GetRotationMatrix() const
void SetMatrix(const Double_t *rot)
virtual void ReflectY(Bool_t leftside, Bool_t rotonly=kFALSE)
Multiply by a reflection respect to ZX.
virtual void RotateX(Double_t angle)
Rotate about X axis of the master frame with angle expressed in degrees.
TGeoHMatrix Inverse() const
Return a temporary inverse of this.
virtual void RotateZ(Double_t angle)
Rotate about Z axis of the master frame with angle expressed in degrees.
Class describing scale transformations.
virtual const Double_t * GetScale() const
A shape scaled by a TGeoScale transformation.
Base abstract class for all shapes.
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
TGeoSphere are not just balls having internal and external radii, but sectors of a sphere having defi...
The torus is defined by its axial radius, its inner and outer radius.
Class describing translations.
virtual const Double_t * GetTranslation() const
A trapezoid with only X varying with Z.
A tube segment is a tube having a range in phi.
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a component to the assembly.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
void SetUserExtension(TGeoExtension *ext)
Connect user-defined extension to the volume.
TGeoMedium * GetMedium() const
void ReplayCreation(const TGeoVolume *other)
Recreate the content of the other volume without pointer copying.
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.
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)