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
73
74////////////////////////////////////////////////////////////////////////////////
75/// Default constructor
76
78{
79 fLevel = 0;
80 fMatrices = 0;
81 fNodes = 0;
82 fMatrixOrig = 0;
87}
88
89////////////////////////////////////////////////////////////////////////////////
90/// Constructor
91
92TGeoPhysicalNode::TGeoPhysicalNode(const char *path) : TNamed(path,"")
93{
94 if (!path[0]) {
95 Error("ctor", "path not valid");
96 return;
97 }
98 fLevel = 0;
99 fMatrices = new TObjArray(30);
100 fNodes = new TObjArray(30);
101 fMatrixOrig = 0;
102 SetPath(path);
107}
108
109////////////////////////////////////////////////////////////////////////////////
110/// Destructor
111
113{
114 if (fMatrices) {
115 fMatrices->Delete();
116 delete fMatrices;
117 }
118 if (fNodes) delete fNodes;
119 if (fMatrixOrig) delete fMatrixOrig;
120}
121
122////////////////////////////////////////////////////////////////////////////////
123/// Align a physical node with a new relative matrix/shape.
124/// Example: /TOP_1/A_1/B_1/C_1
125/// node->Align(transl_1, box) will perform:
126/// - change RELATIVE translation of C_1 node (with respect to its
127/// container volume B) to transl_1
128/// - change the shape of the C volume
129/// *NOTE* The operations will affect ONLY the LAST node in the branch. All
130/// volumes/nodes in the branch represented by this physical node are
131/// CLONED so the operation does not affect other possible replicas.
132
134{
135 if (!newmat && !newshape) return kFALSE;
136 if (TGeoManager::IsLocked()) {
137 Error("Align", "Not performed. Geometry in LOCKED mode !");
138 return kFALSE;
139 }
140 if (newmat == gGeoIdentity) {
141 Error("Align", "Cannot align using gGeoIdentity. Use some default matrix constructor to represent identities.");
142 return kFALSE;
143 }
144 TGeoNode *node = GetNode();
145 if (node->IsOffset()) {
146 Error("Align", "Cannot align division nodes: %s\n",node->GetName());
147 return kFALSE;
148 }
149 // Refresh the node since other Align calls may have altered the stored nodes
150 Refresh();
151 TGeoNode *nnode = nullptr;
152 TGeoVolume *vm = GetVolume(0);
153 TGeoVolume *vd = nullptr;
154 Int_t i;
155 if (!IsAligned()) {
156 Int_t *id = new Int_t[fLevel];
157 for (i=0; i<fLevel; i++) {
158 // Store daughter indexes
159 vd = GetVolume(i);
160 node = GetNode(i+1);
161 id[i] = vd->GetIndex(node);
162 if (id[i]<0) {
163 Error("Align","%s cannot align node %s",GetName(), node->GetName());
164 delete [] id;
165 return kFALSE;
166 }
167 }
168 for (i=0; i<fLevel; i++) {
169 // Get daughter node and its id inside vm
170 node = GetNode(i+1);
171 // Clone daughter volume and node if not done yet
172 if (node->IsCloned()) {
173 vd = node->GetVolume();
174 nnode = node;
175 } else {
176 vd = node->GetVolume()->CloneVolume();
177 if (!vd) {
178 delete [] id;
179 Fatal("Align", "Cannot clone volume %s", node->GetVolume()->GetName());
180 return kFALSE;
181 }
182 nnode = node->MakeCopyNode();
183 if (!nnode) {
184 delete [] id;
185 Fatal("Align", "Cannot make copy node for %s", node->GetName());
186 return kFALSE;
187 }
188 // Correct pointers to mother and volume
189 nnode->SetVolume(vd);
190 nnode->SetMotherVolume(vm);
191 // Decouple old node from mother volume and connect new one
194 }
195 vm->GetNodes()->RemoveAt(id[i]);
196 vm->GetNodes()->AddAt(nnode,id[i]);
197 fNodes->RemoveAt(i+1);
198 fNodes->AddAt(nnode,i+1);
199 // node->GetVolume()->Release();
200 }
201 // Consider new cloned volume as mother and continue
202 vm = vd;
203 }
204 delete [] id;
205 } else {
206 nnode = GetNode();
207 }
208 if (!node) {
209 Fatal("Align", "Cannot get node %s", GetName());
210 return kFALSE;
211 }
212
213 // Now nnode is a cloned node of the one that need to be aligned
214 TGeoNodeMatrix *aligned = (TGeoNodeMatrix*)nnode;
215 vm = nnode->GetMotherVolume();
216 vd = nnode->GetVolume();
217 if (newmat) {
218 // Check if the old matrix for this node was shared
219 Bool_t shared = kFALSE;
220 Int_t nd = vm->GetNdaughters();
222 if (nnode->GetMatrix()->IsShared()) {
223 // Now find the node having a composite shape using this shared matrix
224 for (i=0; i<nd; i++) {
225 node = vm->GetNode(i);
226 if (node==nnode) continue;
227 if (node->IsOffset()) continue;
228 if (!node->GetVolume()->GetShape()->IsComposite()) continue;
229 // We found a node having a composite shape, scan for the shared matrix
230 cs = (TGeoCompositeShape*)node->GetVolume()->GetShape();
231 if (cs->GetBoolNode()->GetRightMatrix() != nnode->GetMatrix()) continue;
232 // The composite uses the matrix -> replace it
234 ncs->GetBoolNode()->ReplaceMatrix(nnode->GetMatrix(), newmat);
235 // We have to clone the node/volume having the composite shape
236 TGeoVolume *newvol = node->GetVolume()->CloneVolume();
237 if (!newvol) {
238 Error("Align", "Cannot clone volume %s", node->GetVolume()->GetName());
239 return kFALSE;
240 }
241 newvol->SetShape(ncs);
242 TGeoNode *newnode = node->MakeCopyNode();
243 if (!newnode) {
244 Error("Align", "Cannot clone node %s", node->GetName());
245 return kFALSE;
246 }
247 newnode->SetVolume(newvol);
248 newnode->SetMotherVolume(vm);
250 gGeoManager->GetListOfGShapes()->Add(newnode);
251 }
252 vm->GetNodes()->RemoveAt(i);
253 vm->GetNodes()->AddAt(newnode,i);
254 shared = kTRUE;
255 }
256 if (!shared) Error("Align", "The matrix replaced for %s is not actually shared", GetName());
257 } else {
258 // The aligned node may have a composite shape containing a shared matrix
259 if (vd->GetShape()->IsComposite()) {
260 cs = (TGeoCompositeShape*)vd->GetShape();
261 if (cs->GetBoolNode()->GetRightMatrix()->IsShared()) {
262 if (!nnode->GetMatrix()->IsIdentity()) {
263 Error("Align", "The composite shape having a shared matrix on the subtracted branch must be positioned using identity matrix.");
264 return kFALSE;
265 }
266 // We have to put the alignment matrix on top of the left branch
267 // of the composite shape. The node is already decoupled from logical tree.
269 TGeoMatrix *oldmat = ncs->GetBoolNode()->GetLeftMatrix();
270 TGeoHMatrix *newmat1 = new TGeoHMatrix(*newmat);
271 newmat1->Multiply(oldmat);
272 ncs->GetBoolNode()->ReplaceMatrix(oldmat, newmat1);
273 vd->SetShape(ncs);
274 // The right-side matrix pointer is preserved, so no need to update nodes.
275 aligned = 0; // to prevent updating its matrix
276 }
277 }
278 }
279 // Register matrix and make it the active one
280 if (!newmat->IsRegistered()) newmat->RegisterYourself();
281 if (aligned) {
282 aligned->SetMatrix(newmat);
283 // Update the global matrix for the aligned node
284 TGeoHMatrix *global = GetMatrix();
286 *global = up;
287 global->Multiply(newmat);
288 }
289 }
290 // Change the shape for the aligned node
291 if (newshape) vd->SetShape(newshape);
292
293 // Re-compute bounding box of mother(s) if needed
294 for (i=fLevel-1; i>0; i--) {
295 Bool_t dassm = vd->IsAssembly(); // is daughter assembly ?
296 vd = GetVolume(i);
297 if (!vd) break;
298 Bool_t cassm = vd->IsAssembly(); // is current assembly ?
299 if (cassm) ((TGeoShapeAssembly*)vd->GetShape())->NeedsBBoxRecompute();
300 if ((cassm || dassm) && vd->GetVoxels()) vd->GetVoxels()->SetNeedRebuild();
301 if (!cassm) break;
302 }
303
304 // Now we have to re-voxelize the mother volume
305 TGeoVoxelFinder *voxels = vm->GetVoxels();
306 if (voxels) voxels->SetNeedRebuild();
307 // Eventually check for overlaps
308 if (check) {
309 if (voxels) {
310 voxels->Voxelize();
311 vm->FindOverlaps();
312 }
313 // Set aligned node to be checked
314 i = fLevel;
315 node = GetNode(i);
316 if (!node) return kTRUE;
317 if (node->IsOverlapping()) {
318 Info("Align", "The check for overlaps for node: \n%s\n cannot be performed since the node is declared possibly overlapping",
319 GetName());
320 } else {
322 // Check overlaps for the first non-assembly parent node
323 while ((node=GetNode(--i))) {
324 if (!node->GetVolume()->IsAssembly()) break;
325 }
326 if (node && node->IsOverlapping()) {
327 Info("Align", "The check for overlaps for assembly node: \n%s\n cannot be performed since the parent %s is declared possibly overlapping",
328 GetName(), node->GetName());
329 node = 0;
330 }
331 if (node) node->CheckOverlaps(ovlp);
333 }
334 }
335 // Clean current matrices from cache
338 return kTRUE;
339}
340
341////////////////////////////////////////////////////////////////////////////////
342
344{
345 if (GetNode(0) != gGeoManager->GetTopNode()) return;
347}
348
349////////////////////////////////////////////////////////////////////////////////
350/// Draw this node.
351
353{
354}
355
356////////////////////////////////////////////////////////////////////////////////
357/// Return parent at LEVUP generation
358
360{
361 Int_t ind = fLevel-levup;
362 if (ind<0) return 0;
363 return (TGeoNode*)fNodes->UncheckedAt(ind);
364}
365
366////////////////////////////////////////////////////////////////////////////////
367/// Return global matrix for node at LEVEL.
368
370{
371 if (level<0) return (TGeoHMatrix*)fMatrices->UncheckedAt(fLevel);
372 if (level>fLevel) return 0;
373 return (TGeoHMatrix*)fMatrices->UncheckedAt(level);
374}
375
376////////////////////////////////////////////////////////////////////////////////
377/// Return node in branch at LEVEL. If not specified, return last leaf.
378
380{
381 if (level<0) return (TGeoNode*)fNodes->UncheckedAt(fLevel);
382 if (level>fLevel) return 0;
383 return (TGeoNode*)fNodes->UncheckedAt(level);
384}
385
386////////////////////////////////////////////////////////////////////////////////
387/// Return volume associated with node at LEVEL in the branch
388
390{
391 TGeoNode *node = GetNode(level);
392 if (node) return node->GetVolume();
393 return 0;
394}
395
396////////////////////////////////////////////////////////////////////////////////
397/// Return shape associated with volume.
398
400{
401 TGeoVolume *vol = GetVolume(level);
402 if (vol) return vol->GetShape();
403 return 0;
404}
405
406////////////////////////////////////////////////////////////////////////////////
407/// Paint this node and its content according to visualization settings.
408
410{
412 if (!painter) return;
413// painter->PaintNode(this, option);
414}
415
416////////////////////////////////////////////////////////////////////////////////
417/// Print info about this node.
418
419void TGeoPhysicalNode::Print(Option_t * /*option*/) const
420{
421 printf("TGeoPhysicalNode: %s level=%d aligned=%d\n", fName.Data(), fLevel, IsAligned());
422 for (Int_t i=0; i<=fLevel; i++) {
423 printf(" level %d: node %s\n", i, GetNode(i)->GetName());
424 printf(" local matrix:\n");
425 if (GetNode(i)->GetMatrix()->IsIdentity()) printf(" IDENTITY\n");
426 else GetNode(i)->GetMatrix()->Print();
427 printf(" global matrix:\n");
428 if (GetMatrix(i)->IsIdentity()) printf(" IDENTITY\n");
429 else GetMatrix(i)->Print();
430 }
431 if (IsAligned() && fMatrixOrig) {
432 printf(" original local matrix:\n");
434 }
435}
436
437////////////////////////////////////////////////////////////////////////////////
438/// Refresh this physical node. Called for all registered physical nodes
439/// after an Align() call.
440
442{
443 SetPath(fName.Data());
444}
445
446////////////////////////////////////////////////////////////////////////////////
447/// Set node branch according to current state
448
450{
452 if (!cache) {
453 Error("SetBranchAsState","no state available");
454 return;
455 }
456 if (!cache->IsDummy()) {
457 Error("SetBranchAsState", "not implemented for full cache");
458 return;
459 }
460 if (!fNodes) fNodes = new TObjArray(30);
461 if (!fMatrices) fMatrices = new TObjArray(30);
462 TGeoHMatrix **matrices = (TGeoHMatrix **) cache->GetMatrices();
463 TGeoNode **branch = (TGeoNode **) cache->GetBranch();
464
465 Bool_t refresh = (fLevel>0)?kTRUE:kFALSE;
466 if (refresh) {
467 TGeoHMatrix *current;
468 for (Int_t i=0; i<=fLevel; i++) {
469 fNodes->AddAtAndExpand(branch[i],i);
470 current = (TGeoHMatrix*)fMatrices->UncheckedAt(i);
471 *current = *matrices[i];
472 }
473 return;
474 }
476 for (Int_t i=0; i<=fLevel; i++) {
477 fNodes->AddAtAndExpand(branch[i],i);
478 fMatrices->AddAtAndExpand(new TGeoHMatrix(*matrices[i]),i);
479 }
481 if (!fMatrixOrig) fMatrixOrig = new TGeoHMatrix();
482 *fMatrixOrig = node->GetMatrix();
483}
484
485////////////////////////////////////////////////////////////////////////////////
486/// Allows PN entries (or users) to preset the local original matrix for the
487/// last node pointed by the path.
488
490{
491 if (!fMatrixOrig) fMatrixOrig = new TGeoHMatrix();
492 if (!local) {
494 return;
495 }
496 *fMatrixOrig = local;
497}
498
499////////////////////////////////////////////////////////////////////////////////
500/// Specify the path for this node.
501
503{
504 if (!gGeoManager->cd(path)) {
505 Error("SetPath","wrong path -> maybe RestoreMasterVolume");
506 return kFALSE;
507 }
509 return kTRUE;
510}
511
512////////////////////////////////////////////////////////////////////////////////
513/// Checks if a given navigator state matches this physical node
514
516{
517 TGeoNodeCache *cache = nav->GetCache();
518 if (!cache) {
519 Fatal("SetBranchAsState","no state available");
520 return kFALSE;
521 }
522 TGeoNode **branch = (TGeoNode **) cache->GetBranch();
523 for (Int_t i=1; i<=fLevel; i++)
524 if (fNodes->At(i) != branch[i]) return kFALSE;
525 return kTRUE;
526}
527
529
530////////////////////////////////////////////////////////////////////////////////
531/// Default constructor
532
534{
535 fNode = 0;
536 fMatrix = 0;
537 fGlobalOrig = 0;
538}
539
540////////////////////////////////////////////////////////////////////////////////
541/// Default constructor
542
543TGeoPNEntry::TGeoPNEntry(const char *name, const char *path)
544 :TNamed(name, path)
545{
546 if (!gGeoManager || !gGeoManager->IsClosed() || !gGeoManager->CheckPath(path)) {
547 TString errmsg("Cannot define a physical node link without a closed geometry and a valid path !");
548 Error("ctor", "%s", errmsg.Data());
549 throw errmsg;
550 return;
551 }
553 gGeoManager->cd(path);
554 fGlobalOrig = new TGeoHMatrix();
557 fNode = 0;
558 fMatrix = 0;
559}
560
561////////////////////////////////////////////////////////////////////////////////
562/// Destructor
563
565{
566 if (fMatrix && !fMatrix->IsRegistered()) delete fMatrix;
567 delete fGlobalOrig;
568}
569
570////////////////////////////////////////////////////////////////////////////////
571/// Setter for the corresponding physical node.
572
574{
575 if (fNode && node) {
576 Warning("SetPhysicalNode", "Physical node changed for entry %s", GetName());
577 Warning("SetPhysicalNode", "=== New path: %s", node->GetName());
578 }
579 fNode = node;
580}
581
582////////////////////////////////////////////////////////////////////////////////
583/// Set the additional matrix for this node entry. The matrix will be deleted
584/// by this class unless registered by the user to gGeoManager
585
587{
588 fMatrix = mat;
589}
const Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
const Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:364
XFontStruct * id
Definition TGX11.cxx:109
char name[80]
Definition TGX11.cxx:110
R__EXTERN TGeoManager * gGeoManager
R__EXTERN TGeoIdentity * gGeoIdentity
Definition TGeoMatrix.h:478
Bool_t ReplaceMatrix(TGeoMatrix *mat, TGeoMatrix *newmat)
Replace one of the matrices.
TGeoMatrix * GetRightMatrix() const
TGeoMatrix * GetLeftMatrix() const
virtual TGeoBoolNode * MakeClone() const =0
Composite shapes are Boolean combinations of two or more shape components.
TGeoBoolNode * GetBoolNode() const
Matrix class used for computing global transformations Should NOT be used for node definition.
Definition TGeoMatrix.h:421
void Clear(Option_t *option="")
clear the data for this matrix
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return
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:41
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
void Print(Option_t *option="") const
print the matrix in 4x4 format
Bool_t IsIdentity() const
Definition TGeoMatrix.h:66
Bool_t IsRegistered() const
Definition TGeoMatrix.h:77
Bool_t IsShared() const
Definition TGeoMatrix.h:71
Class providing navigation API for TGeo geometries.
TGeoNodeCache * GetCache() const
Special pool of reusable nodes.
Definition TGeoCache.h:58
void * GetMatrices() const
Definition TGeoCache.h:102
Bool_t IsDummy() const
Definition TGeoCache.h:117
void * GetBranch() const
Definition TGeoCache.h:98
A node containing local transformation.
Definition TGeoNode.h:153
void SetMatrix(const TGeoMatrix *matrix)
Matrix setter.
Definition TGeoNode.cxx:767
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
Definition TGeoNode.h:41
Bool_t IsOverlapping() const
Definition TGeoNode.h:105
TGeoVolume * GetVolume() const
Definition TGeoNode.h:97
void SetVolume(TGeoVolume *volume)
Definition TGeoNode.h:115
Bool_t IsOffset() const
Definition TGeoNode.h:103
virtual TGeoMatrix * GetMatrix() const =0
Bool_t IsCloned() const
Definition TGeoNode.h:101
void SetMotherVolume(TGeoVolume *mother)
Definition TGeoNode.h:123
virtual TGeoNode * MakeCopyNode() const
Definition TGeoNode.h:111
TGeoVolume * GetMotherVolume() const
Definition TGeoNode.h:92
void CheckOverlaps(Double_t ovlp=0.1, Option_t *option="")
Check overlaps bigger than OVLP hierarchically, starting with this node.
Definition TGeoNode.cxx:179
The knowledge of the path to the objects that need to be misaligned is essential since there is no ot...
const TGeoHMatrix * fMatrix
void SetPhysicalNode(TGeoPhysicalNode *node)
Setter for the corresponding physical node.
TGeoPhysicalNode * fNode
TGeoHMatrix * fGlobalOrig
TGeoPNEntry()
Default constructor.
virtual ~TGeoPNEntry()
Destructor.
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
virtual ~TGeoPhysicalNode()
Destructor.
TGeoNode * GetMother(Int_t levup=1) const
Return parent at LEVUP generation.
void Draw(Option_t *option="")
Draw this node.
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.
virtual void Print(Option_t *option="") const
Print info about this node.
void SetVisibility(Bool_t flag=kTRUE)
TGeoPhysicalNode()
Default constructor.
Bool_t Align(TGeoMatrix *newmat=0, TGeoShape *newshape=0, Bool_t check=kFALSE, Double_t ovlp=0.001)
Align a physical node with a new relative matrix/shape.
void SetAligned(Bool_t flag=kTRUE)
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.
TGeoHMatrix * fMatrixOrig
virtual void Paint(Option_t *option="")
Paint this node and its content according to visualization settings.
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:26
virtual Bool_t IsComposite() const
Definition TGeoShape.h:130
virtual const char * GetName() const
Get the shape name.
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Definition TGeoVolume.h:49
@ kVolumeImportNodes
Definition TGeoVolume.h:81
virtual TGeoVolume * CloneVolume() const
Clone this volume.
Int_t GetNdaughters() const
Definition TGeoVolume.h:351
TObjArray * GetNodes()
Definition TGeoVolume.h:168
void FindOverlaps() const
loop all nodes marked as overlaps and find overlapping brothers
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
Int_t GetIndex(const TGeoNode *node) const
get index number for a given daughter
TGeoVoxelFinder * GetVoxels() const
Getter for optimization structure.
void SetShape(const TGeoShape *shape)
set the shape associated with this volume
TGeoShape * GetShape() const
Definition TGeoVolume.h:189
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.
Finder class handling voxels.
void SetNeedRebuild(Bool_t flag=kTRUE)
virtual void Voxelize(Option_t *option="")
Voxelize attached volume according to option If the volume is an assembly, make sure the bbox is comp...
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
TString fName
Definition TNamed.h:32
virtual const char * GetName() const
Returns name of object.
Definition TNamed.h:47
An array of TObjects.
Definition TObjArray.h:31
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
void Add(TObject *obj)
Definition TObjArray.h:68
TObject * UncheckedAt(Int_t i) const
Definition TObjArray.h:84
virtual void Delete(Option_t *option="")
Remove all objects from the array AND delete all heap based objects.
virtual void AddAt(TObject *obj, Int_t idx)
Add object at position ids.
virtual TObject * RemoveAt(Int_t idx)
Remove object at index idx.
TObject * At(Int_t idx) const
Definition TObjArray.h:164
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:201
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:949
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:963
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Definition TObject.cxx:991
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:937
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
Abstract class for geometry painters.