Import Geant4 10.1.0 source tree
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
$Id: History 78050 2013-12-03 08:17:33Z gcosmo $
|
||||
$Id: History 87218 2014-11-27 09:55:11Z gcosmo $
|
||||
-------------------------------------------------------------------
|
||||
|
||||
=========================================================
|
||||
@@ -17,24 +17,45 @@ committal in the CVS repository !
|
||||
* Reverse chronological order (last date on top), please *
|
||||
----------------------------------------------------------
|
||||
|
||||
November 27, 2014 G.Cosmo geommng-V10-00-06
|
||||
- Fixed implementation of StreamInfo() for G4USolid.
|
||||
|
||||
October 29, 2014 G.Cosmo geommng-V10-00-05
|
||||
- Moved G4USolid bridge class from internal USolids module.
|
||||
|
||||
October 3, 2014 G.Cosmo geommng-V10-00-04
|
||||
- Moved constructor for partial voxels refinements from protected to public.
|
||||
|
||||
September 25, 2014 W. Pokorski geommng-V10-00-03
|
||||
- Some fixes in the default constructor for Root-I/O persistency.
|
||||
|
||||
July 11, 2014 A. Dotti geommng-V10-00-02
|
||||
- Solves possible data-race condition in G4GeaomSplitter.
|
||||
|
||||
April 10, 2014 G.Cosmo geommng-V10-00-01
|
||||
- Get rid of deprecated 'register' storage class specifier in source files.
|
||||
|
||||
March 31, 2014 G.Cosmo geommng-V10-00-00
|
||||
- Fixed operator=() signature in G4LogicalSurface.
|
||||
|
||||
December 2, 2013 A.Dotti geommng-V09-06-17
|
||||
- Correctly initialize shadow pointers in G4PhysicalVolume.
|
||||
|
||||
December 2, 2013 M.Asai geommng-V09-06-16
|
||||
December 2, 2013 M.Asai geommng-V09-06-16
|
||||
- Correctly initialize shadow pointers in G4LogicalVolume.
|
||||
|
||||
November 30, 2013 M.Asai geommng-V09-06-15
|
||||
November 30, 2013 M.Asai geommng-V09-06-15
|
||||
- Explicitely initialize data members of G4LVData.
|
||||
|
||||
November 27, 2013 J.Apostolakis geommng-V09-06-14
|
||||
November 27, 2013 J.Apostolakis geommng-V09-06-14
|
||||
- Fix in G4GeomSplitter::FreeSlave(): use free() to delete memory
|
||||
which was allocated with malloc().
|
||||
|
||||
October 18, 2013, A. Dotti geommng-V09-06-13
|
||||
October 18, 2013, A. Dotti geommng-V09-06-13
|
||||
- Bug fixing in G4GeomSplitter::UseWorkspace method
|
||||
check if offset pointer is assigned AND different from new value
|
||||
|
||||
October 3, 2013 J.Apostolakis geommng-V09-06-12
|
||||
October 3, 2013 J.Apostolakis geommng-V09-06-12
|
||||
- Cleanup of G4LogicalVolume, G4VPhysicalVolume
|
||||
Moved long description of helper classes to end of headers.
|
||||
Moved macros to icc file.
|
||||
@@ -45,10 +66,10 @@ October 3, 2013 J.Apostolakis geommng-V09-06-12
|
||||
* Get/Set Solid( G4LVData, .) for potential performance improvement
|
||||
* bool fChangedState.
|
||||
|
||||
August 27, 2013 G.Cosmo geommng-V09-06-11
|
||||
August 27, 2013 G.Cosmo geommng-V09-06-11
|
||||
- Added G4Ellipsoid among solids enabled for parameterisation.
|
||||
|
||||
August 22, 2013 G.Cosmo geommng-V09-06-10
|
||||
August 22, 2013 G.Cosmo geommng-V09-06-10
|
||||
- Added parameter to specify maximum number of overlap errors to report
|
||||
in G4VPhysicalVolume::CheckOverlaps().
|
||||
|
||||
|
||||
@@ -45,18 +45,22 @@
|
||||
|
||||
#include "globals.hh"
|
||||
#include "geomwdefs.hh"
|
||||
#include "G4AutoLock.hh"
|
||||
|
||||
template <class T> // T is the private data from the object to be split
|
||||
class G4GeomSplitter
|
||||
{
|
||||
public:
|
||||
|
||||
G4GeomSplitter() : totalobj(0), totalspace(0), sharedOffset(0) {}
|
||||
G4GeomSplitter() : totalobj(0), totalspace(0), sharedOffset(0) {
|
||||
G4MUTEXINIT(mutex);
|
||||
}
|
||||
|
||||
G4int CreateSubInstance()
|
||||
// Invoked by the master or work thread to create a new subinstance
|
||||
// whenever a new split class instance is created.
|
||||
{
|
||||
G4AutoLock l(&mutex);
|
||||
totalobj++;
|
||||
if (totalobj > totalspace)
|
||||
{
|
||||
@@ -74,6 +78,7 @@ class G4GeomSplitter
|
||||
|
||||
void CopyMasterContents()
|
||||
{
|
||||
G4AutoLock l(&mutex);
|
||||
memcpy(offset, sharedOffset, totalspace * sizeof(T));
|
||||
}
|
||||
|
||||
@@ -81,6 +86,7 @@ class G4GeomSplitter
|
||||
// Invoked by each worker thread to copy all the subinstance array
|
||||
// from the master thread.
|
||||
{
|
||||
G4AutoLock l(&mutex);
|
||||
if (offset) { return; }
|
||||
offset = (T *) realloc(offset, totalspace * sizeof(T));
|
||||
if (offset == 0)
|
||||
@@ -88,6 +94,7 @@ class G4GeomSplitter
|
||||
G4Exception("G4GeomSplitter::SlaveCopySubInstanceArray()",
|
||||
"OutOfMemory", FatalException, "Cannot malloc space!");
|
||||
}
|
||||
l.unlock();
|
||||
CopyMasterContents();
|
||||
}
|
||||
|
||||
@@ -96,6 +103,7 @@ class G4GeomSplitter
|
||||
// initialize each subinstance using a particular method defined by
|
||||
// the subclass.
|
||||
{
|
||||
G4AutoLock l(&mutex);
|
||||
if (offset) { return; }
|
||||
offset = (T *) realloc(offset, totalspace * sizeof(T));
|
||||
|
||||
@@ -116,12 +124,14 @@ class G4GeomSplitter
|
||||
// to copy again all the subinstance array from the master thread.
|
||||
// To cope with user's changes in Geometry - e.g. change of material in a volume
|
||||
{
|
||||
G4AutoLock l(&mutex);
|
||||
if (!offset) {
|
||||
SlaveInitializeSubInstance();
|
||||
G4Exception("G4GeomSPlitter::SlaveReCopySubInstance()",
|
||||
"MissingInitialisation", JustWarning,
|
||||
"Must be called after Initialisation or first Copy.");
|
||||
}
|
||||
l.unlock();
|
||||
CopyMasterContents();
|
||||
}
|
||||
|
||||
@@ -187,6 +197,7 @@ class G4GeomSplitter
|
||||
G4int totalobj;
|
||||
G4int totalspace;
|
||||
T* sharedOffset;
|
||||
G4Mutex mutex;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogicalSurface.hh 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
// $Id: G4LogicalSurface.hh 80066 2014-03-31 13:47:20Z gcosmo $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Class G4LogicalSurface
|
||||
@@ -107,7 +107,7 @@ class G4LogicalSurface
|
||||
private: // Copying restricted
|
||||
|
||||
G4LogicalSurface(const G4LogicalSurface &right);
|
||||
inline const G4LogicalSurface& operator=(const G4LogicalSurface& right);
|
||||
inline G4LogicalSurface& operator=(const G4LogicalSurface& right);
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogicalSurface.icc 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
// $Id: G4LogicalSurface.icc 80066 2014-03-31 13:47:20Z gcosmo $
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Surface Class Inline Methods
|
||||
@@ -78,7 +78,7 @@ G4LogicalSurface::SetTransitionRadiationSurface(G4TransitionRadiationSurface*
|
||||
// Operators
|
||||
//////////////
|
||||
|
||||
inline const G4LogicalSurface &
|
||||
inline G4LogicalSurface &
|
||||
G4LogicalSurface::operator=(const G4LogicalSurface &right)
|
||||
{
|
||||
if (&right == this) { return *this; }
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SmartVoxelHeader.hh 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
// $Id: G4SmartVoxelHeader.hh 84209 2014-10-10 14:46:37Z gcosmo $
|
||||
//
|
||||
// class G4SmartVoxelHeader
|
||||
//
|
||||
@@ -121,8 +121,6 @@ class G4SmartVoxelHeader
|
||||
friend std::ostream&
|
||||
operator << (std::ostream&s, const G4SmartVoxelHeader& h);
|
||||
|
||||
protected:
|
||||
|
||||
G4SmartVoxelHeader(G4LogicalVolume* pVolume,
|
||||
const G4VoxelLimits& pLimits,
|
||||
const G4VolumeNosVector* pCandidates,
|
||||
@@ -132,6 +130,8 @@ class G4SmartVoxelHeader
|
||||
// and min equivalent slice nos for the header - they apply to the level
|
||||
// of the header, not its nodes.
|
||||
|
||||
protected:
|
||||
|
||||
// `Worker' / operation functions:
|
||||
|
||||
void BuildVoxels(G4LogicalVolume* pVolume);
|
||||
|
||||
@@ -0,0 +1,187 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id:$
|
||||
// GEANT4 tag $Name:$
|
||||
//
|
||||
//
|
||||
// class G4USolid
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Bridge base class for solids defined in the Unified Solids Library.
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4USolid_HH
|
||||
#define G4USolid_HH
|
||||
|
||||
#include "G4VSolid.hh"
|
||||
#include "VUSolid.hh"
|
||||
|
||||
class G4VPVParameterisation;
|
||||
|
||||
class G4USolid : public G4VSolid
|
||||
{
|
||||
public: // with description
|
||||
|
||||
G4USolid(const G4String& pName, VUSolid* shape);
|
||||
// Creates a new shape, with the supplied name. No provision is made
|
||||
// for sharing a common name amongst multiple classes.
|
||||
virtual ~G4USolid();
|
||||
// Default destructor.
|
||||
|
||||
G4bool operator==(const G4USolid& s) const;
|
||||
// Return true only if addresses are the same.
|
||||
|
||||
virtual G4bool CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const;
|
||||
// Calculate the minimum and maximum extent of the solid, when under the
|
||||
// specified transform, and within the specified limits. If the solid
|
||||
// is not intersected by the region, return false, else return true.
|
||||
|
||||
virtual EInside Inside(const G4ThreeVector& p) const;
|
||||
// Returns kOutside if the point at offset p is outside the shapes
|
||||
// boundaries plus Tolerance/2, kSurface if the point is <= Tolerance/2
|
||||
// from a surface, otherwise kInside.
|
||||
|
||||
virtual G4ThreeVector SurfaceNormal(const G4ThreeVector& p) const;
|
||||
// Returns the outwards pointing unit normal of the shape for the
|
||||
// surface closest to the point at offset p.
|
||||
|
||||
virtual G4double DistanceToIn(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v) const;
|
||||
// Return the distance along the normalised vector v to the shape,
|
||||
// from the point at offset p. If there is no intersection, return
|
||||
// kInfinity. The first intersection resulting from `leaving' a
|
||||
// surface/volume is discarded. Hence, it is tolerant of points on
|
||||
// the surface of the shape.
|
||||
|
||||
virtual G4double DistanceToIn(const G4ThreeVector& p) const;
|
||||
// Calculate the distance to the nearest surface of a shape from an
|
||||
// outside point. The distance can be an underestimate.
|
||||
|
||||
virtual G4double DistanceToOut(const G4ThreeVector& p,
|
||||
const G4ThreeVector& v,
|
||||
const G4bool calcNorm = false,
|
||||
G4bool* validNorm = 0,
|
||||
G4ThreeVector* n = 0) const;
|
||||
// Return the distance along the normalised vector v to the shape,
|
||||
// from a point at an offset p inside or on the surface of the shape.
|
||||
// Intersections with surfaces, when the point is < Tolerance/2 from a
|
||||
// surface must be ignored.
|
||||
// If calcNorm==true:
|
||||
// validNorm set true if the solid lies entirely behind or on the
|
||||
// exiting surface.
|
||||
// n set to exiting outwards normal vector (undefined Magnitude).
|
||||
// validNorm set to false if the solid does not lie entirely behind
|
||||
// or on the exiting surface
|
||||
// If calcNorm==false:
|
||||
// validNorm and n are unused.
|
||||
//
|
||||
// Must be called as solid.DistanceToOut(p,v) or by specifying all
|
||||
// the parameters.
|
||||
|
||||
virtual G4double DistanceToOut(const G4ThreeVector& p) const;
|
||||
// Calculate the distance to the nearest surface of a shape from an
|
||||
// inside point. The distance can be an underestimate.
|
||||
|
||||
virtual void ComputeDimensions(G4VPVParameterisation* p,
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep);
|
||||
// Throw exception if ComputeDimensions called from an illegal
|
||||
// derived class.
|
||||
|
||||
virtual G4double GetCubicVolume();
|
||||
// Returns an estimation of the solid volume in internal units.
|
||||
// This method may be overloaded by derived classes to compute the
|
||||
// exact geometrical quantity for solids where this is possible,
|
||||
// or anyway to cache the computed value.
|
||||
// Note: the computed value is NOT cached.
|
||||
|
||||
virtual G4double GetSurfaceArea();
|
||||
// Return an estimation of the solid surface area in internal units.
|
||||
// This method may be overloaded by derived classes to compute the
|
||||
// exact geometrical quantity for solids where this is possible,
|
||||
// or anyway to cache the computed value.
|
||||
// Note: the computed value is NOT cached.
|
||||
|
||||
virtual G4GeometryType GetEntityType() const;
|
||||
// Provide identification of the class of an object.
|
||||
// (required for persistency and STEP interface)
|
||||
|
||||
virtual G4ThreeVector GetPointOnSurface() const;
|
||||
// Returns a random point located on the surface of the solid.
|
||||
|
||||
virtual G4VSolid* Clone() 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.
|
||||
|
||||
virtual std::ostream& StreamInfo(std::ostream& os) const;
|
||||
// Dumps contents of the solid to a stream.
|
||||
|
||||
virtual void DescribeYourselfTo(G4VGraphicsScene& scene) const;
|
||||
// A "double dispatch" function which identifies the solid
|
||||
// to the graphics scene for visualization.
|
||||
|
||||
virtual G4VisExtent GetExtent() const;
|
||||
// Provide extent (bounding box) as possible hint to the graphics view.
|
||||
G4Polyhedron* CreatePolyhedron() const;
|
||||
// Create Polyhedron used for Visualisation
|
||||
virtual G4Polyhedron* GetPolyhedron() const;
|
||||
// Smart access function - creates on request and stores for future
|
||||
// access. A null pointer means "not available".
|
||||
|
||||
public: // without description
|
||||
|
||||
G4USolid(__void__&);
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4USolid(const G4USolid& rhs);
|
||||
G4USolid& operator=(const G4USolid& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
VUSolid* GetSolid() const
|
||||
{
|
||||
return fShape;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
G4ThreeVectorList* CreateRotatedVertices(const G4AffineTransform& pT) const;
|
||||
|
||||
protected: // data
|
||||
|
||||
VUSolid* fShape;
|
||||
mutable G4bool fRebuildPolyhedron;
|
||||
mutable G4Polyhedron* fPolyhedron;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VPhysicalVolume.hh 78050 2013-12-03 08:17:33Z gcosmo $
|
||||
// $Id: G4VPhysicalVolume.hh 83991 2014-09-26 09:22:26Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4VPhysicalVolume
|
||||
@@ -65,6 +65,8 @@ class G4PVData
|
||||
// and must have a per-thread state.
|
||||
|
||||
public:
|
||||
G4PVData():frot(0) {}
|
||||
|
||||
void initialize() {
|
||||
frot = 0;
|
||||
ftrans = G4ThreeVector(0,0,0);
|
||||
|
||||
@@ -11,12 +11,13 @@
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
# $Id: sources.cmake 67975 2013-03-13 10:19:44Z gcosmo $
|
||||
# $Id: sources.cmake 85608 2014-10-31 11:23:30Z gcosmo $
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
include_directories(${USOLIDS_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
@@ -63,6 +64,7 @@ GEANT4_DEFINE_MODULE(NAME G4geometrymng
|
||||
G4SmartVoxelStat.hh
|
||||
G4SolidStore.hh
|
||||
G4TouchableHandle.hh
|
||||
G4USolid.hh
|
||||
G4VCurvedTrajectoryFilter.hh
|
||||
G4VNestedParameterisation.hh
|
||||
G4VPVDivisionFactory.hh
|
||||
@@ -102,6 +104,7 @@ GEANT4_DEFINE_MODULE(NAME G4geometrymng
|
||||
G4SmartVoxelProxy.cc
|
||||
G4SmartVoxelStat.cc
|
||||
G4SolidStore.cc
|
||||
G4USolid.cc
|
||||
G4VCurvedTrajectoryFilter.cc
|
||||
G4VNestedParameterisation.cc
|
||||
G4VPVDivisionFactory.cc
|
||||
@@ -121,6 +124,7 @@ GEANT4_DEFINE_MODULE(NAME G4geometrymng
|
||||
G4intercoms
|
||||
G4materials
|
||||
LINK_LIBRARIES
|
||||
${USOLIDS_LIBRARIES}
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4LogicalVolume.cc 78050 2013-12-03 08:17:33Z gcosmo $
|
||||
// $Id: G4LogicalVolume.cc 83991 2014-09-26 09:22:26Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4LogicalVolume Implementation
|
||||
@@ -183,14 +183,10 @@ G4LogicalVolume::G4LogicalVolume( __void__& )
|
||||
{
|
||||
instanceID = subInstanceManager.CreateSubInstance();
|
||||
|
||||
// G4MT_solid = 0,
|
||||
SetSolid(0);
|
||||
SetSensitiveDetector(0); // G4MT_sdetector = 0;
|
||||
SetFieldManager(0, false); // G4MT_fmanager = 0;
|
||||
SetMaterial(0); // G4MT_material = 0;
|
||||
// this->SetMass(0); //
|
||||
|
||||
G4MT_mass = 0.;
|
||||
// this->SetCutsCouple(0);
|
||||
G4MT_ccouple = 0;
|
||||
|
||||
// Add to store
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Region.cc 67975 2013-03-13 10:19:44Z gcosmo $
|
||||
// $Id: G4Region.cc 80288 2014-04-10 09:50:40Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4Region Implementation
|
||||
@@ -179,7 +179,7 @@ void G4Region::ScanVolumeTree(G4LogicalVolume* lv, G4bool region)
|
||||
if (pParam->GetMaterialScanner())
|
||||
{
|
||||
size_t matNo = pParam->GetMaterialScanner()->GetNumberOfMaterials();
|
||||
for (register size_t mat=0; mat<matNo; mat++)
|
||||
for (size_t mat=0; mat<matNo; mat++)
|
||||
{
|
||||
volMat = pParam->GetMaterialScanner()->GetMaterial(mat);
|
||||
if(!volMat && fInMassGeometry)
|
||||
@@ -204,7 +204,7 @@ void G4Region::ScanVolumeTree(G4LogicalVolume* lv, G4bool region)
|
||||
else
|
||||
{
|
||||
size_t repNo = daughterPVol->GetMultiplicity();
|
||||
for (register size_t rep=0; rep<repNo; rep++)
|
||||
for (size_t rep=0; rep<repNo; rep++)
|
||||
{
|
||||
volMat = pParam->ComputeMaterial(rep, daughterPVol);
|
||||
if(!volMat && fInMassGeometry)
|
||||
@@ -231,7 +231,7 @@ void G4Region::ScanVolumeTree(G4LogicalVolume* lv, G4bool region)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (register size_t i=0; i<noDaughters; i++)
|
||||
for (size_t i=0; i<noDaughters; i++)
|
||||
{
|
||||
G4LogicalVolume* daughterLVol = lv->GetDaughter(i)->GetLogicalVolume();
|
||||
if (!daughterLVol->IsRootRegion())
|
||||
|
||||
@@ -0,0 +1,584 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id:$
|
||||
// GEANT4 tag $Name:$
|
||||
//
|
||||
//
|
||||
// G4USolid implementation
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4USolid.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
#include "G4VoxelLimits.hh"
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4PolyhedronArbitrary.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
#include "G4AutoLock.hh"
|
||||
|
||||
namespace
|
||||
{
|
||||
G4Mutex polyhedronMutex = G4MUTEX_INITIALIZER;
|
||||
}
|
||||
|
||||
G4USolid::G4USolid(const G4String& name, VUSolid* s) :
|
||||
G4VSolid(name), fShape(s), fRebuildPolyhedron(false), fPolyhedron(0)
|
||||
{
|
||||
}
|
||||
|
||||
G4USolid::G4USolid(__void__& a)
|
||||
: G4VSolid(a), fShape(0), fRebuildPolyhedron(false), fPolyhedron(0)
|
||||
{
|
||||
}
|
||||
|
||||
G4USolid::~G4USolid()
|
||||
{
|
||||
delete fPolyhedron; fPolyhedron = 0;
|
||||
}
|
||||
|
||||
G4bool G4USolid::operator==(const G4USolid& s) const
|
||||
{
|
||||
return (this == &s) ? true : false;
|
||||
}
|
||||
|
||||
EInside G4USolid::Inside(const G4ThreeVector& p) const
|
||||
{
|
||||
UVector3 pt;
|
||||
VUSolid::EnumInside in_temp;
|
||||
EInside in = kOutside;
|
||||
pt.x = p.x();
|
||||
pt.y = p.y();
|
||||
pt.z = p.z(); // better assign at construction
|
||||
|
||||
in_temp = fShape->Inside(pt);
|
||||
|
||||
if (in_temp == VUSolid::eSurface)return kSurface;
|
||||
if (in_temp == VUSolid::eInside)return kInside;
|
||||
|
||||
return in;
|
||||
}
|
||||
|
||||
G4ThreeVector G4USolid::SurfaceNormal(const G4ThreeVector& pt) const
|
||||
{
|
||||
UVector3 p;
|
||||
p.x = pt.x();
|
||||
p.y = pt.y();
|
||||
p.z = pt.z();
|
||||
UVector3 n;
|
||||
fShape->Normal(p, n);
|
||||
return G4ThreeVector(n.x, n.y, n.z);
|
||||
}
|
||||
|
||||
G4double G4USolid::DistanceToIn(const G4ThreeVector& pt,
|
||||
const G4ThreeVector& d)const
|
||||
{
|
||||
UVector3 p;
|
||||
p.x = pt.x();
|
||||
p.y = pt.y();
|
||||
p.z = pt.z(); // better assign at construction
|
||||
UVector3 v;
|
||||
v.x = d.x();
|
||||
v.y = d.y();
|
||||
v.z = d.z(); // better assign at construction
|
||||
G4double dist = fShape->DistanceToIn(p, v);
|
||||
if (dist > kInfinity) dist = kInfinity;
|
||||
return dist;
|
||||
}
|
||||
|
||||
G4double G4USolid::DistanceToIn(const G4ThreeVector& pt) const
|
||||
{
|
||||
UVector3 p;
|
||||
p.x = pt.x();
|
||||
p.y = pt.y();
|
||||
p.z = pt.z(); // better assign at construction
|
||||
G4double dist = fShape->SafetyFromOutside(p); // true?
|
||||
if (dist > kInfinity) dist = kInfinity;
|
||||
return dist;
|
||||
}
|
||||
|
||||
G4double G4USolid::DistanceToOut(const G4ThreeVector& pt,
|
||||
const G4ThreeVector& d,
|
||||
const G4bool calcNorm,
|
||||
G4bool* validNorm,
|
||||
G4ThreeVector* norm) const
|
||||
{
|
||||
UVector3 p;
|
||||
p.x = pt.x();
|
||||
p.y = pt.y();
|
||||
p.z = pt.z(); // better assign at construction
|
||||
UVector3 v;
|
||||
v.x = d.x();
|
||||
v.y = d.y();
|
||||
v.z = d.z(); // better assign at construction
|
||||
UVector3 n;
|
||||
bool valid;
|
||||
G4double dist = fShape->DistanceToOut(p, v, n,valid); // should use local variable
|
||||
if(calcNorm)
|
||||
{
|
||||
if(valid){ *validNorm = true;}
|
||||
else {* validNorm =false;}
|
||||
if(*validNorm)
|
||||
{ norm->setX(n.x);
|
||||
norm->setY(n.y);
|
||||
norm->setZ(n.z);
|
||||
} // *norm = n, but only after calcNorm check
|
||||
}
|
||||
if (dist > kInfinity) dist = kInfinity;
|
||||
return dist;
|
||||
}
|
||||
|
||||
G4double G4USolid::DistanceToOut(const G4ThreeVector& pt) const
|
||||
{
|
||||
UVector3 p;
|
||||
p.x = pt.x();
|
||||
p.y = pt.y();
|
||||
p.z = pt.z(); // better assign at construction
|
||||
return fShape->SafetyFromInside(p); // true?
|
||||
}
|
||||
|
||||
G4double G4USolid::GetCubicVolume()
|
||||
{
|
||||
return fShape->Capacity();
|
||||
}
|
||||
|
||||
G4double G4USolid::GetSurfaceArea()
|
||||
{
|
||||
return fShape->SurfaceArea();
|
||||
}
|
||||
|
||||
G4ThreeVector G4USolid::GetPointOnSurface() const
|
||||
{
|
||||
UVector3 p;
|
||||
p = fShape->GetPointOnSurface();
|
||||
return G4ThreeVector(p.x, p.y, p.z);
|
||||
}
|
||||
|
||||
G4bool G4USolid::CalculateExtent(const EAxis pAxis,
|
||||
const G4VoxelLimits& pVoxelLimit,
|
||||
const G4AffineTransform& pTransform,
|
||||
G4double& pMin, G4double& pMax) const
|
||||
{
|
||||
if (!pTransform.IsRotated())
|
||||
{
|
||||
VUSolid::EAxisType eAxis = VUSolid::eXaxis;
|
||||
G4double offset = pTransform.NetTranslation().x();
|
||||
if (pAxis == kYAxis)
|
||||
{
|
||||
eAxis = VUSolid::eYaxis;
|
||||
offset = pTransform.NetTranslation().y();
|
||||
}
|
||||
if (pAxis == kZAxis)
|
||||
{
|
||||
eAxis = VUSolid::eZaxis;
|
||||
offset = pTransform.NetTranslation().z();
|
||||
}
|
||||
fShape->ExtentAxis(eAxis, pMin, pMax);
|
||||
|
||||
pMin += offset;
|
||||
pMax += offset;
|
||||
|
||||
if (pVoxelLimit.IsLimited())
|
||||
{
|
||||
switch (pAxis)
|
||||
{
|
||||
case kXAxis:
|
||||
if ((pMin > pVoxelLimit.GetMaxXExtent() + kCarTolerance) ||
|
||||
(pMax < pVoxelLimit.GetMinXExtent() - kCarTolerance))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
pMin = std::max(pMin, pVoxelLimit.GetMinXExtent());
|
||||
pMax = std::min(pMax, pVoxelLimit.GetMaxXExtent());
|
||||
}
|
||||
break;
|
||||
case kYAxis:
|
||||
if ((pMin > pVoxelLimit.GetMaxYExtent() + kCarTolerance) ||
|
||||
(pMax < pVoxelLimit.GetMinYExtent() - kCarTolerance))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
pMin = std::max(pMin, pVoxelLimit.GetMinYExtent());
|
||||
pMax = std::min(pMax, pVoxelLimit.GetMaxYExtent());
|
||||
}
|
||||
break;
|
||||
case kZAxis:
|
||||
if ((pMin > pVoxelLimit.GetMaxZExtent() + kCarTolerance) ||
|
||||
(pMax < pVoxelLimit.GetMinZExtent() - kCarTolerance))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
pMin = std::max(pMin, pVoxelLimit.GetMinZExtent());
|
||||
pMax = std::min(pMax, pVoxelLimit.GetMaxZExtent());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
pMin -= kCarTolerance ;
|
||||
pMax += kCarTolerance ;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else // General rotated case - create and clip mesh to boundaries
|
||||
{
|
||||
// Rotate BoundingBox and Calculate Extent as for BREPS
|
||||
|
||||
G4bool existsAfterClip = false ;
|
||||
G4ThreeVectorList* vertices ;
|
||||
|
||||
pMin = +kInfinity ;
|
||||
pMax = -kInfinity ;
|
||||
|
||||
// Calculate rotated vertex coordinates
|
||||
|
||||
vertices = CreateRotatedVertices(pTransform) ;
|
||||
ClipCrossSection(vertices, 0, pVoxelLimit, pAxis, pMin, pMax) ;
|
||||
ClipCrossSection(vertices, 4, pVoxelLimit, pAxis, pMin, pMax) ;
|
||||
ClipBetweenSections(vertices, 0, pVoxelLimit, pAxis, pMin, pMax) ;
|
||||
|
||||
if (pVoxelLimit.IsLimited(pAxis) == false)
|
||||
{
|
||||
if ((pMin != kInfinity) || (pMax != -kInfinity))
|
||||
{
|
||||
existsAfterClip = true ;
|
||||
|
||||
// Add 2*tolerance to avoid precision troubles
|
||||
|
||||
pMin -= kCarTolerance;
|
||||
pMax += kCarTolerance;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
G4ThreeVector clipCentre(
|
||||
(pVoxelLimit.GetMinXExtent() + pVoxelLimit.GetMaxXExtent()) * 0.5,
|
||||
(pVoxelLimit.GetMinYExtent() + pVoxelLimit.GetMaxYExtent()) * 0.5,
|
||||
(pVoxelLimit.GetMinZExtent() + pVoxelLimit.GetMaxZExtent()) * 0.5);
|
||||
|
||||
if ((pMin != kInfinity) || (pMax != -kInfinity))
|
||||
{
|
||||
existsAfterClip = true ;
|
||||
|
||||
|
||||
// Check to see if endpoints are in the solid
|
||||
|
||||
clipCentre(pAxis) = pVoxelLimit.GetMinExtent(pAxis);
|
||||
|
||||
if (Inside(pTransform.Inverse().TransformPoint(clipCentre)) != kOutside)
|
||||
{
|
||||
pMin = pVoxelLimit.GetMinExtent(pAxis);
|
||||
}
|
||||
else
|
||||
{
|
||||
pMin -= kCarTolerance;
|
||||
}
|
||||
clipCentre(pAxis) = pVoxelLimit.GetMaxExtent(pAxis);
|
||||
|
||||
if (Inside(pTransform.Inverse().TransformPoint(clipCentre)) != kOutside)
|
||||
{
|
||||
pMax = pVoxelLimit.GetMaxExtent(pAxis);
|
||||
}
|
||||
else
|
||||
{
|
||||
pMax += kCarTolerance;
|
||||
}
|
||||
}
|
||||
|
||||
// Check for case where completely enveloping clipping volume
|
||||
// If point inside then we are confident that the solid completely
|
||||
// envelopes the clipping volume. Hence set min/max extents according
|
||||
// to clipping volume extents along the specified axis.
|
||||
|
||||
else if (Inside(pTransform.Inverse().TransformPoint(clipCentre))
|
||||
!= kOutside)
|
||||
{
|
||||
existsAfterClip = true ;
|
||||
pMin = pVoxelLimit.GetMinExtent(pAxis) ;
|
||||
pMax = pVoxelLimit.GetMaxExtent(pAxis) ;
|
||||
}
|
||||
}
|
||||
delete vertices;
|
||||
return existsAfterClip;
|
||||
}
|
||||
}
|
||||
|
||||
void G4USolid::ComputeDimensions(G4VPVParameterisation*,
|
||||
const G4int,
|
||||
const G4VPhysicalVolume*)
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Illegal call to G4USolid::ComputeDimensions()" << G4endl
|
||||
<< "Method not overloaded by derived class !";
|
||||
G4Exception("G4USolid::ComputeDimensions()", "GeomSolids0003",
|
||||
FatalException, message);
|
||||
}
|
||||
|
||||
void G4USolid::DescribeYourselfTo(G4VGraphicsScene& scene) const
|
||||
{
|
||||
scene.AddSolid(*this);
|
||||
}
|
||||
|
||||
G4GeometryType G4USolid::GetEntityType() const
|
||||
{
|
||||
|
||||
G4String string = fShape->GetEntityType();
|
||||
return "G4" + string;
|
||||
}
|
||||
|
||||
std::ostream& G4USolid::StreamInfo(std::ostream& os) const
|
||||
{
|
||||
return fShape->StreamInfo(os);
|
||||
}
|
||||
|
||||
G4USolid::G4USolid(const G4USolid& rhs)
|
||||
: G4VSolid(rhs), fRebuildPolyhedron(false), fPolyhedron(0)
|
||||
{
|
||||
fShape = rhs.fShape->Clone();
|
||||
}
|
||||
|
||||
G4USolid& G4USolid::operator=(const G4USolid& rhs)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
if (this == &rhs)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
// Copy base class data
|
||||
//
|
||||
G4VSolid::operator=(rhs);
|
||||
|
||||
// Copy data
|
||||
//
|
||||
fShape = rhs.fShape->Clone();
|
||||
fRebuildPolyhedron = false;
|
||||
delete fPolyhedron; fPolyhedron = 0;
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
G4VSolid* G4USolid::Clone() const
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Clone() method not implemented for type: "
|
||||
<< GetEntityType() << "!" << G4endl
|
||||
<< "Returning NULL pointer!";
|
||||
G4Exception("G4USolid::Clone()", "GeomSolids1001", JustWarning, message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4ThreeVectorList*
|
||||
G4USolid::CreateRotatedVertices(const G4AffineTransform& pTransform) const
|
||||
{
|
||||
G4double xMin, xMax, yMin, yMax, zMin, zMax;
|
||||
|
||||
fShape->ExtentAxis(VUSolid::eXaxis, xMin, xMax);
|
||||
fShape->ExtentAxis(VUSolid::eYaxis, yMin, yMax);
|
||||
fShape->ExtentAxis(VUSolid::eZaxis, zMin, zMax);
|
||||
|
||||
G4ThreeVectorList* vertices;
|
||||
vertices = new G4ThreeVectorList();
|
||||
|
||||
if (vertices)
|
||||
{
|
||||
vertices->reserve(8);
|
||||
G4ThreeVector vertex0(xMin, yMin, zMin);
|
||||
G4ThreeVector vertex1(xMax, yMin, zMin);
|
||||
G4ThreeVector vertex2(xMax, yMax, zMin);
|
||||
G4ThreeVector vertex3(xMin, yMax, zMin);
|
||||
G4ThreeVector vertex4(xMin, yMin, zMax);
|
||||
G4ThreeVector vertex5(xMax, yMin, zMax);
|
||||
G4ThreeVector vertex6(xMax, yMax, zMax);
|
||||
G4ThreeVector vertex7(xMin, yMax, zMax);
|
||||
|
||||
vertices->push_back(pTransform.TransformPoint(vertex0));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex1));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex2));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex3));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex4));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex5));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex6));
|
||||
vertices->push_back(pTransform.TransformPoint(vertex7));
|
||||
}
|
||||
else
|
||||
{
|
||||
G4Exception("G4VUSolid::CreateRotatedVertices()", "FatalError",
|
||||
FatalException, "Out of memory - Cannot allocate vertices!");
|
||||
}
|
||||
return vertices;
|
||||
}
|
||||
|
||||
G4Polyhedron* G4USolid::CreatePolyhedron() const
|
||||
{
|
||||
G4int index = 0;
|
||||
if (fShape->GetEntityType() == "Box")
|
||||
{
|
||||
double array[3];
|
||||
fShape->GetParametersList(index, array);
|
||||
return new G4PolyhedronBox(array[0], array[1], array[2]);
|
||||
}
|
||||
if (fShape->GetEntityType() == "Tubs")
|
||||
{
|
||||
double array[5];
|
||||
fShape->GetParametersList(index, array);
|
||||
return new G4PolyhedronTubs(array[0], array[1], array[2], array[3], array[4]);
|
||||
}
|
||||
if (fShape->GetEntityType() == "Cons")
|
||||
{
|
||||
double array[7];
|
||||
fShape->GetParametersList(index, array);
|
||||
return new G4PolyhedronCons(array[0], array[1], array[2], array[3], array[4], array[5], array[6]);
|
||||
}
|
||||
if (fShape->GetEntityType() == "Orb")
|
||||
{
|
||||
double array[1];
|
||||
fShape->GetParametersList(index, array);
|
||||
return new G4PolyhedronSphere(0., array[0], 0., 2 * pi, 0., pi);
|
||||
}
|
||||
if (fShape->GetEntityType() == "Sphere")
|
||||
{
|
||||
double array[6];
|
||||
fShape->GetParametersList(index, array);
|
||||
return new G4PolyhedronSphere(array[0], array[1], array[2], array[3], array[4], array[5]);
|
||||
}
|
||||
if (fShape->GetEntityType() == "Tet")
|
||||
{
|
||||
double array[12];
|
||||
fShape->GetParametersList(index, array);
|
||||
G4Polyhedron* ph = new G4Polyhedron;
|
||||
double xyz[4][3];
|
||||
static int faces[4][4] = {{1, 3, 2, 0}, {1, 4, 3, 0}, {1, 2, 4, 0}, {2, 3, 4, 0}};
|
||||
xyz[0][0] = array[0];
|
||||
xyz[0][1] = array[1];
|
||||
xyz[0][2] = array[2];
|
||||
xyz[1][0] = array[3];
|
||||
xyz[1][1] = array[4];
|
||||
xyz[1][2] = array[5];
|
||||
xyz[2][0] = array[6];
|
||||
xyz[2][1] = array[7];
|
||||
xyz[2][2] = array[8];
|
||||
xyz[3][0] = array[9];
|
||||
xyz[3][1] = array[10];
|
||||
xyz[3][2] = array[11];
|
||||
|
||||
ph->createPolyhedron(4, 4, xyz, faces);
|
||||
return ph;
|
||||
}
|
||||
if (fShape->GetEntityType() == "Trd")
|
||||
{
|
||||
double array[5];
|
||||
fShape->GetParametersList(index, array);
|
||||
return new G4PolyhedronTrd2(array[0], array[1], array[2], array[3], array[4]);
|
||||
}
|
||||
if (fShape->GetEntityType() == "Trap")
|
||||
{
|
||||
double array[12];
|
||||
fShape->GetParametersList(index, array);
|
||||
double phi = (array[11] != 1.0) ? (std::atan(array[10] / array[9])) : (0.0);
|
||||
double alpha1 = std::atan(array[4]);
|
||||
double alpha2 = std::atan(array[8]);
|
||||
double theta = std::acos(array[11]);
|
||||
|
||||
return new G4PolyhedronTrap(array[0], theta, phi,
|
||||
array[1], array[2], array[3], alpha1,
|
||||
array[5], array[6], array[7], alpha2);
|
||||
}
|
||||
|
||||
/*
|
||||
if(fShape->GetEntityType()=="TessellatedSolid"){
|
||||
|
||||
G4Polyhedron *uPolyhedron=fShape->GetPolyhedron();
|
||||
std::size_t nVertices = (*uPolyhedron).vertices.size();
|
||||
std::size_t nFacets = (*uPolyhedron).facets.size();
|
||||
|
||||
G4PolyhedronArbitrary *polyhedron =
|
||||
new G4PolyhedronArbitrary (nVertices, nFacets);
|
||||
|
||||
for (std::vector<UVector3>::const_iterator v = (*uPolyhedron).vertices.begin();
|
||||
v!=(*uPolyhedron).vertices.end(); v++)
|
||||
{
|
||||
UVector3 p=(*v);
|
||||
G4ThreeVector pt(p.x,p.y,p.z);
|
||||
|
||||
polyhedron->AddVertex(pt);
|
||||
}
|
||||
for (std::vector<UFacet>::const_iterator f=(*uPolyhedron).facets.begin();
|
||||
f != (*uPolyhedron).facets.end(); f++)
|
||||
{
|
||||
polyhedron->AddFacet((*f).f1,(*f).f2,(*f).f3,(*f).f4);
|
||||
}
|
||||
|
||||
return (G4Polyhedron*) polyhedron;
|
||||
}
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
G4Polyhedron* G4USolid::GetPolyhedron() const
|
||||
{
|
||||
if (!fPolyhedron ||
|
||||
fRebuildPolyhedron ||
|
||||
fPolyhedron->GetNumberOfRotationStepsAtTimeOfCreation() !=
|
||||
fPolyhedron->GetNumberOfRotationSteps())
|
||||
{
|
||||
G4AutoLock l(&polyhedronMutex);
|
||||
delete fPolyhedron;
|
||||
fPolyhedron = CreatePolyhedron();
|
||||
fRebuildPolyhedron = false;
|
||||
l.unlock();
|
||||
}
|
||||
return fPolyhedron;
|
||||
}
|
||||
|
||||
G4VisExtent G4USolid:: GetExtent() const
|
||||
{
|
||||
G4VisExtent extent;
|
||||
G4VoxelLimits voxelLimits; // Defaults to "infinite" limits.
|
||||
G4AffineTransform affineTransform;
|
||||
G4double vmin, vmax;
|
||||
CalculateExtent(kXAxis, voxelLimits, affineTransform, vmin, vmax);
|
||||
extent.SetXmin(vmin);
|
||||
extent.SetXmax(vmax);
|
||||
CalculateExtent(kYAxis, voxelLimits, affineTransform, vmin, vmax);
|
||||
extent.SetYmin(vmin);
|
||||
extent.SetYmax(vmax);
|
||||
CalculateExtent(kZAxis, voxelLimits, affineTransform, vmin, vmax);
|
||||
extent.SetZmin(vmin);
|
||||
extent.SetZmax(vmax);
|
||||
return extent;
|
||||
}
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VPhysicalVolume.cc 74466 2013-10-07 15:36:32Z gcosmo $
|
||||
// $Id: G4VPhysicalVolume.cc 83991 2014-09-26 09:22:26Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4VPhysicalVolume Implementation
|
||||
@@ -106,9 +106,6 @@ G4VPhysicalVolume::G4VPhysicalVolume( __void__& )
|
||||
//
|
||||
instanceID = subInstanceManager.CreateSubInstance();
|
||||
|
||||
this->SetRotation( 0 ); // G4MT_rot = 0;
|
||||
this->SetTranslation( G4ThreeVector(0., 0., 0.) ); // G4MT_trans = ...
|
||||
|
||||
G4PhysicalVolumeStore::Register(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user