54 if (is_raytracing != raytracing) {
65 while (
line.Length() < 10)
line.Append(
" ");
69 text->SetTextAlign(12);
73void AddMemberInfo(
TPaveText *pave,
const char *datamember,
Int_t value,
const char *comment)
76 while (
line.Length() < 10)
line.Append(
" ");
80 text->SetTextAlign(12);
87 if (!pave || !pf || !iaxis)
return;
91 text->SetTextColor(3);
92 text->SetTextAlign(12);
93 AddMemberInfo(pave,
"fNdiv", finder->
GetNdiv(),
"number of divisions");
94 AddMemberInfo(pave,
"fStart", finder->
GetStart(),
"start divisioning position");
95 AddMemberInfo(pave,
"fStep", finder->
GetStep(),
"division step");
99void AddExecInfo(
TPaveText *pave,
const char *
name =
nullptr,
const char *axisinfo =
nullptr)
101 if (
name && axisinfo) {
103 text->SetTextColor(4);
105 pave->
AddText(
"----- NDIV must be a positive integer");
106 pave->
AddText(
"----- START must be a valid axis offset within shape range on divided axis");
107 pave->
AddText(
"----- STEP is the division step. START+NDIV*STEP must be in range also");
108 pave->
AddText(
"----- If START and STEP are omitted, all range of the axis will be divided");
114 text->SetTextColor(4);
128 if (!
c || !vol)
return;
138 c->Print(fname.
Data());
145 return (1+
Int_t(color));
150 raytracing = !raytracing;
154 if (drawn) top->SetVisRaytrace(raytracing);
169 c =
new TCanvas(
"geom_help",
"Help to run demos",200,10,700,600);
173 welcome->
AddText(
"Welcome to the new geometry package");
182 hdemo->
AddText(
"- Demo for building TGeo basic shapes and simple geometry. Shape parameters are");
183 hdemo->
AddText(
" displayed in the right pad");
184 hdemo->
AddText(
"- Click left mouse button to execute one demo");
185 hdemo->
AddText(
"- While pointing the mouse to the pad containing the geometry, do:");
186 hdemo->
AddText(
"- .... click-and-move to rotate");
187 hdemo->
AddText(
"- .... press j/k to zoom/unzoom");
188 hdemo->
AddText(
"- .... press l/h/u/i to move the view center around");
189 hdemo->
AddText(
"- Click Ray-trace ON/OFF to toggle ray-tracing");
190 hdemo->
AddText(
"- Use <View with x3d> from the <View> menu to get an x3d view");
191 hdemo->
AddText(
"- .... same methods to rotate/zoom/move the view");
192 hdemo->
AddText(
"- Execute box(1,8) to divide a box in 8 equal slices along X");
193 hdemo->
AddText(
"- Most shapes can be divided on X,Y,Z,Rxy or Phi :");
194 hdemo->
AddText(
"- .... root[0] <shape>(IAXIS, NDIV, START, STEP);");
195 hdemo->
AddText(
" .... IAXIS = 1,2,3 meaning (X,Y,Z) or (Rxy, Phi, Z)");
196 hdemo->
AddText(
" .... NDIV = number of slices");
197 hdemo->
AddText(
" .... START = start slicing position");
198 hdemo->
AddText(
" .... STEP = division step");
199 hdemo->
AddText(
"- Click Comments ON/OFF to toggle comments");
200 hdemo->
AddText(
"- Click Ideal/Align geometry to see how alignment works");
224 if (!painter)
return;
234 if (
gROOT->IsInterrupted())
break;
236 if (longit>360) longit -= 360.;
241 view =
gPad->GetView();
263TCanvas *create_canvas(
const char *title)
271 c =
new TCanvas(
"geom_draw", title, 700,1000);
275 c->GetPad(2)->SetPad(0,0,1,0.4);
276 c->GetPad(1)->SetPad(0,0.4,1,1);
286 auto c = create_canvas(
"A simple box");
298 if ((iaxis > 0) && (iaxis < 4)) {
309 if (!comments)
return;
315 text->SetTextColor(2);
316 AddMemberInfo(
pt,
"fDX",
box->GetDX(),
"half length in X");
317 AddMemberInfo(
pt,
"fDY",
box->GetDY(),
"half length in Y");
318 AddMemberInfo(
pt,
"fDZ",
box->GetDZ(),
"half length in Z");
319 AddMemberInfo(
pt,
"fOrigin[0]", (
box->GetOrigin())[0],
"box origin on X");
320 AddMemberInfo(
pt,
"fOrigin[1]", (
box->GetOrigin())[1],
"box origin on Y");
321 AddMemberInfo(
pt,
"fOrigin[2]", (
box->GetOrigin())[2],
"box origin on Z");
323 AddExecInfo(
pt,
"box",
"1, 2 or 3 (X, Y, Z)");
332 auto c = create_canvas(
"A parallelepiped");
344 if ((iaxis > 0) && (iaxis < 4)) {
349 printf(
"Wrong division axis %d. Allowed range is 1-3.\n", iaxis);
358 if (!comments)
return;
364 text->SetTextColor(2);
365 AddMemberInfo(
pt,
"fX", para->
GetX(),
"half length in X");
366 AddMemberInfo(
pt,
"fY", para->
GetY(),
"half length in Y");
367 AddMemberInfo(
pt,
"fZ", para->
GetZ(),
"half length in Z");
368 AddMemberInfo(
pt,
"fAlpha", para->
GetAlpha(),
"angle about Y of the Z bases");
369 AddMemberInfo(
pt,
"fTheta", para->
GetTheta(),
"inclination of para axis about Z");
370 AddMemberInfo(
pt,
"fPhi", para->
GetPhi(),
"phi angle of para axis");
372 AddExecInfo(
pt,
"para",
"1, 2 or 3 (X, Y, Z)");
381 auto c = create_canvas(
"A tube");
393 if ((iaxis > 0) && (iaxis < 4)) {
398 printf(
"Wrong division axis %d. Allowed range is 1-3.\n", iaxis);
407 if (!comments)
return;
413 text->SetTextColor(2);
414 AddMemberInfo(
pt,
"fRmin",tube->
GetRmin(),
"minimum radius");
415 AddMemberInfo(
pt,
"fRmax",tube->
GetRmax(),
"maximum radius");
416 AddMemberInfo(
pt,
"fDZ", tube->
GetDZ(),
"half length in Z");
418 AddExecInfo(
pt,
"tube",
"1, 2 or 3 (Rxy, Phi, Z)");
427 auto c = create_canvas(
"A tube segment");
437 if ((iaxis > 0) && (iaxis < 4)) {
442 printf(
"Wrong division axis %d. Allowed range is 1-3.\n", iaxis);
454 if (!comments)
return;
460 text->SetTextColor(2);
461 AddMemberInfo(
pt,
"fRmin",tubeseg->
GetRmin(),
"minimum radius");
462 AddMemberInfo(
pt,
"fRmax",tubeseg->
GetRmax(),
"maximum radius");
463 AddMemberInfo(
pt,
"fDZ", tubeseg->
GetDZ(),
"half length in Z");
464 AddMemberInfo(
pt,
"fPhi1",tubeseg->
GetPhi1(),
"first phi limit");
465 AddMemberInfo(
pt,
"fPhi2",tubeseg->
GetPhi2(),
"second phi limit");
467 AddExecInfo(
pt,
"tubeseg",
"1, 2 or 3 (Rxy, Phi, Z)");
476 auto c = create_canvas(
"A cut tube segment");
496 TGeoVolume *vol =
gGeoManager->
MakeCtub(
"CTUB",med, 20,30,40,-30,250, nlow[0], nlow[1], nlow[2], nhi[0],nhi[1],nhi[2]);
498 if (iaxis == 1 || iaxis == 2) {
503 printf(
"Wrong division axis %d. Allowed range is 1-2.\n", iaxis);
515 if (!comments)
return;
521 text->SetTextColor(2);
522 AddMemberInfo(
pt,
"fRmin",tubeseg->
GetRmin(),
"minimum radius");
523 AddMemberInfo(
pt,
"fRmax",tubeseg->
GetRmax(),
"maximum radius");
524 AddMemberInfo(
pt,
"fDZ", tubeseg->
GetDZ(),
"half length in Z");
525 AddMemberInfo(
pt,
"fPhi1",tubeseg->
GetPhi1(),
"first phi limit");
526 AddMemberInfo(
pt,
"fPhi2",tubeseg->
GetPhi2(),
"second phi limit");
528 AddExecInfo(
pt,
"ctub",
"1 or 2");
537 auto c = create_canvas(
"A cone");
548 if (iaxis == 2 || iaxis == 3) {
553 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
563 if (!comments)
return;
569 text->SetTextColor(2);
570 AddMemberInfo(
pt,
"fDZ", cone->
GetDZ(),
"half length in Z");
571 AddMemberInfo(
pt,
"fRmin1",cone->
GetRmin1(),
"inner radius at -dz");
572 AddMemberInfo(
pt,
"fRmax1",cone->
GetRmax1(),
"outer radius at -dz");
573 AddMemberInfo(
pt,
"fRmin2",cone->
GetRmin2(),
"inner radius at +dz");
574 AddMemberInfo(
pt,
"fRmax2",cone->
GetRmax2(),
"outer radius at +dz");
576 AddExecInfo(
pt,
"cone",
"2 or 3 (Phi, Z)");
585 auto c = create_canvas(
"A cone segment");
597 if (iaxis >= 2 && iaxis <= 3) {
602 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
611 if (!comments)
return;
617 text->SetTextColor(2);
618 AddMemberInfo(
pt,
"fDZ", coneseg->
GetDZ(),
"half length in Z");
619 AddMemberInfo(
pt,
"fRmin1", coneseg->
GetRmin1(),
"inner radius at -dz");
620 AddMemberInfo(
pt,
"fRmax1", coneseg->
GetRmax1(),
"outer radius at -dz");
621 AddMemberInfo(
pt,
"fRmin2", coneseg->
GetRmin1(),
"inner radius at +dz");
622 AddMemberInfo(
pt,
"fRmax2", coneseg->
GetRmax1(),
"outer radius at +dz");
623 AddMemberInfo(
pt,
"fPhi1", coneseg->
GetPhi1(),
"first phi limit");
624 AddMemberInfo(
pt,
"fPhi2", coneseg->
GetPhi2(),
"second phi limit");
626 AddExecInfo(
pt,
"coneseg",
"2 or 3 (Phi, Z)");
635 auto c = create_canvas(
"An Elliptical tube");
647 if (iaxis >= 2 && iaxis <= 3) {
652 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
661 if (!comments)
return;
667 text->SetTextColor(2);
668 AddMemberInfo(
pt,
"fA",eltu->
GetA(),
"semi-axis along x");
669 AddMemberInfo(
pt,
"fB",eltu->
GetB(),
"semi-axis along y");
670 AddMemberInfo(
pt,
"fDZ", eltu->
GetDZ(),
"half length in Z");
672 AddExecInfo(
pt,
"eltu",
"2 or 3 (Phi, Z)");
681 auto c = create_canvas(
"A spherical sector");
699 if (!comments)
return;
705 text->SetTextColor(2);
706 AddMemberInfo(
pt,
"fRmin", sphere->
GetRmin(),
"inner radius");
707 AddMemberInfo(
pt,
"fRmax", sphere->
GetRmax(),
"outer radius");
708 AddMemberInfo(
pt,
"fTheta1", sphere->
GetTheta1(),
"lower theta limit");
709 AddMemberInfo(
pt,
"fTheta2", sphere->
GetTheta2(),
"higher theta limit");
710 AddMemberInfo(
pt,
"fPhi1", sphere->
GetPhi1(),
"lower phi limit");
711 AddMemberInfo(
pt,
"fPhi2", sphere->
GetPhi2(),
"higher phi limit");
712 AddExecInfo(
pt,
"sphere");
721 auto c = create_canvas(
"A toroidal segment");
738 if (!comments)
return;
744 text->SetTextColor(2);
745 AddMemberInfo(
pt,
"fR", tor->
GetR(),
"radius of the ring");
746 AddMemberInfo(
pt,
"fRmin", tor->
GetRmin(),
"minimum radius");
747 AddMemberInfo(
pt,
"fRmax", tor->
GetRmax(),
"maximum radius");
748 AddMemberInfo(
pt,
"fPhi1", tor->
GetPhi1(),
"starting phi angle");
749 AddMemberInfo(
pt,
"fDphi", tor->
GetDphi(),
"phi range");
750 AddExecInfo(
pt,
"torus");
758 auto c = create_canvas(
"A trapezoid with dX varying");
770 if (iaxis == 2 || iaxis == 3) {
775 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
784 if (!comments)
return;
790 text->SetTextColor(2);
791 AddMemberInfo(
pt,
"fDx1",trd1->
GetDx1(),
"half length in X at lower Z surface(-dz)");
792 AddMemberInfo(
pt,
"fDx2",trd1->
GetDx2(),
"half length in X at higher Z surface(+dz)");
793 AddMemberInfo(
pt,
"fDy",trd1->
GetDy(),
"half length in Y");
794 AddMemberInfo(
pt,
"fDz",trd1->
GetDz(),
"half length in Z");
796 AddExecInfo(
pt,
"trd1",
"2 or 3 (Y, Z)");
805 auto c = create_canvas(
"A paraboloid segment");
824 if (!comments)
return;
829 text->SetTextColor(2);
830 AddMemberInfo(
pt,
"fRlo",par->
GetRlo(),
"radius at Z=-dz");
831 AddMemberInfo(
pt,
"fRhi",par->
GetRhi(),
"radius at Z=+dz");
832 AddMemberInfo(
pt,
"fDz",par->
GetDz(),
"half-length on Z axis");
833 pt->
AddText(
"----- A paraboloid is described by the equation:");
834 pt->
AddText(
"----- z = a*r*r + b; where: r = x*x + y*y");
835 pt->
AddText(
"----- Create with: TGeoParaboloid *parab = new TGeoParaboloid(rlo, rhi, dz);");
836 pt->
AddText(
"----- dz: half-length in Z (range from -dz to +dz");
837 pt->
AddText(
"----- rlo: radius at z=-dz given by: -dz = a*rlo*rlo + b");
838 pt->
AddText(
"----- rhi: radius at z=+dz given by: dz = a*rhi*rhi + b");
839 pt->
AddText(
"----- rlo != rhi; both >= 0");
840 AddExecInfo(
pt,
"parab");
848 auto c = create_canvas(
"A hyperboloid");
867 if (!comments)
return;
872 text->SetTextColor(2);
873 AddMemberInfo(
pt,
"fRmin", hype->
GetRmin(),
"minimum inner radius");
874 AddMemberInfo(
pt,
"fStIn", hype->
GetStIn(),
"inner surface stereo angle [deg]");
875 AddMemberInfo(
pt,
"fRmax", hype->
GetRmax(),
"minimum outer radius");
876 AddMemberInfo(
pt,
"fStOut",hype->
GetStOut(),
"outer surface stereo angle [deg]");
877 AddMemberInfo(
pt,
"fDz", hype->
GetDz(),
"half-length on Z axis");
878 pt->
AddText(
"----- A hyperboloid is described by the equation:");
879 pt->
AddText(
"----- r^2 - (tan(stereo)*z)^2 = rmin^2; where: r = x*x + y*y");
880 pt->
AddText(
"----- Create with: TGeoHype *hype = new TGeoHype(rin, stin, rout, stout, dz);");
881 pt->
AddText(
"----- rin < rout; rout > 0");
882 pt->
AddText(
"----- rin = 0; stin > 0 => inner surface conical");
883 pt->
AddText(
"----- stin/stout = 0 => corresponding surface cylindrical");
884 AddExecInfo(
pt,
"hype");
892 auto c = create_canvas(
"A polycone");
909 if (iaxis == 2 || iaxis == 3) {
914 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
923 if (!comments)
return;
928 text->SetTextColor(2);
929 AddMemberInfo(
pt,
"fPhi1",pcon->
GetPhi1(),
"lower phi limit");
930 AddMemberInfo(
pt,
"fDphi",pcon->
GetDphi(),
"phi range");
931 AddMemberInfo(
pt,
"fNz",pcon->
GetNz(),
"number of z planes");
934 "fZ[%i]=%5.2f fRmin[%i]=%5.2f fRmax[%i]=%5.2f",
937 text->SetTextColor(4);
938 text->SetTextAlign(12);
941 AddExecInfo(
pt,
"pcon",
"2 or 3 (Phi, Z)");
950 auto c = create_canvas(
"A polygone");
967 if (iaxis == 2 || iaxis == 3) {
972 printf(
"Wrong division axis %d. Allowed range is 2-3.\n", iaxis);
981 if (!comments)
return;
986 text->SetTextColor(2);
987 AddMemberInfo(
pt,
"fPhi1", pgon->
GetPhi1(),
"lower phi limit");
988 AddMemberInfo(
pt,
"fDphi", pgon->
GetDphi(),
"phi range");
989 AddMemberInfo(
pt,
"fNedges",pgon->
GetNedges(),
"number of edges");
990 AddMemberInfo(
pt,
"fNz", pgon->
GetNz(),
"number of z planes");
993 "fZ[%i]=%5.2f fRmin[%i]=%5.2f fRmax[%i]=%5.2f",
996 text->SetTextColor(4);
997 text->SetTextAlign(12);
1000 AddExecInfo(
pt,
"pgon",
"2 or 3 (Phi, Z)");
1009 auto c = create_canvas(
"An arbitrary polyhedron");
1036 if (!comments)
return;
1041 text->SetTextColor(2);
1042 AddMemberInfo(
pt,
"fDz",arb->
GetDz(),
"Z half length");
1045 text->SetTextColor(3);
1046 for (
Int_t i=0; i<4; i++) {
1048 text->SetTextSize(0.043);
1049 text->SetTextColor(4);
1052 text->SetTextColor(3);
1053 for (
Int_t i=4; i<8; i++) {
1055 text->SetTextSize(0.043);
1056 text->SetTextColor(4);
1059 AddExecInfo(
pt,
"arb8");
1068 auto c = create_canvas(
"A trapezoid with dX and dY varying with Z");
1085 printf(
"Wrong division axis %d. Allowed is only 3.\n", iaxis);
1094 if (!comments)
return;
1100 text->SetTextColor(2);
1101 AddMemberInfo(
pt,
"fDx1",trd2->
GetDx1(),
"half length in X at lower Z surface(-dz)");
1102 AddMemberInfo(
pt,
"fDx2",trd2->
GetDx2(),
"half length in X at higher Z surface(+dz)");
1103 AddMemberInfo(
pt,
"fDy1",trd2->
GetDy1(),
"half length in Y at lower Z surface(-dz)");
1104 AddMemberInfo(
pt,
"fDy2",trd2->
GetDy2(),
"half length in Y at higher Z surface(-dz)");
1105 AddMemberInfo(
pt,
"fDz",trd2->
GetDz(),
"half length in Z");
1107 AddExecInfo(
pt,
"trd2",
"only 3 (Z)");
1116 auto c = create_canvas(
"A more general trapezoid");
1124 TGeoVolume *vol =
gGeoManager->
MakeTrap(
"Trap",med, 30,15,30,20,10,15,0,20,10,15,0);
1133 printf(
"Wrong division axis %d. Allowed is only 3.\n", iaxis);
1142 if (!comments)
return;
1148 text->SetTextColor(2);
1149 AddMemberInfo(
pt,
"fDz",trap->
GetDz(),
"half length in Z");
1150 AddMemberInfo(
pt,
"fTheta",trap->
GetTheta(),
"theta angle of trapezoid axis");
1151 AddMemberInfo(
pt,
"fPhi",trap->
GetPhi(),
"phi angle of trapezoid axis");
1152 AddMemberInfo(
pt,
"fH1",trap->
GetH1(),
"half length in y at -fDz");
1153 AddMemberInfo(
pt,
"fAlpha1",trap->
GetAlpha1(),
"angle between centers of x edges and y axis at -fDz");
1154 AddMemberInfo(
pt,
"fBl1",trap->
GetBl1(),
"half length in x at -dZ and y=-fH1");
1155 AddMemberInfo(
pt,
"fTl1",trap->
GetTl1(),
"half length in x at -dZ and y=+fH1");
1156 AddMemberInfo(
pt,
"fH2",trap->
GetH2(),
"half length in y at +fDz");
1157 AddMemberInfo(
pt,
"fBl2",trap->
GetBl2(),
"half length in x at +dZ and y=-fH1");
1158 AddMemberInfo(
pt,
"fTl2",trap->
GetTl2(),
"half length in x at +dZ and y=+fH1");
1159 AddMemberInfo(
pt,
"fAlpha2",trap->
GetAlpha2(),
"angle between centers of x edges and y axis at +fDz");
1161 AddExecInfo(
pt,
"trap",
"only 3 (Z)");
1170 auto c = create_canvas(
"A twisted trapezoid");
1178 TGeoVolume *vol =
gGeoManager->
MakeGtra(
"Gtra",med, 30,15,30,30,20,10,15,0,20,10,15,0);
1187 printf(
"Wrong division axis %d. Allowed is only 3.\n", iaxis);
1196 if (!comments)
return;
1202 text->SetTextColor(2);
1203 AddMemberInfo(
pt,
"fDz",trap->
GetDz(),
"half length in Z");
1204 AddMemberInfo(
pt,
"fTheta",trap->
GetTheta(),
"theta angle of trapezoid axis");
1205 AddMemberInfo(
pt,
"fPhi",trap->
GetPhi(),
"phi angle of trapezoid axis");
1207 AddMemberInfo(
pt,
"fH1",trap->
GetH1(),
"half length in y at -fDz");
1208 AddMemberInfo(
pt,
"fAlpha1",trap->
GetAlpha1(),
"angle between centers of x edges and y axis at -fDz");
1209 AddMemberInfo(
pt,
"fBl1",trap->
GetBl1(),
"half length in x at -dZ and y=-fH1");
1210 AddMemberInfo(
pt,
"fTl1",trap->
GetTl1(),
"half length in x at -dZ and y=+fH1");
1211 AddMemberInfo(
pt,
"fH2",trap->
GetH2(),
"half length in y at +fDz");
1212 AddMemberInfo(
pt,
"fBl2",trap->
GetBl2(),
"half length in x at +dZ and y=-fH1");
1213 AddMemberInfo(
pt,
"fTl2",trap->
GetTl2(),
"half length in x at +dZ and y=+fH1");
1214 AddMemberInfo(
pt,
"fAlpha2",trap->
GetAlpha2(),
"angle between centers of x edges and y axis at +fDz");
1216 AddExecInfo(
pt,
"gtra",
"only 3 (Z)");
1225 auto c = create_canvas(
"A twisted trapezoid");
1235 Double_t x[8] = {-30,-30,30,30,15,15,-15,-15};
1236 Double_t y[8] = {-30,30,30,-30,-30,15,15,-30};
1251 if (!comments)
return;
1256 text->SetTextColor(2);
1257 AddMemberInfo(
pt,
"fNvert",xtru->
GetNvert(),
"number of polygone vertices");
1258 AddMemberInfo(
pt,
"fNz",xtru->
GetNz(),
"number of Z sections");
1259 pt->
AddText(
"----- Any Z section is an arbitrary polygone");
1260 pt->
AddText(
"----- The shape can have an arbitrary number of Z sections, as for pcon/pgon");
1261 pt->
AddText(
"----- Create with: TGeoXtru *xtru = new TGeoXtru(nz);");
1262 pt->
AddText(
"----- Define the blueprint polygon :");
1263 pt->
AddText(
"----- Double_t x[8] = {-30,-30,30,30,15,15,-15,-15};");
1264 pt->
AddText(
"----- Double_t y[8] = {-30,30,30,-30,-30,15,15,-30};");
1265 pt->
AddText(
"----- xtru->DefinePolygon(8,x,y);");
1266 pt->
AddText(
"----- Define translations/scales of the blueprint for Z sections :");
1267 pt->
AddText(
"----- xtru->DefineSection(i, Zsection, x0, y0, scale);");
1268 pt->
AddText(
"----- Sections have to be defined in increasing Z order");
1269 pt->
AddText(
"----- 2 sections can be defined at same Z (not for first/last sections)");
1270 AddExecInfo(
pt,
"xtru");
1280 auto c = create_canvas(
"A tessellated shape");
1290 std::vector<Tessellated::Vertex_t> vert;
1292 vert.emplace_back(0, 0.5 * (1 + sqrt5), -1); vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5)); vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5)); vert.emplace_back(-1, 1, -1);
1293 vert.emplace_back(1, 1, -1); vert.emplace_back(0, 0.5 * (1 + sqrt5), -1); vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5)); vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1294 vert.emplace_back(1, 1, -1); vert.emplace_back(0, 0.5 * (1 + sqrt5), -1); vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5), 0); vert.emplace_back(0.5 * (1 + sqrt5), 1, 0);
1295 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5), 0); vert.emplace_back(0, 0.5 * (1 + sqrt5), -1); vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5), 0); vert.emplace_back(0, 0.5 * (1 + sqrt5), 1);
1296 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5), 0); vert.emplace_back(0, 0.5 * (1 + sqrt5), -1); vert.emplace_back(-1, 1, -1); vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0);
1297 vert.emplace_back(1, 1, -1); vert.emplace_back(0.5 * (1 + sqrt5), 1, 0); vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (1 - sqrt5)); vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1298 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (1 - sqrt5)); vert.emplace_back(0.5 * (1 + sqrt5), -1, 0); vert.emplace_back(1, -1, -1); vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1299 vert.emplace_back(1, -1, -1); vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1); vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5)); vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5));
1300 vert.emplace_back(1, 0, 0.5 * (-1 - sqrt5)); vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5)); vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5)); vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5));
1301 vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5), 0); vert.emplace_back(0.5 * (1 + sqrt5), 1, 0); vert.emplace_back(1, 1, 1); vert.emplace_back(0, 0.5 * (1 + sqrt5), 1);
1302 vert.emplace_back(0.5 * (1 + sqrt5), 1, 0); vert.emplace_back(1, 1, 1); vert.emplace_back(1, 0, 0.5 * (1 + sqrt5)); vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (-1 + sqrt5));
1303 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (1 - sqrt5)); vert.emplace_back(0.5 * (1 + sqrt5), 1, 0); vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (-1 + sqrt5)); vert.emplace_back(0.5 * (1 + sqrt5), -1, 0);
1304 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5), 0); vert.emplace_back(0, 0.5 * (1 + sqrt5), 1); vert.emplace_back(-1, 1, 1); vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0);
1305 vert.emplace_back(0, 0.5 * (1 + sqrt5), 1); vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5)); vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5)); vert.emplace_back(-1, 1, 1);
1306 vert.emplace_back(1, 1, 1); vert.emplace_back(0, 0.5 * (1 + sqrt5), 1); vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5)); vert.emplace_back(1, 0, 0.5 * (1 + sqrt5));
1307 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5)); vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5)); vert.emplace_back(0, 0.5 * (-1 + sqrt5), 0.5 * (1 + sqrt5)); vert.emplace_back(1, 0, 0.5 * (1 + sqrt5));
1308 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5)); vert.emplace_back(1, 0, 0.5 * (1 + sqrt5)); vert.emplace_back(1, -1, 1); vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1);
1309 vert.emplace_back(0.5 * (1 + sqrt5), 0, 0.5 * (-1 + sqrt5)); vert.emplace_back(0.5 * (1 + sqrt5), -1, 0); vert.emplace_back(1, -1, 1); vert.emplace_back(1, 0, 0.5 * (1 + sqrt5));
1310 vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5)); vert.emplace_back(-1, 1, 1); vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0); vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (-1 + sqrt5));
1311 vert.emplace_back(-1, -1, 1); vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5)); vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (-1 + sqrt5)); vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0);
1312 vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (1 + sqrt5)); vert.emplace_back(-1, 0, 0.5 * (1 + sqrt5)); vert.emplace_back(-1, -1, 1); vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1);
1313 vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0); vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (1 - sqrt5)); vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0); vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (-1 + sqrt5));
1314 vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0); vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (1 - sqrt5)); vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5)); vert.emplace_back(-1, -1, -1);
1315 vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1); vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5), 0); vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0); vert.emplace_back(-1, -1, -1);
1316 vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5), 0); vert.emplace_back(0.5 * (-1 - sqrt5), -1, 0); vert.emplace_back(-1, -1, 1); vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1);
1317 vert.emplace_back(-1, 1, -1); vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5)); vert.emplace_back(0.5 * (-1 - sqrt5), 0, 0.5 * (1 - sqrt5)); vert.emplace_back(0.5 * (-1 - sqrt5), 1, 0);
1318 vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1); vert.emplace_back(0, 0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5)); vert.emplace_back(-1, 0, 0.5 * (-1 - sqrt5)); vert.emplace_back(-1, -1, -1);
1319 vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1); vert.emplace_back(0.5 * (1 - sqrt5), 0.5 * (-1 - sqrt5), 0); vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1); vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5), 0);
1320 vert.emplace_back(1, -1, -1); vert.emplace_back(0.5 * (1 + sqrt5), -1, 0); vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5), 0); vert.emplace_back(0, 0.5 * (-1 - sqrt5), -1);
1321 vert.emplace_back(0.5 * (1 + sqrt5), -1, 0); vert.emplace_back(1, -1, 1); vert.emplace_back(0, 0.5 * (-1 - sqrt5), 1); vert.emplace_back(0.5 * (-1 + sqrt5), 0.5 * (-1 - sqrt5), 0);
1323 tsl->
AddFacet(vert[0], vert[1], vert[2], vert[3]);
1324 tsl->
AddFacet(vert[4], vert[7], vert[6], vert[5]);
1325 tsl->
AddFacet(vert[8], vert[9], vert[10], vert[11]);
1326 tsl->
AddFacet(vert[12], vert[15], vert[14], vert[13]);
1327 tsl->
AddFacet(vert[16], vert[17], vert[18], vert[19]);
1328 tsl->
AddFacet(vert[20], vert[21], vert[22], vert[23]);
1329 tsl->
AddFacet(vert[24], vert[25], vert[26], vert[27]);
1330 tsl->
AddFacet(vert[28], vert[29], vert[30], vert[31]);
1331 tsl->
AddFacet(vert[32], vert[35], vert[34], vert[33]);
1332 tsl->
AddFacet(vert[36], vert[39], vert[38], vert[37]);
1333 tsl->
AddFacet(vert[40], vert[41], vert[42], vert[43]);
1334 tsl->
AddFacet(vert[44], vert[45], vert[46], vert[47]);
1335 tsl->
AddFacet(vert[48], vert[51], vert[50], vert[49]);
1336 tsl->
AddFacet(vert[52], vert[55], vert[54], vert[53]);
1337 tsl->
AddFacet(vert[56], vert[57], vert[58], vert[59]);
1338 tsl->
AddFacet(vert[60], vert[63], vert[62], vert[61]);
1339 tsl->
AddFacet(vert[64], vert[67], vert[66], vert[65]);
1340 tsl->
AddFacet(vert[68], vert[71], vert[70], vert[69]);
1341 tsl->
AddFacet(vert[72], vert[73], vert[74], vert[75]);
1342 tsl->
AddFacet(vert[76], vert[77], vert[78], vert[79]);
1343 tsl->
AddFacet(vert[80], vert[81], vert[82], vert[83]);
1344 tsl->
AddFacet(vert[84], vert[87], vert[86], vert[85]);
1345 tsl->
AddFacet(vert[88], vert[89], vert[90], vert[91]);
1346 tsl->
AddFacet(vert[92], vert[93], vert[94], vert[95]);
1347 tsl->
AddFacet(vert[96], vert[99], vert[98], vert[97]);
1348 tsl->
AddFacet(vert[100], vert[101], vert[102], vert[103]);
1349 tsl->
AddFacet(vert[104], vert[107], vert[106], vert[105]);
1350 tsl->
AddFacet(vert[108], vert[111], vert[110], vert[109]);
1351 tsl->
AddFacet(vert[112], vert[113], vert[114], vert[115]);
1352 tsl->
AddFacet(vert[116], vert[117], vert[118], vert[119]);
1363 if (!comments)
return;
1368 text->SetTextColor(2);
1369 AddMemberInfo(
pt,
"fNfacets",tsl->
GetNfacets(),
"number of facets");
1370 AddMemberInfo(
pt,
"fNvertices",tsl->
GetNvertices(),
"number of vertices");
1371 pt->
AddText(
"----- A tessellated shape is defined by the number of facets");
1372 pt->
AddText(
"----- facets can be added using AddFacet");
1373 pt->
AddText(
"----- Create with: TGeoTessellated *tsl = new TGeoTessellated(nfacets);");
1374 AddExecInfo(
pt,
"tessellated");
1382 auto c = create_canvas(
"A Boolean shape composition");
1411 if (!comments)
return;
1416 text->SetTextColor(2);
1417 pt->
AddText(
"----- Define the shape components and don't forget to name them");
1418 pt->
AddText(
"----- Define geometrical transformations that apply to shape components");
1419 pt->
AddText(
"----- Name all transformations and register them");
1420 pt->
AddText(
"----- Define the composite shape based on a Boolean expression");
1421 pt->
AddText(
" TGeoCompositeShape(\"someName\", \"expression\")");
1422 pt->
AddText(
"----- Expression is made of <shapeName:transfName> components related by Boolean operators");
1423 pt->
AddText(
"----- Boolean operators can be: (+) union, (-) subtraction and (*) intersection");
1424 pt->
AddText(
"----- Use parenthesis in the expression to force precedence");
1425 AddExecInfo(
pt,
"composite");
1466 auto c = create_canvas(
"Ideal geometry");
1488 if (!comments)
return;
1493 text->SetTextColor(2);
1494 pt->
AddText(
"-- Create physical nodes for the objects you want to align");
1495 pt->
AddText(
"-- You must start from a valid CLOSED geometry");
1496 pt->
AddText(
" TGeoPhysicalNode *node = gGeoManager->MakePhysicalNode(const char *path)");
1497 pt->
AddText(
" + creates a physical node represented by path, e.g. TOP_1/A_2/B_3");
1498 pt->
AddText(
" node->Align(TGeoMatrix *newmat, TGeoShape *newshape, Bool_t check=kFALSE)");
1499 pt->
AddText(
" + newmat = new matrix to replace final node LOCAL matrix");
1500 pt->
AddText(
" + newshape = new shape to replace final node shape");
1501 pt->
AddText(
" + check = optional check if the new aligned node is overlapping");
1520 printf(
"Click: <Ideal geometry> first\n");
1524 for (
Int_t i=1; i<=10; i++) {
1525 for (
Int_t j=1; j<=10; j++) {
1565 bar->
AddButton(
"How to run ",
"help()",
"Instructions for running this macro");
1566 bar->
AddButton(
"Arb8 ",
"arb8()",
"An arbitrary polyhedron defined by vertices (max 8) sitting on 2 parallel planes");
1567 bar->
AddButton(
"Box ",
"box()",
"A box shape.");
1568 bar->
AddButton(
"Composite ",
"composite()",
"A composite shape");
1569 bar->
AddButton(
"Cone ",
"cone()",
"A conical tube");
1570 bar->
AddButton(
"Cone segment",
"coneseg()",
"A conical segment");
1571 bar->
AddButton(
"Cut tube ",
"ctub()",
"A cut tube segment");
1572 bar->
AddButton(
"Elliptical tube",
"eltu()",
"An elliptical tube");
1573 bar->
AddButton(
"Extruded poly",
"xtru()",
"A general polygone extrusion");
1574 bar->
AddButton(
"Hyperboloid ",
"hype()",
"A hyperboloid");
1575 bar->
AddButton(
"Paraboloid ",
"parab()",
"A paraboloid");
1576 bar->
AddButton(
"Polycone ",
"pcon()",
"A polycone shape");
1577 bar->
AddButton(
"Polygone ",
"pgon()",
"A polygone");
1578 bar->
AddButton(
"Parallelepiped",
"para()",
"A parallelepiped shape");
1579 bar->
AddButton(
"Sphere ",
"sphere()",
"A spherical sector");
1580 bar->
AddButton(
"Trd1 ",
"trd1()",
"A trapezoid with dX varying with Z");
1581 bar->
AddButton(
"Trd2 ",
"trd2()",
"A trapezoid with both dX and dY varying with Z");
1582 bar->
AddButton(
"Trapezoid ",
"trap()",
"A general trapezoid");
1583 bar->
AddButton(
"Torus ",
"torus()",
"A toroidal segment");
1584 bar->
AddButton(
"Tube ",
"tube()",
"A tube with inner and outer radius");
1585 bar->
AddButton(
"Tube segment",
"tubeseg()",
"A tube segment");
1586 bar->
AddButton(
"Twisted trap",
"gtra()",
"A twisted trapezoid");
1587 bar->
AddButton(
"Tessellated ",
"tessellated()",
"A tessellated shape");
1588 bar->
AddButton(
"Aligned (ideal)",
"ideal()",
"An ideal (un-aligned) geometry");
1589 bar->
AddButton(
"Un-aligned",
"align()",
"Some alignment operation");
1590 bar->
AddButton(
"RAY-TRACE ON/OFF",
"raytrace()",
"Toggle ray-tracing mode");
1591 bar->
AddButton(
"COMMENTS ON/OFF",
"comments = !comments;",
"Toggle explanations pad ON/OFF");
1592 bar->
AddButton(
"AXES ON/OFF",
"axes()",
"Toggle axes ON/OFF");
1593 bar->
AddButton(
"AUTOROTATE ON/OFF",
"autorotate()",
"Toggle autorotation ON/OFF");
1595 gROOT->SaveContext();
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 text
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TRandom * gRandom
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetLineColor(Color_t lcolor)
Set the line 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.
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.
void SetVisRaytrace(Bool_t flag=kTRUE)
virtual Double_t GetDZ() const
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:
virtual Double_t GetRmax2() const
virtual Double_t GetRmin2() const
virtual Double_t GetRmin1() const
virtual Double_t GetRmax1() const
An elliptical tube is defined by the two semi-axes A and B.
virtual Double_t GetA() const
virtual Double_t GetB() const
Double_t GetTwistAngle() const
A hyperboloid is represented as a solid limited by two planes perpendicular to the Z axis (top and bo...
Double_t GetStOut() const
The manager class for any TGeo geometry.
TGeoVolume * MakeCone(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2)
Make in one step a volume pointing to a cone shape with given medium.
TGeoVolume * MakeXtru(const char *name, TGeoMedium *medium, Int_t nz)
Make a TGeoXtru-shaped volume with nz planes.
TGeoVolume * MakePcon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nz)
Make in one step a volume pointing to a polycone shape with given medium.
TGeoVolume * MakeTube(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
TGeoVolume * MakeCons(const char *name, TGeoMedium *medium, Double_t dz, Double_t rmin1, Double_t rmax1, Double_t rmin2, Double_t rmax2, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a cone segment shape with given medium.
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
TGeoVolume * MakePara(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz, Double_t alpha, Double_t theta, Double_t phi)
Make in one step a volume pointing to a parallelepiped shape with given medium.
TGeoPhysicalNode * MakePhysicalNode(const char *path=nullptr)
Makes a physical node corresponding to a path.
TGeoVolume * MakeTorus(const char *name, TGeoMedium *medium, Double_t r, Double_t rmin, Double_t rmax, Double_t phi1=0, Double_t dphi=360)
Make in one step a volume pointing to a torus shape with given medium.
void CloseGeometry(Option_t *option="d")
Closing geometry implies checking the geometry validity, fixing shapes with negative parameters (run-...
TGeoVolume * MakeTrd2(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy1, Double_t dy2, Double_t dz)
Make in one step a volume pointing to a TGeoTrd2 shape with given medium.
TGeoVolume * MakeGtra(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t twist, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
Make in one step a volume pointing to a twisted trapezoid shape with given medium.
TGeoVolume * MakeBox(const char *name, TGeoMedium *medium, Double_t dx, Double_t dy, Double_t dz)
Make in one step a volume pointing to a box shape with given medium.
TGeoVolume * MakeTrd1(const char *name, TGeoMedium *medium, Double_t dx1, Double_t dx2, Double_t dy, Double_t dz)
Make in one step a volume pointing to a TGeoTrd1 shape with given medium.
TGeoVolume * MakeSphere(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t themin=0, Double_t themax=180, Double_t phimin=0, Double_t phimax=360)
Make in one step a volume pointing to a sphere shape with given medium.
void SetTopVolume(TGeoVolume *vol)
Set the top volume and corresponding node as starting point of the geometry.
TGeoVolume * MakeCtub(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2, Double_t lx, Double_t ly, Double_t lz, Double_t tx, Double_t ty, Double_t tz)
Make in one step a volume pointing to a tube segment shape with given medium.
TGeoVolume * MakePgon(const char *name, TGeoMedium *medium, Double_t phi, Double_t dphi, Int_t nedges, Int_t nz)
Make in one step a volume pointing to a polygone shape with given medium.
TGeoVolume * MakeTrap(const char *name, TGeoMedium *medium, Double_t dz, Double_t theta, Double_t phi, Double_t h1, Double_t bl1, Double_t tl1, Double_t alpha1, Double_t h2, Double_t bl2, Double_t tl2, Double_t alpha2)
Make in one step a volume pointing to a trapezoid shape with given medium.
void SetNsegments(Int_t nseg)
Set number of segments for approximating circles in drawing.
TGeoVolume * GetTopVolume() const
TObjArray * GetListOfPhysicalNodes()
TGeoVolume * MakeHype(const char *name, TGeoMedium *medium, Double_t rin, Double_t stin, Double_t rout, Double_t stout, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
TGeoVolume * MakeParaboloid(const char *name, TGeoMedium *medium, Double_t rlo, Double_t rhi, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
TGeoVolume * MakeTubs(const char *name, TGeoMedium *medium, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi1, Double_t phi2)
Make in one step a volume pointing to a tube segment shape with given medium.
TGeoVolume * MakeEltu(const char *name, TGeoMedium *medium, Double_t a, Double_t b, Double_t dz)
Make in one step a volume pointing to a tube shape with given medium.
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.
TGeoVolume * GetVolume() const
Double_t GetStart() const
A polycone is represented by a sequence of tubes/cones, glued together at defined Z planes.
Double_t * GetRmax() const
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.
Double_t * GetRmin() const
Polygons are defined in the same way as polycones, the difference being just that the segments betwee...
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
TGeoSphere are not just balls having internal and external radii, but sectors of a sphere having defi...
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.
The torus is defined by its axial radius, its inner and outer radius.
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
A trapezoid with only X varying with Z.
A trapezoid with only X varying with Z.
A tube segment is a tube having a range in phi.
virtual Double_t GetRmin() const
virtual Double_t GetDz() const
virtual Double_t GetRmax() const
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
virtual void cd(Int_t inode) const
Actualize matrix of node indexed <inode>
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.
Bool_t IsRaytracing() const
Check if the painter is currently ray-tracing the content of this volume.
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.
TObject * At(Int_t idx) const override
Mother of all ROOT objects.
virtual void Clear(Option_t *="")
virtual TObject * FindObject(const char *name) const
Must be redefined in derived classes.
TObject * FindObject(const char *name) const override
Search if object named name is inside this pad or in pads inside this pad.
A Pave (see TPave) with text, lines or/and boxes inside.
virtual TText * AddText(Double_t x1, Double_t y1, const char *label)
Add a new Text line to this pavetext at given coordinates.
virtual void SetAllWith(const char *text, Option_t *option, Double_t value)
Set attribute option for all lines containing string text.
void Draw(Option_t *option="") override
Draw this pavetext with its current attributes.
Bool_t ProcessEvents()
Process events if timer did time out.
Random number generator class based on M.
Double_t Rndm() override
Machine independent random number generator.
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.
Base class for several text objects.
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.