Import Geant4 6.1.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ReplicaNavigation.cc,v 1.3 2003/11/03 17:15:22 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-00 $
|
||||
// $Id: G4ReplicaNavigation.cc,v 1.5 2004/03/11 13:08:38 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-06-01 $
|
||||
//
|
||||
//
|
||||
// class G4ReplicaNavigation Implementation
|
||||
@@ -45,6 +45,15 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
G4ReplicaNavigation::G4ReplicaNavigation()
|
||||
: fCheck(false), fVerbose(0)
|
||||
{
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
// Destructor
|
||||
// ********************************************************************
|
||||
//
|
||||
G4ReplicaNavigation::~G4ReplicaNavigation()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -755,6 +764,30 @@ G4ReplicaNavigation::ComputeStep(const G4ThreeVector &globalPoint,
|
||||
ourSafety = sampleSafety;
|
||||
}
|
||||
|
||||
#ifdef G4VERBOSE
|
||||
if ( fCheck )
|
||||
{
|
||||
if( motherSolid->Inside(localPoint)==kOutside )
|
||||
{
|
||||
G4cout << "WARNING - G4ReplicaNavigation::ComputeStep()" << G4endl
|
||||
<< " Point " << localPoint
|
||||
<< " is outside current volume " << motherPhysical->GetName()
|
||||
<< G4endl;
|
||||
G4double estDistToSolid= motherSolid->DistanceToIn(localPoint);
|
||||
G4cout << " Estimated isotropic distance to solid (distToIn)= "
|
||||
<< estDistToSolid << G4endl;
|
||||
if( estDistToSolid > 100.0 * kCarTolerance )
|
||||
G4Exception("G4ReplicaNavigation::ComputeStep()",
|
||||
"FarOutsideCurrentVolume", FatalException,
|
||||
"Point is far outside Current Volume !" );
|
||||
else
|
||||
G4Exception("G4ReplicaNavigation::ComputeStep()",
|
||||
"OutsideCurrentVolume", JustWarning,
|
||||
"Point is a little outside Current Volume.");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// May need precision protection
|
||||
//
|
||||
if ( sampleSafety<=ourStep )
|
||||
@@ -814,6 +847,47 @@ G4ReplicaNavigation::ComputeStep(const G4ThreeVector &globalPoint,
|
||||
exiting = false;
|
||||
*pBlockedPhysical = samplePhysical;
|
||||
blockedReplicaNo = -1;
|
||||
#ifdef G4VERBOSE
|
||||
// Check to see that the resulting point is indeed in/on volume.
|
||||
// This check could eventually be made only for successful candidate.
|
||||
|
||||
if ( ( fCheck ) && ( sampleStep < kInfinity ) )
|
||||
{
|
||||
G4ThreeVector intersectionPoint;
|
||||
intersectionPoint= samplePoint + sampleStep * sampleDirection;
|
||||
EInside insideIntPt= sampleSolid->Inside(intersectionPoint);
|
||||
if ( insideIntPt != kSurface )
|
||||
{
|
||||
G4int oldcoutPrec = G4cout.precision(16);
|
||||
G4cout << "WARNING - G4ReplicaNavigation::ComputeStep()"
|
||||
<< G4endl
|
||||
<< " Inaccurate DistanceToIn for solid "
|
||||
<< sampleSolid->GetName() << G4endl;
|
||||
G4cout << " Solid gave DistanceToIn = " << sampleStep
|
||||
<< " yet returns " ;
|
||||
if ( insideIntPt == kInside )
|
||||
G4cout << "-kInside-";
|
||||
else if ( insideIntPt == kOutside )
|
||||
G4cout << "-kOutside-";
|
||||
else
|
||||
G4cout << "-kSurface-";
|
||||
G4cout << " for this point !" << G4endl;
|
||||
G4cout << " Point = " << intersectionPoint << G4endl;
|
||||
if ( insideIntPt != kInside )
|
||||
G4cout << " DistanceToIn(p) = "
|
||||
<< sampleSolid->DistanceToIn(intersectionPoint)
|
||||
<< G4endl;
|
||||
if ( insideIntPt != kOutside )
|
||||
G4cout << " DistanceToOut(p) = "
|
||||
<< sampleSolid->DistanceToOut(intersectionPoint)
|
||||
<< G4endl;
|
||||
G4Exception("G4ReplicaNavigation::ComputeStep()",
|
||||
"InaccurateDistanceToIn", JustWarning,
|
||||
"Navigator gets conflicting response from Solid.");
|
||||
G4cout.precision(oldcoutPrec);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user