Import Geant4 9.4.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Box.hh,v 1.17 2006/10/19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Box.hh,v 1.20 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 class header file
|
||||
@@ -98,9 +98,11 @@ class G4Box : public G4CSGSolid
|
||||
G4GeometryType GetEntityType() const;
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
|
||||
// Functions for visualization
|
||||
// Utilities for visualization
|
||||
|
||||
void DescribeYourselfTo (G4VGraphicsScene& scene) const;
|
||||
G4VisExtent GetExtent () const;
|
||||
@@ -114,6 +116,10 @@ class G4Box : public G4CSGSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4Box(const G4Box& rhs);
|
||||
G4Box& operator=(const G4Box& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
protected: // with description
|
||||
|
||||
G4ThreeVectorList*
|
||||
@@ -124,7 +130,7 @@ class G4Box : public G4CSGSolid
|
||||
protected: // without description
|
||||
|
||||
enum ESide {kUndefined,kPX,kMX,kPY,kMY,kPZ,kMZ};
|
||||
// Codes for faces (kPX=plus x face,kMY= minus y face etc)
|
||||
// Codes for faces (kPX= +x face, kMY= -y face, etc...)
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4CSGSolid.hh,v 1.12 2006/10/19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4CSGSolid.hh,v 1.14 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -65,6 +65,10 @@ class G4CSGSolid : public G4VSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4CSGSolid(const G4CSGSolid& rhs);
|
||||
G4CSGSolid& operator=(const G4CSGSolid& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
protected:
|
||||
|
||||
G4double fCubicVolume;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Cons.hh,v 1.22 2009/03/31 09:56:24 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4Cons.hh,v 1.24 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -138,6 +138,8 @@ class G4Cons : public G4CSGSolid
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
|
||||
// Visualisation functions
|
||||
@@ -154,6 +156,10 @@ class G4Cons : public G4CSGSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4Cons(const G4Cons& rhs);
|
||||
G4Cons& operator=(const G4Cons& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
// Old access functions
|
||||
|
||||
inline G4double GetRmin1() const;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Orb.hh,v 1.11 2006/10/19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Orb.hh,v 1.13 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -98,6 +98,8 @@ class G4Orb : public G4CSGSolid
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
|
||||
// Visualisation functions
|
||||
@@ -113,6 +115,10 @@ class G4Orb : public G4CSGSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4Orb(const G4Orb& rhs);
|
||||
G4Orb& operator=(const G4Orb& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
protected:
|
||||
|
||||
// Used by distanceToOut
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Para.hh,v 1.18 2006/10/19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Para.hh,v 1.20 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -138,6 +138,8 @@ class G4Para : public G4CSGSolid
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
|
||||
// Visualisation functions
|
||||
@@ -153,6 +155,10 @@ class G4Para : public G4CSGSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4Para(const G4Para& rhs);
|
||||
G4Para& operator=(const G4Para& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
protected: // without description
|
||||
|
||||
G4ThreeVectorList*
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Sphere.hh,v 1.24 2009/03/31 07:51:49 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4Sphere.hh,v 1.27 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -143,6 +143,8 @@ class G4Sphere : public G4CSGSolid
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
|
||||
// Visualisation functions
|
||||
@@ -160,6 +162,10 @@ class G4Sphere : public G4CSGSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4Sphere(const G4Sphere& rhs);
|
||||
G4Sphere& operator=(const G4Sphere& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
// Old access functions
|
||||
|
||||
inline G4double GetRmin() const;
|
||||
@@ -211,7 +217,11 @@ class G4Sphere : public G4CSGSolid
|
||||
//
|
||||
enum ENorm {kNRMin,kNRMax,kNSPhi,kNEPhi,kNSTheta,kNETheta};
|
||||
|
||||
G4double fEpsilon, fRminTolerance, fRmaxTolerance, kAngTolerance;
|
||||
static const G4double fEpsilon;
|
||||
//
|
||||
// Relative radial tolerance constant
|
||||
|
||||
G4double fRminTolerance, fRmaxTolerance, kAngTolerance;
|
||||
//
|
||||
// Radial and angular tolerances
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Torus.hh,v 1.27 2007/05/18 07:38:00 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Torus.hh,v 1.30 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -110,7 +110,7 @@ class G4Torus : public G4CSGSolid
|
||||
G4double pSPhi,
|
||||
G4double pDPhi);
|
||||
|
||||
virtual ~G4Torus();
|
||||
~G4Torus();
|
||||
|
||||
// Accessors
|
||||
|
||||
@@ -145,6 +145,8 @@ class G4Torus : public G4CSGSolid
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo(std::ostream& os) const;
|
||||
|
||||
// Visualisation functions
|
||||
@@ -163,11 +165,16 @@ class G4Torus : public G4CSGSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
protected:
|
||||
G4Torus(const G4Torus& rhs);
|
||||
G4Torus& operator=(const G4Torus& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
std::vector<G4double> TorusRootsJT(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v,
|
||||
G4double r) const ;
|
||||
private:
|
||||
|
||||
void TorusRootsJT(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v,
|
||||
G4double r,
|
||||
std::vector<G4double>& roots) const ;
|
||||
|
||||
G4double SolveNumericJT(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v,
|
||||
@@ -178,7 +185,11 @@ class G4Torus : public G4CSGSolid
|
||||
CreateRotatedVertices(const G4AffineTransform& pTransform,
|
||||
G4int& noPolygonVertices) const;
|
||||
|
||||
protected:
|
||||
G4ThreeVector ApproxSurfaceNormal( const G4ThreeVector& p) const;
|
||||
// Algorithm for SurfaceNormal() following the original
|
||||
// specification for points not on the surface
|
||||
|
||||
private:
|
||||
|
||||
G4double fRmin,fRmax,fRtor,fSPhi,fDPhi;
|
||||
|
||||
@@ -188,14 +199,6 @@ class G4Torus : public G4CSGSolid
|
||||
// used by normal
|
||||
enum ENorm {kNRMin,kNRMax,kNSPhi,kNEPhi};
|
||||
|
||||
private:
|
||||
|
||||
G4ThreeVector ApproxSurfaceNormal( const G4ThreeVector& p) const;
|
||||
// Algorithm for SurfaceNormal() following the original
|
||||
// specification for points not on the surface
|
||||
|
||||
private:
|
||||
|
||||
G4double kRadTolerance, kAngTolerance;
|
||||
// Radial and angular tolerances
|
||||
};
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trap.hh,v 1.17 2006/10/19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Trap.hh,v 1.19 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -219,6 +219,8 @@ class G4Trap : public G4CSGSolid
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo( std::ostream& os ) const;
|
||||
|
||||
// Visualisation functions
|
||||
@@ -234,6 +236,10 @@ class G4Trap : public G4CSGSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4Trap(const G4Trap& rhs);
|
||||
G4Trap& operator=(const G4Trap& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
protected: // with description
|
||||
|
||||
G4bool MakePlanes();
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Trd.hh,v 1.16 2006/10/19 15:33:37 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Trd.hh,v 1.19 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -71,7 +71,7 @@ class G4Trd : public G4CSGSolid
|
||||
//
|
||||
// Constructs a trapezoid with name, and half lengths
|
||||
|
||||
virtual ~G4Trd();
|
||||
~G4Trd();
|
||||
//
|
||||
// Destructor
|
||||
|
||||
@@ -134,6 +134,8 @@ class G4Trd : public G4CSGSolid
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo( std::ostream& os ) const;
|
||||
|
||||
// Visualisation functions
|
||||
@@ -144,12 +146,17 @@ class G4Trd : public G4CSGSolid
|
||||
|
||||
public: // without description
|
||||
|
||||
enum ESide {kUndefined, kPX,kMX,kPY,kMY,kPZ,kMZ};
|
||||
// Codes for faces (kPX=plus x face,kMY= minus y face etc)
|
||||
|
||||
G4Trd(__void__&);
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
protected: // without description
|
||||
G4Trd(const G4Trd& rhs);
|
||||
G4Trd& operator=(const G4Trd& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
G4ThreeVectorList*
|
||||
CreateRotatedVertices( const G4AffineTransform& pTransform ) const;
|
||||
@@ -157,17 +164,13 @@ class G4Trd : public G4CSGSolid
|
||||
// Creates the List of transformed vertices in the format required
|
||||
// for G4CSGSolid:: ClipCrossSection and ClipBetweenSections
|
||||
|
||||
G4double fDx1,fDx2,fDy1,fDy2,fDz;
|
||||
|
||||
// Codes for faces (kPX=plus x face,kMY= minus y face etc)
|
||||
|
||||
enum ESide {kUndefined, kPX,kMX,kPY,kMY,kPZ,kMZ};
|
||||
|
||||
private:
|
||||
|
||||
G4ThreeVector ApproxSurfaceNormal( const G4ThreeVector& p ) const;
|
||||
// Algorithm for SurfaceNormal() following the original
|
||||
// specification for points not on the surface
|
||||
|
||||
private:
|
||||
|
||||
G4double fDx1,fDx2,fDy1,fDy2,fDz;
|
||||
};
|
||||
|
||||
#include "G4Trd.icc"
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.hh,v 1.22 2009/03/26 16:25:44 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4Tubs.hh,v 1.24 2010/10/19 15:42:09 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -134,6 +134,8 @@ class G4Tubs : public G4CSGSolid
|
||||
|
||||
G4ThreeVector GetPointOnSurface() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
std::ostream& StreamInfo( std::ostream& os ) const;
|
||||
|
||||
// Visualisation functions
|
||||
@@ -150,6 +152,10 @@ class G4Tubs : public G4CSGSolid
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4Tubs(const G4Tubs& rhs);
|
||||
G4Tubs& operator=(const G4Tubs& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
// Older names for access functions
|
||||
|
||||
inline G4double GetRMin() const;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Tubs.icc,v 1.14 2009/06/09 16:08:23 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
// $Id: G4Tubs.icc,v 1.18 2010/09/22 08:31:13 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-09-04 $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
// GEANT 4 inline definitions file
|
||||
@@ -144,6 +144,18 @@ inline void G4Tubs::CheckPhiAngles(G4double sPhi, G4double dPhi)
|
||||
inline
|
||||
void G4Tubs::SetInnerRadius (G4double newRMin)
|
||||
{
|
||||
if ( newRMin < 0 ) // Check radii
|
||||
{
|
||||
G4cerr << "ERROR - G4Tubs()::SetInnerRadius()" << G4endl
|
||||
<< " Invalid values for radii in solid " << GetName()
|
||||
<< G4endl
|
||||
<< " newRMin = " << newRMin
|
||||
<< ", fRMax = " << fRMax << G4endl
|
||||
<< " Negative inner radius!"
|
||||
<< G4endl;
|
||||
G4Exception("G4Tubs::SetInnerRadius()", "InvalidSetup", FatalException,
|
||||
"Invalid radii.");
|
||||
}
|
||||
fRMin= newRMin;
|
||||
Initialize();
|
||||
}
|
||||
@@ -151,6 +163,18 @@ void G4Tubs::SetInnerRadius (G4double newRMin)
|
||||
inline
|
||||
void G4Tubs::SetOuterRadius (G4double newRMax)
|
||||
{
|
||||
if ( newRMax <= 0 ) // Check radii
|
||||
{
|
||||
G4cerr << "ERROR - G4Tubs()::SetOuterRadius()" << G4endl
|
||||
<< " Invalid values for radii in solid " << GetName()
|
||||
<< G4endl
|
||||
<< " fRMin = " << fRMin
|
||||
<< ", newRMax = " << newRMax << G4endl
|
||||
<< " Invalid outer radius!"
|
||||
<< G4endl;
|
||||
G4Exception("G4Tubs::SetOuterRadius()", "InvalidSetup", FatalException,
|
||||
"Invalid radii.");
|
||||
}
|
||||
fRMax= newRMax;
|
||||
Initialize();
|
||||
}
|
||||
@@ -158,6 +182,14 @@ void G4Tubs::SetOuterRadius (G4double newRMax)
|
||||
inline
|
||||
void G4Tubs::SetZHalfLength (G4double newDz)
|
||||
{
|
||||
if (newDz<=0) // Check z-len
|
||||
{
|
||||
G4cerr << "ERROR - G4Tubs()::SetZHalfLength()" << G4endl
|
||||
<< " Negative Z half-length (" << newDz << ") in solid: "
|
||||
<< GetName() << G4endl;
|
||||
G4Exception("G4Tubs::SetZHalfLength()", "InvalidSetup", FatalException,
|
||||
"Invalid Z half-length");
|
||||
}
|
||||
fDz= newDz;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user