Import Geant4 5.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History,v 1.52 2002/10/28 11:43:37 gcosmo Exp $
|
||||
$Id: History,v 1.53 2003/02/14 09:50:02 gcosmo Exp $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,6 +17,11 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
Feb 03, 2003 G.Cosmo geom-csg-V05-00-00
|
||||
- G4Cons.cc: enhanced treatment of phi-sections,
|
||||
according to algorithm used also in G4Tubs (V.Grichine).
|
||||
- Updated unit tests.
|
||||
|
||||
Oct 28, 2002 G.Cosmo geom-csg-V04-01-01
|
||||
- Added implementation of StreamInfo() to comply with new interface for
|
||||
G4VSolid in "geommng-V04-01-03".
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Box.hh,v 1.8 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Box.icc,v 1.1 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CSGSolid.hh,v 1.6 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Cons.hh,v 1.7 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Cons.icc,v 1.1 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Para.hh,v 1.8 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Para.icc,v 1.1 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Sphere.hh,v 1.7 2002/10/28 11:43:03 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Sphere.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Torus.hh,v 1.14 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Torus.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Trap.hh,v 1.7 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Trap.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Trd.hh,v 1.8 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Trd.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.hh,v 1.7 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.icc,v 1.1 2002/10/28 11:43:04 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Box.cc,v 1.19 2002/10/28 15:18:16 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4CSGSolid.cc,v 1.4 2002/10/28 11:43:05 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
#include "G4CSGSolid.hh"
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Cons.cc,v 1.23 2002/10/28 15:18:16 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// $Id: G4Cons.cc,v 1.24 2003/02/03 14:22:01 grichine Exp $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// class G4Cons
|
||||
//
|
||||
@@ -192,34 +192,39 @@ EInside G4Cons::Inside(const G4ThreeVector& p) const
|
||||
|
||||
pPhi = atan2(p.y(),p.x()) ;
|
||||
|
||||
if (pPhi < 0 ) pPhi += 2*M_PI ; // 0<=pPhi<2pi
|
||||
if (fSPhi >= 0)
|
||||
if (pPhi < -kAngTolerance*0.5 ) pPhi += 2*M_PI ; // 0<=pPhi<2pi
|
||||
if ( fSPhi >= 0 )
|
||||
{
|
||||
if ( pPhi >= fSPhi + kAngTolerance*0.5 &&
|
||||
pPhi <= fSPhi + fDPhi - kAngTolerance*0.5 )
|
||||
if ( (abs(pPhi) < kAngTolerance*0.5)
|
||||
&& (abs(fSPhi + fDPhi - 2*M_PI) < kAngTolerance*0.5) )
|
||||
{
|
||||
pPhi += 2*M_PI ; // 0 <= pPhi < 2pi
|
||||
}
|
||||
if ( (pPhi >= fSPhi + kAngTolerance*0.5)
|
||||
&& (pPhi <= fSPhi + fDPhi - kAngTolerance*0.5) )
|
||||
{
|
||||
in = kInside ;
|
||||
}
|
||||
else if ( pPhi >= fSPhi - kAngTolerance*0.5 &&
|
||||
pPhi <= fSPhi + fDPhi + kAngTolerance*0.5 )
|
||||
else if ( (pPhi >= fSPhi - kAngTolerance*0.5)
|
||||
&& (pPhi <= fSPhi + fDPhi + kAngTolerance*0.5) )
|
||||
{
|
||||
in = kSurface ;
|
||||
}
|
||||
}
|
||||
else
|
||||
else // fSPhi < 0
|
||||
{
|
||||
if ( pPhi < fSPhi + 2*M_PI) pPhi += 2*M_PI ;
|
||||
if ( pPhi >= fSPhi + 2*M_PI + kAngTolerance*0.5 &&
|
||||
pPhi <= fSPhi + fDPhi + 2*M_PI - kAngTolerance*0.5 )
|
||||
{
|
||||
in = kInside ;
|
||||
}
|
||||
else if ( pPhi >= fSPhi + 2*M_PI - kAngTolerance*0.5 &&
|
||||
pPhi <= fSPhi + fDPhi + 2*M_PI + kAngTolerance*0.5 )
|
||||
if ( (pPhi <= fSPhi + 2*M_PI - kAngTolerance*0.5)
|
||||
&& (pPhi >= fSPhi + fDPhi + kAngTolerance*0.5) ) ;
|
||||
else if ( (pPhi <= fSPhi + 2*M_PI + kAngTolerance*0.5)
|
||||
&& (pPhi >= fSPhi + fDPhi - kAngTolerance*0.5) )
|
||||
{
|
||||
in = kSurface ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
in = kInside ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else // Try generous boundaries
|
||||
@@ -239,25 +244,31 @@ EInside G4Cons::Inside(const G4ThreeVector& p) const
|
||||
{
|
||||
pPhi = atan2(p.y(),p.x()) ;
|
||||
|
||||
if ( pPhi < 0 ) pPhi += 2*M_PI ; // 0<=pPhi<2pi
|
||||
if ( pPhi < -kAngTolerance*0.5 ) pPhi += 2*M_PI ; // 0<=pPhi<2pi
|
||||
if ( fSPhi >= 0 )
|
||||
{
|
||||
if ( pPhi >= fSPhi - kAngTolerance*0.5 &&
|
||||
pPhi <= fSPhi + fDPhi + kAngTolerance*0.5 )
|
||||
if ( (abs(pPhi) < kAngTolerance*0.5)
|
||||
&& (abs(fSPhi + fDPhi - 2*M_PI) < kAngTolerance*0.5) )
|
||||
{
|
||||
pPhi += 2*M_PI ; // 0 <= pPhi < 2pi
|
||||
}
|
||||
if ( (pPhi >= fSPhi - kAngTolerance*0.5)
|
||||
&& (pPhi <= fSPhi + fDPhi + kAngTolerance*0.5) )
|
||||
{
|
||||
in = kSurface ;
|
||||
}
|
||||
}
|
||||
else
|
||||
else // fSPhi < 0
|
||||
{
|
||||
if ( pPhi < fSPhi + 2*M_PI) pPhi += 2*M_PI ;
|
||||
if ( pPhi >= fSPhi + 2*M_PI - kAngTolerance*0.5 &&
|
||||
pPhi <= fSPhi + fDPhi + 2*M_PI + kAngTolerance*0.5 )
|
||||
if ( (pPhi <= fSPhi + 2*M_PI - kAngTolerance*0.5)
|
||||
&& (pPhi >= fSPhi + fDPhi + kAngTolerance*0.5) ) ;
|
||||
else
|
||||
{
|
||||
in = kSurface ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -289,25 +300,30 @@ EInside G4Cons::Inside(const G4ThreeVector& p) const
|
||||
else // Try outer tolerant phi boundaries
|
||||
{
|
||||
pPhi = atan2(p.y(),p.x()) ;
|
||||
|
||||
if ( pPhi < 0 ) pPhi += 2*M_PI ; // 0<=pPhi<2pi
|
||||
if ( pPhi < -kAngTolerance*0.5 ) pPhi += 2*M_PI ; // 0<=pPhi<2pi
|
||||
if ( fSPhi >= 0 )
|
||||
{
|
||||
if ( pPhi >= fSPhi - kAngTolerance*0.5 &&
|
||||
pPhi <= fSPhi + fDPhi + kAngTolerance*0.5 )
|
||||
if ( (abs(pPhi) < kAngTolerance*0.5)
|
||||
&& (abs(fSPhi + fDPhi - 2*M_PI) < kAngTolerance*0.5) )
|
||||
{
|
||||
pPhi += 2*M_PI ; // 0 <= pPhi < 2pi
|
||||
}
|
||||
if ( (pPhi >= fSPhi - kAngTolerance*0.5)
|
||||
&& (pPhi <= fSPhi + fDPhi + kAngTolerance*0.5) )
|
||||
{
|
||||
in = kSurface ;
|
||||
in = kSurface;
|
||||
}
|
||||
}
|
||||
else
|
||||
else // fSPhi < 0
|
||||
{
|
||||
if ( pPhi < fSPhi + 2*M_PI) pPhi += 2*M_PI ;
|
||||
if ( pPhi >= fSPhi + 2*M_PI - kAngTolerance*0.5 &&
|
||||
pPhi <= fSPhi + fDPhi + 2*M_PI + kAngTolerance*0.5 )
|
||||
if ( (pPhi <= fSPhi + 2*M_PI - kAngTolerance*0.5)
|
||||
&& (pPhi >= fSPhi + fDPhi + kAngTolerance*0.5) ) ;
|
||||
else
|
||||
{
|
||||
in = kSurface ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2020,10 +2036,14 @@ G4double G4Cons::DistanceToOut(const G4ThreeVector& p) const
|
||||
{
|
||||
G4cout.precision(16) ;
|
||||
G4cout << G4endl ;
|
||||
DumpInfo();
|
||||
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 << "pho at z = " << sqrt( p.x()*p.x()+p.y()*p.y() )/mm << " mm"
|
||||
<< G4endl << G4endl ;
|
||||
|
||||
G4cout << "G4Cons::DistanceToOut(p) - point p is outside ?!" << G4endl ;
|
||||
G4cerr << "G4Cons::DistanceToOut(p) - point p is outside ?!" << G4endl ;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Para.cc,v 1.13 2002/10/28 15:18:16 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// class G4Para
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Sphere.cc,v 1.18 2002/10/28 15:18:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// class G4Sphere
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Torus.cc,v 1.28 2002/10/28 15:18:17 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// class G4Torus
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Trap.cc,v 1.16 2002/10/28 15:18:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
// class G4Trap
|
||||
//
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Trd.cc,v 1.12 2002/10/28 15:18:18 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// Implementation for G4Trd class
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.cc,v 1.35 2002/10/28 15:18:19 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-05-00 $
|
||||
// GEANT4 tag $Name: geant4-05-01 $
|
||||
//
|
||||
//
|
||||
// class G4Tubs
|
||||
|
||||
Reference in New Issue
Block a user