Import Geant4 11.0.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2021-06-25 16:12:29 +02:00
parent c968e26a39
commit 6399a014b6
4200 changed files with 207479 additions and 237366 deletions
+2
View File
@@ -139,6 +139,8 @@ public: // With description
static void InitialiseColourMap();
static const std::map<G4String, G4Colour>& GetMap();
G4bool operator< (const G4Colour& rhs) const;
private:
G4double red, green, blue, alpha;
+12 -7
View File
@@ -67,7 +67,7 @@
// G4PolyhedronTorus(rmin,rmax,rtor,
// phi,dphi) - create G4Polyhedron for Torus;
// G4PolyhedronTet(p0[3],p1[3],p2[3],p3[3]) - create polyhedron for Tet;
//
//
// G4PolyhedronEllipsoid(dx,dy,dz,
// zcut1,zcut2) - create G4Polyhedron for Ellipsoid;
// G4PolyhedronEllipticalCone(dx,dy,z,
@@ -143,14 +143,14 @@ public:
class G4PolyhedronCone: public G4Polyhedron {
public:
G4PolyhedronCone (G4double Rmn1, G4double Rmx1,
G4PolyhedronCone (G4double Rmn1, G4double Rmx1,
G4double Rmn2, G4double Rmx2, G4double Dz);
virtual ~G4PolyhedronCone ();
virtual ~G4PolyhedronCone ();
};
class G4PolyhedronCons: public G4Polyhedron {
public:
G4PolyhedronCons (G4double Rmn1, G4double Rmx1,
G4PolyhedronCons (G4double Rmn1, G4double Rmx1,
G4double Rmn2, G4double Rmx2, G4double Dz,
G4double Phi1, G4double Dphi);
virtual ~G4PolyhedronCons ();
@@ -169,6 +169,8 @@ public:
const G4double *z,
const G4double *rmin,
const G4double *rmax);
G4PolyhedronPcon (G4double phi, G4double dphi,
const std::vector<G4TwoVector> &rz);
virtual ~G4PolyhedronPcon ();
};
@@ -178,6 +180,9 @@ public:
const G4double *z,
const G4double *rmin,
const G4double *rmax);
G4PolyhedronPgon (G4double phi, G4double dphi, G4int npdv,
const std::vector<G4TwoVector> &rz);
virtual ~G4PolyhedronPgon ();
};
@@ -237,7 +242,7 @@ public:
class G4PolyhedronTubs: public G4Polyhedron {
public:
G4PolyhedronTubs (G4double Rmin, G4double Rmax, G4double Dz,
G4PolyhedronTubs (G4double Rmin, G4double Rmax, G4double Dz,
G4double Phi1, G4double Dphi);
virtual ~G4PolyhedronTubs ();
};
@@ -258,14 +263,14 @@ class G4PolyhedronHype: public G4Polyhedron {
class G4PolyhedronEllipsoid : public G4Polyhedron {
public:
G4PolyhedronEllipsoid(G4double dx, G4double dy, G4double dz,
G4PolyhedronEllipsoid(G4double dx, G4double dy, G4double dz,
G4double zcut1, G4double zcut2);
virtual ~G4PolyhedronEllipsoid ();
};
class G4PolyhedronEllipticalCone : public G4Polyhedron {
public:
G4PolyhedronEllipticalCone(G4double dx, G4double dy, G4double z,
G4PolyhedronEllipticalCone(G4double dx, G4double dy, G4double z,
G4double zcut1);
virtual ~G4PolyhedronEllipticalCone ();
};
@@ -69,6 +69,7 @@ class G4Polymarker;
class G4Polyhedron;
class G4VisExtent;
class G4StatDouble;
class G4Mesh;
class G4VGraphicsScene {
@@ -130,6 +131,7 @@ public: // With description
virtual void AddCompound (const G4VDigi&) = 0;
virtual void AddCompound (const G4THitsMap<G4double>&) = 0;
virtual void AddCompound (const G4THitsMap<G4StatDouble>&) = 0;
virtual void AddCompound (const G4Mesh&) = 0;
///////////////////////////////////////////////////////////////////
// Methods for adding graphics primitives to the scene handler. A
@@ -83,15 +83,6 @@ public: // With description
~G4VisAttributes ();
G4VisAttributes& operator= (const G4VisAttributes&);
#ifndef WIN32
// Deprecated 14 July 2016 JA
// Use GetInvisible() instead. E.g.:
// logical_volume->SetVisAttributes(G4VisAttributes::GetInvisible());
// or use one of the above constructors or SetVisibility and
// logical_volume->SetVisAttributes(my_vis_attributes);
static const G4VisAttributes Invisible;
#endif
static const G4VisAttributes& GetInvisible();
G4bool operator != (const G4VisAttributes& a) const;
+43 -16
View File
@@ -23,9 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
//
// Class Description:
// HepPolyhedron is an intermediate class between description of a shape
// and visualization systems. It is intended to provide some service like:
@@ -125,7 +122,7 @@
// - added GetNextVertexIndex, GetVertex by Yasuhide Sawada
// - added GetNextUnitNormal, GetNextEdgeIndices, GetNextEdge
// - improvements: angles now expected in radians
// int -> G4int, double -> G4double
// int -> G4int, double -> G4double
// - G4ThreeVector replaced by either G4Point3D or G4Normal3D
//
// 15.12.96 E.Chernyaev
@@ -170,14 +167,26 @@
// 20.06.05 G.Cosmo
// - added HepPolyhedronEllipsoid
//
// 18.07.07 T.Nikitina
// - added HepPolyhedronParaboloid;
//
// 21.10.09 J.Allison
// - removed IsErrorBooleanProcess (now error is returned through argument)
//
// 22.02.20 E.Chernyaev
// - added HepPolyhedronTet, HepPolyhedronHyberbolicMirror
//
// 12.05.21 E.Chernyaev
// - added TriangulatePolygon(), RotateContourAroundZ()
// - added HepPolyhedronPgon, HepPolyhedronPcon given by rz-countour
//
#ifndef HEP_POLYHEDRON_HH
#define HEP_POLYHEDRON_HH
#include <vector>
#include "G4Types.hh"
#include "G4TwoVector.hh"
#include "G4Point3D.hh"
#include "G4Normal3D.hh"
#include "G4Transform3D.hh"
@@ -195,7 +204,7 @@ class G4Facet {
G4Edge edge[4];
public:
G4Facet(G4int v1=0, G4int f1=0, G4int v2=0, G4int f2=0,
G4Facet(G4int v1=0, G4int f1=0, G4int v2=0, G4int f2=0,
G4int v3=0, G4int f3=0, G4int v4=0, G4int f4=0)
{ edge[0].v=v1; edge[0].f=f1; edge[1].v=v2; edge[1].f=f2;
edge[2].v=v3; edge[2].f=f3; edge[3].v=v4; edge[3].f=f4; }
@@ -238,6 +247,20 @@ class HepPolyhedron {
const G4double *z, G4double *r,
G4int nodeVis, G4int edgeVis);
// Create HepPolyhedron for body of revolution around Z-axis
void RotateContourAroundZ(G4int nstep, G4double phi, G4double dphi,
const std::vector<G4TwoVector> &rz,
G4int nodeVis, G4int edgeVis);
// Triangulate closed polygon (contour)
G4bool TriangulatePolygon(const std::vector<G4TwoVector> &polygon,
std::vector<G4int> &result);
// Helper function for TriangulatePolygon()
G4bool CheckSnip(const std::vector<G4TwoVector> &contour,
G4int a, G4int b, G4int c,
G4int n, const G4int* V);
// For each edge set reference to neighbouring facet
void SetReferences();
@@ -276,7 +299,7 @@ class HepPolyhedron {
// Get next vertex index of the quadrilateral
G4bool GetNextVertexIndex(G4int & index, G4int & edgeFlag) const;
// Get vertex by index
// Get vertex by index
G4Point3D GetVertex(G4int index) const;
// Get next vertex + edge visibility of the quadrilateral
@@ -326,10 +349,10 @@ class HepPolyhedron {
// Get normal of the next face
G4bool GetNextNormal(G4Normal3D &normal) const;
// Get normal of unit length of the next face
// Get normal of unit length of the next face
G4bool GetNextUnitNormal(G4Normal3D &normal) const;
// Boolean operations
// Boolean operations
HepPolyhedron add(const HepPolyhedron &p) const;
HepPolyhedron subtract(const HepPolyhedron &p) const;
HepPolyhedron intersect(const HepPolyhedron &p) const;
@@ -352,7 +375,7 @@ class HepPolyhedron {
/**
* Creates polyhedron for twisted trapezoid.
* The trapezoid is given by two bases perpendicular to the z-axis.
*
*
* @param Dz half length in z
* @param xy1 1st base (at z = -Dz)
* @param xy2 2nd base (at z = +Dz)
@@ -370,8 +393,8 @@ class HepPolyhedron {
* array starts from 1 (like in fortran). The indexes can be positive
* or negative. Negative sign means that the corresponding edge is
* invisible. The normal of the face should be directed to exterior
* of the polyhedron.
*
* of the polyhedron.
*
* @param Nnodes number of nodes
* @param Nfaces number of faces
* @param xyz nodes
@@ -449,16 +472,16 @@ class HepPolyhedronHype : public HepPolyhedron
class HepPolyhedronCons : public HepPolyhedron
{
public:
HepPolyhedronCons(G4double Rmn1, G4double Rmx1,
HepPolyhedronCons(G4double Rmn1, G4double Rmx1,
G4double Rmn2, G4double Rmx2, G4double Dz,
G4double Phi1, G4double Dphi);
G4double Phi1, G4double Dphi);
virtual ~HepPolyhedronCons();
};
class HepPolyhedronCone : public HepPolyhedronCons
{
public:
HepPolyhedronCone(G4double Rmn1, G4double Rmx1,
HepPolyhedronCone(G4double Rmn1, G4double Rmx1,
G4double Rmn2, G4double Rmx2, G4double Dz);
virtual ~HepPolyhedronCone();
};
@@ -466,7 +489,7 @@ class HepPolyhedronCone : public HepPolyhedronCons
class HepPolyhedronTubs : public HepPolyhedronCons
{
public:
HepPolyhedronTubs(G4double Rmin, G4double Rmax, G4double Dz,
HepPolyhedronTubs(G4double Rmin, G4double Rmax, G4double Dz,
G4double Phi1, G4double Dphi);
virtual ~HepPolyhedronTubs();
};
@@ -485,6 +508,8 @@ class HepPolyhedronPgon : public HepPolyhedron
const G4double *z,
const G4double *rmin,
const G4double *rmax);
HepPolyhedronPgon(G4double phi, G4double dphi, G4int npdv,
const std::vector<G4TwoVector> &rz);
virtual ~HepPolyhedronPgon();
};
@@ -495,6 +520,8 @@ class HepPolyhedronPcon : public HepPolyhedronPgon
const G4double *z,
const G4double *rmin,
const G4double *rmax);
HepPolyhedronPcon(G4double phi, G4double dphi,
const std::vector<G4TwoVector> &rz);
virtual ~HepPolyhedronPcon();
};
@@ -528,7 +555,7 @@ class HepPolyhedronTet : public HepPolyhedron
class HepPolyhedronEllipsoid : public HepPolyhedron
{
public:
HepPolyhedronEllipsoid(G4double dx, G4double dy, G4double dz,
HepPolyhedronEllipsoid(G4double dx, G4double dy, G4double dz,
G4double zcut1, G4double zcut2);
virtual ~HepPolyhedronEllipsoid();
};