71 const G4double currentProposedStepLength,
79 G4int &blockedReplicaNo)
85 G4double ourStep=currentProposedStepLength, ourSafety;
87 G4int localNoDaughters, sampleNo;
88 G4bool motherValidExitNormal=
false;
93 motherSolid = motherLogical->
GetSolid();
98 ourSafety = motherSafety;
103 if (
fCheck && ( (localNoDaughters>0) || (ourStep < motherSafety) ) )
113 if ( exiting&&validExitNormal )
119 blockedExitedVol = (*pBlockedPhysical);
137 &motherValidExitNormal,
140 if( (motherStep >=
kInfinity) || (motherStep < 0.0) )
145 ourStep = motherStep = 0.0;
151 validExitNormal= motherValidExitNormal;
152 exitNormal= motherExitNormal;
154 *pBlockedPhysical= 0;
163 for ( sampleNo=localNoDaughters-1; sampleNo>=0; sampleNo--)
165 samplePhysical = motherLogical->
GetDaughter(sampleNo);
166 if ( samplePhysical!=blockedExitedVol )
177 if ( sampleSafety<ourSafety )
179 ourSafety=sampleSafety;
182 if ( sampleSafety<=ourStep )
184 sampleDirection = sampleTf.TransformAxis(localDirection);
192 sampleDirection, sampleStep);
195 if ( sampleStep<=ourStep )
197 ourStep = sampleStep;
200 *pBlockedPhysical = samplePhysical;
201 blockedReplicaNo = -1;
206 sampleDirection, localDirection, sampleSafety, sampleStep);
217 samplePoint, sampleDirection,
219 localPoint, localDirection,
220 motherStep, sampleStep);
234 if ( currentProposedStepLength<ourSafety )
240 *pBlockedPhysical = 0;
247 if ( motherSafety<=ourStep )
254 &motherValidExitNormal,
261 motherStep, motherSafety);
262 if( motherValidExitNormal )
269 "From motherSolid::DistanceToOut" );
274 if( (motherStep >=
kInfinity) || (motherStep < 0.0) )
280 ourStep = motherStep = 0.0;
287 validExitNormal =
false;
288 *pBlockedPhysical= 0;
294 if ( motherStep<=ourStep )
296 ourStep = motherStep;
299 validExitNormal= motherValidExitNormal;
300 exitNormal= motherExitNormal;
302 if ( motherValidExitNormal )
307 exitNormal *= rot->inverse();
313 "From RotationMatrix" );
320 validExitNormal =
false;
324 newSafety = ourSafety;
340 G4int localNoDaughters, sampleNo;
344 motherSolid = motherLogical->
GetSolid();
349 ourSafety = motherSafety;
361 for ( sampleNo=localNoDaughters-1; sampleNo>=0; sampleNo-- )
363 samplePhysical = motherLogical->
GetDaughter(sampleNo);
373 if ( sampleSafety<ourSafety )
375 ourSafety = sampleSafety;
381 sampleSafety,
false,
false);
void SetVerboseLevel(G4int level)
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
const G4ThreeVector & GetTranslation() const
static const G4double kInfinity
CLHEP::Hep3Vector G4ThreeVector
CLHEP::HepRotation G4RotationMatrix
G4VPhysicalVolume * GetDaughter(const G4int i) const
G4double ComputeSafety(const G4ThreeVector &globalpoint, const G4NavigationHistory &history, const G4double pMaxLength=DBL_MAX)
void ReportOutsideMother(const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4VPhysicalVolume *motherPV, G4double tDist=30.0 *CLHEP::cm) 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
G4int GetNoDaughters() const
G4double ComputeStep(const G4ThreeVector &localPoint, const G4ThreeVector &localDirection, const G4double currentProposedStepLength, G4double &newSafety, G4NavigationHistory &history, G4bool &validExitNormal, G4ThreeVector &exitNormal, G4bool &exiting, G4bool &entering, G4VPhysicalVolume *(*pBlockedPhysical), G4int &blockedReplicaNo)
G4LogicalVolume * GetLogicalVolume() const
void ComputeSafetyLog(const G4VSolid *solid, const G4ThreeVector &point, G4double safety, G4bool isMotherVolume, G4int banner=-1) const
void PreComputeStepLog(const G4VPhysicalVolume *motherPhysical, G4double motherSafety, const G4ThreeVector &localPoint) const
const G4RotationMatrix * GetRotation() const
G4int GetVerboseLevel() const
G4NavigationLogger * fLogger
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
G4int GetVerboseLevel() const
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
void SetVerboseLevel(G4int level)
G4VSolid * GetSolid() const