Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -15,6 +15,18 @@ commit in the repository !
|
||||
----------------------------------------------------------
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
September 28, 2021 G.Cosmo (geommng-V10-07-07)
|
||||
- Use G4Allocator to dynamically allocate nodes and proxies for the
|
||||
voxels optimisation structure. Should help reducing memory fragmentation.
|
||||
|
||||
September 24, 2021 G.Cosmo (geommng-V10-07-06)
|
||||
- Basic clang-tidy review of code.
|
||||
|
||||
August 31, 2021 B.Morgan (geommng-V10-07-05)
|
||||
- Provide operator<< as a free function for G4UAdapter to support Geant4Py
|
||||
- Make operator<< for G4VSolid a free function
|
||||
|
||||
June 15, 2021 J.Apostolakis (geommng-V10-07-04)
|
||||
- G4UAdapter: added std::ostream& operator << to avoid compilation clash
|
||||
between similar methods for G4VSolid and VecGeom UnplacedVolume.
|
||||
|
||||
@@ -88,7 +88,7 @@ class G4AffineTransform
|
||||
const G4ThreeVector& tlate);
|
||||
// Optionally rotate by *rot then translate by tlate - rot may be null
|
||||
|
||||
inline G4AffineTransform(const G4AffineTransform& rhs);
|
||||
inline G4AffineTransform(const G4AffineTransform& rhs) = default;
|
||||
inline G4AffineTransform(G4AffineTransform&& rhs) = default;
|
||||
// Copy and move constructors
|
||||
|
||||
@@ -96,7 +96,7 @@ class G4AffineTransform
|
||||
inline G4AffineTransform& operator=(G4AffineTransform&& rhs) = default;
|
||||
// Assignment & Move operators
|
||||
|
||||
inline ~G4AffineTransform();
|
||||
inline ~G4AffineTransform() = default;
|
||||
// Destructor
|
||||
|
||||
inline G4AffineTransform operator * (const G4AffineTransform& tf) const;
|
||||
|
||||
@@ -86,13 +86,6 @@ G4AffineTransform( const G4double prxx,const G4double prxy,const G4double prxz,
|
||||
tx(ptx),ty(pty),tz(ptz)
|
||||
{}
|
||||
|
||||
inline G4AffineTransform::G4AffineTransform(const G4AffineTransform& rhs)
|
||||
: rxx(rhs.rxx),rxy(rhs.rxy),rxz(rhs.rxz),
|
||||
ryx(rhs.ryx),ryy(rhs.ryy),ryz(rhs.ryz),
|
||||
rzx(rhs.rzx),rzy(rhs.rzy),rzz(rhs.rzz),
|
||||
tx(rhs.tx),ty(rhs.ty),tz(rhs.tz)
|
||||
{}
|
||||
|
||||
inline G4AffineTransform&
|
||||
G4AffineTransform::operator = (const G4AffineTransform& rhs)
|
||||
{
|
||||
@@ -104,9 +97,6 @@ G4AffineTransform::operator = (const G4AffineTransform& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline G4AffineTransform::~G4AffineTransform()
|
||||
{}
|
||||
|
||||
inline G4AffineTransform
|
||||
G4AffineTransform::operator * (const G4AffineTransform& tf) const
|
||||
{
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
// 24.7.96, P.Kent - Separated from G4Navigator
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4BLOCKINGLIST_HH
|
||||
#define G4BLOCKINGLIST_HH
|
||||
#define G4BLOCKINGLIST_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include <vector>
|
||||
@@ -52,13 +52,13 @@ const G4int kBlockTagNoMax = 2147483647; // 2^31-1 maximum tag no may reach
|
||||
|
||||
class G4BlockingList
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4BlockingList(G4int maxDefault = kBlockingListMaxDefault,
|
||||
G4int stride = kBlockingListStride);
|
||||
// Create empty blocking List of default size and `stride' resize count.
|
||||
|
||||
~G4BlockingList();
|
||||
~G4BlockingList() = default;
|
||||
// Destructor. No operations.
|
||||
|
||||
void Reset();
|
||||
|
||||
@@ -68,12 +68,12 @@ class G4BoundingEnvelope
|
||||
// should have equal numbers of vertices except first and last
|
||||
// polygons which may consist of a single vertex
|
||||
|
||||
G4BoundingEnvelope(const G4ThreeVector& pMin,
|
||||
G4BoundingEnvelope(const G4ThreeVector& pMin,
|
||||
const G4ThreeVector& pMax,
|
||||
const std::vector<const G4ThreeVectorList*>& polygons);
|
||||
// Constructor from AABB and a sequence of polygons
|
||||
|
||||
~G4BoundingEnvelope();
|
||||
~G4BoundingEnvelope() = default;
|
||||
// Destructor
|
||||
|
||||
G4bool BoundingBoxVsVoxelLimits(const EAxis pAxis,
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
// Created: P.Arce, September 2004
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ErrorCylSurfaceTarget_hh
|
||||
#define G4ErrorCylSurfaceTarget_hh
|
||||
#ifndef G4ERRORCYLSURFACETARGET_HH
|
||||
#define G4ERRORCYLSURFACETARGET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ErrorSurfaceTarget.hh"
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
class G4ErrorCylSurfaceTarget : public G4ErrorSurfaceTarget
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4ErrorCylSurfaceTarget( const G4double& radius,
|
||||
const G4ThreeVector& trans=G4ThreeVector(),
|
||||
@@ -54,7 +54,7 @@ class G4ErrorCylSurfaceTarget : public G4ErrorSurfaceTarget
|
||||
const G4AffineTransform& trans );
|
||||
// Constructs cylindrical surface by radius and affine transformation
|
||||
|
||||
~G4ErrorCylSurfaceTarget();
|
||||
~G4ErrorCylSurfaceTarget() = default;
|
||||
|
||||
virtual G4ThreeVector IntersectLocal( const G4ThreeVector& point,
|
||||
const G4ThreeVector& direc ) const;
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
// Created: P.Arce, September 2004
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ErrorPlaneSurfaceTarget_hh
|
||||
#define G4ErrorPlaneSurfaceTarget_hh
|
||||
#ifndef G4ERRORPLANESURFACETARGET_HH
|
||||
#define G4ERRORPLANESURFACETARGET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ErrorSurfaceTarget.hh"
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
class G4ErrorPlaneSurfaceTarget : public G4ErrorSurfaceTarget, G4Plane3D
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4ErrorPlaneSurfaceTarget(G4double a=0., G4double b=0.,
|
||||
G4double c=0., G4double d=0.);
|
||||
@@ -56,7 +56,7 @@ class G4ErrorPlaneSurfaceTarget : public G4ErrorSurfaceTarget, G4Plane3D
|
||||
const G4Point3D& p3);
|
||||
// Constructs plane by three points
|
||||
|
||||
~G4ErrorPlaneSurfaceTarget();
|
||||
~G4ErrorPlaneSurfaceTarget() = default;
|
||||
|
||||
virtual G4ThreeVector Intersect( const G4ThreeVector& point,
|
||||
const G4ThreeVector& direc ) const;
|
||||
@@ -74,7 +74,6 @@ class G4ErrorPlaneSurfaceTarget : public G4ErrorSurfaceTarget, G4Plane3D
|
||||
|
||||
virtual void Dump( const G4String& msg ) const;
|
||||
// Dump plane surface parameter
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,9 +31,8 @@
|
||||
|
||||
// Created: P.Arce, September 2004
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifndef G4ErrorSurfaceTarget_hh
|
||||
#define G4ErrorSurfaceTarget_hh
|
||||
#ifndef G4ERRORSURFACETARGET_HH
|
||||
#define G4ERRORSURFACETARGET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
@@ -42,10 +41,10 @@
|
||||
|
||||
class G4ErrorSurfaceTarget : public G4ErrorTanPlaneTarget
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4ErrorSurfaceTarget();
|
||||
virtual ~G4ErrorSurfaceTarget();
|
||||
virtual ~G4ErrorSurfaceTarget() = default;
|
||||
|
||||
virtual double GetDistanceFromPoint( const G4ThreeVector& point,
|
||||
const G4ThreeVector& direc ) const = 0;
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
// Created: P.Arce, September 2004
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ErrorTanPlaneTarget_hh
|
||||
#define G4ErrorTanPlaneTarget_hh
|
||||
#ifndef G4ERRORTANPLANETARGET_HH
|
||||
#define G4ERRORTANPLANETARGET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
@@ -42,17 +42,16 @@
|
||||
class G4ErrorTanPlaneTarget : public G4ErrorTarget
|
||||
{
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4ErrorTanPlaneTarget();
|
||||
virtual ~G4ErrorTanPlaneTarget();
|
||||
virtual ~G4ErrorTanPlaneTarget() = default;
|
||||
|
||||
virtual G4Plane3D GetTangentPlane( const G4ThreeVector& point ) const = 0;
|
||||
// Get tangent plane at point
|
||||
|
||||
virtual void Dump( const G4String& msg ) const = 0;
|
||||
// Dump surface
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
// Created: P.Arce, September 2004
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4ErrorTarget_hh
|
||||
#define G4ErrorTarget_hh
|
||||
#ifndef G4ERRORTARGET_HH
|
||||
#define G4ERRORTARGET_HH 1
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
@@ -45,10 +45,10 @@ enum G4ErrorTargetType{ G4ErrorTarget_PlaneSurface,
|
||||
G4ErrorTarget_TrkL };
|
||||
class G4ErrorTarget
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4ErrorTarget();
|
||||
virtual ~G4ErrorTarget();
|
||||
virtual ~G4ErrorTarget() = default;
|
||||
|
||||
virtual G4double GetDistanceFromPoint( const G4ThreeVector&,
|
||||
const G4ThreeVector& ) const;
|
||||
|
||||
@@ -40,9 +40,10 @@
|
||||
// 26.07.95, P.Kent - Initial version, including optimisation build
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4GEOMETRYMANAGER_HH
|
||||
#define G4GEOMETRYMANAGER_HH
|
||||
#define G4GEOMETRYMANAGER_HH 1
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4SmartVoxelStat.hh"
|
||||
|
||||
@@ -50,7 +51,7 @@ class G4VPhysicalVolume;
|
||||
|
||||
class G4GeometryManager
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4bool CloseGeometry(G4bool pOptimise = true, G4bool verbose = false,
|
||||
G4VPhysicalVolume* vol = nullptr);
|
||||
@@ -77,15 +78,15 @@ class G4GeometryManager
|
||||
static G4GeometryManager* GetInstanceIfExist();
|
||||
// Return ptr to singleton instance.
|
||||
|
||||
public: // without description
|
||||
public:
|
||||
|
||||
~G4GeometryManager();
|
||||
// Destructor.
|
||||
|
||||
protected:
|
||||
|
||||
G4GeometryManager();
|
||||
// Protected constructor
|
||||
G4GeometryManager() = default;
|
||||
// Protected constructor. Set the geometry to be open
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -37,8 +37,8 @@
|
||||
|
||||
// First version: Nov 19, 2002 - Jacek Generowicz
|
||||
// ------------------------------------------------------------------------
|
||||
#ifndef G4IdentityTrajectoryFilter_hh
|
||||
#define G4IdentityTrajectoryFilter_hh
|
||||
#ifndef G4IDENTITYTRAJECTORYFILTER_HH
|
||||
#define G4IDENTITYTRAJECTORYFILTER_HH 1
|
||||
|
||||
#include "G4VCurvedTrajectoryFilter.hh"
|
||||
#include "G4ThreeVector.hh"
|
||||
@@ -46,10 +46,10 @@
|
||||
class G4IdentityTrajectoryFilter : public G4VCurvedTrajectoryFilter
|
||||
{
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4IdentityTrajectoryFilter();
|
||||
virtual ~G4IdentityTrajectoryFilter();
|
||||
G4IdentityTrajectoryFilter() = default;
|
||||
virtual ~G4IdentityTrajectoryFilter() = default;
|
||||
|
||||
G4IdentityTrajectoryFilter(const G4IdentityTrajectoryFilter&) = delete;
|
||||
G4IdentityTrajectoryFilter& operator=(const G4IdentityTrajectoryFilter&) = delete;
|
||||
@@ -60,4 +60,4 @@ class G4IdentityTrajectoryFilter : public G4VCurvedTrajectoryFilter
|
||||
// to consider keeping or rejecting
|
||||
};
|
||||
|
||||
#endif /* G4IdentityTrajectoryFilter_hh */
|
||||
#endif
|
||||
|
||||
@@ -49,11 +49,11 @@
|
||||
// G4SurfaceProperty* theSurfaceProperty
|
||||
// G4TransitionRadiationSurface* theTransRadSurface
|
||||
|
||||
// Created: 1997, June, 4th to 17th
|
||||
// Author: John Apostolakis, (with help of Peter Gumplinger)
|
||||
// Created: 1997, June, 4th to 17th
|
||||
// Author: John Apostolakis, (with help of Peter Gumplinger)
|
||||
// ------------------------------------------------------------------------
|
||||
#ifndef G4LogicalSurface_h
|
||||
#define G4LogicalSurface_h 1
|
||||
#ifndef G4LOGICALSURFACE_HH
|
||||
#define G4LOGICALSURFACE_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4String.hh"
|
||||
@@ -64,7 +64,7 @@ class G4TransitionRadiationSurface;
|
||||
class G4LogicalSurface
|
||||
{
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
inline G4SurfaceProperty* GetSurfaceProperty() const;
|
||||
inline void SetSurfaceProperty(G4SurfaceProperty* ptrSurfaceProperty);
|
||||
@@ -75,9 +75,7 @@ class G4LogicalSurface
|
||||
inline G4TransitionRadiationSurface* GetTransitionRadiationSurface() const;
|
||||
inline void SetTransitionRadiationSurface(G4TransitionRadiationSurface* trs);
|
||||
|
||||
public: // without description
|
||||
|
||||
virtual ~G4LogicalSurface();
|
||||
virtual ~G4LogicalSurface() = default;
|
||||
|
||||
G4LogicalSurface(const G4LogicalSurface&) = delete;
|
||||
G4LogicalSurface& operator=(const G4LogicalSurface&) = delete;
|
||||
@@ -102,4 +100,4 @@ class G4LogicalSurface
|
||||
|
||||
#include "G4LogicalSurface.icc"
|
||||
|
||||
#endif /* G4LogicalSurface_h */
|
||||
#endif
|
||||
|
||||
@@ -98,12 +98,11 @@
|
||||
// 18.04.01 G.Cosmo: Migrated to STL vector
|
||||
// 12.02.99 S.Giani: Added user defined optimisation quality
|
||||
// 09.11.98 M.Verderi, J.Apostolakis: Added BiasWeight member and accessors
|
||||
// 10.20.97 P.M.DeFreitas: Added pointer to a FastSimulation
|
||||
// J.Apostolakis: & flag to indicate if it is an Envelope for it
|
||||
// 10.20.97 P.M.DeFreitas, J.Apostolakis: Added pointer to a FastSimulation
|
||||
// 11.07.95 P.Kent: Initial version
|
||||
// ------------------------------------------------------------------------
|
||||
#ifndef G4LOGICALVOLUME_HH
|
||||
#define G4LOGICALVOLUME_HH
|
||||
#define G4LOGICALVOLUME_HH 1
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -177,13 +176,11 @@ class G4LVData
|
||||
// In addition, it invokes a method similiar to the constructor explicitly
|
||||
// to achieve the partial effect for each instance in the array.
|
||||
//
|
||||
typedef G4GeomSplitter<G4LVData> G4LVManager;
|
||||
using G4LVManager = G4GeomSplitter<G4LVData>;
|
||||
|
||||
class G4LogicalVolume
|
||||
{
|
||||
typedef std::vector<G4VPhysicalVolume*> G4PhysicalVolumeList;
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4LogicalVolume(G4VSolid* pSolid,
|
||||
G4Material* pMaterial,
|
||||
@@ -339,7 +336,7 @@ class G4LogicalVolume
|
||||
inline G4double GetBiasWeight() const;
|
||||
// Sets and gets bias weight.
|
||||
|
||||
public: // without description
|
||||
public:
|
||||
|
||||
G4LogicalVolume(__void__&);
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
@@ -391,7 +388,8 @@ class G4LogicalVolume
|
||||
// Returns: success (true) or failure (false).
|
||||
|
||||
private:
|
||||
// Data members:
|
||||
|
||||
using G4PhysicalVolumeList = std::vector<G4VPhysicalVolume *>;
|
||||
|
||||
G4GEOM_DLL static G4LVManager subInstanceManager;
|
||||
// This new field helps to use the class G4LVManager introduced above.
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
// 18.09.02, G.Cosmo - Initial version
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4REGION_HH
|
||||
#define G4REGION_HH
|
||||
#define G4REGION_HH 1
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@@ -90,16 +90,11 @@ class G4RegionData
|
||||
// In addition, it invokes a method similiar to the constructor explicitly
|
||||
// to achieve the partial effect for each instance in the array.
|
||||
//
|
||||
typedef G4GeomSplitter<G4RegionData> G4RegionManager;
|
||||
using G4RegionManager = G4GeomSplitter<G4RegionData>;
|
||||
|
||||
class G4Region
|
||||
{
|
||||
typedef std::vector<G4LogicalVolume*> G4RootLVList;
|
||||
typedef std::vector<G4Material*> G4MaterialList;
|
||||
typedef std::pair<G4Material*,G4MaterialCutsCouple*> G4MaterialCouplePair;
|
||||
typedef std::map<G4Material*,G4MaterialCutsCouple*> G4MaterialCoupleMap;
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4Region(const G4String& name);
|
||||
virtual ~G4Region();
|
||||
@@ -217,7 +212,7 @@ class G4Region
|
||||
G4UserSteppingAction* GetRegionalSteppingAction() const;
|
||||
// Set/Get method of the regional user stepping action
|
||||
|
||||
public: // without description
|
||||
public:
|
||||
|
||||
G4Region(__void__&);
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
@@ -248,6 +243,11 @@ class G4Region
|
||||
|
||||
private:
|
||||
|
||||
using G4RootLVList = std::vector<G4LogicalVolume*>;
|
||||
using G4MaterialList = std::vector<G4Material*>;
|
||||
using G4MaterialCouplePair = std::pair<G4Material*, G4MaterialCutsCouple*>;
|
||||
using G4MaterialCoupleMap = std::map<G4Material*, G4MaterialCutsCouple*>;
|
||||
|
||||
G4String fName;
|
||||
|
||||
G4RootLVList fRootVolumes;
|
||||
|
||||
@@ -107,9 +107,7 @@ inline
|
||||
std::vector<G4LogicalVolume*>::iterator
|
||||
G4Region::GetRootLogicalVolumeIterator()
|
||||
{
|
||||
G4RootLVList::iterator iterator =
|
||||
G4RootLVList::iterator(fRootVolumes.begin());
|
||||
return iterator;
|
||||
return G4RootLVList::iterator(fRootVolumes.begin());
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
@@ -120,8 +118,7 @@ inline
|
||||
std::vector<G4Material*>::const_iterator
|
||||
G4Region::GetMaterialIterator() const
|
||||
{
|
||||
G4MaterialList::const_iterator iterator = fMaterials.cbegin();
|
||||
return iterator;
|
||||
return fMaterials.cbegin();
|
||||
}
|
||||
|
||||
// ********************************************************************
|
||||
|
||||
@@ -78,7 +78,7 @@ class G4RegionStore : public std::vector<G4Region*>
|
||||
// to FALSE. Used by the run manager to notify that the
|
||||
// physics table has been updated.
|
||||
|
||||
void UpdateMaterialList(G4VPhysicalVolume* currentWorld=0);
|
||||
void UpdateMaterialList(G4VPhysicalVolume* currentWorld=nullptr);
|
||||
// Forces recomputation of material lists in all regions
|
||||
// in the store.
|
||||
|
||||
|
||||
@@ -50,7 +50,9 @@
|
||||
// 13.07.95, P.Kent - Initial version
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4SMARTVOXELHEADER_HH
|
||||
#define G4SMARTVOXELHEADER_HH
|
||||
#define G4SMARTVOXELHEADER_HH 1
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "geomdefs.hh"
|
||||
@@ -58,8 +60,6 @@
|
||||
#include "G4SmartVoxelProxy.hh"
|
||||
#include "G4SmartVoxelNode.hh"
|
||||
|
||||
#include <vector>
|
||||
|
||||
// Forward declarations
|
||||
class G4LogicalVolume;
|
||||
class G4VoxelLimits;
|
||||
@@ -73,7 +73,7 @@ using G4VolumeExtentVector = std::vector<G4double>;
|
||||
|
||||
class G4SmartVoxelHeader
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4SmartVoxelHeader(G4LogicalVolume* pVolume, G4int pSlice = 0);
|
||||
// Constructor for topmost header, to begin voxel construction at a
|
||||
@@ -110,7 +110,7 @@ class G4SmartVoxelHeader
|
||||
G4bool AllSlicesEqual() const;
|
||||
// True if all slices equal (after collection).
|
||||
|
||||
public: // without description
|
||||
public:
|
||||
|
||||
G4bool operator == (const G4SmartVoxelHeader& pHead) const;
|
||||
|
||||
|
||||
@@ -45,16 +45,19 @@
|
||||
// 12.07.95, P.Kent - Initial version
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4SMARTVOXELNODE_HH
|
||||
#define G4SMARTVOXELNODE_HH
|
||||
#define G4SMARTVOXELNODE_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include <vector>
|
||||
|
||||
#include "geomwdefs.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4Allocator.hh"
|
||||
|
||||
using G4SliceVector = std::vector<G4int>;
|
||||
|
||||
class G4SmartVoxelNode
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4SmartVoxelNode(G4int pSlice = 0) : fminEquivalent(pSlice),
|
||||
fmaxEquivalent(pSlice) {}
|
||||
@@ -62,7 +65,7 @@ class G4SmartVoxelNode
|
||||
// This number is not stored, but used to provide defaults for the
|
||||
// minimum and maximum equivalent node numbers.
|
||||
|
||||
~G4SmartVoxelNode();
|
||||
~G4SmartVoxelNode() = default;
|
||||
// Destructor. No actions.
|
||||
|
||||
inline G4int GetVolume(G4int pVolumeNo) const;
|
||||
@@ -72,10 +75,10 @@ class G4SmartVoxelNode
|
||||
inline void Insert(G4int pVolumeNo);
|
||||
// Add the specified volume number to the contents.
|
||||
|
||||
inline size_t GetNoContained() const;
|
||||
inline std::size_t GetNoContained() const;
|
||||
// Return the number of volumes inside the node.
|
||||
|
||||
inline size_t GetCapacity() const;
|
||||
inline std::size_t GetCapacity() const;
|
||||
// Return the maximum capacity of the buffer.
|
||||
|
||||
inline void Reserve(G4int noSlices);
|
||||
@@ -99,6 +102,11 @@ class G4SmartVoxelNode
|
||||
G4bool operator == (const G4SmartVoxelNode& v) const;
|
||||
// Equality operator.
|
||||
|
||||
inline void* operator new(std::size_t);
|
||||
// Override "new" for "G4Allocator".
|
||||
inline void operator delete(void* aNode);
|
||||
// Override "delete" for "G4Allocator".
|
||||
|
||||
private:
|
||||
|
||||
G4int fminEquivalent;
|
||||
|
||||
@@ -27,60 +27,90 @@
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
extern G4GEOM_DLL G4Allocator<G4SmartVoxelNode>*& aNodeAllocator();
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void* G4SmartVoxelNode::operator new(std::size_t)
|
||||
{
|
||||
if(aNodeAllocator() == nullptr)
|
||||
{
|
||||
aNodeAllocator() = new G4Allocator<G4SmartVoxelNode>;
|
||||
}
|
||||
return (void*) aNodeAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void G4SmartVoxelNode::operator delete(void* aNode)
|
||||
{
|
||||
aNodeAllocator()->FreeSingle((G4SmartVoxelNode*) aNode);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
G4int G4SmartVoxelNode::GetVolume(G4int pVolumeNo) const
|
||||
{
|
||||
return fcontents[pVolumeNo];
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void G4SmartVoxelNode::Insert(G4int pVolumeNo)
|
||||
{
|
||||
fcontents.push_back(pVolumeNo);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
size_t G4SmartVoxelNode::GetNoContained() const
|
||||
std::size_t G4SmartVoxelNode::GetNoContained() const
|
||||
{
|
||||
return fcontents.size();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
size_t G4SmartVoxelNode::GetCapacity() const
|
||||
std::size_t G4SmartVoxelNode::GetCapacity() const
|
||||
{
|
||||
return fcontents.capacity();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void G4SmartVoxelNode::Reserve(G4int noSlices)
|
||||
{
|
||||
fcontents.reserve(noSlices);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void G4SmartVoxelNode::Shrink()
|
||||
{
|
||||
G4SliceVector(fcontents).swap(fcontents);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
G4int G4SmartVoxelNode::GetMaxEquivalentSliceNo() const
|
||||
{
|
||||
return fmaxEquivalent;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void G4SmartVoxelNode::SetMaxEquivalentSliceNo(G4int pMax)
|
||||
{
|
||||
fmaxEquivalent = pMax;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
G4int G4SmartVoxelNode::GetMinEquivalentSliceNo() const
|
||||
{
|
||||
return fminEquivalent;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void G4SmartVoxelNode::SetMinEquivalentSliceNo(G4int pMin)
|
||||
{
|
||||
|
||||
@@ -37,18 +37,21 @@
|
||||
// 12.07.95, P.Kent - Initial version
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4SMARTVOXELPROXY_HH
|
||||
#define G4SMARTVOXELPROXY_HH
|
||||
#define G4SMARTVOXELPROXY_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include <assert.h>
|
||||
|
||||
#include "geomwdefs.hh"
|
||||
#include "G4Types.hh"
|
||||
#include "G4Allocator.hh"
|
||||
|
||||
class G4SmartVoxelNode;
|
||||
class G4SmartVoxelHeader;
|
||||
|
||||
class G4SmartVoxelProxy
|
||||
{
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4SmartVoxelProxy(G4SmartVoxelHeader *pHeader)
|
||||
: fHeader(pHeader) {}
|
||||
@@ -58,7 +61,7 @@ class G4SmartVoxelProxy
|
||||
: fNode(pNode) {}
|
||||
// Proxy for the specified node.
|
||||
|
||||
~G4SmartVoxelProxy();
|
||||
~G4SmartVoxelProxy() = default;
|
||||
// Destructor - do nothing. Not responsible for proxied objects.
|
||||
|
||||
G4bool IsHeader() const;
|
||||
@@ -77,6 +80,11 @@ class G4SmartVoxelProxy
|
||||
// Equality operator.
|
||||
// True when objects share same address.
|
||||
|
||||
inline void* operator new(std::size_t);
|
||||
// Override "new" for "G4Allocator".
|
||||
inline void operator delete(void* aProxy);
|
||||
// Override "delete" for "G4Allocator".
|
||||
|
||||
private:
|
||||
|
||||
G4SmartVoxelHeader* fHeader = nullptr;
|
||||
|
||||
@@ -27,18 +27,41 @@
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
extern G4GEOM_DLL G4Allocator<G4SmartVoxelProxy>*& aProxyAllocator();
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void* G4SmartVoxelProxy::operator new(std::size_t)
|
||||
{
|
||||
if(aProxyAllocator() == nullptr)
|
||||
{
|
||||
aProxyAllocator() = new G4Allocator<G4SmartVoxelProxy>;
|
||||
}
|
||||
return (void*) aProxyAllocator()->MallocSingle();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
void G4SmartVoxelProxy::operator delete(void* aProxy)
|
||||
{
|
||||
aProxyAllocator()->FreeSingle((G4SmartVoxelProxy*) aProxy);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
G4bool G4SmartVoxelProxy::IsHeader() const
|
||||
{
|
||||
return (fHeader) ? true : false;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
G4bool G4SmartVoxelProxy::IsNode() const
|
||||
{
|
||||
return (fNode) ? true : false;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
G4SmartVoxelNode* G4SmartVoxelProxy::GetNode() const
|
||||
{
|
||||
@@ -46,6 +69,7 @@ G4SmartVoxelNode* G4SmartVoxelProxy::GetNode() const
|
||||
return fNode;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
G4SmartVoxelHeader* G4SmartVoxelProxy::GetHeader() const
|
||||
{
|
||||
@@ -53,6 +77,7 @@ G4SmartVoxelHeader* G4SmartVoxelProxy::GetHeader() const
|
||||
return fHeader;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
inline
|
||||
G4bool G4SmartVoxelProxy::operator == (const G4SmartVoxelProxy& right) const
|
||||
{
|
||||
|
||||
@@ -189,10 +189,6 @@ class G4UAdapter : public G4VSolid, protected UnplacedVolume_t
|
||||
// Smart access function - creates on request and stores for future
|
||||
// access. A null pointer means "not available".
|
||||
|
||||
inline friend std::ostream& operator<< ( std::ostream& os, const G4UAdapter<UnplacedVolume_t>& uad )
|
||||
{ const UnplacedVolume_t& origUnplaced = uad; return operator<< ( os, origUnplaced ); }
|
||||
// Streaming operator, forward to VecGeom method
|
||||
|
||||
public: // without description
|
||||
|
||||
G4UAdapter(__void__&);
|
||||
@@ -423,6 +419,14 @@ namespace
|
||||
G4Mutex pMutex = G4MUTEX_INITIALIZER;
|
||||
}
|
||||
|
||||
// Free function to enable ostream output
|
||||
template <class UnplacedVolume_t>
|
||||
std::ostream&
|
||||
operator<<(std::ostream& os, const G4UAdapter<UnplacedVolume_t>& uAdapted)
|
||||
{
|
||||
return uAdapted.StreamInfo(os);
|
||||
}
|
||||
|
||||
template <class UnplacedVolume_t>
|
||||
void G4UAdapter<UnplacedVolume_t>::
|
||||
ComputeDimensions(G4VPVParameterisation*, const G4int,
|
||||
|
||||
@@ -41,8 +41,8 @@
|
||||
|
||||
// First version: Oct 30, 2002 - Jacek Generowicz
|
||||
// ------------------------------------------------------------------------
|
||||
#ifndef G4VCurvedTrajectoryFilter_hh
|
||||
#define G4VCurvedTrajectoryFilter_hh
|
||||
#ifndef G4VCURVEDTRAJECTORYFILTER_HH
|
||||
#define G4VCURVEDTRAJECTORYFILTER_HH 1
|
||||
|
||||
#include "G4ThreeVector.hh"
|
||||
#include <vector>
|
||||
@@ -50,27 +50,27 @@
|
||||
class G4VCurvedTrajectoryFilter
|
||||
{
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4VCurvedTrajectoryFilter();
|
||||
virtual ~G4VCurvedTrajectoryFilter();
|
||||
G4VCurvedTrajectoryFilter() = default;
|
||||
virtual ~G4VCurvedTrajectoryFilter() = default;
|
||||
|
||||
// Probably do not want these objects to be copied,
|
||||
// so make the copy constructor private
|
||||
// Probably do not want these objects to be copied,
|
||||
// so make the copy constructor private
|
||||
|
||||
void CreateNewTrajectorySegment();
|
||||
// Each segment stores the auxiliary points of a single step.
|
||||
void CreateNewTrajectorySegment();
|
||||
// Each segment stores the auxiliary points of a single step.
|
||||
|
||||
virtual void TakeIntermediatePoint( G4ThreeVector newPoint ) = 0;
|
||||
// Submit intermediate points for the filter to consider keeping or
|
||||
// rejecting. Derived classes should implement the filtering algorithm
|
||||
// in this method.
|
||||
virtual void TakeIntermediatePoint( G4ThreeVector newPoint ) = 0;
|
||||
// Submit intermediate points for the filter to consider keeping or
|
||||
// rejecting. Derived classes should implement the filtering algorithm
|
||||
// in this method.
|
||||
|
||||
std::vector<G4ThreeVector>* GimmeThePointsAndForgetThem();
|
||||
std::vector<G4ThreeVector>* GimmeThePointsAndForgetThem();
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
std::vector<G4ThreeVector>* fpFilteredPoints = nullptr;
|
||||
std::vector<G4ThreeVector>* fpFilteredPoints = nullptr;
|
||||
};
|
||||
|
||||
#endif /* G4VCurvedTrajectoryFilter_hh */
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
// 24.02.05, J.Apostolakis - First created version.
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VNESTEDPARAMETERISATION_HH
|
||||
#define G4VNESTEDPARAMETERISATION_HH
|
||||
#define G4VNESTEDPARAMETERISATION_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
@@ -72,13 +72,13 @@ class G4Polycone;
|
||||
class G4Polyhedra;
|
||||
class G4Hype;
|
||||
|
||||
class G4VNestedParameterisation: public G4VPVParameterisation,
|
||||
public G4VVolumeMaterialScanner
|
||||
class G4VNestedParameterisation : public G4VPVParameterisation,
|
||||
public G4VVolumeMaterialScanner
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4VNestedParameterisation();
|
||||
virtual ~G4VNestedParameterisation();
|
||||
G4VNestedParameterisation() = default;
|
||||
virtual ~G4VNestedParameterisation() = default;
|
||||
|
||||
// Methods required in derived classes
|
||||
// -----------------------------------
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
// Author: Ivana Hrivnacova, 4.5.2004
|
||||
// ------------------------------------------------------------------------
|
||||
#ifndef G4VPVDIVISION_FACTORY_HH
|
||||
#define G4VPVDIVISION_FACTORY_HH
|
||||
#ifndef G4VPVDIVISIONFACTORY_HH
|
||||
#define G4VPVDIVISIONFACTORY_HH 1
|
||||
|
||||
#include "geomdefs.hh"
|
||||
|
||||
@@ -43,9 +43,9 @@ class G4VPVParameterisation;
|
||||
|
||||
class G4VPVDivisionFactory
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
virtual ~G4VPVDivisionFactory();
|
||||
virtual ~G4VPVDivisionFactory() = default;
|
||||
|
||||
static G4VPVDivisionFactory* Instance();
|
||||
|
||||
@@ -89,12 +89,11 @@ class G4VPVDivisionFactory
|
||||
|
||||
protected:
|
||||
|
||||
G4VPVDivisionFactory();
|
||||
G4VPVDivisionFactory() = default;
|
||||
|
||||
protected:
|
||||
|
||||
static G4ThreadLocal G4VPVDivisionFactory* fgInstance;
|
||||
|
||||
static G4ThreadLocal G4VPVDivisionFactory* fgInstance;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
// 17.02.98, J.Apostolakis - Allowing the parameterisation of solid type
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VPVPARAMETERISATION_HH
|
||||
#define G4VPVPARAMETERISATION_HH
|
||||
#define G4VPVPARAMETERISATION_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4VVolumeMaterialScanner.hh"
|
||||
@@ -69,10 +69,8 @@ class G4VPVParameterisation
|
||||
{
|
||||
public:
|
||||
|
||||
G4VPVParameterisation();
|
||||
virtual ~G4VPVParameterisation();
|
||||
|
||||
public: // with description
|
||||
G4VPVParameterisation() = default;
|
||||
virtual ~G4VPVParameterisation() = default;
|
||||
|
||||
virtual void ComputeTransformation(const G4int,
|
||||
G4VPhysicalVolume * ) const = 0;
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
// 24.07.95, P.Kent: First non-stub version
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VPHYSICALVOLUME_HH
|
||||
#define G4VPHYSICALVOLUME_HH
|
||||
#define G4VPHYSICALVOLUME_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4String.hh"
|
||||
@@ -60,7 +60,7 @@ class G4PVData
|
||||
|
||||
public:
|
||||
|
||||
G4PVData() {}
|
||||
G4PVData() = default;
|
||||
|
||||
void initialize()
|
||||
{
|
||||
@@ -72,12 +72,12 @@ class G4PVData
|
||||
G4double tx = 0., ty = 0., tz = 0.;
|
||||
};
|
||||
|
||||
typedef G4GeomSplitter<G4PVData> G4PVManager;
|
||||
using G4PVManager = G4GeomSplitter<G4PVData>;
|
||||
// Implementation detail for use of G4PVData objects
|
||||
|
||||
class G4VPhysicalVolume
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4VPhysicalVolume(G4RotationMatrix* pRot,
|
||||
const G4ThreeVector& tlate,
|
||||
@@ -198,7 +198,7 @@ class G4VPhysicalVolume
|
||||
// Concrete implementation is done and required only for placed and
|
||||
// parameterised volumes. Returns true if the volume is overlapping.
|
||||
|
||||
public: // without description
|
||||
public:
|
||||
|
||||
G4VPhysicalVolume(__void__&);
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
@@ -266,7 +266,6 @@ class G4VPhysicalVolume
|
||||
// it copies the array of G4PVData instances from the master thread.
|
||||
// In addition, it invokes a method similiar to the constructor explicitly
|
||||
// to achieve the partial effect for each instance in the array.
|
||||
//
|
||||
|
||||
#include "G4VPhysicalVolume.icc"
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
// surface normal of the shape at a given point, and to compute
|
||||
// the extent of the shape. [see descriptions below]
|
||||
//
|
||||
// Some protected/private utility functions are implemented for the
|
||||
// Some protected/private utility functions are implemented for the
|
||||
// clipping of regions for the computation of a solid's extent. Note that
|
||||
// the clipping mechanism is presently inefficient.
|
||||
//
|
||||
//
|
||||
// Some visualization/graphics functions are also defined.
|
||||
//
|
||||
// Member Data:
|
||||
@@ -52,11 +52,11 @@
|
||||
// 12.04.00 J.Allison Implemented GetExtent() in terms of CalculateExtent()
|
||||
// 17.06.98 J.Apostolakis Added pure virtual function GetEntityType()
|
||||
// 26.07.96 P.Kent Added ComputeDimensions() for replication mechanism
|
||||
// 27.03.96 J.Allison Methods for visualisation
|
||||
// 27.03.96 J.Allison Methods for visualisation
|
||||
// 30.06.95 P.Kent Initial version, no scoping or visualisation functions
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VSOLID_HH
|
||||
#define G4VSOLID_HH
|
||||
#define G4VSOLID_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "G4String.hh"
|
||||
@@ -81,7 +81,7 @@ using G4GeometryType = G4String;
|
||||
|
||||
class G4VSolid
|
||||
{
|
||||
public: // with description
|
||||
public: // with description
|
||||
|
||||
G4VSolid(const G4String& name);
|
||||
// Creates a new shape, with the supplied name. No provision is made
|
||||
@@ -89,12 +89,9 @@ class G4VSolid
|
||||
virtual ~G4VSolid();
|
||||
// Default destructor.
|
||||
|
||||
inline G4bool operator==( const G4VSolid& s ) const;
|
||||
inline G4bool operator==(const G4VSolid& s) const;
|
||||
// Return true only if addresses are the same.
|
||||
|
||||
friend std::ostream& operator<< ( std::ostream& os, const G4VSolid& e );
|
||||
// Streaming operator, using DumpInfo().
|
||||
|
||||
inline G4String GetName() const;
|
||||
// Returns the current shape's name.
|
||||
void SetName(const G4String& name);
|
||||
@@ -218,8 +215,8 @@ class G4VSolid
|
||||
// If the solid is made up from a Boolean operation of two solids,
|
||||
// return the "no" solid. If the solid is not a "Boolean", return 0.
|
||||
|
||||
virtual const G4DisplacedSolid* GetDisplacedSolidPtr() const;
|
||||
virtual G4DisplacedSolid* GetDisplacedSolidPtr();
|
||||
virtual const G4DisplacedSolid* GetDisplacedSolidPtr() const;
|
||||
virtual G4DisplacedSolid* GetDisplacedSolidPtr();
|
||||
// If the solid is a "G4DisplacedSolid", return a self pointer
|
||||
// else return 0.
|
||||
|
||||
@@ -231,7 +228,7 @@ class G4VSolid
|
||||
// persistifiable objects.
|
||||
|
||||
G4VSolid(const G4VSolid& rhs);
|
||||
G4VSolid& operator=(const G4VSolid& rhs);
|
||||
G4VSolid& operator=(const G4VSolid& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
G4double EstimateCubicVolume(G4int nStat, G4double epsilon) const;
|
||||
@@ -248,7 +245,7 @@ class G4VSolid
|
||||
|
||||
void CalculateClippedPolygonExtent(G4ThreeVectorList& pPolygon,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const EAxis pAxis,
|
||||
const EAxis pAxis,
|
||||
G4double& pMin, G4double& pMax) const;
|
||||
// Calculate the maximum and minimum extents of the convex polygon
|
||||
// pPolygon along the axis pAxis, within the limits pVoxelLimit.
|
||||
@@ -261,7 +258,7 @@ class G4VSolid
|
||||
void ClipCrossSection(G4ThreeVectorList* pVertices,
|
||||
const G4int pSectionIndex,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const EAxis pAxis,
|
||||
const EAxis pAxis,
|
||||
G4double& pMin, G4double& pMax) const;
|
||||
// Calculate the maximum and minimum extents of the polygon described
|
||||
// by the vertices: pSectionIndex->pSectionIndex+1->
|
||||
@@ -276,7 +273,7 @@ class G4VSolid
|
||||
void ClipBetweenSections(G4ThreeVectorList* pVertices,
|
||||
const G4int pSectionIndex,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const EAxis pAxis,
|
||||
const EAxis pAxis,
|
||||
G4double& pMin, G4double& pMax) const;
|
||||
// Calculate the maximum and minimum extents of the polygons
|
||||
// joining the CrossSections at pSectionIndex->pSectionIndex+3 and
|
||||
@@ -294,7 +291,7 @@ class G4VSolid
|
||||
const EAxis pAxis ) const;
|
||||
// Clip the specified convex polygon to the given limits, where
|
||||
// the polygon is described by the vertices at (0),(1),...,(n),(0) in
|
||||
// pPolygon.
|
||||
// pPolygon.
|
||||
// If the polygon is completely clipped away, the polygon is cleared.
|
||||
|
||||
protected:
|
||||
@@ -315,6 +312,9 @@ class G4VSolid
|
||||
G4String fshapeName; // Name
|
||||
};
|
||||
|
||||
/// Output solid information to given ostream
|
||||
std::ostream& operator<<(std::ostream& os, const G4VSolid& e);
|
||||
|
||||
#include "G4VSolid.icc"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
// Created: Paul Kent, August 1996
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VTOUCHABLE_HH
|
||||
#define G4VTOUCHABLE_HH
|
||||
#define G4VTOUCHABLE_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
|
||||
@@ -102,10 +102,10 @@ class G4NavigationHistory;
|
||||
class G4VTouchable
|
||||
{
|
||||
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4VTouchable();
|
||||
virtual ~G4VTouchable();
|
||||
G4VTouchable() = default;
|
||||
virtual ~G4VTouchable() = default;
|
||||
// Constructor and destructor.
|
||||
|
||||
virtual const G4ThreeVector& GetTranslation(G4int depth=0) const = 0;
|
||||
@@ -125,12 +125,8 @@ class G4VTouchable
|
||||
const G4NavigationHistory* history = nullptr);
|
||||
// Update method.
|
||||
|
||||
public: // without description
|
||||
|
||||
// virtual void ResetLevel();
|
||||
|
||||
virtual const G4NavigationHistory* GetHistory() const;
|
||||
// Should this method be deprecated ? It is used in G4Navigator!
|
||||
// Method used in G4Navigator.
|
||||
};
|
||||
|
||||
#include "G4VTouchable.icc"
|
||||
|
||||
@@ -37,15 +37,15 @@
|
||||
|
||||
// 21/10/2003 - M.Asai, Created.
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VUserRegionInformation_HH
|
||||
#define G4VUserRegionInformation_HH 1
|
||||
#ifndef G4VUSERREGIONINFORMATION_HH
|
||||
#define G4VUSERREGIONINFORMATION_HH 1
|
||||
|
||||
class G4VUserRegionInformation
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4VUserRegionInformation() {}
|
||||
virtual ~G4VUserRegionInformation() {}
|
||||
G4VUserRegionInformation() = default;
|
||||
virtual ~G4VUserRegionInformation() = default;
|
||||
|
||||
virtual void Print() const = 0;
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
// 13.07.95, P.Kent - Initial version.
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4VOXELLIMITS_HH
|
||||
#define G4VOXELLIMITS_HH
|
||||
#define G4VOXELLIMITS_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include "geomdefs.hh"
|
||||
@@ -51,12 +51,12 @@
|
||||
|
||||
class G4VoxelLimits
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
|
||||
G4VoxelLimits();
|
||||
G4VoxelLimits() = default;
|
||||
// Constructor - initialise to be unlimited. Volume unrestricted.
|
||||
|
||||
~G4VoxelLimits();
|
||||
~G4VoxelLimits() = default;
|
||||
// Destructor. No actions.
|
||||
|
||||
void AddLimit(const EAxis pAxis, const G4double pMin, const G4double pMax);
|
||||
|
||||
@@ -34,12 +34,6 @@ G4BlockingList::G4BlockingList(G4int maxDefault, G4int stride)
|
||||
{
|
||||
}
|
||||
|
||||
// Do nothing destructor
|
||||
//
|
||||
G4BlockingList::~G4BlockingList()
|
||||
{
|
||||
}
|
||||
|
||||
// Clear List and reset tag
|
||||
//
|
||||
void G4BlockingList::FullyReset()
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include <cmath>
|
||||
#include "globals.hh"
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4BoundingEnvelope.hh"
|
||||
#include "G4GeometryTolerance.hh"
|
||||
|
||||
@@ -105,14 +105,6 @@ G4BoundingEnvelope( const G4ThreeVector& pMin,
|
||||
CheckBoundingPolygons();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
//
|
||||
G4BoundingEnvelope::~G4BoundingEnvelope()
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Check correctness of the axis aligned bounding box
|
||||
@@ -428,7 +420,7 @@ G4BoundingEnvelope::CalculateExtent(const EAxis pAxis,
|
||||
|
||||
// Allocate memory for transformed polygons
|
||||
//
|
||||
G4int nbases = (fPolygons == 0) ? 2 : fPolygons->size();
|
||||
G4int nbases = (fPolygons == nullptr) ? 2 : fPolygons->size();
|
||||
std::vector<G4Polygon3D*> bases(nbases);
|
||||
if (fPolygons == nullptr)
|
||||
{
|
||||
@@ -539,7 +531,7 @@ G4BoundingEnvelope::CalculateExtent(const EAxis pAxis,
|
||||
|
||||
// Free memory
|
||||
//
|
||||
for (G4int i=0; i<nbases; ++i) { delete bases[i]; bases[i] = 0; }
|
||||
for (G4int i=0; i<nbases; ++i) { delete bases[i]; bases[i] = nullptr; }
|
||||
|
||||
// Final adjustment of the extent
|
||||
//
|
||||
@@ -609,27 +601,27 @@ G4BoundingEnvelope::TransformVertices(const G4Transform3D& pTransform3D,
|
||||
baseB[3].set(fMin.x(),fMax.y(),fMax.z());
|
||||
}
|
||||
std::vector<const G4ThreeVectorList*>::const_iterator ia, iaend;
|
||||
std::vector<G4Polygon3D*>::iterator ib = pBases.begin();
|
||||
ia = (fPolygons == 0) ? aabb.begin() : fPolygons->begin();
|
||||
iaend = (fPolygons == 0) ? aabb.end() : fPolygons->end();
|
||||
auto ib = pBases.begin();
|
||||
ia = (fPolygons == nullptr) ? aabb.cbegin() : fPolygons->cbegin();
|
||||
iaend = (fPolygons == nullptr) ? aabb.cend() : fPolygons->cend();
|
||||
|
||||
if (pTransform3D.xx()==1 && pTransform3D.yy()==1 && pTransform3D.zz()==1)
|
||||
{
|
||||
G4ThreeVector offset = pTransform3D.getTranslation();
|
||||
for ( ; ia != iaend; ++ia, ++ib)
|
||||
{
|
||||
G4ThreeVectorList::const_iterator ka = (*ia)->begin();
|
||||
G4Polygon3D::iterator kb = (*ib)->begin();
|
||||
for ( ; ka != (*ia)->end(); ++ka, ++kb) { (*kb) = (*ka) + offset; }
|
||||
auto ka = (*ia)->cbegin();
|
||||
auto kb = (*ib)->begin();
|
||||
for ( ; ka != (*ia)->cend(); ++ka, ++kb) { (*kb) = (*ka) + offset; }
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for ( ; ia != iaend; ++ia, ++ib)
|
||||
{
|
||||
G4ThreeVectorList::const_iterator ka = (*ia)->begin();
|
||||
G4Polygon3D::iterator kb = (*ib)->begin();
|
||||
for ( ; ka != (*ia)->end(); ++ka, ++kb)
|
||||
auto ka = (*ia)->cbegin();
|
||||
auto kb = (*ib)->begin();
|
||||
for ( ; ka != (*ia)->cend(); ++ka, ++kb)
|
||||
{
|
||||
(*kb) = pTransform3D*G4Point3D(*ka);
|
||||
}
|
||||
|
||||
@@ -76,12 +76,6 @@ G4ErrorCylSurfaceTarget( const G4double& radius,
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
G4ErrorCylSurfaceTarget::~G4ErrorCylSurfaceTarget()
|
||||
{
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
G4double G4ErrorCylSurfaceTarget::
|
||||
GetDistanceFromPoint( const G4ThreeVector& point,
|
||||
const G4ThreeVector& dir ) const
|
||||
|
||||
@@ -89,12 +89,6 @@ G4ErrorPlaneSurfaceTarget(const G4Point3D &p1,
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
G4ErrorPlaneSurfaceTarget::~G4ErrorPlaneSurfaceTarget()
|
||||
{
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
G4ThreeVector G4ErrorPlaneSurfaceTarget::
|
||||
Intersect( const G4ThreeVector& pt, const G4ThreeVector& dir ) const
|
||||
{
|
||||
|
||||
@@ -30,5 +30,4 @@
|
||||
|
||||
#include "G4ErrorSurfaceTarget.hh"
|
||||
|
||||
G4ErrorSurfaceTarget::G4ErrorSurfaceTarget(){}
|
||||
G4ErrorSurfaceTarget::~G4ErrorSurfaceTarget(){}
|
||||
G4ErrorSurfaceTarget::G4ErrorSurfaceTarget() = default;
|
||||
|
||||
@@ -30,5 +30,4 @@
|
||||
|
||||
#include "G4ErrorTanPlaneTarget.hh"
|
||||
|
||||
G4ErrorTanPlaneTarget::G4ErrorTanPlaneTarget(){}
|
||||
G4ErrorTanPlaneTarget::~G4ErrorTanPlaneTarget(){}
|
||||
G4ErrorTanPlaneTarget::G4ErrorTanPlaneTarget() = default;
|
||||
|
||||
@@ -32,8 +32,6 @@
|
||||
|
||||
G4ErrorTarget::G4ErrorTarget() : theType(G4ErrorTarget_GeomVolume) {}
|
||||
|
||||
G4ErrorTarget::~G4ErrorTarget() {}
|
||||
|
||||
G4double G4ErrorTarget::GetDistanceFromPoint( const G4ThreeVector&,
|
||||
const G4ThreeVector& ) const
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include <iomanip>
|
||||
|
||||
#include "G4Timer.hh"
|
||||
#include "G4GeometryManager.hh"
|
||||
#include "G4SystemOfUnits.hh"
|
||||
@@ -57,14 +58,6 @@
|
||||
G4ThreadLocal G4GeometryManager* G4GeometryManager::fgInstance = nullptr;
|
||||
G4ThreadLocal G4bool G4GeometryManager::fIsClosed = false;
|
||||
|
||||
// ***************************************************************************
|
||||
// Constructor. Set the geometry to be open
|
||||
// ***************************************************************************
|
||||
//
|
||||
G4GeometryManager::G4GeometryManager()
|
||||
{
|
||||
}
|
||||
|
||||
// ***************************************************************************
|
||||
// Destructor
|
||||
// ***************************************************************************
|
||||
@@ -179,7 +172,7 @@ void G4GeometryManager::BuildOptimisations(G4bool allOpts, G4bool verbose)
|
||||
//
|
||||
head = volume->GetVoxelHeader();
|
||||
delete head;
|
||||
volume->SetVoxelHeader(0);
|
||||
volume->SetVoxelHeader(nullptr);
|
||||
if ( ( (volume->IsToOptimise())
|
||||
&& (volume->GetNoDaughters()>=kMinVoxelVolumesLevel1&&allOpts) )
|
||||
|| ( (volume->GetNoDaughters()==1)
|
||||
|
||||
@@ -30,14 +30,6 @@
|
||||
|
||||
#include "G4IdentityTrajectoryFilter.hh"
|
||||
|
||||
G4IdentityTrajectoryFilter::G4IdentityTrajectoryFilter()
|
||||
{
|
||||
}
|
||||
|
||||
G4IdentityTrajectoryFilter::~G4IdentityTrajectoryFilter()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
G4IdentityTrajectoryFilter::TakeIntermediatePoint( G4ThreeVector newPoint )
|
||||
{
|
||||
|
||||
@@ -35,7 +35,3 @@ G4LogicalSurface::G4LogicalSurface(const G4String& name,
|
||||
: theName(name), theSurfaceProperty(surfaceProperty)
|
||||
{
|
||||
}
|
||||
|
||||
G4LogicalSurface::~G4LogicalSurface()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -398,7 +398,7 @@ void G4Region::UpdateMaterialList()
|
||||
void G4Region::SetWorld(G4VPhysicalVolume* wp)
|
||||
{
|
||||
if(!wp)
|
||||
{ fWorldPhys = 0; }
|
||||
{ fWorldPhys = nullptr; }
|
||||
else
|
||||
{ if(BelongsTo(wp)) fWorldPhys = wp; }
|
||||
|
||||
|
||||
@@ -63,7 +63,6 @@ G4SmartVoxelHeader::G4SmartVoxelHeader(G4LogicalVolume* pVolume,
|
||||
fparamAxis(kUndefined)
|
||||
{
|
||||
size_t nDaughters = pVolume->GetNoDaughters();
|
||||
G4VoxelLimits limits; // Create `unlimited' limits object
|
||||
|
||||
// Determine whether daughter is replicated
|
||||
//
|
||||
@@ -955,7 +954,7 @@ G4ProxyVector* G4SmartVoxelHeader::BuildNodes(G4LogicalVolume* pVolume,
|
||||
|
||||
// Create G4VoxelNodes. Will Add proxies before setting fslices
|
||||
//
|
||||
G4NodeVector* nodeList = new G4NodeVector();
|
||||
auto* nodeList = new G4NodeVector();
|
||||
if (nodeList == nullptr)
|
||||
{
|
||||
G4Exception("G4SmartVoxelHeader::BuildNodes()", "GeomMgt0003",
|
||||
@@ -1017,7 +1016,7 @@ G4ProxyVector* G4SmartVoxelHeader::BuildNodes(G4LogicalVolume* pVolume,
|
||||
// Create proxy List : caller has deletion responsibility
|
||||
// (but we must delete nodeList *itself* - not the contents)
|
||||
//
|
||||
G4ProxyVector* proxyList = new G4ProxyVector();
|
||||
auto* proxyList = new G4ProxyVector();
|
||||
if (proxyList == nullptr)
|
||||
{
|
||||
G4Exception("G4SmartVoxelHeader::BuildNodes()", "GeomMgt0003",
|
||||
@@ -1034,7 +1033,7 @@ G4ProxyVector* G4SmartVoxelHeader::BuildNodes(G4LogicalVolume* pVolume,
|
||||
// Get rid of possible excess capacity in the internal node vector
|
||||
//
|
||||
((*nodeList)[nNode])->Shrink();
|
||||
G4SmartVoxelProxy* pProxyNode = new G4SmartVoxelProxy((*nodeList)[nNode]);
|
||||
auto* pProxyNode = new G4SmartVoxelProxy((*nodeList)[nNode]);
|
||||
if (pProxyNode == nullptr)
|
||||
{
|
||||
G4Exception("G4SmartVoxelHeader::BuildNodes()", "GeomMgt0003",
|
||||
@@ -1214,7 +1213,7 @@ void G4SmartVoxelHeader::RefineNodes(G4LogicalVolume* pVolume,
|
||||
|
||||
// Delete node proxies at start of collected sets of nodes/headers
|
||||
//
|
||||
lastProxy=0;
|
||||
lastProxy=nullptr;
|
||||
for (replaceNo=minNo; replaceNo<=maxNo; ++replaceNo)
|
||||
{
|
||||
if (lastProxy != fslices[replaceNo])
|
||||
@@ -1341,7 +1340,7 @@ std::ostream& operator << (std::ostream& os, const G4SmartVoxelHeader& h)
|
||||
|
||||
if (haveHeaders)
|
||||
{
|
||||
collectHead=0;
|
||||
collectHead=nullptr;
|
||||
for (j=0; j<h.fslices.size(); ++j)
|
||||
{
|
||||
if (h.fslices[j]->IsHeader())
|
||||
|
||||
@@ -31,23 +31,26 @@
|
||||
|
||||
#include "G4SmartVoxelNode.hh"
|
||||
|
||||
// Empty destructor
|
||||
//
|
||||
G4SmartVoxelNode::~G4SmartVoxelNode()
|
||||
// --------------------------------------------------------------------
|
||||
G4Allocator<G4SmartVoxelNode>*& aNodeAllocator()
|
||||
{
|
||||
G4ThreadLocalStatic G4Allocator<G4SmartVoxelNode>* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// Return true if contents equal
|
||||
//
|
||||
// Preconditions:
|
||||
//
|
||||
// Node contents were entered in the same order
|
||||
//
|
||||
G4bool G4SmartVoxelNode::operator == (const G4SmartVoxelNode& v) const
|
||||
{
|
||||
size_t maxNode = GetNoContained();
|
||||
std::size_t maxNode = GetNoContained();
|
||||
if (maxNode == v.GetNoContained())
|
||||
{
|
||||
for (size_t node=0; node<maxNode; ++node)
|
||||
for (std::size_t node=0; node<maxNode; ++node)
|
||||
{
|
||||
if (GetVolume(node) != v.GetVolume(node))
|
||||
{
|
||||
|
||||
@@ -30,8 +30,9 @@
|
||||
|
||||
#include "G4SmartVoxelProxy.hh"
|
||||
|
||||
// Empty destructor
|
||||
//
|
||||
G4SmartVoxelProxy::~G4SmartVoxelProxy()
|
||||
// --------------------------------------------------------------------
|
||||
G4Allocator<G4SmartVoxelProxy>*& aProxyAllocator()
|
||||
{
|
||||
G4ThreadLocalStatic G4Allocator<G4SmartVoxelProxy>* _instance = nullptr;
|
||||
return _instance;
|
||||
}
|
||||
|
||||
@@ -30,14 +30,6 @@
|
||||
|
||||
#include "G4VCurvedTrajectoryFilter.hh"
|
||||
|
||||
G4VCurvedTrajectoryFilter::G4VCurvedTrajectoryFilter()
|
||||
{
|
||||
}
|
||||
|
||||
G4VCurvedTrajectoryFilter::~G4VCurvedTrajectoryFilter()
|
||||
{
|
||||
}
|
||||
|
||||
std::vector<G4ThreeVector>*
|
||||
G4VCurvedTrajectoryFilter::GimmeThePointsAndForgetThem()
|
||||
{
|
||||
@@ -55,7 +47,7 @@ G4VCurvedTrajectoryFilter::GimmeThePointsAndForgetThem()
|
||||
}
|
||||
|
||||
void
|
||||
G4VCurvedTrajectoryFilter::CreateNewTrajectorySegment( )
|
||||
G4VCurvedTrajectoryFilter::CreateNewTrajectorySegment()
|
||||
{
|
||||
if (fpFilteredPoints != nullptr)
|
||||
{
|
||||
|
||||
@@ -34,32 +34,26 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VTouchable.hh"
|
||||
|
||||
G4VNestedParameterisation::G4VNestedParameterisation()
|
||||
: G4VPVParameterisation(),
|
||||
G4VVolumeMaterialScanner()
|
||||
{
|
||||
}
|
||||
|
||||
G4VNestedParameterisation::~G4VNestedParameterisation()
|
||||
{
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4VSolid* G4VNestedParameterisation::ComputeSolid(const G4int,
|
||||
G4VPhysicalVolume* pvol)
|
||||
{
|
||||
return pvol->GetLogicalVolume()->GetSolid();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4bool G4VNestedParameterisation::IsNested() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4VVolumeMaterialScanner* G4VNestedParameterisation::GetMaterialScanner()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4Material*
|
||||
G4VNestedParameterisation::ComputeMaterial(const G4int repNo,
|
||||
G4VPhysicalVolume* currentVol,
|
||||
|
||||
@@ -40,19 +40,3 @@ G4VPVDivisionFactory* G4VPVDivisionFactory::Instance()
|
||||
// ---
|
||||
return fgInstance;
|
||||
}
|
||||
|
||||
|
||||
//_____________________________________________________________________________
|
||||
|
||||
G4VPVDivisionFactory::G4VPVDivisionFactory()
|
||||
{
|
||||
// Protected singleton constructor.
|
||||
// ---
|
||||
// fgInstance = this;
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
|
||||
G4VPVDivisionFactory::~G4VPVDivisionFactory()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -34,14 +34,7 @@
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VVolumeMaterialScanner.hh"
|
||||
|
||||
G4VPVParameterisation::G4VPVParameterisation()
|
||||
{
|
||||
}
|
||||
|
||||
G4VPVParameterisation::~G4VPVParameterisation()
|
||||
{
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4VSolid*
|
||||
G4VPVParameterisation::ComputeSolid(const G4int,
|
||||
G4VPhysicalVolume* pPhysicalVol)
|
||||
@@ -49,6 +42,7 @@ G4VPVParameterisation::ComputeSolid(const G4int,
|
||||
return pPhysicalVol->GetLogicalVolume()->GetSolid();
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4Material*
|
||||
G4VPVParameterisation::ComputeMaterial(const G4int,
|
||||
G4VPhysicalVolume* pPhysicalVol,
|
||||
@@ -57,15 +51,15 @@ G4VPVParameterisation::ComputeMaterial(const G4int,
|
||||
return pPhysicalVol->GetLogicalVolume()->GetMaterial();
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4bool G4VPVParameterisation::IsNested() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4VVolumeMaterialScanner*
|
||||
G4VPVParameterisation::GetMaterialScanner()
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
// These enable material scan for nested parameterisations
|
||||
|
||||
@@ -39,6 +39,15 @@
|
||||
#include "G4AffineTransform.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Streaming operator dumping solid contents
|
||||
|
||||
std::ostream& operator<< ( std::ostream& os, const G4VSolid& e )
|
||||
{
|
||||
return e.StreamInfo(os);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor
|
||||
@@ -95,7 +104,7 @@ G4VSolid::~G4VSolid()
|
||||
//
|
||||
// Assignment operator
|
||||
|
||||
G4VSolid& G4VSolid::operator = (const G4VSolid& rhs)
|
||||
G4VSolid& G4VSolid::operator = (const G4VSolid& rhs)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
@@ -107,17 +116,10 @@ G4VSolid& G4VSolid::operator = (const G4VSolid& rhs)
|
||||
fshapeName = rhs.fshapeName;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Streaming operator dumping solid contents
|
||||
|
||||
std::ostream& operator<< ( std::ostream& os, const G4VSolid& e )
|
||||
{
|
||||
return e.StreamInfo(os);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Set solid name and notify store of the change
|
||||
@@ -126,7 +128,7 @@ void G4VSolid::SetName(const G4String& name)
|
||||
{
|
||||
fshapeName = name;
|
||||
G4SolidStore::GetInstance()->SetMapValid(false);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -163,16 +165,16 @@ G4ThreeVector G4VSolid::GetPointOnSurface() const
|
||||
// Dummy implementations ...
|
||||
|
||||
const G4VSolid* G4VSolid::GetConstituentSolid(G4int) const
|
||||
{ return nullptr; }
|
||||
{ return nullptr; }
|
||||
|
||||
G4VSolid* G4VSolid::GetConstituentSolid(G4int)
|
||||
{ return nullptr; }
|
||||
{ return nullptr; }
|
||||
|
||||
const G4DisplacedSolid* G4VSolid::GetDisplacedSolidPtr() const
|
||||
{ return nullptr; }
|
||||
{ return nullptr; }
|
||||
|
||||
G4DisplacedSolid* G4VSolid::GetDisplacedSolidPtr()
|
||||
{ return nullptr; }
|
||||
G4DisplacedSolid* G4VSolid::GetDisplacedSolidPtr()
|
||||
{ return nullptr; }
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -229,7 +231,7 @@ G4double G4VSolid::EstimateCubicVolume(G4int nStat, G4double epsilon) const
|
||||
pz = minZ-halfepsilon+(maxZ-minZ+epsilon)*G4QuickRand();
|
||||
p = G4ThreeVector(px,py,pz);
|
||||
in = Inside(p);
|
||||
if(in != kOutside) ++iInside;
|
||||
if(in != kOutside) ++iInside;
|
||||
}
|
||||
volume = (maxX-minX+epsilon)*(maxY-minY+epsilon)
|
||||
* (maxZ-minZ+epsilon)*iInside/nStat;
|
||||
@@ -313,7 +315,7 @@ G4double G4VSolid::EstimateSurfaceArea(G4int nstat, G4double ell) const
|
||||
G4double dX = bmax.x() - bmin.x();
|
||||
G4double dY = bmax.y() - bmin.y();
|
||||
G4double dZ = bmax.z() - bmin.z();
|
||||
|
||||
|
||||
// Define statistics and shell thickness
|
||||
//
|
||||
G4int npoints = (nstat < 1000) ? 1000 : nstat;
|
||||
@@ -380,7 +382,7 @@ G4double G4VSolid::EstimateSurfaceArea(G4int nstat, G4double ell) const
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
// Returns a pointer of a dynamically allocated copy of the solid.
|
||||
// Returns NULL pointer with warning in case the concrete solid does not
|
||||
// implement this method. The caller has responsibility for ownership.
|
||||
@@ -397,7 +399,7 @@ G4VSolid* G4VSolid::Clone() const
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
//
|
||||
// Calculate the maximum and minimum extents of the polygon described
|
||||
// by the vertices: pSectionIndex->pSectionIndex+1->
|
||||
// pSectionIndex+2->pSectionIndex+3->pSectionIndex
|
||||
@@ -412,7 +414,7 @@ G4VSolid* G4VSolid::Clone() const
|
||||
void G4VSolid::ClipCrossSection( G4ThreeVectorList* pVertices,
|
||||
const G4int pSectionIndex,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const EAxis pAxis,
|
||||
const EAxis pAxis,
|
||||
G4double& pMin, G4double& pMax) const
|
||||
{
|
||||
|
||||
@@ -442,7 +444,7 @@ void G4VSolid::ClipCrossSection( G4ThreeVectorList* pVertices,
|
||||
void G4VSolid::ClipBetweenSections( G4ThreeVectorList* pVertices,
|
||||
const G4int pSectionIndex,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const EAxis pAxis,
|
||||
const EAxis pAxis,
|
||||
G4double& pMin, G4double& pMax) const
|
||||
{
|
||||
G4ThreeVectorList polygon;
|
||||
@@ -486,7 +488,7 @@ void G4VSolid::ClipBetweenSections( G4ThreeVectorList* pVertices,
|
||||
void
|
||||
G4VSolid::CalculateClippedPolygonExtent(G4ThreeVectorList& pPolygon,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const EAxis pAxis,
|
||||
const EAxis pAxis,
|
||||
G4double& pMin,
|
||||
G4double& pMax) const
|
||||
{
|
||||
@@ -501,15 +503,15 @@ G4VSolid::CalculateClippedPolygonExtent(G4ThreeVectorList& pPolygon,
|
||||
for (i=0; i<noLeft; ++i)
|
||||
{
|
||||
component = pPolygon[i].operator()(pAxis);
|
||||
|
||||
if (component < pMin)
|
||||
{
|
||||
pMin = component;
|
||||
|
||||
if (component < pMin)
|
||||
{
|
||||
pMin = component;
|
||||
}
|
||||
if (component > pMax)
|
||||
{
|
||||
pMax = component;
|
||||
}
|
||||
{
|
||||
pMax = component;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -547,7 +549,7 @@ void G4VSolid::ClipPolygon( G4ThreeVectorList& pPolygon,
|
||||
G4VoxelLimits simpleLimit1;
|
||||
simpleLimit1.AddLimit(kXAxis,pVoxelLimit.GetMinXExtent(),kInfinity);
|
||||
ClipPolygonToSimpleLimits(pPolygon,outputPolygon,simpleLimit1);
|
||||
|
||||
|
||||
pPolygon.clear();
|
||||
|
||||
if ( !outputPolygon.size() ) return;
|
||||
@@ -635,7 +637,7 @@ G4VSolid::ClipPolygonToSimpleLimits( G4ThreeVectorList& pPolygon,
|
||||
//
|
||||
pVoxelLimit.ClipToLimits(vStart,vEnd);
|
||||
outputPolygon.push_back(vEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -645,12 +647,12 @@ G4VSolid::ClipPolygonToSimpleLimits( G4ThreeVectorList& pPolygon,
|
||||
//
|
||||
pVoxelLimit.ClipToLimits(vStart,vEnd);
|
||||
outputPolygon.push_back(vStart);
|
||||
outputPolygon.push_back(vEnd);
|
||||
outputPolygon.push_back(vEnd);
|
||||
}
|
||||
else // Both point outside -> no output
|
||||
{
|
||||
// outputPolygon.push_back(vStart);
|
||||
// outputPolygon.push_back(vEnd);
|
||||
// outputPolygon.push_back(vEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -677,7 +679,7 @@ void G4VSolid::BoundingLimits(G4ThreeVector& pMin, G4ThreeVector& pMax) const
|
||||
//
|
||||
// Get G4VisExtent - bounding box for graphics
|
||||
|
||||
G4VisExtent G4VSolid::GetExtent () const
|
||||
G4VisExtent G4VSolid::GetExtent () const
|
||||
{
|
||||
G4VisExtent extent;
|
||||
G4VoxelLimits voxelLimits; // Defaults to "infinite" limits.
|
||||
|
||||
@@ -30,14 +30,7 @@
|
||||
|
||||
#include "G4VTouchable.hh"
|
||||
|
||||
G4VTouchable::G4VTouchable()
|
||||
{
|
||||
}
|
||||
|
||||
G4VTouchable::~G4VTouchable()
|
||||
{
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4VPhysicalVolume* G4VTouchable::GetVolume(G4int) const
|
||||
{
|
||||
G4Exception("G4VTouchable::GetVolume()", "GeomMgt0001",
|
||||
@@ -45,6 +38,7 @@ G4VPhysicalVolume* G4VTouchable::GetVolume(G4int) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4VSolid* G4VTouchable::GetSolid(G4int) const
|
||||
{
|
||||
G4Exception("G4VTouchable::GetSolid()", "GeomMgt0001",
|
||||
@@ -52,6 +46,7 @@ G4VSolid* G4VTouchable::GetSolid(G4int) const
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4int G4VTouchable::GetReplicaNumber(G4int) const
|
||||
{
|
||||
G4Exception("G4VTouchable::GetReplicaNumber()", "GeomMgt0001",
|
||||
@@ -59,6 +54,7 @@ G4int G4VTouchable::GetReplicaNumber(G4int) const
|
||||
return 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4int G4VTouchable::MoveUpHistory(G4int)
|
||||
{
|
||||
G4Exception("G4VTouchable::MoveUpHistory()", "GeomMgt0001",
|
||||
@@ -66,6 +62,7 @@ G4int G4VTouchable::MoveUpHistory(G4int)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
void G4VTouchable::UpdateYourself(G4VPhysicalVolume*,
|
||||
const G4NavigationHistory* )
|
||||
{
|
||||
@@ -73,6 +70,7 @@ void G4VTouchable::UpdateYourself(G4VPhysicalVolume*,
|
||||
FatalException, "Undefined call to base class.");
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
G4int G4VTouchable::GetHistoryDepth() const
|
||||
{
|
||||
G4Exception("G4VTouchable::GetHistoryDepth()", "GeomMgt0001",
|
||||
@@ -80,9 +78,10 @@ G4int G4VTouchable::GetHistoryDepth() const
|
||||
return 0;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
const G4NavigationHistory* G4VTouchable::GetHistory() const
|
||||
{
|
||||
G4Exception("G4VTouchable::GetHistory()", "GeomMgt0001",
|
||||
FatalException, "Undefined call to base class.");
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -32,18 +32,6 @@
|
||||
|
||||
#include "G4ios.hh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Empty constructor and destructor
|
||||
//
|
||||
G4VoxelLimits::G4VoxelLimits()
|
||||
{
|
||||
}
|
||||
|
||||
G4VoxelLimits::~G4VoxelLimits()
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Further restrict limits
|
||||
|
||||
Reference in New Issue
Block a user