Logo ROOT   6.16/01
Reference Guide
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 "TVirtualPad.h"
47#include "TBaseClass.h"
48#include "TGTab.h"
49#include "TGComboBox.h"
50#include "TGButton.h"
51#include "TGButtonGroup.h"
52#include "TGTextEntry.h"
53#include "TGNumberEntry.h"
54#include "TGLabel.h"
55#include "TGShutter.h"
56#include "TG3DLine.h"
57#include "TGeoTabManager.h"
58#include "TGedEditor.h"
59
61
68};
69
70////////////////////////////////////////////////////////////////////////////////
71/// Constructor for volume editor.
72
74 Int_t height, UInt_t options, Pixel_t back)
75 : TGeoGedFrame(p, width, height, options | kVerticalFrame, back)
76{
77 fGeometry = 0;
78 fVolume = 0;
79
83
84 // TGShutter for categories
86 TGCompositeFrame *container, *f1;
87 Pixel_t color;
88 TGLabel *label;
89
90 // General settings
92 container = (TGCompositeFrame*)si->GetContainer();
95
96 // TextEntry for volume name
97 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
98 f1->AddFrame(label = new TGLabel(f1, "Volume name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
99 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
100 gClient->GetColorByName("#ff0000", color);
101 label->SetTextColor(color);
102 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
103 fVolumeName = new TGTextEntry(container, "", kVOL_NAME);
105 fVolumeName->SetToolTipText("Enter the volume name");
106 container->AddFrame(fVolumeName, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 3, 1, 2, 5));
107
108 // Current shape
109 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
110 f1->AddFrame(label = new TGLabel(f1, "Shape and medium"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
111 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
112 gClient->GetColorByName("#ff0000", color);
113 label->SetTextColor(color);
114 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
115 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
116 fSelectedShape = 0;
117 fLSelShape = new TGLabel(f1, "Select shape");
118 gClient->GetColorByName("#0000ff", color);
119 fLSelShape->SetTextColor(color);
121 f1->AddFrame(fLSelShape, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
123 fBSelShape->SetToolTipText("Replace with one of the existing shapes");
124 fBSelShape->Associate(this);
125 f1->AddFrame(fBSelShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
126 fEditShape = new TGTextButton(f1, "Edit");
127 f1->AddFrame(fEditShape, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
128 fEditShape->SetToolTipText("Edit selected shape");
129 fEditShape->Associate(this);
130 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
131
132 // Current medium
133 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame);
134 fSelectedMedium = 0;
135 fLSelMedium = new TGLabel(f1, "Select medium");
136 gClient->GetColorByName("#0000ff", color);
139 f1->AddFrame(fLSelMedium, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
141 fBSelMedium->SetToolTipText("Replace with one of the existing media");
142 fBSelMedium->Associate(this);
143 f1->AddFrame(fBSelMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
144 fEditMedium = new TGTextButton(f1, "Edit");
145 f1->AddFrame(fEditMedium, new TGLayoutHints(kLHintsLeft, 1, 1, 2, 2));
146 fEditMedium->SetToolTipText("Edit selected medium");
147 fEditMedium->Associate(this);
148 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 0, 0));
149
150 // List of daughters
151 si = new TGShutterItem(fCategories, new TGHotString("Daughters"),kCAT_DAUGHTERS);
152 container = (TGCompositeFrame*)si->GetContainer();
154 fCategories->AddItem(si);
155
156 // Existing daughters
157 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
158 f1->AddFrame(label = new TGLabel(f1, "Existing daughters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
159 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
160 gClient->GetColorByName("#ff0000", color);
161 label->SetTextColor(color);
162 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
163
164 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kRaisedFrame);
167 fNodeList->Associate(this);
168 f1->AddFrame(fNodeList, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
169 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
170 // Buttons for editing matrix and removing node
171 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kSunkenFrame | kFixedWidth);
172 fEditMatrix = new TGTextButton(f1, "Position");
173 f1->AddFrame(fEditMatrix, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
174 fEditMatrix->SetToolTipText("Edit the position of selected node");
175 fEditMatrix->Associate(this);
176 fRemoveNode = new TGTextButton(f1, "Remove");
177 f1->AddFrame(fRemoveNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
178 fRemoveNode->SetToolTipText("Remove the selected node. Cannot undo !)");
179 fRemoveNode->Associate(this);
180 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
181
182 // Adding daughters
183 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
184 f1->AddFrame(label = new TGLabel(f1, "Add daughter"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
185 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
186 gClient->GetColorByName("#ff0000", color);
187 label->SetTextColor(color);
188 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 10, 0));
189
190 // Select from existing volumes
191 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
192 fSelectedVolume = 0;
193 fLSelVolume = new TGLabel(f1, "Select volume");
194 gClient->GetColorByName("#0000ff", color);
197 f1->AddFrame(fLSelVolume, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
199 fBSelVolume->SetToolTipText("Select one of the existing volumes");
200 fBSelVolume->Associate(this);
201 f1->AddFrame(fBSelVolume, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
202 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
203
204 // Matrix selection for nodes
205 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
206 fSelectedMatrix = 0;
207 fLSelMatrix = new TGLabel(f1, "Select matrix");
208 gClient->GetColorByName("#0000ff", color);
211 f1->AddFrame(fLSelMatrix, new TGLayoutHints(kLHintsLeft | kLHintsExpandX | kLHintsExpandY, 1, 1, 2, 2));
213 fBSelMatrix->SetToolTipText("Select one of the existing matrices");
214 fBSelMatrix->Associate(this);
215 f1->AddFrame(fBSelMatrix, new TGLayoutHints(kLHintsRight, 1, 1, 2, 2));
216 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
217
218 // Copy number
219 f1 = new TGCompositeFrame(container, 155, 30, kHorizontalFrame | kFixedWidth);
220 f1->AddFrame(new TGLabel(f1, "Node id"), new TGLayoutHints(kLHintsLeft, 1, 1, 6, 0));
226 nef->SetToolTipText("Enter node copy number");
227 fCopyNumber->Associate(this);
228 f1->AddFrame(fCopyNumber, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
229 fAddNode = new TGTextButton(f1, "Add");
230 f1->AddFrame(fAddNode, new TGLayoutHints(kLHintsRight, 2, 2, 2, 2));
231 fAddNode->Associate(this);
232 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 2));
233
234 // Visualization
235 si = new TGShutterItem(fCategories, new TGHotString("Visualization"),kCAT_VIS);
236 container = (TGCompositeFrame*)si->GetContainer();
238 fCategories->AddItem(si);
239
240 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
241 f1->AddFrame(label = new TGLabel(f1, "Visibility"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
242 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
243// gClient->GetColorByName("#ff0000", color);
244// label->SetTextColor(color);
245 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
246
248 fBVis[0] = new TGCheckButton(f1, "Volume");
249 fBVis[1] = new TGCheckButton(f1, "Nodes");
250 f1->AddFrame(fBVis[0], new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
251 f1->AddFrame(fBVis[1], new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
252 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
253
254 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
255 f1->AddFrame(new TGLabel(f1, "Depth"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
256// gClient->GetColorByName("#0000ff", color);
257// label->SetTextColor(color);
263 nef->SetToolTipText("Set visibility level here");
265 fEVisLevel->Associate(this);
266 f1->AddFrame(fEVisLevel, new TGLayoutHints(kLHintsLeft, 2, 2, 0 ,0));
267 fBAuto = new TGCheckButton(f1,"Auto");
268 f1->AddFrame(fBAuto, new TGLayoutHints(kLHintsRight, 0, 0, 2, 0));
269 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
270
271 TString stitle = "View";
272 TGButtonGroup *bg = new TGVButtonGroup(container, stitle);
273 fBView[0] = new TGRadioButton(bg, "All");
274 fBView[1] = new TGRadioButton(bg, "Leaves");
275 fBView[2] = new TGRadioButton(bg, "Only");
277 bg->Show();
278 container->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
279
281 fBRaytrace = new TGCheckButton(f1,"Raytrace");
282 f1->AddFrame(fBRaytrace, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
283 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
284
285 // Division
286 si = new TGShutterItem(fCategories, new TGHotString("Division"),kCAT_DIVISION);
287 container = (TGCompositeFrame*)si->GetContainer();
289 fCategories->AddItem(si);
290 // TextEntry for division name
291 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
292 f1->AddFrame(label = new TGLabel(f1, "Division name"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
293 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
294 gClient->GetColorByName("#ff0000", color);
295 label->SetTextColor(color);
296 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
297 fDivName = new TGTextEntry(container, new TGTextBuffer(50), kDIV_NAME);
299 fDivName->SetToolTipText("Enter the volume name");
300 container->AddFrame(fDivName, new TGLayoutHints(kLHintsLeft, 3, 1, 2, 5));
301 // Axis selection
302 stitle = "Axis";
303 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
304 bg = new TGVButtonGroup(f1, stitle);
305 fBDiv[0] = new TGRadioButton(bg, "Axis 1");
306 fBDiv[1] = new TGRadioButton(bg, "Axis 2");
307 fBDiv[2] = new TGRadioButton(bg, "Axis 3");
308 bg->Insert(fBDiv[0]);
309 bg->Insert(fBDiv[1]);
310 bg->Insert(fBDiv[2]);
312 f1->AddFrame(bg, new TGLayoutHints(kLHintsLeft, 2, 2, 0, 0));
313 fApplyDiv = new TGTextButton(f1, "Apply");
314 fApplyDiv->SetToolTipText("Apply new division settings");
315 f1->AddFrame(fApplyDiv, new TGLayoutHints(kLHintsRight, 0, 2, 30, 0));
316 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
317 // Division range
318 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
319 f1->AddFrame(label = new TGLabel(f1, "Division parameters"), new TGLayoutHints(kLHintsLeft, 1, 1, 0, 0));
320 f1->AddFrame(new TGHorizontal3DLine(f1), new TGLayoutHints(kLHintsExpandX, 5, 5, 7, 7));
321// gClient->GetColorByName("#ff0000", color);
322// label->SetTextColor(color);
323 container->AddFrame(f1, new TGLayoutHints(kLHintsTop, 0, 0, 2, 0));
324 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
325 f1->AddFrame(label = new TGLabel(f1, "From"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
326// gClient->GetColorByName("#0000ff", color);
327// label->SetTextColor(color);
329// fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
330// fEDivFrom->SetNumAttr(TGNumberFormat::kNEAPositive);
333 nef->SetToolTipText("Set start value");
334 fEDivFrom->Associate(this);
335 f1->AddFrame(fEDivFrom, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
336 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
337
338 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame | kFixedWidth);
339 f1->AddFrame(label = new TGLabel(f1, "Step"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
340// gClient->GetColorByName("#0000ff", color);
341// label->SetTextColor(color);
343// fEDivFrom->SetNumStyle(TGNumberFormat::kNESInteger);
347 nef->SetToolTipText("Set division step");
348 fEDivStep->Associate(this);
349 f1->AddFrame(fEDivStep, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
350 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
351
352 f1 = new TGCompositeFrame(container, 155, 10, kHorizontalFrame |kFixedWidth);
353 f1->AddFrame(label = new TGLabel(f1, "Nslices"), new TGLayoutHints(kLHintsLeft, 2, 2, 4, 0));
354// gClient->GetColorByName("#0000ff", color);
355// label->SetTextColor(color);
356 fEDivN = new TGNumberEntry(f1, 0, 5, kVOL_DIVN);
361 nef->SetToolTipText("Set number of slices");
362 fEDivN->Associate(this);
363 f1->AddFrame(fEDivN, new TGLayoutHints(kLHintsRight, 2, 2, 0 ,0));
364 container->AddFrame(f1, new TGLayoutHints(kLHintsLeft, 2, 2, 4, 4));
365
366
367 fCategories->Resize(163,340);
369
372}
373
374////////////////////////////////////////////////////////////////////////////////
375/// Destructor
376
378{
379 TGCompositeFrame *cont;
380 cont = (TGCompositeFrame*)fCategories->GetItem("Properties")->GetContainer();
382 fCategories->GetItem("Properties")->SetCleanup(0);
383 cont = (TGCompositeFrame*)fCategories->GetItem("Daughters")->GetContainer();
385 fCategories->GetItem("Daughters")->SetCleanup(0);
386 cont = (TGCompositeFrame*)fCategories->GetItem("Visualization")->GetContainer();
388 fCategories->GetItem("Visualization")->SetCleanup(0);
389 cont = (TGCompositeFrame*)fCategories->GetItem("Division")->GetContainer();
391 fCategories->GetItem("Division")->SetCleanup(0);
392
393 delete fBView[0]; delete fBView[1]; delete fBView[2];
394 delete fBDiv [0]; delete fBDiv [1]; delete fBDiv [2];
395 Cleanup();
396}
397
398////////////////////////////////////////////////////////////////////////////////
399/// Connect signals to slots.
400
402{
403 fVolumeName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoVolumeName()");
404 fDivName->Connect("TextChanged(const char *)", "TGeoVolumeEditor", this, "DoDivName()");
405 fEditMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMedium()");
406 fEditShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditShape()");
407 fEditMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoEditMatrix()");
408 fAddNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoAddNode()");
409 fRemoveNode->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRemoveNode()");
410 fBSelShape->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectShape()");
411 fBSelMedium->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMedium()");
412 fBSelVolume->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectVolume()");
413 fBSelMatrix->Connect("Clicked()", "TGeoVolumeEditor", this, "DoSelectMatrix()");
414 fBVis[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisVolume()");
415 fBVis[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisDaughters()");
416 fBAuto->Connect("Clicked()", "TGeoVolumeEditor", this, "DoVisAuto()");
417 fEVisLevel->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoVisLevel()");
418 fBView[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewAll()");
419 fBView[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewLeaves()");
420 fBView[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoViewOnly()");
421 fBDiv[0]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
422 fBDiv[1]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
423 fBDiv[2]->Connect("Clicked()", "TGeoVolumeEditor", this, "DoDivSelAxis()");
424 fEDivFrom->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivFromTo()");
425 fEDivStep->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivStep()");
426 fEDivN->Connect("ValueSet(Long_t)", "TGeoVolumeEditor", this, "DoDivN()");
427 fBRaytrace->Connect("Clicked()", "TGeoVolumeEditor", this, "DoRaytrace()");
428 fApplyDiv->Connect("Clicked()", "TGeoVolumeEditor", this, "DoApplyDiv()");
429}
430
431////////////////////////////////////////////////////////////////////////////////
432/// Connect to the picked volume.
433
435{
436 if (obj == 0 || !obj->InheritsFrom(TGeoVolume::Class())) {
438 return;
439 }
440 fVolume = (TGeoVolume*)obj;
442 const char *vname = fVolume->GetName();
443 fVolumeName->SetText(vname);
448
450 TIter next2(fVolume->GetNodes());
451 TGeoNode *node;
452 Int_t icrt = 0;
453 while ((node=(TGeoNode*)next2()))
454 fNodeList->AddEntry(node->GetName(), icrt++);
455 fNodeList->Select(0);
457 if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
460 } else {
463 }
465 if (fVolume->IsAssembly()) {
468 }
480 } else {
481 fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
482 Double_t start=0., step=0., end = 0.;
483 Int_t ndiv = 2, iaxis = 1;
484 TString axis_name;
485 for (Int_t i=0; i<3; i++) {
486 axis_name = fVolume->GetShape()->GetAxisName(i+1);
487 fBDiv[i]->SetText(axis_name);
488 }
489
490 if (fVolume->GetFinder()) {
492 iaxis = fVolume->GetFinder()->GetDivAxis();
493 start = fVolume->GetFinder()->GetStart();
494 step = fVolume->GetFinder()->GetStep();
495 ndiv = fVolume->GetFinder()->GetNdiv();
496 } else {
497 fDivName->SetText("Enter name");
498 fSelectedShape->GetAxisRange(iaxis,start,end);
499 step = 0;
500 }
501 fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
502 fEDivFrom->SetNumber(start);
503 fEDivStep->SetNumber(step);
504 fEDivN->SetNumber(ndiv);
505 }
506
508 SetActive();
510}
511
512////////////////////////////////////////////////////////////////////////////////
513/// Add editors to fGedFrame and exclude TLineEditor.
514
516{
519}
520
521////////////////////////////////////////////////////////////////////////////////
522/// Modify volume name.
523
525{
527}
528
529////////////////////////////////////////////////////////////////////////////////
530/// Select a new shape.
531
533{
534 TGeoShape *shape = fSelectedShape;
535 new TGeoShapeDialog(fBSelShape, gClient->GetRoot(), 200,300);
538 else fSelectedShape = shape;
539}
540
541////////////////////////////////////////////////////////////////////////////////
542/// Select a new medium.
543
545{
547 new TGeoMediumDialog(fBSelMedium, gClient->GetRoot(), 200,300);
550 else fSelectedMedium = med;
551}
552
553////////////////////////////////////////////////////////////////////////////////
554/// Select a matrix for positioning.
555
557{
558 TGeoMatrix *matrix = fSelectedMatrix;
559 new TGeoMatrixDialog(fBSelMatrix, gClient->GetRoot(), 200,300);
562 else fSelectedMatrix = matrix;
563}
564
565////////////////////////////////////////////////////////////////////////////////
566/// Select a daughter volume.
567
569{
571 new TGeoVolumeDialog(fBSelVolume, gClient->GetRoot(), 200,300);
574 else fSelectedVolume = vol;
575 if (fSelectedVolume)
577}
578
579
580////////////////////////////////////////////////////////////////////////////////
581/// Edit the shape of the volume.
582
584{
586}
587
588////////////////////////////////////////////////////////////////////////////////
589/// Edit the medium of the volume.
590
592{
594}
595
596////////////////////////////////////////////////////////////////////////////////
597/// Edit the position of the selected node.
598
600{
601 if (!fVolume->GetNdaughters()) return;
603 if (i<0) return;
605}
606
607////////////////////////////////////////////////////////////////////////////////
608/// Add a daughter.
609
611{
612 if (!fSelectedVolume || fVolume->GetFinder()) return;
613 Int_t icopy = fCopyNumber->GetIntNumber();
616 fNodeList->AddEntry(fVolume->GetNode(nd-1)->GetName(), nd-1);
617 fNodeList->Select(nd-1);
618 fCopyNumber->SetNumber(nd+1);
624 Update();
625}
626
627////////////////////////////////////////////////////////////////////////////////
628/// Remove a daughter.
629
631{
632 if (!fVolume->GetNdaughters() || fVolume->GetFinder()) {
635 return;
636 }
638 if (i<0) return;
641 TIter next(fVolume->GetNodes());
642 TGeoNode *node;
643 i = 0;
644 while ((node=(TGeoNode*)next()))
645 fNodeList->AddEntry(node->GetName(), i++);
646 fNodeList->Select(0);
648 if (!fVolume->GetNdaughters()) {
651 fCategories->GetItem("Division")->GetButton()->SetEnabled(kTRUE);
652 Double_t start=0., step=0., end=0.;
653 Int_t ndiv = 2, iaxis = 1;
654 fSelectedShape->GetAxisRange(iaxis,start,end);
655 step = end-start;
656 fBDiv[iaxis-1]->SetState(kButtonDown, kTRUE);
657 fEDivFrom->SetNumber(start);
658 fEDivStep->SetNumber(step);
659 fEDivN->SetNumber(ndiv);
660 }
661 Update();
662}
663
664////////////////////////////////////////////////////////////////////////////////
665/// Slot for setting volume visible/invisible.
666
668{
670 if (fVolume->IsVisible() == on) return;
672 Update();
673}
674
675////////////////////////////////////////////////////////////////////////////////
676/// Slot for setting daughters visible/invisible.
677
679{
681 if (fVolume->IsVisibleDaughters() == on) return;
683 Update();
684}
685
686////////////////////////////////////////////////////////////////////////////////
687/// Slot for setting visibility depth auto.
688
690{
692 if ((fGeometry->GetVisLevel()==0) == on) return;
693 if (on) fGeometry->SetVisLevel(0);
695 Update();
696}
697
698////////////////////////////////////////////////////////////////////////////////
699/// Slot for visibility level.
700
702{
705 Update();
706}
707
708////////////////////////////////////////////////////////////////////////////////
709/// Slot for viewing volume and containers.
710
712{
714 if (!on) return;
715 if (fVolume->IsVisContainers() == on) return;
716 if (fVolume->IsRaytracing()) {
719 }
721 Update();
722}
723
724////////////////////////////////////////////////////////////////////////////////
725/// Slot for viewing last leaves only.
726
728{
730 if (!on) return;
731 if (fVolume->IsVisLeaves() == on) return;
732 if (fVolume->IsRaytracing()) {
735 }
737 Update();
738}
739
740////////////////////////////////////////////////////////////////////////////////
741/// Slot for viewing volume only.
742
744{
746 if (!on) return;
747 if (fVolume->IsVisOnly() == on) return;
748 if (fVolume->IsRaytracing()) {
751 }
752 fVolume->SetVisOnly(on);
753 Update();
754}
755
756////////////////////////////////////////////////////////////////////////////////
757/// Slot for raytracing.
758
760{
762 if (fVolume->IsRaytracing() == on) return;
763 fVolume->Raytrace(on);
764 Update();
765}
766
767////////////////////////////////////////////////////////////////////////////////
768/// Modify division name.
769
771{
773}
774
775////////////////////////////////////////////////////////////////////////////////
776/// Change division axis and preserve number of slices.
777
779{
780 Int_t iaxis = 1;
781 for (Int_t i=0; i<3; i++) {
782 if (fBDiv[i]->GetState()!=kButtonDown) continue;
783 iaxis = i+1;
784 break;
785 }
786 TGeoShape *shape = fVolume->GetShape();
787 if (!shape) {
789 return;
790 }
791 Double_t xlo, xhi;
792 shape->GetAxisRange(iaxis, xlo, xhi);
793 if (xhi <= xlo) {
795 return;
796 }
797 fEDivFrom->SetNumber(xlo);
800}
801
802////////////////////////////////////////////////////////////////////////////////
803/// Handle division range modification.
804
806{
807 Double_t min, max, xlo, xhi, step;
808 Int_t iaxis = 1;
809 Int_t ndiv;
810 for (Int_t i=0; i<3; i++) {
811 if (fBDiv[i]->GetState()!=kButtonDown) continue;
812 iaxis = i+1;
813 break;
814 }
815 TGeoShape *shape = fVolume->GetShape();
816 if (!shape) {
818 return;
819 }
820 shape->GetAxisRange(iaxis, xlo, xhi);
821 if (xhi-xlo <= 0) {
823 return;
824 }
825 min = fEDivFrom->GetNumber();
826 step = fEDivStep->GetNumber();
827 ndiv = fEDivN->GetIntNumber();
828 if (min<xlo) {
829 min = xlo;
830 fEDivFrom->SetNumber(xlo);
831 }
832 max = min + ndiv*step;
833 if (max>xhi) {
834 max = xhi;
835 step = (max-min)/ndiv;
836 fEDivStep->SetNumber(step);
837 }
838 if (min>=max) {
840 return;
841 }
843}
844
845////////////////////////////////////////////////////////////////////////////////
846/// Handle division step modification.
847
849{
850 Double_t min, max, xlo, xhi;
851 Int_t iaxis = 1;
852 for (Int_t i=0; i<3; i++) {
853 if (fBDiv[i]->GetState()!=kButtonDown) continue;
854 iaxis = i+1;
855 break;
856 }
857 TGeoShape *shape = fVolume->GetShape();
858 if (!shape) {
860 return;
861 }
862 shape->GetAxisRange(iaxis, xlo, xhi);
863 if (xhi-xlo <= 0) {
865 return;
866 }
867 min = fEDivFrom->GetNumber();
868 Double_t step = fEDivStep->GetNumber();
869 Int_t ndiv = fEDivN->GetIntNumber();
870 max = min + ndiv*step;
871
872 // Check if ndiv*step < max-min
873 if (max <= xhi) {
875 return;
876 }
877 // Step too big - set value to fit range
878 max = xhi;
879 step = (max-min)/ndiv;
880 fEDivStep->SetNumber(step);
881 if (step < 0) {
883 return;
884 }
886}
887
888////////////////////////////////////////////////////////////////////////////////
889/// Handle division N modification.
890
892{
893 Double_t min, max, xlo, xhi;
894 Int_t iaxis = 1;
895 for (Int_t i=0; i<3; i++) {
896 if (fBDiv[i]->GetState()!=kButtonDown) continue;
897 iaxis = i+1;
898 break;
899 }
900 TGeoShape *shape = fVolume->GetShape();
901 if (!shape) {
903 return;
904 }
905 shape->GetAxisRange(iaxis, xlo, xhi);
906 if (xhi-xlo <= 0) {
908 return;
909 }
910 Double_t step = fEDivStep->GetNumber();
911 // If step=0 it is discounted
912 if (step==0) {
914 return;
915 }
916 Int_t ndiv = fEDivN->GetIntNumber();
917 min = fEDivFrom->GetNumber();
918 max = min + ndiv*step;
919 // Check if ndiv*step < max-min
920 if (max <= xhi) {
922 return;
923 }
924 max = xhi;
925 ndiv = (Int_t)((max-min)/step);
926 fEDivN->SetNumber(ndiv);
928}
929
930////////////////////////////////////////////////////////////////////////////////
931/// Apply current division settings
932
934{
935 Double_t xlo, xhi, step;
936 Int_t iaxis = 1;
937 Int_t ndiv;
938 for (Int_t i=0; i<3; i++) {
939 if (fBDiv[i]->GetState()!=kButtonDown) continue;
940 iaxis = i+1;
941 break;
942 }
943 TGeoShape *shape = fVolume->GetShape();
944 if (!shape) {
946 return;
947 }
948 shape->GetAxisRange(iaxis, xlo, xhi);
949 if (xhi-xlo <= 0) {
951 return;
952 }
953 xlo = fEDivFrom->GetNumber();
954 step = fEDivStep->GetNumber();
955 ndiv = fEDivN->GetIntNumber();
957 if (finder) {
958 // we have to remove first the existing division
959 TObjArray *nodes = fVolume->GetNodes();
960 nodes->Delete();
961 nodes->Clear();
962 delete finder;
963 fVolume->SetFinder(0);
964 }
965 fVolume->Divide(fDivName->GetText(), iaxis, ndiv, xlo, step);
968 Update();
969// fVolume->Draw();
970}
void Class()
Definition: Class.C:29
ULong_t Pixel_t
Definition: GuiTypes.h:39
int Int_t
Definition: RtypesCore.h:41
unsigned int UInt_t
Definition: RtypesCore.h:42
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
const Bool_t kTRUE
Definition: RtypesCore.h:87
#define ClassImp(name)
Definition: Rtypes.h:363
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
@ kButtonDown
Definition: TGButton.h:54
@ kButtonUp
Definition: TGButton.h:53
#define gClient
Definition: TGClient.h:166
@ kRaisedFrame
Definition: TGFrame.h:62
@ kSunkenFrame
Definition: TGFrame.h:61
@ kVerticalFrame
Definition: TGFrame.h:59
@ kDoubleBorder
Definition: TGFrame.h:63
@ kFixedWidth
Definition: TGFrame.h:65
@ kHorizontalFrame
Definition: TGFrame.h:60
@ kLHintsRight
Definition: TGLayout.h:33
@ kLHintsExpandY
Definition: TGLayout.h:38
@ kLHintsLeft
Definition: TGLayout.h:31
@ kLHintsTop
Definition: TGLayout.h:34
@ kLHintsExpandX
Definition: TGLayout.h:37
ETGeoVolumeWid
@ 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
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
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:395
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:409
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set check button state.
Definition: TGButton.cxx:1200
const TGPicture * GetPicture(const char *name)
Get picture from the picture pool.
Definition: TGClient.cxx:289
virtual Int_t GetSelected() const
Definition: TGComboBox.h:134
virtual void AddEntry(TGString *s, Int_t id)
Definition: TGComboBox.h:106
virtual void RemoveEntries(Int_t from_ID, Int_t to_ID)
Definition: TGComboBox.h:125
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...
Definition: TGComboBox.cxx:443
virtual Int_t GetNumberOfEntries() const
Definition: TGComboBox.h:127
TGCompositeFrame(const TGCompositeFrame &)
Int_t GetState(TGFrame *f) const
Get state of sub frame.
Definition: TGFrame.cxx:1200
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:371
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGFrame.cxx:949
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1239
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1054
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:373
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:303
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:238
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:294
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:587
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
Definition: TGLabel.cxx:359
virtual void SetText(TGString *newText)
Set new text in label.
Definition: TGLabel.cxx:177
virtual void SetNumber(Double_t val)
UInt_t GetDefaultHeight() const
TGNumberEntryField * GetNumberEntry() const
virtual void Associate(const TGWindow *w)
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
void SetNumStyle(EStyle style)
TGClient * fClient
Definition: TGObject.h:37
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set radio button state.
Definition: TGButton.cxx:1563
TGButton * GetButton() const
Definition: TGShutter.h:58
TGFrame * GetContainer() const
Definition: TGShutter.h:59
virtual void AddItem(TGShutterItem *item)
Add shutter item to shutter frame.
Definition: TGShutter.cxx:71
TGShutterItem * GetItem(const char *name)
returns a shutter item by name (name is hot string of shutter item)
Definition: TGShutter.cxx:300
virtual void Layout()
Layout shutter items.
Definition: TGShutter.cxx:216
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
Definition: TGShutter.cxx:330
virtual void SetText(TGHotString *new_label)
Set new button text.
Definition: TGButton.cxx:594
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
const char * GetText() const
Definition: TGTextEntry.h:134
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.
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:84
const TGWindow * GetParent() const
Definition: TGWindow.h:85
void ExcludeClassEditor(TClass *cl, Bool_t recurse=kFALSE)
Exclude editor for class cl from current construction.
Definition: TGedEditor.cxx:578
virtual void ActivateBaseClassEditors(TClass *cl)
Provide list of editors for base-classes.
Definition: TGedFrame.cxx:168
TGedEditor * fGedEditor
Definition: TGedFrame.h:54
Bool_t fInit
Definition: TGedFrame.h:53
Common base class for geombuilder editors.
Definition: TGeoGedFrame.h:13
virtual void Update()
Override Update from TGedFrame as fGedEditor can be null.
TGTab * fTab
Definition: TGeoGedFrame.h:16
virtual void SetActive(Bool_t active=kTRUE)
Set active GUI attribute frames related to the selected object.
TGeoTabManager * fTabMgr
Definition: TGeoGedFrame.h:17
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:94
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.
Definition: TGeoShape.cxx:248
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.
TGeoVolumeEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30, UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground())
Constructor for volume editor.
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.
void DoVolumeName()
Modify volume name.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition: TGeoVolume.h:53
Bool_t IsVisContainers() const
Definition: TGeoVolume.h:158
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:176
TGeoManager * GetGeoManager() const
Definition: TGeoVolume.h:174
virtual void SetVisLeaves(Bool_t flag=kTRUE)
Set visibility for leaves.
void SetFinder(TGeoPatternFinder *finder)
Definition: TGeoVolume.h:234
Int_t GetNdaughters() const
Definition: TGeoVolume.h:350
TObjArray * GetNodes()
Definition: TGeoVolume.h:170
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:157
TGeoPatternFinder * GetFinder() const
Definition: TGeoVolume.h:178
TGeoShape * GetShape() const
Definition: TGeoVolume.h:191
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.
Definition: TGeoVolume.cxx:873
Bool_t IsVisLeaves() const
Definition: TGeoVolume.h:159
virtual void SetVisContainers(Bool_t flag=kTRUE)
Set visibility for containers.
Bool_t IsVisOnly() const
Definition: TGeoVolume.h:160
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
virtual void AddNode(TGeoVolume *vol, Int_t copy_no, TGeoMatrix *mat=0, Option_t *option="")
Add a TGeoNode to the list of nodes.
Definition: TGeoVolume.cxx:984
virtual Bool_t IsVisible() const
Definition: TGeoVolume.h:156
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
An array of TObjects.
Definition: TObjArray.h:37
virtual void Clear(Option_t *option="")
Remove all objects from the array.
Definition: TObjArray.cxx:320
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
Definition: TObjArray.cxx:355
Mother of all ROOT objects.
Definition: TObject.h:37
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:443
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:867
Basic string class.
Definition: TString.h:131
TF1 * f1
Definition: legend1.C:11