96 G4double ourStep=currentProposedStepLength, ourSafety;
98 G4int localNoDaughters, sampleNo;
100 G4bool initialNode, noStep;
102 G4int curNoVolumes, contentNo;
107 motherSolid = motherLogical->
GetSolid();
114 ourSafety = motherSafety;
129 if ( exiting && validExitNormal )
135 blockedExitedVol = *pBlockedPhysical;
143 G4bool motherValidExitNormal=
false;
154 &motherValidExitNormal,
158 motherStep, motherSafety);
160 if( (motherStep >=
kInfinity) || (motherStep < 0.0) )
176 validExitNormal=
false;
178 *pBlockedPhysical= 0;
199 for (contentNo=curNoVolumes-1; contentNo>=0; contentNo--)
201 sampleNo = curVoxelNode->
GetVolume(contentNo);
205 samplePhysical = motherLogical->
GetDaughter(sampleNo);
206 if ( samplePhysical!=blockedExitedVol )
212 sampleTf.TransformPoint(localPoint);
218 if ( sampleSafety<ourSafety )
220 ourSafety = sampleSafety;
222 if ( sampleSafety<=ourStep )
224 sampleDirection = sampleTf.TransformAxis(localDirection);
226 sampleSolid->
DistanceToIn(samplePoint, sampleDirection);
232 sampleDirection, sampleStep);
235 if ( sampleStep<=ourStep )
237 ourStep = sampleStep;
240 *pBlockedPhysical = samplePhysical;
241 blockedReplicaNo = -1;
248 sampleDirection, localDirection, sampleSafety, sampleStep);
254 && ( sampleStep >= motherStep ) )
259 samplePoint, sampleDirection,
261 localPoint, localDirection,
262 motherStep, sampleStep);
284 if ( voxelSafety<ourSafety )
286 ourSafety = voxelSafety;
288 if ( currentProposedStepLength<ourSafety )
295 *pBlockedPhysical = 0;
303 if ( motherSafety<=ourStep )
307 motherStep = motherSolid->
DistanceToOut(localPoint, localDirection,
308 true, &motherValidExitNormal, &motherExitNormal);
317 motherStep, motherSafety);
318 if( motherValidExitNormal )
321 localPoint, localDirection,
322 motherStep, motherSolid,
323 "From motherSolid::DistanceToOut" );
327 if( (motherStep >=
kInfinity) || (motherStep < 0.0) )
345 validExitNormal=
false;
347 *pBlockedPhysical= 0;
354 if ( motherStep<=ourStep )
356 ourStep = motherStep;
362 validExitNormal= motherValidExitNormal;
363 exitNormal= motherExitNormal;
365 if ( validExitNormal )
377 "From RotationMatrix" );
384 validExitNormal =
false;
388 newSafety = ourSafety;
void AlongComputeStepLog(const G4VSolid *sampleSolid, const G4ThreeVector &samplePoint, const G4ThreeVector &sampleDirection, const G4ThreeVector &localDirection, G4double sampleSafety, G4double sampleStep) const
G4VPhysicalVolume * GetTopVolume() const
void PrintDaughterLog(const G4VSolid *sampleSolid, const G4ThreeVector &samplePoint, G4double sampleSafety, G4bool onlySafety, const G4ThreeVector &sampleDirection, G4double sampleStep) const
static const G4double kInfinity
CLHEP::Hep3Vector G4ThreeVector
G4int GetVolume(G4int pVolumeNo) const
G4double ComputeVoxelSafety(const G4ThreeVector &localPoint) const
G4VSolid * GetSolid() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
const G4RotationMatrix * GetRotation() const
G4int GetNoContained() const
HepRotation inverse() const
void ReportOutsideMother(const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4VPhysicalVolume *motherPV, G4double tDist=30.0 *CLHEP::cm) const
G4bool LocateNextVoxel(const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4double currentStep)
void BlockVolume(const G4int v)
G4bool IsBlocked(const G4int v) const
G4bool CheckAndReportBadNormal(const G4ThreeVector &unitNormal, const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, G4double step, const G4VSolid *solid, const char *msg) const
virtual G4double DistanceToIn(const G4ThreeVector &p, const G4ThreeVector &v) const =0
static const double kMinExitingNormalCosine
G4NavigationLogger * fLogger
G4int GetNoDaughters() const
const G4ThreeVector & GetTranslation() const
G4LogicalVolume * GetLogicalVolume() const
void PreComputeStepLog(const G4VPhysicalVolume *motherPhysical, G4double motherSafety, const G4ThreeVector &localPoint) const
G4SmartVoxelNode * fVoxelNode
void PostComputeStepLog(const G4VSolid *motherSolid, const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, G4double motherStep, G4double motherSafety) const
void CheckDaughterEntryPoint(const G4VSolid *sampleSolid, const G4ThreeVector &samplePoint, const G4ThreeVector &sampleDirection, const G4VSolid *motherSolid, const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, G4double motherStep, G4double sampleStep) const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
void Enlarge(const G4int nv)