+ Double_t pt[3], local[3], ldir[3];
+ Int_t pid = TRACKR.jtrack;
+ pt[0] = pSx;
+ pt[1] = pSy;
+ pt[2] = pSz;
+ gGeoManager->MasterToLocal(pt,local);
+ gGeoManager->MasterToLocalVect(pV,ldir);
+/*
+ Bool_t valid = gGeoManager->GetCurrentVolume()->Contains(local);
+ if (!valid) {
+ printf("location not valid in %s pid=%i\n", gGeoManager->GetPath(),pid);
+ printf("local:(%f, %f, %f) ldir:(%f, %f, %f)\n", local[0],local[1],local[2],ldir[0],ldir[1],ldir[2]);
+// gGeoManager->FindNode();
+// printf(" -> actual location: %s\n", gGeoManager->GetPath());
+ }
+*/
+ Double_t pstep = propStep;
+ Double_t snext = propStep;
+ const Double_t epsil = 0.9999999 * TGeoShape::Tolerance();
+ // This should never happen !!!
+ if (pstep<TGeoShape::Tolerance()) {
+ printf("Proposed step is 0 !!!\n");
+ pstep = 2.*TGeoShape::Tolerance();
+ }