Import Geant4 8.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-09 14:36:02 +02:00
parent d93e1e39a9
commit 8a51e0bc40
5471 changed files with 99628 additions and 55248 deletions
+9 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Box.hh,v 1.14 2005/06/08 16:14:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Box.hh,v 1.15 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 class header file
@@ -113,6 +113,13 @@ class G4Box : public G4CSGSolid
G4Polyhedron* CreatePolyhedron () const;
G4NURBS* CreateNURBS () const;
public: // without description
G4Box(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
protected: // with description
G4ThreeVectorList*
+4 -6
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Box.icc,v 1.2 2004/09/08 15:13:51 grichine Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Box.icc,v 1.4 2005/08/04 10:57:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
@@ -50,12 +50,10 @@ G4double G4Box::GetZHalfLength() const
return fDz;
}
///////////////////////////////////////////////////
inline
G4double G4Box::GetCubicVolume()
{
if(fCubicVolume != 0.) ;
else fCubicVolume = 8*fDx*fDy*fDz;
if(fCubicVolume != 0.) {;}
else { fCubicVolume = 8*fDx*fDy*fDz; }
return fCubicVolume;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4CSGSolid.hh,v 1.9 2004/10/10 10:44:14 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4CSGSolid.hh,v 1.10 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -55,6 +55,13 @@ class G4CSGSolid : public G4VSolid
virtual G4Polyhedron* GetPolyhedron () const;
public: // without description
G4CSGSolid(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
protected:
G4double fCubicVolume;
+10 -3
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Cons.hh,v 1.13 2005/06/08 16:14:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Cons.hh,v 1.15 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -127,7 +127,9 @@ class G4Cons : public G4CSGSolid
G4double DistanceToOut(const G4ThreeVector& p) const;
G4GeometryType GetEntityType() const;
G4ThreeVector GetPointOnSurface() const;
std::ostream& StreamInfo(std::ostream& os) const;
// Visualisation functions
@@ -138,6 +140,11 @@ class G4Cons : public G4CSGSolid
public: // without description
G4Cons(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
// Old access functions
inline G4double GetRmin1() const;
@@ -22,7 +22,7 @@
//
//
// $Id: G4Cons.icc,v 1.4 2004/10/10 10:44:15 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
+11 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Orb.hh,v 1.6 2004/09/22 08:25:02 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Orb.hh,v 1.9 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -91,6 +91,8 @@ class G4Orb : public G4CSGSolid
G4GeometryType GetEntityType() const;
G4ThreeVector GetPointOnSurface() const;
std::ostream& StreamInfo(std::ostream& os) const;
// Visualisation functions
@@ -99,6 +101,13 @@ class G4Orb : public G4CSGSolid
G4Polyhedron* CreatePolyhedron() const;
G4NURBS* CreateNURBS() const;
public: // without description
G4Orb(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
protected:
// Used by distanceToOut
+4 -6
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Orb.icc,v 1.2 2004/10/10 10:44:16 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Orb.icc,v 1.3 2005/08/04 10:57:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
@@ -46,12 +46,10 @@ void G4Orb::SetRadius(G4double newRmax)
fpPolyhedron = 0;
}
///////////////////////////////////////////////////
inline
G4double G4Orb::GetCubicVolume()
{
if(fCubicVolume != 0.) ;
else fCubicVolume = 4*pi*fRmax*fRmax*fRmax/3.;
if(fCubicVolume != 0.) {;}
else { fCubicVolume = 4*pi*fRmax*fRmax*fRmax/3.; }
return fCubicVolume;
}
+14 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Para.hh,v 1.13 2005/06/08 16:14:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Para.hh,v 1.16 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -141,6 +141,13 @@ class G4Para : public G4CSGSolid
G4Polyhedron* CreatePolyhedron () const;
G4NURBS* CreateNURBS () const;
public: // without description
G4Para(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
protected: // without description
G4ThreeVectorList*
@@ -152,6 +159,11 @@ class G4Para : public G4CSGSolid
// Algorithm for SurfaceNormal() following the original
// specification for points not on the surface
G4ThreeVector GetPointOnPlane(G4ThreeVector p0, G4ThreeVector p1,
G4ThreeVector p2, G4ThreeVector p3,
G4double& area) const;
// Returns a random point on the surface of one of the faces.
private:
G4double fDx,fDy,fDz;
@@ -22,7 +22,7 @@
//
//
// $Id: G4Para.icc,v 1.5 2004/12/02 09:31:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
+11 -4
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Sphere.hh,v 1.14 2005/06/08 16:14:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Sphere.hh,v 1.17 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -33,7 +33,7 @@
// Class description:
//
// A G4Sphere is, in the general case, section of a spherical shell,
// between specified phii and theta angles
// between specified phi and theta angles
//
// The phi and theta segments are described by a starting angle,
// and the +ve delta angle for the shape.
@@ -131,6 +131,8 @@ class G4Sphere : public G4CSGSolid
G4GeometryType GetEntityType() const;
G4ThreeVector GetPointOnSurface() const;
std::ostream& StreamInfo(std::ostream& os) const;
// Visualisation functions
@@ -138,9 +140,14 @@ class G4Sphere : public G4CSGSolid
void DescribeYourselfTo(G4VGraphicsScene& scene) const;
G4Polyhedron* CreatePolyhedron() const;
G4NURBS* CreateNURBS() const;
public: // without description
G4Sphere(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
// Old access functions
inline G4double GetRmin() const;
@@ -22,7 +22,7 @@
//
//
// $Id: G4Sphere.icc,v 1.5 2004/12/02 09:31:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
+15 -76
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Torus.hh,v 1.19 2005/06/08 16:14:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Torus.hh,v 1.24 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -138,6 +138,8 @@ class G4Torus : public G4CSGSolid
G4GeometryType GetEntityType() const;
G4ThreeVector GetPointOnSurface() const;
std::ostream& StreamInfo(std::ostream& os) const;
// Visualisation functions
@@ -151,25 +153,21 @@ class G4Torus : public G4CSGSolid
void SetAllParameters(G4double pRmin, G4double pRmax, G4double pRtor,
G4double pSPhi, G4double pDPhi);
G4int TorusRoots( G4double Ri,
const G4ThreeVector& p,
const G4ThreeVector& v) const ;
G4Torus(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
protected:
G4int SolveBiQuadratic(G4double c[], G4double s[] ) const ;
G4int SolveCubic(G4double c[], G4double s[] ) const ;
std::vector<G4double> TorusRootsJT(const G4ThreeVector& p,
const G4ThreeVector& v,
G4double r) const ;
G4int SolveBiQuadraticNew(G4double c[], G4double s[] ) const ;
G4int SolveCubicNew(G4double c[], G4double s[], G4double& cd ) const ;
G4int SolveQuadratic(G4double c[], G4double s[] ) const ;
G4double SolveNumeric(const G4ThreeVector& p,
const G4ThreeVector& v,
G4bool IsDistanceToIn) const;
G4double SolveNumericJT(G4double c[]) const;
G4double SolveNumericJT(const G4ThreeVector& p,
const G4ThreeVector& v,
G4double r,
G4bool IsDistanceToIn) const;
G4ThreeVectorList*
CreateRotatedVertices(const G4AffineTransform& pTransform,
@@ -191,66 +189,7 @@ class G4Torus : public G4CSGSolid
// Algorithm for SurfaceNormal() following the original
// specification for points not on the surface
inline G4double TorusEquation (G4double x, G4double y, G4double z,
G4double R0, G4double R1) const;
inline G4double TorusDerivativeX (G4double x, G4double y, G4double z,
G4double R0, G4double R1) const;
inline G4double TorusDerivativeY (G4double x, G4double y, G4double z,
G4double R0, G4double R1) const;
inline G4double TorusDerivativeZ (G4double x, G4double y, G4double z,
G4double R0, G4double R1) const;
inline G4double TorusGradient(G4double dx, G4double dy, G4double dz,
G4double x, G4double y, G4double z,
G4double Rmax, G4double Rmin) const;
void BVMIntersection (G4double x, G4double y, G4double z,
G4double dx, G4double dy, G4double dz,
G4double Rmax, G4double Rmin,
G4double *NewL, G4int *valid) const;
void SortIntervals (G4double *SortL, G4double *NewL,
G4int *valid, G4int *NbIntersection) const;
G4double DistanceToTorus (G4double x, G4double y, G4double z,
G4double dx, G4double dy, G4double dz,
G4double R0,G4double R1) const;
};
class G4TorusEquation
{
public:
G4TorusEquation();
G4TorusEquation(G4double Rmax, G4double Rmin);
~G4TorusEquation();
inline void setRadius (G4double Rmax, G4double Rmin);
inline void setPosition (G4double x,G4double y,G4double z);
inline void setPosition (const G4ThreeVector& p);
inline void setDirection (G4double dirx,G4double diry,G4double dirz);
inline void setDirection (const G4ThreeVector& v);
public:
inline G4double Function (G4double value);
inline G4double Derivative(G4double value);
private:
inline G4double TorusEquation (G4double x, G4double y, G4double z);
inline G4double TorusDerivativeX (G4double x, G4double y, G4double z);
inline G4double TorusDerivativeY (G4double x, G4double y, G4double z);
inline G4double TorusDerivativeZ (G4double x, G4double y, G4double z);
private:
G4double R0;
G4double R1;
G4double Px,Py,Pz;
G4double dx,dy,dz;
};
#include "G4Torus.icc"
+4 -177
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Torus.icc,v 1.2 2004/09/08 15:13:51 grichine Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Torus.icc,v 1.4 2005/09/05 16:08:43 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
@@ -62,183 +62,10 @@ G4double G4Torus::GetDPhi() const
return fDPhi ;
}
// Utility functions
inline
G4double G4Torus::TorusEquation (G4double x, G4double y, G4double z,
G4double R0, G4double R1) const
{
// R0 : Radius of all little circles
// R1 : Radius of little circles
// An interesting property is that the sign
// tell if the point is inside or outside
// or if > EPSILON on the surface
G4double temp;
temp = ((x*x + y*y + z*z) + R0*R0 - R1*R1) ;
temp = temp*temp ;
temp = temp - 4*R0*R0*(x*x + y*y) ;
// > 0 Outside
// < 0 Inside
return temp ;
}
inline
G4double G4Torus::TorusDerivativeX (G4double x, G4double y, G4double z,
G4double R0, G4double R1) const
{
return 4*x*(x*x + y*y + z*z + R0*R0 - R1*R1) - 8*R0*R0*x ;
}
inline
G4double G4Torus::TorusDerivativeY (G4double x, G4double y, G4double z,
G4double R0, G4double R1) const
{
return 4*y*(x*x + y*y + z*z + R0*R0 - R1*R1) - 8*R0*R0*y ;
}
inline
G4double G4Torus::TorusDerivativeZ (G4double x, G4double y, G4double z,
G4double R0, G4double R1) const
{
return 4*z*(x*x + y*y + z*z + R0*R0 - R1*R1) ;
}
inline
G4double G4Torus::TorusGradient(G4double dx, G4double dy, G4double dz,
G4double x, G4double y, G4double z,
G4double Rmax, G4double Rmin) const
{
// This tells the normal at a surface point
G4double result;
result = 0;
result += dx*TorusDerivativeX(x,y,z,Rmax,Rmin);
result += dy*TorusDerivativeY(x,y,z,Rmax,Rmin);
result += dz*TorusDerivativeZ(x,y,z,Rmax,Rmin);
return result;
}
// ----------- G4TorusEquation methods ---------------
inline
void G4TorusEquation::setRadius (G4double Rmax, G4double Rmin)
{
R0 = Rmax;
R1 = Rmin;
}
inline
void G4TorusEquation::setPosition (G4double x,G4double y,G4double z)
{
Px = x;
Py = y;
Pz = z;
}
inline
void G4TorusEquation::setPosition (const G4ThreeVector& p)
{
Px = p.x();
Py = p.y();
Pz = p.z();
}
inline
void G4TorusEquation::setDirection (G4double dirx,G4double diry,G4double dirz)
{
dx = dirx;
dy = diry;
dz = dirz;
}
inline
void G4TorusEquation::setDirection (const G4ThreeVector& v)
{
dx = v.x();
dy = v.y();
dz = v.z();
}
inline
G4double G4TorusEquation::TorusEquation (G4double x, G4double y, G4double z)
{
// An interesting property is that the sign
// tells if the point is inside or outside
// or if > EPSILON on the surface
G4double temp;
temp = ((x*x + y*y + z*z) + R0*R0 - R1*R1) ;
temp = temp*temp ;
temp = temp - 4*R0*R0*(x*x + y*y) ;
// > 0 Outside
// < 0 Inside
return temp ;
}
inline
G4double G4TorusEquation::TorusDerivativeX (G4double x, G4double y, G4double z)
{
return 4*x*(x*x + y*y + z*z + R0*R0 - R1*R1) - 8*R0*R0*x ;
}
inline
G4double G4TorusEquation::TorusDerivativeY (G4double x, G4double y, G4double z)
{
return 4*y*(x*x + y*y + z*z + R0*R0 - R1*R1) - 8*R0*R0*y ;
}
inline
G4double G4TorusEquation::TorusDerivativeZ (G4double x, G4double y, G4double z)
{
return 4*z*(x*x + y*y + z*z + R0*R0 - R1*R1) ;
}
inline
G4double G4TorusEquation::Function (G4double value)
{
G4double Lx,Ly,Lz;
G4double result;
Lx = Px + value*dx;
Ly = Py + value*dy;
Lz = Pz + value*dz;
result = TorusEquation(Lx,Ly,Lz);
return result ;
}
inline
G4double G4TorusEquation::Derivative(G4double value)
{
G4double Lx,Ly,Lz;
G4double result;
Lx = Px + value*dx;
Ly = Py + value*dy;
Lz = Pz + value*dz;
result = dx*TorusDerivativeX(Lx,Ly,Lz);
result += dy*TorusDerivativeY(Lx,Ly,Lz);
result += dz*TorusDerivativeZ(Lx,Ly,Lz);
return result;
}
///////////////////////////////////////////////////
inline
G4double G4Torus::GetCubicVolume()
{
if(fCubicVolume != 0.) ;
else fCubicVolume = fDPhi*pi*fRtor*(fRmax*fRmax-fRmin*fRmin);
if(fCubicVolume != 0.) {;}
else { fCubicVolume = fDPhi*pi*fRtor*(fRmax*fRmax-fRmin*fRmin); }
return fCubicVolume;
}
+33 -10
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Trap.hh,v 1.12 2005/06/08 16:14:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Trap.hh,v 1.15 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -46,7 +46,7 @@
// at -/+pDz
// pPhi Azimuthal angle of the line joing the centre of the face at
// -pDz to the centre of the face at +pDz
// pDy1 Half-length along y of the face at -pDz
// pDy1 Half-length along y of the face at -pDz
// pDx1 Half-length along x of the side at y=-pDy1 of the face at -pDz
// pDx2 Half-length along x of the side at y=+pDy1 of the face at -pDz
// pAlp1 Angle with respect to the y axis from the centre of the side
@@ -62,8 +62,9 @@
// Member Data:
//
// fDz Half-length along the z axis
// fTthetaCphi = std::tan(pTheta)*std::cos(pPhi) These combinations are suitable for
// fTthetaSphi = std::tan(pTheta)*std::sin(pPhi) creation of the trapezoid corners
// fTthetaCphi = std::tan(pTheta)*std::cos(pPhi)
// fTthetaSphi = std::tan(pTheta)*std::sin(pPhi)
// These combinations are suitable for creation of the trapezoid corners
//
// fDy1 Half-length along y of the face at -fDz
// fDx1 Half-length along x of the side at y=-fDy1 of the face at -fDz
@@ -162,15 +163,14 @@ class G4Trap : public G4CSGSolid
inline G4double GetXHalfLength3() const;
inline G4double GetXHalfLength4() const;
inline G4double GetTanAlpha2() const;
inline TrapSidePlane GetSidePlane( G4int n ) const;
inline G4ThreeVector GetSymAxis() const;
inline G4double GetCubicVolume();
//
// Returns coordinates of unit vector along straight
// line joining centers of -/+fDz planes
inline TrapSidePlane GetSidePlane( G4int n ) const;
inline G4ThreeVector GetSymAxis() const;
inline G4double GetCubicVolume();
// Modifiers
void SetAllParameters ( G4double pDz,
@@ -212,6 +212,8 @@ class G4Trap : public G4CSGSolid
G4GeometryType GetEntityType() const;
G4ThreeVector GetPointOnSurface() const;
std::ostream& StreamInfo( std::ostream& os ) const;
// Visualisation functions
@@ -220,6 +222,13 @@ class G4Trap : public G4CSGSolid
G4Polyhedron* CreatePolyhedron () const;
G4NURBS* CreateNURBS () const;
public: // without description
G4Trap(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
protected: // with description
G4bool MakePlanes();
@@ -241,6 +250,20 @@ class G4Trap : public G4CSGSolid
// Algorithm for SurfaceNormal() following the original
// specification for points not on the surface
inline G4double GetFaceArea(const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3,
const G4ThreeVector& p4);
//
// Provided four corners of plane in clockwise fashion,
// it returns the area of finite face
G4ThreeVector GetPointOnPlane(G4ThreeVector p0, G4ThreeVector p1,
G4ThreeVector p2, G4ThreeVector p3,
G4double& area) const;
//
// Returns a random point on the surface of one of the faces
private:
G4double fDz,fTthetaCphi,fTthetaSphi;
+12 -9
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Trap.icc,v 1.4 2004/12/02 09:31:28 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Trap.icc,v 1.6 2005/08/04 10:57:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
@@ -103,16 +103,19 @@ TrapSidePlane G4Trap::GetSidePlane( G4int n ) const
return fPlanes[n] ;
}
///////////////////////////////////////////////////
//
// Return the volume as a bit modified Trd
inline
G4double G4Trap::GetFaceArea(const G4ThreeVector& p0, const G4ThreeVector& p1,
const G4ThreeVector& p2, const G4ThreeVector& p3)
{
G4double area = 0.5*((p1-p0).cross(p2-p1).mag()+(p3-p2).cross(p0-p3).mag());
return area;
}
inline
G4double G4Trap::GetCubicVolume()
{
if(fCubicVolume != 0.) ;
else fCubicVolume = fDz*( (fDx1+fDx2+fDx3+fDx4)*(fDy1+fDy2)
+ (fDx4+fDx3-fDx2-fDx1)*(fDy2-fDy1)/3 );
if(fCubicVolume != 0.) {;}
else { fCubicVolume = fDz*( (fDx1+fDx2+fDx3+fDx4)*(fDy1+fDy2)
+ (fDx4+fDx3-fDx2-fDx1)*(fDy2-fDy1)/3 ); }
return fCubicVolume;
}
+7 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Trd.hh,v 1.13 2005/06/08 16:14:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Trd.hh,v 1.14 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -137,7 +137,12 @@ class G4Trd : public G4CSGSolid
G4Polyhedron* CreatePolyhedron () const;
G4NURBS* CreateNURBS () const;
public: // without description
G4Trd(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
protected: // without description
+5 -6
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Trd.icc,v 1.4 2004/10/10 10:44:19 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Trd.icc,v 1.5 2005/08/04 10:57:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
@@ -102,12 +102,11 @@ void G4Trd::SetZHalfLength(G4double val)
fpPolyhedron = 0;
}
///////////////////////////////////////////////////
inline
G4double G4Trd::GetCubicVolume()
{
if(fCubicVolume != 0.) ;
else fCubicVolume = 2*fDz*( (fDx1+fDx2)*(fDy1+fDy2) + (fDx2-fDx1)*(fDy2-fDy1)/3 );
if(fCubicVolume != 0.) {;}
else { fCubicVolume = 2*fDz*( (fDx1+fDx2)*(fDy1+fDy2)
+ (fDx2-fDx1)*(fDy2-fDy1)/3 ); }
return fCubicVolume;
}
+9 -2
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Tubs.hh,v 1.11 2005/06/08 16:14:25 gcosmo Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Tubs.hh,v 1.14 2005/11/09 15:03:09 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
//
// --------------------------------------------------------------------
@@ -126,6 +126,8 @@ class G4Tubs : public G4CSGSolid
G4GeometryType GetEntityType() const;
G4ThreeVector GetPointOnSurface() const;
std::ostream& StreamInfo( std::ostream& os ) const;
// Visualisation functions
@@ -136,6 +138,11 @@ class G4Tubs : public G4CSGSolid
public: // without description
G4Tubs(__void__&);
// Fake default constructor for usage restricted to direct object
// persistency for clients requiring preallocation of memory for
// persistifiable objects.
// Older names for access functions
inline G4double GetRMin() const;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Tubs.icc,v 1.4 2004/10/10 10:44:19 johna Exp $
// GEANT4 tag $Name: geant4-07-01 $
// $Id: G4Tubs.icc,v 1.5 2005/08/04 10:57:55 gcosmo Exp $
// GEANT4 tag $Name: geant4-08-00 $
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
@@ -134,12 +134,10 @@ G4double G4Tubs::GetDPhi () const
return GetDeltaPhiAngle();
}
///////////////////////////////////////////////////
inline
G4double G4Tubs::GetCubicVolume()
{
if(fCubicVolume != 0.) ;
else fCubicVolume = fDPhi*fDz*(fRMax*fRMax-fRMin*fRMin);
if(fCubicVolume != 0.) {;}
else { fCubicVolume = fDPhi*fDz*(fRMax*fRMax-fRMin*fRMin); }
return fCubicVolume;
}