Logo ROOT   6.08/07
Reference Guide
List of all members | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
TGeoNavigator Class Reference

Class providing navigation API for TGeo geometries.

Several instances are allowed for a single geometry. A default navigator is provided for any geometry but one may add several others for parallel navigation:

.... and then switch back to the default navigator:

Definition at line 37 of file TGeoNavigator.h.

Public Member Functions

 TGeoNavigator ()
 path to current node More...
 
 TGeoNavigator (TGeoManager *geom)
 Constructor. More...
 
virtual ~TGeoNavigator ()
 Destructor. More...
 
void BuildCache (Bool_t dummy=kFALSE, Bool_t nodeid=kFALSE)
 Builds the cache for physical nodes and global matrices. More...
 
Bool_t cd (const char *path="")
 Browse the tree of nodes starting from top node according to pathname. More...
 
void CdDown (Int_t index)
 Make a daughter of current node current. More...
 
void CdDown (TGeoNode *node)
 Make a daughter of current node current. More...
 
void CdNext ()
 Do a cd to the node found next by FindNextBoundary. More...
 
void CdNode (Int_t nodeid)
 Change current path to point to the node having this id. More...
 
void CdTop ()
 Make top level node the current node. More...
 
void CdUp ()
 Go one level up in geometry. More...
 
Bool_t CheckPath (const char *path) const
 Check if a geometry path is valid without changing the state of the navigator. More...
 
TGeoNodeCrossBoundaryAndLocate (Bool_t downwards, TGeoNode *skipnode)
 Cross next boundary and locate within current node The current point must be on the boundary of fCurrentNode. More...
 
void DoBackupState ()
 Backup the current state without affecting the cache stack. More...
 
void DoRestoreState ()
 Restore a backed-up state without affecting the cache stack. More...
 
TGeoNodeFindNextBoundary (Double_t stepmax=TGeoShape::Big(), const char *path="", Bool_t frombdr=kFALSE)
 Find distance to next boundary and store it in fStep. More...
 
TGeoNodeFindNextBoundaryAndStep (Double_t stepmax=TGeoShape::Big(), Bool_t compsafe=kFALSE)
 Compute distance to next boundary within STEPMAX. More...
 
TGeoNodeFindNextDaughterBoundary (Double_t *point, Double_t *dir, Int_t &idaughter, Bool_t compmatrix=kFALSE)
 Computes as fStep the distance to next daughter of the current volume. More...
 
TGeoNodeFindNode (Bool_t safe_start=kTRUE)
 Returns deepest node containing current point. More...
 
TGeoNodeFindNode (Double_t x, Double_t y, Double_t z)
 Returns deepest node containing current point. More...
 
Double_tFindNormal (Bool_t forward=kTRUE)
 Computes normal vector to the next surface that will be or was already crossed when propagating on a straight line from a given point/direction. More...
 
Double_tFindNormalFast ()
 Computes fast normal to next crossed boundary, assuming that the current point is close enough to the boundary. More...
 
void GetBranchNames (Int_t *names) const
 Fill volume names of current branch into an array. More...
 
void GetBranchNumbers (Int_t *copyNumbers, Int_t *volumeNumbers) const
 Fill node copy numbers of current branch into an array. More...
 
void GetBranchOnlys (Int_t *isonly) const
 Fill node copy numbers of current branch into an array. More...
 
TGeoNodeCacheGetCache () const
 
const Double_tGetCldir () const
 
const Double_tGetCldirChecked () const
 
const Double_tGetCurrentDirection () const
 
TGeoHMatrixGetCurrentMatrix () const
 
TGeoNodeGetCurrentNode () const
 
Int_t GetCurrentNodeId () const
 
const Double_tGetCurrentPoint () const
 
TGeoVolumeGetCurrentVolume () const
 
TGeoHMatrixGetDivMatrix () const
 
TGeoHMatrixGetHMatrix ()
 Return stored current matrix (global matrix of the next touched node). More...
 
const Double_tGetLastPoint () const
 
Double_t GetLastSafety () const
 
Int_t GetLevel () const
 
TGeoNodeGetMother (Int_t up=1) const
 
TGeoHMatrixGetMotherMatrix (Int_t up=1) const
 
Int_t GetNextDaughterIndex () const
 
TGeoNodeGetNextNode () const
 
Int_t GetNmany () const
 
Int_t GetNodeId () const
 
const Double_tGetNormal () const
 
const char * GetPath () const
 Get path to the current node in the form /node0/node1/... More...
 
Double_t GetSafeDistance () const
 
Int_t GetSafeLevel () const
 Go upwards the tree until a non-overlapping node. More...
 
Int_t GetStackLevel () const
 
Double_t GetStep () const
 
Int_t GetThreadId () const
 
Int_t GetVirtualLevel ()
 Find level of virtuality of current overlapping node (number of levels up having the same tracking media. More...
 
Bool_t GotoSafeLevel ()
 Go upwards the tree until a non-overlapping node. More...
 
TGeoNodeInitTrack (const Double_t *point, const Double_t *dir)
 Initialize current point and current direction vector (normalized) in MARS. More...
 
TGeoNodeInitTrack (Double_t x, Double_t y, Double_t z, Double_t nx, Double_t ny, Double_t nz)
 Initialize current point and current direction vector (normalized) in MARS. More...
 
void InspectState () const
 Inspects path and all flags for the current state. More...
 
Bool_t IsCheckingOverlaps () const
 
Bool_t IsCurrentOverlapping () const
 
Bool_t IsEntering () const
 
Bool_t IsExiting () const
 
Bool_t IsNullStep () const
 
Bool_t IsOnBoundary () const
 
Bool_t IsOutside () const
 
Bool_t IsSafeStep (Double_t proposed, Double_t &newsafety) const
 In case a previous safety value was computed, check if the safety region is still safe for the current point and proposed step. More...
 
Bool_t IsSameLocation (Double_t x, Double_t y, Double_t z, Bool_t change=kFALSE)
 Checks if point (x,y,z) is still in the current node. More...
 
Bool_t IsSameLocation () const
 
Bool_t IsSamePoint (Double_t x, Double_t y, Double_t z) const
 Check if a new point with given coordinates is the same as the last located one. More...
 
Bool_t IsStartSafe () const
 
Bool_t IsStepEntering () const
 
Bool_t IsStepExiting () const
 
void LocalToMaster (const Double_t *local, Double_t *master) const
 
void LocalToMasterBomb (const Double_t *local, Double_t *master) const
 
void LocalToMasterVect (const Double_t *local, Double_t *master) const
 
void MasterToLocal (const Double_t *master, Double_t *local) const
 
void MasterToLocalBomb (const Double_t *master, Double_t *local) const
 
void MasterToLocalVect (const Double_t *master, Double_t *local) const
 
void MasterToTop (const Double_t *master, Double_t *top) const
 Convert coordinates from master volume frame to top. More...
 
void PopDummy (Int_t ipop=9999)
 
Bool_t PopPath ()
 
Bool_t PopPath (Int_t index)
 
Bool_t PopPoint ()
 
Bool_t PopPoint (Int_t index)
 
Int_t PushPath (Int_t startlevel=0)
 
Int_t PushPoint (Int_t startlevel=0)
 
void ResetAll ()
 Reset the navigator. More...
 
void ResetState ()
 Reset current state flags. More...
 
Double_t Safety (Bool_t inside=kFALSE)
 Compute safe distance from the current point. More...
 
TGeoNodeSearchNode (Bool_t downwards=kFALSE, const TGeoNode *skipnode=0)
 Returns the deepest node containing fPoint, which must be set a priori. More...
 
void SetCheckingOverlaps (Bool_t flag=kTRUE)
 
void SetCldirChecked (Double_t *dir)
 
void SetCurrentDirection (const Double_t *dir)
 
void SetCurrentDirection (Double_t nx, Double_t ny, Double_t nz)
 
void SetCurrentPoint (const Double_t *point)
 
void SetCurrentPoint (Double_t x, Double_t y, Double_t z)
 
void SetLastPoint (Double_t x, Double_t y, Double_t z)
 
void SetLastSafetyForPoint (Double_t safe, const Double_t *point)
 
void SetLastSafetyForPoint (Double_t safe, Double_t x, Double_t y, Double_t z)
 
void SetOutside (Bool_t flag=kTRUE)
 
void SetStartSafe (Bool_t flag=kTRUE)
 
void SetStep (Double_t step)
 
TGeoNodeStep (Bool_t is_geom=kTRUE, Bool_t cross=kTRUE)
 Make a rectiliniar step of length fStep from current point (fPoint) on current direction (fDirection). More...
 
void TopToMaster (const Double_t *top, Double_t *master) const
 Convert coordinates from top volume frame to master. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Protected Member Functions

 TGeoNavigator (const TGeoNavigator &)
 Copy constructor. More...
 
TGeoNodeCrossDivisionCell ()
 Cross a division cell. More...
 
TGeoNodeFindInCluster (Int_t *cluster, Int_t nc)
 Find a node inside a cluster of overlapping nodes. More...
 
Int_t GetTouchedCluster (Int_t start, Double_t *point, Int_t *check_list, Int_t ncheck, Int_t *result)
 Make the cluster of overlapping nodes in a voxel, containing point in reference of the mother. More...
 
TGeoNavigatoroperator= (const TGeoNavigator &)
 assignment operator More...
 
void SafetyOverlaps ()
 Compute safe distance from the current point within an overlapping node. More...
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

Private Attributes

TGeoCacheStatefBackupState
 current point is supposed to be inside this node More...
 
TGeoNodeCachefCache
 current geometry More...
 
Double_t fCldir [3]
 cosine of incident angle on current checked surface More...
 
Double_t fCldirChecked [3]
 unit vector to current closest shape More...
 
TGeoHMatrixfCurrentMatrix
 backup state More...
 
TGeoNodefCurrentNode
 current volume More...
 
Bool_t fCurrentOverlapping
 flag set when an overlapping cluster is searched More...
 
TGeoVolumefCurrentVolume
 cache of states More...
 
Double_t fDirection [3]
 current point More...
 
TGeoHMatrixfDivMatrix
 current pointer to cached global matrix More...
 
TGeoNodefForcedNode
 next node that will be crossed More...
 
TGeoManagerfGeometry
 flag that last geometric step was null More...
 
TGeoHMatrixfGlobalMatrix
 current stored global matrix More...
 
Bool_t fIsEntering
 flag a safe start for point classification More...
 
Bool_t fIsExiting
 flag if current step just got into a new node More...
 
Bool_t fIsNullStep
 flag that a new point is in the same node as previous More...
 
Bool_t fIsOnBoundary
 flag that current point is outside geometry More...
 
Bool_t fIsOutside
 flag that next geometric step will exit current volume More...
 
Bool_t fIsSameLocation
 flag that current point is on some boundary More...
 
Bool_t fIsStepEntering
 flag that current track is about to leave current node More...
 
Bool_t fIsStepExiting
 flag that next geometric step will enter new volume More...
 
TGeoNodefLastNode
 top physical node More...
 
Double_t fLastPoint [3]
 current direction More...
 
Double_t fLastSafety
 safety radius from current point More...
 
Int_t fLevel
 thread id for this navigator More...
 
Int_t fNextDaughterIndex
 number of overlapping nodes on current branch More...
 
TGeoNodefNextNode
 last searched node More...
 
Int_t fNmany
 current geometry level; More...
 
Double_t fNormal [3]
 last computed safety radius More...
 
Int_tfOverlapClusters
 current recursive position in fOverlapClusters More...
 
Int_t fOverlapMark
 current size of fOverlapClusters More...
 
Int_t fOverlapSize
 next daughter index after FindNextBoundary More...
 
TString fPath
 current local matrix of the selected division cell More...
 
Double_t fPoint [3]
 unit vector to current checked shape More...
 
Double_t fSafety
 step to be done from current point and direction More...
 
Bool_t fSearchOverlaps
 internal array for overlaps More...
 
Bool_t fStartSafe
 flags the type of the current node More...
 
Double_t fStep
 
Int_t fThreadId
 last point for which safety was computed More...
 
TGeoNodefTopNode
 current node More...
 

Additional Inherited Members

- Public Types inherited from TObject
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

#include <TGeoNavigator.h>

Inheritance diagram for TGeoNavigator:
[legend]

Constructor & Destructor Documentation

◆ TGeoNavigator() [1/3]

TGeoNavigator::TGeoNavigator ( const TGeoNavigator gm)
protected

Copy constructor.

Definition at line 165 of file TGeoNavigator.cxx.

◆ TGeoNavigator() [2/3]

TGeoNavigator::TGeoNavigator ( )

path to current node

Constructor.

Definition at line 55 of file TGeoNavigator.cxx.

◆ TGeoNavigator() [3/3]

TGeoNavigator::TGeoNavigator ( TGeoManager geom)

Constructor.

Definition at line 106 of file TGeoNavigator.cxx.

◆ ~TGeoNavigator()

TGeoNavigator::~TGeoNavigator ( )
virtual

Destructor.

Definition at line 271 of file TGeoNavigator.cxx.

Member Function Documentation

◆ BuildCache()

void TGeoNavigator::BuildCache ( Bool_t  dummy = kFALSE,
Bool_t  nodeid = kFALSE 
)

Builds the cache for physical nodes and global matrices.

Definition at line 281 of file TGeoNavigator.cxx.

◆ cd()

Bool_t TGeoNavigator::cd ( const char *  path = "")

Browse the tree of nodes starting from top node according to pathname.

Changes the path accordingly. The path is changed to point to the top node in case of failure.

Definition at line 306 of file TGeoNavigator.cxx.

◆ CdDown() [1/2]

void TGeoNavigator::CdDown ( Int_t  index)

Make a daughter of current node current.

Can be called only with a valid daughter index (no check). Updates cache accordingly.

Definition at line 402 of file TGeoNavigator.cxx.

◆ CdDown() [2/2]

void TGeoNavigator::CdDown ( TGeoNode node)

Make a daughter of current node current.

Can be called only with a valid daughter node (no check). Updates cache accordingly.

Definition at line 421 of file TGeoNavigator.cxx.

◆ CdNext()

void TGeoNavigator::CdNext ( )

Do a cd to the node found next by FindNextBoundary.

Definition at line 488 of file TGeoNavigator.cxx.

◆ CdNode()

void TGeoNavigator::CdNode ( Int_t  nodeid)

Change current path to point to the node having this id.

Node id has to be in range : 0 to fNNodes-1 (no check for performance reasons)

Definition at line 390 of file TGeoNavigator.cxx.

◆ CdTop()

void TGeoNavigator::CdTop ( )

Make top level node the current node.

Updates the cache accordingly. Determine the overlapping state of current node.

Definition at line 472 of file TGeoNavigator.cxx.

◆ CdUp()

void TGeoNavigator::CdUp ( )

Go one level up in geometry.

Updates cache accordingly. Determine the overlapping state of current node.

Definition at line 439 of file TGeoNavigator.cxx.

◆ CheckPath()

Bool_t TGeoNavigator::CheckPath ( const char *  path) const

Check if a geometry path is valid without changing the state of the navigator.

Definition at line 349 of file TGeoNavigator.cxx.

◆ CrossBoundaryAndLocate()

TGeoNode * TGeoNavigator::CrossBoundaryAndLocate ( Bool_t  downwards,
TGeoNode skipnode 
)

Cross next boundary and locate within current node The current point must be on the boundary of fCurrentNode.

Definition at line 602 of file TGeoNavigator.cxx.

◆ CrossDivisionCell()

TGeoNode * TGeoNavigator::CrossDivisionCell ( )
protected

Cross a division cell.

Distance to exit contained in fStep, current node points to the cell node.

Definition at line 542 of file TGeoNavigator.cxx.

◆ DoBackupState()

void TGeoNavigator::DoBackupState ( )

Backup the current state without affecting the cache stack.

Definition at line 2568 of file TGeoNavigator.cxx.

◆ DoRestoreState()

void TGeoNavigator::DoRestoreState ( )

Restore a backed-up state without affecting the cache stack.

Definition at line 2576 of file TGeoNavigator.cxx.

◆ FindInCluster()

TGeoNode * TGeoNavigator::FindInCluster ( Int_t cluster,
Int_t  nc 
)
protected

Find a node inside a cluster of overlapping nodes.

Current node must be on top of all the nodes in cluster. Always nc>1.

Definition at line 2119 of file TGeoNavigator.cxx.

◆ FindNextBoundary()

TGeoNode * TGeoNavigator::FindNextBoundary ( Double_t  stepmax = TGeoShape::Big(),
const char *  path = "",
Bool_t  frombdr = kFALSE 
)

Find distance to next boundary and store it in fStep.

Returns node to which this boundary belongs. If PATH is specified, compute only distance to the node to which PATH points. If STEPMAX is specified, compute distance only in case fSafety is smaller than this value. STEPMAX represent the step to be made imposed by other reasons than geometry (usually physics processes). Therefore in this case this method provides the answer to the question : "Is STEPMAX a safe step ?" returning a NULL node and filling fStep with a big number. In case frombdr=kTRUE, the isotropic safety is set to zero.

Note : safety distance for the current point is computed ONLY in case STEPMAX is specified, otherwise users have to call explicitly TGeoManager::Safety() if they want this computed for the current point.

Definition at line 695 of file TGeoNavigator.cxx.

◆ FindNextBoundaryAndStep()

TGeoNode * TGeoNavigator::FindNextBoundaryAndStep ( Double_t  stepmax = TGeoShape::Big(),
Bool_t  compsafe = kFALSE 
)

Compute distance to next boundary within STEPMAX.

If no boundary is found, propagate current point along current direction with fStep=STEPMAX. Otherwise propagate with fStep=SNEXT (distance to boundary) and locate/return the next node.

Definition at line 1223 of file TGeoNavigator.cxx.

◆ FindNextDaughterBoundary()

TGeoNode * TGeoNavigator::FindNextDaughterBoundary ( Double_t point,
Double_t dir,
Int_t idaughter,
Bool_t  compmatrix = kFALSE 
)

Computes as fStep the distance to next daughter of the current volume.

The point and direction must be converted in the coordinate system of the current volume. The proposed step limit is fStep.

Definition at line 1048 of file TGeoNavigator.cxx.

◆ FindNode() [1/2]

TGeoNode * TGeoNavigator::FindNode ( Bool_t  safe_start = kTRUE)

Returns deepest node containing current point.

Definition at line 1583 of file TGeoNavigator.cxx.

◆ FindNode() [2/2]

TGeoNode * TGeoNavigator::FindNode ( Double_t  x,
Double_t  y,
Double_t  z 
)

Returns deepest node containing current point.

Definition at line 1605 of file TGeoNavigator.cxx.

◆ FindNormal()

Double_t * TGeoNavigator::FindNormal ( Bool_t  forward = kTRUE)

Computes normal vector to the next surface that will be or was already crossed when propagating on a straight line from a given point/direction.

Returns the normal vector cosines in the MASTER coordinate system. The dot product of the normal and the current direction is positive defined.

Definition at line 1650 of file TGeoNavigator.cxx.

◆ FindNormalFast()

Double_t * TGeoNavigator::FindNormalFast ( )

Computes fast normal to next crossed boundary, assuming that the current point is close enough to the boundary.

Works only after calling FindNextBoundary.

Definition at line 1631 of file TGeoNavigator.cxx.

◆ GetBranchNames()

void TGeoNavigator::GetBranchNames ( Int_t names) const

Fill volume names of current branch into an array.

Definition at line 517 of file TGeoNavigator.cxx.

◆ GetBranchNumbers()

void TGeoNavigator::GetBranchNumbers ( Int_t copyNumbers,
Int_t volumeNumbers 
) const

Fill node copy numbers of current branch into an array.

Definition at line 525 of file TGeoNavigator.cxx.

◆ GetBranchOnlys()

void TGeoNavigator::GetBranchOnlys ( Int_t isonly) const

Fill node copy numbers of current branch into an array.

Definition at line 533 of file TGeoNavigator.cxx.

◆ GetCache()

TGeoNodeCache* TGeoNavigator::GetCache ( ) const
inline

Definition at line 197 of file TGeoNavigator.h.

◆ GetCldir()

const Double_t* TGeoNavigator::GetCldir ( ) const
inline

Definition at line 168 of file TGeoNavigator.h.

◆ GetCldirChecked()

const Double_t* TGeoNavigator::GetCldirChecked ( ) const
inline

Definition at line 167 of file TGeoNavigator.h.

◆ GetCurrentDirection()

const Double_t* TGeoNavigator::GetCurrentDirection ( ) const
inline

Definition at line 165 of file TGeoNavigator.h.

◆ GetCurrentMatrix()

TGeoHMatrix* TGeoNavigator::GetCurrentMatrix ( ) const
inline

Definition at line 161 of file TGeoNavigator.h.

◆ GetCurrentNode()

TGeoNode* TGeoNavigator::GetCurrentNode ( ) const
inline

Definition at line 162 of file TGeoNavigator.h.

◆ GetCurrentNodeId()

Int_t TGeoNavigator::GetCurrentNodeId ( ) const
inline

Definition at line 163 of file TGeoNavigator.h.

◆ GetCurrentPoint()

const Double_t* TGeoNavigator::GetCurrentPoint ( ) const
inline

Definition at line 164 of file TGeoNavigator.h.

◆ GetCurrentVolume()

TGeoVolume* TGeoNavigator::GetCurrentVolume ( ) const
inline

Definition at line 166 of file TGeoNavigator.h.

◆ GetDivMatrix()

TGeoHMatrix* TGeoNavigator::GetDivMatrix ( ) const
inline

Definition at line 169 of file TGeoNavigator.h.

◆ GetHMatrix()

TGeoHMatrix * TGeoNavigator::GetHMatrix ( )

Return stored current matrix (global matrix of the next touched node).

Definition at line 2589 of file TGeoNavigator.cxx.

◆ GetLastPoint()

const Double_t* TGeoNavigator::GetLastPoint ( ) const
inline

Definition at line 125 of file TGeoNavigator.h.

◆ GetLastSafety()

Double_t TGeoNavigator::GetLastSafety ( ) const
inline

Definition at line 130 of file TGeoNavigator.h.

◆ GetLevel()

Int_t TGeoNavigator::GetLevel ( ) const
inline

Definition at line 172 of file TGeoNavigator.h.

◆ GetMother()

TGeoNode* TGeoNavigator::GetMother ( Int_t  up = 1) const
inline

Definition at line 158 of file TGeoNavigator.h.

◆ GetMotherMatrix()

TGeoHMatrix* TGeoNavigator::GetMotherMatrix ( Int_t  up = 1) const
inline

Definition at line 159 of file TGeoNavigator.h.

◆ GetNextDaughterIndex()

Int_t TGeoNavigator::GetNextDaughterIndex ( ) const
inline

Definition at line 156 of file TGeoNavigator.h.

◆ GetNextNode()

TGeoNode* TGeoNavigator::GetNextNode ( ) const
inline

Definition at line 157 of file TGeoNavigator.h.

◆ GetNmany()

Int_t TGeoNavigator::GetNmany ( ) const
inline

Definition at line 108 of file TGeoNavigator.h.

◆ GetNodeId()

Int_t TGeoNavigator::GetNodeId ( ) const
inline

Definition at line 155 of file TGeoNavigator.h.

◆ GetNormal()

const Double_t* TGeoNavigator::GetNormal ( ) const
inline

Definition at line 171 of file TGeoNavigator.h.

◆ GetPath()

const char * TGeoNavigator::GetPath ( ) const

Get path to the current node in the form /node0/node1/...

Definition at line 2601 of file TGeoNavigator.cxx.

◆ GetSafeDistance()

Double_t TGeoNavigator::GetSafeDistance ( ) const
inline

Definition at line 129 of file TGeoNavigator.h.

◆ GetSafeLevel()

Int_t TGeoNavigator::GetSafeLevel ( ) const

Go upwards the tree until a non-overlapping node.

Definition at line 2346 of file TGeoNavigator.cxx.

◆ GetStackLevel()

Int_t TGeoNavigator::GetStackLevel ( ) const
inline

Definition at line 174 of file TGeoNavigator.h.

◆ GetStep()

Double_t TGeoNavigator::GetStep ( ) const
inline

Definition at line 131 of file TGeoNavigator.h.

◆ GetThreadId()

Int_t TGeoNavigator::GetThreadId ( ) const
inline

Definition at line 132 of file TGeoNavigator.h.

◆ GetTouchedCluster()

Int_t TGeoNavigator::GetTouchedCluster ( Int_t  start,
Double_t point,
Int_t check_list,
Int_t  ncheck,
Int_t result 
)
protected

Make the cluster of overlapping nodes in a voxel, containing point in reference of the mother.

Returns number of nodes containing the point. Nodes should not be offsets.

Definition at line 2202 of file TGeoNavigator.cxx.

◆ GetVirtualLevel()

Int_t TGeoNavigator::GetVirtualLevel ( )

Find level of virtuality of current overlapping node (number of levels up having the same tracking media.

Definition at line 2280 of file TGeoNavigator.cxx.

◆ GotoSafeLevel()

Bool_t TGeoNavigator::GotoSafeLevel ( )

Go upwards the tree until a non-overlapping node.

Definition at line 2303 of file TGeoNavigator.cxx.

◆ InitTrack() [1/2]

TGeoNode * TGeoNavigator::InitTrack ( const Double_t point,
const Double_t dir 
)

Initialize current point and current direction vector (normalized) in MARS.

Return corresponding node.

Definition at line 1659 of file TGeoNavigator.cxx.

◆ InitTrack() [2/2]

TGeoNode * TGeoNavigator::InitTrack ( Double_t  x,
Double_t  y,
Double_t  z,
Double_t  nx,
Double_t  ny,
Double_t  nz 
)

Initialize current point and current direction vector (normalized) in MARS.

Return corresponding node.

Definition at line 1670 of file TGeoNavigator.cxx.

◆ InspectState()

void TGeoNavigator::InspectState ( ) const

Inspects path and all flags for the current state.

Definition at line 2363 of file TGeoNavigator.cxx.

◆ IsCheckingOverlaps()

Bool_t TGeoNavigator::IsCheckingOverlaps ( ) const
inline

Definition at line 141 of file TGeoNavigator.h.

◆ IsCurrentOverlapping()

Bool_t TGeoNavigator::IsCurrentOverlapping ( ) const
inline

Definition at line 142 of file TGeoNavigator.h.

◆ IsEntering()

Bool_t TGeoNavigator::IsEntering ( ) const
inline

Definition at line 143 of file TGeoNavigator.h.

◆ IsExiting()

Bool_t TGeoNavigator::IsExiting ( ) const
inline

Definition at line 144 of file TGeoNavigator.h.

◆ IsNullStep()

Bool_t TGeoNavigator::IsNullStep ( ) const
inline

Definition at line 149 of file TGeoNavigator.h.

◆ IsOnBoundary()

Bool_t TGeoNavigator::IsOnBoundary ( ) const
inline

Definition at line 148 of file TGeoNavigator.h.

◆ IsOutside()

Bool_t TGeoNavigator::IsOutside ( ) const
inline

Definition at line 147 of file TGeoNavigator.h.

◆ IsSafeStep()

Bool_t TGeoNavigator::IsSafeStep ( Double_t  proposed,
Double_t newsafety 
) const

In case a previous safety value was computed, check if the safety region is still safe for the current point and proposed step.

Return value changed only if proposed distance is safe.

Definition at line 2532 of file TGeoNavigator.cxx.

◆ IsSameLocation() [1/2]

Bool_t TGeoNavigator::IsSameLocation ( Double_t  x,
Double_t  y,
Double_t  z,
Bool_t  change = kFALSE 
)

Checks if point (x,y,z) is still in the current node.

check if this is an overlapping node

Definition at line 2383 of file TGeoNavigator.cxx.

◆ IsSameLocation() [2/2]

Bool_t TGeoNavigator::IsSameLocation ( ) const
inline

Definition at line 136 of file TGeoNavigator.h.

◆ IsSamePoint()

Bool_t TGeoNavigator::IsSamePoint ( Double_t  x,
Double_t  y,
Double_t  z 
) const

Check if a new point with given coordinates is the same as the last located one.

Definition at line 2555 of file TGeoNavigator.cxx.

◆ IsStartSafe()

Bool_t TGeoNavigator::IsStartSafe ( ) const
inline

Definition at line 138 of file TGeoNavigator.h.

◆ IsStepEntering()

Bool_t TGeoNavigator::IsStepEntering ( ) const
inline

Definition at line 145 of file TGeoNavigator.h.

◆ IsStepExiting()

Bool_t TGeoNavigator::IsStepExiting ( ) const
inline

Definition at line 146 of file TGeoNavigator.h.

◆ LocalToMaster()

void TGeoNavigator::LocalToMaster ( const Double_t local,
Double_t master 
) const
inline

Definition at line 189 of file TGeoNavigator.h.

◆ LocalToMasterBomb()

void TGeoNavigator::LocalToMasterBomb ( const Double_t local,
Double_t master 
) const
inline

Definition at line 191 of file TGeoNavigator.h.

◆ LocalToMasterVect()

void TGeoNavigator::LocalToMasterVect ( const Double_t local,
Double_t master 
) const
inline

Definition at line 190 of file TGeoNavigator.h.

◆ MasterToLocal()

void TGeoNavigator::MasterToLocal ( const Double_t master,
Double_t local 
) const
inline

Definition at line 192 of file TGeoNavigator.h.

◆ MasterToLocalBomb()

void TGeoNavigator::MasterToLocalBomb ( const Double_t master,
Double_t local 
) const
inline

Definition at line 194 of file TGeoNavigator.h.

◆ MasterToLocalVect()

void TGeoNavigator::MasterToLocalVect ( const Double_t master,
Double_t local 
) const
inline

Definition at line 193 of file TGeoNavigator.h.

◆ MasterToTop()

void TGeoNavigator::MasterToTop ( const Double_t master,
Double_t top 
) const

Convert coordinates from master volume frame to top.

Definition at line 2610 of file TGeoNavigator.cxx.

◆ operator=()

TGeoNavigator & TGeoNavigator::operator= ( const TGeoNavigator gm)
protected

assignment operator

Definition at line 217 of file TGeoNavigator.cxx.

◆ PopDummy()

void TGeoNavigator::PopDummy ( Int_t  ipop = 9999)
inline

Definition at line 206 of file TGeoNavigator.h.

◆ PopPath() [1/2]

Bool_t TGeoNavigator::PopPath ( )
inline

Definition at line 201 of file TGeoNavigator.h.

◆ PopPath() [2/2]

Bool_t TGeoNavigator::PopPath ( Int_t  index)
inline

Definition at line 202 of file TGeoNavigator.h.

◆ PopPoint() [1/2]

Bool_t TGeoNavigator::PopPoint ( )
inline

Definition at line 204 of file TGeoNavigator.h.

◆ PopPoint() [2/2]

Bool_t TGeoNavigator::PopPoint ( Int_t  index)
inline

Definition at line 205 of file TGeoNavigator.h.

◆ PushPath()

Int_t TGeoNavigator::PushPath ( Int_t  startlevel = 0)
inline

Definition at line 200 of file TGeoNavigator.h.

◆ PushPoint()

Int_t TGeoNavigator::PushPoint ( Int_t  startlevel = 0)
inline

Definition at line 203 of file TGeoNavigator.h.

◆ ResetAll()

void TGeoNavigator::ResetAll ( )

Reset the navigator.

Definition at line 2626 of file TGeoNavigator.cxx.

◆ ResetState()

void TGeoNavigator::ResetState ( )

Reset current state flags.

Definition at line 1680 of file TGeoNavigator.cxx.

◆ Safety()

Double_t TGeoNavigator::Safety ( Bool_t  inside = kFALSE)

Compute safe distance from the current point.

This represent the distance from POINT to the closest boundary.

Definition at line 1693 of file TGeoNavigator.cxx.

◆ SafetyOverlaps()

void TGeoNavigator::SafetyOverlaps ( )
protected

Compute safe distance from the current point within an overlapping node.

Definition at line 1824 of file TGeoNavigator.cxx.

◆ SearchNode()

TGeoNode * TGeoNavigator::SearchNode ( Bool_t  downwards = kFALSE,
const TGeoNode skipnode = 0 
)

Returns the deepest node containing fPoint, which must be set a priori.

Check if parallel world navigation is enabled

Definition at line 1896 of file TGeoNavigator.cxx.

◆ SetCheckingOverlaps()

void TGeoNavigator::SetCheckingOverlaps ( Bool_t  flag = kTRUE)
inline

Definition at line 150 of file TGeoNavigator.h.

◆ SetCldirChecked()

void TGeoNavigator::SetCldirChecked ( Double_t dir)
inline

Definition at line 184 of file TGeoNavigator.h.

◆ SetCurrentDirection() [1/2]

void TGeoNavigator::SetCurrentDirection ( const Double_t dir)
inline

Definition at line 180 of file TGeoNavigator.h.

◆ SetCurrentDirection() [2/2]

void TGeoNavigator::SetCurrentDirection ( Double_t  nx,
Double_t  ny,
Double_t  nz 
)
inline

Definition at line 181 of file TGeoNavigator.h.

◆ SetCurrentPoint() [1/2]

void TGeoNavigator::SetCurrentPoint ( const Double_t point)
inline

Definition at line 175 of file TGeoNavigator.h.

◆ SetCurrentPoint() [2/2]

void TGeoNavigator::SetCurrentPoint ( Double_t  x,
Double_t  y,
Double_t  z 
)
inline

Definition at line 176 of file TGeoNavigator.h.

◆ SetLastPoint()

void TGeoNavigator::SetLastPoint ( Double_t  x,
Double_t  y,
Double_t  z 
)
inline

Definition at line 178 of file TGeoNavigator.h.

◆ SetLastSafetyForPoint() [1/2]

void TGeoNavigator::SetLastSafetyForPoint ( Double_t  safe,
const Double_t point 
)
inline

Definition at line 185 of file TGeoNavigator.h.

◆ SetLastSafetyForPoint() [2/2]

void TGeoNavigator::SetLastSafetyForPoint ( Double_t  safe,
Double_t  x,
Double_t  y,
Double_t  z 
)
inline

Definition at line 186 of file TGeoNavigator.h.

◆ SetOutside()

void TGeoNavigator::SetOutside ( Bool_t  flag = kTRUE)
inline

Definition at line 151 of file TGeoNavigator.h.

◆ SetStartSafe()

void TGeoNavigator::SetStartSafe ( Bool_t  flag = kTRUE)
inline

Definition at line 139 of file TGeoNavigator.h.

◆ SetStep()

void TGeoNavigator::SetStep ( Double_t  step)
inline

Definition at line 140 of file TGeoNavigator.h.

◆ Step()

TGeoNode * TGeoNavigator::Step ( Bool_t  is_geom = kTRUE,
Bool_t  cross = kTRUE 
)

Make a rectiliniar step of length fStep from current point (fPoint) on current direction (fDirection).

If the step is imposed by geometry, is_geom flag must be true (default). The cross flag specifies if the boundary should be crossed in case of a geometry step (default true). Returns new node after step. Set also on boundary condition.

Definition at line 2244 of file TGeoNavigator.cxx.

◆ TopToMaster()

void TGeoNavigator::TopToMaster ( const Double_t top,
Double_t master 
) const

Convert coordinates from top volume frame to master.

Definition at line 2618 of file TGeoNavigator.cxx.

Member Data Documentation

◆ fBackupState

TGeoCacheState* TGeoNavigator::fBackupState
private

current point is supposed to be inside this node

Definition at line 85 of file TGeoNavigator.h.

◆ fCache

TGeoNodeCache* TGeoNavigator::fCache
private

current geometry

Definition at line 78 of file TGeoNavigator.h.

◆ fCldir

Double_t TGeoNavigator::fCldir[3]
private

cosine of incident angle on current checked surface

Definition at line 54 of file TGeoNavigator.h.

◆ fCldirChecked

Double_t TGeoNavigator::fCldirChecked[3]
private

unit vector to current closest shape

Definition at line 55 of file TGeoNavigator.h.

◆ fCurrentMatrix

TGeoHMatrix* TGeoNavigator::fCurrentMatrix
private

backup state

Definition at line 86 of file TGeoNavigator.h.

◆ fCurrentNode

TGeoNode* TGeoNavigator::fCurrentNode
private

current volume

Definition at line 80 of file TGeoNavigator.h.

◆ fCurrentOverlapping

Bool_t TGeoNavigator::fCurrentOverlapping
private

flag set when an overlapping cluster is searched

Definition at line 67 of file TGeoNavigator.h.

◆ fCurrentVolume

TGeoVolume* TGeoNavigator::fCurrentVolume
private

cache of states

Definition at line 79 of file TGeoNavigator.h.

◆ fDirection

Double_t TGeoNavigator::fDirection[3]
private

current point

Definition at line 57 of file TGeoNavigator.h.

◆ fDivMatrix

TGeoHMatrix* TGeoNavigator::fDivMatrix
private

current pointer to cached global matrix

Definition at line 88 of file TGeoNavigator.h.

◆ fForcedNode

TGeoNode* TGeoNavigator::fForcedNode
private

next node that will be crossed

Definition at line 84 of file TGeoNavigator.h.

◆ fGeometry

TGeoManager* TGeoNavigator::fGeometry
private

flag that last geometric step was null

Definition at line 77 of file TGeoNavigator.h.

◆ fGlobalMatrix

TGeoHMatrix* TGeoNavigator::fGlobalMatrix
private

current stored global matrix

Definition at line 87 of file TGeoNavigator.h.

◆ fIsEntering

Bool_t TGeoNavigator::fIsEntering
private

flag a safe start for point classification

Definition at line 69 of file TGeoNavigator.h.

◆ fIsExiting

Bool_t TGeoNavigator::fIsExiting
private

flag if current step just got into a new node

Definition at line 70 of file TGeoNavigator.h.

◆ fIsNullStep

Bool_t TGeoNavigator::fIsNullStep
private

flag that a new point is in the same node as previous

Definition at line 76 of file TGeoNavigator.h.

◆ fIsOnBoundary

Bool_t TGeoNavigator::fIsOnBoundary
private

flag that current point is outside geometry

Definition at line 74 of file TGeoNavigator.h.

◆ fIsOutside

Bool_t TGeoNavigator::fIsOutside
private

flag that next geometric step will exit current volume

Definition at line 73 of file TGeoNavigator.h.

◆ fIsSameLocation

Bool_t TGeoNavigator::fIsSameLocation
private

flag that current point is on some boundary

Definition at line 75 of file TGeoNavigator.h.

◆ fIsStepEntering

Bool_t TGeoNavigator::fIsStepEntering
private

flag that current track is about to leave current node

Definition at line 71 of file TGeoNavigator.h.

◆ fIsStepExiting

Bool_t TGeoNavigator::fIsStepExiting
private

flag that next geometric step will enter new volume

Definition at line 72 of file TGeoNavigator.h.

◆ fLastNode

TGeoNode* TGeoNavigator::fLastNode
private

top physical node

Definition at line 82 of file TGeoNavigator.h.

◆ fLastPoint

Double_t TGeoNavigator::fLastPoint[3]
private

current direction

Definition at line 58 of file TGeoNavigator.h.

◆ fLastSafety

Double_t TGeoNavigator::fLastSafety
private

safety radius from current point

Definition at line 52 of file TGeoNavigator.h.

◆ fLevel

Int_t TGeoNavigator::fLevel
private

thread id for this navigator

Definition at line 60 of file TGeoNavigator.h.

◆ fNextDaughterIndex

Int_t TGeoNavigator::fNextDaughterIndex
private

number of overlapping nodes on current branch

Definition at line 62 of file TGeoNavigator.h.

◆ fNextNode

TGeoNode* TGeoNavigator::fNextNode
private

last searched node

Definition at line 83 of file TGeoNavigator.h.

◆ fNmany

Int_t TGeoNavigator::fNmany
private

current geometry level;

Definition at line 61 of file TGeoNavigator.h.

◆ fNormal

Double_t TGeoNavigator::fNormal[3]
private

last computed safety radius

Definition at line 53 of file TGeoNavigator.h.

◆ fOverlapClusters

Int_t* TGeoNavigator::fOverlapClusters
private

current recursive position in fOverlapClusters

Definition at line 65 of file TGeoNavigator.h.

◆ fOverlapMark

Int_t TGeoNavigator::fOverlapMark
private

current size of fOverlapClusters

Definition at line 64 of file TGeoNavigator.h.

◆ fOverlapSize

Int_t TGeoNavigator::fOverlapSize
private

next daughter index after FindNextBoundary

Definition at line 63 of file TGeoNavigator.h.

◆ fPath

TString TGeoNavigator::fPath
private

current local matrix of the selected division cell

Definition at line 89 of file TGeoNavigator.h.

◆ fPoint

Double_t TGeoNavigator::fPoint[3]
private

unit vector to current checked shape

Definition at line 56 of file TGeoNavigator.h.

◆ fSafety

Double_t TGeoNavigator::fSafety
private

step to be done from current point and direction

Definition at line 51 of file TGeoNavigator.h.

◆ fSearchOverlaps

Bool_t TGeoNavigator::fSearchOverlaps
private

internal array for overlaps

Definition at line 66 of file TGeoNavigator.h.

◆ fStartSafe

Bool_t TGeoNavigator::fStartSafe
private

flags the type of the current node

Definition at line 68 of file TGeoNavigator.h.

◆ fStep

Double_t TGeoNavigator::fStep
private

Definition at line 50 of file TGeoNavigator.h.

◆ fThreadId

Int_t TGeoNavigator::fThreadId
private

last point for which safety was computed

Definition at line 59 of file TGeoNavigator.h.

◆ fTopNode

TGeoNode* TGeoNavigator::fTopNode
private

current node

Definition at line 81 of file TGeoNavigator.h.


The documentation for this class was generated from the following files: