Import Geant4 10.3.0.beta source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ExtrudedSolid.hh 83851 2014-09-19 10:12:12Z gcosmo $
|
||||
// $Id: G4ExtrudedSolid.hh 95945 2016-03-03 09:54:38Z gcosmo $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
// Author:
|
||||
// Ivana Hrivnacova, IPN Orsay
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifndef G4ExtrudedSolid_HH
|
||||
@@ -86,7 +87,7 @@ class G4ExtrudedSolid : public G4TessellatedSolid
|
||||
|
||||
struct ZSection
|
||||
{
|
||||
ZSection(G4double z, G4TwoVector offset, G4double scale)
|
||||
ZSection(G4double z, const G4TwoVector& offset, G4double scale)
|
||||
: fZ(z), fOffset(offset), fScale(scale) {}
|
||||
|
||||
G4double fZ;
|
||||
@@ -97,15 +98,15 @@ class G4ExtrudedSolid : public G4TessellatedSolid
|
||||
public: // with description
|
||||
|
||||
G4ExtrudedSolid( const G4String& pName,
|
||||
std::vector<G4TwoVector> polygon,
|
||||
std::vector<ZSection> zsections);
|
||||
const std::vector<G4TwoVector>& polygon,
|
||||
const std::vector<ZSection>& zsections);
|
||||
// General constructor
|
||||
|
||||
G4ExtrudedSolid( const G4String& pName,
|
||||
std::vector<G4TwoVector> polygon,
|
||||
const std::vector<G4TwoVector>& polygon,
|
||||
G4double halfZ,
|
||||
G4TwoVector off1, G4double scale1,
|
||||
G4TwoVector off2, G4double scale2 );
|
||||
const G4TwoVector& off1, G4double scale1,
|
||||
const G4TwoVector& off2, G4double scale2 );
|
||||
// Special constructor for solid with 2 z-sections
|
||||
|
||||
virtual ~G4ExtrudedSolid();
|
||||
@@ -142,25 +143,34 @@ class G4ExtrudedSolid : public G4TessellatedSolid
|
||||
// persistifiable objects.
|
||||
|
||||
G4ExtrudedSolid(const G4ExtrudedSolid& rhs);
|
||||
G4ExtrudedSolid& operator=(const G4ExtrudedSolid& rhs);
|
||||
G4ExtrudedSolid& operator=(const G4ExtrudedSolid& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
private:
|
||||
|
||||
void CheckPolygon(G4String& removedVertices);
|
||||
void ComputeProjectionParameters();
|
||||
|
||||
G4ThreeVector GetVertex(G4int iz, G4int ind) const;
|
||||
G4TwoVector ProjectPoint(const G4ThreeVector& point) const;
|
||||
|
||||
G4bool IsSameLine(G4TwoVector p,
|
||||
G4TwoVector l1, G4TwoVector l2) const;
|
||||
G4bool IsSameLineSegment(G4TwoVector p,
|
||||
G4TwoVector l1, G4TwoVector l2) const;
|
||||
G4bool IsSameSide(G4TwoVector p1, G4TwoVector p2,
|
||||
G4TwoVector l1, G4TwoVector l2) const;
|
||||
G4bool IsPointInside(G4TwoVector a, G4TwoVector b, G4TwoVector c,
|
||||
G4TwoVector p) const;
|
||||
G4double GetAngle(G4TwoVector p0, G4TwoVector pa, G4TwoVector pb) const;
|
||||
G4bool IsSameLine(const G4TwoVector& p,
|
||||
const G4TwoVector& l1,
|
||||
const G4TwoVector& l2) const;
|
||||
G4bool IsSameLineSegment(const G4TwoVector& p,
|
||||
const G4TwoVector& l1,
|
||||
const G4TwoVector& l2) const;
|
||||
G4bool IsSameSide(const G4TwoVector& p1,
|
||||
const G4TwoVector& p2,
|
||||
const G4TwoVector& l1,
|
||||
const G4TwoVector& l2) const;
|
||||
G4bool IsPointInside(const G4TwoVector& a,
|
||||
const G4TwoVector& b,
|
||||
const G4TwoVector& c,
|
||||
const G4TwoVector& p) const;
|
||||
G4double GetAngle(const G4TwoVector& p0,
|
||||
const G4TwoVector& pa,
|
||||
const G4TwoVector& pb) const;
|
||||
|
||||
G4VFacet* MakeDownFacet(G4int ind1, G4int ind2, G4int ind3) const;
|
||||
G4VFacet* MakeUpFacet(G4int ind1, G4int ind2, G4int ind3) const;
|
||||
@@ -169,7 +179,6 @@ class G4ExtrudedSolid : public G4TessellatedSolid
|
||||
G4bool MakeFacets();
|
||||
G4bool IsConvex() const;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
G4int fNv;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GenericTrap.hh 83851 2014-09-19 10:12:12Z gcosmo $
|
||||
// $Id: G4GenericTrap.hh 95592 2016-02-16 10:48:01Z gcosmo $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -195,6 +195,10 @@ class G4GenericTrap : public G4VSolid
|
||||
const G4ThreeVector& p1,
|
||||
const G4ThreeVector& p2,
|
||||
const G4ThreeVector& p3) const;
|
||||
G4double GetFaceCubicVolume(const G4ThreeVector& p0,
|
||||
const G4ThreeVector& p1,
|
||||
const G4ThreeVector& p2,
|
||||
const G4ThreeVector& p3) const;
|
||||
protected:
|
||||
|
||||
mutable G4bool fRebuildPolyhedron;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4QuadrangularFacet.hh 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
// $Id: G4QuadrangularFacet.hh 95801 2016-02-25 10:59:41Z gcosmo $
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
@@ -90,7 +90,7 @@ class G4QuadrangularFacet : public G4VFacet
|
||||
G4double &distFromSurface, G4ThreeVector &normal);
|
||||
G4ThreeVector GetSurfaceNormal () const;
|
||||
|
||||
G4double GetArea ();
|
||||
G4double GetArea () const;
|
||||
G4ThreeVector GetPointOnFace () const;
|
||||
|
||||
G4GeometryType GetEntityType () const;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4TessellatedSolid.hh 83572 2014-09-01 15:23:27Z gcosmo $
|
||||
// $Id: G4TessellatedSolid.hh 95801 2016-02-25 10:59:41Z gcosmo $
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
@@ -264,6 +264,10 @@ class G4TessellatedSolid : public G4VSolid
|
||||
inline G4bool OutsideOfExtent(const G4ThreeVector &p,
|
||||
G4double tolerance=0) const;
|
||||
|
||||
protected:
|
||||
|
||||
G4double kCarToleranceHalf;
|
||||
|
||||
private:
|
||||
|
||||
mutable G4bool fRebuildPolyhedron;
|
||||
@@ -287,8 +291,6 @@ class G4TessellatedSolid : public G4VSolid
|
||||
|
||||
std::vector<G4ThreeVector> fRandir;
|
||||
|
||||
G4double kCarToleranceHalf;
|
||||
|
||||
G4int fMaxTries;
|
||||
|
||||
G4SurfaceVoxelizer fVoxels; // Pointer to the voxelized solid
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4TriangularFacet.hh 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
// $Id: G4TriangularFacet.hh 95801 2016-02-25 10:59:41Z gcosmo $
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
@@ -86,7 +86,7 @@ class G4TriangularFacet : public G4VFacet
|
||||
G4bool Intersect (const G4ThreeVector &p, const G4ThreeVector &v,
|
||||
const G4bool outgoing, G4double &distance,
|
||||
G4double &distFromSurface, G4ThreeVector &normal);
|
||||
G4double GetArea ();
|
||||
G4double GetArea () const;
|
||||
G4ThreeVector GetPointOnFace () const;
|
||||
|
||||
G4ThreeVector GetSurfaceNormal () const;
|
||||
|
||||
@@ -45,10 +45,11 @@
|
||||
|
||||
#include "G4USolid.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "UExtrudedSolid.hh"
|
||||
#include "G4TwoVector.hh"
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
class G4UExtrudedSolid : public G4USolid
|
||||
{
|
||||
@@ -85,13 +86,15 @@ class G4UExtrudedSolid : public G4USolid
|
||||
|
||||
inline UExtrudedSolid* GetShape() const;
|
||||
|
||||
inline G4int GetNofVertices() const;
|
||||
inline G4TwoVector GetVertex(G4int index) const;
|
||||
inline std::vector<G4TwoVector> GetPolygon() const;
|
||||
inline G4int GetNofZSections() const;
|
||||
inline ZSection GetZSection(G4int index) const;
|
||||
inline std::vector<ZSection> GetZSections() const;
|
||||
G4int GetNofVertices() const;
|
||||
G4TwoVector GetVertex(G4int index) const;
|
||||
std::vector<G4TwoVector> GetPolygon() const;
|
||||
G4int GetNofZSections() const;
|
||||
ZSection GetZSection(G4int index) const;
|
||||
std::vector<ZSection> GetZSections() const;
|
||||
|
||||
inline G4GeometryType GetEntityType() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4UExtrudedSolid(__void__&);
|
||||
@@ -102,6 +105,7 @@ class G4UExtrudedSolid : public G4USolid
|
||||
G4UExtrudedSolid( const G4UExtrudedSolid& source );
|
||||
G4UExtrudedSolid &operator=(const G4UExtrudedSolid& source);
|
||||
// Copy constructor and assignment operator.
|
||||
G4Polyhedron* CreatePolyhedron() const;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
@@ -113,44 +117,11 @@ inline UExtrudedSolid* G4UExtrudedSolid::GetShape() const
|
||||
return (UExtrudedSolid*) fShape;
|
||||
}
|
||||
|
||||
inline G4int G4UExtrudedSolid::GetNofVertices() const
|
||||
inline G4GeometryType G4UExtrudedSolid::GetEntityType() const
|
||||
{
|
||||
return GetShape()->GetNofVertices();
|
||||
return "G4ExtrudedSolid";
|
||||
}
|
||||
inline G4TwoVector G4UExtrudedSolid::GetVertex(G4int i) const
|
||||
{
|
||||
UVector2 v = GetShape()->GetVertex(i);
|
||||
return G4TwoVector(v.x, v.y);
|
||||
}
|
||||
inline std::vector<G4TwoVector> G4UExtrudedSolid::GetPolygon() const
|
||||
{
|
||||
std::vector<UVector2> pol = GetShape()->GetPolygon();
|
||||
std::vector<G4TwoVector> v;
|
||||
for (unsigned int i=0; i<pol.size(); ++i)
|
||||
{
|
||||
v.push_back(G4TwoVector(pol[i].x, pol[i].y));
|
||||
}
|
||||
return v;
|
||||
}
|
||||
inline G4int G4UExtrudedSolid::GetNofZSections() const
|
||||
{
|
||||
return GetShape()->GetNofZSections();
|
||||
}
|
||||
inline G4UExtrudedSolid::ZSection G4UExtrudedSolid::GetZSection(G4int i) const
|
||||
{
|
||||
return ZSection(GetShape()->GetZSection(i));
|
||||
}
|
||||
inline std::vector<G4UExtrudedSolid::ZSection> G4UExtrudedSolid::GetZSections() const
|
||||
{
|
||||
std::vector<UExtrudedSolid::ZSection> sv = GetShape()->GetZSections();
|
||||
std::vector<G4UExtrudedSolid::ZSection> vec;
|
||||
for (unsigned int i=0; i<sv.size(); ++i)
|
||||
{
|
||||
vec.push_back(ZSection(sv[i]));
|
||||
}
|
||||
return vec;
|
||||
}
|
||||
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
#endif
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#include "G4USolid.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "UGenericPolycone.hh"
|
||||
#include "G4PolyconeSide.hh"
|
||||
@@ -65,12 +65,14 @@ class G4UGenericPolycone : public G4USolid
|
||||
|
||||
inline UGenericPolycone* GetShape() const;
|
||||
|
||||
inline G4double GetStartPhi() const;
|
||||
inline G4double GetEndPhi() const;
|
||||
inline G4bool IsOpen() const;
|
||||
inline G4int GetNumRZCorner() const;
|
||||
inline G4PolyconeSideRZ GetCorner(G4int index) const;
|
||||
G4double GetStartPhi() const;
|
||||
G4double GetEndPhi() const;
|
||||
G4bool IsOpen() const;
|
||||
G4int GetNumRZCorner() const;
|
||||
G4PolyconeSideRZ GetCorner(G4int index) const;
|
||||
|
||||
inline G4GeometryType GetEntityType() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4UGenericPolycone(__void__&);
|
||||
@@ -93,28 +95,9 @@ inline UGenericPolycone* G4UGenericPolycone::GetShape() const
|
||||
return (UGenericPolycone*) fShape;
|
||||
}
|
||||
|
||||
inline G4double G4UGenericPolycone::GetStartPhi() const
|
||||
inline G4GeometryType G4UGenericPolycone::GetEntityType() const
|
||||
{
|
||||
return GetShape()->GetStartPhi();
|
||||
}
|
||||
inline G4double G4UGenericPolycone::GetEndPhi() const
|
||||
{
|
||||
return GetShape()->GetEndPhi();
|
||||
}
|
||||
inline G4bool G4UGenericPolycone::IsOpen() const
|
||||
{
|
||||
return GetShape()->IsOpen();
|
||||
}
|
||||
inline G4int G4UGenericPolycone::GetNumRZCorner() const
|
||||
{
|
||||
return GetShape()->GetNumRZCorner();
|
||||
}
|
||||
inline G4PolyconeSideRZ G4UGenericPolycone::GetCorner(G4int index) const
|
||||
{
|
||||
UPolyconeSideRZ pside = GetShape()->GetCorner(index);
|
||||
G4PolyconeSideRZ psiderz = { pside.r, pside.z };
|
||||
|
||||
return psiderz;
|
||||
return "G4GenericPolycone";
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
|
||||
#include "G4USolid.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "UGenericTrap.hh"
|
||||
#include "G4TwoVector.hh"
|
||||
|
||||
class G4Polyhedron;
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
class G4UGenericTrap : public G4USolid
|
||||
{
|
||||
@@ -63,15 +63,17 @@ class G4UGenericTrap : public G4USolid
|
||||
|
||||
inline UGenericTrap* GetShape() const;
|
||||
|
||||
inline G4double GetZHalfLength() const;
|
||||
inline G4int GetNofVertices() const;
|
||||
inline G4TwoVector GetVertex(G4int index) const;
|
||||
inline const std::vector<G4TwoVector>& GetVertices() const;
|
||||
inline G4double GetTwistAngle(G4int index) const;
|
||||
inline G4bool IsTwisted() const;
|
||||
inline G4int GetVisSubdivisions() const;
|
||||
inline void SetVisSubdivisions(G4int subdiv);
|
||||
inline void SetZHalfLength(G4double);
|
||||
G4double GetZHalfLength() const;
|
||||
G4int GetNofVertices() const;
|
||||
G4TwoVector GetVertex(G4int index) const;
|
||||
const std::vector<G4TwoVector>& GetVertices() const;
|
||||
G4double GetTwistAngle(G4int index) const;
|
||||
G4bool IsTwisted() const;
|
||||
G4int GetVisSubdivisions() const;
|
||||
void SetVisSubdivisions(G4int subdiv);
|
||||
void SetZHalfLength(G4double);
|
||||
|
||||
inline G4GeometryType GetEntityType() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
@@ -96,50 +98,9 @@ inline UGenericTrap* G4UGenericTrap::GetShape() const
|
||||
return (UGenericTrap*) fShape;
|
||||
}
|
||||
|
||||
inline G4double G4UGenericTrap::GetZHalfLength() const
|
||||
inline G4GeometryType G4UGenericTrap::GetEntityType() const
|
||||
{
|
||||
return GetShape()->GetZHalfLength();
|
||||
}
|
||||
inline G4int G4UGenericTrap::GetNofVertices() const
|
||||
{
|
||||
return GetShape()->GetNofVertices();
|
||||
}
|
||||
inline G4TwoVector G4UGenericTrap::GetVertex(G4int index) const
|
||||
{
|
||||
UVector2 v = GetShape()->GetVertex(index);
|
||||
return G4TwoVector(v.x, v.y);
|
||||
}
|
||||
inline const std::vector<G4TwoVector>& G4UGenericTrap::GetVertices() const
|
||||
{
|
||||
std::vector<UVector2> v = GetShape()->GetVertices();
|
||||
static std::vector<G4TwoVector> vertices; vertices.clear();
|
||||
for (size_t n=0; n<v.size(); ++n)
|
||||
{
|
||||
vertices.push_back(G4TwoVector(v[n].x,v[n].y));
|
||||
}
|
||||
return vertices;
|
||||
}
|
||||
inline G4double G4UGenericTrap::GetTwistAngle(G4int index) const
|
||||
{
|
||||
return GetShape()->GetTwistAngle(index);
|
||||
}
|
||||
inline G4bool G4UGenericTrap::IsTwisted() const
|
||||
{
|
||||
return GetShape()->IsTwisted();
|
||||
}
|
||||
inline G4int G4UGenericTrap::GetVisSubdivisions() const
|
||||
{
|
||||
return GetShape()->GetVisSubdivisions();
|
||||
}
|
||||
|
||||
inline void G4UGenericTrap::SetVisSubdivisions(G4int subdiv)
|
||||
{
|
||||
GetShape()->SetVisSubdivisions(subdiv);
|
||||
}
|
||||
|
||||
inline void G4UGenericTrap::SetZHalfLength(G4double halfZ)
|
||||
{
|
||||
GetShape()->SetZHalfLength(halfZ);
|
||||
return "G4GenericTrap";
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -45,40 +45,43 @@
|
||||
|
||||
#include "G4USolid.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "UParaboloid.hh"
|
||||
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
class G4UParaboloid : public G4USolid {
|
||||
class G4UParaboloid : public G4USolid
|
||||
{
|
||||
|
||||
public: // with description
|
||||
public: // with description
|
||||
|
||||
G4UParaboloid(const G4String& name, G4double dz, G4double rlo, G4double rhi);
|
||||
G4UParaboloid(const G4String& name, G4double dz,
|
||||
G4double rlo,
|
||||
G4double rhi);
|
||||
~G4UParaboloid();
|
||||
|
||||
~G4UParaboloid();
|
||||
G4VSolid* Clone() const;
|
||||
|
||||
G4VSolid* Clone() const;
|
||||
inline UParaboloid* GetShape() const;
|
||||
|
||||
inline UParaboloid* GetShape() const;
|
||||
G4double GetZHalfLength() const;
|
||||
G4double GetRadiusMinusZ() const;
|
||||
G4double GetRadiusPlusZ() const;
|
||||
|
||||
inline G4double GetZHalfLength() const;
|
||||
inline G4double GetRadiusMinusZ() const;
|
||||
inline G4double GetRadiusPlusZ() const;
|
||||
inline G4GeometryType GetEntityType() const;
|
||||
|
||||
// inline G4bool Reset();
|
||||
public: // without description
|
||||
|
||||
public: // without description
|
||||
|
||||
G4UParaboloid(__void__&);
|
||||
G4UParaboloid(__void__&);
|
||||
// Fake default constructor for usage restricted to direct object
|
||||
// persistency for clients requiring preallocation of memory for
|
||||
// persistifiable objects.
|
||||
|
||||
G4UParaboloid( const G4UParaboloid &source );
|
||||
G4UParaboloid &operator=( const G4UParaboloid &source );
|
||||
G4UParaboloid( const G4UParaboloid &source );
|
||||
G4UParaboloid &operator=( const G4UParaboloid &source );
|
||||
// Copy constructor and assignment operator.
|
||||
// G4Polyhedron* CreatePolyhedron() const;
|
||||
G4Polyhedron* CreatePolyhedron() const;
|
||||
};
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
@@ -90,48 +93,10 @@ inline UParaboloid* G4UParaboloid::GetShape() const
|
||||
return (UParaboloid*) fShape;
|
||||
}
|
||||
|
||||
inline G4double G4UParaboloid::GetZHalfLength() const {
|
||||
return GetShape()->GetDz();
|
||||
inline G4GeometryType G4UParaboloid::GetEntityType() const
|
||||
{
|
||||
return "G4Paraboloid";
|
||||
}
|
||||
inline G4double G4UParaboloid::GetRadiusMinusZ() const {
|
||||
return GetShape()->GetRlo();
|
||||
}
|
||||
inline G4double G4UParaboloid::GetRadiusPlusZ() const {
|
||||
return GetShape()->GetRhi();
|
||||
}
|
||||
// inline G4ParaboloidHistorical* G4UParaboloid::GetOriginalParameters() const
|
||||
// {
|
||||
// UParaboloidHistorical* pars = GetShape()->GetOriginalParameters();
|
||||
// G4ParaboloidHistorical* pdata = new G4ParaboloidHistorical(pars->fNumZPlanes);
|
||||
// pdata->Start_angle = pars->fStartAngle;
|
||||
// pdata->Opening_angle = pars->fOpeningAngle;
|
||||
// for (G4int i=0; i<pars->fNumZPlanes; ++i)
|
||||
// {
|
||||
// pdata->Z_values[i] = pars->fZValues[i];
|
||||
// pdata->Rmin[i] = pars->Rmin[i];
|
||||
// pdata->Rmax[i] = pars->Rmax[i];
|
||||
// }
|
||||
// return pdata;
|
||||
// }
|
||||
// inline void G4UParaboloid::SetOriginalParameters(G4ParaboloidHistorical* pars)
|
||||
// {
|
||||
// UParaboloidHistorical* pdata = GetShape()->GetOriginalParameters();
|
||||
// pdata->fStartAngle = pars->Start_angle;
|
||||
// pdata->fOpeningAngle = pars->Opening_angle;
|
||||
// pdata->fNumZPlanes = pars->Num_z_planes;
|
||||
// for (G4int i=0; i<pdata->fNumZPlanes; ++i)
|
||||
// {
|
||||
// pdata->fZValues[i] = pars->Z_values[i];
|
||||
// pdata->Rmin[i] = pars->Rmin[i];
|
||||
// pdata->Rmax[i] = pars->Rmax[i];
|
||||
// }
|
||||
// fRebuildPolyhedron = true;
|
||||
// }
|
||||
// inline G4bool G4UParaboloid::Reset()
|
||||
// {
|
||||
// GetShape()->Reset();
|
||||
// return 0;
|
||||
// }
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#include "G4USolid.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "UPolycone.hh"
|
||||
#include "G4PolyconeSide.hh"
|
||||
@@ -82,15 +82,17 @@ class G4UPolycone : public G4USolid
|
||||
|
||||
inline UPolycone* GetShape() const;
|
||||
|
||||
inline G4double GetStartPhi() const;
|
||||
inline G4double GetEndPhi() const;
|
||||
inline G4bool IsOpen() const;
|
||||
inline G4int GetNumRZCorner() const;
|
||||
inline G4PolyconeSideRZ GetCorner(G4int index) const;
|
||||
inline G4PolyconeHistorical* GetOriginalParameters() const;
|
||||
inline void SetOriginalParameters(G4PolyconeHistorical* pars);
|
||||
G4double GetStartPhi() const;
|
||||
G4double GetEndPhi() const;
|
||||
G4bool IsOpen() const;
|
||||
G4int GetNumRZCorner() const;
|
||||
G4PolyconeSideRZ GetCorner(G4int index) const;
|
||||
G4PolyconeHistorical* GetOriginalParameters() const;
|
||||
void SetOriginalParameters(G4PolyconeHistorical* pars);
|
||||
|
||||
inline G4bool Reset();
|
||||
G4bool Reset();
|
||||
|
||||
inline G4GeometryType GetEntityType() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
@@ -115,61 +117,9 @@ inline UPolycone* G4UPolycone::GetShape() const
|
||||
return (UPolycone*) fShape;
|
||||
}
|
||||
|
||||
inline G4double G4UPolycone::GetStartPhi() const
|
||||
inline G4GeometryType G4UPolycone::GetEntityType() const
|
||||
{
|
||||
return GetShape()->GetStartPhi();
|
||||
}
|
||||
inline G4double G4UPolycone::GetEndPhi() const
|
||||
{
|
||||
return GetShape()->GetEndPhi();
|
||||
}
|
||||
inline G4bool G4UPolycone::IsOpen() const
|
||||
{
|
||||
return GetShape()->IsOpen();
|
||||
}
|
||||
inline G4int G4UPolycone::GetNumRZCorner() const
|
||||
{
|
||||
return GetShape()->GetNumRZCorner();
|
||||
}
|
||||
inline G4PolyconeSideRZ G4UPolycone::GetCorner(G4int index) const
|
||||
{
|
||||
UPolyconeSideRZ pside = GetShape()->GetCorner(index);
|
||||
G4PolyconeSideRZ psiderz = { pside.r, pside.z };
|
||||
|
||||
return psiderz;
|
||||
}
|
||||
inline G4PolyconeHistorical* G4UPolycone::GetOriginalParameters() const
|
||||
{
|
||||
UPolyconeHistorical* pars = GetShape()->GetOriginalParameters();
|
||||
G4PolyconeHistorical* pdata = new G4PolyconeHistorical(pars->fNumZPlanes);
|
||||
pdata->Start_angle = pars->fStartAngle;
|
||||
pdata->Opening_angle = pars->fOpeningAngle;
|
||||
for (G4int i=0; i<pars->fNumZPlanes; ++i)
|
||||
{
|
||||
pdata->Z_values[i] = pars->fZValues[i];
|
||||
pdata->Rmin[i] = pars->Rmin[i];
|
||||
pdata->Rmax[i] = pars->Rmax[i];
|
||||
}
|
||||
return pdata;
|
||||
}
|
||||
inline void G4UPolycone::SetOriginalParameters(G4PolyconeHistorical* pars)
|
||||
{
|
||||
UPolyconeHistorical* pdata = GetShape()->GetOriginalParameters();
|
||||
pdata->fStartAngle = pars->Start_angle;
|
||||
pdata->fOpeningAngle = pars->Opening_angle;
|
||||
pdata->fNumZPlanes = pars->Num_z_planes;
|
||||
for (G4int i=0; i<pdata->fNumZPlanes; ++i)
|
||||
{
|
||||
pdata->fZValues[i] = pars->Z_values[i];
|
||||
pdata->Rmin[i] = pars->Rmin[i];
|
||||
pdata->Rmax[i] = pars->Rmax[i];
|
||||
}
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
inline G4bool G4UPolycone::Reset()
|
||||
{
|
||||
GetShape()->Reset();
|
||||
return 0;
|
||||
return "G4Polycone";
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
#include "G4USolid.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "UPolyhedra.hh"
|
||||
#include "G4PolyhedraSide.hh"
|
||||
@@ -86,17 +86,19 @@ class G4UPolyhedra : public G4USolid
|
||||
|
||||
inline UPolyhedra* GetShape() const;
|
||||
|
||||
inline G4int GetNumSide() const;
|
||||
inline G4double GetStartPhi() const;
|
||||
inline G4double GetEndPhi() const;
|
||||
inline G4bool IsOpen() const;
|
||||
inline G4bool IsGeneric() const;
|
||||
inline G4int GetNumRZCorner() const;
|
||||
inline G4PolyhedraSideRZ GetCorner( const G4int index ) const;
|
||||
inline G4PolyhedraHistorical* GetOriginalParameters() const;
|
||||
inline void SetOriginalParameters(G4PolyhedraHistorical* pars);
|
||||
G4int GetNumSide() const;
|
||||
G4double GetStartPhi() const;
|
||||
G4double GetEndPhi() const;
|
||||
G4bool IsOpen() const;
|
||||
G4bool IsGeneric() const;
|
||||
G4int GetNumRZCorner() const;
|
||||
G4PolyhedraSideRZ GetCorner( const G4int index ) const;
|
||||
G4PolyhedraHistorical* GetOriginalParameters() const;
|
||||
void SetOriginalParameters(G4PolyhedraHistorical* pars);
|
||||
|
||||
inline G4bool Reset();
|
||||
G4bool Reset();
|
||||
|
||||
inline G4GeometryType GetEntityType() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
@@ -120,70 +122,9 @@ inline UPolyhedra* G4UPolyhedra::GetShape() const
|
||||
return (UPolyhedra*) fShape;
|
||||
}
|
||||
|
||||
inline G4int G4UPolyhedra::GetNumSide() const
|
||||
inline G4GeometryType G4UPolyhedra::GetEntityType() const
|
||||
{
|
||||
return GetShape()->GetNumSide();
|
||||
}
|
||||
inline G4double G4UPolyhedra::GetStartPhi() const
|
||||
{
|
||||
return GetShape()->GetStartPhi();
|
||||
}
|
||||
inline G4double G4UPolyhedra::GetEndPhi() const
|
||||
{
|
||||
return GetShape()->GetEndPhi();
|
||||
}
|
||||
inline G4bool G4UPolyhedra::IsOpen() const
|
||||
{
|
||||
return GetShape()->IsOpen();
|
||||
}
|
||||
inline G4bool G4UPolyhedra::IsGeneric() const
|
||||
{
|
||||
return GetShape()->IsGeneric();
|
||||
}
|
||||
inline G4int G4UPolyhedra::GetNumRZCorner() const
|
||||
{
|
||||
return GetShape()->GetNumRZCorner();
|
||||
}
|
||||
inline G4PolyhedraSideRZ G4UPolyhedra::GetCorner(G4int index) const
|
||||
{
|
||||
UPolyhedraSideRZ pside = GetShape()->GetCorner(index);
|
||||
G4PolyhedraSideRZ psiderz = { pside.r, pside.z };
|
||||
|
||||
return psiderz;
|
||||
}
|
||||
inline G4PolyhedraHistorical* G4UPolyhedra::GetOriginalParameters() const
|
||||
{
|
||||
UPolyhedraHistorical* pars = GetShape()->GetOriginalParameters();
|
||||
G4PolyhedraHistorical* pdata = new G4PolyhedraHistorical(pars->fNumZPlanes);
|
||||
pdata->Start_angle = pars->fStartAngle;
|
||||
pdata->Opening_angle = pars->fOpeningAngle;
|
||||
pdata->numSide = pars->fNumSide;
|
||||
for (G4int i=0; i<pars->fNumZPlanes; ++i)
|
||||
{
|
||||
pdata->Z_values[i] = pars->fZValues[i];
|
||||
pdata->Rmin[i] = pars->Rmin[i];
|
||||
pdata->Rmax[i] = pars->Rmax[i];
|
||||
}
|
||||
return pdata;
|
||||
}
|
||||
inline void G4UPolyhedra::SetOriginalParameters(G4PolyhedraHistorical* pars)
|
||||
{
|
||||
UPolyhedraHistorical* pdata = GetShape()->GetOriginalParameters();
|
||||
pdata->fStartAngle = pars->Start_angle;
|
||||
pdata->fOpeningAngle = pars->Opening_angle;
|
||||
pdata->fNumSide = pars->numSide;
|
||||
pdata->fNumZPlanes = pars->Num_z_planes;
|
||||
for (G4int i=0; i<pdata->fNumZPlanes; ++i)
|
||||
{
|
||||
pdata->fZValues[i] = pars->Z_values[i];
|
||||
pdata->Rmin[i] = pars->Rmin[i];
|
||||
pdata->Rmax[i] = pars->Rmax[i];
|
||||
}
|
||||
fRebuildPolyhedron = true;
|
||||
}
|
||||
inline G4bool G4UPolyhedra::Reset()
|
||||
{
|
||||
return GetShape()->Reset();
|
||||
return "G4Polyhedra";
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -48,10 +48,12 @@
|
||||
|
||||
#include "G4USolid.hh"
|
||||
|
||||
#if defined(G4GEOM_USE_USOLIDS)
|
||||
#if ( defined(G4GEOM_USE_USOLIDS) || defined(G4GEOM_USE_PARTIAL_USOLIDS) )
|
||||
|
||||
#include "UTet.hh"
|
||||
|
||||
#include "G4Polyhedron.hh"
|
||||
|
||||
class G4UTet : public G4USolid
|
||||
{
|
||||
|
||||
@@ -68,6 +70,8 @@ class G4UTet : public G4USolid
|
||||
|
||||
inline UTet* GetShape() const;
|
||||
|
||||
inline G4GeometryType GetEntityType() const;
|
||||
|
||||
public: // without description
|
||||
|
||||
G4UTet(__void__&);
|
||||
@@ -79,7 +83,9 @@ class G4UTet : public G4USolid
|
||||
G4UTet& operator=(const G4UTet& rhs);
|
||||
// Copy constructor and assignment operator.
|
||||
|
||||
inline std::vector<G4ThreeVector> GetVertices() const;
|
||||
G4Polyhedron* CreatePolyhedron() const;
|
||||
|
||||
std::vector<G4ThreeVector> GetVertices() const;
|
||||
// Return the four vertices of the shape.
|
||||
};
|
||||
|
||||
@@ -92,16 +98,9 @@ inline UTet* G4UTet::GetShape() const
|
||||
return (UTet*) fShape;
|
||||
}
|
||||
|
||||
inline std::vector<G4ThreeVector> G4UTet::GetVertices() const
|
||||
inline G4GeometryType G4UTet::GetEntityType() const
|
||||
{
|
||||
std::vector<UVector3> vec = GetShape()->GetVertices();
|
||||
std::vector<G4ThreeVector> vertices;
|
||||
for (unsigned int i=0; i<vec.size(); ++i)
|
||||
{
|
||||
G4ThreeVector v(vec[i].x(), vec[i].y(), vec[i].z());
|
||||
vertices.push_back(v);
|
||||
}
|
||||
return vertices;
|
||||
return "G4Tet";
|
||||
}
|
||||
|
||||
#endif // G4GEOM_USE_USOLIDS
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VFacet.hh 66356 2012-12-18 09:02:32Z gcosmo $
|
||||
// $Id: G4VFacet.hh 95801 2016-02-25 10:59:41Z gcosmo $
|
||||
//
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
//
|
||||
@@ -81,7 +81,7 @@ class G4VFacet
|
||||
virtual G4bool Intersect (const G4ThreeVector&, const G4ThreeVector &,
|
||||
const G4bool , G4double &, G4double &,
|
||||
G4ThreeVector &) = 0;
|
||||
virtual G4double GetArea() = 0;
|
||||
virtual G4double GetArea() const = 0;
|
||||
virtual G4ThreeVector GetPointOnFace() const = 0;
|
||||
|
||||
void ApplyTranslation (const G4ThreeVector v);
|
||||
|
||||
Reference in New Issue
Block a user