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 -5
View File
@@ -1,9 +1,6 @@
#------------------------------------------------------------------------------
# Module : G4graphics_reps
# Package: Geant4.src.G4graphics_reps
#------------------------------------------------------------------------------
# - G4graphics_reps category build(s)
# Add allocation export symbol for the graphics_reps category
add_definitions(-DG4GREPS_ALLOC_EXPORT)
geant4_global_library_target(COMPONENTS sources.cmake)
geant4_global_library_target(NAME G4graphics_reps COMPONENTS sources.cmake)
+39 -11
View File
@@ -19,9 +19,37 @@ committal in the CVS repository !
History file for graphics_reps category
---------------------------------------
06 May 2021 Gabriele Cosmo (greps-V10-06-07)
07 June 2021 John Allison (greps-V10-07-07)
- G4VGraphicsScene.hh:
o Introduce a new pure virtual function:
virtual void AddCompound (const G4Mesh&) = 0;
- G4VisAttributes.cc:
o Improve message in SetForceNumberOfCloudPoints.
05 June 2021 Evgueni Tcherniaev (greps-V10-07-06)
- RotateContourAroundZ(): fixed calculation of Nfaces
12 May 2021 Evgueni Tcherniaev (greps-V10-07-05)
- added TriangulatePolygon(), RotateContourAroundZ()
- added HepPolyhedronPgon, HepPolyhedronPcon given by rz-contour
06 May 2021 Gabriele Cosmo (greps-V10-07-04)
- Fixed shadowing compilation warning in G4Colours reported with gcc-11.
18 March 2021 Ben Morgan (greps-V10-07-03)
- Fix typo in geant4_add_module that prevented install of greps headers
15 March 2021 John Allison (greps-V10-07-02)
- Add G4Colour::operator<.
o This is useful of you want to make a set or map based on
G4colour as a key.
12 March 2021 Ben Morgan (greps-V10-07-01)
- Modernize CMake build
29 December 2020 John Allison (greps-V10-07-00)
- Remove deprecated G4VisAttributes::Invisible.
01 December 2020 Evgueni Tcherniaev (greps-V10-06-06)
- HepPolyhedron: revised HepPolyhedronHype,
it addresses problem report #2295.
@@ -56,7 +84,7 @@ History file for graphics_reps category
07 November 2019 Evgueni Tcherniaev (greps-V10-05-06)
- HepPolyhedron: Added move constructor and move assignment
- BooleanProcessor::createPolyhedron(): Use return std::move()
- BooleanProcessor::createPolyhedron(): Use return std::move()
04 October 2019 Evgueni Tcherniaev (greps-V10-05-05)
- HepPolyhedron::SetSideFacets: Fixed false defect reported by Coverity
@@ -118,7 +146,7 @@ History file for graphics_reps category
18th January 2018 Ben Morgan (greps-V10-04-00)
- Fix unexported global data for WINDOWS_EXPORT_ALL_SYMBOLS
- New DLL build method identified that G4VisAttributes has a
- New DLL build method identified that G4VisAttributes has a
static const member that is not declared dllexport/import.
- graphics_reps_defs.hh: New header to configure the needed
export/import keywords, using a macro G4GREPS_DLL
@@ -171,13 +199,13 @@ History file for graphics_reps category
- Co-works with digits_hits-V10-02-06, vis-V10-02-12
- include/G4VGraphicsScene.hh
It accepts both G4TMitsMap<G4StatDouble> and G4THitsMap<G4double>.
2nd September 2016 Makoto Asai (greps-V10-02-06)
- Co-works with digits_hits-V10-02-05, vis-V10-02-10
- include/G4VGraphicsScene.hh
Build-in scorer now uses G4TMitsMap<G4StatDouble> instead of
G4THitsMap<G4double>.
31st August 2016 John Allison (greps-V10-02-05)
- Co-works vis-V10-02-09.
- G4VGraphicsScene.hh:
@@ -313,11 +341,11 @@ History file for graphics_reps category
14th February 2013 Jean Jacquemier
- Removed modifcations G4AttCheck.cc and G4DimentionedTypeUtil.cc for G4UnitTable
( see TAG greps-V09-06-02 ). These modifications will be done once
( see TAG greps-V09-06-02 ). These modifications will be done once
MultiThreading performance loss will be recover
8th February 2013 Jean Jacquemier (greps-V09-06-02)
- Modify G4AttCheck.cc and G4DimentionedTypeUtil.cc for G4UnitTable
- Modify G4AttCheck.cc and G4DimentionedTypeUtil.cc for G4UnitTable
modification
14th December 2012 John Allison (greps-V09-06-01)
@@ -659,12 +687,12 @@ June 11, 2012 G.Cosmo (greps-V09-05-09)
objects out of vertices and indices.
o Removed unnecessary operator= functions.
23rd November 2005 Jane Tinslay
23rd November 2005 Jane Tinslay
- Update documentation in G4Colour
10th November 2005 Jane Tinslay (greps-V07-01-09)
- G4VVisManager: Fix Dispatch method name to "DispatchToModel".
- G4Colour: Use public static member functions instead of public
- G4Colour: Use public static member functions instead of public
static data members to avoid problems with dynamic libraries.
10th November 2005 John Allison
@@ -688,7 +716,7 @@ June 11, 2012 G.Cosmo (greps-V09-05-09)
- G4Colour.cc: Added #include <sstream>.
17th October 2005 Jane Tinslay (greps-V07-01-05)
- intercoms->graphics_reps migration for G4VGraphicsScene and G4VVisManager
- intercoms->graphics_reps migration for G4VGraphicsScene and G4VVisManager
13th October 2005 Jane Tinslay (greps-V07-01-04)
- Additions to G4Colour
+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();
};
+6 -19
View File
@@ -1,13 +1,7 @@
#------------------------------------------------------------------------------
# Module : G4graphics_reps
# Package: Geant4.src.G4graphics_reps
#------------------------------------------------------------------------------
# - G4graphics_reps module build definition
#
# Define the Geant4 Module.
#
geant4_define_module(NAME G4graphics_reps
HEADERS
geant4_add_module(G4graphics_reps
PUBLIC_HEADERS
G4AttCheck.hh
G4AttDef.hh
G4AttDefStore.hh
@@ -79,14 +73,7 @@ geant4_define_module(NAME G4graphics_reps
G4VisExtent.cc
G4Visible.cc
HepPolyhedron.cc
HepPolyhedronProcessor.src
GRANULAR_DEPENDENCIES
G4globman
G4intercoms
GLOBAL_DEPENDENCIES
G4global
G4intercoms
LINK_LIBRARIES
)
HepPolyhedronProcessor.src)
geant4_module_link_libraries(G4graphics_reps PUBLIC G4globman G4hepgeometry G4intercoms)
# List any source specific properties here
+13
View File
@@ -184,3 +184,16 @@ const std::map<G4String, G4Colour>& G4Colour::GetMap()
return fColourMap;
}
G4bool G4Colour::operator< (const G4Colour& rhs) const
{
if (red < rhs.red) return true;
else if (red == rhs.red) {
if (green < rhs.green) return true;
else if (green == rhs.green) {
if (blue < rhs.blue) return true;
else if (blue == rhs.blue) {
if (alpha < rhs.alpha) return true;
}}}
return false;
}
+13 -5
View File
@@ -45,13 +45,13 @@ G4PolyhedronBox::G4PolyhedronBox (G4double dx, G4double dy, G4double dz):
G4PolyhedronBox::~G4PolyhedronBox () {}
G4PolyhedronCone::G4PolyhedronCone (G4double Rmn1, G4double Rmx1,
G4PolyhedronCone::G4PolyhedronCone (G4double Rmn1, G4double Rmx1,
G4double Rmn2, G4double Rmx2, G4double Dz):
G4Polyhedron (HepPolyhedronCone (Rmn1, Rmx1, Rmn2, Rmx2, Dz)) {}
G4PolyhedronCone::~G4PolyhedronCone () {}
G4PolyhedronCons::G4PolyhedronCons (G4double Rmn1, G4double Rmx1,
G4PolyhedronCons::G4PolyhedronCons (G4double Rmn1, G4double Rmx1,
G4double Rmn2, G4double Rmx2, G4double Dz,
G4double Phi1, G4double Dphi):
G4Polyhedron (HepPolyhedronCons (Rmn1, Rmx1, Rmn2, Rmx2, Dz, Phi1, Dphi)) {}
@@ -71,6 +71,10 @@ G4PolyhedronPcon::G4PolyhedronPcon (G4double phi, G4double dphi, G4int nz,
const G4double *rmax):
G4Polyhedron (HepPolyhedronPcon (phi, dphi, nz, z, rmin, rmax)) {}
G4PolyhedronPcon::G4PolyhedronPcon (G4double phi, G4double dphi,
const std::vector<G4TwoVector> &rz):
G4Polyhedron (HepPolyhedronPcon(phi, dphi, rz)) {}
G4PolyhedronPcon::~G4PolyhedronPcon () {}
G4PolyhedronPgon::G4PolyhedronPgon (G4double phi, G4double dphi, G4int npdv,
@@ -80,6 +84,10 @@ G4PolyhedronPgon::G4PolyhedronPgon (G4double phi, G4double dphi, G4int npdv,
const G4double *rmax):
G4Polyhedron (HepPolyhedronPgon (phi, dphi, npdv, nz, z, rmin, rmax)) {}
G4PolyhedronPgon::G4PolyhedronPgon (G4double phi, G4double dphi, G4int npdv,
const std::vector<G4TwoVector> &rz):
G4Polyhedron (HepPolyhedronPgon(phi, dphi, npdv, rz)) {}
G4PolyhedronPgon::~G4PolyhedronPgon () {}
G4PolyhedronSphere::G4PolyhedronSphere (G4double rmin, G4double rmax,
@@ -131,7 +139,7 @@ G4PolyhedronTube::G4PolyhedronTube (G4double Rmin, G4double Rmax, G4double Dz):
G4PolyhedronTube::~G4PolyhedronTube () {}
G4PolyhedronTubs::G4PolyhedronTubs (G4double Rmin, G4double Rmax, G4double Dz,
G4PolyhedronTubs::G4PolyhedronTubs (G4double Rmin, G4double Rmax, G4double Dz,
G4double Phi1, G4double Dphi):
G4Polyhedron (HepPolyhedronTubs (Rmin, Rmax, Dz, Phi1, Dphi)) {}
@@ -151,7 +159,7 @@ G4PolyhedronHype::G4PolyhedronHype (G4double r1, G4double r2, G4double tan1,
G4PolyhedronHype::~G4PolyhedronHype () {}
G4PolyhedronEllipsoid::G4PolyhedronEllipsoid (G4double ax, G4double by,
G4double cz,
G4double cz,
G4double zCut1, G4double zCut2):
G4Polyhedron (HepPolyhedronEllipsoid (ax, by, cz, zCut1, zCut2)) {}
@@ -159,7 +167,7 @@ G4PolyhedronEllipsoid::~G4PolyhedronEllipsoid () {}
G4PolyhedronEllipticalCone::G4PolyhedronEllipticalCone (G4double ax,
G4double ay,
G4double h,
G4double h,
G4double zCut1):
G4Polyhedron (HepPolyhedronEllipticalCone (ax, ay, h, zCut1)) {}
+3 -7
View File
@@ -158,11 +158,6 @@ G4VisAttributes& G4VisAttributes::operator= (const G4VisAttributes& rhs)
return *this;
}
#ifndef WIN32
// Deprecated 14 July 2016 JA
const G4VisAttributes G4VisAttributes::Invisible = G4VisAttributes (false);
#endif
const G4VisAttributes& G4VisAttributes::GetInvisible() {
static const G4VisAttributes invisible = G4VisAttributes(false);
return invisible;
@@ -200,8 +195,9 @@ void G4VisAttributes::SetForceNumberOfCloudPoints (G4int nPoints) {
if (nPoints <= 0) {
G4cout <<
"G4VisAttributes::SetForceNumberOfCloudPoints: number of cloud points"
"set to " << fForcedNumberOfCloudPoints
<< ". This means the viewer default will be used."
" set to " << fForcedNumberOfCloudPoints << '.' <<
"\n This means the viewer default will be used, typically controlled by"
"\n \"/vis/viewer/set/numberOfCloudPoints\""
<< G4endl;
}
}
File diff suppressed because it is too large Load Diff