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,10 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4BooleanSolid
// G4BooleanSolid
//
// Class description:
//
@@ -34,7 +31,6 @@
// between other solids.
// 10.09.98 V.Grichine - created
//
// --------------------------------------------------------------------
#ifndef G4BOOLEANSOLID_HH
#define G4BOOLEANSOLID_HH
@@ -117,26 +113,25 @@ class G4BooleanSolid : public G4VSolid
protected:
G4VSolid* fPtrSolidA;
G4VSolid* fPtrSolidB;
G4VSolid* fPtrSolidA = nullptr;
G4VSolid* fPtrSolidB = nullptr;
private:
G4int fStatistics;
G4double fCubVolEpsilon;
G4double fAreaAccuracy;
G4double fCubicVolume;
G4double fSurfaceArea;
G4int fStatistics = 1000000;
G4double fCubVolEpsilon = 0.001;
G4double fAreaAccuracy = -1;
G4double fCubicVolume = -1.0;
G4double fSurfaceArea = -1.0;
mutable G4bool fRebuildPolyhedron;
mutable G4Polyhedron* fpPolyhedron;
mutable G4bool fRebuildPolyhedron = false;
mutable G4Polyhedron* fpPolyhedron = nullptr;
mutable std::vector<std::pair<G4VSolid *,G4Transform3D>> fPrimitives;
mutable G4double fPrimitivesSurfaceArea;
mutable G4double fPrimitivesSurfaceArea = 0.0;
G4bool createdDisplacedSolid;
G4bool createdDisplacedSolid = false;
// If & only if this object created it, it must delete it
} ;
#include "G4BooleanSolid.icc"
@@ -23,14 +23,8 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// Class G4BooleanSolid inline implementation
//
//
// --------------------------------------------------------------------
// GEANT 4 inline definitions file
//
// G4BooleanSolid.icc
//
// Implementation of inline methods of G4BooleanSolid
// --------------------------------------------------------------------
inline
@@ -23,10 +23,7 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4DisplacedSolid
// G4DisplacedSolid
//
// Class description:
//
@@ -34,14 +31,10 @@
// frame of reference to a new one. It is meant to be used only for
// simplifying the implementation of "Boolean solids".
// History:
//
// 28.10.98 V.Grichine: created
// 22.11.00 V.Grichine: new set methods for matrix/vectors
//
// 28.10.98 V.Grichine - created
// --------------------------------------------------------------------
#ifndef G4DisplacedSolid_HH
#define G4DisplacedSolid_HH
#ifndef G4DISPLACEDSOLID_HH
#define G4DISPLACEDSOLID_HH
#include "G4VSolid.hh"
#include "G4RotationMatrix.hh"
@@ -116,27 +109,27 @@ class G4DisplacedSolid : public G4VSolid
// If the Solid is a "G4DisplacedSolid",
// return a self pointer else return 0.
G4VSolid* GetConstituentMovedSolid() const;
G4VSolid* GetConstituentMovedSolid() const;
G4AffineTransform GetTransform() const;
G4AffineTransform GetTransform() const;
void SetTransform(G4AffineTransform& );
G4AffineTransform GetDirectTransform() const;
G4AffineTransform GetDirectTransform() const;
void SetDirectTransform(G4AffineTransform&);
// Access/Set methods.
G4RotationMatrix GetFrameRotation() const;
void SetFrameRotation(const G4RotationMatrix&);
G4RotationMatrix GetFrameRotation() const;
void SetFrameRotation(const G4RotationMatrix&);
G4ThreeVector GetFrameTranslation() const;
void SetFrameTranslation(const G4ThreeVector&);
G4ThreeVector GetFrameTranslation() const;
void SetFrameTranslation(const G4ThreeVector&);
// Get/Set the rotation/translation, as applied to the frame of reference.
G4RotationMatrix GetObjectRotation() const;
void SetObjectRotation(const G4RotationMatrix&);
G4RotationMatrix GetObjectRotation() const;
void SetObjectRotation(const G4RotationMatrix&);
G4ThreeVector GetObjectTranslation() const;
void SetObjectTranslation(const G4ThreeVector&);
G4ThreeVector GetObjectTranslation() const;
void SetObjectTranslation(const G4ThreeVector&);
// Get/Set the rotation/translation, as applied to the object.
std::ostream& StreamInfo(std::ostream& os) const;
@@ -154,16 +147,16 @@ class G4DisplacedSolid : public G4VSolid
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
G4Polyhedron* CreatePolyhedron () const ;
G4Polyhedron* GetPolyhedron () const ;
G4Polyhedron* GetPolyhedron () const ;
// For creating graphical representations (ie for visualisation).
protected:
G4VSolid* fPtrSolid ;
G4AffineTransform* fPtrTransform ;
G4AffineTransform* fDirectTransform ;
mutable G4bool fRebuildPolyhedron;
mutable G4Polyhedron* fpPolyhedron;
} ;
G4VSolid* fPtrSolid = nullptr;
G4AffineTransform* fPtrTransform = nullptr;
G4AffineTransform* fDirectTransform = nullptr;
mutable G4bool fRebuildPolyhedron = false;
mutable G4Polyhedron* fpPolyhedron = nullptr;
};
#endif
@@ -23,20 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4IntersectionSolid
// G4IntersectionSolid
//
// Class description:
//
// Class for description of intersection of two CSG solids.
// Class for description of intersection of two solids.
// History:
//
// 12.09.98 V.Grichine: initial design and implementation
// 28.10.98 V.Grichine: addition of two constructors with G4PlacedSolid
//
// --------------------------------------------------------------------
#ifndef G4INTERSECTIONSOLID_HH
#define G4INTERSECTIONSOLID_HH
@@ -116,8 +109,7 @@ class G4IntersectionSolid : public G4BooleanSolid
void DescribeYourselfTo ( G4VGraphicsScene& scene ) const ;
G4Polyhedron* CreatePolyhedron () const ;
} ;
};
#endif
@@ -23,12 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// --------------------------------------------------------------------
// GEANT 4 class header file
//
//
// G4MultiUnion
//
// Class description:
@@ -38,9 +32,8 @@
// instance of "G4Node". An instance of "G4MultiUnion" is subsequently
// composed of one or several nodes.
// History:
// 06.04.17 G.Cosmo - Imported implementation in Geant4 for VecGeom migration
// 19.10.12 M.Gayer - Original implementation from USolids module
// 06.04.17 G.Cosmo - Adapted implementation in Geant4 for VecGeom migration
// --------------------------------------------------------------------
#ifndef G4MULTIUNION_HH
#define G4MULTIUNION_HH
@@ -93,9 +86,9 @@ class G4MultiUnion : public G4VSolid
const G4ThreeVector& aDirection) const;
G4double DistanceToOut(const G4ThreeVector& aPoint,
const G4ThreeVector& aDirection,
const G4bool calcNorm=false,
G4bool *validNorm=0,
G4ThreeVector *aNormalVector=0) const;
const G4bool calcNorm = false,
G4bool* validNorm = nullptr,
G4ThreeVector* aNormalVector = nullptr) const;
G4double DistanceToInNoVoxels(const G4ThreeVector& aPoint,
const G4ThreeVector& aDirection) const;
@@ -178,14 +171,14 @@ class G4MultiUnion : public G4VSolid
std::vector<G4VSolid*> fSolids;
std::vector<G4Transform3D> fTransformObjs;
G4Voxelizer fVoxels; // Pointer to the vozelized solid
G4double fCubicVolume; // Cubic Volume
G4double fSurfaceArea; // Surface Area
G4double kRadTolerance; // Cached radial tolerance
mutable G4bool fAccurate; // Accurate safety (off by default)
G4Voxelizer fVoxels; // Vozelizer for the solid
G4double fCubicVolume = 0.0; // Cubic Volume
G4double fSurfaceArea = 0.0; // Surface Area
G4double kRadTolerance; // Cached radial tolerance
mutable G4bool fAccurate = false; // Accurate safety (off by default)
mutable G4bool fRebuildPolyhedron;
mutable G4Polyhedron* fpPolyhedron;
mutable G4bool fRebuildPolyhedron = false;
mutable G4Polyhedron* fpPolyhedron = nullptr;
};
//______________________________________________________________________________
@@ -209,7 +202,7 @@ inline G4VSolid* G4MultiUnion::GetSolid(G4int index) const
//______________________________________________________________________________
inline G4int G4MultiUnion::GetNumberOfSolids() const
{
return fSolids.size();
return G4int(fSolids.size());
}
//______________________________________________________________________________
@@ -23,23 +23,17 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4ScaledSolid
// G4ScaledSolid
//
// Class description:
//
// A scaled solid is a solid that has been scaled in dimensions
// in X, Y or Z, from its original description.
// History:
//
// 27.10.15 G.Cosmo: created
//
// --------------------------------------------------------------------
#ifndef G4ScaledSolid_HH
#define G4ScaledSolid_HH
#ifndef G4SCALEDSOLID_HH
#define G4SCALEDSOLID_HH
#include "G4VSolid.hh"
#include "G4ThreeVector.hh"
@@ -76,9 +70,9 @@ class G4ScaledSolid : public G4VSolid
G4double DistanceToOut( const G4ThreeVector& p,
const G4ThreeVector& v,
const G4bool calcNorm=false,
G4bool *validNorm=0,
G4ThreeVector *n=0 ) const;
const G4bool calcNorm = false,
G4bool* validNorm = nullptr,
G4ThreeVector* n = nullptr ) const;
G4double DistanceToOut( const G4ThreeVector& p ) const;
@@ -121,12 +115,12 @@ class G4ScaledSolid : public G4VSolid
private:
G4VSolid* fPtrSolid;
G4ScaleTransform* fScale;
G4double fCubicVolume;
G4double fSurfaceArea;
mutable G4bool fRebuildPolyhedron;
mutable G4Polyhedron* fpPolyhedron;
G4VSolid* fPtrSolid = nullptr;
G4ScaleTransform* fScale = nullptr;
G4double fCubicVolume = -1.0;
G4double fSurfaceArea = -1.0;
mutable G4bool fRebuildPolyhedron = false;
mutable G4Polyhedron* fpPolyhedron = nullptr;
} ;
#endif
@@ -23,19 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4SubtractionSolid
// G4SubtractionSolid
//
// Class description:
//
// Class for description of subtraction of two CSG solids: A - B.
// Class for description of subtraction of two solids: A - B.
// History:
//
// 14.10.98 V.Grichine: first implementation
//
// --------------------------------------------------------------------
#ifndef G4SUBTRACTIONSOLID_HH
#define G4SUBTRACTIONSOLID_HH
@@ -103,9 +97,9 @@ class G4SubtractionSolid : public G4BooleanSolid
G4double DistanceToOut( const G4ThreeVector& p,
const G4ThreeVector& v,
const G4bool calcNorm=false,
G4bool *validNorm=0,
G4ThreeVector *n=0 ) const ;
const G4bool calcNorm = false,
G4bool* validNorm = nullptr,
G4ThreeVector* n = nullptr ) const ;
G4double DistanceToOut( const G4ThreeVector& p ) const ;
@@ -23,19 +23,13 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// class G4UnionSolid
// G4UnionSolid
//
// Class description:
//
// Class for description of union of two CSG solids.
// Class for description of union of two solids.
// History:
//
// 12.09.98 V.Grichine: created
//
// 12.09.98 V.Grichine - created
// --------------------------------------------------------------------
#ifndef G4UNIONSOLID_HH
#define G4UNIONSOLID_HH
@@ -102,9 +96,9 @@ class G4UnionSolid : public G4BooleanSolid
G4double DistanceToOut( const G4ThreeVector& p,
const G4ThreeVector& v,
const G4bool calcNorm=false,
G4bool *validNorm=0,
G4ThreeVector *n=0 ) const ;
const G4bool calcNorm = false,
G4bool* validNorm = nullptr,
G4ThreeVector* n = nullptr ) const ;
G4double DistanceToOut( const G4ThreeVector& p ) const ;