Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 14:46:44 +01:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
@@ -146,6 +146,7 @@ class G4TessellatedSolid : public G4VSolid
inline G4VFacet* GetFacet (G4int i) const;
G4int GetNumberOfFacets () const;
G4int GetFacetIndex (const G4ThreeVector& p) const;
virtual EInside Inside (const G4ThreeVector& p) const;
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const;
@@ -176,6 +177,7 @@ class G4TessellatedSolid : public G4VSolid
void SetSolidClosed (const G4bool t);
G4bool GetSolidClosed () const;
G4int CheckStructure() const;
inline void SetMaxVoxels(G4int max);
@@ -72,7 +72,8 @@ class G4Tet : public G4VSolid
void SetVertices(const G4ThreeVector& anchor,
const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3);
const G4ThreeVector& p3,
G4bool* degeneracyFlag = nullptr);
// Accessors, return the four vertices of the shape
void GetVertices(G4ThreeVector& anchor,
@@ -95,6 +96,7 @@ class G4Tet : public G4VSolid
const G4int n,
const G4VPhysicalVolume* pRep);
void SetBoundingLimits(const G4ThreeVector& pMin, const G4ThreeVector& pMax);
void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
G4bool CalculateExtent(const EAxis pAxis,
const G4VoxelLimits& pVoxelLimit,
@@ -27,14 +27,15 @@
//
// Class description:
//
// G4TwistedTubs is a sort of twisted cylinder.
// G4TwistedTubs is a sector of a twisted hollow cylinder.
// A twisted cylinder which is placed along with z-axis and is
// separated into phi-segments should become a hyperboloid, and
// its each segmented piece should be tilted with a stereo angle.
// its each segmented piece should be tilted with a stereo angle.
// G4TwistedTubs is a G4VSolid.
// It can have inner & outer surfaces as well as G4TwistedTubs,
// but cannot has different stereo angles between the inner surface
// and outer surface.
//
// Details of the implementation: "Development of a Geant4 solid
// for stereo mini-jet cells in a cylindrical drift chamber",
// Computer Physics Communications 153 (2003) pp.373391
// 01-Aug-2002 - Kotoyo Hoshina (hoshina@hepburn.s.chiba-u.ac.jp), created.
// 13-Nov-2003 - O.Link (Oliver.Link@cern.ch), Integration in Geant4
@@ -50,11 +50,11 @@ class G4UTet : public G4UAdapter<vecgeom::UnplacedTet>
public: // with description
G4UTet(const G4String& pName,
G4ThreeVector anchor,
G4ThreeVector p2,
G4ThreeVector p3,
G4ThreeVector p4,
G4UTet(const G4String& pName,
const G4ThreeVector& anchor,
const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3,
G4bool* degeneracyFlag = nullptr);
~G4UTet();
@@ -75,9 +75,10 @@ class G4UTet : public G4UAdapter<vecgeom::UnplacedTet>
// persistifiable objects.
G4UTet(const G4UTet& rhs);
G4UTet& operator=(const G4UTet& rhs);
G4UTet& operator=(const G4UTet& rhs);
// Copy constructor and assignment operator.
void SetBoundingLimits(const G4ThreeVector& pMin, const G4ThreeVector& pMax);
void BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const;
G4bool CalculateExtent(const EAxis pAxis,
@@ -87,12 +88,29 @@ class G4UTet : public G4UAdapter<vecgeom::UnplacedTet>
G4Polyhedron* CreatePolyhedron() const;
void SetVertices(const G4ThreeVector& anchor,
const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3,
G4bool* degeneracyFlag = nullptr);
// Set new position of the vertices.
void GetVertices(G4ThreeVector& anchor,
G4ThreeVector& p1,
G4ThreeVector& p2,
G4ThreeVector& p3) const;
std::vector<G4ThreeVector> GetVertices() const;
// Return the four vertices of the shape.
G4bool CheckDegeneracy(const G4ThreeVector& p0,
const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3) const;
// Return true if the tetrahedron is degenerate.
private:
G4ThreeVector fBmin, fBmax; // bounding box
};
// --------------------------------------------------------------------
@@ -297,9 +297,11 @@ class G4VTwistedFaceted: public G4VSolid
inline
G4double G4VTwistedFaceted::GetCubicVolume()
{
if(fCubicVolume != 0.) ;
else fCubicVolume = 2 * fDz
* ( ( fDx1 + fDx2 ) * fDy1 + ( fDx3 + fDx4 ) * fDy2 );
if(fCubicVolume == 0.)
{
fCubicVolume = ((fDx1 + fDx2 + fDx3 + fDx4)*(fDy1 + fDy2) +
(fDx4 + fDx3 - fDx2 - fDx1)*(fDy2 - fDy1)/3)*fDz;
}
return fCubicVolume;
}