Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGeoPhysicalNode.cxx
Go to the documentation of this file.
1// @(#)root/geom:$Id$
2// Author: Andrei Gheata 17/02/04
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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 TGeoPhysicalNode
13\ingroup Geometry_classes
14
15Physical nodes are the actual 'touchable' objects in the geometry, representing
16a path of positioned volumes starting with the top node:
17 path=/TOP/A_1/B_4/C_3 , where A, B, C represent names of volumes.
18
19The number of physical nodes is given by the total number of possible of
20branches in the geometry hierarchy. In case of detector geometries and
21specially for calorimeters this number can be of the order 1e6-1e9, therefore
22it is impossible to create all physical nodes as objects in memory. In TGeo,
23physical nodes are represented by the class TGeoPhysicalNode and can be created
24on demand for alignment purposes:
25
26~~~ {.cpp}
27 TGeoPhysicalNode *pn = new TGeoPhysicalNode("path_to_object")
28~~~
29
30Once created, a physical node can be misaligned, meaning that its position
31or even shape can be changed:
32
33~~~ {.cpp}
34 pn->Align(TGeoMatrix* newmat, TGeoShape* newshape, Bool_t check=kFALSE)
35~~~
36*/
37
38/** \class TGeoPNEntry
39\ingroup Geometry_classes
40
41The knowledge of the path to the objects that need to be misaligned is
42essential since there is no other way of identifying them. One can however
43create 'symbolic links' to any complex path to make it more representable
44for the object it designates:
45
46~~~ {.cpp}
47 TGeoPNEntry *pne = new TGeoPNEntry("TPC_SECTOR_2", "path_to_tpc_sect2");
48 pne->SetPhysicalNode(pn)
49~~~
50
51Such a symbolic link hides the complexity of the path to the align object and
52replaces it with a more meaningful name. In addition, TGeoPNEntry objects are
53faster to search by name and they may optionally store an additional user
54matrix.
55
56For more details please read the [misalignment section](\ref GP05).
57*/
58
59#include "TGeoManager.h"
60#include "TGeoVoxelFinder.h"
61#include "TGeoCache.h"
62#include "TGeoMatrix.h"
63#include "TGeoShapeAssembly.h"
64#include "TGeoCompositeShape.h"
65#include "TGeoBoolNode.h"
66#include "TGeoVolume.h"
67
68#include "TGeoPhysicalNode.h"
69
70// statics and globals
71
72
73////////////////////////////////////////////////////////////////////////////////
74/// Default constructor
75
77{
78 fLevel = 0;
79 fMatrices = nullptr;
80 fNodes = nullptr;
81 fMatrixOrig = nullptr;
86}
87
88////////////////////////////////////////////////////////////////////////////////
89/// Constructor
90
91TGeoPhysicalNode::TGeoPhysicalNode(const char *path) : TNamed(path, "")
92{
93 if (!path[0]) {
94 Error("ctor", "path not valid");
95 return;
96 }
97 fLevel = 0;
98 fMatrices = new TObjArray(30);
99 fNodes = new TObjArray(30);
100 fMatrixOrig = nullptr;
101 SetPath(path);
106}
107
108////////////////////////////////////////////////////////////////////////////////
109/// Destructor
110
112{
113 if (fMatrices) {
114 fMatrices->Delete();
115 delete fMatrices;
116 }
117 if (fNodes)
118 delete fNodes;
119 if (fMatrixOrig)
120 delete fMatrixOrig;
121}
122
123////////////////////////////////////////////////////////////////////////////////
124/// Align a physical node with a new relative matrix/shape.
125/// Example: /TOP_1/A_1/B_1/C_1
126/// node->Align(transl_1, box) will perform:
127/// - change RELATIVE translation of C_1 node (with respect to its
128/// container volume B) to transl_1
129/// - change the shape of the C volume
130/// *NOTE* The operations will affect ONLY the LAST node in the branch. All
131/// volumes/nodes in the branch represented by this physical node are
132/// CLONED so the operation does not affect other possible replicas.
133
135{
136 if (!newmat && !newshape)
137 return kFALSE;
138 if (TGeoManager::IsLocked()) {
139 Error("Align", "Not performed. Geometry in LOCKED mode !");
140 return kFALSE;
141 }
142 if (newmat == gGeoIdentity) {
143 Error("Align", "Cannot align using gGeoIdentity. Use some default matrix constructor to represent identities.");
144 return kFALSE;
145 }
146 TGeoNode *node = GetNode();
147 if (node->IsOffset()) {
148 Error("Align", "Cannot align division nodes: %s\n", node->GetName());
149 return kFALSE;
150 }
151 // Refresh the node since other Align calls may have altered the stored nodes
152 Refresh();
153 TGeoNode *nnode = nullptr;
154 TGeoVolume *vm = GetVolume(0);
155 TGeoVolume *vd = nullptr;
156 Int_t i;
157 if (!IsAligned()) {
158 Int_t *id = new Int_t[fLevel];
159 for (i = 0; i < fLevel; i++) {
160 // Store daughter indexes
161 vd = GetVolume(i);
162 node = GetNode(i + 1);
163 id[i] = vd->GetIndex(node);
164 if (id[i] < 0) {
165 Error("Align", "%s cannot align node %s", GetName(), node->GetName());
166 delete[] id;
167 return kFALSE;
168 }
169 }
170 for (i = 0; i < fLevel; i++) {
171 // Get daughter node and its id inside vm
172 node = GetNode(i + 1);
173 // Clone daughter volume and node if not done yet
174 if (node->IsCloned()) {
175 vd = node->GetVolume();
176 nnode = node;
177 } else {
178 vd = node->GetVolume()->CloneVolume();
179 if (!vd) {
180 delete[] id;
181 Fatal("Align", "Cannot clone volume %s", node->GetVolume()->GetName());
182 return kFALSE;
183 }
184 nnode = node->MakeCopyNode();
185 if (!nnode) {
186 delete[] id;
187 Fatal("Align", "Cannot make copy node for %s", node->GetName());
188 return kFALSE;
189 }
190 // Correct pointers to mother and volume
191 nnode->SetVolume(vd);
192 nnode->SetMotherVolume(vm);
193 // Decouple old node from mother volume and connect new one
194 if (vm->TestBit(TGeoVolume::kVolumeImportNodes)) {
196 }
197 vm->GetNodes()->RemoveAt(id[i]);
198 vm->GetNodes()->AddAt(nnode, id[i]);
199 fNodes->RemoveAt(i + 1);
200 fNodes->AddAt(nnode, i + 1);
201 // node->GetVolume()->Release();
202 }
203 // Consider new cloned volume as mother and continue
204 vm = vd;
205 }
206 delete[] id;
207 } else {
208 nnode = GetNode();
209 }
210 if (!node) {
211 Fatal("Align", "Cannot get node %s", GetName());
212 return kFALSE;
213 }
214
215 // Now nnode is a cloned node of the one that need to be aligned
217 vm = nnode->GetMotherVolume();
218 vd = nnode->GetVolume();
219 if (newmat) {
220 // Check if the old matrix for this node was shared
222 Int_t nd = vm->GetNdaughters();
224 if (nnode->GetMatrix()->IsShared()) {
225 // Now find the node having a composite shape using this shared matrix
226 for (i = 0; i < nd; i++) {
227 node = vm->GetNode(i);
228 if (node == nnode)
229 continue;
230 if (node->IsOffset())
231 continue;
232 if (!node->GetVolume()->GetShape()->IsComposite())
233 continue;
234 // We found a node having a composite shape, scan for the shared matrix
235 cs = (TGeoCompositeShape *)node->GetVolume()->GetShape();
236 if (cs->GetBoolNode()->GetRightMatrix() != nnode->GetMatrix())
237 continue;
238 // The composite uses the matrix -> replace it
239 TGeoCompositeShape *ncs = new TGeoCompositeShape(cs->GetName(), cs->GetBoolNode()->MakeClone());
240 ncs->GetBoolNode()->ReplaceMatrix(nnode->GetMatrix(), newmat);
241 // We have to clone the node/volume having the composite shape
243 if (!newvol) {
244 Error("Align", "Cannot clone volume %s", node->GetVolume()->GetName());
245 return kFALSE;
246 }
247 newvol->SetShape(ncs);
248 TGeoNode *newnode = node->MakeCopyNode();
249 if (!newnode) {
250 Error("Align", "Cannot clone node %s", node->GetName());
251 return kFALSE;
252 }
253 newnode->SetVolume(newvol);
254 newnode->SetMotherVolume(vm);
255 if (vm->TestBit(TGeoVolume::kVolumeImportNodes)) {
257 }
258 vm->GetNodes()->RemoveAt(i);
259 vm->GetNodes()->AddAt(newnode, i);
260 shared = kTRUE;
261 }
262 if (!shared)
263 Error("Align", "The matrix replaced for %s is not actually shared", GetName());
264 } else {
265 // The aligned node may have a composite shape containing a shared matrix
266 if (vd->GetShape()->IsComposite()) {
267 cs = (TGeoCompositeShape *)vd->GetShape();
268 if (cs->GetBoolNode()->GetRightMatrix()->IsShared()) {
269 if (!nnode->GetMatrix()->IsIdentity()) {
270 Error("Align", "The composite shape having a shared matrix on the subtracted branch must be "
271 "positioned using identity matrix.");
272 return kFALSE;
273 }
274 // We have to put the alignment matrix on top of the left branch
275 // of the composite shape. The node is already decoupled from logical tree.
276 TGeoCompositeShape *ncs = new TGeoCompositeShape(cs->GetName(), cs->GetBoolNode()->MakeClone());
277 TGeoMatrix *oldmat = ncs->GetBoolNode()->GetLeftMatrix();
279 newmat1->Multiply(oldmat);
280 ncs->GetBoolNode()->ReplaceMatrix(oldmat, newmat1);
281 vd->SetShape(ncs);
282 // The right-side matrix pointer is preserved, so no need to update nodes.
283 aligned = nullptr; // to prevent updating its matrix
284 }
285 }
286 }
287 // Register matrix and make it the active one
288 if (!newmat->IsRegistered())
289 newmat->RegisterYourself();
290 if (aligned) {
291 aligned->SetMatrix(newmat);
292 // Update the global matrix for the aligned node
295 *global = up;
296 global->Multiply(newmat);
297 }
298 }
299 // Change the shape for the aligned node
300 if (newshape)
301 vd->SetShape(newshape);
302
303 // Re-compute bounding box of mother(s) if needed
304 for (i = fLevel - 1; i > 0; i--) {
305 Bool_t dassm = vd->IsAssembly(); // is daughter assembly ?
306 vd = GetVolume(i);
307 if (!vd)
308 break;
309 Bool_t cassm = vd->IsAssembly(); // is current assembly ?
310 if (cassm)
311 ((TGeoShapeAssembly *)vd->GetShape())->NeedsBBoxRecompute();
312 if ((cassm || dassm) && vd->GetVoxels())
313 vd->GetVoxels()->SetNeedRebuild();
314 if (!cassm)
315 break;
316 }
317
318 // Now we have to re-voxelize the mother volume
319 TGeoVoxelFinder *voxels = vm->GetVoxels();
320 if (voxels)
321 voxels->SetNeedRebuild();
322 // Eventually check for overlaps
323 if (check) {
324 if (voxels) {
325 voxels->Voxelize();
326 vm->FindOverlaps();
327 }
328 // Set aligned node to be checked
329 i = fLevel;
330 node = GetNode(i);
331 if (!node)
332 return kTRUE;
333 if (node->IsOverlapping()) {
334 Info("Align",
335 "The check for overlaps for node: \n%s\n cannot be performed since the node is declared possibly "
336 "overlapping",
337 GetName());
338 } else {
340 // Check overlaps for the first non-assembly parent node
341 while ((node = GetNode(--i))) {
342 if (!node->GetVolume()->IsAssembly())
343 break;
344 }
345 if (node && node->IsOverlapping()) {
346 Info("Align",
347 "The check for overlaps for assembly node: \n%s\n cannot be performed since the parent %s is declared "
348 "possibly overlapping",
349 GetName(), node->GetName());
350 node = nullptr;
351 }
352 if (node)
353 node->CheckOverlaps(ovlp);
354 gGeoManager->SetCheckedNode(nullptr);
355 }
356 }
357 // Clean current matrices from cache
360 return kTRUE;
361}
362
363////////////////////////////////////////////////////////////////////////////////
364
366{
367 if (GetNode(0) != gGeoManager->GetTopNode())
368 return;
370}
371
372////////////////////////////////////////////////////////////////////////////////
373/// Draw this node.
374
375void TGeoPhysicalNode::Draw(Option_t * /*option*/) {}
376
377////////////////////////////////////////////////////////////////////////////////
378/// Return parent at LEVUP generation
379
381{
382 Int_t ind = fLevel - levup;
383 if (ind < 0)
384 return nullptr;
385 return (TGeoNode *)fNodes->UncheckedAt(ind);
386}
387
388////////////////////////////////////////////////////////////////////////////////
389/// Return global matrix for node at LEVEL.
390
392{
393 if (level < 0)
395 if (level > fLevel)
396 return nullptr;
397 return (TGeoHMatrix *)fMatrices->UncheckedAt(level);
398}
399
400////////////////////////////////////////////////////////////////////////////////
401/// Return node in branch at LEVEL. If not specified, return last leaf.
402
404{
405 if (level < 0)
406 return (TGeoNode *)fNodes->UncheckedAt(fLevel);
407 if (level > fLevel)
408 return nullptr;
409 return (TGeoNode *)fNodes->UncheckedAt(level);
410}
411
412////////////////////////////////////////////////////////////////////////////////
413/// Return volume associated with node at LEVEL in the branch
414
416{
417 TGeoNode *node = GetNode(level);
418 if (node)
419 return node->GetVolume();
420 return nullptr;
421}
422
423////////////////////////////////////////////////////////////////////////////////
424/// Return shape associated with volume.
425
427{
428 TGeoVolume *vol = GetVolume(level);
429 if (vol)
430 return vol->GetShape();
431 return nullptr;
432}
433
434////////////////////////////////////////////////////////////////////////////////
435/// Paint this node and its content according to visualization settings.
436
438{
440 if (!painter)
441 return;
442 // painter->PaintNode(this, option);
443}
444
445////////////////////////////////////////////////////////////////////////////////
446/// Print info about this node.
447
448void TGeoPhysicalNode::Print(Option_t * /*option*/) const
449{
450 printf("TGeoPhysicalNode: %s level=%d aligned=%d\n", fName.Data(), fLevel, IsAligned());
451 for (Int_t i = 0; i <= fLevel; i++) {
452 printf(" level %d: node %s\n", i, GetNode(i)->GetName());
453 printf(" local matrix:\n");
454 if (GetNode(i)->GetMatrix()->IsIdentity())
455 printf(" IDENTITY\n");
456 else
457 GetNode(i)->GetMatrix()->Print();
458 printf(" global matrix:\n");
459 if (GetMatrix(i)->IsIdentity())
460 printf(" IDENTITY\n");
461 else
462 GetMatrix(i)->Print();
463 }
464 if (IsAligned() && fMatrixOrig) {
465 printf(" original local matrix:\n");
467 }
468}
469
470////////////////////////////////////////////////////////////////////////////////
471/// Refresh this physical node. Called for all registered physical nodes
472/// after an Align() call.
473
478
479////////////////////////////////////////////////////////////////////////////////
480/// Set node branch according to current state
481
483{
485 if (!cache) {
486 Error("SetBranchAsState", "no state available");
487 return;
488 }
489 if (!cache->IsDummy()) {
490 Error("SetBranchAsState", "not implemented for full cache");
491 return;
492 }
493 if (!fNodes)
494 fNodes = new TObjArray(30);
495 if (!fMatrices)
496 fMatrices = new TObjArray(30);
498 TGeoNode **branch = (TGeoNode **)cache->GetBranch();
499
500 Bool_t refresh = (fLevel > 0) ? kTRUE : kFALSE;
501 if (refresh) {
502 TGeoHMatrix *current;
503 for (Int_t i = 0; i <= fLevel; i++) {
505 current = (TGeoHMatrix *)fMatrices->UncheckedAt(i);
506 *current = *matrices[i];
507 }
508 return;
509 }
511 for (Int_t i = 0; i <= fLevel; i++) {
514 }
516 if (!fMatrixOrig)
517 fMatrixOrig = new TGeoHMatrix();
518 *fMatrixOrig = node->GetMatrix();
519}
520
521////////////////////////////////////////////////////////////////////////////////
522/// Allows PN entries (or users) to preset the local original matrix for the
523/// last node pointed by the path.
524
526{
527 if (!fMatrixOrig)
528 fMatrixOrig = new TGeoHMatrix();
529 if (!local) {
531 return;
532 }
534}
535
536////////////////////////////////////////////////////////////////////////////////
537/// Specify the path for this node.
538
540{
541 if (!gGeoManager->cd(path)) {
542 Error("SetPath", "wrong path -> maybe RestoreMasterVolume");
543 return kFALSE;
544 }
546 return kTRUE;
547}
548
549////////////////////////////////////////////////////////////////////////////////
550/// Checks if a given navigator state matches this physical node
551
553{
554 TGeoNodeCache *cache = nav->GetCache();
555 if (!cache) {
556 Fatal("SetBranchAsState", "no state available");
557 return kFALSE;
558 }
559 // the first condition is that the levels of navigator and this physical node must match
560 if (cache->GetLevel() != fLevel) {
561 return kFALSE;
562 }
563 // now we compare the nodes at each level
564 // starting backwards since that enhances the probability of an early return
565 TGeoNode **branch = (TGeoNode **)cache->GetBranch();
566 for (Int_t i = fLevel; i >= 1; --i)
567 if (fNodes->At(i) != branch[i])
568 return kFALSE;
569 return kTRUE;
570}
571
572
573////////////////////////////////////////////////////////////////////////////////
574/// Default constructor
575
577{
578 fNode = nullptr;
579 fMatrix = nullptr;
580 fGlobalOrig = nullptr;
581}
582
583////////////////////////////////////////////////////////////////////////////////
584/// Default constructor
585
586TGeoPNEntry::TGeoPNEntry(const char *name, const char *path) : TNamed(name, path)
587{
588 if (!gGeoManager || !gGeoManager->IsClosed() || !gGeoManager->CheckPath(path)) {
589 TString errmsg("Cannot define a physical node link without a closed geometry and a valid path !");
590 Error("ctor", "%s", errmsg.Data());
591 throw errmsg;
592 return;
593 }
595 gGeoManager->cd(path);
596 fGlobalOrig = new TGeoHMatrix();
599 fNode = nullptr;
600 fMatrix = nullptr;
601}
602
603////////////////////////////////////////////////////////////////////////////////
604/// Destructor
605
607{
608 if (fMatrix && !fMatrix->IsRegistered())
609 delete fMatrix;
610 delete fGlobalOrig;
611}
612
613////////////////////////////////////////////////////////////////////////////////
614/// Setter for the corresponding physical node.
615
617{
618 if (fNode && node) {
619 Warning("SetPhysicalNode", "Physical node changed for entry %s", GetName());
620 Warning("SetPhysicalNode", "=== New path: %s", node->GetName());
621 }
622 fNode = node;
623}
624
625////////////////////////////////////////////////////////////////////////////////
626/// Set the additional matrix for this node entry. The matrix will be deleted
627/// by this class unless registered by the user to gGeoManager
628
630{
631 fMatrix = mat;
632}
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
constexpr Bool_t kTRUE
Definition RtypesCore.h:107
const char Option_t
Option string (const char)
Definition RtypesCore.h:80
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 id
char name[80]
Definition TGX11.cxx:110
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
Definition TGeoMatrix.h:537
Composite shapes are Boolean combinations of two or more shape components.
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition TGeoMatrix.h:458
void Clear(Option_t *option="") override
clear the data for this matrix
virtual Bool_t cd(const char *path="")
Browse the tree of nodes starting from fTopNode according to pathname.
Bool_t IsClosed() const
static Bool_t IsLocked()
Check lock state.
TVirtualGeoPainter * GetGeomPainter()
Make a default painter if none present. Returns pointer to it.
Bool_t CheckPath(const char *path) const
Check if a geometry path is valid without changing the state of the current navigator.
TObjArray * GetListOfGShapes() const
Int_t GetLevel() const
TGeoHMatrix * GetCurrentMatrix() const
TGeoNode * GetTopNode() const
TGeoNodeCache * GetCache() const
void SetCheckedNode(TGeoNode *node)
Assign a given node to be checked for overlaps. Any other overlaps will be ignored.
void CdTop()
Make top level node the current node.
Int_t PushPath(Int_t startlevel=0)
Bool_t PopPath()
Geometrical transformation package.
Definition TGeoMatrix.h:38
void Print(Option_t *option="") const override
print the matrix in 4x4 format
Class providing navigation API for TGeo geometries.
Special pool of reusable nodes.
Definition TGeoCache.h:56
void * GetMatrices() const
Definition TGeoCache.h:108
Bool_t IsDummy() const
Definition TGeoCache.h:126
void * GetBranch() const
Definition TGeoCache.h:104
Int_t GetLevel() const
Definition TGeoCache.h:121
A node containing local transformation.
Definition TGeoNode.h:154
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:39
Bool_t IsOverlapping() const
Definition TGeoNode.h:107
TGeoVolume * GetVolume() const
Definition TGeoNode.h:99
Bool_t IsOffset() const
Definition TGeoNode.h:105
virtual TGeoMatrix * GetMatrix() const =0
Bool_t IsCloned() const
Definition TGeoNode.h:103
virtual TGeoNode * MakeCopyNode() const
Definition TGeoNode.h:113
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="")
Check overlaps bigger than OVLP hierarchically, starting with this node.
Definition TGeoNode.cxx:192
const TGeoHMatrix * fMatrix
~TGeoPNEntry() override
Destructor.
void SetPhysicalNode(TGeoPhysicalNode *node)
Setter for the corresponding physical node.
TGeoPhysicalNode * fNode
TGeoHMatrix * fGlobalOrig
TGeoPNEntry()
Default constructor.
void SetMatrix(const TGeoHMatrix *matrix)
Set the additional matrix for this node entry.
Physical nodes are the actual 'touchable' objects in the geometry, representing a path of positioned ...
void SetBranchAsState()
Set node branch according to current state.
Bool_t IsAligned() const
TGeoNode * GetMother(Int_t levup=1) const
Return parent at LEVUP generation.
TGeoNode * GetNode(Int_t level=-1) const
Return node in branch at LEVEL. If not specified, return last leaf.
void Refresh()
Refresh this physical node.
Bool_t SetPath(const char *path)
Specify the path for this node.
void SetVisibility(Bool_t flag=kTRUE)
TGeoPhysicalNode()
Default constructor.
void SetAligned(Bool_t flag=kTRUE)
void Paint(Option_t *option="") override
Paint this node and its content according to visualization settings.
void Print(Option_t *option="") const override
Print info about this node.
~TGeoPhysicalNode() override
Destructor.
void SetVisibleFull(Bool_t flag=kTRUE)
Bool_t IsMatchingState(TGeoNavigator *nav) const
Checks if a given navigator state matches this physical node.
void SetMatrixOrig(const TGeoMatrix *local)
Allows PN entries (or users) to preset the local original matrix for the last node pointed by the pat...
TGeoHMatrix * GetMatrix(Int_t level=-1) const
Return global matrix for node at LEVEL.
void Draw(Option_t *option="") override
Draw this node.
TGeoHMatrix * fMatrixOrig
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.
TGeoVolume * GetVolume(Int_t level=-1) const
Return volume associated with node at LEVEL in the branch.
void SetIsVolAtt(Bool_t flag=kTRUE)
TGeoShape * GetShape(Int_t level=-1) const
Return shape associated with volume.
TObjArray * fMatrices
The shape encapsulating an assembly (union) of volumes.
Base abstract class for all shapes.
Definition TGeoShape.h:25
virtual Bool_t IsComposite() const
Definition TGeoShape.h:138
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:43
@ kVolumeImportNodes
Definition TGeoVolume.h:76
virtual TGeoVolume * CloneVolume() const
Clone this volume.
TGeoShape * GetShape() const
Definition TGeoVolume.h:190
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
Finder class handling voxels.
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
const char * GetName() const override
Returns name of object.
Definition TNamed.h:49
TString fName
Definition TNamed.h:32
An array of TObjects.
Definition TObjArray.h:31
void AddAt(TObject *obj, Int_t idx) override
Add object at position ids.
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
void Delete(Option_t *option="") override
Remove all objects from the array AND delete all heap based objects.
TObject * At(Int_t idx) const override
Definition TObjArray.h:164
TObject * UncheckedAt(Int_t i) const
Definition TObjArray.h:84
TObject * RemoveAt(Int_t idx) override
Remove object at index idx.
void Add(TObject *obj) override
Definition TObjArray.h:68
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:1057
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1071
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Definition TObject.cxx:1099
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:1045
Basic string class.
Definition TString.h:138
const char * Data() const
Definition TString.h:384
Abstract class for geometry painters.