Import Geant4 10.3.0.beta source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4Orb.cc 83572 2014-09-01 15:23:27Z gcosmo $
|
||||
// $Id: G4Orb.cc 96318 2016-04-06 07:26:42Z gcosmo $
|
||||
//
|
||||
// class G4Orb
|
||||
//
|
||||
@@ -83,7 +83,7 @@ G4Orb::G4Orb( const G4String& pName, G4double pRmax )
|
||||
if ( pRmax < 10*kCarTolerance )
|
||||
{
|
||||
G4Exception("G4Orb::G4Orb()", "GeomSolids0002", FatalException,
|
||||
"Invalid radius > 10*kCarTolerance.");
|
||||
"Invalid radius < 10*kCarTolerance.");
|
||||
}
|
||||
fRmaxTolerance = std::max( kRadTolerance, fEpsilon*fRmax);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "G4Box.hh"
|
||||
#include "G4UBox.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
@@ -94,6 +94,39 @@ G4UBox& G4UBox::operator = (const G4UBox& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accessors & modifiers
|
||||
|
||||
G4double G4UBox::GetXHalfLength() const
|
||||
{
|
||||
return GetShape()->GetXHalfLength();
|
||||
}
|
||||
G4double G4UBox::GetYHalfLength() const
|
||||
{
|
||||
return GetShape()->GetYHalfLength();
|
||||
}
|
||||
G4double G4UBox::GetZHalfLength() const
|
||||
{
|
||||
return GetShape()->GetZHalfLength();
|
||||
}
|
||||
|
||||
void G4UBox::SetXHalfLength(G4double dx)
|
||||
{
|
||||
GetShape()->SetXHalfLength(dx);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UBox::SetYHalfLength(G4double dy)
|
||||
{
|
||||
GetShape()->SetYHalfLength(dy);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UBox::SetZHalfLength(G4double dz)
|
||||
{
|
||||
GetShape()->SetZHalfLength(dz);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
@@ -115,4 +148,15 @@ G4VSolid* G4UBox::Clone() const
|
||||
return new G4UBox(*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Create polyhedron for visualization
|
||||
|
||||
G4Polyhedron* G4UBox::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronBox(GetXHalfLength(),
|
||||
GetYHalfLength(),
|
||||
GetZHalfLength());
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
#include "G4Cons.hh"
|
||||
#include "G4UCons.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// constructor - check parameters, convert angles so 0<sphi+dpshi<=2_PI
|
||||
@@ -96,6 +96,75 @@ G4UCons& G4UCons::operator = (const G4UCons& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accessors and modifiers
|
||||
|
||||
G4double G4UCons::GetInnerRadiusMinusZ() const
|
||||
{
|
||||
return GetShape()->GetInnerRadiusMinusZ();
|
||||
}
|
||||
G4double G4UCons::GetOuterRadiusMinusZ() const
|
||||
{
|
||||
return GetShape()->GetOuterRadiusMinusZ();
|
||||
}
|
||||
G4double G4UCons::GetInnerRadiusPlusZ() const
|
||||
{
|
||||
return GetShape()->GetInnerRadiusPlusZ();
|
||||
}
|
||||
G4double G4UCons::GetOuterRadiusPlusZ() const
|
||||
{
|
||||
return GetShape()->GetOuterRadiusPlusZ();
|
||||
}
|
||||
G4double G4UCons::GetZHalfLength() const
|
||||
{
|
||||
return GetShape()->GetZHalfLength();
|
||||
}
|
||||
G4double G4UCons::GetStartPhiAngle() const
|
||||
{
|
||||
return GetShape()->GetStartPhiAngle();
|
||||
}
|
||||
G4double G4UCons::GetDeltaPhiAngle() const
|
||||
{
|
||||
return GetShape()->GetDeltaPhiAngle();
|
||||
}
|
||||
|
||||
void G4UCons::SetInnerRadiusMinusZ(G4double Rmin1)
|
||||
{
|
||||
GetShape()->SetInnerRadiusMinusZ(Rmin1);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UCons::SetOuterRadiusMinusZ(G4double Rmax1)
|
||||
{
|
||||
GetShape()->SetOuterRadiusMinusZ(Rmax1);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UCons::SetInnerRadiusPlusZ(G4double Rmin2)
|
||||
{
|
||||
GetShape()->SetInnerRadiusPlusZ(Rmin2);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UCons::SetOuterRadiusPlusZ(G4double Rmax2)
|
||||
{
|
||||
GetShape()->SetOuterRadiusPlusZ(Rmax2);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UCons::SetZHalfLength(G4double newDz)
|
||||
{
|
||||
GetShape()->SetZHalfLength(newDz);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UCons::SetStartPhiAngle(G4double newSPhi, G4bool trig)
|
||||
{
|
||||
GetShape()->SetStartPhiAngle(newSPhi, trig);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UCons::SetDeltaPhiAngle(G4double newDPhi)
|
||||
{
|
||||
GetShape()->SetDeltaPhiAngle(newDPhi);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
@@ -117,4 +186,19 @@ G4VSolid* G4UCons::Clone() const
|
||||
return new G4UCons(*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Create polyhedron for visualization
|
||||
|
||||
G4Polyhedron* G4UCons::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronCons(GetInnerRadiusMinusZ(),
|
||||
GetOuterRadiusMinusZ(),
|
||||
GetInnerRadiusPlusZ(),
|
||||
GetOuterRadiusPlusZ(),
|
||||
GetZHalfLength(),
|
||||
GetStartPhiAngle(),
|
||||
GetDeltaPhiAngle());
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -32,9 +32,10 @@
|
||||
#include "G4Orb.hh"
|
||||
#include "G4UOrb.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "G4PhysicalConstants.hh"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -90,6 +91,21 @@ G4UOrb& G4UOrb::operator = (const G4UOrb& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accessors & modifiers
|
||||
|
||||
G4double G4UOrb::GetRadius() const
|
||||
{
|
||||
return GetShape()->GetRadius();
|
||||
}
|
||||
|
||||
void G4UOrb::SetRadius(G4double newRmax)
|
||||
{
|
||||
GetShape()->SetRadius(newRmax);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
@@ -111,4 +127,13 @@ G4VSolid* G4UOrb::Clone() const
|
||||
return new G4UOrb(*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Create polyhedron for visualization
|
||||
|
||||
G4Polyhedron* G4UOrb::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronSphere(0., GetRadius(), 0., twopi, 0., pi);
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "G4Sphere.hh"
|
||||
#include "G4USphere.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
@@ -95,6 +95,66 @@ G4USphere& G4USphere::operator = (const G4USphere& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accessors & modifiers
|
||||
|
||||
G4double G4USphere::GetInnerRadius() const
|
||||
{
|
||||
return GetShape()->GetInnerRadius();
|
||||
}
|
||||
G4double G4USphere::GetOuterRadius() const
|
||||
{
|
||||
return GetShape()->GetOuterRadius();
|
||||
}
|
||||
G4double G4USphere::GetStartPhiAngle() const
|
||||
{
|
||||
return GetShape()->GetStartPhiAngle();
|
||||
}
|
||||
G4double G4USphere::GetDeltaPhiAngle() const
|
||||
{
|
||||
return GetShape()->GetDeltaPhiAngle();
|
||||
}
|
||||
G4double G4USphere::GetStartThetaAngle() const
|
||||
{
|
||||
return GetShape()->GetStartThetaAngle();
|
||||
}
|
||||
G4double G4USphere::GetDeltaThetaAngle() const
|
||||
{
|
||||
return GetShape()->GetDeltaThetaAngle();
|
||||
}
|
||||
|
||||
void G4USphere::SetInnerRadius(G4double newRMin)
|
||||
{
|
||||
GetShape()->SetInnerRadius(newRMin);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4USphere::SetOuterRadius(G4double newRmax)
|
||||
{
|
||||
GetShape()->SetOuterRadius(newRmax);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4USphere::SetStartPhiAngle(G4double newSphi, G4bool trig)
|
||||
{
|
||||
GetShape()->SetStartPhiAngle(newSphi, trig);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4USphere::SetDeltaPhiAngle(G4double newDphi)
|
||||
{
|
||||
GetShape()->SetDeltaPhiAngle(newDphi);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4USphere::SetStartThetaAngle(G4double newSTheta)
|
||||
{
|
||||
GetShape()->SetStartThetaAngle(newSTheta);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4USphere::SetDeltaThetaAngle(G4double newDTheta)
|
||||
{
|
||||
GetShape()->SetDeltaThetaAngle(newDTheta);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
@@ -116,4 +176,18 @@ G4VSolid* G4USphere::Clone() const
|
||||
return new G4USphere(*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Create polyhedron for visualization
|
||||
|
||||
G4Polyhedron* G4USphere::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronSphere(GetInnerRadius(),
|
||||
GetOuterRadius(),
|
||||
GetStartPhiAngle(),
|
||||
GetDeltaPhiAngle(),
|
||||
GetStartThetaAngle(),
|
||||
GetDeltaThetaAngle());
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "G4Torus.hh"
|
||||
#include "G4UTorus.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
@@ -90,6 +90,76 @@ G4UTorus& G4UTorus::operator = (const G4UTorus& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accessors & modifiers
|
||||
|
||||
G4double G4UTorus::GetRmin() const
|
||||
{
|
||||
return GetShape()->GetRmin();
|
||||
}
|
||||
|
||||
G4double G4UTorus::GetRmax() const
|
||||
{
|
||||
return GetShape()->GetRmax();
|
||||
}
|
||||
|
||||
G4double G4UTorus::GetRtor() const
|
||||
{
|
||||
return GetShape()->GetRtor();
|
||||
}
|
||||
|
||||
G4double G4UTorus::GetSPhi() const
|
||||
{
|
||||
return GetShape()->GetSPhi();
|
||||
}
|
||||
|
||||
G4double G4UTorus::GetDPhi() const
|
||||
{
|
||||
return GetShape()->GetDPhi();
|
||||
}
|
||||
|
||||
void G4UTorus::SetRmin(G4double arg)
|
||||
{
|
||||
GetShape()->SetRmin(arg);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
void G4UTorus::SetRmax(G4double arg)
|
||||
{
|
||||
GetShape()->SetRmax(arg);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
void G4UTorus::SetRtor(G4double arg)
|
||||
{
|
||||
GetShape()->SetRtor(arg);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
void G4UTorus::SetSPhi(G4double arg)
|
||||
{
|
||||
GetShape()->SetSPhi(arg);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
void G4UTorus::SetDPhi(G4double arg)
|
||||
{
|
||||
GetShape()->SetDPhi(arg);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
void G4UTorus::SetAllParameters(G4double arg1, G4double arg2,
|
||||
G4double arg3, G4double arg4, G4double arg5)
|
||||
{
|
||||
GetShape()->SetRmin(arg1);
|
||||
GetShape()->SetRmax(arg2);
|
||||
GetShape()->SetRtor(arg3);
|
||||
GetShape()->SetSPhi(arg4);
|
||||
GetShape()->SetDPhi(arg5);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
@@ -111,4 +181,17 @@ G4VSolid* G4UTorus::Clone() const
|
||||
return new G4UTorus(*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Create polyhedron for visualization
|
||||
|
||||
G4Polyhedron* G4UTorus::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronTorus(GetRmin(),
|
||||
GetRmax(),
|
||||
GetRtor(),
|
||||
GetSPhi(),
|
||||
GetDPhi());
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -33,10 +33,9 @@
|
||||
#include "G4Trap.hh"
|
||||
#include "G4UTrap.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
@@ -133,6 +132,81 @@ G4UTrap& G4UTrap::operator = (const G4UTrap& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accessors & modifiers
|
||||
|
||||
G4double G4UTrap::GetZHalfLength() const
|
||||
{
|
||||
return GetShape()->GetZHalfLength();
|
||||
}
|
||||
G4double G4UTrap::GetYHalfLength1() const
|
||||
{
|
||||
return GetShape()->GetYHalfLength1();
|
||||
}
|
||||
G4double G4UTrap::GetXHalfLength1() const
|
||||
{
|
||||
return GetShape()->GetXHalfLength1();
|
||||
}
|
||||
G4double G4UTrap::GetXHalfLength2() const
|
||||
{
|
||||
return GetShape()->GetXHalfLength2();
|
||||
}
|
||||
G4double G4UTrap::GetTanAlpha1() const
|
||||
{
|
||||
return GetShape()->GetTanAlpha1();
|
||||
}
|
||||
G4double G4UTrap::GetYHalfLength2() const
|
||||
{
|
||||
return GetShape()->GetYHalfLength2();
|
||||
}
|
||||
G4double G4UTrap::GetXHalfLength3() const
|
||||
{
|
||||
return GetShape()->GetXHalfLength3();
|
||||
}
|
||||
G4double G4UTrap::GetXHalfLength4() const
|
||||
{
|
||||
return GetShape()->GetXHalfLength4();
|
||||
}
|
||||
G4double G4UTrap::GetTanAlpha2() const
|
||||
{
|
||||
return GetShape()->GetTanAlpha2();
|
||||
}
|
||||
TrapSidePlane G4UTrap::GetSidePlane(G4int n) const
|
||||
{
|
||||
UTrapSidePlane iplane = GetShape()->GetSidePlane(n);
|
||||
TrapSidePlane oplane = {iplane.a, iplane.b, iplane.c, iplane.d };
|
||||
return oplane;
|
||||
}
|
||||
G4ThreeVector G4UTrap::GetSymAxis() const
|
||||
{
|
||||
UVector3 axis = GetShape()->GetSymAxis();
|
||||
return G4ThreeVector(axis.x(), axis.y(), axis.z());
|
||||
}
|
||||
|
||||
void G4UTrap::SetAllParameters(G4double pDz, G4double pTheta, G4double pPhi,
|
||||
G4double pDy1, G4double pDx1, G4double pDx2,
|
||||
G4double pAlp1,
|
||||
G4double pDy2, G4double pDx3, G4double pDx4,
|
||||
G4double pAlp2)
|
||||
{
|
||||
GetShape()->SetAllParameters(pDz, pTheta, pPhi,
|
||||
pDy1, pDx1, pDx2, pAlp1,
|
||||
pDy2, pDx3, pDx4, pAlp2);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
void G4UTrap::SetPlanes(const G4ThreeVector pt[8])
|
||||
{
|
||||
UVector3 upt[8];
|
||||
for (unsigned int i=0; i<8; ++i)
|
||||
{
|
||||
upt[i] = UVector3(pt[i].x(), pt[i].y(), pt[i].z());
|
||||
}
|
||||
GetShape()->SetPlanes(upt);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
@@ -156,7 +230,7 @@ G4VSolid* G4UTrap::Clone() const
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// CreatePolyhedron()
|
||||
// Create polyhedron for visualization
|
||||
//
|
||||
G4Polyhedron* G4UTrap::CreatePolyhedron() const
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "G4Trd.hh"
|
||||
#include "G4UTrd.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
@@ -93,6 +93,63 @@ G4UTrd& G4UTrd::operator = (const G4UTrd& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accessors & modifiers
|
||||
|
||||
G4double G4UTrd::GetXHalfLength1() const
|
||||
{
|
||||
return GetShape()->GetXHalfLength1();
|
||||
}
|
||||
G4double G4UTrd::GetXHalfLength2() const
|
||||
{
|
||||
return GetShape()->GetXHalfLength2();
|
||||
}
|
||||
G4double G4UTrd::GetYHalfLength1() const
|
||||
{
|
||||
return GetShape()->GetYHalfLength1();
|
||||
}
|
||||
G4double G4UTrd::GetYHalfLength2() const
|
||||
{
|
||||
return GetShape()->GetYHalfLength2();
|
||||
}
|
||||
G4double G4UTrd::GetZHalfLength() const
|
||||
{
|
||||
return GetShape()->GetZHalfLength();
|
||||
}
|
||||
|
||||
void G4UTrd::SetXHalfLength1(G4double val)
|
||||
{
|
||||
GetShape()->SetXHalfLength1(val);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTrd::SetXHalfLength2(G4double val)
|
||||
{
|
||||
GetShape()->SetXHalfLength2(val);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTrd::SetYHalfLength1(G4double val)
|
||||
{
|
||||
GetShape()->SetYHalfLength1(val);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTrd::SetYHalfLength2(G4double val)
|
||||
{
|
||||
GetShape()->SetYHalfLength2(val);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTrd::SetZHalfLength(G4double val)
|
||||
{
|
||||
GetShape()->SetZHalfLength(val);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTrd::SetAllParameters(G4double pdx1, G4double pdx2,
|
||||
G4double pdy1, G4double pdy2, G4double pdz)
|
||||
{
|
||||
GetShape()->SetAllParameters(pdx1, pdx2, pdy1, pdy2, pdz);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
@@ -114,4 +171,17 @@ G4VSolid* G4UTrd::Clone() const
|
||||
return new G4UTrd(*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Create polyhedron for visualization
|
||||
//
|
||||
G4Polyhedron* G4UTrd::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronTrd2(GetXHalfLength1(),
|
||||
GetXHalfLength2(),
|
||||
GetYHalfLength1(),
|
||||
GetYHalfLength2(),
|
||||
GetZHalfLength());
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "G4Tubs.hh"
|
||||
#include "G4UTubs.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "G4VPVParameterisation.hh"
|
||||
|
||||
@@ -94,6 +94,57 @@ G4UTubs& G4UTubs::operator = (const G4UTubs& rhs)
|
||||
return *this;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Accessors and modifiers
|
||||
|
||||
G4double G4UTubs::GetInnerRadius() const
|
||||
{
|
||||
return GetShape()->GetInnerRadius();
|
||||
}
|
||||
G4double G4UTubs::GetOuterRadius() const
|
||||
{
|
||||
return GetShape()->GetOuterRadius();
|
||||
}
|
||||
G4double G4UTubs::GetZHalfLength() const
|
||||
{
|
||||
return GetShape()->GetZHalfLength();
|
||||
}
|
||||
G4double G4UTubs::GetStartPhiAngle() const
|
||||
{
|
||||
return GetShape()->GetStartPhiAngle();
|
||||
}
|
||||
G4double G4UTubs::GetDeltaPhiAngle() const
|
||||
{
|
||||
return GetShape()->GetDeltaPhiAngle();
|
||||
}
|
||||
|
||||
void G4UTubs::SetInnerRadius(G4double newRMin)
|
||||
{
|
||||
GetShape()->SetInnerRadius(newRMin);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTubs::SetOuterRadius(G4double newRMax)
|
||||
{
|
||||
GetShape()->SetOuterRadius(newRMax);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTubs::SetZHalfLength(G4double newDz)
|
||||
{
|
||||
GetShape()->SetZHalfLength(newDz);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTubs::SetStartPhiAngle(G4double newSPhi, G4bool trig)
|
||||
{
|
||||
GetShape()->SetStartPhiAngle(newSPhi, trig);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
void G4UTubs::SetDeltaPhiAngle(G4double newDPhi)
|
||||
{
|
||||
GetShape()->SetDeltaPhiAngle(newDPhi);
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dispatch to parameterisation for replication mechanism dimension
|
||||
@@ -115,4 +166,17 @@ G4VSolid* G4UTubs::Clone() const
|
||||
return new G4UTubs(*this);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Create polyhedron for visualization
|
||||
//
|
||||
G4Polyhedron* G4UTubs::CreatePolyhedron() const
|
||||
{
|
||||
return new G4PolyhedronTubs(GetInnerRadius(),
|
||||
GetOuterRadius(),
|
||||
GetZHalfLength(),
|
||||
GetStartPhiAngle(),
|
||||
GetDeltaPhiAngle());
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
Reference in New Issue
Block a user