Import Geant4 10.7.0.beta source tree

This commit is contained in:
Gabriele Cosmo
2020-06-26 10:23:25 +02:00
parent c02c370437
commit 67ba86d073
1871 changed files with 174422 additions and 131884 deletions
@@ -1,17 +0,0 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4geomBoolean
# Package: Geant4.src.G4geometry..G4geomBoolean
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
+4
View File
@@ -19,6 +19,10 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
December 10, 2019 B.Morgan geom-bool-V10-06-00
- Cleanup CMake build, removing obsolete granular library options and
explicit include_directories.
November 26, 2019 G.Cosmo geom-bool-V10-05-04
- G4MultiUnion: fixed cases of implicit type conversions from size_t to G4int.
+32 -60
View File
@@ -1,71 +1,43 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4geomBoolean
# Package: Geant4.src.G4geometry.G4geomBoolean
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
include_directories(${USOLIDS_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/CSG/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/specific/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4geomBoolean
HEADERS
G4BooleanSolid.hh
G4BooleanSolid.icc
G4DisplacedSolid.hh
G4IntersectionSolid.hh
G4MultiUnion.hh
G4ScaledSolid.hh
G4SubtractionSolid.hh
G4UnionSolid.hh
SOURCES
G4BooleanSolid.cc
G4DisplacedSolid.cc
G4IntersectionSolid.cc
G4MultiUnion.cc
G4ScaledSolid.cc
G4SubtractionSolid.cc
G4UnionSolid.cc
GRANULAR_DEPENDENCIES
G4geometrymng
G4globman
G4graphics_reps
G4intercoms
G4volumes
G4csg
G4specsolids
GLOBAL_DEPENDENCIES
G4global
G4graphics_reps
G4intercoms
LINK_LIBRARIES
${VECGEOM_LIBRARIES}
geant4_define_module(NAME G4geomBoolean
HEADERS
G4BooleanSolid.hh
G4BooleanSolid.icc
G4DisplacedSolid.hh
G4IntersectionSolid.hh
G4MultiUnion.hh
G4ScaledSolid.hh
G4SubtractionSolid.hh
G4UnionSolid.hh
SOURCES
G4BooleanSolid.cc
G4DisplacedSolid.cc
G4IntersectionSolid.cc
G4MultiUnion.cc
G4ScaledSolid.cc
G4SubtractionSolid.cc
G4UnionSolid.cc
GRANULAR_DEPENDENCIES
G4geometrymng
G4globman
G4graphics_reps
G4intercoms
G4volumes
G4csg
G4specsolids
GLOBAL_DEPENDENCIES
G4global
G4graphics_reps
G4intercoms
LINK_LIBRARIES
${VECGEOM_LIBRARIES}
)
# List any source specific properties here
-15
View File
@@ -1,15 +0,0 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module :
# Package: Geant4.src.G4geometry.
#
# Intermediate level CMakeLists.txt - just process subdirectories
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
add_subdirectory(Boolean)
add_subdirectory(CSG)
add_subdirectory(specific)
-17
View File
@@ -1,17 +0,0 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4csg
# Package: Geant4.src.G4geometry..G4csg
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
+12
View File
@@ -16,6 +16,18 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
April 30, 2020 G.Cosmo geom-csg-V10-06-02
- Adopt new convention for location of headers in VecGeom for all wrappers.
April 09, 2020 E.Tcherniaev geom-csg-V10-06-01
- G4Trap.cc: fixed calculation of normal for points on edge in
SurfaceNormal(), improved code for Inside().
- testG4Sphere.cc: removed obsolete code for testing CalculateExtent().
December 10, 2019 B.Morgan geom-csg-V10-06-00
- Cleanup CMake build, removing obsolete granular library options and
explicit include_directories.
August 23, 2019 G.Cosmo geom-csg-V10-05-05
- Minor c++11 revision and headers cleanup.
- Use pre-increment wherever possible.
+1 -1
View File
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedBox.h>
#include <VecGeom/volumes/UnplacedBox.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedCone.h>
#include <VecGeom/volumes/UnplacedCone.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedCutTube.h>
#include <VecGeom/volumes/UnplacedCutTube.h>
#include "G4Polyhedron.hh"
+1 -1
View File
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedOrb.h>
#include <VecGeom/volumes/UnplacedOrb.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedParallelepiped.h>
#include <VecGeom/volumes/UnplacedParallelepiped.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedSphere.h>
#include <VecGeom/volumes/UnplacedSphere.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedTorus2.h>
#include <VecGeom/volumes/UnplacedTorus2.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedTrapezoid.h>
#include <VecGeom/volumes/UnplacedTrapezoid.h>
#include "G4Polyhedron.hh"
+1 -1
View File
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedTrd.h>
#include <VecGeom/volumes/UnplacedTrd.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedTube.h>
#include <VecGeom/volumes/UnplacedTube.h>
#include "G4Polyhedron.hh"
+68 -95
View File
@@ -1,106 +1,79 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4csg
# Package: Geant4.src.G4geometry.G4csg
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
include_directories(${USOLIDS_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4csg
HEADERS
G4Box.hh
G4Box.icc
G4CSGSolid.hh
G4Cons.hh
G4Cons.icc
G4CutTubs.hh
G4CutTubs.icc
G4Orb.hh
G4Orb.icc
G4Para.hh
G4Para.icc
G4Sphere.hh
G4Sphere.icc
G4Torus.hh
G4Torus.icc
G4Trap.hh
G4Trap.icc
G4Trd.hh
G4Trd.icc
G4Tubs.hh
G4Tubs.icc
G4UBox.hh
G4UCons.hh
G4UCutTubs.hh
G4UOrb.hh
G4UPara.hh
G4USphere.hh
G4UTorus.hh
G4UTrap.hh
G4UTrd.hh
G4UTubs.hh
SOURCES
G4Box.cc
G4CSGSolid.cc
G4Cons.cc
G4CutTubs.cc
G4Orb.cc
G4Para.cc
G4Sphere.cc
G4Torus.cc
G4Trap.cc
G4Trd.cc
G4Tubs.cc
G4UBox.cc
G4UCons.cc
G4UCutTubs.cc
G4UOrb.cc
G4UPara.cc
G4USphere.cc
G4UTorus.cc
G4UTrap.cc
G4UTrd.cc
G4UTubs.cc
GRANULAR_DEPENDENCIES
G4geometrymng
G4globman
G4graphics_reps
G4hepnumerics
G4intercoms
G4volumes
GLOBAL_DEPENDENCIES
G4global
G4graphics_reps
G4intercoms
LINK_LIBRARIES
${VECGEOM_LIBRARIES}
geant4_define_module(NAME G4csg
HEADERS
G4Box.hh
G4Box.icc
G4CSGSolid.hh
G4Cons.hh
G4Cons.icc
G4CutTubs.hh
G4CutTubs.icc
G4Orb.hh
G4Orb.icc
G4Para.hh
G4Para.icc
G4Sphere.hh
G4Sphere.icc
G4Torus.hh
G4Torus.icc
G4Trap.hh
G4Trap.icc
G4Trd.hh
G4Trd.icc
G4Tubs.hh
G4Tubs.icc
G4UBox.hh
G4UCons.hh
G4UCutTubs.hh
G4UOrb.hh
G4UPara.hh
G4USphere.hh
G4UTorus.hh
G4UTrap.hh
G4UTrd.hh
G4UTubs.hh
SOURCES
G4Box.cc
G4CSGSolid.cc
G4Cons.cc
G4CutTubs.cc
G4Orb.cc
G4Para.cc
G4Sphere.cc
G4Torus.cc
G4Trap.cc
G4Trd.cc
G4Tubs.cc
G4UBox.cc
G4UCons.cc
G4UCutTubs.cc
G4UOrb.cc
G4UPara.cc
G4USphere.cc
G4UTorus.cc
G4UTrap.cc
G4UTrd.cc
G4UTubs.cc
GRANULAR_DEPENDENCIES
G4geometrymng
G4globman
G4graphics_reps
G4hepnumerics
G4intercoms
G4volumes
GLOBAL_DEPENDENCIES
G4global
G4graphics_reps
G4intercoms
LINK_LIBRARIES
${VECGEOM_LIBRARIES}
)
# List any source specific properties here
+30 -42
View File
@@ -607,13 +607,11 @@ G4bool G4Trap::CalculateExtent( const EAxis pAxis,
EInside G4Trap::Inside( const G4ThreeVector& p ) const
{
G4double dz = std::abs(p.z())-fDz;
if (dz > halfCarTolerance) return kOutside;
switch (fTrapType)
{
case 0: // General case
{
G4double dz = std::abs(p.z())-fDz;
G4double dy1 = fPlanes[0].b*p.y()+fPlanes[0].c*p.z()+fPlanes[0].d;
G4double dy2 = fPlanes[1].b*p.y()+fPlanes[1].c*p.z()+fPlanes[1].d;
G4double dy = std::max(dz,std::max(dy1,dy2));
@@ -624,11 +622,12 @@ EInside G4Trap::Inside( const G4ThreeVector& p ) const
+ fPlanes[3].c*p.z()+fPlanes[3].d;
G4double dist = std::max(dy,std::max(dx1,dx2));
if (dist > halfCarTolerance) return kOutside;
return (dist > -halfCarTolerance) ? kSurface : kInside;
return (dist > halfCarTolerance) ? kOutside :
((dist > -halfCarTolerance) ? kSurface : kInside);
}
case 1: // YZ section is a rectangle
{
G4double dz = std::abs(p.z())-fDz;
G4double dy = std::max(dz,std::abs(p.y())+fPlanes[1].d);
G4double dx1 = fPlanes[2].a*p.x()+fPlanes[2].b*p.y()
+ fPlanes[2].c*p.z()+fPlanes[2].d;
@@ -636,28 +635,30 @@ EInside G4Trap::Inside( const G4ThreeVector& p ) const
+ fPlanes[3].c*p.z()+fPlanes[3].d;
G4double dist = std::max(dy,std::max(dx1,dx2));
if (dist > halfCarTolerance) return kOutside;
return (dist > -halfCarTolerance) ? kSurface : kInside;
return (dist > halfCarTolerance) ? kOutside :
((dist > -halfCarTolerance) ? kSurface : kInside);
}
case 2: // YZ section is a rectangle and
{ // XZ section is an isosceles trapezoid
G4double dz = std::abs(p.z())-fDz;
G4double dy = std::max(dz,std::abs(p.y())+fPlanes[1].d);
G4double dx = fPlanes[3].a*std::abs(p.x())
+ fPlanes[3].c*p.z()+fPlanes[3].d;
G4double dist = std::max(dy,dx);
if (dist > halfCarTolerance) return kOutside;
return (dist > -halfCarTolerance) ? kSurface : kInside;
return (dist > halfCarTolerance) ? kOutside :
((dist > -halfCarTolerance) ? kSurface : kInside);
}
case 3: // YZ section is a rectangle and
{ // XY section is an isosceles trapezoid
G4double dz = std::abs(p.z())-fDz;
G4double dy = std::max(dz,std::abs(p.y())+fPlanes[1].d);
G4double dx = fPlanes[3].a*std::abs(p.x())
+ fPlanes[3].b*p.y()+fPlanes[3].d;
G4double dist = std::max(dy,dx);
if (dist > halfCarTolerance) return kOutside;
return (dist > -halfCarTolerance) ? kSurface : kInside;
return (dist > halfCarTolerance) ? kOutside :
((dist > -halfCarTolerance) ? kSurface : kInside);
}
}
return kOutside;
@@ -669,14 +670,9 @@ EInside G4Trap::Inside( const G4ThreeVector& p ) const
G4ThreeVector G4Trap::SurfaceNormal( const G4ThreeVector& p ) const
{
G4int nsurf = 0; // number of surfaces where p is placed
G4double nx = 0, ny = 0, nz = 0;
G4double dz = std::abs(p.z()) - fDz;
if (std::abs(dz) <= halfCarTolerance)
{
nz = (p.z() < 0) ? -1 : 1;
++nsurf;
}
nz = std::copysign(G4double(std::abs(dz) <= halfCarTolerance), p.z());
switch (fTrapType)
{
@@ -688,7 +684,6 @@ G4ThreeVector G4Trap::SurfaceNormal( const G4ThreeVector& p ) const
if (std::abs(dy) > halfCarTolerance) continue;
ny = fPlanes[i].b;
nz += fPlanes[i].c;
++nsurf;
break;
}
for (G4int i=2; i<4; ++i)
@@ -699,15 +694,14 @@ G4ThreeVector G4Trap::SurfaceNormal( const G4ThreeVector& p ) const
nx = fPlanes[i].a;
ny += fPlanes[i].b;
nz += fPlanes[i].c;
++nsurf;
break;
}
break;
}
case 1: // YZ section is a rectangle
case 1: // YZ section - rectangle
{
G4double dy = std::abs(p.y()) + fPlanes[1].d;
if (std::abs(dy) <= halfCarTolerance) ny = (p.y() < 0) ? -1 : 1;
ny = std::copysign(G4double(std::abs(dy) <= halfCarTolerance), p.y());
for (G4int i=2; i<4; ++i)
{
G4double dx = fPlanes[i].a*p.x() +
@@ -716,45 +710,39 @@ G4ThreeVector G4Trap::SurfaceNormal( const G4ThreeVector& p ) const
nx = fPlanes[i].a;
ny += fPlanes[i].b;
nz += fPlanes[i].c;
++nsurf;
break;
}
break;
}
case 2: // YZ section is a rectangle and
{ // XZ section is an isosceles trapezoid
case 2: // YZ section - rectangle, XZ section - isosceles trapezoid
{
G4double dy = std::abs(p.y()) + fPlanes[1].d;
if (std::abs(dy) <= halfCarTolerance) ny = (p.y() < 0) ? -1 : 1;
ny = std::copysign(G4double(std::abs(dy) <= halfCarTolerance), p.y());
G4double dx = fPlanes[3].a*std::abs(p.x()) +
fPlanes[3].c*p.z() + fPlanes[3].d;
if (std::abs(dx) <= halfCarTolerance)
{
nx = (p.x() < 0) ? -fPlanes[3].a : fPlanes[3].a;
nz += fPlanes[3].c;
++nsurf;
}
G4double k = std::abs(dx) <= halfCarTolerance;
nx = std::copysign(k, p.x())*fPlanes[3].a;
nz += k*fPlanes[3].c;
break;
}
case 3: // YZ section is a rectangle and
{ // XY section is an isosceles trapezoid
case 3: // YZ section - rectangle, XY section - isosceles trapezoid
{
G4double dy = std::abs(p.y()) + fPlanes[1].d;
if (std::abs(dy) <= halfCarTolerance) ny = (p.y() < 0) ? -1 : 1;
ny = std::copysign(G4double(std::abs(dy) <= halfCarTolerance), p.y());
G4double dx = fPlanes[3].a*std::abs(p.x()) +
fPlanes[3].b*p.y() + fPlanes[3].d;
if (std::abs(dx) <= halfCarTolerance)
{
nx = (p.x() < 0) ? -fPlanes[3].a : fPlanes[3].a;
ny += fPlanes[3].b;
++nsurf;
}
G4double k = std::abs(dx) <= halfCarTolerance;
nx = std::copysign(k, p.x())*fPlanes[3].a;
ny += k*fPlanes[3].b;
break;
}
}
// Return normal
//
if (nsurf == 1) return G4ThreeVector(nx,ny,nz);
else if (nsurf != 0) return G4ThreeVector(nx,ny,nz).unit(); // edge or corner
G4double mag2 = nx*nx + ny*ny + nz*nz;
if (mag2 == 1) return G4ThreeVector(nx,ny,nz);
else if (mag2 != 0) return G4ThreeVector(nx,ny,nz).unit(); // edge or corner
else
{
// Point is not on the surface
+4
View File
@@ -16,6 +16,10 @@ committal in the CVS repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
December 10, 2019 B.Morgan - geomsolids-V10-06-00
- Cleanup CMake build, removing obsolete granular library options and
explicit include_directories.
June 3, 2019 J.Apostolakis - geomsolids-V10-05-00
- Change CMakeLists.txt in test directories to allow optional use
with integrate testing or via one-target builds using G4TARGET
@@ -1,17 +0,0 @@
#------------------------------------------------------------------------------
# CMakeLists.txt
# Module : G4specsolids
# Package: Geant4.src.G4geometry..G4specsolids
#
# CMakeLists.txt for building a single granular library.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
if(GEANT4_BUILD_GRANULAR_LIBS)
include(Geant4MacroLibraryTargets)
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
endif()
+22 -8
View File
@@ -16,28 +16,42 @@ committal in the source repository !
* Reverse chronological order (last date on top), please *
----------------------------------------------------------
21-May-2020 G.Lima (geom-specific-V10-05-23)
- Fix constructor signatures in G4UExtrudedSolid wrapper.
May 21, 2020 Guilherme Lima (geom-specific-V10-06-08)
----------------------------
- Fix constructor signatures in G4UExtrudedSolid wrappers, to match those in G4 version.
There were missing const and reference qualifiers in non-POD parameters.
17-January-2020 E.Tcherniaev (geom-specific-V10-05-22)
30-April-2020 G.Cosmo (geom-specific-V10-06-07)
- Adopt new convention for location of headers in VecGeom for all wrappers.
09-April-2020 E.Tcherniaev (geom-specific-V10-06-06)
- Added G4GenericTrap::GetTwistedFaceSurfaceArea().
- testG4GenericTrap.cc: fixed test for calculation of surface area.
- testG4ExtrudedSolid.cc: fixed assert statements for cases where
point flys along the surface (DistanceToIn() returns kInfinity).
17-January-2020 E.Tcherniaev (geom-specific-V10-06-05)
- Implemented G4Tet::SetVertices(), it addresses request made
at Geant4 Technical Forum.
14-January-2020 G.Cosmo
14-January-2020 Gabriele Cosmo (geom-specific-V10-06-04)
- Added protection in G4VFacet header for double definition of global
symbols from Windows Kits code.
08-January-2020 E.Tcherniaev
08-January-2020 E.Tcherniaev (geom-specific-V10-06-03)
- Complete revision of G4Tet, speed up, new testG4Tet.cc.
It also fixes issues spotted by new unit test.
16-December-2019 E.Tcherniaev
16-December-2019 E.Tcherniaev (geom-specific-V10-06-02)
- Complete revision of G4Ellipsoid, it fixes issues with former
implementation, in particular it addresses problem report #2206.
30%-70% speed-up in all main methods
30%-70% speed-up in all main methods.
10-December-2019 G.Cosmo
11-December-2019 B.Morgan (geom-specific-V10-06-01)
- Cleanup CMake build, removing obsolete granular library options and
explicit include_directories.
10-December-2019 G.Cosmo (geom-specific-V10-06-00)
- Re-established parameterisation mechanism for G4Tet and G4UTet which was
removed by mistake. Addressing problem report #2209.
@@ -185,6 +185,10 @@ class G4GenericTrap : public G4VSolid
const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3) const;
G4double GetTwistedFaceSurfaceArea(const G4ThreeVector& p0,
const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3) const;
G4double GetFaceCubicVolume(const G4ThreeVector& p0,
const G4ThreeVector& p1,
const G4ThreeVector& p2,
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedEllipsoid.h>
#include <VecGeom/volumes/UnplacedEllipsoid.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedEllipticalCone.h>
#include <VecGeom/volumes/UnplacedEllipticalCone.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedEllipticalTube.h>
#include <VecGeom/volumes/UnplacedEllipticalTube.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedExtruded.h>
#include <VecGeom/volumes/UnplacedExtruded.h>
#include "G4TwoVector.hh"
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedGenericPolycone.h>
#include <VecGeom/volumes/UnplacedGenericPolycone.h>
#include "G4TwoVector.hh"
#include "G4PolyconeSide.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedGenTrap.h>
#include <VecGeom/volumes/UnplacedGenTrap.h>
#include "G4TwoVector.hh"
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedHype.h>
#include <VecGeom/volumes/UnplacedHype.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedParaboloid.h>
#include <VecGeom/volumes/UnplacedParaboloid.h>
#include "G4Polyhedron.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedPolycone.h>
#include <VecGeom/volumes/UnplacedPolycone.h>
#include "G4TwoVector.hh"
#include "G4PolyconeSide.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedPolyhedron.h>
#include <VecGeom/volumes/UnplacedPolyhedron.h>
#include "G4TwoVector.hh"
#include "G4PolyhedraSide.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedTessellated.h>
#include <VecGeom/volumes/UnplacedTessellated.h>
#include "G4Polyhedron.hh"
#include "G4VFacet.hh"
@@ -38,7 +38,7 @@
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
#include <volumes/UnplacedTet.h>
#include <VecGeom/volumes/UnplacedTet.h>
#include "G4Polyhedron.hh"
+143 -171
View File
@@ -1,182 +1,154 @@
#------------------------------------------------------------------------------
# sources.cmake
# Module : G4specsolids
# Package: Geant4.src.G4geometry.G4specsolids
#
# Sources description for a library.
# Lists the sources and headers of the code explicitely.
# Lists include paths needed.
# Lists the internal granular and global dependencies of the library.
# Source specific properties should be added at the end.
#
# Generated on : 24/9/2010
#
#
#------------------------------------------------------------------------------
# List external includes needed.
include_directories(${CLHEP_INCLUDE_DIRS})
include_directories(${USOLIDS_INCLUDE_DIRS})
# List internal includes needed.
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/CSG/include)
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
#
# Define the Geant4 Module.
#
include(Geant4MacroDefineModule)
GEANT4_DEFINE_MODULE(NAME G4specsolids
HEADERS
G4ClippablePolygon.hh
G4ClippablePolygon.icc
G4Ellipsoid.hh
G4Ellipsoid.icc
G4EllipticalCone.hh
G4EllipticalCone.icc
G4EllipticalTube.hh
G4EllipticalTube.icc
G4EnclosingCylinder.hh
G4ExtrudedSolid.hh
G4ExtrudedSolid.icc
G4GenericPolycone.hh
G4GenericPolycone.icc
G4GenericTrap.hh
G4GenericTrap.icc
G4Hype.hh
G4Hype.icc
G4IntersectingCone.hh
G4Paraboloid.hh
G4Paraboloid.icc
G4PolyPhiFace.hh
G4PolyPhiFace.icc
G4Polycone.hh
G4Polycone.icc
G4PolyconeHistorical.hh
G4PolyconeSide.hh
G4Polyhedra.hh
G4Polyhedra.icc
G4PolyhedraHistorical.hh
G4PolyhedraSide.hh
G4QuadrangularFacet.hh
G4ReduciblePolygon.hh
G4SolidExtentList.hh
G4SolidsWorkspace.hh
G4SurfBits.hh
G4TessellatedGeometryAlgorithms.hh
G4TessellatedSolid.hh
G4Tet.hh
G4TriangularFacet.hh
G4TwistBoxSide.hh
G4TwistTrapAlphaSide.hh
G4TwistTrapFlatSide.hh
G4TwistTrapParallelSide.hh
G4TwistTubsFlatSide.hh
G4TwistTubsHypeSide.hh
G4TwistTubsSide.hh
G4TwistedBox.hh
G4TwistedTrap.hh
G4TwistedTrd.hh
G4TwistedTubs.hh
G4UEllipsoid.hh
G4UEllipticalCone.hh
G4UEllipticalTube.hh
G4UExtrudedSolid.hh
G4UGenericPolycone.hh
G4UGenericTrap.hh
G4UHype.hh
G4UParaboloid.hh
G4UPolycone.hh
G4UPolyhedra.hh
G4UHype.hh
G4UTessellatedSolid.hh
G4UTet.hh
G4VCSGface.hh
G4VCSGfaceted.hh
G4VFacet.hh
G4Voxelizer.hh
G4Voxelizer.icc
G4VTwistSurface.hh
G4VTwistSurface.icc
G4VTwistedFaceted.hh
SOURCES
G4ClippablePolygon.cc
G4Ellipsoid.cc
G4EllipticalCone.cc
G4EllipticalTube.cc
G4EnclosingCylinder.cc
G4ExtrudedSolid.cc
G4GenericPolycone.cc
G4GenericTrap.cc
G4Hype.cc
G4IntersectingCone.cc
G4Paraboloid.cc
G4PolyPhiFace.cc
G4Polycone.cc
G4PolyconeHistorical.cc
G4PolyconeSide.cc
G4Polyhedra.cc
G4PolyhedraHistorical.cc
G4PolyhedraSide.cc
G4QuadrangularFacet.cc
G4ReduciblePolygon.cc
G4SolidExtentList.cc
G4SolidsWorkspace.cc
G4SurfBits.cc
G4TessellatedGeometryAlgorithms.cc
G4TessellatedSolid.cc
G4Tet.cc
G4TriangularFacet.cc
G4TwistBoxSide.cc
G4TwistTrapAlphaSide.cc
G4TwistTrapFlatSide.cc
G4TwistTrapParallelSide.cc
G4TwistTubsFlatSide.cc
G4TwistTubsHypeSide.cc
G4TwistTubsSide.cc
G4TwistedBox.cc
G4TwistedTrap.cc
G4TwistedTrd.cc
G4TwistedTubs.cc
G4UEllipsoid.cc
G4UEllipticalCone.cc
G4UEllipticalTube.cc
G4UExtrudedSolid.cc
G4UGenericPolycone.cc
G4UGenericTrap.cc
G4UHype.cc
G4UParaboloid.cc
G4UPolycone.cc
G4UPolyhedra.cc
G4UTessellatedSolid.cc
G4UTet.cc
G4VCSGfaceted.cc
G4VFacet.cc
G4Voxelizer.cc
G4VTwistSurface.cc
G4VTwistedFaceted.cc
GRANULAR_DEPENDENCIES
G4csg
G4geometrymng
G4globman
G4graphics_reps
G4hepnumerics
G4intercoms
G4volumes
GLOBAL_DEPENDENCIES
G4global
G4graphics_reps
G4intercoms
LINK_LIBRARIES
${VECGEOM_LIBRARIES}
geant4_define_module(NAME G4specsolids
HEADERS
G4ClippablePolygon.hh
G4ClippablePolygon.icc
G4Ellipsoid.hh
G4Ellipsoid.icc
G4EllipticalCone.hh
G4EllipticalCone.icc
G4EllipticalTube.hh
G4EllipticalTube.icc
G4EnclosingCylinder.hh
G4ExtrudedSolid.hh
G4ExtrudedSolid.icc
G4GenericPolycone.hh
G4GenericPolycone.icc
G4GenericTrap.hh
G4GenericTrap.icc
G4Hype.hh
G4Hype.icc
G4IntersectingCone.hh
G4Paraboloid.hh
G4Paraboloid.icc
G4PolyPhiFace.hh
G4PolyPhiFace.icc
G4Polycone.hh
G4Polycone.icc
G4PolyconeHistorical.hh
G4PolyconeSide.hh
G4Polyhedra.hh
G4Polyhedra.icc
G4PolyhedraHistorical.hh
G4PolyhedraSide.hh
G4QuadrangularFacet.hh
G4ReduciblePolygon.hh
G4SolidExtentList.hh
G4SolidsWorkspace.hh
G4SurfBits.hh
G4TessellatedGeometryAlgorithms.hh
G4TessellatedSolid.hh
G4Tet.hh
G4TriangularFacet.hh
G4TwistBoxSide.hh
G4TwistTrapAlphaSide.hh
G4TwistTrapFlatSide.hh
G4TwistTrapParallelSide.hh
G4TwistTubsFlatSide.hh
G4TwistTubsHypeSide.hh
G4TwistTubsSide.hh
G4TwistedBox.hh
G4TwistedTrap.hh
G4TwistedTrd.hh
G4TwistedTubs.hh
G4UEllipsoid.hh
G4UEllipticalCone.hh
G4UEllipticalTube.hh
G4UExtrudedSolid.hh
G4UGenericPolycone.hh
G4UGenericTrap.hh
G4UHype.hh
G4UParaboloid.hh
G4UPolycone.hh
G4UPolyhedra.hh
G4UHype.hh
G4UTessellatedSolid.hh
G4UTet.hh
G4VCSGface.hh
G4VCSGfaceted.hh
G4VFacet.hh
G4Voxelizer.hh
G4Voxelizer.icc
G4VTwistSurface.hh
G4VTwistSurface.icc
G4VTwistedFaceted.hh
SOURCES
G4ClippablePolygon.cc
G4Ellipsoid.cc
G4EllipticalCone.cc
G4EllipticalTube.cc
G4EnclosingCylinder.cc
G4ExtrudedSolid.cc
G4GenericPolycone.cc
G4GenericTrap.cc
G4Hype.cc
G4IntersectingCone.cc
G4Paraboloid.cc
G4PolyPhiFace.cc
G4Polycone.cc
G4PolyconeHistorical.cc
G4PolyconeSide.cc
G4Polyhedra.cc
G4PolyhedraHistorical.cc
G4PolyhedraSide.cc
G4QuadrangularFacet.cc
G4ReduciblePolygon.cc
G4SolidExtentList.cc
G4SolidsWorkspace.cc
G4SurfBits.cc
G4TessellatedGeometryAlgorithms.cc
G4TessellatedSolid.cc
G4Tet.cc
G4TriangularFacet.cc
G4TwistBoxSide.cc
G4TwistTrapAlphaSide.cc
G4TwistTrapFlatSide.cc
G4TwistTrapParallelSide.cc
G4TwistTubsFlatSide.cc
G4TwistTubsHypeSide.cc
G4TwistTubsSide.cc
G4TwistedBox.cc
G4TwistedTrap.cc
G4TwistedTrd.cc
G4TwistedTubs.cc
G4UEllipsoid.cc
G4UEllipticalCone.cc
G4UEllipticalTube.cc
G4UExtrudedSolid.cc
G4UGenericPolycone.cc
G4UGenericTrap.cc
G4UHype.cc
G4UParaboloid.cc
G4UPolycone.cc
G4UPolyhedra.cc
G4UTessellatedSolid.cc
G4UTet.cc
G4VCSGfaceted.cc
G4VFacet.cc
G4Voxelizer.cc
G4VTwistSurface.cc
G4VTwistedFaceted.cc
GRANULAR_DEPENDENCIES
G4csg
G4geometrymng
G4globman
G4graphics_reps
G4hepnumerics
G4intercoms
G4volumes
GLOBAL_DEPENDENCIES
G4global
G4graphics_reps
G4intercoms
LINK_LIBRARIES
${VECGEOM_LIBRARIES}
)
# List any source specific properties here
@@ -1383,31 +1383,36 @@ G4ThreeVector G4GenericTrap::GetPointOnSurface() const
G4double G4GenericTrap::GetSurfaceArea()
{
// Set vertices
G4ThreeVector v0(fVertices[0].x(),fVertices[0].y(),-fDz);
G4ThreeVector v1(fVertices[1].x(),fVertices[1].y(),-fDz);
G4ThreeVector v2(fVertices[2].x(),fVertices[2].y(),-fDz);
G4ThreeVector v3(fVertices[3].x(),fVertices[3].y(),-fDz);
G4ThreeVector v4(fVertices[4].x(),fVertices[4].y(), fDz);
G4ThreeVector v5(fVertices[5].x(),fVertices[5].y(), fDz);
G4ThreeVector v6(fVertices[6].x(),fVertices[6].y(), fDz);
G4ThreeVector v7(fVertices[7].x(),fVertices[7].y(), fDz);
// Find Surface Area
if (fSurfaceArea == 0.0)
{
if(fIsTwisted)
{
fSurfaceArea = G4VSolid::GetSurfaceArea();
fSurfaceArea = GetFaceSurfaceArea(v0,v1,v2,v3) // -fDz plane
+ GetTwistedFaceSurfaceArea(v1,v0,v4,v5) // Lat plane
+ GetTwistedFaceSurfaceArea(v2,v1,v5,v6) // Lat plane
+ GetTwistedFaceSurfaceArea(v3,v2,v6,v7) // Lat plane
+ GetTwistedFaceSurfaceArea(v0,v3,v7,v4) // Lat plane
+ GetFaceSurfaceArea(v7,v6,v5,v4); // +fDz plane
}
else
else
{
// Set vertices
G4ThreeVector vertix0(fVertices[0].x(),fVertices[0].y(),-fDz);
G4ThreeVector vertix1(fVertices[1].x(),fVertices[1].y(),-fDz);
G4ThreeVector vertix2(fVertices[2].x(),fVertices[2].y(),-fDz);
G4ThreeVector vertix3(fVertices[3].x(),fVertices[3].y(),-fDz);
G4ThreeVector vertix4(fVertices[4].x(),fVertices[4].y(), fDz);
G4ThreeVector vertix5(fVertices[5].x(),fVertices[5].y(), fDz);
G4ThreeVector vertix6(fVertices[6].x(),fVertices[6].y(), fDz);
G4ThreeVector vertix7(fVertices[7].x(),fVertices[7].y(), fDz);
// Find Surface Area
fSurfaceArea = GetFaceSurfaceArea(vertix0,vertix1,vertix2,vertix3) // -fDz plane
+ GetFaceSurfaceArea(vertix1,vertix0,vertix4,vertix5) // Lat plane
+ GetFaceSurfaceArea(vertix2,vertix1,vertix5,vertix6) // Lat plane
+ GetFaceSurfaceArea(vertix3,vertix2,vertix6,vertix7) // Lat plane
+ GetFaceSurfaceArea(vertix0,vertix3,vertix7,vertix4) // Lat plane
+ GetFaceSurfaceArea(vertix7,vertix6,vertix5,vertix4); // +fDz plane
fSurfaceArea = GetFaceSurfaceArea(v0,v1,v2,v3) // -fDz plane
+ GetFaceSurfaceArea(v1,v0,v4,v5) // Lat plane
+ GetFaceSurfaceArea(v2,v1,v5,v6) // Lat plane
+ GetFaceSurfaceArea(v3,v2,v6,v7) // Lat plane
+ GetFaceSurfaceArea(v0,v3,v7,v4) // Lat plane
+ GetFaceSurfaceArea(v7,v6,v5,v4); // +fDz plane
}
}
return fSurfaceArea;
@@ -1426,22 +1431,22 @@ G4double G4GenericTrap::GetCubicVolume()
else
{
// Set vertices
G4ThreeVector vertix0(fVertices[0].x(),fVertices[0].y(),-fDz);
G4ThreeVector vertix1(fVertices[1].x(),fVertices[1].y(),-fDz);
G4ThreeVector vertix2(fVertices[2].x(),fVertices[2].y(),-fDz);
G4ThreeVector vertix3(fVertices[3].x(),fVertices[3].y(),-fDz);
G4ThreeVector vertix4(fVertices[4].x(),fVertices[4].y(), fDz);
G4ThreeVector vertix5(fVertices[5].x(),fVertices[5].y(), fDz);
G4ThreeVector vertix6(fVertices[6].x(),fVertices[6].y(), fDz);
G4ThreeVector vertix7(fVertices[7].x(),fVertices[7].y(), fDz);
G4ThreeVector v0(fVertices[0].x(),fVertices[0].y(),-fDz);
G4ThreeVector v1(fVertices[1].x(),fVertices[1].y(),-fDz);
G4ThreeVector v2(fVertices[2].x(),fVertices[2].y(),-fDz);
G4ThreeVector v3(fVertices[3].x(),fVertices[3].y(),-fDz);
G4ThreeVector v4(fVertices[4].x(),fVertices[4].y(), fDz);
G4ThreeVector v5(fVertices[5].x(),fVertices[5].y(), fDz);
G4ThreeVector v6(fVertices[6].x(),fVertices[6].y(), fDz);
G4ThreeVector v7(fVertices[7].x(),fVertices[7].y(), fDz);
// Find Cubic Volume
fCubicVolume = GetFaceCubicVolume(vertix0,vertix1,vertix2,vertix3) // -fDz plane
+ GetFaceCubicVolume(vertix1,vertix0,vertix4,vertix5) // Lat plane
+ GetFaceCubicVolume(vertix2,vertix1,vertix5,vertix6) // Lat plane
+ GetFaceCubicVolume(vertix3,vertix2,vertix6,vertix7) // Lat plane
+ GetFaceCubicVolume(vertix0,vertix3,vertix7,vertix4) // Lat plane
+ GetFaceCubicVolume(vertix7,vertix6,vertix5,vertix4); // +fDz plane
fCubicVolume = GetFaceCubicVolume(v0,v1,v2,v3) // -fDz plane
+ GetFaceCubicVolume(v1,v0,v4,v5) // Lat plane
+ GetFaceCubicVolume(v2,v1,v5,v6) // Lat plane
+ GetFaceCubicVolume(v3,v2,v6,v7) // Lat plane
+ GetFaceCubicVolume(v0,v3,v7,v4) // Lat plane
+ GetFaceCubicVolume(v7,v6,v5,v4); // +fDz plane
}
}
return fCubicVolume;
@@ -1450,12 +1455,44 @@ G4double G4GenericTrap::GetCubicVolume()
// --------------------------------------------------------------------
G4double G4GenericTrap::GetFaceSurfaceArea(const G4ThreeVector& p0,
const G4ThreeVector& p1,
const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3) const
{
// Returns area of the facet
return (((p2-p0).cross(p3-p1)).mag()) / 2.;
return 0.5*((p2-p0).cross(p3-p1)).mag();
}
// --------------------------------------------------------------------
G4double
G4GenericTrap::GetTwistedFaceSurfaceArea(const G4ThreeVector& p0,
const G4ThreeVector& p1,
const G4ThreeVector& p2,
const G4ThreeVector& p3) const
{
G4int nstep = 100;
G4ThreeVector dels1 = (p1 - p0)/nstep;
G4ThreeVector dels2 = (p2 - p3)/nstep;
G4double area = 0;
for (G4int is = 0; is < nstep; ++is)
{
G4ThreeVector s0 = p0 + dels1*is;
G4ThreeVector s1 = s0 + dels1;
G4ThreeVector s3 = p3 + dels2*is;
G4ThreeVector s2 = s3 + dels2;
G4ThreeVector delt1 = (s3 - s0)/nstep;
G4ThreeVector delt2 = (s2 - s1)/nstep;
for (G4int it = 0; it < nstep; ++it)
{
G4ThreeVector t0 = s0 + delt1*it;
G4ThreeVector t1 = t0 + delt1;
G4ThreeVector t3 = s1 + delt2*it;
G4ThreeVector t2 = t3 + delt2;
area += 0.5*((t2-t0).cross(t3-t1)).mag();
}
}
return area;
}
// --------------------------------------------------------------------