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 in the Users Guide.
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 = 0;
152 TGeoVolume *vm = GetVolume(0);
153 TGeoVolume *vd = 0;
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 // Now nnode is a cloned node of the one that need to be aligned
209 TGeoNodeMatrix *aligned = (TGeoNodeMatrix*)nnode;
210 vm = nnode->GetMotherVolume();
211 vd = nnode->GetVolume();
212 if (newmat) {
213 // Check if the old matrix for this node was shared
214 Bool_t shared = kFALSE;
215 Int_t nd = vm->GetNdaughters();
217 if (nnode->GetMatrix()->IsShared()) {
218 // Now find the node having a composite shape using this shared matrix
219 for (i=0; i<nd; i++) {
220 node = vm->GetNode(i);
221 if (node==nnode) continue;
222 if (node->IsOffset()) continue;
223 if (!node->GetVolume()->GetShape()->IsComposite()) continue;
224 // We found a node having a composite shape, scan for the shared matrix
225 cs = (TGeoCompositeShape*)node->GetVolume()->GetShape();
226 if (cs->GetBoolNode()->GetRightMatrix() != nnode->GetMatrix()) continue;
227 // The composite uses the matrix -> replace it
229 ncs->GetBoolNode()->ReplaceMatrix(nnode->GetMatrix(), newmat);
230 // We have to clone the node/volume having the composite shape
231 TGeoVolume *newvol = node->GetVolume()->CloneVolume();
232 if (!newvol) {
233 Error("Align", "Cannot clone volume %s", node->GetVolume()->GetName());
234 return kFALSE;
235 }
236 newvol->SetShape(ncs);
237 TGeoNode *newnode = node->MakeCopyNode();
238 if (!newnode) {
239 Error("Align", "Cannot clone node %s", node->GetName());
240 return kFALSE;
241 }
242 newnode->SetVolume(newvol);
243 newnode->SetMotherVolume(vm);
245 gGeoManager->GetListOfGShapes()->Add(newnode);
246 }
247 vm->GetNodes()->RemoveAt(i);
248 vm->GetNodes()->AddAt(newnode,i);
249 shared = kTRUE;
250 }
251 if (!shared) Error("Align", "The matrix replaced for %s is not actually shared", GetName());
252 } else {
253 // The aligned node may have a composite shape containing a shared matrix
254 if (vd->GetShape()->IsComposite()) {
255 cs = (TGeoCompositeShape*)vd->GetShape();
256 if (cs->GetBoolNode()->GetRightMatrix()->IsShared()) {
257 if (!nnode->GetMatrix()->IsIdentity()) {
258 Error("Align", "The composite shape having a shared matrix on the subtracted branch must be positioned using identity matrix.");
259 return kFALSE;
260 }
261 // We have to put the alignment matrix on top of the left branch
262 // of the composite shape. The node is already decoupled from logical tree.
264 TGeoMatrix *oldmat = ncs->GetBoolNode()->GetLeftMatrix();
265 TGeoHMatrix *newmat1 = new TGeoHMatrix(*newmat);
266 newmat1->Multiply(oldmat);
267 ncs->GetBoolNode()->ReplaceMatrix(oldmat, newmat1);
268 vd->SetShape(ncs);
269 // The right-side matrix pointer is preserved, so no need to update nodes.
270 aligned = 0; // to prevent updating its matrix
271 }
272 }
273 }
274 // Register matrix and make it the active one
275 if (!newmat->IsRegistered()) newmat->RegisterYourself();
276 if (aligned) {
277 aligned->SetMatrix(newmat);
278 // Update the global matrix for the aligned node
279 TGeoHMatrix *global = GetMatrix();
281 *global = up;
282 global->Multiply(newmat);
283 }
284 }
285 // Change the shape for the aligned node
286 if (newshape) vd->SetShape(newshape);
287
288 // Re-compute bounding box of mother(s) if needed
289 for (i=fLevel-1; i>0; i--) {
290 Bool_t dassm = vd->IsAssembly(); // is daughter assembly ?
291 vd = GetVolume(i);
292 if (!vd) break;
293 Bool_t cassm = vd->IsAssembly(); // is current assembly ?
294 if (cassm) ((TGeoShapeAssembly*)vd->GetShape())->NeedsBBoxRecompute();
295 if ((cassm || dassm) && vd->GetVoxels()) vd->GetVoxels()->SetNeedRebuild();
296 if (!cassm) break;
297 }
298
299 // Now we have to re-voxelize the mother volume
300 TGeoVoxelFinder *voxels = vm->GetVoxels();
301 if (voxels) voxels->SetNeedRebuild();
302 // Eventually check for overlaps
303 if (check) {
304 if (voxels) {
305 voxels->Voxelize();
306 vm->FindOverlaps();
307 }
308 // Set aligned node to be checked
309 i = fLevel;
310 node = GetNode(i);
311 if (!node) return kTRUE;
312 if (node->IsOverlapping()) {
313 Info("Align", "The check for overlaps for node: \n%s\n cannot be performed since the node is declared possibly overlapping",
314 GetName());
315 } else {
317 // Check overlaps for the first non-assembly parent node
318 while ((node=GetNode(--i))) {
319 if (!node->GetVolume()->IsAssembly()) break;
320 }
321 if (node && node->IsOverlapping()) {
322 Info("Align", "The check for overlaps for assembly node: \n%s\n cannot be performed since the parent %s is declared possibly overlapping",
323 GetName(), node->GetName());
324 node = 0;
325 }
326 if (node) node->CheckOverlaps(ovlp);
328 }
329 }
330 // Clean current matrices from cache
333 return kTRUE;
334}
335
336////////////////////////////////////////////////////////////////////////////////
337
339{
340 if (GetNode(0) != gGeoManager->GetTopNode()) return;
342}
343
344////////////////////////////////////////////////////////////////////////////////
345/// Draw this node.
346
348{
349}
350
351////////////////////////////////////////////////////////////////////////////////
352/// Return parent at LEVUP generation
353
355{
356 Int_t ind = fLevel-levup;
357 if (ind<0) return 0;
358 return (TGeoNode*)fNodes->UncheckedAt(ind);
359}
360
361////////////////////////////////////////////////////////////////////////////////
362/// Return global matrix for node at LEVEL.
363
365{
366 if (level<0) return (TGeoHMatrix*)fMatrices->UncheckedAt(fLevel);
367 if (level>fLevel) return 0;
368 return (TGeoHMatrix*)fMatrices->UncheckedAt(level);
369}
370
371////////////////////////////////////////////////////////////////////////////////
372/// Return node in branch at LEVEL. If not specified, return last leaf.
373
375{
376 if (level<0) return (TGeoNode*)fNodes->UncheckedAt(fLevel);
377 if (level>fLevel) return 0;
378 return (TGeoNode*)fNodes->UncheckedAt(level);
379}
380
381////////////////////////////////////////////////////////////////////////////////
382/// Return volume associated with node at LEVEL in the branch
383
385{
386 TGeoNode *node = GetNode(level);
387 if (node) return node->GetVolume();
388 return 0;
389}
390
391////////////////////////////////////////////////////////////////////////////////
392/// Return shape associated with volume.
393
395{
396 TGeoVolume *vol = GetVolume(level);
397 if (vol) return vol->GetShape();
398 return 0;
399}
400
401////////////////////////////////////////////////////////////////////////////////
402/// Paint this node and its content according to visualization settings.
403
405{
407 if (!painter) return;
408// painter->PaintNode(this, option);
409}
410
411////////////////////////////////////////////////////////////////////////////////
412/// Print info about this node.
413
414void TGeoPhysicalNode::Print(Option_t * /*option*/) const
415{
416 printf("TGeoPhysicalNode: %s level=%d aligned=%d\n", fName.Data(), fLevel, IsAligned());
417 for (Int_t i=0; i<=fLevel; i++) {
418 printf(" level %d: node %s\n", i, GetNode(i)->GetName());
419 printf(" local matrix:\n");
420 if (GetNode(i)->GetMatrix()->IsIdentity()) printf(" IDENTITY\n");
421 else GetNode(i)->GetMatrix()->Print();
422 printf(" global matrix:\n");
423 if (GetMatrix(i)->IsIdentity()) printf(" IDENTITY\n");
424 else GetMatrix(i)->Print();
425 }
426 if (IsAligned() && fMatrixOrig) {
427 printf(" original local matrix:\n");
429 }
430}
431
432////////////////////////////////////////////////////////////////////////////////
433/// Refresh this physical node. Called for all registered physical nodes
434/// after an Align() call.
435
437{
438 SetPath(fName.Data());
439}
440
441////////////////////////////////////////////////////////////////////////////////
442/// Set node branch according to current state
443
445{
447 if (!cache) {
448 Error("SetBranchAsState","no state available");
449 return;
450 }
451 if (!cache->IsDummy()) {
452 Error("SetBranchAsState", "not implemented for full cache");
453 return;
454 }
455 if (!fNodes) fNodes = new TObjArray(30);
456 if (!fMatrices) fMatrices = new TObjArray(30);
457 TGeoHMatrix **matrices = (TGeoHMatrix **) cache->GetMatrices();
458 TGeoNode **branch = (TGeoNode **) cache->GetBranch();
459
460 Bool_t refresh = (fLevel>0)?kTRUE:kFALSE;
461 if (refresh) {
462 TGeoHMatrix *current;
463 for (Int_t i=0; i<=fLevel; i++) {
464 fNodes->AddAtAndExpand(branch[i],i);
465 current = (TGeoHMatrix*)fMatrices->UncheckedAt(i);
466 *current = *matrices[i];
467 }
468 return;
469 }
471 for (Int_t i=0; i<=fLevel; i++) {
472 fNodes->AddAtAndExpand(branch[i],i);
473 fMatrices->AddAtAndExpand(new TGeoHMatrix(*matrices[i]),i);
474 }
476 if (!fMatrixOrig) fMatrixOrig = new TGeoHMatrix();
477 *fMatrixOrig = node->GetMatrix();
478}
479
480////////////////////////////////////////////////////////////////////////////////
481/// Allows PN entries (or users) to preset the local original matrix for the
482/// last node pointed by the path.
483
485{
486 if (!fMatrixOrig) fMatrixOrig = new TGeoHMatrix();
487 if (!local) {
489 return;
490 }
491 *fMatrixOrig = local;
492}
493
494////////////////////////////////////////////////////////////////////////////////
495/// Specify the path for this node.
496
498{
499 if (!gGeoManager->cd(path)) {
500 Error("SetPath","wrong path -> maybe RestoreMasterVolume");
501 return kFALSE;
502 }
504 return kTRUE;
505}
506
507////////////////////////////////////////////////////////////////////////////////
508/// Checks if a given navigator state matches this physical node
509
511{
512 TGeoNodeCache *cache = nav->GetCache();
513 if (!cache) {
514 Fatal("SetBranchAsState","no state available");
515 return kFALSE;
516 }
517 TGeoNode **branch = (TGeoNode **) cache->GetBranch();
518 for (Int_t i=1; i<=fLevel; i++)
519 if (fNodes->At(i) != branch[i]) return kFALSE;
520 return kTRUE;
521}
522
524
525////////////////////////////////////////////////////////////////////////////////
526/// Default constructor
527
529{
530 fNode = 0;
531 fMatrix = 0;
532 fGlobalOrig = 0;
533}
534
535////////////////////////////////////////////////////////////////////////////////
536/// Default constructor
537
538TGeoPNEntry::TGeoPNEntry(const char *name, const char *path)
539 :TNamed(name, path)
540{
541 if (!gGeoManager || !gGeoManager->IsClosed() || !gGeoManager->CheckPath(path)) {
542 TString errmsg("Cannot define a physical node link without a closed geometry and a valid path !");
543 Error("ctor", "%s", errmsg.Data());
544 throw errmsg;
545 return;
546 }
548 gGeoManager->cd(path);
549 fGlobalOrig = new TGeoHMatrix();
552 fNode = 0;
553 fMatrix = 0;
554}
555
556////////////////////////////////////////////////////////////////////////////////
557/// Destructor
558
560{
561 if (fMatrix && !fMatrix->IsRegistered()) delete fMatrix;
562 delete fGlobalOrig;
563}
564
565////////////////////////////////////////////////////////////////////////////////
566/// Setter for the corresponding physical node.
567
569{
570 if (fNode && node) {
571 Warning("SetPhysicalNode", "Physical node changed for entry %s", GetName());
572 Warning("SetPhysicalNode", "=== New path: %s", node->GetName());
573 }
574 fNode = node;
575}
576
577////////////////////////////////////////////////////////////////////////////////
578/// Set the additional matrix for this node entry. The matrix will be deleted
579/// by this class unless registered by the user to gGeoManager
580
582{
583 fMatrix = mat;
584}
const Bool_t kFALSE
Definition RtypesCore.h:92
double Double_t
Definition RtypesCore.h:59
const Bool_t kTRUE
Definition RtypesCore.h:91
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
Class handling Boolean composition of shapes.
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:37
virtual void AddAtAndExpand(TObject *obj, Int_t idx)
Add object at position idx.
void Add(TObject *obj)
Definition TObjArray.h:74
TObject * UncheckedAt(Int_t i) const
Definition TObjArray.h:90
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:166
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition TObject.h:187
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:879
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:893
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Definition TObject.cxx:921
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:867
Basic string class.
Definition TString.h:136
const char * Data() const
Definition TString.h:369
Abstract class for geometry painters.