66 while (
line.Length() < 10)
71 text->SetTextAlign(12);
78 while (
line.Length() < 10)
83 text->SetTextAlign(12);
96 text->SetTextColor(3);
97 text->SetTextAlign(12);
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");
114 pave->SetAllWith(
"-----",
"color", 2);
115 pave->SetAllWith(
"-----",
"font", 72);
116 pave->SetAllWith(
"-----",
"size", 0.04);
119 text->SetTextColor(4);
123 pave->SetTextSize(0.044);
124 pave->SetTextAlign(12);
150 return (1 +
Int_t(color));
159 bool drawn =
gPad->GetListOfPrimitives()->FindObject(top);
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");
188 hdemo->SetTextAlign(12);
189 hdemo->SetTextFont(52);
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 with x3d> from the <View> menu to get an x3d view");
199 hdemo->AddText(
"- .... same methods 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");
210 hdemo->SetAllWith(
"....",
"color", 2);
211 hdemo->SetAllWith(
"....",
"font", 72);
212 hdemo->SetAllWith(
"....",
"size", 0.03);
245 if (
timer->ProcessEvents())
247 if (
gROOT->IsInterrupted())
256 view =
gPad->GetView();
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);
333 text->SetTextColor(2);
369 printf(
"Wrong division axis %d. Allowed range is 1-3.\n",
iaxis);
385 text->SetTextColor(2);
421 printf(
"Wrong division axis %d. Allowed range is 1-3.\n",
iaxis);
437 text->SetTextColor(2);
468 printf(
"Wrong division axis %d. Allowed range is 1-3.\n",
iaxis);
487 text->SetTextColor(2);
525 gGeoManager->
MakeCtub(
"CTUB",
med, 20, 30, 40, -30, 250,
nlow[0],
nlow[1],
nlow[2],
nhi[0],
nhi[1],
nhi[2]);
533 printf(
"Wrong division axis %d. Allowed range is 1-2.\n",
iaxis);
552 text->SetTextColor(2);
586 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
603 text->SetTextColor(2);
638 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
654 text->SetTextColor(2);
691 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
707 text->SetTextColor(2);
747 text->SetTextColor(2);
788 text->SetTextColor(2);
821 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
837 text->SetTextColor(2);
878 text->SetTextColor(2);
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");
923 text->SetTextColor(2);
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");
954 pcon->DefineSection(0, 0, 15, 20);
955 pcon->DefineSection(1, 20, 15, 20);
956 pcon->DefineSection(2, 20, 15, 25);
957 pcon->DefineSection(3, 50, 15, 20);
968 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
983 text->SetTextColor(2);
991 text->SetTextColor(4);
992 text->SetTextAlign(12);
1015 pgon->DefineSection(0, -70, 45, 50);
1016 pgon->DefineSection(1, 0, 35, 40);
1017 pgon->DefineSection(2, 0, 30, 35);
1018 pgon->DefineSection(3, 70, 90, 100);
1029 printf(
"Wrong division axis %d. Allowed range is 2-3.\n",
iaxis);
1044 text->SetTextColor(2);
1053 text->SetTextColor(4);
1054 text->SetTextAlign(12);
1076 arb->SetVertex(0, -30, -25);
1077 arb->SetVertex(1, -25, 25);
1078 arb->SetVertex(2, 5, 25);
1079 arb->SetVertex(3, 25, -25);
1080 arb->SetVertex(4, -28, -23);
1081 arb->SetVertex(5, -23, 27);
1082 arb->SetVertex(6, -23, 27);
1083 arb->SetVertex(7, 13, -27);
1100 text->SetTextColor(2);
1104 text->SetTextColor(3);
1105 for (
Int_t i = 0; i < 4; i++) {
1107 text->SetTextSize(0.043);
1108 text->SetTextColor(4);
1111 text->SetTextColor(3);
1112 for (
Int_t i = 4; i < 8; i++) {
1114 text->SetTextSize(0.043);
1115 text->SetTextColor(4);
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);
1162 text->SetTextColor(2);
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);
1213 text->SetTextColor(2);
1218 AddMemberInfo(
pt,
"fAlpha1",
trap->GetAlpha1(),
"angle between centers of x edges and y axis at -fDz");
1224 AddMemberInfo(
pt,
"fAlpha2",
trap->GetAlpha2(),
"angle between centers of x edges and y axis at +fDz");
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);
1270 text->SetTextColor(2);
1276 AddMemberInfo(
pt,
"fAlpha1",
trap->GetAlpha1(),
"angle between centers of x edges and y axis at -fDz");
1282 AddMemberInfo(
pt,
"fAlpha2",
trap->GetAlpha2(),
"angle between centers of x edges and y axis at +fDz");
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};
1306 xtru->DefinePolygon(8,
x,
y);
1307 xtru->DefineSection(0, -40, -20., 10., 1.5);
1308 xtru->DefineSection(1, 10, 0., 0., 0.5);
1309 xtru->DefineSection(2, 10, 0., 0., 0.7);
1310 xtru->DefineSection(3, 40, 10., 20., 0.9);
1326 text->SetTextColor(2);
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)");
1361 std::vector<Tessellated::Vertex_t>
vert;
1363 vert.emplace_back(0, 0.5 * (1 +
sqrt5), -1);
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);
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);
1374 vert.emplace_back(0.5 * (1 +
sqrt5), 1, 0);
1376 vert.emplace_back(0, 0.5 * (1 +
sqrt5), -1);
1378 vert.emplace_back(0, 0.5 * (1 +
sqrt5), 1);
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);
1386 vert.emplace_back(1, 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);
1394 vert.emplace_back(1, 0, 0.5 * (-1 -
sqrt5));
1395 vert.emplace_back(1, 0, 0.5 * (-1 -
sqrt5));
1397 vert.emplace_back(-1, 0, 0.5 * (-1 -
sqrt5));
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));
1408 vert.emplace_back(0.5 * (1 +
sqrt5), 1, 0);
1410 vert.emplace_back(0.5 * (1 +
sqrt5), -1, 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);
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);
1422 vert.emplace_back(1, 0, 0.5 * (1 +
sqrt5));
1424 vert.emplace_back(-1, 0, 0.5 * (1 +
sqrt5));
1426 vert.emplace_back(1, 0, 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);
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);
1439 vert.emplace_back(-1, -1, 1);
1440 vert.emplace_back(-1, 0, 0.5 * (1 +
sqrt5));
1442 vert.emplace_back(0.5 * (-1 -
sqrt5), -1, 0);
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);
1449 vert.emplace_back(0.5 * (-1 -
sqrt5), 1, 0);
1451 vert.emplace_back(0.5 * (-1 -
sqrt5), -1, 0);
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);
1457 vert.emplace_back(0.5 * (-1 -
sqrt5), -1, 0);
1458 vert.emplace_back(-1, -1, -1);
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));
1466 vert.emplace_back(0.5 * (-1 -
sqrt5), 1, 0);
1467 vert.emplace_back(0, 0.5 * (-1 -
sqrt5), -1);
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);
1473 vert.emplace_back(0, 0.5 * (-1 -
sqrt5), 1);
1475 vert.emplace_back(1, -1, -1);
1476 vert.emplace_back(0.5 * (1 +
sqrt5), -1, 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);
1530 text->SetTextColor(2);
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);");
1555 pgon->DefineSection(0, 0, 0, 20);
1556 pgon->DefineSection(1, 30, 0, 20);
1562 tr->RegisterYourself();
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");
1643 pgon->DefineSection(0, -5, 0., 2.);
1644 pgon->DefineSection(1, 5, 0., 2.);
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");
1687 printf(
"Click: <Ideal geometry> first\n");
1691 for (
Int_t i = 1; i <= 10; i++) {
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();
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.