Import Geant4 2.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:42:07 +02:00
parent 103bda00c8
commit e7d7193284
3106 changed files with 171117 additions and 90550 deletions
@@ -1,3 +1,13 @@
// This code implementation is the intellectual property of
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4UnionSolid.cc,v 1.9 2000/06/24 14:27:42 japost Exp $
// GEANT4 tag $Name: geant4-02-00 $
//
// Implementation of methods for the class G4IntersectionSolid
//
// History:
@@ -22,7 +32,6 @@
#include "G4Polyhedron.hh"
#include "G4NURBS.hh"
#include "G4NURBSbox.hh"
#include "G4VisExtent.hh"
///////////////////////////////////////////////////////////////////
//
@@ -208,6 +217,14 @@ G4UnionSolid::DistanceToOut( const G4ThreeVector& p,
if( Inside(p) == kOutside )
{
G4cout << "Position:" << G4endl << G4endl;
G4cout << "p.x() = " << p.x()/mm << " mm" << G4endl;
G4cout << "p.y() = " << p.y()/mm << " mm" << G4endl;
G4cout << "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl;
G4cout << "Direction:" << G4endl << G4endl;
G4cout << "v.x() = " << v.x() << G4endl;
G4cout << "v.y() = " << v.y() << G4endl;
G4cout << "v.z() = " << v.z() << G4endl << G4endl;
G4Exception("Invalid call in G4IntersectionSolid::DistanceToOut(p,v), point p is outside") ;
}
else
@@ -256,7 +273,9 @@ G4UnionSolid::DistanceToOut( const G4ThreeVector& p,
*n = *nTmp ;
}
}
*validNorm = false ;
if( calcNorm )
*validNorm = false ;
return dist ;
}
@@ -321,17 +340,7 @@ G4UnionSolid::ComputeDimensions( G4VPVParameterisation* p,
void
G4UnionSolid::DescribeYourselfTo ( G4VGraphicsScene& scene ) const
{
return ;
}
/////////////////////////////////////////////////////////////
//
//
G4VisExtent
G4UnionSolid::GetExtent () const
{
return G4VisExtent(-1.0,1.0,-1.0,1.0,-1.0,1.0) ;
scene.AddThis (*this);
}
////////////////////////////////////////////////////
@@ -341,7 +350,12 @@ G4UnionSolid::GetExtent () const
G4Polyhedron*
G4UnionSolid::CreatePolyhedron () const
{
return new G4PolyhedronBox (1.0, 1.0, 1.0);
G4Polyhedron* pA = fPtrSolidA->CreatePolyhedron();
G4Polyhedron* pB = fPtrSolidB->CreatePolyhedron();
G4Polyhedron* resultant = new G4Polyhedron (pA->add(*pB));
delete pB;
delete pA;
return resultant;
}
/////////////////////////////////////////////////////////
@@ -351,10 +365,7 @@ G4UnionSolid::CreatePolyhedron () const
G4NURBS*
G4UnionSolid::CreateNURBS () const
{
return new G4NURBSbox (1.0, 1.0, 1.0);
// Take into account boolean operation - see CreatePolyhedron.
// return new G4NURBSbox (1.0, 1.0, 1.0);
return 0;
}