55 if (is_raytracing != raytracing) {
56 gGeoManager->GetTopVolume()->SetVisRaytrace(raytracing);
63void AddMemberInfo(
TPaveText *pave,
const char *datamember,
Double_t value,
const char *comment)
66 while (
line.Length() < 10)
71 text->SetTextAlign(12);
75void AddMemberInfo(
TPaveText *pave,
const char *datamember,
Int_t value,
const char *comment)
78 while (
line.Length() < 10)
83 text->SetTextAlign(12);
90 if (!pave || !pf || !iaxis)
96 text->SetTextColor(3);
97 text->SetTextAlign(12);
98 AddMemberInfo(pave,
"fNdiv", finder->
GetNdiv(),
"number of divisions");
99 AddMemberInfo(pave,
"fStart", finder->
GetStart(),
"start divisioning position");
100 AddMemberInfo(pave,
"fStep", finder->
GetStep(),
"division step");
104void AddExecInfo(
TPaveText *pave,
const char *
name =
nullptr,
const char *axisinfo =
nullptr)
106 if (
name && axisinfo) {
108 text->SetTextColor(4);
110 pave->
AddText(
"----- NDIV must be a positive integer");
111 pave->
AddText(
"----- START must be a valid axis offset within shape range on divided axis");
112 pave->
AddText(
"----- STEP is the division step. START+NDIV*STEP must be in range also");
113 pave->
AddText(
"----- If START and STEP are omitted, all range of the axis will be divided");
119 text->SetTextColor(4);
143 c->Print(fname.
Data());
150 return (1 +
Int_t(color));
156 raytracing = !raytracing;
159 bool drawn =
gPad->GetListOfPrimitives()->FindObject(top);
161 top->SetVisRaytrace(raytracing);
171 auto c = (
TCanvas *)
gROOT->GetListOfCanvases()->FindObject(
"geom_help");
177 c =
new TCanvas(
"geom_help",
"Help to run demos", 200, 10, 700, 600);
181 welcome->
AddText(
"Welcome to the new geometry package");
190 hdemo->
AddText(
"- Demo for building TGeo basic shapes and simple geometry. Shape parameters are");
191 hdemo->
AddText(
" displayed in the right pad");
192 hdemo->
AddText(
"- Click left mouse button to execute one demo");
193 hdemo->
AddText(
"- While pointing the mouse to the pad containing the geometry, do:");
194 hdemo->
AddText(
"- .... click-and-move to rotate");
195 hdemo->
AddText(
"- .... press j/k to zoom/unzoom");
196 hdemo->
AddText(
"- .... press l/h/u/i to move the view center around");
197 hdemo->
AddText(
"- Click Ray-trace ON/OFF to toggle ray-tracing");
198 hdemo->
AddText(
"- Use <View>/<View With>/<OpenGL> for an external 3D view");
199 hdemo->
AddText(
"- .... use the OpenGL viewer controls to rotate/zoom/move the view");
200 hdemo->
AddText(
"- Execute box(1,8) to divide a box in 8 equal slices along X");
201 hdemo->
AddText(
"- Most shapes can be divided on X,Y,Z,Rxy or Phi :");
202 hdemo->
AddText(
"- .... root[0] <shape>(IAXIS, NDIV, START, STEP);");
203 hdemo->
AddText(
" .... IAXIS = 1,2,3 meaning (X,Y,Z) or (Rxy, Phi, Z)");
204 hdemo->
AddText(
" .... NDIV = number of slices");
205 hdemo->
AddText(
" .... START = start slicing position");
206 hdemo->
AddText(
" .... STEP = division step");
207 hdemo->
AddText(
"- Click Comments ON/OFF to toggle comments");
208 hdemo->
AddText(
"- Click Ideal/Align geometry to see how alignment works");
247 if (
gROOT->IsInterrupted())
256 view =
gPad->GetView();
278TCanvas *create_canvas(
const char *title)
280 auto c = (
TCanvas *)
gROOT->GetListOfCanvases()->FindObject(
"geom_draw");
286 c =
new TCanvas(
"geom_draw", title, 700, 1000);
289 c->Divide(1, 2, 0, 0);
290 c->GetPad(2)->SetPad(0, 0, 1, 0.4);
291 c->GetPad(1)->SetPad(0, 0.4, 1, 1);
301 auto c = create_canvas(
"A simple box");
314 if ((iaxis > 0) && (iaxis < 4)) {
333 text->SetTextColor(2);
334 AddMemberInfo(
pt,
"fDX",
box->GetDX(),
"half length in X");
335 AddMemberInfo(
pt,
"fDY",
box->GetDY(),
"half length in Y");
336 AddMemberInfo(
pt,
"fDZ",
box->GetDZ(),
"half length in Z");
337 AddMemberInfo(
pt,
"fOrigin[0]", (
box->GetOrigin())[0],
"box origin on X");
338 AddMemberInfo(
pt,
"fOrigin[1]", (
box->GetOrigin())[1],
"box origin on Y");
339 AddMemberInfo(
pt,
"fOrigin[2]", (
box->GetOrigin())[2],
"box origin on Z");
341 AddExecInfo(
pt,
"box",
"1, 2 or 3 (X, Y, Z)");
350 auto c = create_canvas(
"A parallelepiped");
363 if ((iaxis > 0) && (iaxis < 4)) {
369 printf(
"Wrong division axis %d. Allowed range is 1-3.\n", iaxis);
384 TText *
text =
pt->AddText(
"TGeoPara - parallelepiped class");
385 text->SetTextColor(2);
386 AddMemberInfo(
pt,
"fX", para->
GetX(),
"half length in X");
387 AddMemberInfo(
pt,
"fY", para->
GetY(),
"half length in Y");
388 AddMemberInfo(
pt,
"fZ", para->
GetZ(),
"half length in Z");
389 AddMemberInfo(
pt,
"fAlpha", para->
GetAlpha(),
"angle about Y of the Z bases");
390 AddMemberInfo(
pt,
"fTheta", para->
GetTheta(),
"inclination of para axis about Z");
391 AddMemberInfo(
pt,
"fPhi", para->
GetPhi(),
"phi angle of para axis");
393 AddExecInfo(
pt,
"para",
"1, 2 or 3 (X, Y, Z)");
402 auto c = create_canvas(
"A tube");
415 if ((iaxis > 0) && (iaxis < 4)) {
421 printf(
"Wrong division axis %d. Allowed range is 1-3.\n", iaxis);
436 TText *
text =
pt->AddText(
"TGeoTube - tube class");
437 text->SetTextColor(2);
438 AddMemberInfo(
pt,
"fRmin", tube->
GetRmin(),
"minimum radius");
439 AddMemberInfo(
pt,
"fRmax", tube->
GetRmax(),
"maximum radius");
440 AddMemberInfo(
pt,
"fDZ", tube->
GetDZ(),
"half length in Z");
442 AddExecInfo(
pt,
"tube",
"1, 2 or 3 (Rxy, Phi, Z)");
451 auto c = create_canvas(
"A tube segment");
462 if ((iaxis > 0) && (iaxis < 4)) {
468 printf(
"Wrong division axis %d. Allowed range is 1-3.\n", iaxis);
486 TText *
text =
pt->AddText(
"TGeoTubeSeg - tube segment class");
487 text->SetTextColor(2);
488 AddMemberInfo(
pt,
"fRmin", tubeseg->
GetRmin(),
"minimum radius");
489 AddMemberInfo(
pt,
"fRmax", tubeseg->
GetRmax(),
"maximum radius");
490 AddMemberInfo(
pt,
"fDZ", tubeseg->
GetDZ(),
"half length in Z");
491 AddMemberInfo(
pt,
"fPhi1", tubeseg->
GetPhi1(),
"first phi limit");
492 AddMemberInfo(
pt,
"fPhi2", tubeseg->
GetPhi2(),
"second phi limit");
494 AddExecInfo(
pt,
"tubeseg",
"1, 2 or 3 (Rxy, Phi, Z)");
503 auto c = create_canvas(
"A cut tube segment");
525 gGeoManager->MakeCtub(
"CTUB", med, 20, 30, 40, -30, 250, nlow[0], nlow[1], nlow[2], nhi[0], nhi[1], nhi[2]);
527 if (iaxis == 1 || iaxis == 2) {
533 printf(
"Wrong division axis %d. Allowed range is 1-2.\n", iaxis);
551 TText *
text =
pt->AddText(
"TGeoTubeSeg - tube segment class");
552 text->SetTextColor(2);
553 AddMemberInfo(
pt,
"fRmin", tubeseg->
GetRmin(),
"minimum radius");
554 AddMemberInfo(
pt,
"fRmax", tubeseg->
GetRmax(),
"maximum radius");
555 AddMemberInfo(
pt,
"fDZ", tubeseg->
GetDZ(),
"half length in Z");
556 AddMemberInfo(
pt,
"fPhi1", tubeseg->
GetPhi1(),
"first phi limit");
557 AddMemberInfo(
pt,
"fPhi2", tubeseg->
GetPhi2(),
"second phi limit");
559 AddExecInfo(
pt,
"ctub",
"1 or 2");
568 auto c = create_canvas(
"A cone");
580 if (iaxis == 2 || iaxis == 3) {
586 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
602 TText *
text =
pt->AddText(
"TGeoCone - cone class");
603 text->SetTextColor(2);
604 AddMemberInfo(
pt,
"fDZ", cone->
GetDZ(),
"half length in Z");
605 AddMemberInfo(
pt,
"fRmin1", cone->
GetRmin1(),
"inner radius at -dz");
606 AddMemberInfo(
pt,
"fRmax1", cone->
GetRmax1(),
"outer radius at -dz");
607 AddMemberInfo(
pt,
"fRmin2", cone->
GetRmin2(),
"inner radius at +dz");
608 AddMemberInfo(
pt,
"fRmax2", cone->
GetRmax2(),
"outer radius at +dz");
610 AddExecInfo(
pt,
"cone",
"2 or 3 (Phi, Z)");
619 auto c = create_canvas(
"A cone segment");
632 if (iaxis >= 2 && iaxis <= 3) {
638 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
653 TText *
text =
pt->AddText(
"TGeoConeSeg - coneseg class");
654 text->SetTextColor(2);
655 AddMemberInfo(
pt,
"fDZ", coneseg->
GetDZ(),
"half length in Z");
656 AddMemberInfo(
pt,
"fRmin1", coneseg->
GetRmin1(),
"inner radius at -dz");
657 AddMemberInfo(
pt,
"fRmax1", coneseg->
GetRmax1(),
"outer radius at -dz");
658 AddMemberInfo(
pt,
"fRmin2", coneseg->
GetRmin1(),
"inner radius at +dz");
659 AddMemberInfo(
pt,
"fRmax2", coneseg->
GetRmax1(),
"outer radius at +dz");
660 AddMemberInfo(
pt,
"fPhi1", coneseg->
GetPhi1(),
"first phi limit");
661 AddMemberInfo(
pt,
"fPhi2", coneseg->
GetPhi2(),
"second phi limit");
663 AddExecInfo(
pt,
"coneseg",
"2 or 3 (Phi, Z)");
672 auto c = create_canvas(
"An Elliptical tube");
685 if (iaxis >= 2 && iaxis <= 3) {
691 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
706 TText *
text =
pt->AddText(
"TGeoEltu - eltu class");
707 text->SetTextColor(2);
708 AddMemberInfo(
pt,
"fA", eltu->
GetA(),
"semi-axis along x");
709 AddMemberInfo(
pt,
"fB", eltu->
GetB(),
"semi-axis along y");
710 AddMemberInfo(
pt,
"fDZ", eltu->
GetDZ(),
"half length in Z");
712 AddExecInfo(
pt,
"eltu",
"2 or 3 (Phi, Z)");
721 auto c = create_canvas(
"A spherical sector");
746 TText *
text =
pt->AddText(
"TGeoSphere- sphere class");
747 text->SetTextColor(2);
748 AddMemberInfo(
pt,
"fRmin", sphere->
GetRmin(),
"inner radius");
749 AddMemberInfo(
pt,
"fRmax", sphere->
GetRmax(),
"outer radius");
750 AddMemberInfo(
pt,
"fTheta1", sphere->
GetTheta1(),
"lower theta limit");
751 AddMemberInfo(
pt,
"fTheta2", sphere->
GetTheta2(),
"higher theta limit");
752 AddMemberInfo(
pt,
"fPhi1", sphere->
GetPhi1(),
"lower phi limit");
753 AddMemberInfo(
pt,
"fPhi2", sphere->
GetPhi2(),
"higher phi limit");
754 AddExecInfo(
pt,
"sphere");
763 auto c = create_canvas(
"A toroidal segment");
787 TText *
text =
pt->AddText(
"TGeoTorus - torus class");
788 text->SetTextColor(2);
789 AddMemberInfo(
pt,
"fR", tor->
GetR(),
"radius of the ring");
790 AddMemberInfo(
pt,
"fRmin", tor->
GetRmin(),
"minimum radius");
791 AddMemberInfo(
pt,
"fRmax", tor->
GetRmax(),
"maximum radius");
792 AddMemberInfo(
pt,
"fPhi1", tor->
GetPhi1(),
"starting phi angle");
793 AddMemberInfo(
pt,
"fDphi", tor->
GetDphi(),
"phi range");
794 AddExecInfo(
pt,
"torus");
802 auto c = create_canvas(
"A trapezoid with dX varying");
815 if (iaxis == 2 || iaxis == 3) {
821 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
836 TText *
text =
pt->AddText(
"TGeoTrd1 - Trd1 class");
837 text->SetTextColor(2);
838 AddMemberInfo(
pt,
"fDx1", trd1->
GetDx1(),
"half length in X at lower Z surface(-dz)");
839 AddMemberInfo(
pt,
"fDx2", trd1->
GetDx2(),
"half length in X at higher Z surface(+dz)");
840 AddMemberInfo(
pt,
"fDy", trd1->
GetDy(),
"half length in Y");
841 AddMemberInfo(
pt,
"fDz", trd1->
GetDz(),
"half length in Z");
843 AddExecInfo(
pt,
"trd1",
"2 or 3 (Y, Z)");
852 auto c = create_canvas(
"A paraboloid segment");
877 TText *
text =
pt->AddText(
"TGeoParaboloid - Paraboloid class");
878 text->SetTextColor(2);
879 AddMemberInfo(
pt,
"fRlo", par->
GetRlo(),
"radius at Z=-dz");
880 AddMemberInfo(
pt,
"fRhi", par->
GetRhi(),
"radius at Z=+dz");
881 AddMemberInfo(
pt,
"fDz", par->
GetDz(),
"half-length on Z axis");
882 pt->AddText(
"----- A paraboloid is described by the equation:");
883 pt->AddText(
"----- z = a*r*r + b; where: r = x*x + y*y");
884 pt->AddText(
"----- Create with: TGeoParaboloid *parab = new TGeoParaboloid(rlo, rhi, dz);");
885 pt->AddText(
"----- dz: half-length in Z (range from -dz to +dz");
886 pt->AddText(
"----- rlo: radius at z=-dz given by: -dz = a*rlo*rlo + b");
887 pt->AddText(
"----- rhi: radius at z=+dz given by: dz = a*rhi*rhi + b");
888 pt->AddText(
"----- rlo != rhi; both >= 0");
889 AddExecInfo(
pt,
"parab");
897 auto c = create_canvas(
"A hyperboloid");
922 TText *
text =
pt->AddText(
"TGeoHype - Hyperboloid class");
923 text->SetTextColor(2);
924 AddMemberInfo(
pt,
"fRmin", hype->
GetRmin(),
"minimum inner radius");
925 AddMemberInfo(
pt,
"fStIn", hype->
GetStIn(),
"inner surface stereo angle [deg]");
926 AddMemberInfo(
pt,
"fRmax", hype->
GetRmax(),
"minimum outer radius");
927 AddMemberInfo(
pt,
"fStOut", hype->
GetStOut(),
"outer surface stereo angle [deg]");
928 AddMemberInfo(
pt,
"fDz", hype->
GetDz(),
"half-length on Z axis");
929 pt->AddText(
"----- A hyperboloid is described by the equation:");
930 pt->AddText(
"----- r^2 - (tan(stereo)*z)^2 = rmin^2; where: r = x*x + y*y");
931 pt->AddText(
"----- Create with: TGeoHype *hype = new TGeoHype(rin, stin, rout, stout, dz);");
932 pt->AddText(
"----- rin < rout; rout > 0");
933 pt->AddText(
"----- rin = 0; stin > 0 => inner surface conical");
934 pt->AddText(
"----- stin/stout = 0 => corresponding surface cylindrical");
935 AddExecInfo(
pt,
"hype");
943 auto c = create_canvas(
"A polycone");
961 if (iaxis == 2 || iaxis == 3) {
968 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
982 TText *
text =
pt->AddText(
"TGeoPcon - pcon class");
983 text->SetTextColor(2);
984 AddMemberInfo(
pt,
"fPhi1", pcon->
GetPhi1(),
"lower phi limit");
985 AddMemberInfo(
pt,
"fDphi", pcon->
GetDphi(),
"phi range");
986 AddMemberInfo(
pt,
"fNz", pcon->
GetNz(),
"number of z planes");
991 text->SetTextColor(4);
992 text->SetTextAlign(12);
995 AddExecInfo(
pt,
"pcon",
"2 or 3 (Phi, Z)");
1004 auto c = create_canvas(
"A polygone");
1022 if (iaxis == 2 || iaxis == 3) {
1029 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
1042 pt->SetLineColor(1);
1043 TText *
text =
pt->AddText(
"TGeoPgon - pgon class");
1044 text->SetTextColor(2);
1045 AddMemberInfo(
pt,
"fPhi1", pgon->
GetPhi1(),
"lower phi limit");
1046 AddMemberInfo(
pt,
"fDphi", pgon->
GetDphi(),
"phi range");
1047 AddMemberInfo(
pt,
"fNedges", pgon->
GetNedges(),
"number of edges");
1048 AddMemberInfo(
pt,
"fNz", pgon->
GetNz(),
"number of z planes");
1053 text->SetTextColor(4);
1054 text->SetTextAlign(12);
1057 AddExecInfo(
pt,
"pgon",
"2 or 3 (Phi, Z)");
1066 auto c = create_canvas(
"An arbitrary polyhedron");
1098 pt->SetLineColor(1);
1099 TText *
text =
pt->AddText(
"TGeoArb8 - arb8 class");
1100 text->SetTextColor(2);
1101 AddMemberInfo(
pt,
"fDz", arb->
GetDz(),
"Z half length");
1103 text =
pt->AddText(
"Vertices on lower Z plane:");
1104 text->SetTextColor(3);
1105 for (
Int_t i = 0; i < 4; i++) {
1107 text->SetTextSize(0.043);
1108 text->SetTextColor(4);
1110 text =
pt->AddText(
"Vertices on higher Z plane:");
1111 text->SetTextColor(3);
1112 for (
Int_t i = 4; i < 8; i++) {
1114 text->SetTextSize(0.043);
1115 text->SetTextColor(4);
1118 AddExecInfo(
pt,
"arb8");
1127 auto c = create_canvas(
"A trapezoid with dX and dY varying with Z");
1146 printf(
"Wrong division axis %d. Allowed is only 3.\n", iaxis);
1159 pt->SetLineColor(1);
1161 TText *
text =
pt->AddText(
"TGeoTrd2 - Trd2 class");
1162 text->SetTextColor(2);
1163 AddMemberInfo(
pt,
"fDx1", trd2->
GetDx1(),
"half length in X at lower Z surface(-dz)");
1164 AddMemberInfo(
pt,
"fDx2", trd2->
GetDx2(),
"half length in X at higher Z surface(+dz)");
1165 AddMemberInfo(
pt,
"fDy1", trd2->
GetDy1(),
"half length in Y at lower Z surface(-dz)");
1166 AddMemberInfo(
pt,
"fDy2", trd2->
GetDy2(),
"half length in Y at higher Z surface(-dz)");
1167 AddMemberInfo(
pt,
"fDz", trd2->
GetDz(),
"half length in Z");
1169 AddExecInfo(
pt,
"trd2",
"only 3 (Z)");
1178 auto c = create_canvas(
"A more general trapezoid");
1187 TGeoVolume *vol =
gGeoManager->MakeTrap(
"Trap", med, 30, 15, 30, 20, 10, 15, 0, 20, 10, 15, 0);
1197 printf(
"Wrong division axis %d. Allowed is only 3.\n", iaxis);
1210 pt->SetLineColor(1);
1212 TText *
text =
pt->AddText(
"TGeoTrap - Trapezoid class");
1213 text->SetTextColor(2);
1214 AddMemberInfo(
pt,
"fDz", trap->
GetDz(),
"half length in Z");
1215 AddMemberInfo(
pt,
"fTheta", trap->
GetTheta(),
"theta angle of trapezoid axis");
1216 AddMemberInfo(
pt,
"fPhi", trap->
GetPhi(),
"phi angle of trapezoid axis");
1217 AddMemberInfo(
pt,
"fH1", trap->
GetH1(),
"half length in y at -fDz");
1218 AddMemberInfo(
pt,
"fAlpha1", trap->
GetAlpha1(),
"angle between centers of x edges and y axis at -fDz");
1219 AddMemberInfo(
pt,
"fBl1", trap->
GetBl1(),
"half length in x at -dZ and y=-fH1");
1220 AddMemberInfo(
pt,
"fTl1", trap->
GetTl1(),
"half length in x at -dZ and y=+fH1");
1221 AddMemberInfo(
pt,
"fH2", trap->
GetH2(),
"half length in y at +fDz");
1222 AddMemberInfo(
pt,
"fBl2", trap->
GetBl2(),
"half length in x at +dZ and y=-fH1");
1223 AddMemberInfo(
pt,
"fTl2", trap->
GetTl2(),
"half length in x at +dZ and y=+fH1");
1224 AddMemberInfo(
pt,
"fAlpha2", trap->
GetAlpha2(),
"angle between centers of x edges and y axis at +fDz");
1226 AddExecInfo(
pt,
"trap",
"only 3 (Z)");
1235 auto c = create_canvas(
"A twisted trapezoid");
1244 TGeoVolume *vol =
gGeoManager->MakeGtra(
"Gtra", med, 30, 15, 30, 30, 20, 10, 15, 0, 20, 10, 15, 0);
1254 printf(
"Wrong division axis %d. Allowed is only 3.\n", iaxis);
1267 pt->SetLineColor(1);
1269 TText *
text =
pt->AddText(
"TGeoGtra - Twisted trapezoid class");
1270 text->SetTextColor(2);
1271 AddMemberInfo(
pt,
"fDz", trap->
GetDz(),
"half length in Z");
1272 AddMemberInfo(
pt,
"fTheta", trap->
GetTheta(),
"theta angle of trapezoid axis");
1273 AddMemberInfo(
pt,
"fPhi", trap->
GetPhi(),
"phi angle of trapezoid axis");
1275 AddMemberInfo(
pt,
"fH1", trap->
GetH1(),
"half length in y at -fDz");
1276 AddMemberInfo(
pt,
"fAlpha1", trap->
GetAlpha1(),
"angle between centers of x edges and y axis at -fDz");
1277 AddMemberInfo(
pt,
"fBl1", trap->
GetBl1(),
"half length in x at -dZ and y=-fH1");
1278 AddMemberInfo(
pt,
"fTl1", trap->
GetTl1(),
"half length in x at -dZ and y=+fH1");
1279 AddMemberInfo(
pt,
"fH2", trap->
GetH2(),
"half length in y at +fDz");
1280 AddMemberInfo(
pt,
"fBl2", trap->
GetBl2(),
"half length in x at +dZ and y=-fH1");
1281 AddMemberInfo(
pt,
"fTl2", trap->
GetTl2(),
"half length in x at +dZ and y=+fH1");
1282 AddMemberInfo(
pt,
"fAlpha2", trap->
GetAlpha2(),
"angle between centers of x edges and y axis at +fDz");
1284 AddExecInfo(
pt,
"gtra",
"only 3 (Z)");
1293 auto c = create_canvas(
"A twisted trapezoid");
1304 Double_t x[8] = {-30, -30, 30, 30, 15, 15, -15, -15};
1305 Double_t y[8] = {-30, 30, 30, -30, -30, 15, 15, -30};
1324 pt->SetLineColor(1);
1325 TText *
text =
pt->AddText(
"TGeoXtru - Polygonal extrusion class");
1326 text->SetTextColor(2);
1327 AddMemberInfo(
pt,
"fNvert", xtru->
GetNvert(),
"number of polygone vertices");
1328 AddMemberInfo(
pt,
"fNz", xtru->
GetNz(),
"number of Z sections");
1329 pt->AddText(
"----- Any Z section is an arbitrary polygone");
1330 pt->AddText(
"----- The shape can have an arbitrary number of Z sections, as for pcon/pgon");
1331 pt->AddText(
"----- Create with: TGeoXtru *xtru = new TGeoXtru(nz);");
1332 pt->AddText(
"----- Define the blueprint polygon :");
1333 pt->AddText(
"----- Double_t x[8] = {-30,-30,30,30,15,15,-15,-15};");
1334 pt->AddText(
"----- Double_t y[8] = {-30,30,30,-30,-30,15,15,-30};");
1335 pt->AddText(
"----- xtru->DefinePolygon(8,x,y);");
1336 pt->AddText(
"----- Define translations/scales of the blueprint for Z sections :");
1337 pt->AddText(
"----- xtru->DefineSection(i, Zsection, x0, y0, scale);");
1338 pt->AddText(
"----- Sections have to be defined in increasing Z order");
1339 pt->AddText(
"----- 2 sections can be defined at same Z (not for first/last sections)");
1340 AddExecInfo(
pt,
"xtru");
1350 auto c = create_canvas(
"A tessellated shape");
1361 std::vector<Tessellated::Vertex_t> vert;
1363 vert.emplace_back(0, 0.5 * (1 + sqrt5), -1);
1364 vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5));
1365 vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5));
1366 vert.emplace_back(-1, 1, -1);
1367 vert.emplace_back(1, 1, -1);
1368 vert.emplace_back(0, 0.5 * (1 + sqrt5), -1);
1369 vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5));
1370 vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1371 vert.emplace_back(1, 1, -1);
1372 vert.emplace_back(0, 0.5 * (1 + sqrt5), -1);
1373 vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5), 0);
1374 vert.emplace_back(0.5 * (1 + sqrt5), 1, 0);
1375 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5), 0);
1376 vert.emplace_back(0, 0.5 * (1 + sqrt5), -1);
1377 vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5), 0);
1378 vert.emplace_back(0, 0.5 * (1 + sqrt5), 1);
1379 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5), 0);
1380 vert.emplace_back(0, 0.5 * (1 + sqrt5), -1);
1381 vert.emplace_back(-1, 1, -1);
1382 vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0);
1383 vert.emplace_back(1, 1, -1);
1384 vert.emplace_back(0.5 * (1 + sqrt5), 1, 0);
1385 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (1 - sqrt5));
1386 vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1387 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (1 - sqrt5));
1388 vert.emplace_back(0.5 * (1 + sqrt5), -1, 0);
1389 vert.emplace_back(1, -1, -1);
1390 vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1391 vert.emplace_back(1, -1, -1);
1392 vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1);
1393 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5));
1394 vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1395 vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1396 vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5));
1397 vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5));
1398 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5));
1399 vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5), 0);
1400 vert.emplace_back(0.5 * (1 + sqrt5), 1, 0);
1401 vert.emplace_back(1, 1, 1);
1402 vert.emplace_back(0, 0.5 * (1 + sqrt5), 1);
1403 vert.emplace_back(0.5 * (1 + sqrt5), 1, 0);
1404 vert.emplace_back(1, 1, 1);
1405 vert.emplace_back(1, 0, 0.5 * (1 + sqrt5));
1406 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (-1 + sqrt5));
1407 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (1 - sqrt5));
1408 vert.emplace_back(0.5 * (1 + sqrt5), 1, 0);
1409 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (-1 + sqrt5));
1410 vert.emplace_back(0.5 * (1 + sqrt5), -1, 0);
1411 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5), 0);
1412 vert.emplace_back(0, 0.5 * (1 + sqrt5), 1);
1413 vert.emplace_back(-1, 1, 1);
1414 vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0);
1415 vert.emplace_back(0, 0.5 * (1 + sqrt5), 1);
1416 vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5));
1417 vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5));
1418 vert.emplace_back(-1, 1, 1);
1419 vert.emplace_back(1, 1, 1);
1420 vert.emplace_back(0, 0.5 * (1 + sqrt5), 1);
1421 vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5));
1422 vert.emplace_back(1, 0, 0.5 * (1 + sqrt5));
1423 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5));
1424 vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5));
1425 vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5));
1426 vert.emplace_back(1, 0, 0.5 * (1 + sqrt5));
1427 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5));
1428 vert.emplace_back(1, 0, 0.5 * (1 + sqrt5));
1429 vert.emplace_back(1, -1, 1);
1430 vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1);
1431 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (-1 + sqrt5));
1432 vert.emplace_back(0.5 * (1 + sqrt5), -1, 0);
1433 vert.emplace_back(1, -1, 1);
1434 vert.emplace_back(1, 0, 0.5 * (1 + sqrt5));
1435 vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5));
1436 vert.emplace_back(-1, 1, 1);
1437 vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0);
1438 vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (-1 + sqrt5));
1439 vert.emplace_back(-1, -1, 1);
1440 vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5));
1441 vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (-1 + sqrt5));
1442 vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0);
1443 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5));
1444 vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5));
1445 vert.emplace_back(-1, -1, 1);
1446 vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1);
1447 vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0);
1448 vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (1 - sqrt5));
1449 vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0);
1450 vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (-1 + sqrt5));
1451 vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0);
1452 vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (1 - sqrt5));
1453 vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5));
1454 vert.emplace_back(-1, -1, -1);
1455 vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1);
1456 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5), 0);
1457 vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0);
1458 vert.emplace_back(-1, -1, -1);
1459 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5), 0);
1460 vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0);
1461 vert.emplace_back(-1, -1, 1);
1462 vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1);
1463 vert.emplace_back(-1, 1, -1);
1464 vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5));
1465 vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (1 - sqrt5));
1466 vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0);
1467 vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1);
1468 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5));
1469 vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5));
1470 vert.emplace_back(-1, -1, -1);
1471 vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1);
1472 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5), 0);
1473 vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1);
1474 vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5), 0);
1475 vert.emplace_back(1, -1, -1);
1476 vert.emplace_back(0.5 * (1 + sqrt5), -1, 0);
1477 vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5), 0);
1478 vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1);
1479 vert.emplace_back(0.5 * (1 + sqrt5), -1, 0);
1480 vert.emplace_back(1, -1, 1);
1481 vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1);
1482 vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5), 0);
1484 tsl->
AddFacet(vert[0], vert[1], vert[2], vert[3]);
1485 tsl->
AddFacet(vert[4], vert[7], vert[6], vert[5]);
1486 tsl->
AddFacet(vert[8], vert[9], vert[10], vert[11]);
1487 tsl->
AddFacet(vert[12], vert[15], vert[14], vert[13]);
1488 tsl->
AddFacet(vert[16], vert[17], vert[18], vert[19]);
1489 tsl->
AddFacet(vert[20], vert[21], vert[22], vert[23]);
1490 tsl->
AddFacet(vert[24], vert[25], vert[26], vert[27]);
1491 tsl->
AddFacet(vert[28], vert[29], vert[30], vert[31]);
1492 tsl->
AddFacet(vert[32], vert[35], vert[34], vert[33]);
1493 tsl->
AddFacet(vert[36], vert[39], vert[38], vert[37]);
1494 tsl->
AddFacet(vert[40], vert[41], vert[42], vert[43]);
1495 tsl->
AddFacet(vert[44], vert[45], vert[46], vert[47]);
1496 tsl->
AddFacet(vert[48], vert[51], vert[50], vert[49]);
1497 tsl->
AddFacet(vert[52], vert[55], vert[54], vert[53]);
1498 tsl->
AddFacet(vert[56], vert[57], vert[58], vert[59]);
1499 tsl->
AddFacet(vert[60], vert[63], vert[62], vert[61]);
1500 tsl->
AddFacet(vert[64], vert[67], vert[66], vert[65]);
1501 tsl->
AddFacet(vert[68], vert[71], vert[70], vert[69]);
1502 tsl->
AddFacet(vert[72], vert[73], vert[74], vert[75]);
1503 tsl->
AddFacet(vert[76], vert[77], vert[78], vert[79]);
1504 tsl->
AddFacet(vert[80], vert[81], vert[82], vert[83]);
1505 tsl->
AddFacet(vert[84], vert[87], vert[86], vert[85]);
1506 tsl->
AddFacet(vert[88], vert[89], vert[90], vert[91]);
1507 tsl->
AddFacet(vert[92], vert[93], vert[94], vert[95]);
1508 tsl->
AddFacet(vert[96], vert[99], vert[98], vert[97]);
1509 tsl->
AddFacet(vert[100], vert[101], vert[102], vert[103]);
1510 tsl->
AddFacet(vert[104], vert[107], vert[106], vert[105]);
1511 tsl->
AddFacet(vert[108], vert[111], vert[110], vert[109]);
1512 tsl->
AddFacet(vert[112], vert[113], vert[114], vert[115]);
1513 tsl->
AddFacet(vert[116], vert[117], vert[118], vert[119]);
1528 pt->SetLineColor(1);
1529 TText *
text =
pt->AddText(
"TGeoTessellated - Tessellated shape class");
1530 text->SetTextColor(2);
1531 AddMemberInfo(
pt,
"fNfacets", tsl->
GetNfacets(),
"number of facets");
1532 AddMemberInfo(
pt,
"fNvertices", tsl->
GetNvertices(),
"number of vertices");
1533 pt->AddText(
"----- A tessellated shape is defined by the number of facets");
1534 pt->AddText(
"----- facets can be added using AddFacet");
1535 pt->AddText(
"----- Create with: TGeoTessellated *tsl = new TGeoTessellated(nfacets);");
1536 AddExecInfo(
pt,
"tessellated");
1544 auto c = create_canvas(
"A Boolean shape composition");
1578 pt->SetLineColor(1);
1579 TText *
text =
pt->AddText(
"TGeoCompositeShape - composite shape class");
1580 text->SetTextColor(2);
1581 pt->AddText(
"----- Define the shape components and don't forget to name them");
1582 pt->AddText(
"----- Define geometrical transformations that apply to shape components");
1583 pt->AddText(
"----- Name all transformations and register them");
1584 pt->AddText(
"----- Define the composite shape based on a Boolean expression");
1585 pt->AddText(
" TGeoCompositeShape(\"someName\", \"expression\")");
1586 pt->AddText(
"----- Expression is made of <shapeName:transfName> components related by Boolean operators");
1587 pt->AddText(
"----- Boolean operators can be: (+) union, (-) subtraction and (*) intersection");
1588 pt->AddText(
"----- Use parenthesis in the expression to force precedence");
1589 AddExecInfo(
pt,
"composite");
1630 auto c = create_canvas(
"Ideal geometry");
1657 pt->SetLineColor(1);
1658 TText *
text =
pt->AddText(
"Ideal / Aligned geometry");
1659 text->SetTextColor(2);
1660 pt->AddText(
"-- Create physical nodes for the objects you want to align");
1661 pt->AddText(
"-- You must start from a valid CLOSED geometry");
1662 pt->AddText(
" TGeoPhysicalNode *node = gGeoManager->MakePhysicalNode(const char *path)");
1663 pt->AddText(
" + creates a physical node represented by path, e.g. TOP_1/A_2/B_3");
1664 pt->AddText(
" node->Align(TGeoMatrix *newmat, TGeoShape *newshape, Bool_t check=kFALSE)");
1665 pt->AddText(
" + newmat = new matrix to replace final node LOCAL matrix");
1666 pt->AddText(
" + newshape = new shape to replace final node shape");
1667 pt->AddText(
" + check = optional check if the new aligned node is overlapping");
1669 pt->SetAllWith(
"--",
"color", 4);
1670 pt->SetAllWith(
"--",
"font", 72);
1671 pt->SetAllWith(
"--",
"size", 0.04);
1672 pt->SetAllWith(
"+",
"color", 2);
1673 pt->SetAllWith(
"+",
"font", 72);
1674 pt->SetAllWith(
"+",
"size", 0.04);
1675 pt->SetTextAlign(12);
1676 pt->SetTextSize(0.044);
1686 if (strcmp(
gGeoManager->GetName(),
"alignment")) {
1687 printf(
"Click: <Ideal geometry> first\n");
1691 for (
Int_t i = 1; i <= 10; i++) {
1692 for (
Int_t j = 1; j <= 10; j++) {
1734 bar->
AddButton(
"How to run ",
"help()",
"Instructions for running this macro");
1736 "An arbitrary polyhedron defined by vertices (max 8) sitting on 2 parallel planes");
1737 bar->
AddButton(
"Box ",
"box()",
"A box shape.");
1738 bar->
AddButton(
"Composite ",
"composite()",
"A composite shape");
1739 bar->
AddButton(
"Cone ",
"cone()",
"A conical tube");
1740 bar->
AddButton(
"Cone segment",
"coneseg()",
"A conical segment");
1741 bar->
AddButton(
"Cut tube ",
"ctub()",
"A cut tube segment");
1742 bar->
AddButton(
"Elliptical tube",
"eltu()",
"An elliptical tube");
1743 bar->
AddButton(
"Extruded poly",
"xtru()",
"A general polygone extrusion");
1744 bar->
AddButton(
"Hyperboloid ",
"hype()",
"A hyperboloid");
1745 bar->
AddButton(
"Paraboloid ",
"parab()",
"A paraboloid");
1746 bar->
AddButton(
"Polycone ",
"pcon()",
"A polycone shape");
1747 bar->
AddButton(
"Polygone ",
"pgon()",
"A polygone");
1748 bar->
AddButton(
"Parallelepiped",
"para()",
"A parallelepiped shape");
1749 bar->
AddButton(
"Sphere ",
"sphere()",
"A spherical sector");
1750 bar->
AddButton(
"Trd1 ",
"trd1()",
"A trapezoid with dX varying with Z");
1751 bar->
AddButton(
"Trd2 ",
"trd2()",
"A trapezoid with both dX and dY varying with Z");
1752 bar->
AddButton(
"Trapezoid ",
"trap()",
"A general trapezoid");
1753 bar->
AddButton(
"Torus ",
"torus()",
"A toroidal segment");
1754 bar->
AddButton(
"Tube ",
"tube()",
"A tube with inner and outer radius");
1755 bar->
AddButton(
"Tube segment",
"tubeseg()",
"A tube segment");
1756 bar->
AddButton(
"Twisted trap",
"gtra()",
"A twisted trapezoid");
1757 bar->
AddButton(
"Tessellated ",
"tessellated()",
"A tessellated shape");
1758 bar->
AddButton(
"Aligned (ideal)",
"ideal()",
"An ideal (un-aligned) geometry");
1759 bar->
AddButton(
"Un-aligned",
"align()",
"Some alignment operation");
1760 bar->
AddButton(
"RAY-TRACE ON/OFF",
"raytrace()",
"Toggle ray-tracing mode");
1761 bar->
AddButton(
"COMMENTS ON/OFF",
"comments = !comments;",
"Toggle explanations pad ON/OFF");
1762 bar->
AddButton(
"AXES ON/OFF",
"axes()",
"Toggle axes ON/OFF");
1763 bar->
AddButton(
"AUTOROTATE ON/OFF",
"autorotate()",
"Toggle autorotation ON/OFF");
1765 gROOT->SaveContext();
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
externTGeoManager * gGeoManager
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
A Control Bar is a fully user configurable tool which provides fast access to frequently used operati...
void Show()
Show control bar.
void AddButton(TControlBarButton *button)
Add button.
virtual void SetVertex(Int_t vnum, Double_t x, Double_t y)
virtual Double_t GetDZ() const
Composite shapes are Boolean combinations of two or more shape components.
virtual Double_t GetRmax2() const
virtual Double_t GetRmin2() const
virtual Double_t GetRmin1() const
virtual Double_t GetRmax1() const
virtual Double_t GetA() const
virtual Double_t GetB() const
Double_t GetTwistAngle() const
Double_t GetStOut() const
The manager class for any TGeo geometry.
Base class describing materials.
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
Media are used to store properties related to tracking and which are useful only when using geometry ...
virtual TGeoMatrix * GetMatrix() const =0
Double_t GetAlpha() const
Double_t GetTheta() const
A paraboloid is defined by the revolution surface generated by a parabola and is bounded by two plane...
base finder class for patterns. A pattern is specifying a division type
TGeoVolume * GetVolume() const
Double_t GetStart() const
Double_t * GetRmax() const
virtual void DefineSection(Int_t snum, Double_t z, Double_t rmin, Double_t rmax)
Double_t * GetRmin() const
Physical nodes are the actual 'touchable' objects in the geometry, representing a path of positioned ...
TGeoNode * GetNode(Int_t level=-1) const
Return node in branch at LEVEL. If not specified, return last leaf.
Bool_t Align(TGeoMatrix *newmat=nullptr, TGeoShape *newshape=nullptr, Bool_t check=kFALSE, Double_t ovlp=0.001)
Align a physical node with a new relative matrix/shape.
Base abstract class for all shapes.
virtual const char * GetAxisName(Int_t iaxis) const =0
virtual Double_t GetRmin() const
Double_t GetTheta2() const
virtual Double_t GetRmax() const
Double_t GetTheta1() const
bool AddFacet(const Vertex_t &pt0, const Vertex_t &pt1, const Vertex_t &pt2)
Adding a triangular facet from vertex positions in absolute coordinates.
Class describing translations.
void SetTranslation(Double_t dx, Double_t dy, Double_t dz)
Set translation components.
Double_t GetAlpha2() const
Double_t GetTheta() const
Double_t GetAlpha1() const
virtual Double_t GetRmin() const
virtual Double_t GetDz() const
virtual Double_t GetRmax() const
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
void SetLineWidth(Width_t lwidth) override
Set the line width.
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
void Draw(Option_t *option="") override
draw top volume according to option
TGeoPatternFinder * GetFinder() const
void SetLineColor(Color_t lcolor) override
Set the line color.
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.
const char * GetName() const override
Returns name of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Mother of all ROOT objects.
void Draw(Option_t *option="") override
Draw this pave with its current attributes.
virtual void SetAllWith(const char *text, Option_t *option, Double_t value)
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Bool_t ProcessEvents()
Process events if timer did time out.
Random number generator class based on M.
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.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
virtual Double_t GetPsi()=0
virtual Double_t GetLongitude()=0
virtual void ShowAxis()=0
virtual Double_t GetLatitude()=0
virtual void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)=0
Abstract class for geometry painters.
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Double_t Sqrt(Double_t x)
Returns the square root of x.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.