65 while (
line.Length() < 10)
line.Append(
" ");
69 text->SetTextAlign(12);
76 while (
line.Length() < 10)
line.Append(
" ");
80 text->SetTextAlign(12);
91 text->SetTextColor(3);
92 text->SetTextAlign(12);
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");
109 pave->SetAllWith(
"-----",
"color",2);
110 pave->SetAllWith(
"-----",
"font",72);
111 pave->SetAllWith(
"-----",
"size",0.04);
114 text->SetTextColor(4);
118 pave->SetTextSize(0.044);
119 pave->SetTextAlign(12);
128 if (!
c || !vol)
return;
145 return (1+
Int_t(color));
153 bool drawn =
gPad->GetListOfPrimitives()->FindObject(top);
163 auto c =(
TCanvas *)
gROOT->GetListOfCanvases()->FindObject(
"geom_help");
169 c =
new TCanvas(
"geom_help",
"Help to run demos",200,10,700,600);
173 welcome->AddText(
"Welcome to the new geometry package");
180 hdemo->SetTextAlign(12);
181 hdemo->SetTextFont(52);
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");
202 hdemo->SetAllWith(
"....",
"color",2);
203 hdemo->SetAllWith(
"....",
"font",72);
204 hdemo->SetAllWith(
"....",
"size",0.03);
233 if (
timer->ProcessEvents())
break;
234 if (
gROOT->IsInterrupted())
break;
241 view =
gPad->GetView();
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);
315 text->SetTextColor(2);
349 printf(
"Wrong division axis %d. Allowed range is 1-3.\n",
iaxis);
364 text->SetTextColor(2);
398 printf(
"Wrong division axis %d. Allowed range is 1-3.\n",
iaxis);
413 text->SetTextColor(2);
442 printf(
"Wrong division axis %d. Allowed range is 1-3.\n",
iaxis);
460 text->SetTextColor(2);
496 TGeoVolume *vol =
gGeoManager->
MakeCtub(
"CTUB",
med, 20,30,40,-30,250,
nlow[0],
nlow[1],
nlow[2],
nhi[0],
nhi[1],
nhi[2]);
503 printf(
"Wrong division axis %d. Allowed range is 1-2.\n",
iaxis);
521 text->SetTextColor(2);
553 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
569 text->SetTextColor(2);
602 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
617 text->SetTextColor(2);
652 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
667 text->SetTextColor(2);
705 text->SetTextColor(2);
744 text->SetTextColor(2);
775 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
790 text->SetTextColor(2);
829 text->SetTextColor(2);
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");
872 text->SetTextColor(2);
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");
902 pcon->DefineSection(0,0,15,20);
903 pcon->DefineSection(1,20,15,20);
904 pcon->DefineSection(2,20,15,25);
905 pcon->DefineSection(3,50,15,20);
914 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
928 text->SetTextColor(2);
934 "fZ[%i]=%5.2f fRmin[%i]=%5.2f fRmax[%i]=%5.2f",
937 text->SetTextColor(4);
938 text->SetTextAlign(12);
960 pgon->DefineSection(0,-70,45,50);
961 pgon->DefineSection(1,0,35,40);
962 pgon->DefineSection(2,0,30,35);
963 pgon->DefineSection(3,70,90,100);
972 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
986 text->SetTextColor(2);
993 "fZ[%i]=%5.2f fRmin[%i]=%5.2f fRmax[%i]=%5.2f",
996 text->SetTextColor(4);
997 text->SetTextAlign(12);
1018 arb->SetVertex(0,-30,-25);
1019 arb->SetVertex(1,-25,25);
1020 arb->SetVertex(2,5,25);
1021 arb->SetVertex(3,25,-25);
1022 arb->SetVertex(4,-28,-23);
1023 arb->SetVertex(5,-23,27);
1024 arb->SetVertex(6,-23,27);
1025 arb->SetVertex(7,13,-27);
1041 text->SetTextColor(2);
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);
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);
1100 text->SetTextColor(2);
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);
1148 text->SetTextColor(2);
1153 AddMemberInfo(
pt,
"fAlpha1",
trap->GetAlpha1(),
"angle between centers of x edges and y axis at -fDz");
1159 AddMemberInfo(
pt,
"fAlpha2",
trap->GetAlpha2(),
"angle between centers of x edges and y axis at +fDz");
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);
1202 text->SetTextColor(2);
1208 AddMemberInfo(
pt,
"fAlpha1",
trap->GetAlpha1(),
"angle between centers of x edges and y axis at -fDz");
1214 AddMemberInfo(
pt,
"fAlpha2",
trap->GetAlpha2(),
"angle between centers of x edges and y axis at +fDz");
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};
1237 xtru->DefinePolygon(8,
x,
y);
1238 xtru->DefineSection(0,-40, -20., 10., 1.5);
1239 xtru->DefineSection(1, 10, 0., 0., 0.5);
1240 xtru->DefineSection(2, 10, 0., 0., 0.7);
1241 xtru->DefineSection(3, 40, 10., 20., 0.9);
1256 text->SetTextColor(2);
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)");
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);
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));
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));
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));
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);
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);
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);
1368 text->SetTextColor(2);
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);");
1392 pgon->DefineSection(0,0,0,20);
1393 pgon->DefineSection(1, 30,0,20);
1399 tr->RegisterYourself();
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");
1478 pgon->DefineSection(0,-5,0.,2.);
1479 pgon->DefineSection(1,5,0.,2.);
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++) {
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();
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
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 SetLineColor(Color_t lcolor)
Set the line color.
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
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...
void SetVisRaytrace(Bool_t flag=kTRUE)
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:
An elliptical tube is defined by the two semi-axes A and B.
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.
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.
Media are used to store properties related to tracking and which are useful only when using geometry ...
virtual TGeoMatrix * GetMatrix() const =0
A paraboloid is defined by the revolution surface generated by a parabola and is bounded by two plane...
Base finder class for patterns.
A polycone is represented by a sequence of tubes/cones, glued together at defined Z planes.
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...
The torus is defined by its axial radius, its inner and outer radius.
Class describing translations.
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.
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.
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...
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual void Clear(Option_t *="")
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.
Random number generator class based on M.
Double_t Rndm() override
Machine independent random number generator.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
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.