Import Geant4 4.1.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:39:52 +02:00
parent 921d3b1cda
commit 330b82b769
4524 changed files with 178689 additions and 43575 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4IntersectionSolid.cc,v 1.16 2001/10/02 08:51:48 grichine Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4IntersectionSolid.cc,v 1.17 2002/01/10 15:34:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// Implementation of methods for the class G4IntersectionSolid
//
@@ -169,16 +169,16 @@ G4IntersectionSolid::SurfaceNormal( const G4ThreeVector& p ) const
insideA= fPtrSolidA->Inside(p);
insideB= fPtrSolidB->Inside(p);
#ifdef G4BOOLDEBUG
// if( Inside(p) == kOutside )
if( (insideA == kOutside) || (insideB == kOutside) )
{
G4cerr << "WARNING - Invalid call in G4IntersectionSolid::SurfaceNormal(p),"
G4cout << "WARNING - Invalid call in G4IntersectionSolid::SurfaceNormal(p),"
<< " point p is outside" << G4endl;
G4cerr << " p = " << p << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4IntersectionSolid::SurfaceNormal(p), p is outside") ;
#endif
G4cout << " p = " << p << G4endl;
// G4Exception("Invalid call in G4IntersectionSolid::SurfaceNormal(p), p is outside") ;
}
#endif
// OLD: if(fPtrSolidA->DistanceToOut(p) <= fPtrSolidB->DistanceToOut(p) )
@@ -202,12 +202,12 @@ G4IntersectionSolid::SurfaceNormal( const G4ThreeVector& p ) const
normal= fPtrSolidA->SurfaceNormal(p) ;
else
normal= fPtrSolidB->SurfaceNormal(p) ;
G4cerr << "WARNING - Invalid call in G4IntersectionSolid::SurfaceNormal(p),"
#ifdef G4BOOLDEBUG
G4cout << "WARNING - Invalid call in G4IntersectionSolid::SurfaceNormal(p),"
<< " point p is outsurface" << G4endl;
G4cerr << " p = " << p << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4IntersectionSolid::SurfaceNormal(p), p is outsurface") ;
#endif
G4cout << " p = " << p << G4endl;
// G4Exception("Invalid call in G4IntersectionSolid::SurfaceNormal(p), p is outsurface") ;
#endif
}
return normal;
@@ -224,13 +224,13 @@ G4IntersectionSolid::DistanceToIn( const G4ThreeVector& p,
G4double dist = 0.0, disTmp = 0.0 ;
if( Inside(p) == kInside )
{
G4cerr << "WARNING - Invalid call in G4IntersectionSolid::DistanceToIn(p,v),"
#ifdef G4BOOLDEBUG
G4cout << "WARNING - Invalid call in G4IntersectionSolid::DistanceToIn(p,v),"
<< " point p is inside" << G4endl;
G4cerr << " p = " << p << G4endl;
G4cerr << " v = " << v << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4IntersectionSolid::DistanceToIn(p,v), p is inside") ;
#endif
G4cout << " p = " << p << G4endl;
G4cout << " v = " << v << G4endl;
// G4Exception("Invalid call in G4IntersectionSolid::DistanceToIn(p,v), p is inside") ;
#endif
}
else
{
@@ -385,15 +385,15 @@ G4IntersectionSolid::DistanceToIn( const G4ThreeVector& p,
G4double
G4IntersectionSolid::DistanceToIn( const G4ThreeVector& p) const
{
#ifdef G4BOOLDEBUG
if( Inside(p) == kInside )
{
G4cerr << "WARNING - Invalid call in G4IntersectionSolid::DistanceToIn(p),"
G4cout << "WARNING - Invalid call in G4IntersectionSolid::DistanceToIn(p),"
<< " point p is inside" << G4endl;
G4cerr << " p = " << p << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4IntersectionSolid::DistanceToIn(p), p is inside") ;
#endif
G4cout << " p = " << p << G4endl;
// G4Exception("Invalid call in G4IntersectionSolid::DistanceToIn(p), p is inside") ;
}
#endif
EInside sideA = fPtrSolidA->Inside(p) ;
EInside sideB = fPtrSolidB->Inside(p) ;
G4double dist ;
@@ -431,12 +431,9 @@ G4IntersectionSolid::DistanceToOut( const G4ThreeVector& p,
G4bool validNormA, validNormB;
G4ThreeVector nA, nB;
#ifdef G4BOOLDEBUG
if( Inside(p) == kOutside )
{
G4cerr << "WARNING - Invalid call in G4IntersectionSolid::DistanceToOut(p,v),"
<< " point p is outside" << G4endl;
G4cerr << " p = " << p << G4endl;
G4cerr << " v = " << v << G4endl;
G4cout << "Position:" << G4endl << G4endl;
G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
@@ -445,10 +442,13 @@ G4IntersectionSolid::DistanceToOut( const G4ThreeVector& p,
G4cout << "v.x() = " << v.x() << G4endl;
G4cout << "v.y() = " << v.y() << G4endl;
G4cout << "v.z() = " << v.z() << G4endl << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p,v), p is outside") ;
#endif
G4cout << "WARNING - Invalid call in G4IntersectionSolid::DistanceToOut(p,v),"
<< " point p is outside" << G4endl;
G4cout << " p = " << p << G4endl;
G4cout << " v = " << v << G4endl;
// G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p,v), p is outside") ;
}
#endif
G4double distA = fPtrSolidA->DistanceToOut(p,v,calcNorm,&validNormA,&nA) ;
G4double distB = fPtrSolidB->DistanceToOut(p,v,calcNorm,&validNormB,&nB) ;
@@ -476,16 +476,15 @@ G4IntersectionSolid::DistanceToOut( const G4ThreeVector& p,
G4double
G4IntersectionSolid::DistanceToOut( const G4ThreeVector& p ) const
{
#ifdef G4BOOLDEBUG
if( Inside(p) == kOutside )
{
G4cerr << "WARNING - Invalid call in G4IntersectionSolid::DistanceToOut(p),"
G4cout << "WARNING - Invalid call in G4IntersectionSolid::DistanceToOut(p),"
<< " point p is outside" << G4endl;
G4cerr << " p = " << p << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p), p is outside") ;
#endif
G4cout << " p = " << p << G4endl;
// G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p), p is outside") ;
}
#endif
return G4std::min(fPtrSolidA->DistanceToOut(p),
fPtrSolidB->DistanceToOut(p) ) ;