Import Geant4 9.6.0 source tree
This commit is contained in:
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Box.hh,v 1.20 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Box.icc,v 1.6 2006-10-19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CSGSolid.hh,v 1.14 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -71,9 +70,14 @@ class G4CSGSolid : public G4VSolid
|
||||
|
||||
protected:
|
||||
|
||||
G4double fCubicVolume;
|
||||
G4double fSurfaceArea;
|
||||
mutable G4Polyhedron* fpPolyhedron;
|
||||
G4double GetRadiusInRing(G4double rmin, G4double rmax) const;
|
||||
// Utility function for subclasses to generate proper circular areas
|
||||
|
||||
protected:
|
||||
|
||||
G4double fCubicVolume;
|
||||
G4double fSurfaceArea;
|
||||
mutable G4Polyhedron* fpPolyhedron;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Cons.hh,v 1.24 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -68,6 +67,8 @@
|
||||
#ifndef G4Cons_HH
|
||||
#define G4Cons_HH
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
|
||||
#include "G4CSGSolid.hh"
|
||||
|
||||
class G4Cons : public G4CSGSolid
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Cons.icc,v 1.11 2009-06-09 16:08:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -108,24 +107,24 @@ inline void G4Cons::CheckSPhiAngle(G4double sPhi)
|
||||
|
||||
if ( sPhi < 0 )
|
||||
{
|
||||
fSPhi = twopi - std::fmod(std::fabs(sPhi),twopi);
|
||||
fSPhi = CLHEP::twopi - std::fmod(std::fabs(sPhi),CLHEP::twopi);
|
||||
}
|
||||
else
|
||||
{
|
||||
fSPhi = std::fmod(sPhi,twopi) ;
|
||||
fSPhi = std::fmod(sPhi,CLHEP::twopi) ;
|
||||
}
|
||||
if ( fSPhi+fDPhi > twopi )
|
||||
if ( fSPhi+fDPhi > CLHEP::twopi )
|
||||
{
|
||||
fSPhi -= twopi ;
|
||||
fSPhi -= CLHEP::twopi ;
|
||||
}
|
||||
}
|
||||
|
||||
inline void G4Cons::CheckDPhiAngle(G4double dPhi)
|
||||
{
|
||||
fPhiFullCone = true;
|
||||
if ( dPhi >= twopi-kAngTolerance*0.5 )
|
||||
if ( dPhi >= CLHEP::twopi-kAngTolerance*0.5 )
|
||||
{
|
||||
fDPhi=twopi;
|
||||
fDPhi=CLHEP::twopi;
|
||||
fSPhi=0;
|
||||
}
|
||||
else
|
||||
@@ -150,7 +149,7 @@ inline void G4Cons::CheckDPhiAngle(G4double dPhi)
|
||||
inline void G4Cons::CheckPhiAngles(G4double sPhi, G4double dPhi)
|
||||
{
|
||||
CheckDPhiAngle(dPhi);
|
||||
if ( (fDPhi<twopi) && (sPhi) ) { CheckSPhiAngle(sPhi); }
|
||||
if ( (fDPhi<CLHEP::twopi) && (sPhi) ) { CheckSPhiAngle(sPhi); }
|
||||
InitializeTrigonometry();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Orb.hh,v 1.13 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -45,6 +44,8 @@
|
||||
#ifndef G4Orb_HH
|
||||
#define G4Orb_HH
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
|
||||
#include "G4CSGSolid.hh"
|
||||
|
||||
class G4Orb : public G4CSGSolid
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Orb.icc,v 1.5 2006-10-19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -54,7 +53,7 @@ inline
|
||||
G4double G4Orb::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) {;}
|
||||
else { fCubicVolume = 4*pi*fRmax*fRmax*fRmax/3.; }
|
||||
else { fCubicVolume = 4*CLHEP::pi*fRmax*fRmax*fRmax/3.; }
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -62,6 +61,6 @@ inline
|
||||
G4double G4Orb::GetSurfaceArea()
|
||||
{
|
||||
if(fSurfaceArea != 0.) {;}
|
||||
else { fSurfaceArea = 4*pi*fRmax*fRmax; }
|
||||
else { fSurfaceArea = 4*CLHEP::pi*fRmax*fRmax; }
|
||||
return fSurfaceArea;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Para.hh,v 1.20 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Para.icc,v 1.7 2006-10-19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Sphere.hh,v 1.27 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -70,6 +69,7 @@
|
||||
#ifndef G4Sphere_HH
|
||||
#define G4Sphere_HH
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
#include "G4CSGSolid.hh"
|
||||
|
||||
class G4VisExtent;
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Sphere.icc,v 1.11 2009-05-13 11:23:00 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -120,7 +119,7 @@ void G4Sphere::InitializeThetaTrigonometry()
|
||||
inline
|
||||
void G4Sphere::CheckThetaAngles(G4double sTheta, G4double dTheta)
|
||||
{
|
||||
if ( (sTheta<0) || (sTheta>pi) )
|
||||
if ( (sTheta<0) || (sTheta>CLHEP::pi) )
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "sTheta outside 0-PI range." << G4endl
|
||||
@@ -132,9 +131,9 @@ void G4Sphere::CheckThetaAngles(G4double sTheta, G4double dTheta)
|
||||
{
|
||||
fSTheta=sTheta;
|
||||
}
|
||||
if ( dTheta+sTheta >= pi )
|
||||
if ( dTheta+sTheta >= CLHEP::pi )
|
||||
{
|
||||
fDTheta=pi-sTheta;
|
||||
fDTheta=CLHEP::pi-sTheta;
|
||||
}
|
||||
else if ( dTheta > 0 )
|
||||
{
|
||||
@@ -149,8 +148,8 @@ void G4Sphere::CheckThetaAngles(G4double sTheta, G4double dTheta)
|
||||
G4Exception("G4Sphere::CheckThetaAngles()", "GeomSolids0002",
|
||||
FatalException, message);
|
||||
}
|
||||
if ( fDTheta-fSTheta < pi ) { fFullThetaSphere = false; }
|
||||
else { fFullThetaSphere = true ; }
|
||||
if ( fDTheta-fSTheta < CLHEP::pi ) { fFullThetaSphere = false; }
|
||||
else { fFullThetaSphere = true ; }
|
||||
fFullSphere = fFullPhiSphere && fFullThetaSphere;
|
||||
|
||||
InitializeThetaTrigonometry();
|
||||
@@ -163,15 +162,15 @@ void G4Sphere::CheckSPhiAngle(G4double sPhi)
|
||||
|
||||
if ( sPhi < 0 )
|
||||
{
|
||||
fSPhi = twopi - std::fmod(std::fabs(sPhi),twopi);
|
||||
fSPhi = CLHEP::twopi - std::fmod(std::fabs(sPhi),CLHEP::twopi);
|
||||
}
|
||||
else
|
||||
{
|
||||
fSPhi = std::fmod(sPhi,twopi) ;
|
||||
fSPhi = std::fmod(sPhi,CLHEP::twopi) ;
|
||||
}
|
||||
if ( fSPhi+fDPhi > twopi )
|
||||
if ( fSPhi+fDPhi > CLHEP::twopi )
|
||||
{
|
||||
fSPhi -= twopi ;
|
||||
fSPhi -= CLHEP::twopi ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,9 +178,9 @@ inline
|
||||
void G4Sphere::CheckDPhiAngle(G4double dPhi)
|
||||
{
|
||||
fFullPhiSphere = true;
|
||||
if ( dPhi >= twopi-kAngTolerance*0.5 )
|
||||
if ( dPhi >= CLHEP::twopi-kAngTolerance*0.5 )
|
||||
{
|
||||
fDPhi=twopi;
|
||||
fDPhi=CLHEP::twopi;
|
||||
fSPhi=0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Torus.hh,v 1.30 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -96,6 +95,8 @@
|
||||
#ifndef G4Torus_HH
|
||||
#define G4Torus_HH
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
|
||||
#include "G4CSGSolid.hh"
|
||||
|
||||
class G4Torus : public G4CSGSolid
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Torus.icc,v 1.6 2006-10-19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -69,7 +68,7 @@ inline
|
||||
G4double G4Torus::GetCubicVolume()
|
||||
{
|
||||
if(fCubicVolume != 0.) {;}
|
||||
else { fCubicVolume = fDPhi*pi*fRtor*(fRmax*fRmax-fRmin*fRmin); }
|
||||
else { fCubicVolume = fDPhi*CLHEP::pi*fRtor*(fRmax*fRmax-fRmin*fRmin); }
|
||||
return fCubicVolume;
|
||||
}
|
||||
|
||||
@@ -79,10 +78,10 @@ G4double G4Torus::GetSurfaceArea()
|
||||
if(fSurfaceArea != 0.) {;}
|
||||
else
|
||||
{
|
||||
fSurfaceArea = fDPhi*2*pi*fRtor*(fRmax+fRmin);
|
||||
if(fDPhi < twopi)
|
||||
fSurfaceArea = fDPhi*CLHEP::twopi*fRtor*(fRmax+fRmin);
|
||||
if(fDPhi < CLHEP::twopi)
|
||||
{
|
||||
fSurfaceArea = fSurfaceArea + twopi*(fRmax*fRmax-fRmin*fRmin);
|
||||
fSurfaceArea = fSurfaceArea + CLHEP::twopi*(fRmax*fRmax-fRmin*fRmin);
|
||||
}
|
||||
}
|
||||
return fSurfaceArea;
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trap.hh,v 1.19 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trap.icc,v 1.8 2006-10-19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trd.hh,v 1.19 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trd.icc,v 1.7 2006-10-19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.hh,v 1.24 2010-10-19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -70,6 +69,8 @@
|
||||
#ifndef G4TUBS_HH
|
||||
#define G4TUBS_HH
|
||||
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
|
||||
#include "G4CSGSolid.hh"
|
||||
|
||||
class G4Tubs : public G4CSGSolid
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.icc,v 1.18 2010-09-22 08:31:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id$
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -96,24 +95,24 @@ inline void G4Tubs::CheckSPhiAngle(G4double sPhi)
|
||||
|
||||
if ( sPhi < 0 )
|
||||
{
|
||||
fSPhi = twopi - std::fmod(std::fabs(sPhi),twopi);
|
||||
fSPhi = CLHEP::twopi - std::fmod(std::fabs(sPhi),CLHEP::twopi);
|
||||
}
|
||||
else
|
||||
{
|
||||
fSPhi = std::fmod(sPhi,twopi) ;
|
||||
fSPhi = std::fmod(sPhi,CLHEP::twopi) ;
|
||||
}
|
||||
if ( fSPhi+fDPhi > twopi )
|
||||
if ( fSPhi+fDPhi > CLHEP::twopi )
|
||||
{
|
||||
fSPhi -= twopi ;
|
||||
fSPhi -= CLHEP::twopi ;
|
||||
}
|
||||
}
|
||||
|
||||
inline void G4Tubs::CheckDPhiAngle(G4double dPhi)
|
||||
{
|
||||
fPhiFullTube = true;
|
||||
if ( dPhi >= twopi-kAngTolerance*0.5 )
|
||||
if ( dPhi >= CLHEP::twopi-kAngTolerance*0.5 )
|
||||
{
|
||||
fDPhi=twopi;
|
||||
fDPhi=CLHEP::twopi;
|
||||
fSPhi=0;
|
||||
}
|
||||
else
|
||||
@@ -138,7 +137,7 @@ inline void G4Tubs::CheckDPhiAngle(G4double dPhi)
|
||||
inline void G4Tubs::CheckPhiAngles(G4double sPhi, G4double dPhi)
|
||||
{
|
||||
CheckDPhiAngle(dPhi);
|
||||
if ( (fDPhi<twopi) && (sPhi) ) { CheckSPhiAngle(sPhi); }
|
||||
if ( (fDPhi<CLHEP::twopi) && (sPhi) ) { CheckSPhiAngle(sPhi); }
|
||||
InitializeTrigonometry();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user