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: G4UnionSolid.cc,v 1.19 2001/08/13 14:03:38 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-00 $
// $Id: G4UnionSolid.cc,v 1.20 2002/01/10 15:34:27 gcosmo Exp $
// GEANT4 tag $Name: geant4-04-01 $
//
// Implementation of methods for the class G4IntersectionSolid
//
@@ -168,15 +168,15 @@ G4UnionSolid::SurfaceNormal( const G4ThreeVector& p ) const
{
G4ThreeVector normal;
#ifdef G4BOOLDEBUG
if( Inside(p) == kOutside )
{
G4cerr << "WARNING - Invalid call in G4UnionSolid::SurfaceNormal(p),"
<< " point p is outside" << G4endl;
G4cerr << " p = " << p << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4UnionSolid::SurfaceNormal(p), p is outside") ;
#endif
G4cout << "WARNING - Invalid call in G4UnionSolid::SurfaceNormal(p),"
<< " point p is outside" << G4endl;
G4cout << " p = " << p << G4endl;
// G4Exception("Invalid call in G4UnionSolid::SurfaceNormal(p), p is outside") ;
}
#endif
if(fPtrSolidA->Inside(p) == kSurface && fPtrSolidB->Inside(p) != kInside)
{
@@ -190,12 +190,12 @@ G4UnionSolid::SurfaceNormal( const G4ThreeVector& p ) const
else
{
normal= fPtrSolidA->SurfaceNormal(p) ;
G4cerr << "WARNING - Invalid call in G4UnionSolid::SurfaceNormal(p),"
#ifdef G4BOOLDEBUG
G4cout << "WARNING - Invalid call in G4UnionSolid::SurfaceNormal(p),"
<< " point p is inside" << G4endl;
G4cerr << " p = " << p << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4UnionSolid::SurfaceNormal(p), p is inside") ;
#endif
G4cout << " p = " << p << G4endl;
// G4Exception("Invalid call in G4UnionSolid::SurfaceNormal(p), p is inside") ;
#endif
}
return normal;
}
@@ -208,16 +208,17 @@ G4double
G4UnionSolid::DistanceToIn( const G4ThreeVector& p,
const G4ThreeVector& v ) const
{
#ifdef G4BOOLDEBUG
if( Inside(p) == kInside )
{
G4cerr << "WARNING - Invalid call in G4UnionSolid::DistanceToIn(p,v),"
G4cout << "WARNING - Invalid call in G4UnionSolid::DistanceToIn(p,v),"
<< " point p is inside" << G4endl;
G4cerr << " p = " << p << G4endl;
G4cerr << " v = " << v << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4UnionSolid::DistanceToIn(p,v), point p is intside");
#endif
G4cout << " p = " << p << G4endl;
G4cout << " v = " << v << G4endl;
// G4Exception("Invalid call in G4UnionSolid::DistanceToIn(p,v), point p is intside");
}
#endif
return G4std::min(fPtrSolidA->DistanceToIn(p,v),
fPtrSolidB->DistanceToIn(p,v) ) ;
}
@@ -230,16 +231,15 @@ G4UnionSolid::DistanceToIn( const G4ThreeVector& p,
G4double
G4UnionSolid::DistanceToIn( const G4ThreeVector& p) const
{
#ifdef G4BOOLDEBUG
if( Inside(p) == kInside )
{
G4cerr << "WARNING - Invalid call in G4UnionSolid::DistanceToIn(p),"
G4cout << "WARNING - Invalid call in G4UnionSolid::DistanceToIn(p),"
<< " point p is inside" << G4endl;
G4cerr << " p = " << p << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4UnionSolid::DistanceToIn(p), p is inside") ;
#endif
G4cout << " p = " << p << G4endl;
// G4Exception("Invalid call in G4UnionSolid::DistanceToIn(p), p is inside") ;
}
#endif
G4double distA = fPtrSolidA->DistanceToIn(p) ;
G4double distB = fPtrSolidB->DistanceToIn(p) ;
G4double safety = G4std::min(distA,distB) ;
@@ -264,11 +264,7 @@ G4UnionSolid::DistanceToOut( const G4ThreeVector& p,
if( Inside(p) == kOutside )
{
G4cerr << "WARNING - Invalid call in G4UnionSolid::DistanceToOut(p,v),"
<< " point p is outside" << G4endl;
G4cerr << " p = " << p << G4endl;
G4cerr << " v = " << v << G4endl;
#ifdef G4BOOLDEBUG
#ifdef G4BOOLDEBUG
G4cout << "Position:" << G4endl << G4endl;
G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
@@ -277,8 +273,12 @@ G4UnionSolid::DistanceToOut( const G4ThreeVector& p,
G4cout << "v.x() = " << v.x() << G4endl;
G4cout << "v.y() = " << v.y() << G4endl;
G4cout << "v.z() = " << v.z() << G4endl << G4endl;
G4Exception("Invalid call in G4UnionSolid::DistanceToOut(p,v), point p is outside");
#endif
G4cout << "WARNING - Invalid call in G4UnionSolid::DistanceToOut(p,v),"
<< " point p is outside" << G4endl;
G4cout << " p = " << p << G4endl;
G4cout << " v = " << v << G4endl;
// G4Exception("Invalid call in G4UnionSolid::DistanceToOut(p,v), point p is outside");
#endif
}
else
{
@@ -342,12 +342,12 @@ G4UnionSolid::DistanceToOut( const G4ThreeVector& p ) const
G4double distout = kInfinity;
if( Inside(p) == kOutside )
{
G4cerr << "WARNING - Invalid call in G4UnionSolid::DistanceToOut(p),"
#ifdef G4BOOLDEBUG
G4cout << "WARNING - Invalid call in G4UnionSolid::DistanceToOut(p),"
<< " point p is outside" << G4endl;
G4cerr << " p = " << p << G4endl;
#ifdef G4BOOLDEBUG
G4Exception("Invalid call in G4UnionSolid::DistanceToOut(p), p is outtside");
#endif
G4cout << " p = " << p << G4endl;
// G4Exception("Invalid call in G4UnionSolid::DistanceToOut(p), p is outtside");
#endif
}
else
{