Import Geant4 5.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:57:27 +02:00
parent 330b82b769
commit 37fff30d2e
5733 changed files with 263867 additions and 74574 deletions
+65 -91
View File
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Trd.hh,v 1.7 2001/07/11 09:59:55 gunter Exp $
// GEANT4 tag $Name: geant4-04-01 $
// $Id: G4Trd.hh,v 1.8 2002/10/28 11:43:04 gcosmo Exp $
// GEANT4 tag $Name: geant4-05-00 $
//
//
// --------------------------------------------------------------------
@@ -33,44 +33,9 @@
//
// Class description:
//
// A Trd is a trapezoid with the x and y dimensions varying along z
// A G4Trd is a trapezoid with the x and y dimensions varying along z
// functions:
//
// As inherited from G4CSGSolid +
//
// G4Trd( const G4String& pName,
// G4double pdx1, G4double pdx2,
// G4double pdy1, G4double pdy2,
// G4double pdz )
//
// - Construct a trapezoid with name, and half lengths
// dpx1,dpx2,dpy1,dpy2,dpz
//
// G4double GetXHalfLength1() const
// G4double GetXHalfLength2() const
// G4double GetYHalfLength1() const
// G4double GetYHalfLength2() const
// G4double GetZHalfLength() const
//
// - Return the respective parameter
//
// void SetXHalfLength1(G4double)
// void SetXHalfLength2(G4double)
// void SetYHalfLength1(G4double)
// void SetYHalfLength2(G4double)
// void SetZHalfLength(G4double)
//
// - Set the respective parameter
//
// Protected:
//
// G4ThreeVectorList*
// CreateRotatedVertices(const G4AffineTransform& pTransform) const
//
// - Create the List of transformed vertices in the format required
// for G4CSGSolid:: ClipCrossSection and ClipBetweenSections.
//
//
// Member Data:
//
// fDx1 Half-length along x at the surface positioned at -dz
@@ -80,11 +45,11 @@
// fDz Half-length along z axis
// History:
// 19.11.99 V.Grichine, kUndefined was added to Eside enum
// 21.04.97 J. Apostolakis Added Set Methods.
// 19.08.96 P. Kent, V. Grichine ->Fs in accordance with G4Box
// 17.02.95 P.Kent Exiting normal return
// 12.01.95 P.Kent Old prototype code converted to thick geometry
// 12.01.95 P.Kent: Old prototype code converted to thick geometry
// 17.02.95 P.Kent: Exiting normal return
// 19.08.96 P.Kent, V.Grichine: Fs in accordance with G4Box
// 21.04.97 J.Apostolakis: Added Set Methods
// 19.11.99 V.Grichine: kUndefined was added to Eside enum
// --------------------------------------------------------------------
#ifndef G4TRD_HH
@@ -94,88 +59,97 @@
class G4Trd : public G4CSGSolid
{
public:
public: // with description
G4Trd( const G4String& pName,
G4double pdx1, G4double pdx2,
G4double pdy1, G4double pdy2,
G4double pdz);
G4double pdx1, G4double pdx2,
G4double pdy1, G4double pdy2,
G4double pdz );
//
// Constructs a trapezoid with name, and half lengths
virtual ~G4Trd();
//
// Destructor
// Access functions
// Accessors
G4double GetXHalfLength1() const { return fDx1; }
G4double GetXHalfLength2() const { return fDx2; }
G4double GetYHalfLength1() const { return fDy1; }
G4double GetYHalfLength2() const { return fDy2; }
G4double GetZHalfLength() const { return fDz; }
inline G4double GetXHalfLength1() const;
inline G4double GetXHalfLength2() const;
inline G4double GetYHalfLength1() const;
inline G4double GetYHalfLength2() const;
inline G4double GetZHalfLength() const;
// Set functions
// Modifiers
void SetXHalfLength1(G4double val) { fDx1= val; }
void SetXHalfLength2(G4double val) { fDx2= val; }
void SetYHalfLength1(G4double val) { fDy1= val; }
void SetYHalfLength2(G4double val) { fDy2= val; }
void SetZHalfLength(G4double val) { fDz= val; }
inline void SetXHalfLength1(G4double val);
inline void SetXHalfLength2(G4double val);
inline void SetYHalfLength1(G4double val);
inline void SetYHalfLength2(G4double val);
inline void SetZHalfLength(G4double val);
// Methods
// Methods of solid
void ComputeDimensions(G4VPVParameterisation* p,
const G4int n,
const G4VPhysicalVolume* pRep);
void ComputeDimensions( G4VPVParameterisation* p,
const G4int n,
const G4VPhysicalVolume* pRep );
G4bool CalculateExtent(const EAxis pAxis,
const G4VoxelLimits& pVoxelLimit,
const G4AffineTransform& pTransform,
G4double& pMin, G4double& pMax) const;
G4bool CalculateExtent( const EAxis pAxis,
const G4VoxelLimits& pVoxelLimit,
const G4AffineTransform& pTransform,
G4double& pMin, G4double& pMax ) const;
EInside Inside( const G4ThreeVector& p ) const;
EInside Inside(const G4ThreeVector& p) const;
G4ThreeVector SurfaceNormal( const G4ThreeVector& p ) const;
G4ThreeVector SurfaceNormal( const G4ThreeVector& p) const;
G4double DistanceToIn( const G4ThreeVector& p,
const G4ThreeVector& v ) const;
G4double DistanceToIn(const G4ThreeVector& p,
const G4ThreeVector& v) const;
G4double DistanceToIn( const G4ThreeVector& p ) const;
G4double DistanceToIn(const G4ThreeVector& p) const;
G4double DistanceToOut( const G4ThreeVector& p,
const G4ThreeVector& v,
const G4bool calcNorm=false,
G4bool *validNorm=0,
G4ThreeVector *n=0 ) const;
G4double DistanceToOut(const G4ThreeVector& p,
const G4ThreeVector& v,
const G4bool calcNorm=false,
G4bool *validNorm=0,
G4ThreeVector *n=0) const;
G4double DistanceToOut( const G4ThreeVector& p ) const;
G4double DistanceToOut(const G4ThreeVector& p) const;
void CheckAndSetAllParameters ( G4double pdx1, G4double pdx2,
G4double pdy1, G4double pdy2,
G4double pdz );
void CheckAndSetAllParameters (G4double pdx1, G4double pdx2,
G4double pdy1, G4double pdy2,
G4double pdz);
void SetAllParameters ( G4double pdx1, G4double pdx2,
G4double pdy1, G4double pdy2,
G4double pdz );
void SetAllParameters (G4double pdx1, G4double pdx2,
G4double pdy1, G4double pdy2,
G4double pdz);
G4GeometryType GetEntityType() const;
G4GeometryType GetEntityType() const { return G4String("G4Trd"); }
// Naming method (pseudo-RTTI : run-time type identification
G4std::ostream& StreamInfo( G4std::ostream& os ) const;
// Visualisation functions
// Visualisation functions
void DescribeYourselfTo (G4VGraphicsScene& scene) const;
G4Polyhedron* CreatePolyhedron () const;
G4NURBS* CreateNURBS () const;
protected:
protected: // without description
G4ThreeVectorList*
CreateRotatedVertices(const G4AffineTransform& pTransform) const;
CreateRotatedVertices( const G4AffineTransform& pTransform ) const;
//
// 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)
// Codes for faces (kPX=plus x face,kMY= minus y face etc)
enum ESide {kUndefined, kPX,kMX,kPY,kMY,kPZ,kMZ};
};
#include "G4Trd.icc"
#endif