ROOT logo
ROOT » GEOM » GEOM » TGeoNode

class TGeoNode: public TNamed, public TGeoAtt

 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.


/* */

Function Members (Methods)

 
    This is an abstract class, constructors will not be documented.
    Look at the header to check for available constructors.

public:
virtual~TGeoNode()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidBrowse(TBrowser* b)
virtual voidcd() const
voidCheckOverlaps(Double_t ovlp = 0.1, Option_t* option = "")MENU
voidCheckShapes()
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
Int_tCountDaughters(Bool_t unique_volumes = kFALSE)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tDistancetoPrimitive(Int_t px, Int_t py)
virtual voidDraw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
voidDrawOnly(Option_t* option = "")
voidDrawOverlaps()
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
voidFillIdArray(Int_t& ifree, Int_t& nodeid, Int_t* array) const
Int_tFindNode(const TGeoNode* node, Int_t level)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Int_tGetByteCount() const
Int_tGetColour() const
TGeoNode*GetDaughter(Int_t ind) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual TGeoPatternFinder*GetFinder() const
virtual const char*TObject::GetIconName() const
virtual Int_tGetIndex() const
virtual TGeoMatrix*GetMatrix() const
TGeoMedium*GetMedium() const
TGeoVolume*GetMotherVolume() const
virtual const char*TNamed::GetName() const
Int_tGetNdaughters() const
TObjArray*GetNodes() const
Int_tGetNumber() const
virtual char*GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Int_tGetOptimalVoxels() const
virtual Option_t*TObject::GetOption() const
Int_t*GetOverlaps(Int_t& novlp) const
virtual const char*TNamed::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
TGeoVolume*GetVolume() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidInspectNode() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
Bool_tTGeoAtt::IsActive() const
Bool_tTGeoAtt::IsActiveDaughters() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tIsFolder() const
Bool_tIsOffset() const
Bool_tTObject::IsOnHeap() const
Bool_tIsOnScreen() constMENU
Bool_tIsOverlapping() const
virtual Bool_tTNamed::IsSortable() const
Bool_tIsVirtual() const
Bool_tTGeoAtt::IsVisBranch() const
Bool_tTGeoAtt::IsVisContainers() const
Bool_tIsVisDaughters() const
Bool_tIsVisible() const
Bool_tTGeoAtt::IsVisLeaves() const
Bool_tTGeoAtt::IsVisOnly() const
Bool_tTGeoAtt::IsVisRaytrace() const
Bool_tTGeoAtt::IsVisStreamed() const
Bool_tTGeoAtt::IsVisTouched() const
Bool_tTObject::IsZombie() const
virtual voidLocalToMaster(const Double_t* local, Double_t* master) const
virtual voidLocalToMasterVect(const Double_t* local, Double_t* master) const
virtual voidls(Option_t* option = "") const
virtual TGeoNode*MakeCopyNode() const
virtual voidMasterToLocal(const Double_t* master, Double_t* local) const
virtual voidMasterToLocalVect(const Double_t* master, Double_t* local) const
voidTObject::MayNotUse(const char* method) const
Bool_tMayOverlap(Int_t iother) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidPaint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
voidPrintCandidates() constMENU
voidPrintOverlaps() constMENU
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTGeoAtt::ResetAttBit(UInt_t f)
voidTObject::ResetBit(UInt_t f)
Double_tSafety(Double_t* point, Bool_t in = kTRUE) const
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
voidSaveAttributes(ostream& out)
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTGeoAtt::SetActiveDaughters(Bool_t flag = kTRUE)
voidTGeoAtt::SetActivity(Bool_t flag = kTRUE)
voidSetAllInvisible()MENU
voidTGeoAtt::SetAttBit(UInt_t f)
voidTGeoAtt::SetAttBit(UInt_t f, Bool_t set)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
voidSetCurrentPoint(Double_t x, Double_t y, Double_t z)MENU
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetInvisible()MENU
voidSetMotherVolume(TGeoVolume* mother)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
voidSetNumber(Int_t number)
static voidTObject::SetObjectStat(Bool_t stat)
voidTGeoAtt::SetOptimization(Option_t* option)
voidSetOverlapping(Bool_t flag = kTRUE)
voidSetOverlaps(Int_t* ovlp, Int_t novlp)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidTObject::SetUniqueID(UInt_t uid)
voidSetVirtual()
voidTGeoAtt::SetVisBranch()
virtual voidTGeoAtt::SetVisContainers(Bool_t flag = kTRUE)
voidTGeoAtt::SetVisDaughters(Bool_t vis = kTRUE)
virtual voidSetVisibility(Bool_t vis = kTRUE)MENU
virtual voidTGeoAtt::SetVisLeaves(Bool_t flag = kTRUE)
virtual voidTGeoAtt::SetVisOnly(Bool_t flag = kTRUE)
voidTGeoAtt::SetVisRaytrace(Bool_t flag = kTRUE)
voidTGeoAtt::SetVisStreamed(Bool_t vis = kTRUE)
voidTGeoAtt::SetVisTouched(Bool_t vis = kTRUE)
voidSetVolume(TGeoVolume* volume)
virtual voidShowMembers(TMemberInspector& insp)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTGeoAtt::TestAttBit(UInt_t f) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
voidVisibleDaughters(Bool_t vis = kTRUE)MENU
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
TGeoNode&operator=(const TGeoNode&)

Data Members

public:
enum { kGeoNodeMatrix
kGeoNodeOffset
kGeoNodeVC
kGeoNodeOverlap
};
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
enum TGeoAtt::[unnamed] { kBitMask
};
enum TGeoAtt::EGeoVisibilityAtt { kVisOverride
kVisNone
kVisThis
kVisDaughters
kVisOneLevel
kVisStreamed
kVisTouched
kVisOnScreen
kVisContainers
kVisOnly
kVisBranch
kVisRaytrace
};
enum TGeoAtt::EGeoActivityAtt { kActOverride
kActNone
kActThis
kActDaughters
};
enum TGeoAtt::EGeoOptimizationAtt { kUseBoundingBox
kUseVoxels
kUseGsord
};
enum TGeoAtt::EGeoSavePrimitiveAtt { kSavePrimitiveAtt
kSaveNodesAtt
};
protected:
UInt_tTGeoAtt::fGeoAttoption flags
TGeoVolume*fMothermother volume
TStringTNamed::fNameobject identifier
Int_tfNovlpnumber of overlaps
Int_tfNumbercopy number
Int_t*fOverlaps[fNovlp] list of indices for overlapping brothers
TStringTNamed::fTitleobject title
TGeoVolume*fVolumevolume associated with this

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGeoNode& operator=(const TGeoNode& )
assignment operator
~TGeoNode()
 Destructor
void Browse(TBrowser* b)
 How-to-browse for a node.
Int_t CountDaughters(Bool_t unique_volumes = kFALSE)
 Returns the number of daughters. Nodes pointing to same volume counted
 once if unique_volumes is set.
void CheckOverlaps(Double_t ovlp = 0.1, Option_t* option = "")
 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) const
 Get node info for the browser.
Bool_t IsOnScreen() const
 check if this node is drawn. Assumes that this node is current
void InspectNode() const
 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) const
 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) const
 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) const
 Convert the point coordinates from mother reference to local reference system
void MasterToLocalVect(const Double_t* master, Double_t* local) const
 Convert a vector from mother reference to local reference system
void LocalToMaster(const Double_t* local, Double_t* master) const
 Convert the point coordinates from local reference system to mother reference
void LocalToMasterVect(const Double_t* local, Double_t* master) const
 Convert a vector from local reference system to mother reference
void ls(Option_t* option = "") const
 Print the path (A/B/C/...) to this node on stdout
void Paint(Option_t* option = "")
 Paint this node and its content according to visualization settings.
void PrintCandidates() const
 print daughters candidates for containing current point
   cd();
void PrintOverlaps() const
 print possible overlapping nodes
   if (!IsOverlapping()) {printf("node %s is ONLY\n", GetName()); return;}
Double_t Safety(Double_t* point, Bool_t in = kTRUE) const
 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 = kTRUE)
 Set visibility of the node (obsolete).
void VisibleDaughters(Bool_t vis = kTRUE)
 Set visibility of the daughters (obsolete).
void cd() const
{;}
Int_t GetByteCount() const
{return 44;}
TGeoNode * GetDaughter(Int_t ind) const
{return fVolume->GetNode(ind);}
TGeoMatrix * GetMatrix() const
Int_t GetColour() const
{return fVolume->GetLineColor();}
Int_t GetIndex() const
{return 0;}
TGeoPatternFinder * GetFinder() const
{return 0;}
TGeoMedium * GetMedium() const
{return fVolume->GetMedium();}
TGeoVolume * GetMotherVolume() const
{return fMother;}
Int_t GetNdaughters() const
{return fVolume->GetNdaughters();}
TObjArray * GetNodes() const
{return fVolume->GetNodes();}
Int_t GetNumber() const
{return fNumber;}
Int_t * GetOverlaps(Int_t& novlp) const
{novlp=fNovlp; return fOverlaps;}
TGeoVolume * GetVolume() const
{return fVolume;}
Int_t GetOptimalVoxels() const
{return 0;}
Bool_t IsFolder() const
{return (GetNdaughters()?kTRUE:kFALSE);}
Bool_t IsOffset() const
Bool_t IsOverlapping() const
Bool_t IsVirtual() const
Bool_t IsVisible() const
{return (TGeoAtt::IsVisible() && fVolume->IsVisible());}
Bool_t IsVisDaughters() const
TGeoNode * MakeCopyNode() const
{return 0;}
void SetCurrentPoint(Double_t x, Double_t y, Double_t z)
void SetVolume(TGeoVolume* volume)
{fVolume = volume;}
void SetNumber(Int_t number)
{fNumber=number;}
void SetOverlapping(Bool_t flag = kTRUE)
void SetVirtual()
void SetInvisible()
void SetAllInvisible()
void SetMotherVolume(TGeoVolume* mother)
{fMother = mother;}