library: libGeom
#include "TGeoNode.h"

TGeoNode


class description - header file - source file - inheritance tree (.pdf)

class TGeoNode : public TNamed, public TGeoAtt

Inheritance Chart:
TObject
<-
TNamed
TGeoAtt
<-
TGeoNode
<-
TGeoNodeMatrix
TGeoNodeOffset
 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.


    protected:
TGeoNode& operator=(const TGeoNode&) public:
virtual ~TGeoNode() virtual void Browse(TBrowser* b) virtual void cd() const void CheckOverlaps(Double_t ovlp = 0.1) void CheckShapes() static TClass* Class() virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void Draw(Option_t* option = "") void DrawOnly(Option_t* option = "") void DrawOverlaps() virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) void FillIdArray(Int_t& ifree, Int_t& nodeid, Int_t* array) const Int_t FindNode(const TGeoNode* node, Int_t level) virtual Int_t GetByteCount() const Int_t GetColour() const TGeoNode* GetDaughter(Int_t ind) const virtual TGeoPatternFinder* GetFinder() const virtual Int_t GetIndex() const virtual TGeoMatrix* GetMatrix() const TGeoMedium* GetMedium() const TGeoVolume* GetMotherVolume() const Int_t GetNdaughters() const TObjArray* GetNodes() const Int_t GetNumber() const virtual char* GetObjectInfo(Int_t px, Int_t py) const virtual Int_t GetOptimalVoxels() const Int_t* GetOverlaps(Int_t& novlp) const TGeoVolume* GetVolume() const void InspectNode() const virtual TClass* IsA() const virtual Bool_t IsFolder() const Bool_t IsOffset() const Bool_t IsOnScreen() const Bool_t IsOverlapping() const Bool_t IsVirtual() const Bool_t IsVisDaughters() const Bool_t IsVisible() const virtual void LocalToMaster(const Double_t* local, Double_t* master) const virtual void LocalToMasterVect(const Double_t* local, Double_t* master) const virtual void ls(Option_t* option = "") const virtual TGeoNode* MakeCopyNode() const virtual void MasterToLocal(const Double_t* master, Double_t* local) const virtual void MasterToLocalVect(const Double_t* master, Double_t* local) const Bool_t MayOverlap(Int_t iother) const virtual void Paint(Option_t* option = "") void PrintCandidates() const void PrintOverlaps() const Double_t Safety(Double_t* point, Bool_t in = kTRUE) const void SaveAttributes(ostream& out) void SetAllInvisible() void SetCurrentPoint(Double_t x, Double_t y, Double_t z) void SetInvisible() void SetMotherVolume(const TGeoVolume* mother) void SetNumber(Int_t number) void SetOverlapping(Bool_t flag = kTRUE) void SetOverlaps(Int_t* ovlp, Int_t novlp) void SetVirtual() virtual void SetVisibility(Bool_t vis = kTRUE) void SetVolume(const TGeoVolume* volume) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void VisibleDaughters(Bool_t vis = kTRUE)

Data Members


    protected:
TGeoVolume* fVolume volume associated with this TGeoVolume* fMother mother volume Int_t fNumber copy number Int_t fNovlp number of overlaps Int_t* fOverlaps [fNovlp] list of indices for overlapping brothers public:
static const enum TGeoNode:: kGeoNodeMatrix static const enum TGeoNode:: kGeoNodeOffset static const enum TGeoNode:: kGeoNodeVC static const enum TGeoNode:: kGeoNodeOverlap

Class Description

 TGeoNode
_________
   A node represent a volume positioned inside another.They store links to both
 volumes and to the TGeoMatrix representing the relative positioning. Node are
 never instanciated directly by users, but created as a result of volume operations.
 Adding a volume named A with a given user ID inside a volume B will create a node
 node named A_ID. This will be added to the list of nodes stored by B. Also,
 when applying a division operation in N slices to a volume A, a list of nodes
 B_1, B_2, ..., B_N is also created. A node B_i does not represent a unique
 object in the geometry because its container A might be at its turn positioned
 as node inside several other volumes. Only when a complete branch of nodes
 is fully defined up to the top node in the geometry, a given path like:
       /TOP_1/.../A_3/B_7 will represent an unique object. Its global transformation
 matrix can be computed as the pile-up of all local transformations in its
 branch. We will therefore call "logical graph" the hierarchy defined by nodes
 and volumes. The expansion of the logical graph by all possible paths defines
 a tree sructure where all nodes are unique "touchable" objects. We will call
 this the "physical tree". Unlike the logical graph, the physical tree can
 become a huge structure with several milions of nodes in case of complex
 geometries, therefore it is not always a good idea to keep it transient
 in memory. Since a the logical and physical structures are correlated, the
 modeller rather keeps track only of the current branch, updating the current
 global matrix at each change of the level in geometry. The current physical node
 is not an object that can be asked for at a given moment, but rather represented
 by the combination: current node + current global matrix. However, physical nodes
 have unique ID's that can be retreived for a given modeler state. These can be
 fed back to the modeler in order to force a physical node to become current.
 The advantage of this comes from the fact that all navigation queries check
 first the current node, therefore knowing the location of a point in the
 geometry can be saved as a starting state for later use.

   Nodes can be declared as "overlapping" in case they do overlap with other
 nodes inside the same container or extrude this container. Non-overlapping
 nodes can be created with:

      TGeoVolume::AddNode(TGeoVolume *daughter, Int_t copy_No, TGeoMatrix *matr);

 The creation of overapping nodes can be done with a similar prototype:

      TGeoVolume::AddNodeOverlap(same arguments);

 When closing the geometry, overlapping nodes perform a check of possible
 overlaps with their neighbours. These are stored and checked all the time
 during navigation, therefore navigation is slower when embedding such nodes
 into geometry.

   Node have visualization attributes as volume have. When undefined by users,
 painting a node on a pad will take the corresponding volume attributes.

TGeoNode& operator=(const TGeoNode& gn)
assignment operator
~TGeoNode()
 Destructor
void Browse(TBrowser *b)
 How-to-browse for a node.
void CheckOverlaps(Double_t ovlp)
 Check overlaps bigger than OVLP hierarchically, starting with this node.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
 compute the closest distance of approach from point px,py to this node
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
 Execute mouse actions on this volume.
char * GetObjectInfo(Int_t px, Int_t py)
 Get node info for the browser.
Bool_t IsOnScreen()
 check if this node is drawn. Assumes that this node is current
void InspectNode()
 Inspect this node.
void CheckShapes()
 check for wrong parameters in shapes
void DrawOnly(Option_t *option)
 draw only this node independently of its vis options
void Draw(Option_t *option)
 draw current node according to option
void DrawOverlaps()
 Method drawing the overlap candidates with this node.
void FillIdArray(Int_t &ifree, Int_t &nodeid, Int_t *array)
 Fill array with node id. Recursive on node branch.
Int_t FindNode(const TGeoNode *node, Int_t level)
 Search for a node within the branch of this one.
void SaveAttributes(ostream &out)
 save attributes for this node
Bool_t MayOverlap(Int_t iother)
 Check the overlab between the bounding box of the node overlaps with the one
 the brother with index IOTHER.
void MasterToLocal(const Double_t *master, Double_t *local)
 Convert the point coordinates from mother reference to local reference system
void MasterToLocalVect(const Double_t *master, Double_t *local)
 Convert a vector from mother reference to local reference system
void LocalToMaster(const Double_t *local, Double_t *master)
 Convert the point coordinates from local reference system to mother reference
void LocalToMasterVect(const Double_t *local, Double_t *master)
 Convert a vector from local reference system to mother reference
void Paint(Option_t *option)
 Paint this node and its content according to visualization settings.
void PrintCandidates()
 print daughters candidates for containing current point
   cd();
void PrintOverlaps()
 print possible overlapping nodes
   if (!IsOverlapping()) {printf("node %s is ONLY\n", GetName()); return;}
Double_t Safety(Double_t *point, Bool_t in)
 computes the closest distance from given point to this shape
void SetOverlaps(Int_t *ovlp, Int_t novlp)
 set the list of overlaps for this node (ovlp must be created with operator new)
void SetVisibility(Bool_t vis)
 Set visibility of the node (obsolete).
void VisibleDaughters(Bool_t vis)
 Set visibility of the daughters (obsolete).
void cd()
Int_t GetByteCount()
Int_t GetColour()
Int_t GetIndex()
Int_t GetNdaughters()
Int_t GetNumber()
Int_t GetOptimalVoxels()
Bool_t IsFolder()
Bool_t IsOffset()
Bool_t IsOverlapping()
Bool_t IsVirtual()
Bool_t IsVisible()
Bool_t IsVisDaughters()
void SetCurrentPoint(Double_t x, Double_t y, Double_t z)
void SetVolume(const TGeoVolume *volume)
void SetNumber(Int_t number)
void SetOverlapping(Bool_t flag=kTRUE)
void SetVirtual()
void SetInvisible()
void SetAllInvisible()
void SetMotherVolume(const TGeoVolume *mother)
void ls(Option_t *option = "")

Author: Andrei Gheata 24/10/01
Last update: root/geom:$Name: $:$Id: TGeoNode.cxx,v 1.38 2006/07/09 05:27:53 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.