Import Geant4 10.6.0 source tree

This commit is contained in:
Gabriele Cosmo
2019-12-06 15:12:28 +01:00
parent b2a62ae692
commit 5baee230e9
2997 changed files with 141580 additions and 98673 deletions
@@ -23,13 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// --------------------------------------------------------------------
// GEANT 4 class header file
//
//
// G4PolyhedraSide
//
// Class description:
@@ -37,19 +30,18 @@
// Class implementing a face that represents one segmented side
// of a polyhedra:
//
// G4PolyhedraSide( const G4PolyhedraSideRZ *prevRZ,
// const G4PolyhedraSideRZ *tail,
// const G4PolyhedraSideRZ *head,
// const G4PolyhedraSideRZ *nextRZ,
// G4int numSide,
// G4PolyhedraSide( const G4PolyhedraSideRZ* prevRZ,
// const G4PolyhedraSideRZ* tail,
// const G4PolyhedraSideRZ* head,
// const G4PolyhedraSideRZ* nextRZ,
// G4int numSide,
// G4double phiStart, G4double phiTotal,
// G4bool phiIsOpen, G4bool isAllBehind=false )
// G4bool phiIsOpen, G4bool isAllBehind = false )
//
// Values for r1,z1 and r2,z2 should be specified in clockwise
// order in (r,z).
// Author:
// David C. Williams (davidw@scipp.ucsc.edu)
// Author: David C. Williams (davidw@scipp.ucsc.edu)
// --------------------------------------------------------------------
#ifndef G4PolyhedraSide_hh
@@ -88,7 +80,7 @@ class G4PhSideData
// by both the master thread and worker threads to allocate memory space
// for the fields encapsulated by the class G4PhSideData.
//
typedef G4GeomSplitter<G4PhSideData> G4PhSideManager;
using G4PhSideManager = G4GeomSplitter<G4PhSideData>;
//
// ----------------------------------------------------------------------------
@@ -98,38 +90,38 @@ class G4PolyhedraSide : public G4VCSGface
public: // with description
G4PolyhedraSide( const G4PolyhedraSideRZ *prevRZ,
const G4PolyhedraSideRZ *tail,
const G4PolyhedraSideRZ *head,
const G4PolyhedraSideRZ *nextRZ,
G4int numSide,
G4PolyhedraSide( const G4PolyhedraSideRZ* prevRZ,
const G4PolyhedraSideRZ* tail,
const G4PolyhedraSideRZ* head,
const G4PolyhedraSideRZ* nextRZ,
G4int numSide,
G4double phiStart, G4double phiTotal,
G4bool phiIsOpen, G4bool isAllBehind=false );
G4bool phiIsOpen, G4bool isAllBehind = false );
virtual ~G4PolyhedraSide();
G4PolyhedraSide( const G4PolyhedraSide &source );
G4PolyhedraSide& operator=( const G4PolyhedraSide &source );
G4PolyhedraSide( const G4PolyhedraSide& source );
G4PolyhedraSide& operator=( const G4PolyhedraSide& source );
G4bool Intersect( const G4ThreeVector &p, const G4ThreeVector &v,
G4bool Intersect( const G4ThreeVector& p, const G4ThreeVector& v,
G4bool outgoing, G4double surfTolerance,
G4double &distance, G4double &distFromSurface,
G4ThreeVector &normal, G4bool &allBehind );
G4double& distance, G4double& distFromSurface,
G4ThreeVector& normal, G4bool& allBehind );
G4double Distance( const G4ThreeVector &p, G4bool outgoing );
G4double Distance( const G4ThreeVector& p, G4bool outgoing );
EInside Inside( const G4ThreeVector &p, G4double tolerance,
G4double *bestDistance );
G4ThreeVector Normal( const G4ThreeVector &p, G4double *bestDistance );
G4ThreeVector Normal( const G4ThreeVector& p, G4double* bestDistance );
G4double Extent( const G4ThreeVector axis );
void CalculateExtent( const EAxis axis,
const G4VoxelLimits &voxelLimit,
const G4AffineTransform &tranform,
G4SolidExtentList &extentList );
const G4AffineTransform& tranform,
G4SolidExtentList& extentList );
G4VCSGface *Clone() { return new G4PolyhedraSide( *this ); }
G4VCSGface* Clone() { return new G4PolyhedraSide( *this ); }
public: // without description
@@ -138,10 +130,10 @@ class G4PolyhedraSide : public G4VCSGface
G4double SurfaceTriangle( G4ThreeVector p1,
G4ThreeVector p2,
G4ThreeVector p3,
G4ThreeVector *p4 );
G4ThreeVector* p4 );
G4ThreeVector GetPointOnPlane( G4ThreeVector p0, G4ThreeVector p1,
G4ThreeVector p2, G4ThreeVector p3,
G4double *Area );
G4double* Area );
G4double SurfaceArea();
G4ThreeVector GetPointOnFace();
@@ -177,23 +169,23 @@ class G4PolyhedraSide : public G4VCSGface
center, // Point in center of side
surfPhi, // Unit vector on surface pointing along phi
surfRZ; // Unit vector on surface pointing along R/Z
G4PolyhedraSideEdge *edges[2]; // The phi boundary edges to this side
G4PolyhedraSideEdge* edges[2]; // The phi boundary edges to this side
// [0]=low phi [1]=high phi
G4ThreeVector edgeNorm[2]; // RZ edge normals [i] at {r[i],z[i]}
G4ThreeVector edgeNorm[2]; // RZ edge normals [i] at {r[i],z[i]}
} G4PolyhedraSideVec;
protected:
G4bool IntersectSidePlane( const G4ThreeVector &p, const G4ThreeVector &v,
G4bool IntersectSidePlane( const G4ThreeVector& p, const G4ThreeVector& v,
const G4PolyhedraSideVec& vec,
G4double normSign,
G4double surfTolerance,
G4double &distance,
G4double &distFromSurface );
G4int LineHitsSegments( const G4ThreeVector &p,
const G4ThreeVector &v,
G4int *i1, G4int *i2 );
G4int LineHitsSegments( const G4ThreeVector& p,
const G4ThreeVector& v,
G4int* i1, G4int* i2 );
G4int ClosestPhiSegment( G4double phi );
@@ -201,38 +193,38 @@ class G4PolyhedraSide : public G4VCSGface
G4double GetPhi( const G4ThreeVector& p );
G4double DistanceToOneSide( const G4ThreeVector &p,
const G4PolyhedraSideVec &vec,
G4double *normDist );
G4double DistanceToOneSide( const G4ThreeVector& p,
const G4PolyhedraSideVec& vec,
G4double* normDist );
G4double DistanceAway( const G4ThreeVector &p,
const G4PolyhedraSideVec &vec,
G4double *normDist );
G4double DistanceAway( const G4ThreeVector& p,
const G4PolyhedraSideVec& vec,
G4double* normDist );
void CopyStuff( const G4PolyhedraSide &source );
void CopyStuff( const G4PolyhedraSide& source );
protected:
G4int numSide; // Number sides
G4int numSide = 0; // Number sides
G4double r[2], z[2]; // r, z parameters, in specified order
G4double startPhi, // Start phi (0 to 2pi), if phiIsOpen
deltaPhi, // Delta phi (0 to 2pi), if phiIsOpen
endPhi; // End phi (>startPhi), if phiIsOpen
G4bool phiIsOpen; // True if there is a phi slice
G4bool allBehind; // True if the entire solid is "behind" this face
G4bool phiIsOpen = false; // True if there is a phi slice
G4bool allBehind = false; // True if the entire solid is "behind" this face
G4IntersectingCone *cone; // Our intersecting cone
G4IntersectingCone* cone = nullptr; // Our intersecting cone
G4PolyhedraSideVec *vecs; // Vector set for each facet of our face
G4PolyhedraSideEdge *edges; // The edges belong to vecs
G4PolyhedraSideVec* vecs = nullptr; // Vector set for each facet of our face
G4PolyhedraSideEdge* edges = nullptr; // The edges belong to vecs
G4double lenRZ, // RZ length of each side
lenPhi[2]; // Phi dimensions of each side
G4double edgeNorm; // Normal in RZ/Phi space to each side
private:
G4double kCarTolerance; // Geometrical surface thickness
G4double fSurfaceArea; // Surface Area
G4double kCarTolerance; // Geometrical surface thickness
G4double fSurfaceArea = 0.0; // Surface Area
G4int instanceID;
// This field is used as instance ID.