Import Geant4 10.0.0 source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Box.cc 76263 2013-11-08 11:41:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
//
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
#include "G4Box.hh"
|
||||
|
||||
#if !defined(G4GEOM_USE_UBOX)
|
||||
|
||||
#include "G4SystemOfUnits.hh"
|
||||
#include "G4VoxelLimits.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
@@ -50,8 +52,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -64,9 +64,10 @@ G4Box::G4Box(const G4String& pName,
|
||||
G4double pZ)
|
||||
: G4CSGSolid(pName), fDx(pX), fDy(pY), fDz(pZ)
|
||||
{
|
||||
delta = 0.5*kCarTolerance;
|
||||
if ( (pX < 2*kCarTolerance)
|
||||
&& (pY < 2*kCarTolerance)
|
||||
&& (pZ < 2*kCarTolerance) ) // limit to thickness of surfaces
|
||||
|| (pY < 2*kCarTolerance)
|
||||
|| (pZ < 2*kCarTolerance) ) // limit to thickness of surfaces
|
||||
{
|
||||
std::ostringstream message;
|
||||
message << "Dimensions too small for Solid: " << GetName() << "!" << G4endl
|
||||
@@ -81,7 +82,7 @@ G4Box::G4Box(const G4String& pName,
|
||||
// for usage restricted to object persistency.
|
||||
|
||||
G4Box::G4Box( __void__& a )
|
||||
: G4CSGSolid(a), fDx(0.), fDy(0.), fDz(0.)
|
||||
: G4CSGSolid(a), fDx(0.), fDy(0.), fDz(0.), delta(0.)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -98,7 +99,7 @@ G4Box::~G4Box()
|
||||
// Copy constructor
|
||||
|
||||
G4Box::G4Box(const G4Box& rhs)
|
||||
: G4CSGSolid(rhs), fDx(rhs.fDx), fDy(rhs.fDy), fDz(rhs.fDz)
|
||||
: G4CSGSolid(rhs), fDx(rhs.fDx), fDy(rhs.fDy), fDz(rhs.fDz), delta(rhs.delta)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -121,6 +122,7 @@ G4Box& G4Box::operator = (const G4Box& rhs)
|
||||
fDx = rhs.fDx;
|
||||
fDy = rhs.fDy;
|
||||
fDz = rhs.fDz;
|
||||
delta = rhs.delta;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -369,7 +371,6 @@ G4bool G4Box::CalculateExtent(const EAxis pAxis,
|
||||
|
||||
EInside G4Box::Inside(const G4ThreeVector& p) const
|
||||
{
|
||||
static const G4double delta=0.5*kCarTolerance;
|
||||
EInside in = kOutside ;
|
||||
G4ThreeVector q(std::fabs(p.x()), std::fabs(p.y()), std::fabs(p.z()));
|
||||
|
||||
@@ -415,7 +416,6 @@ G4ThreeVector G4Box::SurfaceNormal( const G4ThreeVector& p) const
|
||||
// New code for particle on surface including edges and corners with specific
|
||||
// normals
|
||||
|
||||
static const G4double delta = 0.5*kCarTolerance;
|
||||
const G4ThreeVector nX = G4ThreeVector( 1.0, 0,0 );
|
||||
const G4ThreeVector nmX = G4ThreeVector(-1.0, 0,0 );
|
||||
const G4ThreeVector nY = G4ThreeVector( 0, 1.0,0 );
|
||||
@@ -562,8 +562,6 @@ G4double G4Box::DistanceToIn(const G4ThreeVector& p,
|
||||
G4double stmp ;
|
||||
G4double sOut=kInfinity, sOuty=kInfinity, sOutz=kInfinity ;
|
||||
|
||||
static const G4double delta = 0.5*kCarTolerance;
|
||||
|
||||
safx = std::fabs(p.x()) - fDx ; // minimum distance to x surface of shape
|
||||
safy = std::fabs(p.y()) - fDy ;
|
||||
safz = std::fabs(p.z()) - fDz ;
|
||||
@@ -699,8 +697,6 @@ G4double G4Box::DistanceToOut( const G4ThreeVector& p,const G4ThreeVector& v,
|
||||
ESide side = kUndefined ;
|
||||
G4double pdist,stmp,snxt=kInfinity;
|
||||
|
||||
static const G4double delta = 0.5*kCarTolerance;
|
||||
|
||||
if (calcNorm) { *validNorm = true ; } // All normals are valid
|
||||
|
||||
if (v.x() > 0) // X planes
|
||||
@@ -1053,8 +1049,4 @@ G4Polyhedron* G4Box::CreatePolyhedron () const
|
||||
{
|
||||
return new G4PolyhedronBox (fDx, fDy, fDz);
|
||||
}
|
||||
|
||||
G4NURBS* G4Box::CreateNURBS () const
|
||||
{
|
||||
return new G4NURBSbox (fDx, fDy, fDz);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4CSGSolid.cc 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Cons.cc 76732 2013-11-14 14:36:57Z gcosmo $
|
||||
// GEANT4 tag $Name: $
|
||||
//
|
||||
//
|
||||
@@ -44,6 +44,8 @@
|
||||
|
||||
#include "G4Cons.hh"
|
||||
|
||||
#if !defined(G4GEOM_USE_UCONS)
|
||||
|
||||
#include "G4VoxelLimits.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
#include "G4GeometryTolerance.hh"
|
||||
@@ -56,8 +58,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -87,6 +87,10 @@ G4Cons::G4Cons( const G4String& pName,
|
||||
kRadTolerance = G4GeometryTolerance::GetInstance()->GetRadialTolerance();
|
||||
kAngTolerance = G4GeometryTolerance::GetInstance()->GetAngularTolerance();
|
||||
|
||||
halfCarTolerance=kCarTolerance*0.5;
|
||||
halfRadTolerance=kRadTolerance*0.5;
|
||||
halfAngTolerance=kAngTolerance*0.5;
|
||||
|
||||
// Check z-len
|
||||
//
|
||||
if ( pDz < 0 )
|
||||
@@ -127,7 +131,9 @@ G4Cons::G4Cons( __void__& a )
|
||||
fRmin1(0.), fRmin2(0.), fRmax1(0.), fRmax2(0.), fDz(0.),
|
||||
fSPhi(0.), fDPhi(0.), sinCPhi(0.), cosCPhi(0.), cosHDPhiOT(0.),
|
||||
cosHDPhiIT(0.), sinSPhi(0.), cosSPhi(0.), sinEPhi(0.), cosEPhi(0.),
|
||||
fPhiFullCone(false)
|
||||
fPhiFullCone(false), halfCarTolerance(0.), halfRadTolerance(0.),
|
||||
halfAngTolerance(0.)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
@@ -150,7 +156,10 @@ G4Cons::G4Cons(const G4Cons& rhs)
|
||||
fDPhi(rhs.fDPhi), sinCPhi(rhs.sinCPhi), cosCPhi(rhs.cosCPhi),
|
||||
cosHDPhiOT(rhs.cosHDPhiOT), cosHDPhiIT(rhs.cosHDPhiIT),
|
||||
sinSPhi(rhs.sinSPhi), cosSPhi(rhs.cosSPhi), sinEPhi(rhs.sinEPhi),
|
||||
cosEPhi(rhs.cosEPhi), fPhiFullCone(rhs.fPhiFullCone)
|
||||
cosEPhi(rhs.cosEPhi), fPhiFullCone(rhs.fPhiFullCone),
|
||||
halfCarTolerance(rhs.halfCarTolerance),
|
||||
halfRadTolerance(rhs.halfRadTolerance),
|
||||
halfAngTolerance(rhs.halfAngTolerance)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -180,6 +189,9 @@ G4Cons& G4Cons::operator = (const G4Cons& rhs)
|
||||
sinSPhi = rhs.sinSPhi; cosSPhi = rhs.cosSPhi;
|
||||
sinEPhi = rhs.sinEPhi; cosEPhi = rhs.cosEPhi;
|
||||
fPhiFullCone = rhs.fPhiFullCone;
|
||||
halfCarTolerance = rhs.halfCarTolerance;
|
||||
halfRadTolerance = rhs.halfRadTolerance;
|
||||
halfAngTolerance = rhs.halfAngTolerance;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -192,9 +204,6 @@ EInside G4Cons::Inside(const G4ThreeVector& p) const
|
||||
{
|
||||
G4double r2, rl, rh, pPhi, tolRMin, tolRMax; // rh2, rl2 ;
|
||||
EInside in;
|
||||
static const G4double halfCarTolerance=kCarTolerance*0.5;
|
||||
static const G4double halfRadTolerance=kRadTolerance*0.5;
|
||||
static const G4double halfAngTolerance=kAngTolerance*0.5;
|
||||
|
||||
if (std::fabs(p.z()) > fDz + halfCarTolerance ) { return in = kOutside; }
|
||||
else if(std::fabs(p.z()) >= fDz - halfCarTolerance ) { in = kSurface; }
|
||||
@@ -485,9 +494,6 @@ G4ThreeVector G4Cons::SurfaceNormal( const G4ThreeVector& p) const
|
||||
G4double tanRMin, secRMin, pRMin, widRMin;
|
||||
G4double tanRMax, secRMax, pRMax, widRMax;
|
||||
|
||||
static const G4double delta = 0.5*kCarTolerance;
|
||||
static const G4double dAngle = 0.5*kAngTolerance;
|
||||
|
||||
G4ThreeVector norm, sumnorm(0.,0.,0.), nZ = G4ThreeVector(0.,0.,1.);
|
||||
G4ThreeVector nR, nr(0.,0.,0.), nPs, nPe;
|
||||
|
||||
@@ -512,8 +518,8 @@ G4ThreeVector G4Cons::SurfaceNormal( const G4ThreeVector& p) const
|
||||
{
|
||||
pPhi = std::atan2(p.y(),p.x());
|
||||
|
||||
if (pPhi < fSPhi-delta) { pPhi += twopi; }
|
||||
else if (pPhi > fSPhi+fDPhi+delta) { pPhi -= twopi; }
|
||||
if (pPhi < fSPhi-halfCarTolerance) { pPhi += twopi; }
|
||||
else if (pPhi > fSPhi+fDPhi+halfCarTolerance) { pPhi -= twopi; }
|
||||
|
||||
distSPhi = std::fabs( pPhi - fSPhi );
|
||||
distEPhi = std::fabs( pPhi - fSPhi - fDPhi );
|
||||
@@ -526,7 +532,7 @@ G4ThreeVector G4Cons::SurfaceNormal( const G4ThreeVector& p) const
|
||||
nPs = G4ThreeVector(std::sin(fSPhi), -std::cos(fSPhi), 0);
|
||||
nPe = G4ThreeVector(-std::sin(fSPhi+fDPhi), std::cos(fSPhi+fDPhi), 0);
|
||||
}
|
||||
if ( rho > delta )
|
||||
if ( rho > halfCarTolerance )
|
||||
{
|
||||
nR = G4ThreeVector(p.x()/rho/secRMax, p.y()/rho/secRMax, -tanRMax/secRMax);
|
||||
if (fRmin1 || fRmin2)
|
||||
@@ -535,30 +541,30 @@ G4ThreeVector G4Cons::SurfaceNormal( const G4ThreeVector& p) const
|
||||
}
|
||||
}
|
||||
|
||||
if( distRMax <= delta )
|
||||
if( distRMax <= halfCarTolerance )
|
||||
{
|
||||
noSurfaces ++;
|
||||
sumnorm += nR;
|
||||
}
|
||||
if( (fRmin1 || fRmin2) && (distRMin <= delta) )
|
||||
if( (fRmin1 || fRmin2) && (distRMin <= halfCarTolerance) )
|
||||
{
|
||||
noSurfaces ++;
|
||||
sumnorm += nr;
|
||||
}
|
||||
if( !fPhiFullCone )
|
||||
{
|
||||
if (distSPhi <= dAngle)
|
||||
if (distSPhi <= halfAngTolerance)
|
||||
{
|
||||
noSurfaces ++;
|
||||
sumnorm += nPs;
|
||||
}
|
||||
if (distEPhi <= dAngle)
|
||||
if (distEPhi <= halfAngTolerance)
|
||||
{
|
||||
noSurfaces ++;
|
||||
sumnorm += nPe;
|
||||
}
|
||||
}
|
||||
if (distZ <= delta)
|
||||
if (distZ <= halfCarTolerance)
|
||||
{
|
||||
noSurfaces ++;
|
||||
if ( p.z() >= 0.) { sumnorm += nZ; }
|
||||
@@ -713,9 +719,7 @@ G4double G4Cons::DistanceToIn( const G4ThreeVector& p,
|
||||
const G4ThreeVector& v ) const
|
||||
{
|
||||
G4double snxt = kInfinity ; // snxt = default return value
|
||||
const G4double dRmax = 100*std::min(fRmax1,fRmax2);
|
||||
static const G4double halfCarTolerance=kCarTolerance*0.5;
|
||||
static const G4double halfRadTolerance=kRadTolerance*0.5;
|
||||
const G4double dRmax = 50*(fRmax1+fRmax2);// 100*(Rmax1+Rmax2)/2.
|
||||
|
||||
G4double tanRMax,secRMax,rMaxAv,rMaxOAv ; // Data for cones
|
||||
G4double tanRMin,secRMin,rMinAv,rMinOAv ;
|
||||
@@ -888,6 +892,7 @@ G4double G4Cons::DistanceToIn( const G4ThreeVector& p,
|
||||
if ( c <= 0 ) // second >=0
|
||||
{
|
||||
sd = -b + std::sqrt(d) ;
|
||||
if((sd<0) & (sd>-halfRadTolerance)) sd=0;
|
||||
}
|
||||
else // both negative, travel away
|
||||
{
|
||||
@@ -1450,10 +1455,6 @@ G4double G4Cons::DistanceToOut( const G4ThreeVector& p,
|
||||
{
|
||||
ESide side = kNull, sider = kNull, sidephi = kNull;
|
||||
|
||||
static const G4double halfCarTolerance=kCarTolerance*0.5;
|
||||
static const G4double halfRadTolerance=kRadTolerance*0.5;
|
||||
static const G4double halfAngTolerance=kAngTolerance*0.5;
|
||||
|
||||
G4double snxt,srd,sphi,pdist ;
|
||||
|
||||
G4double tanRMax, secRMax, rMaxAv ; // Data for outer cone
|
||||
@@ -2043,7 +2044,7 @@ G4double G4Cons::DistanceToOut( const G4ThreeVector& p,
|
||||
<< "p.z() = " << p.z()/mm << " mm" << G4endl << G4endl
|
||||
<< "pho at z = " << std::sqrt( p.x()*p.x()+p.y()*p.y() )/mm
|
||||
<< " mm" << G4endl << G4endl ;
|
||||
if( p.x() != 0. || p.x() != 0.)
|
||||
if( p.x() != 0. || p.y() != 0.)
|
||||
{
|
||||
message << "point phi = " << std::atan2(p.y(),p.x())/degree
|
||||
<< " degree" << G4endl << G4endl ;
|
||||
@@ -2383,8 +2384,4 @@ G4Polyhedron* G4Cons::CreatePolyhedron () const
|
||||
return new G4PolyhedronCons(fRmin1,fRmax1,fRmin2,fRmax2,fDz,fSPhi,fDPhi);
|
||||
}
|
||||
|
||||
G4NURBS* G4Cons::CreateNURBS () const
|
||||
{
|
||||
G4double RMax = (fRmax2 >= fRmax1) ? fRmax2 : fRmax1 ;
|
||||
return new G4NURBSbox (RMax, RMax, fDz); // Box for now!!!
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id:$
|
||||
// GEANT4 tag $Name: not supported by cvs2svn $
|
||||
// $Id: G4CutTubs.cc 76263 2013-11-08 11:41:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4CutTubs
|
||||
@@ -51,10 +50,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBStube.hh"
|
||||
#include "G4NURBScylinder.hh"
|
||||
#include "G4NURBStubesector.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -68,12 +63,16 @@ G4CutTubs::G4CutTubs( const G4String &pName,
|
||||
G4double pDz,
|
||||
G4double pSPhi, G4double pDPhi,
|
||||
G4ThreeVector pLowNorm,G4ThreeVector pHighNorm )
|
||||
: G4Tubs(pName, pRMin, pRMax, pDz, pSPhi, pDPhi),
|
||||
: G4OTubs(pName, pRMin, pRMax, pDz, pSPhi, pDPhi),
|
||||
fPhiFullCutTube(true)
|
||||
{
|
||||
kRadTolerance = G4GeometryTolerance::GetInstance()->GetRadialTolerance();
|
||||
kAngTolerance = G4GeometryTolerance::GetInstance()->GetAngularTolerance();
|
||||
|
||||
halfCarTolerance = kCarTolerance*0.5;
|
||||
halfRadTolerance = kRadTolerance*0.5;
|
||||
halfAngTolerance = kAngTolerance*0.5;
|
||||
|
||||
// Check on Cutted Planes Normals
|
||||
// If there is NO CUT, propose to use G4Tubs instead
|
||||
//
|
||||
@@ -140,9 +139,9 @@ G4CutTubs::G4CutTubs( const G4String &pName,
|
||||
// for usage restricted to object persistency.
|
||||
//
|
||||
G4CutTubs::G4CutTubs( __void__& a )
|
||||
: G4Tubs(a),
|
||||
fLowNorm(G4ThreeVector()), fHighNorm(G4ThreeVector()),
|
||||
fPhiFullCutTube(false)
|
||||
: G4OTubs(a), fLowNorm(G4ThreeVector()),
|
||||
fHighNorm(G4ThreeVector()), fPhiFullCutTube(false),
|
||||
halfCarTolerance(0.), halfRadTolerance(0.), halfAngTolerance(0.)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -159,9 +158,11 @@ G4CutTubs::~G4CutTubs()
|
||||
// Copy constructor
|
||||
|
||||
G4CutTubs::G4CutTubs(const G4CutTubs& rhs)
|
||||
: G4Tubs(rhs),
|
||||
fLowNorm(rhs.fLowNorm), fHighNorm(rhs.fHighNorm),
|
||||
fPhiFullCutTube(rhs.fPhiFullCutTube)
|
||||
: G4OTubs(rhs), fLowNorm(rhs.fLowNorm), fHighNorm(rhs.fHighNorm),
|
||||
fPhiFullCutTube(rhs.fPhiFullCutTube),
|
||||
halfCarTolerance(rhs.halfCarTolerance),
|
||||
halfRadTolerance(rhs.halfRadTolerance),
|
||||
halfAngTolerance(rhs.halfAngTolerance)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -177,12 +178,15 @@ G4CutTubs& G4CutTubs::operator = (const G4CutTubs& rhs)
|
||||
|
||||
// Copy base class data
|
||||
//
|
||||
G4Tubs::operator=(rhs);
|
||||
G4OTubs::operator=(rhs);
|
||||
|
||||
// Copy data
|
||||
//
|
||||
fLowNorm = rhs.fLowNorm; fHighNorm = rhs.fHighNorm;
|
||||
fPhiFullCutTube = rhs.fPhiFullCutTube;
|
||||
halfCarTolerance = rhs.halfCarTolerance;
|
||||
halfRadTolerance = rhs.halfRadTolerance;
|
||||
halfAngTolerance = rhs.halfAngTolerance;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -410,9 +414,6 @@ EInside G4CutTubs::Inside( const G4ThreeVector& p ) const
|
||||
G4double tolRMin,tolRMax;
|
||||
G4ThreeVector vZ=G4ThreeVector(0,0,fDz);
|
||||
EInside in = kInside;
|
||||
static const G4double halfCarTolerance=kCarTolerance*0.5;
|
||||
static const G4double halfRadTolerance=kRadTolerance*0.5;
|
||||
static const G4double halfAngTolerance=kAngTolerance*0.5;
|
||||
|
||||
// Check if point is contained in the cut plane in -/+ Z
|
||||
|
||||
@@ -522,9 +523,6 @@ G4ThreeVector G4CutTubs::SurfaceNormal( const G4ThreeVector& p ) const
|
||||
G4double distSPhi = kInfinity, distEPhi = kInfinity;
|
||||
G4ThreeVector vZ=G4ThreeVector(0,0,fDz);
|
||||
|
||||
static const G4double halfCarTolerance = 0.5*kCarTolerance;
|
||||
static const G4double halfAngTolerance = 0.5*kAngTolerance;
|
||||
|
||||
G4ThreeVector norm, sumnorm(0.,0.,0.);
|
||||
G4ThreeVector nZ = G4ThreeVector(0, 0, 1.0);
|
||||
G4ThreeVector nR, nPs, nPe;
|
||||
@@ -771,9 +769,6 @@ G4double G4CutTubs::DistanceToIn( const G4ThreeVector& p,
|
||||
const G4double dRmax = 100.*fRMax;
|
||||
G4ThreeVector vZ=G4ThreeVector(0,0,fDz);
|
||||
|
||||
static const G4double halfCarTolerance = 0.5*kCarTolerance;
|
||||
static const G4double halfRadTolerance = 0.5*kRadTolerance;
|
||||
|
||||
// Intersection point variables
|
||||
//
|
||||
G4double Dist, sd=0, xi, yi, zi, rho2, inum, iden, cosPsi, Comp,calf ;
|
||||
@@ -1289,8 +1284,6 @@ G4double G4CutTubs::DistanceToOut( const G4ThreeVector& p,
|
||||
G4double deltaR, t1, t2, t3, b, c, d2, roMin2 ;
|
||||
G4double distZLow,distZHigh,calfH,calfL;
|
||||
G4ThreeVector vZ=G4ThreeVector(0,0,fDz);
|
||||
static const G4double halfCarTolerance = kCarTolerance*0.5;
|
||||
static const G4double halfAngTolerance = kAngTolerance*0.5;
|
||||
|
||||
// Vars for phi intersection:
|
||||
//
|
||||
@@ -1978,7 +1971,7 @@ G4Polyhedron* G4CutTubs::CreatePolyhedron () const
|
||||
typedef G4int G4int4[4];
|
||||
|
||||
G4Polyhedron *ph = new G4Polyhedron;
|
||||
G4Polyhedron *ph1 = G4Tubs::CreatePolyhedron();
|
||||
G4Polyhedron *ph1 = G4OTubs::CreatePolyhedron();
|
||||
G4int nn=ph1->GetNoVertices();
|
||||
G4int nf=ph1->GetNoFacets();
|
||||
G4double3* xyz = new G4double3[nn]; // number of nodes
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Orb.cc 76263 2013-11-08 11:41:52Z gcosmo $
|
||||
//
|
||||
// class G4Orb
|
||||
//
|
||||
@@ -37,10 +37,10 @@
|
||||
//
|
||||
//////////////////////////////////////////////////////////////
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "G4Orb.hh"
|
||||
|
||||
#if !defined(G4GEOM_USE_UORB)
|
||||
|
||||
#include "G4VoxelLimits.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
#include "G4GeometryTolerance.hh"
|
||||
@@ -53,8 +53,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -723,7 +721,4 @@ G4Polyhedron* G4Orb::CreatePolyhedron () const
|
||||
return new G4PolyhedronSphere (0., fRmax, 0., 2*pi, 0., pi);
|
||||
}
|
||||
|
||||
G4NURBS* G4Orb::CreateNURBS () const
|
||||
{
|
||||
return new G4NURBSbox (fRmax, fRmax, fRmax); // Box for now!!!
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Para.cc 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
//
|
||||
// class G4Para
|
||||
//
|
||||
@@ -53,8 +53,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -1392,9 +1390,3 @@ G4Polyhedron* G4Para::CreatePolyhedron () const
|
||||
|
||||
return new G4PolyhedronPara(fDx, fDy, fDz, alpha, theta, phi);
|
||||
}
|
||||
|
||||
G4NURBS* G4Para::CreateNURBS () const
|
||||
{
|
||||
// return new G4NURBSbox (fDx, fDy, fDz);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Sphere.cc 76263 2013-11-08 11:41:52Z gcosmo $
|
||||
//
|
||||
// class G4Sphere
|
||||
//
|
||||
@@ -56,6 +56,8 @@
|
||||
|
||||
#include "G4Sphere.hh"
|
||||
|
||||
#if !defined(G4GEOM_USE_USPHERE)
|
||||
|
||||
#include "G4VoxelLimits.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
#include "G4GeometryTolerance.hh"
|
||||
@@ -69,8 +71,6 @@
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4VisExtent.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -91,14 +91,17 @@ G4Sphere::G4Sphere( const G4String& pName,
|
||||
G4double pRmin, G4double pRmax,
|
||||
G4double pSPhi, G4double pDPhi,
|
||||
G4double pSTheta, G4double pDTheta )
|
||||
: G4CSGSolid(pName), fEpsilon(2.e-11),
|
||||
: G4CSGSolid(pName), fEpsilon(2.e-11), fSPhi(0.0),
|
||||
fFullPhiSphere(true), fFullThetaSphere(true)
|
||||
{
|
||||
kAngTolerance = G4GeometryTolerance::GetInstance()->GetAngularTolerance();
|
||||
kRadTolerance = G4GeometryTolerance::GetInstance()->GetRadialTolerance();
|
||||
|
||||
halfCarTolerance = 0.5*kCarTolerance;
|
||||
halfAngTolerance = 0.5*kAngTolerance;
|
||||
|
||||
// Check radii and set radial tolerances
|
||||
|
||||
kRadTolerance = G4GeometryTolerance::GetInstance()->GetRadialTolerance();
|
||||
if ( (pRmin >= pRmax) || (pRmax < 1.1*kRadTolerance) || (pRmin < 0) )
|
||||
{
|
||||
std::ostringstream message;
|
||||
@@ -130,7 +133,8 @@ G4Sphere::G4Sphere( __void__& a )
|
||||
sinSPhi(0.), cosSPhi(0.), sinEPhi(0.), cosEPhi(0.), hDPhi(0.), cPhi(0.),
|
||||
ePhi(0.), sinSTheta(0.), cosSTheta(0.), sinETheta(0.), cosETheta(0.),
|
||||
tanSTheta(0.), tanSTheta2(0.), tanETheta(0.), tanETheta2(0.), eTheta(0.),
|
||||
fFullPhiSphere(false), fFullThetaSphere(false), fFullSphere(true)
|
||||
fFullPhiSphere(false), fFullThetaSphere(false), fFullSphere(true),
|
||||
halfCarTolerance(0.), halfAngTolerance(0.)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -162,7 +166,9 @@ G4Sphere::G4Sphere(const G4Sphere& rhs)
|
||||
tanSTheta(rhs.tanSTheta), tanSTheta2(rhs.tanSTheta2),
|
||||
tanETheta(rhs.tanETheta), tanETheta2(rhs.tanETheta2), eTheta(rhs.eTheta),
|
||||
fFullPhiSphere(rhs.fFullPhiSphere), fFullThetaSphere(rhs.fFullThetaSphere),
|
||||
fFullSphere(rhs.fFullSphere)
|
||||
fFullSphere(rhs.fFullSphere),
|
||||
halfCarTolerance(rhs.halfCarTolerance),
|
||||
halfAngTolerance(rhs.halfAngTolerance)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -197,6 +203,8 @@ G4Sphere& G4Sphere::operator = (const G4Sphere& rhs)
|
||||
tanETheta = rhs.tanETheta; tanETheta2 = rhs.tanETheta2;
|
||||
eTheta = rhs.eTheta; fFullPhiSphere = rhs.fFullPhiSphere;
|
||||
fFullThetaSphere = rhs.fFullThetaSphere; fFullSphere = rhs.fFullSphere;
|
||||
halfCarTolerance = rhs.halfCarTolerance;
|
||||
halfAngTolerance = rhs.halfAngTolerance;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -467,7 +475,7 @@ EInside G4Sphere::Inside( const G4ThreeVector& p ) const
|
||||
G4double rho,rho2,rad2,tolRMin,tolRMax;
|
||||
G4double pPhi,pTheta;
|
||||
EInside in = kOutside;
|
||||
static const G4double halfAngTolerance = kAngTolerance*0.5;
|
||||
|
||||
const G4double halfRmaxTolerance = fRmaxTolerance*0.5;
|
||||
const G4double halfRminTolerance = fRminTolerance*0.5;
|
||||
const G4double Rmax_minus = fRmax - halfRmaxTolerance;
|
||||
@@ -569,9 +577,6 @@ G4ThreeVector G4Sphere::SurfaceNormal( const G4ThreeVector& p ) const
|
||||
G4ThreeVector nR, nPs, nPe, nTs, nTe, nZ(0.,0.,1.);
|
||||
G4ThreeVector norm, sumnorm(0.,0.,0.);
|
||||
|
||||
static const G4double halfCarTolerance = 0.5*kCarTolerance;
|
||||
static const G4double halfAngTolerance = 0.5*kAngTolerance;
|
||||
|
||||
rho2 = p.x()*p.x()+p.y()*p.y();
|
||||
radius = std::sqrt(rho2+p.z()*p.z());
|
||||
rho = std::sqrt(rho2);
|
||||
@@ -872,8 +877,6 @@ G4double G4Sphere::DistanceToIn( const G4ThreeVector& p,
|
||||
G4double tolSTheta=0., tolETheta=0. ;
|
||||
const G4double dRmax = 100.*fRmax;
|
||||
|
||||
static const G4double halfCarTolerance = kCarTolerance*0.5;
|
||||
static const G4double halfAngTolerance = kAngTolerance*0.5;
|
||||
const G4double halfRmaxTolerance = fRmaxTolerance*0.5;
|
||||
const G4double halfRminTolerance = fRminTolerance*0.5;
|
||||
const G4double tolORMin2 = (fRmin>halfRminTolerance)
|
||||
@@ -1904,8 +1907,6 @@ G4double G4Sphere::DistanceToOut( const G4ThreeVector& p,
|
||||
G4double sphi= kInfinity,stheta= kInfinity;
|
||||
ESide side=kNull,sidephi=kNull,sidetheta=kNull;
|
||||
|
||||
static const G4double halfCarTolerance = kCarTolerance*0.5;
|
||||
static const G4double halfAngTolerance = kAngTolerance*0.5;
|
||||
const G4double halfRmaxTolerance = fRmaxTolerance*0.5;
|
||||
const G4double halfRminTolerance = fRminTolerance*0.5;
|
||||
const G4double Rmax_plus = fRmax + halfRmaxTolerance;
|
||||
@@ -3184,7 +3185,4 @@ G4Polyhedron* G4Sphere::CreatePolyhedron () const
|
||||
return new G4PolyhedronSphere (fRmin, fRmax, fSPhi, fDPhi, fSTheta, fDTheta);
|
||||
}
|
||||
|
||||
G4NURBS* G4Sphere::CreateNURBS () const
|
||||
{
|
||||
return new G4NURBSbox (fRmax, fRmax, fRmax); // Box for now!!!
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Torus.cc 72938 2013-08-14 13:24:12Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4Torus
|
||||
@@ -69,10 +69,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBStube.hh"
|
||||
#include "G4NURBScylinder.hh"
|
||||
#include "G4NURBStubesector.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -111,7 +107,10 @@ G4Torus::SetAllParameters( G4double pRmin,
|
||||
|
||||
kRadTolerance = G4GeometryTolerance::GetInstance()->GetRadialTolerance();
|
||||
kAngTolerance = G4GeometryTolerance::GetInstance()->GetAngularTolerance();
|
||||
|
||||
|
||||
halfCarTolerance = 0.5*kCarTolerance;
|
||||
halfAngTolerance = 0.5*kAngTolerance;
|
||||
|
||||
if ( pRtor >= pRmax+1.e3*kCarTolerance ) // Check swept radius, as in G4Cons
|
||||
{
|
||||
fRtor = pRtor ;
|
||||
@@ -182,7 +181,8 @@ G4Torus::SetAllParameters( G4double pRmin,
|
||||
G4Torus::G4Torus( __void__& a )
|
||||
: G4CSGSolid(a), fRmin(0.), fRmax(0.), fRtor(0.), fSPhi(0.),
|
||||
fDPhi(0.), fRminTolerance(0.), fRmaxTolerance(0. ),
|
||||
kRadTolerance(0.), kAngTolerance(0.)
|
||||
kRadTolerance(0.), kAngTolerance(0.),
|
||||
halfCarTolerance(0.), halfAngTolerance(0.)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -201,7 +201,9 @@ G4Torus::G4Torus(const G4Torus& rhs)
|
||||
: G4CSGSolid(rhs), fRmin(rhs.fRmin),fRmax(rhs.fRmax),
|
||||
fRtor(rhs.fRtor),fSPhi(rhs.fSPhi),fDPhi(rhs.fDPhi),
|
||||
fRminTolerance(rhs.fRminTolerance), fRmaxTolerance(rhs.fRmaxTolerance),
|
||||
kRadTolerance(rhs.kRadTolerance), kAngTolerance(rhs.kAngTolerance)
|
||||
kRadTolerance(rhs.kRadTolerance), kAngTolerance(rhs.kAngTolerance),
|
||||
halfCarTolerance(rhs.halfCarTolerance),
|
||||
halfAngTolerance(rhs.halfAngTolerance)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -225,6 +227,8 @@ G4Torus& G4Torus::operator = (const G4Torus& rhs)
|
||||
fRtor = rhs.fRtor; fSPhi = rhs.fSPhi; fDPhi = rhs.fDPhi;
|
||||
fRminTolerance = rhs.fRminTolerance; fRmaxTolerance = rhs.fRmaxTolerance;
|
||||
kRadTolerance = rhs.kRadTolerance; kAngTolerance = rhs.kAngTolerance;
|
||||
halfCarTolerance = rhs.halfCarTolerance;
|
||||
halfAngTolerance = rhs.halfAngTolerance;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -296,8 +300,6 @@ G4double G4Torus::SolveNumericJT( const G4ThreeVector& p,
|
||||
G4double bigdist = 10*mm ;
|
||||
G4double tmin = kInfinity ;
|
||||
G4double t, scal ;
|
||||
static const G4double halfCarTolerance = 0.5*kCarTolerance;
|
||||
static const G4double halfAngTolerance = 0.5*kAngTolerance;
|
||||
|
||||
// calculate the distances to the intersections with the Torus
|
||||
// from a given point p and direction v.
|
||||
@@ -634,9 +636,9 @@ EInside G4Torus::Inside( const G4ThreeVector& p ) const
|
||||
G4double r2, pt2, pPhi, tolRMin, tolRMax ;
|
||||
|
||||
EInside in = kOutside ;
|
||||
static const G4double halfAngTolerance = 0.5*kAngTolerance;
|
||||
|
||||
// General precals
|
||||
// General precals
|
||||
//
|
||||
r2 = p.x()*p.x() + p.y()*p.y() ;
|
||||
pt2 = r2 + p.z()*p.z() + fRtor*fRtor - 2*fRtor*std::sqrt(r2) ;
|
||||
|
||||
@@ -1002,8 +1004,6 @@ G4double G4Torus::DistanceToIn( const G4ThreeVector& p,
|
||||
G4double tolORMin2; // `generous' radii squared
|
||||
G4double tolORMax2;
|
||||
|
||||
static const G4double halfCarTolerance = 0.5*kCarTolerance;
|
||||
|
||||
G4double Dist,xi,yi,zi,rhoi2,it2; // Intersection point variables
|
||||
|
||||
G4double Comp;
|
||||
@@ -1193,9 +1193,6 @@ G4double G4Torus::DistanceToOut( const G4ThreeVector& p,
|
||||
ESide side = kNull, sidephi = kNull ;
|
||||
G4double snxt = kInfinity, sphi, sd[4] ;
|
||||
|
||||
static const G4double halfCarTolerance = 0.5*kCarTolerance;
|
||||
static const G4double halfAngTolerance = 0.5*kAngTolerance;
|
||||
|
||||
// Vars for phi intersection
|
||||
//
|
||||
G4double sinSPhi, cosSPhi, ePhi, sinEPhi, cosEPhi;
|
||||
@@ -1789,33 +1786,3 @@ G4Polyhedron* G4Torus::CreatePolyhedron () const
|
||||
{
|
||||
return new G4PolyhedronTorus (fRmin, fRmax, fRtor, fSPhi, fDPhi);
|
||||
}
|
||||
|
||||
G4NURBS* G4Torus::CreateNURBS () const
|
||||
{
|
||||
G4NURBS* pNURBS;
|
||||
if (fRmin != 0)
|
||||
{
|
||||
if (fDPhi >= twopi)
|
||||
{
|
||||
pNURBS = new G4NURBStube(fRmin, fRmax, fRtor);
|
||||
}
|
||||
else
|
||||
{
|
||||
pNURBS = new G4NURBStubesector(fRmin, fRmax, fRtor, fSPhi, fSPhi + fDPhi);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fDPhi >= twopi)
|
||||
{
|
||||
pNURBS = new G4NURBScylinder (fRmax, fRtor);
|
||||
}
|
||||
else
|
||||
{
|
||||
const G4double epsilon = 1.e-4; // Cylinder sector not yet available!
|
||||
pNURBS = new G4NURBStubesector (epsilon, fRmax, fRtor,
|
||||
fSPhi, fSPhi + fDPhi);
|
||||
}
|
||||
}
|
||||
return pNURBS;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Trap.cc 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
//
|
||||
// class G4Trap
|
||||
//
|
||||
@@ -59,8 +59,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -1968,9 +1966,3 @@ G4Polyhedron* G4Trap::CreatePolyhedron () const
|
||||
fDy1, fDx1, fDx2, alpha1,
|
||||
fDy2, fDx3, fDx4, alpha2);
|
||||
}
|
||||
|
||||
G4NURBS* G4Trap::CreateNURBS () const
|
||||
{
|
||||
// return new G4NURBSbox (fDx, fDy, fDz);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Trd.cc 76263 2013-11-08 11:41:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
// Implementation for G4Trd class
|
||||
@@ -41,6 +41,8 @@
|
||||
|
||||
#include "G4Trd.hh"
|
||||
|
||||
#if !defined(G4GEOM_USE_UTRD)
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "G4VoxelLimits.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
@@ -48,8 +50,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBSbox.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -1473,8 +1473,4 @@ G4Polyhedron* G4Trd::CreatePolyhedron () const
|
||||
return new G4PolyhedronTrd2 (fDx1, fDx2, fDy1, fDy2, fDz);
|
||||
}
|
||||
|
||||
G4NURBS* G4Trd::CreateNURBS () const
|
||||
{
|
||||
// return new G4NURBSbox (fDx, fDy, fDz);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id$
|
||||
// $Id: G4Tubs.cc 76263 2013-11-08 11:41:52Z gcosmo $
|
||||
//
|
||||
//
|
||||
// class G4Tubs
|
||||
@@ -61,6 +61,8 @@
|
||||
|
||||
#include "G4Tubs.hh"
|
||||
|
||||
#if !defined(G4GEOM_USE_UTUBS)
|
||||
|
||||
#include "G4VoxelLimits.hh"
|
||||
#include "G4AffineTransform.hh"
|
||||
#include "G4GeometryTolerance.hh"
|
||||
@@ -73,10 +75,6 @@
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
#include "G4NURBS.hh"
|
||||
#include "G4NURBStube.hh"
|
||||
#include "G4NURBScylinder.hh"
|
||||
#include "G4NURBStubesector.hh"
|
||||
|
||||
using namespace CLHEP;
|
||||
|
||||
@@ -95,6 +93,10 @@ G4Tubs::G4Tubs( const G4String &pName,
|
||||
kRadTolerance = G4GeometryTolerance::GetInstance()->GetRadialTolerance();
|
||||
kAngTolerance = G4GeometryTolerance::GetInstance()->GetAngularTolerance();
|
||||
|
||||
halfCarTolerance=kCarTolerance*0.5;
|
||||
halfRadTolerance=kRadTolerance*0.5;
|
||||
halfAngTolerance=kAngTolerance*0.5;
|
||||
|
||||
if (pDz<=0) // Check z-len
|
||||
{
|
||||
std::ostringstream message;
|
||||
@@ -125,7 +127,9 @@ G4Tubs::G4Tubs( __void__& a )
|
||||
fRMin(0.), fRMax(0.), fDz(0.), fSPhi(0.), fDPhi(0.),
|
||||
sinCPhi(0.), cosCPhi(0.), cosHDPhiOT(0.), cosHDPhiIT(0.),
|
||||
sinSPhi(0.), cosSPhi(0.), sinEPhi(0.), cosEPhi(0.),
|
||||
fPhiFullTube(false)
|
||||
fPhiFullTube(false), halfCarTolerance(0.), halfRadTolerance(0.),
|
||||
halfAngTolerance(0.)
|
||||
|
||||
{
|
||||
}
|
||||
|
||||
@@ -149,7 +153,10 @@ G4Tubs::G4Tubs(const G4Tubs& rhs)
|
||||
sinCPhi(rhs.sinCPhi), cosCPhi(rhs.sinCPhi),
|
||||
cosHDPhiOT(rhs.cosHDPhiOT), cosHDPhiIT(rhs.cosHDPhiOT),
|
||||
sinSPhi(rhs.sinSPhi), cosSPhi(rhs.cosSPhi),
|
||||
sinEPhi(rhs.sinEPhi), cosEPhi(rhs.cosEPhi), fPhiFullTube(rhs.fPhiFullTube)
|
||||
sinEPhi(rhs.sinEPhi), cosEPhi(rhs.cosEPhi), fPhiFullTube(rhs.fPhiFullTube),
|
||||
halfCarTolerance(rhs.halfCarTolerance),
|
||||
halfRadTolerance(rhs.halfRadTolerance),
|
||||
halfAngTolerance(rhs.halfAngTolerance)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -177,6 +184,9 @@ G4Tubs& G4Tubs::operator = (const G4Tubs& rhs)
|
||||
sinSPhi = rhs.sinSPhi; cosSPhi = rhs.cosSPhi;
|
||||
sinEPhi = rhs.sinEPhi; cosEPhi = rhs.cosEPhi;
|
||||
fPhiFullTube = rhs.fPhiFullTube;
|
||||
halfCarTolerance = rhs.halfCarTolerance;
|
||||
halfRadTolerance = rhs.halfRadTolerance;
|
||||
halfAngTolerance = rhs.halfAngTolerance;
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -415,9 +425,6 @@ EInside G4Tubs::Inside( const G4ThreeVector& p ) const
|
||||
{
|
||||
G4double r2,pPhi,tolRMin,tolRMax;
|
||||
EInside in = kOutside ;
|
||||
static const G4double halfCarTolerance=kCarTolerance*0.5;
|
||||
static const G4double halfRadTolerance=kRadTolerance*0.5;
|
||||
static const G4double halfAngTolerance=kAngTolerance*0.5;
|
||||
|
||||
if (std::fabs(p.z()) <= fDz - halfCarTolerance)
|
||||
{
|
||||
@@ -588,9 +595,6 @@ G4ThreeVector G4Tubs::SurfaceNormal( const G4ThreeVector& p ) const
|
||||
G4double distZ, distRMin, distRMax;
|
||||
G4double distSPhi = kInfinity, distEPhi = kInfinity;
|
||||
|
||||
static const G4double halfCarTolerance = 0.5*kCarTolerance;
|
||||
static const G4double halfAngTolerance = 0.5*kAngTolerance;
|
||||
|
||||
G4ThreeVector norm, sumnorm(0.,0.,0.);
|
||||
G4ThreeVector nZ = G4ThreeVector(0, 0, 1.0);
|
||||
G4ThreeVector nR, nPs, nPe;
|
||||
@@ -815,9 +819,6 @@ G4double G4Tubs::DistanceToIn( const G4ThreeVector& p,
|
||||
G4double tolORMax2, tolIRMin2, tolODz, tolIDz ;
|
||||
const G4double dRmax = 100.*fRMax;
|
||||
|
||||
static const G4double halfCarTolerance = 0.5*kCarTolerance;
|
||||
static const G4double halfRadTolerance = 0.5*kRadTolerance;
|
||||
|
||||
// Intersection point variables
|
||||
//
|
||||
G4double Dist, sd, xi, yi, zi, rho2, inum, iden, cosPsi, Comp ;
|
||||
@@ -1240,9 +1241,6 @@ G4double G4Tubs::DistanceToOut( const G4ThreeVector& p,
|
||||
G4double snxt, srd=kInfinity, sphi=kInfinity, pdist ;
|
||||
G4double deltaR, t1, t2, t3, b, c, d2, roMin2 ;
|
||||
|
||||
static const G4double halfCarTolerance = kCarTolerance*0.5;
|
||||
static const G4double halfAngTolerance = kAngTolerance*0.5;
|
||||
|
||||
// Vars for phi intersection:
|
||||
|
||||
G4double pDistS, compS, pDistE, compE, sphi2, xi, yi, vphi, roi2 ;
|
||||
@@ -1924,32 +1922,4 @@ G4Polyhedron* G4Tubs::CreatePolyhedron () const
|
||||
{
|
||||
return new G4PolyhedronTubs (fRMin, fRMax, fDz, fSPhi, fDPhi) ;
|
||||
}
|
||||
|
||||
G4NURBS* G4Tubs::CreateNURBS () const
|
||||
{
|
||||
G4NURBS* pNURBS ;
|
||||
if (fRMin != 0)
|
||||
{
|
||||
if (fPhiFullTube)
|
||||
{
|
||||
pNURBS = new G4NURBStube (fRMin,fRMax,fDz) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
pNURBS = new G4NURBStubesector (fRMin,fRMax,fDz,fSPhi,fSPhi+fDPhi) ;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (fPhiFullTube)
|
||||
{
|
||||
pNURBS = new G4NURBScylinder (fRMax,fDz) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
const G4double epsilon = 1.e-4 ; // Cylinder sector not yet available!
|
||||
pNURBS = new G4NURBStubesector (epsilon,fRMax,fDz,fSPhi,fSPhi+fDPhi) ;
|
||||
}
|
||||
}
|
||||
return pNURBS ;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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:$
|
||||
//
|
||||
//
|
||||
// Implementation for G4UBox wrapper class
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4Box.hh"
|
||||
#include "G4UBox.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor - check & set half widths
|
||||
|
||||
|
||||
G4UBox::G4UBox(const G4String& pName,
|
||||
G4double pX,
|
||||
G4double pY,
|
||||
G4double pZ)
|
||||
: G4USolid(pName, new UBox(pName, pX, pY, pZ))
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Fake default constructor - sets only member data and allocates memory
|
||||
// for usage restricted to object persistency.
|
||||
|
||||
G4UBox::G4UBox( __void__& a )
|
||||
: G4USolid(a)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
|
||||
G4UBox::~G4UBox()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copy constructor
|
||||
|
||||
G4UBox::G4UBox(const G4UBox& rhs)
|
||||
: G4USolid(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Assignment operator
|
||||
|
||||
G4UBox& G4UBox::operator = (const G4UBox& rhs)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
if (this == &rhs) { return *this; }
|
||||
|
||||
// Copy base class data
|
||||
//
|
||||
G4USolid::operator=(rhs);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
// computation & modification.
|
||||
|
||||
void G4UBox::ComputeDimensions(G4VPVParameterisation* p,
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep)
|
||||
{
|
||||
p->ComputeDimensions(*(G4Box*)this,n,pRep);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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:$
|
||||
//
|
||||
//
|
||||
// Implementation for G4UCons wrapper class
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4Cons.hh"
|
||||
#include "G4UCons.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// constructor - check parameters, convert angles so 0<sphi+dpshi<=2_PI
|
||||
// - note if pDPhi>2PI then reset to 2PI
|
||||
|
||||
G4UCons::G4UCons( const G4String& pName,
|
||||
G4double pRmin1, G4double pRmax1,
|
||||
G4double pRmin2, G4double pRmax2,
|
||||
G4double pDz,
|
||||
G4double pSPhi, G4double pDPhi)
|
||||
: G4USolid(pName, new UCons(pName, pRmin1, pRmax1, pRmin2, pRmax2,
|
||||
pDz, pSPhi, pDPhi))
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Fake default constructor - sets only member data and allocates memory
|
||||
// for usage restricted to object persistency.
|
||||
//
|
||||
G4UCons::G4UCons( __void__& a )
|
||||
: G4USolid(a)
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
|
||||
G4UCons::~G4UCons()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copy constructor
|
||||
|
||||
G4UCons::G4UCons(const G4UCons& rhs)
|
||||
: G4USolid(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Assignment operator
|
||||
|
||||
G4UCons& G4UCons::operator = (const G4UCons& rhs)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
if (this == &rhs) { return *this; }
|
||||
|
||||
// Copy base class data
|
||||
//
|
||||
G4USolid::operator=(rhs);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
// computation & modification.
|
||||
|
||||
void G4UCons::ComputeDimensions( G4VPVParameterisation* p,
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep )
|
||||
{
|
||||
p->ComputeDimensions(*(G4Cons*)this,n,pRep);
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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:$
|
||||
//
|
||||
//
|
||||
// Implementation for G4UOrb wrapper class
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4Orb.hh"
|
||||
#include "G4UOrb.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// constructor - check positive radius
|
||||
//
|
||||
|
||||
G4UOrb::G4UOrb( const G4String& pName, G4double pRmax )
|
||||
: G4USolid(pName, new UOrb(pName, pRmax))
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Fake default constructor - sets only member data and allocates memory
|
||||
// for usage restricted to object persistency.
|
||||
//
|
||||
G4UOrb::G4UOrb( __void__& a )
|
||||
: G4USolid(a)
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
|
||||
G4UOrb::~G4UOrb()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copy constructor
|
||||
|
||||
G4UOrb::G4UOrb(const G4UOrb& rhs)
|
||||
: G4USolid(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Assignment operator
|
||||
|
||||
G4UOrb& G4UOrb::operator = (const G4UOrb& rhs)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
if (this == &rhs) { return *this; }
|
||||
|
||||
// Copy base class data
|
||||
//
|
||||
G4USolid::operator=(rhs);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
// computation & modification.
|
||||
|
||||
void G4UOrb::ComputeDimensions( G4VPVParameterisation* p,
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep )
|
||||
{
|
||||
p->ComputeDimensions(*(G4Orb*)this,n,pRep);
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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:$
|
||||
//
|
||||
//
|
||||
// Implementation for G4USphere wrapper class
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4USphere.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// constructor - check parameters, convert angles so 0<sphi+dpshi<=2_PI
|
||||
// - note if pDPhi>2PI then reset to 2PI
|
||||
|
||||
G4USphere::G4USphere( const G4String& pName,
|
||||
G4double pRmin, G4double pRmax,
|
||||
G4double pSPhi, G4double pDPhi,
|
||||
G4double pSTheta, G4double pDTheta )
|
||||
: G4USolid(pName, new USphere(pName, pRmin, pRmax, pSPhi, pDPhi,
|
||||
pSTheta, pDTheta))
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Fake default constructor - sets only member data and allocates memory
|
||||
// for usage restricted to object persistency.
|
||||
//
|
||||
G4USphere::G4USphere( __void__& a )
|
||||
: G4USolid(a)
|
||||
{
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
|
||||
G4USphere::~G4USphere()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copy constructor
|
||||
|
||||
G4USphere::G4USphere(const G4USphere& rhs)
|
||||
: G4USolid(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Assignment operator
|
||||
|
||||
G4USphere& G4USphere::operator = (const G4USphere& rhs)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
if (this == &rhs) { return *this; }
|
||||
|
||||
// Copy base class data
|
||||
//
|
||||
G4USolid::operator=(rhs);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
// computation & modification.
|
||||
|
||||
void G4USphere::ComputeDimensions( G4VPVParameterisation* p,
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep)
|
||||
{
|
||||
p->ComputeDimensions(*(G4Sphere*)this,n,pRep);
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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:$
|
||||
//
|
||||
//
|
||||
// Implementation for G4UTrd wrapper class
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4Trd.hh"
|
||||
#include "G4UTrd.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor - check & set half widths
|
||||
//
|
||||
G4UTrd::G4UTrd(const G4String& pName,
|
||||
G4double pdx1, G4double pdx2,
|
||||
G4double pdy1, G4double pdy2,
|
||||
G4double pdz)
|
||||
: G4USolid(pName, new UTrd(pName, pdx1, pdx2, pdy1, pdy2, pdz))
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Fake default constructor - sets only member data and allocates memory
|
||||
// for usage restricted to object persistency.
|
||||
//
|
||||
G4UTrd::G4UTrd( __void__& a )
|
||||
: G4USolid(a)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
//
|
||||
G4UTrd::~G4UTrd()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copy constructor
|
||||
//
|
||||
G4UTrd::G4UTrd(const G4UTrd& rhs)
|
||||
: G4USolid(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Assignment operator
|
||||
//
|
||||
G4UTrd& G4UTrd::operator = (const G4UTrd& rhs)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
if (this == &rhs) { return *this; }
|
||||
|
||||
// Copy base class data
|
||||
//
|
||||
G4USolid::operator=(rhs);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
// computation & modification.
|
||||
//
|
||||
void G4UTrd::ComputeDimensions( G4VPVParameterisation* p,
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep)
|
||||
{
|
||||
p->ComputeDimensions(*(G4Trd*)this,n,pRep);
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * 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:$
|
||||
//
|
||||
//
|
||||
// Implementation for G4UTubs wrapper class
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4UTubs.hh"
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Constructor - check parameters, convert angles so 0<sphi+dpshi<=2_PI
|
||||
// - note if pdphi>2PI then reset to 2PI
|
||||
|
||||
G4UTubs::G4UTubs( const G4String& pName,
|
||||
G4double pRMin, G4double pRMax,
|
||||
G4double pDz,
|
||||
G4double pSPhi, G4double pDPhi )
|
||||
: G4USolid(pName, new UTubs(pName, pRMin, pRMax, pDz, pSPhi, pDPhi))
|
||||
{
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Fake default constructor - sets only member data and allocates memory
|
||||
// for usage restricted to object persistency.
|
||||
//
|
||||
G4UTubs::G4UTubs( __void__& a )
|
||||
: G4USolid(a)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Destructor
|
||||
|
||||
G4UTubs::~G4UTubs()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copy constructor
|
||||
|
||||
G4UTubs::G4UTubs(const G4UTubs& rhs)
|
||||
: G4USolid(rhs)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Assignment operator
|
||||
|
||||
G4UTubs& G4UTubs::operator = (const G4UTubs& rhs)
|
||||
{
|
||||
// Check assignment to self
|
||||
//
|
||||
if (this == &rhs) { return *this; }
|
||||
|
||||
// Copy base class data
|
||||
//
|
||||
G4USolid::operator=(rhs);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
// computation & modification.
|
||||
|
||||
void G4UTubs::ComputeDimensions( G4VPVParameterisation* p,
|
||||
const G4int n,
|
||||
const G4VPhysicalVolume* pRep )
|
||||
{
|
||||
p->ComputeDimensions(*(G4Tubs*)this,n,pRep) ;
|
||||
}
|
||||
Reference in New Issue
Block a user