62 fNextDaughterIndex(0),
67 fCurrentOverlapping(kFALSE),
71 fIsStepEntering(kFALSE),
72 fIsStepExiting(kFALSE),
74 fIsOnBoundary(kFALSE),
75 fIsSameLocation(kFALSE),
93 for (
Int_t i=0; i<3; i++) {
96 fCldirChecked[i] = 0.;
113 fNextDaughterIndex(-2),
118 fCurrentOverlapping(
kFALSE),
126 fIsSameLocation(
kTRUE),
146 for (
Int_t i=0; i<3; i++) {
202 for (
Int_t i=0; i<3; i++) {
254 for (
Int_t i=0; i<3; i++) {
286 if (nlevel<=0) nlevel = 100;
289 if (first && verbose>0)
Info(
"BuildCache",
"--- Maximum geometry depth set to 100");
291 if (first && verbose>0)
Info(
"BuildCache",
"--- Maximum geometry depth is %i", nlevel);
309 if (!path[0])
return kTRUE;
314 if (ind1 == length-1) ind1 = -1;
321 ind2 = spath.
Index(
"/", ind1+1);
322 if (ind2<0 || ind2==length-1) {
323 if (ind2<0) ind2 = length;
326 name = spath(ind1+1, ind2-ind1-1);
337 Error(
"cd",
"Path %s not valid", path);
351 if (!path[0])
return kTRUE;
357 if (ind1 == length-1) ind1 = -1;
364 ind2 = spath.
Index(
"/", ind1+1);
365 if (ind2<0 || ind2==length-1) {
366 if (ind2<0) ind2 = length;
369 name = spath(ind1+1, ind2-ind1-1);
503 if (
fCurrentNode && fNextDaughterIndex<fCurrentNode->GetNdaughters()) {
506 while (nextindex>=0) {
546 Fatal(
"CrossDivisionCell",
"Volume has no pattern finder");
552 Double_t point[3], newpoint[3], dir[3];
619 fPoint[1] += extra*fDirection[1];
620 fPoint[2] += extra*fDirection[2];
623 fPoint[0] -= extra*fDirection[0];
624 fPoint[1] -= extra*fDirection[1];
625 fPoint[2] -= extra*fDirection[2];
626 if (!current)
return 0;
629 while (nextindex>=0) {
635 printf(
"CrossBoundaryAndLocate: entered %s\n",
GetPath());
641 if ((current == skipnode) && (level ==
fLevel) ) {
644 for (
Int_t i=1; i<level; i++) {
657 printf(
"CrossBoundaryAndLocate: Exited geometry\n");
666 printf(
"CrossBoundaryAndLocate: Exited geometry\n");
669 printf(
"CrossBoundaryAndLocate: entered %s\n",
GetPath());
676 printf(
"CrossBoundaryAndLocate: entered %s\n",
GetPath());
715 computeGlobal =
kTRUE;
742 printf(
"TGeoManager::FindNextBoundary: point=(%19.16f, %19.16f, %19.16f)\n",
744 printf(
" dir= (%19.16f, %19.16f, %19.16f)\n",
746 printf(
" pstep=%9.6g path=%s\n", stepmax,
GetPath());
760 printf(
"=== To path: %s\n", path);
761 printf(
"=== local to %s: (%19.16f, %19.16f, %19.16f, %19.16f, %19.16f, %19.16f)\n",
762 tvol->
GetName(), point[0],point[1],point[2],dir[0],dir[1],dir[2]);
765 if (idebug>4) printf(
"=== volume %s contains point\n", tvol->
GetName());
770 printf(
"=== volume %s does not contain point\n", tvol->
GetName());
771 printf(
"=== distance to path: %g\n",
fStep);
775 newpt[0] = point[0] +
fStep*dir[0];
776 newpt[1] = point[1] +
fStep*dir[1];
777 newpt[2] = point[2] +
fStep*dir[2];
778 printf(
"=== Propagated point: (%19.16f, %19.16f, %19.16f)", newpt[0],newpt[1],newpt[2]);
785 printf(
"=== local to %s: (%19.16f, %19.16f, %19.16f, %19.16f, %19.16f, %19.16f)\n",
786 tvol->
GetName(), point[0],point[1],point[2],dir[0],dir[1],dir[2]);
788 printf(
"=== volume %s contains point\n", tvol->
GetName());
790 printf(
"=== volume %s does not contain point\n", tvol->
GetName());
823 printf(
" -> from local=(%19.16f, %19.16f, %19.16f)\n",
824 point[0],point[1],point[2]);
825 printf(
" ldir =(%19.16f, %19.16f, %19.16f)\n",
826 dir[0],dir[1],dir[2]);
843 Int_t idaughter = -1;
877 for (
Int_t i=0; i<novlps; i++) {
878 current = mother->
GetNode(ovlps[i]);
971 Fatal(
"FindNextBoundary",
"Cannot find mother node");
984 if (nextovlp) nmany -= imother-up;
989 if (ovlp || nextovlp) {
992 Fatal(
"FindNextBoundary",
"Cannot find mother matrix");
1006 while (up--)
CdUp();
1014 currentnode = mothernode;
1034 while (nextindex>=0) {
1073 if ((index-1) >= ifirst) ifirst = index-1;
1075 if ((index+1) <= ilast) ilast = index+1;
1079 current = vol->
GetNode(ifirst);
1093 nodefound = current;
1097 if (ilast==ifirst)
return nodefound;
1099 current = vol->
GetNode(ilast);
1113 nodefound = current;
1122 if (idebug>4) printf(
" Checking distance to %d daughters...\n",nd);
1123 if (nd<5 || !voxels) {
1124 for (i=0; i<nd; i++) {
1135 printf(
" -> from local=(%19.16f, %19.16f, %19.16f)\n",
1136 lpoint[0],lpoint[1],lpoint[2]);
1137 printf(
" ldir =(%19.16f, %19.16f, %19.16f)\n",
1138 ldir[0],ldir[1],ldir[2]);
1139 printf(
" -> to: %s shape %s snext=%g\n", current->
GetName(),
1153 while (indnext>=0) {
1157 nodefound = current;
1167 Int_t sumchecked = 0;
1171 while ((sumchecked<nd) && (vlist=voxels->
GetNextVoxel(point, dir, ncheck, info))) {
1172 for (i=0; i<ncheck; i++) {
1173 current = vol->
GetNode(vlist[i]);
1184 printf(
" -> from local=(%19.16f, %19.16f, %19.16f)\n",
1185 lpoint[0],lpoint[1],lpoint[2]);
1186 printf(
" ldir =(%19.16f, %19.16f, %19.16f)\n",
1187 ldir[0],ldir[1],ldir[2]);
1188 printf(
" -> to: %s shape %s snext=%g\n", current->
GetName(),
1201 idaughter = vlist[i];
1202 while (indnext>=0) {
1206 nodefound = current;
1225 static Int_t icount = 0;
1244 fPoint[1] += stepmax*fDirection[1];
1245 fPoint[2] += stepmax*fDirection[2];
1254 fPoint[1] += stepmax*fDirection[1];
1255 fPoint[2] += stepmax*fDirection[2];
1262 fPoint[1] += extra*fDirection[1];
1263 fPoint[2] += extra*fDirection[2];
1266 printf(
"TGeoManager::FindNextBAndStep: point=(%19.16f, %19.16f, %19.16f)\n",
1268 printf(
" dir= (%19.16f, %19.16f, %19.16f)\n",
1269 fDirection[0], fDirection[1], fDirection[2]);
1270 printf(
" pstep=%9.6g path=%s\n", stepmax,
GetPath());
1279 fPoint[0] -= extra*fDirection[0];
1280 fPoint[1] -= extra*fDirection[1];
1281 fPoint[2] -= extra*fDirection[2];
1283 fStep = snext+extra;
1288 while (nextindex>=0) {
1295 fPoint[0] += snext*fDirection[0];
1296 fPoint[1] += snext*fDirection[1];
1297 fPoint[2] += snext*fDirection[2];
1317 Int_t icrossed = -2;
1323 printf(
" -> from local=(%19.16f, %19.16f, %19.16f)\n",
1324 point[0],point[1],point[2]);
1325 printf(
" ldir =(%19.16f, %19.16f, %19.16f)\n",
1326 dir[0],dir[1],dir[2]);
1346 if (!
fLevel && !is_assembly) {
1364 Int_t idaughter = -1;
1368 icrossed = idaughter;
1403 for (
Int_t i=0; i<novlps; i++) {
1404 current = mother->
GetNode(ovlps[i]);
1420 icrossed = ovlps[i];
1422 fNextNode = current;
1436 icrossed = idaughter;
1453 fNextNode = current;
1454 icrossed = ovlps[i];
1486 if (nextovlp) nmany -= imother-up;
1491 if (ovlp || nextovlp) {
1500 fNextNode = mothernode;
1503 while (up--)
CdUp();
1513 currentnode = mothernode;
1537 while (nextindex>=0) {
1549 if (icrossed == -2) {
1555 if (icrossed == -1) {
1559 if (!
fLevel && !is_assembly) {
1571 while (nextindex>=0) {
1594 if (found != last) {
1619 if (found != last) {
1757 if (ilast==ifirst)
return fSafety;
1774 for (
id=0;
id<nd;
id++) {
1795 for (
id=0;
id<nd;
id++) {
1799 if (dxyz0 >
fSafety)
continue;
1801 if (dxyz1 >
fSafety)
continue;
1803 if (dxyz2 >
fSafety)
continue;
1804 if (dxyz0>0) dxyz+=dxyz0*dxyz0;
1805 if (dxyz1>0) dxyz+=dxyz1*dxyz1;
1806 if (dxyz2>0) dxyz+=dxyz2*dxyz2;
1815 if (safe<fSafety) fSafety = safe;
1842 if (safe<fSafety && safe>=0)
fSafety=safe;
1843 if (!novlp || !contains)
continue;
1845 for (io=0; io<novlp; io++) {
1846 nodeovlp = vol->
GetNode(ovlp[io]);
1856 if (safe<fSafety && safe>=0)
fSafety=safe;
1874 if (crtovlp) nmany--;
1875 if (crtovlp || nextovlp) {
1905 while (crtindex>=0) {
1930 if (!inside_current) {
1932 inside_current = vol->
Contains(point);
1938 if (!inside_current) {
1953 if (!inside_current && downwards) {
1956 else inside_current = vol->
Contains(point);
1957 if (!inside_current) {
1966 printf(
"Search node local=(%19.16f, %19.16f, %19.16f) -> %s\n",
1980 while (crtindex>=0 && downwards) {
2006 if (node && node!=skipnode) {
2009 CdDown(node->GetIndex());
2020 Int_t *check_list = 0;
2043 for (
id=0;
id<ncheck;
id++) {
2044 node = vol->
GetNode(check_list[
id]);
2045 if (node==skipnode)
continue;
2047 if ((
id<(ncheck-1)) && node->IsOverlapping()) {
2089 for (
id=0;
id<nd;
id++) {
2091 if (node==skipnode)
continue;
2132 Int_t found_virtual = 0;
2136 for (i=0; i<nc; i++) {
2150 if (found_virtual>deepest_virtual) {
2153 if (found_virtual==deepest_virtual) {
2157 if ((
fLevel==deepest) && (clnode==priority)) replace=
kTRUE;
2179 deepest_virtual = found_virtual;
2188 deepest_virtual = found_virtual;
2209 if (!ovlps)
return 0;
2215 result[ntotal++]=check_list[start];
2219 while ((ovlps[jst]<=check_list[start]) && (jst<novlps)) jst++;
2220 if (jst==novlps)
return 0;
2221 for (i=start; i<ncheck; i++) {
2222 for (j=jst; j<novlps; j++) {
2223 if (check_list[i]==ovlps[j]) {
2229 result[ntotal++]=check_list[i];
2253 if (is_geom) epsil=(cross)?1
E-6:-1
E-6;
2284 Int_t new_media = 0;
2286 Int_t virtual_level = 1;
2289 while ((mother=
GetMother(virtual_level))) {
2291 if (!new_media) new_media=(mother->
GetMedium()==medium)?0:virtual_level;
2294 if (!new_media) new_media=(mother->
GetMedium()==medium)?0:virtual_level;
2297 return (new_media==0)?virtual_level:(new_media-1);
2320 if (!mother)
return kTRUE;
2326 if (ovlp || nextovlp) {
2332 while (up--)
CdUp();
2349 if (!overlapping)
return fLevel;
2352 while (overlapping && level) {
2365 Info(
"InspectState",
"Current path is: %s",
GetPath());
2368 Bool_t is_offset, is_overlapping;
2369 for (level=0; level<
fLevel+1; level++) {
2371 if (!node)
continue;
2374 Info(
"InspectState",
"level %i: %s div=%i many=%i",level,node->
GetName(),is_offset,is_overlapping);
2401 if (change) fLastSafety = 0;
2424 if (!change)
return kFALSE;
2435 if (!change)
return kFALSE;
2445 if (!change)
return kFALSE;
2448 while (crtindex>=0) {
2458 if (!nd)
return kTRUE;
2465 if (!change)
return kFALSE;
2474 Int_t *check_list = 0;
2484 for (
Int_t id=0;
id<ncheck;
id++) {
2547 if (safe < proposed)
return kFALSE;
2668 SetCurrentNavigator(GetEntriesFast()-1);
Int_t fNmany
current geometry level;
Statefull info for the current geometry level.
virtual const char * GetName() const
Returns name of object.
void GetBranchNames(Int_t *names) const
Fill volume names of current branch into an array.
Int_t GetMaxLevel() const
TGeoNode * CrossBoundaryAndLocate(Bool_t downwards, TGeoNode *skipnode)
Cross next boundary and locate within current node The current point must be on the boundary of fCurr...
double dist(Rotation3D const &r1, Rotation3D const &r2)
Bool_t GotoSafeLevel()
Go upwards the tree until a non-overlapping node.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TGeoNodeCache * fCache
current geometry
The manager class for any TGeo geometry.
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
#define snext(osub1, osub2)
virtual void Voxelize(Option_t *option="")
Voxelize attached volume according to option If the volume is an assembly, make sure the bbox is comp...
virtual void ComputeNormal(const Double_t *point, const Double_t *dir, Double_t *norm)=0
Double_t Safety(Double_t point[3], Double_t safmax=1.E30)
Compute safety for the parallel world.
TGeoNode * InitTrack(const Double_t *point, const Double_t *dir)
Initialize current point and current direction vector (normalized) in MARS.
Bool_t IsOverlapping() const
virtual TGeoNode * FindNode(Double_t *, const Double_t *=0)
TGeoNavigator()
path to current node
TGeoManager * fGeometry
flag that last geometric step was null
virtual Int_t * GetCheckList(const Double_t *point, Int_t &nelem, TGeoStateInfo &td)
get the list of daughter indices for which point is inside their bbox
TGeoStateInfo * GetInfo()
Get next state info pointer.
Int_t fOverlapMark
current size of fOverlapClusters
TGeoNode * GetNode(const char *name) const
get the pointer to a daughter node
virtual const Double_t * GetTranslation() const
Double_t fSafety
step to be done from current point and direction
virtual void MasterToLocalVect(const Double_t *master, Double_t *local) const
Convert a vector from mother reference to local reference system.
void GetBranchOnlys(Int_t *isonly) const
Fill node copy numbers of current branch into an array.
TGeoNode * fCurrentNode
current volume
virtual TGeoPatternFinder * GetFinder() const
TGeoVolume, TGeoVolumeMulti, TGeoVolumeAssembly are the volume classes.
Int_t GetSafeLevel() const
Go upwards the tree until a non-overlapping node.
static Int_t GetVerboseLevel()
Set verbosity level (static function).
void TopToMaster(const Double_t *top, Double_t *master) const
Convert coordinates from top volume frame to master.
void InspectShape() const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Bool_t fIsOnBoundary
flag that current point is outside geometry
Matrix class used for computing global transformations Should NOT be used for node definition...
void Multiply(const TGeoMatrix *right)
multiply to the right with an other transformation if right is identity matrix, just return ...
TGeoPhysicalNode * FindNextBoundary(Double_t point[3], Double_t dir[3], Double_t &step, Double_t stepmax=1.E30)
Same functionality as TGeoNavigator::FindNextDaughterBoundary for the parallel world.
TGeoNode * FindInCluster(Int_t *cluster, Int_t nc)
Find a node inside a cluster of overlapping nodes.
void MasterToLocal(const Double_t *master, Double_t *local) const
Short_t Min(Short_t a, Short_t b)
TGeoHMatrix * fDivMatrix
current pointer to cached global matrix
TGeoPhysicalNode * FindNode(Double_t point[3])
Finds physical node containing the point.
Double_t fCldir[3]
cosine of incident angle on current checked surface
TGeoNode * GetNode(Int_t level=-1) const
Return node in branch at LEVEL. If not specified, return last leaf.
Double_t fDirection[3]
current point
TGeoNode * fLastNode
top physical node
virtual void SortCrossedVoxels(const Double_t *point, const Double_t *dir, TGeoStateInfo &td)
get the list in the next voxel crossed by a ray
TGeoVoxelFinder * GetVoxels() const
Getter for optimization structure.
void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) const
Fill copy numbers of current branch nodes.
Int_t fNextDaughterIndex
number of overlapping nodes on current branch
Bool_t NeedRebuild() const
virtual Int_t * GetNextVoxel(const Double_t *point, const Double_t *dir, Int_t &ncheck, TGeoStateInfo &td)
get the list of new candidates for the next voxel crossed by current ray printf("### GetNextVoxel\n")...
TGeoHMatrix * fCurrentMatrix
backup state
Double_t fNormal[3]
last computed safety radius
static Double_t Tolerance()
void InspectState() const
Inspects path and all flags for the current state.
void DoRestoreState()
Restore a backed-up state without affecting the cache stack.
Int_t GetNdaughters() const
void CdNode(Int_t nodeid)
Change current path to point to the node having this id.
void MasterToTop(const Double_t *master, Double_t *top) const
Convert coordinates from master volume frame to top.
virtual Bool_t Contains(const Double_t *point) const =0
TGeoNavigator & operator=(const TGeoNavigator &)
assignment operator
virtual const char * ClassName() const
Returns name of class to which the object belongs.
TGeoPatternFinder * GetFinder() const
TGeoNode * 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.
Bool_t IsActiveDaughters() const
void PopDummy(Int_t ipop=9999)
Bool_t fIsNullStep
flag that a new point is in the same node as previous
Bool_t CheckPath(const char *path) const
Check if a geometry path is valid without changing the state of the navigator.
virtual TGeoMatrix * GetMatrix() const =0
Special pool of reusable nodes.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
virtual void LocalToMasterVect(const Double_t *local, Double_t *master) const
convert a vector by multiplying its column vector (x, y, z, 1) to matrix inverse
void CopyFrom(const TGeoMatrix *other)
Fast copy method.
void ResetState()
Reset current state flags.
TGeoNode * GetCurrentNode() const
void ReleaseInfo()
Release last used state info pointer.
Physical nodes are the actual 'touchable' objects in the geometry, representing a path of positioned ...
TGeoNode * SearchNode(Bool_t downwards=kFALSE, const TGeoNode *skipnode=0)
Returns the deepest node containing fPoint, which must be set a priori.
void CdTop()
Make top level node the current node.
Base finder class for patterns.
Bool_t IsSameLocation() const
void GetBranchNumbers(Int_t *copyNumbers, Int_t *volumeNumbers) const
Fill node copy numbers of current branch into an array.
TGeoMedium * GetMedium() const
TGeoNode * FindNextBoundaryAndStep(Double_t stepmax=TGeoShape::Big(), Bool_t compsafe=kFALSE)
Compute distance to next boundary within STEPMAX.
void GetBranchNames(Int_t *names) const
Fill names with current branch volume names (4 char - used by GEANT3 interface).
Bool_t IsActivityEnabled() const
void BuildCache(Bool_t dummy=kFALSE, Bool_t nodeid=kFALSE)
Builds the cache for physical nodes and global matrices.
Bool_t cd(const char *path="")
Browse the tree of nodes starting from top node according to pathname.
void SetCurrentPoint(const Double_t *point)
Double_t Safety(Bool_t inside=kFALSE)
Compute safe distance from the current point.
TGeoNode * GetDaughter(Int_t ind) const
TGeoHMatrix * fGlobalMatrix
current stored global matrix
Int_t GetVirtualLevel()
Find level of virtuality of current overlapping node (number of levels up having the same tracking me...
Double_t fCldirChecked[3]
unit vector to current closest shape
Int_t GetIndex(const TGeoNode *node) const
get index number for a given daughter
virtual Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const =0
Double_t * GetBoxes() const
Double_t * FindNormal(Bool_t forward=kTRUE)
Computes normal vector to the next surface that will be or was already crossed when propagating on a ...
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Bool_t fIsOutside
flag that next geometric step will exit current volume
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
void CdDown(Int_t index)
Make a daughter of current node current.
virtual Bool_t IsOnBoundary(const Double_t *) const
virtual void RegisterYourself()
Register the matrix in the current manager, which will become the owner.
void SafetyOverlaps()
Compute safe distance from the current point within an overlapping node.
Bool_t fSearchOverlaps
internal array for overlaps
Double_t fLastSafety
safety radius from current point
TGeoNode * GetTopNode() const
Bool_t fIsStepEntering
flag that current track is about to leave current node
Bool_t IsSafeVoxel(const Double_t *point, Int_t inode, Double_t minsafe) const
Computes squared distance from POINT to the voxel(s) containing node INODE.
virtual ~TGeoNavigator()
Destructor.
static Double_t gTolerance
virtual Double_t DistFromOutside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const =0
virtual void LocalToMaster(const Double_t *local, Double_t *master) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix inverse
Bool_t Contains(const Double_t *point) const
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
Convert the point coordinates from mother reference to local reference system.
Int_t fLevel
thread id for this navigator
virtual Double_t DistFromInside(const Double_t *point, const Double_t *dir, Int_t iact=1, Double_t step=TGeoShape::Big(), Double_t *safe=0) const =0
TGeoParallelWorld * GetParallelWorld() const
Int_t PushPath(Int_t startlevel=0)
virtual Int_t GetCurrentNodeIndex() const
Double_t fPoint[3]
unit vector to current checked shape
TGeoNode * GetNode() 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.
void Add(THist< DIMENSIONS, PRECISION_TO, STAT_TO... > &to, const THist< DIMENSIONS, PRECISION_FROM, STAT_FROM... > &from)
Add two histograms.
TGeoNode * fNextNode
last searched node
TString fPath
current local matrix of the selected division cell
TObject * UncheckedAt(Int_t i) const
void SetCurrentDirection(const Double_t *dir)
void CdUp()
Go one level up in geometry.
virtual void MasterToLocal(const Double_t *master, Double_t *local) const
convert a point by multiplying its column vector (x, y, z, 1) to matrix
Int_t PushPoint(Int_t startlevel=0)
Bool_t fIsEntering
flag a safe start for point classification
TGeoNode * FindNextBoundary(Double_t stepmax=TGeoShape::Big(), const char *path="", Bool_t frombdr=kFALSE)
Find distance to next boundary and store it in fStep.
const char * GetPath()
Returns the current geometry path.
TGeoVolume * fCurrentVolume
cache of states
Bool_t fIsSameLocation
flag that current point is on some boundary
static RooMathCoreReg dummy
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...
TGeoNode * GetMother(Int_t up=1) const
Int_t fThreadId
last point for which safety was computed
Finder class handling voxels.
Media are used to store properties related to tracking and which are useful only when using geometry ...
void ResetAll()
Reset the navigator.
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 curren...
TGeoHMatrix * GetHMatrix()
Return stored current matrix (global matrix of the next touched node).
Mother of all ROOT objects.
Bool_t CdDown(Int_t index)
Make daughter INDEX of current node the active state. Compute global matrix.
Double_t fLastPoint[3]
current direction
you should not use this method at all Int_t Int_t z
Bool_t fIsStepExiting
flag that next geometric step will enter new volume
Class providing navigation API for TGeo geometries.
void CdNext()
Do a cd to the node found next by FindNextBoundary.
A node represent a volume positioned inside another.They store links to both volumes and to the TGeoM...
virtual Int_t GetNextNodeIndex() const
TGeoHMatrix * GetMotherMatrix(Int_t up=1) const
R__EXTERN TGeoIdentity * gGeoIdentity
Bool_t HasIdArray() const
static Int_t ThreadId()
Translates the current thread id to an ordinal number.
Double_t Safety(const Double_t *point, Bool_t in=kTRUE) const
computes the closest distance from given point to this shape
void CdNode(Int_t nodeid)
Change current path to point to the node having this id.
Class storing the state of the cache at a given moment.
Int_t * GetOverlaps(Int_t &novlp) const
Int_t GetNdaughters() const
TGeoNode * FindNode(Bool_t safe_start=kTRUE)
Returns deepest node containing current point.
const char * kGeoOutsidePath
virtual TGeoNode * CdNext()
Make next node (if any) current.
void CdUp()
Make mother of current node the active state.
void GetBranchOnlys(Int_t *isonly) const
Fill copy numbers of current branch nodes.
Int_t fOverlapSize
next daughter index after FindNextBoundary
Bool_t IsParallelWorldNav() const
Double_t Sqrt(Double_t x)
Int_t GetNext() const
Get index of next division.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
Bool_t fIsExiting
flag if current step just got into a new node
TGeoVolume * GetTopVolume() const
void FindOverlaps() const
loop all nodes marked as overlaps and find overlapping brothers
TGeoNode * fForcedNode
next node that will be crossed
Int_t GetCurrentNodeId() const
TGeoShape * GetShape() const
virtual Int_t GetIndex() const
void DoBackupState()
Backup the current state without affecting the cache stack.
Double_t * FindNormalFast()
Computes fast normal to next crossed boundary, assuming that the current point is close enough to the...
void SetState(Int_t level, Int_t startlevel, Int_t nmany, Bool_t ovlp, Double_t *point=0)
Fill current modeller state.
Bool_t fStartSafe
flags the type of the current node
static char * skip(char **buf, const char *delimiters)
TGeoVolume * GetVolume() const
const char * GetPath() const
Get path to the current node in the form /node0/node1/...
Bool_t RestoreState(Int_t &nmany, TGeoCacheState *state, Double_t *point=0)
Pop next state/point from a backed-up state.
TGeoNode * CrossDivisionCell()
Cross a division cell.
TGeoHMatrix * GetCurrentMatrix() const
Int_t * fOverlapClusters
current recursive position in fOverlapClusters
TGeoNode * fTopNode
current node
TGeoCacheState * fBackupState
current point is supposed to be inside this node
Bool_t fCurrentOverlapping
flag set when an overlapping cluster is searched
TGeoNode * 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)...
const char * Data() const
virtual Bool_t IsAssembly() const
Returns true if the volume is an assembly or a scaled assembly.