Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoVolumeEditor.cxx
Go to the documentation of this file.
1// @(#):$Id$
2// Author: M.Gheata
3
4/*************************************************************************
5 * Copyright (C) 1995-2002, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TGeoVolumeEditor
13\ingroup Geometry_builder
14
15Editor for geometry volumes and assemblies of volumes. Besides the volume
16name and line attributes, a TGeoVolume has the following editable categories
17split vertically by a shutter:
18
19 - Properties: one can edit the shape and medium components from here. It is
20 also possible to change the existing ones.
21 - Daughters: the main category allowing defining, editing, removing or
22 positioning daughter volumes inside the current edited volume. To add a
23 daughter, one needs to select first a volume and a matrix. Currently no check
24 is performed if the daughter volume creates an extrusion (illegal for tracking).
25 To remove or change the position of an existing daughter, one should simply
26 select the desired daughter from the combo box with the existing ones, then
27 simply click the appropriate button.
28 - Visualization: One can set the visibility of the volume and of its daughters,
29 set the visibility depth and the view type. Selecting "All" will draw the
30 volume and all visible daughters down to the selected level starting from the
31 edited volume. Selecting "Leaves" will draw just the deepest daughters within
32 the selected visibility level, without displaying the containers, while "Only"
33 will just draw the edited volume.
34 - Division: The category becomes active only if there are no daughters of the
35 edited volume added by normal positioning (e.g. from `<Daughters>` category). The
36 minimum allowed starting value for the selected division axis is automatically
37 selected, while the slicing step is set to 0 - meaning that only the number
38 of slices matter.
39*/
40
41#include "TGeoVolumeEditor.h"
42#include "TGeoVolume.h"
43#include "TGeoPatternFinder.h"
44#include "TGeoManager.h"
45#include "TGeoMatrix.h"
46#include "TGTab.h"
47#include "TGComboBox.h"
48#include "TGButton.h"
49#include "TGButtonGroup.h"
50#include "TGTextEntry.h"
51#include "TGNumberEntry.h"
52#include "TGLabel.h"
53#include "TGShutter.h"
54#include "TG3DLine.h"
55#include "TGeoTabManager.h"
56#include "TGedEditor.h"
57
59
66};
67
68////////////////////////////////////////////////////////////////////////////////
69/// Constructor for volume editor.
70
72 Int_t height, UInt_t options, Pixel_t back)
73 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
74{
75 fGeometry = 0;
76 fVolume = 0;
77
81
82 // TGShutter for categories
84 TGCompositeFrame *container, *f1;
85 Pixel_t color;
86 TGLabel *label;
87
88 // General settings
90 container = (TGCompositeFrame*)si->GetContainer();
93
94 // TextEntry for volume name
95 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
96 f1->AddFrame(label = new TGLabel(f1, "Volume name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
97 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
98 gClient->GetColorByName("#ff0000", color);
99 label->SetTextColor(color);
100 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
101 fVolumeName = new TGTextEntry(container, "", kVOL_NAME);
103 fVolumeName->SetToolTipText("Enter the volume name");
104 container->AddFrame(fVolumeName, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 3, 1, 2, 5));
105
106 // Current shape
107 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
108 f1->AddFrame(label = new TGLabel(f1, "Shape and medium"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
109 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
110 gClient->GetColorByName("#ff0000", color);
111 label->SetTextColor(color);
112 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
113 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
114 fSelectedShape = 0;
115 fLSelShape = new TGLabel(f1, "Select shape");
116 gClient->GetColorByName("#0000ff", color);
117 fLSelShape->SetTextColor(color);
119 f1->AddFrame(fLSelShape, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
121 fBSelShape->SetToolTipText("Replace with one of the existing shapes");
122 fBSelShape->Associate(this);
123 f1->AddFrame(fBSelShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
124 fEditShape = new TGTextButton(f1, "Edit");
125 f1->AddFrame(fEditShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
126 fEditShape->SetToolTipText("Edit selected shape");
127 fEditShape->Associate(this);
128 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
129
130 // Current medium
131 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
132 fSelectedMedium = 0;
133 fLSelMedium = new TGLabel(f1, "Select medium");
134 gClient->GetColorByName("#0000ff", color);
137 f1->AddFrame(fLSelMedium, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
139 fBSelMedium->SetToolTipText("Replace with one of the existing media");
140 fBSelMedium->Associate(this);
141 f1->AddFrame(fBSelMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
142 fEditMedium = new TGTextButton(f1, "Edit");
143 f1->AddFrame(fEditMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
144 fEditMedium->SetToolTipText("Edit selected medium");
145 fEditMedium->Associate(this);
146 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
147
148 // List of daughters
149 si = new TGShutterItem(fCategories, new TGHotString("Daughters"),kCAT_DAUGHTERS);
150 container = (TGCompositeFrame*)si->GetContainer();
152 fCategories->AddItem(si);
153
154 // Existing daughters
155 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
156 f1->AddFrame(label = new TGLabel(f1, "Existing daughters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
157 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
158 gClient->GetColorByName("#ff0000", color);
159 label->SetTextColor(color);
160 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
161
162 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kRaisedFrame);
165 fNodeList->Associate(this);
166 f1->AddFrame(fNodeList, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
167 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
168 // Buttons for editing matrix and removing node
169 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kSunkenFrame | kFixedWidth);
170 fEditMatrix = new TGTextButton(f1, "Position");
171 f1->AddFrame(fEditMatrix, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
172 fEditMatrix->SetToolTipText("Edit the position of selected node");
173 fEditMatrix->Associate(this);
174 fRemoveNode = new TGTextButton(f1, "Remove");
175 f1->AddFrame(fRemoveNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
176 fRemoveNode->SetToolTipText("Remove the selected node. Cannot undo !)");
177 fRemoveNode->Associate(this);
178 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
179
180 // Adding daughters
181 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
182 f1->AddFrame(label = new TGLabel(f1, "Add daughter"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
183 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
184 gClient->GetColorByName("#ff0000", color);
185 label->SetTextColor(color);
186 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
187
188 // Select from existing volumes
189 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
190 fSelectedVolume = 0;
191 fLSelVolume = new TGLabel(f1, "Select volume");
192 gClient->GetColorByName("#0000ff", color);
195 f1->AddFrame(fLSelVolume, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
197 fBSelVolume->SetToolTipText("Select one of the existing volumes");
198 fBSelVolume->Associate(this);
199 f1->AddFrame(fBSelVolume, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
200 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
201
202 // Matrix selection for nodes
203 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
204 fSelectedMatrix = 0;
205 fLSelMatrix = new TGLabel(f1, "Select matrix");
206 gClient->GetColorByName("#0000ff", color);
209 f1->AddFrame(fLSelMatrix, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
211 fBSelMatrix->SetToolTipText("Select one of the existing matrices");
212 fBSelMatrix->Associate(this);
213 f1->AddFrame(fBSelMatrix, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
214 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
215
216 // Copy number
217 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
218 f1->AddFrame(new TGLabel(f1, "Node id"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
224 nef->SetToolTipText("Enter node copy number");
225 fCopyNumber->Associate(this);
226 f1->AddFrame(fCopyNumber, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
227 fAddNode = new TGTextButton(f1, "Add");
228 f1->AddFrame(fAddNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
229 fAddNode->Associate(this);
230 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
231
232 // Visualization
233 si = new TGShutterItem(fCategories, new TGHotString("Visualization"),kCAT_VIS);
234 container = (TGCompositeFrame*)si->GetContainer();
236 fCategories->AddItem(si);
237
238 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
239 f1->AddFrame(/* label = */ new TGLabel(f1, "Visibility"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
240 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
241// gClient->GetColorByName("#ff0000", color);
242// label->SetTextColor(color);
243 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
244
246 fBVis[0] = new TGCheckButton(f1, "Volume");
247 fBVis[1] = new TGCheckButton(f1, "Nodes");
248 f1->AddFrame(fBVis[0], new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
249 f1->AddFrame(fBVis[1], new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
250 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
251
252 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
253 f1->AddFrame(new TGLabel(f1, "Depth"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
254// gClient->GetColorByName("#0000ff", color);
255// label->SetTextColor(color);
261 nef->SetToolTipText("Set visibility level here");
263 fEVisLevel->Associate(this);
264 f1->AddFrame(fEVisLevel, new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
265 fBAuto = new TGCheckButton(f1,"Auto");
266 f1->AddFrame(fBAuto, new TGLayoutHints(kLHintsRight, 0, 0, 2, 0));
267 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
268
269 TString stitle = "View";
270 TGButtonGroup *bg = new TGVButtonGroup(container, stitle);
271 fBView[0] = new TGRadioButton(bg, "All");
272 fBView[1] = new TGRadioButton(bg, "Leaves");
273 fBView[2] = new TGRadioButton(bg, "Only");
275 bg->Show();
276 container->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
277
279 fBRaytrace = new TGCheckButton(f1,"Raytrace");
280 f1->AddFrame(fBRaytrace, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
281 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
282
283 // Division
284 si = new TGShutterItem(fCategories, new TGHotString("Division"),kCAT_DIVISION);
285 container = (TGCompositeFrame*)si->GetContainer();
287 fCategories->AddItem(si);
288 // TextEntry for division name
289 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
290 f1->AddFrame(label = new TGLabel(f1, "Division name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
291 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
292 gClient->GetColorByName("#ff0000", color);
293 label->SetTextColor(color);
294 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
295 fDivName = new TGTextEntry(container, new TGTextBuffer(50), kDIV_NAME);
297 fDivName->SetToolTipText("Enter the volume name");
298 container->AddFrame(fDivName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
299 // Axis selection
300 stitle = "Axis";
301 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
302 bg = new TGVButtonGroup(f1, stitle);
303 fBDiv[0] = new TGRadioButton(bg, "Axis 1");
304 fBDiv[1] = new TGRadioButton(bg, "Axis 2");
305 fBDiv[2] = new TGRadioButton(bg, "Axis 3");
306 bg->Insert(fBDiv[0]);
307 bg->Insert(fBDiv[1]);
308 bg->Insert(fBDiv[2]);
310 f1->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
311 fApplyDiv = new TGTextButton(f1, "Apply");
312 fApplyDiv->SetToolTipText("Apply new division settings");
313 f1->AddFrame(fApplyDiv, new TGLayoutHints(kLHintsRight, 0, 2, 30, 0));
314 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
315 // Division range
316 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
317 f1->AddFrame(/* label = */ new TGLabel(f1, "Division parameters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
318 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
319// gClient->GetColorByName("#ff0000", color);
320// label->SetTextColor(color);
321 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
322 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
323 f1->AddFrame(/* label = */ new TGLabel(f1, "From"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
324// gClient->GetColorByName("#0000ff", color);
325// label->SetTextColor(color);
327// fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
328// fEDivFrom->SetNumAttr(TGNumberFormat::kNEAPositive);
331 nef->SetToolTipText("Set start value");
332 fEDivFrom->Associate(this);
333 f1->AddFrame(fEDivFrom, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
334 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
335
336 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
337 f1->AddFrame(/* label = */ new TGLabel(f1, "Step"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
338// gClient->GetColorByName("#0000ff", color);
339// label->SetTextColor(color);
341// fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
345 nef->SetToolTipText("Set division step");
346 fEDivStep->Associate(this);
347 f1->AddFrame(fEDivStep, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
348 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
349
350 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame |kFixedWidth);
351 f1->AddFrame(/* label = */ new TGLabel(f1, "Nslices"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
352// gClient->GetColorByName("#0000ff", color);
353// label->SetTextColor(color);
354 fEDivN = new TGNumberEntry(f1, 0, 5, kVOL_DIVN);
359 nef->SetToolTipText("Set number of slices");
360 fEDivN->Associate(this);
361 f1->AddFrame(fEDivN, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
362 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
363
364
365 fCategories->Resize(163,340);
367
370}
371
372////////////////////////////////////////////////////////////////////////////////
373/// Destructor
374
376{
377 TGCompositeFrame *cont;
378 cont = (TGCompositeFrame*)fCategories->GetItem("Properties")->GetContainer();
380 fCategories->GetItem("Properties")->SetCleanup(0);
381 cont = (TGCompositeFrame*)fCategories->GetItem("Daughters")->GetContainer();
383 fCategories->GetItem("Daughters")->SetCleanup(0);
384 cont = (TGCompositeFrame*)fCategories->GetItem("Visualization")->GetContainer();
386 fCategories->GetItem("Visualization")->SetCleanup(0);
387 cont = (TGCompositeFrame*)fCategories->GetItem("Division")->GetContainer();
389 fCategories->GetItem("Division")->SetCleanup(0);
390
391 delete fBView[0]; delete fBView[1]; delete fBView[2];
392 delete fBDiv [0]; delete fBDiv [1]; delete fBDiv [2];
393 Cleanup();
394}
395
396////////////////////////////////////////////////////////////////////////////////
397/// Connect signals to slots.
398
400{
401 fVolumeName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoVolumeName()");
402 fDivName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoDivName()");
403 fEditMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMedium()");
404 fEditShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditShape()");
405 fEditMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMatrix()");
406 fAddNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoAddNode()");
407 fRemoveNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRemoveNode()");
408 fBSelShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectShape()");
409 fBSelMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMedium()");
410 fBSelVolume->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectVolume()");
411 fBSelMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMatrix()");
412 fBVis[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisVolume()");
413 fBVis[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisDaughters()");
414 fBAuto->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisAuto()");
415 fEVisLevel->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoVisLevel()");
416 fBView[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewAll()");
417 fBView[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewLeaves()");
418 fBView[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewOnly()");
419 fBDiv[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
420 fBDiv[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
421 fBDiv[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
422 fEDivFrom->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivFromTo()");
423 fEDivStep->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivStep()");
424 fEDivN->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivN()");
425 fBRaytrace->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRaytrace()");
426 fApplyDiv->Connect("Clicked()", "TGeoVolumeEditor", this, "DoApplyDiv()");
427}
428
429////////////////////////////////////////////////////////////////////////////////
430/// Connect to the picked volume.
431
433{
434 if (obj == 0 || !obj->InheritsFrom(TGeoVolume::Class())) {
436 return;
437 }
438 fVolume = (TGeoVolume*)obj;
440 const char *vname = fVolume->GetName();
441 fVolumeName->SetText(vname);
446
448 TIter next2(fVolume->GetNodes());
449 TGeoNode *node;
450 Int_t icrt = 0;
451 while ((node=(TGeoNode*)next2()))
452 fNodeList->AddEntry(node->GetName(), icrt++);
453 fNodeList->Select(0);
455 if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
458 } else {
461 }
463 if (fVolume->IsAssembly()) {
466 }
478 } else {
479 fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
480 Double_t start=0., step=0., end = 0.;
481 Int_t ndiv = 2, iaxis = 1;
482 TString axis_name;
483 for (Int_t i=0; i<3; i++) {
484 axis_name = fVolume->GetShape()->GetAxisName(i+1);
485 fBDiv[i]->SetText(axis_name);
486 }
487
488 if (fVolume->GetFinder()) {
490 iaxis = fVolume->GetFinder()->GetDivAxis();
491 start = fVolume->GetFinder()->GetStart();
492 step = fVolume->GetFinder()->GetStep();
493 ndiv = fVolume->GetFinder()->GetNdiv();
494 } else {
495 fDivName->SetText("Enter name");
496 fSelectedShape->GetAxisRange(iaxis,start,end);
497 step = 0;
498 }
499 fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
500 fEDivFrom->SetNumber(start);
501 fEDivStep->SetNumber(step);
502 fEDivN->SetNumber(ndiv);
503 }
504
506 SetActive();
508}
509
510////////////////////////////////////////////////////////////////////////////////
511/// Add editors to fGedFrame and exclude TLineEditor.
512
514{
517}
518
519////////////////////////////////////////////////////////////////////////////////
520/// Modify volume name.
521
523{
525}
526
527////////////////////////////////////////////////////////////////////////////////
528/// Select a new shape.
529
531{
532 TGeoShape *shape = fSelectedShape;
533 new TGeoShapeDialog(fBSelShape, gClient->GetRoot(), 200,300);
536 else fSelectedShape = shape;
537}
538
539////////////////////////////////////////////////////////////////////////////////
540/// Select a new medium.
541
543{
545 new TGeoMediumDialog(fBSelMedium, gClient->GetRoot(), 200,300);
548 else fSelectedMedium = med;
549}
550
551////////////////////////////////////////////////////////////////////////////////
552/// Select a matrix for positioning.
553
555{
556 TGeoMatrix *matrix = fSelectedMatrix;
557 new TGeoMatrixDialog(fBSelMatrix, gClient->GetRoot(), 200,300);
560 else fSelectedMatrix = matrix;
561}
562
563////////////////////////////////////////////////////////////////////////////////
564/// Select a daughter volume.
565
567{
569 new TGeoVolumeDialog(fBSelVolume, gClient->GetRoot(), 200,300);
572 else fSelectedVolume = vol;
573 if (fSelectedVolume)
575}
576
577
578////////////////////////////////////////////////////////////////////////////////
579/// Edit the shape of the volume.
580
582{
584}
585
586////////////////////////////////////////////////////////////////////////////////
587/// Edit the medium of the volume.
588
590{
592}
593
594////////////////////////////////////////////////////////////////////////////////
595/// Edit the position of the selected node.
596
598{
599 if (!fVolume->GetNdaughters()) return;
601 if (i<0) return;
603}
604
605////////////////////////////////////////////////////////////////////////////////
606/// Add a daughter.
607
609{
610 if (!fSelectedVolume || fVolume->GetFinder()) return;
611 Int_t icopy = fCopyNumber->GetIntNumber();
614 fNodeList->AddEntry(fVolume->GetNode(nd-1)->GetName(), nd-1);
615 fNodeList->Select(nd-1);
616 fCopyNumber->SetNumber(nd+1);
622 Update();
623}
624
625////////////////////////////////////////////////////////////////////////////////
626/// Remove a daughter.
627
629{
630 if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
633 return;
634 }
636 if (i<0) return;
639 TIter next(fVolume->GetNodes());
640 TGeoNode *node;
641 i = 0;
642 while ((node=(TGeoNode*)next()))
643 fNodeList->AddEntry(node->GetName(), i++);
644 fNodeList->Select(0);
646 if (!fVolume->GetNdaughters()) {
649 fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
650 Double_t start=0., step=0., end=0.;
651 Int_t ndiv = 2, iaxis = 1;
652 fSelectedShape->GetAxisRange(iaxis,start,end);
653 step = end-start;
654 fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
655 fEDivFrom->SetNumber(start);
656 fEDivStep->SetNumber(step);
657 fEDivN->SetNumber(ndiv);
658 }
659 Update();
660}
661
662////////////////////////////////////////////////////////////////////////////////
663/// Slot for setting volume visible/invisible.
664
666{
668 if (fVolume->IsVisible() == on) return;
670 Update();
671}
672
673////////////////////////////////////////////////////////////////////////////////
674/// Slot for setting daughters visible/invisible.
675
677{
679 if (fVolume->IsVisibleDaughters() == on) return;
681 Update();
682}
683
684////////////////////////////////////////////////////////////////////////////////
685/// Slot for setting visibility depth auto.
686
688{
690 if ((fGeometry->GetVisLevel()==0) == on) return;
691 if (on) fGeometry->SetVisLevel(0);
693 Update();
694}
695
696////////////////////////////////////////////////////////////////////////////////
697/// Slot for visibility level.
698
700{
703 Update();
704}
705
706////////////////////////////////////////////////////////////////////////////////
707/// Slot for viewing volume and containers.
708
710{
712 if (!on) return;
713 if (fVolume->IsVisContainers() == on) return;
714 if (fVolume->IsRaytracing()) {
717 }
719 Update();
720}
721
722////////////////////////////////////////////////////////////////////////////////
723/// Slot for viewing last leaves only.
724
726{
728 if (!on) return;
729 if (fVolume->IsVisLeaves() == on) return;
730 if (fVolume->IsRaytracing()) {
733 }
735 Update();
736}
737
738////////////////////////////////////////////////////////////////////////////////
739/// Slot for viewing volume only.
740
742{
744 if (!on) return;
745 if (fVolume->IsVisOnly() == on) return;
746 if (fVolume->IsRaytracing()) {
749 }
751 Update();
752}
753
754////////////////////////////////////////////////////////////////////////////////
755/// Slot for raytracing.
756
758{
760 if (fVolume->IsRaytracing() == on) return;
762 Update();
763}
764
765////////////////////////////////////////////////////////////////////////////////
766/// Modify division name.
767
769{
771}
772
773////////////////////////////////////////////////////////////////////////////////
774/// Change division axis and preserve number of slices.
775
777{
778 Int_t iaxis = 1;
779 for (Int_t i=0; i<3; i++) {
780 if (fBDiv[i]->GetState()!=kButtonDown) continue;
781 iaxis = i+1;
782 break;
783 }
784 TGeoShape *shape = fVolume->GetShape();
785 if (!shape) {
787 return;
788 }
789 Double_t xlo, xhi;
790 shape->GetAxisRange(iaxis, xlo, xhi);
791 if (xhi <= xlo) {
793 return;
794 }
795 fEDivFrom->SetNumber(xlo);
798}
799
800////////////////////////////////////////////////////////////////////////////////
801/// Handle division range modification.
802
804{
805 Double_t min, max, xlo, xhi, step;
806 Int_t iaxis = 1;
807 Int_t ndiv;
808 for (Int_t i=0; i<3; i++) {
809 if (fBDiv[i]->GetState()!=kButtonDown) continue;
810 iaxis = i+1;
811 break;
812 }
813 TGeoShape *shape = fVolume->GetShape();
814 if (!shape) {
816 return;
817 }
818 shape->GetAxisRange(iaxis, xlo, xhi);
819 if (xhi-xlo <= 0) {
821 return;
822 }
823 min = fEDivFrom->GetNumber();
824 step = fEDivStep->GetNumber();
825 ndiv = fEDivN->GetIntNumber();
826 if (min<xlo) {
827 min = xlo;
828 fEDivFrom->SetNumber(xlo);
829 }
830 max = min + ndiv*step;
831 if (max>xhi) {
832 max = xhi;
833 step = (max-min)/ndiv;
834 fEDivStep->SetNumber(step);
835 }
836 if (min>=max) {
838 return;
839 }
841}
842
843////////////////////////////////////////////////////////////////////////////////
844/// Handle division step modification.
845
847{
848 Double_t min, max, xlo, xhi;
849 Int_t iaxis = 1;
850 for (Int_t i=0; i<3; i++) {
851 if (fBDiv[i]->GetState()!=kButtonDown) continue;
852 iaxis = i+1;
853 break;
854 }
855 TGeoShape *shape = fVolume->GetShape();
856 if (!shape) {
858 return;
859 }
860 shape->GetAxisRange(iaxis, xlo, xhi);
861 if (xhi-xlo <= 0) {
863 return;
864 }
865 min = fEDivFrom->GetNumber();
866 Double_t step = fEDivStep->GetNumber();
867 Int_t ndiv = fEDivN->GetIntNumber();
868 max = min + ndiv*step;
869
870 // Check if ndiv*step < max-min
871 if (max <= xhi) {
873 return;
874 }
875 // Step too big - set value to fit range
876 max = xhi;
877 step = (max-min)/ndiv;
878 fEDivStep->SetNumber(step);
879 if (step < 0) {
881 return;
882 }
884}
885
886////////////////////////////////////////////////////////////////////////////////
887/// Handle division N modification.
888
890{
891 Double_t min, max, xlo, xhi;
892 Int_t iaxis = 1;
893 for (Int_t i=0; i<3; i++) {
894 if (fBDiv[i]->GetState()!=kButtonDown) continue;
895 iaxis = i+1;
896 break;
897 }
898 TGeoShape *shape = fVolume->GetShape();
899 if (!shape) {
901 return;
902 }
903 shape->GetAxisRange(iaxis, xlo, xhi);
904 if (xhi-xlo <= 0) {
906 return;
907 }
908 Double_t step = fEDivStep->GetNumber();
909 // If step=0 it is discounted
910 if (step==0) {
912 return;
913 }
914 Int_t ndiv = fEDivN->GetIntNumber();
915 min = fEDivFrom->GetNumber();
916 max = min + ndiv*step;
917 // Check if ndiv*step < max-min
918 if (max <= xhi) {
920 return;
921 }
922 max = xhi;
923 ndiv = (Int_t)((max-min)/step);
924 fEDivN->SetNumber(ndiv);
926}
927
928////////////////////////////////////////////////////////////////////////////////
929/// Apply current division settings
930
932{
933 Double_t xlo, xhi, step;
934 Int_t iaxis = 1;
935 Int_t ndiv;
936 for (Int_t i=0; i<3; i++) {
937 if (fBDiv[i]->GetState()!=kButtonDown) continue;
938 iaxis = i+1;
939 break;
940 }
941 TGeoShape *shape = fVolume->GetShape();
942 if (!shape) {
944 return;
945 }
946 shape->GetAxisRange(iaxis, xlo, xhi);
947 if (xhi-xlo <= 0) {
949 return;
950 }
951 xlo = fEDivFrom->GetNumber();
952 step = fEDivStep->GetNumber();
953 ndiv = fEDivN->GetIntNumber();
955 if (finder) {
956 // we have to remove first the existing division
957 TObjArray *nodes = fVolume->GetNodes();
958 nodes->Delete();
959 nodes->Clear();
960 delete finder;
961 fVolume->SetFinder(0);
962 }
963 fVolume->Divide(fDivName->GetText(), iaxis, ndiv, xlo, step);
966 Update();
967// fVolume->Draw();
968}
@ kRaisedFrame
Definition GuiTypes.h:384
@ kSunkenFrame
Definition GuiTypes.h:383
@ kVerticalFrame
Definition GuiTypes.h:381
@ kDoubleBorder
Definition GuiTypes.h:385
@ kFixedWidth
Definition GuiTypes.h:387
@ kHorizontalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
int Int_t
Definition RtypesCore.h:45
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
#define ClassImp(name)
Definition Rtypes.h:377
@ kButtonDown
Definition TGButton.h:54
@ kButtonUp
Definition TGButton.h:53
#define gClient
Definition TGClient.h:157
@ kLHintsRight
Definition TGLayout.h:26
@ kLHintsExpandY
Definition TGLayout.h:31
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
@ kCAT_GENERAL
@ kVOL_NODEID
@ kVOL_DIVSTEP
@ kCAT_VIS
@ kVOL_DIVEND
@ kVOL_EDIT_SHAPE
@ kVOL_EDIT_MEDIUM
@ kVOL_MATRIX_SELECT
@ kVOL_NAME
@ kVOL_NODE_SELECT
@ kVOL_UNDO
@ kVOL_SHAPE_SELECT
@ kVOL_VISLEVEL
@ kCAT_DIVISION
@ kVOL_APPLY
@ kVOL_DIVSTART
@ kVOL_MEDIA_SELECT
@ kCAT_GENERAL
@ kVOL_CANCEL
@ kCAT_DAUGHTERS
@ kDIV_NAME
@ kVOL_DIVN
@ kVOL_VOL_SELECT
@ kVOL_TITLE
static TClass * Class()
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Organizes TGButton widgets in a group.
virtual void SetRadioButtonExclusive(Bool_t flag=kTRUE)
If enable is kTRUE, this button group will treat radio buttons as mutually exclusive,...
virtual void Show()
Show group of buttons.
virtual Int_t Insert(TGButton *button, int id=-1)
Inserts a button with the identifier id into the button group.
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition TGButton.cxx:445
virtual EButtonState GetState() const
Definition TGButton.h:112
virtual void SetEnabled(Bool_t e=kTRUE)
Set enabled or disabled state of button.
Definition TGButton.cxx:459
Selects different options.
Definition TGButton.h:264
void SetState(EButtonState state, Bool_t emit=kFALSE) override
Set check button state.
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition TGClient.cxx:289
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition TGComboBox.h:47
virtual Int_t GetSelected() const
Definition TGComboBox.h:114
virtual void AddEntry(TGString *s, Int_t id)
Definition TGComboBox.h:86
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Definition TGComboBox.h:105
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
virtual Int_t GetNumberOfEntries() const
Definition TGComboBox.h:107
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:287
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1117
UInt_t GetDefaultWidth() const override
Definition TGFrame.h:312
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition TGFrame.cxx:1218
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition TGFrame.cxx:967
UInt_t GetDefaultHeight() const override
Definition TGFrame.h:314
void Layout() override
Layout the elements of the composite frame.
Definition TGFrame.cxx:1257
void SetCleanup(Int_t mode=kLocalCleanup) override
Turn on automatic cleanup of child frames in dtor.
Definition TGFrame.cxx:1072
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition TGFrame.cxx:321
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:605
virtual UInt_t GetDefaultHeight() const
Definition TGFrame.h:191
void SetBackgroundColor(Pixel_t back) override
Set background color (override from TGWindow base class).
Definition TGFrame.cxx:312
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition TGFrame.cxx:683
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
Definition TG3DLine.h:18
TGHotString is a string with a "hot" character underlined.
Definition TGString.h:42
This class handles GUI labels.
Definition TGLabel.h:24
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
Definition TGLabel.cxx:362
virtual void SetText(TGString *newText)
Set new text in label.
Definition TGLabel.cxx:180
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
TGNumberEntry is a number entry input widget with up/down buttons.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
void Associate(const TGWindow *w) override
Make w the window that will receive the generated messages.
virtual Long_t GetIntNumber() const
void SetNumAttr(EAttribute attr=kNEAAnyNumber)
virtual Double_t GetNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
UInt_t GetDefaultHeight() const override
void SetNumStyle(EStyle style)
@ kNEAPositive
Positive number.
@ kNEANonNegative
Non-negative number.
@ kNESInteger
Style of number entry field.
TGClient * fClient
Connection to display server.
Definition TGObject.h:25
Yield an action as soon as it is clicked.
Definition TGButton.h:228
Selects different options.
Definition TGButton.h:321
void SetState(EButtonState state, Bool_t emit=kFALSE) override
Set radio button state.
TGButton * GetButton() const
Definition TGShutter.h:44
TGFrame * GetContainer() const
Definition TGShutter.h:45
A shutter widget contains a set of shutter items that can be open and closed like a shutter.
Definition TGShutter.h:55
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
Definition TGShutter.cxx:73
TGShutterItem * GetItem(const char *name)
returns a shutter item by name (name is hot string of shutter item)
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
void Layout() override
Layout shutter items.
A text buffer is used in several widgets, like TGTextEntry, TGFileDialog, etc.
Yield an action as soon as it is clicked.
Definition TGButton.h:142
virtual void SetText(TGHotString *new_label)
Set new button text.
Definition TGButton.cxx:644
A TGTextEntry is a one line text input widget.
Definition TGTextEntry.h:24
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
const char * GetText() const
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
Organizes TGButton widgets in a group with one vertical column.
virtual void Associate(const TGWindow *w)
Definition TGWidget.h:72
ROOT GUI Window base class.
Definition TGWindow.h:23
const TGWindow * GetParent() const
Definition TGWindow.h:83
void ExcludeClassEditor(TClass *cl, Bool_t recurse=kFALSE)
Exclude editor for class cl from current construction.
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
TGedEditor * fGedEditor
manager of this frame
Definition TGedFrame.h:48
Bool_t fInit
init flag for setting signals/slots
Definition TGedFrame.h:47
Common base class for geombuilder editors.
virtual void Update()
Override Update from TGedFrame as fGedEditor can be null.
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
TGeoTabManager * fTabMgr
void SetVisLevel(Int_t level=3)
set default level down to which visualization is performed
Int_t GetVisLevel() const
Returns current depth to which geometry is drawn.
void SetTopVisible(Bool_t vis=kTRUE)
make top volume visible on screen
Geometrical transformation package.
Definition TGeoMatrix.h:41
Media are used to store properties related to tracking and which are useful only when using geometry ...
Definition TGeoMedium.h:24
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:41
TGeoVolume * GetVolume() const
Definition TGeoNode.h:97
virtual TGeoMatrix * GetMatrix() const =0
Base finder class for patterns.
virtual Int_t GetDivAxis()
Int_t GetNdiv() const
Double_t GetStep() const
Double_t GetStart() const
Base abstract class for all shapes.
Definition TGeoShape.h:26
virtual Double_t GetAxisRange(Int_t iaxis, Double_t &xlo, Double_t &xhi) const =0
virtual const char * GetAxisName(Int_t iaxis) const =0
virtual const char * GetName() const
Get the shape name.
TGCompositeFrame * GetVolumeTab() const
void GetMediumEditor(TGeoMedium *medium)
Get editor for a medium.
static void Cleanup(TGCompositeFrame *frame)
Static method to cleanup hierarchically all daughters of a composite frame.
void GetShapeEditor(TGeoShape *shape)
Get editor for a shape.
void GetMatrixEditor(TGeoMatrix *matrix)
Get editor for a matrix.
static TObject * GetSelected()
static; return selected object
Editor for geometry volumes and assemblies of volumes.
TGPictureButton * fBSelMatrix
virtual void ConnectSignals2Slots()
Connect signals to slots.
TGTextButton * fApplyDiv
void DoApplyDiv()
Apply current division settings.
TGTextButton * fAddNode
virtual ~TGeoVolumeEditor()
Destructor.
TGPictureButton * fBSelShape
void DoRemoveNode()
Remove a daughter.
TGTextEntry * fVolumeName
TGNumberEntry * fEDivFrom
void DoSelectMatrix()
Select a matrix for positioning.
void DoEditMatrix()
Edit the position of the selected node.
void DoSelectMedium()
Select a new medium.
TGComboBox * fNodeList
void DoVisDaughters()
Slot for setting daughters visible/invisible.
TGNumberEntry * fEVisLevel
TGTextButton * fEditMatrix
TGNumberEntry * fEDivN
virtual void SetModel(TObject *obj)
Connect to the picked volume.
TGeoVolume * fVolume
TGTextButton * fEditShape
TGeoMedium * fSelectedMedium
TGeoVolume * fSelectedVolume
TGRadioButton * fBView[3]
void DoVisVolume()
Slot for setting volume visible/invisible.
TGeoShape * fSelectedShape
void DoDivFromTo()
Handle division range modification.
void DoVisAuto()
Slot for setting visibility depth auto.
void DoViewLeaves()
Slot for viewing last leaves only.
void DoViewOnly()
Slot for viewing volume only.
TGCheckButton * fBVis[2]
TGNumberEntry * fEDivStep
TGTextButton * fRemoveNode
void DoDivStep()
Handle division step modification.
void DoVisLevel()
Slot for visibility level.
TGeoMatrix * fSelectedMatrix
void DoRaytrace()
Slot for raytracing.
void DoSelectVolume()
Select a daughter volume.
void DoEditShape()
Edit the shape of the volume.
TGTextEntry * fDivName
TGCheckButton * fBRaytrace
TGNumberEntry * fCopyNumber
TGPictureButton * fBSelVolume
TGCheckButton * fBAuto
TGeoManager * fGeometry
void DoEditMedium()
Edit the medium of the volume.
TGTextButton * fEditMedium
TGPictureButton * fBSelMedium
void DoDivN()
Handle division N modification.
TGShutter * fCategories
void DoSelectShape()
Select a new shape.
void DoViewAll()
Slot for viewing volume and containers.
void DoAddNode()
Add a daughter.
TGRadioButton * fBDiv[3]
void DoDivSelAxis()
Change division axis and preserve number of slices.
void DoDivName()
Modify division name.
virtual void ActivateBaseClassEditors(TClass *cl)
Add editors to fGedFrame and exclude TLineEditor.
TGeoVolumeEditor(const TGWindow *p=nullptr, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
void DoVolumeName()
Modify volume name.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:49
Bool_t IsVisContainers() const
Definition TGeoVolume.h:156
void RemoveNode(TGeoNode *node)
Remove an existing daughter.
void Raytrace(Bool_t flag=kTRUE)
Draw this volume with current settings and perform raytracing in the pad.
TGeoMedium * GetMedium() const
Definition TGeoVolume.h:174
TGeoManager * GetGeoManager() const
Definition TGeoVolume.h:172
virtual TGeoNode * AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=nullptr, Option_t *option="")
Add a TGeoNode to the list of nodes.
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
void SetFinder(TGeoPatternFinder *finder)
Definition TGeoVolume.h:232
Int_t GetNdaughters() const
Definition TGeoVolume.h:351
static TClass * Class()
TObjArray * GetNodes()
Definition TGeoVolume.h:168
void VisibleDaughters(Bool_t vis=kTRUE)
set visibility for daughters
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
virtual void SetVisibility(Bool_t vis=kTRUE)
set visibility of this volume
Bool_t IsVisibleDaughters() const
Definition TGeoVolume.h:155
TGeoPatternFinder * GetFinder() const
Definition TGeoVolume.h:176
TGeoShape * GetShape() const
Definition TGeoVolume.h:189
virtual void SetVisOnly(Bool_t flag=kTRUE)
Set visibility for leaves.
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.
Bool_t IsVisLeaves() const
Definition TGeoVolume.h:157
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set visibility for containers.
Bool_t IsVisOnly() const
Definition TGeoVolume.h:158
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
virtual Bool_t IsVisible() const
Definition TGeoVolume.h:154
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition TNamed.cxx:140
An array of TObjects.
Definition TObjArray.h:31
void Clear(Option_t *option="") override
Remove all objects from the array.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
Mother of all ROOT objects.
Definition TObject.h:41
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition TObject.cxx:525
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Definition TQObject.cxx:869
Basic string class.
Definition TString.h:139
TF1 * f1
Definition legend1.C:11