Import Geant4 3.0.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4PolyPhiFace.hh,v 1.1 2000/04/07 10:56:52 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-02-00 $
|
||||
// $Id: G4PolyPhiFace.hh,v 1.3 2000/11/02 16:54:48 gcosmo Exp $
|
||||
// GEANT4 tag $Name: geant4-03-00 $
|
||||
//
|
||||
//
|
||||
// --------------------------------------------------------------------
|
||||
@@ -18,13 +18,20 @@
|
||||
// Class description:
|
||||
//
|
||||
// Definition of a face that bounds a polycone or polyhedra when
|
||||
// it has a phi opening.
|
||||
// it has a phi opening:
|
||||
//
|
||||
// G4PolyPhiFace( const G4ReduciblePolygon *rz,
|
||||
// G4double phi,
|
||||
// G4double deltaPhi,
|
||||
// G4double phiOther )
|
||||
//
|
||||
// Specifically: a face that lies on a plane that passes through
|
||||
// the z axis. It has boundaries that are straight lines of arbitrary
|
||||
// length and direction, but with corners aways on the same side of
|
||||
// the z axis.
|
||||
|
||||
// Author:
|
||||
// David C. Williams (davidw@scipp.ucsc.edu)
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
#ifndef G4PolyPhiFace_hh
|
||||
@@ -48,24 +55,36 @@ typedef struct {
|
||||
G4ThreeVector norm3D; // 3D edge normal vector
|
||||
} G4PolyPhiFaceEdge;
|
||||
|
||||
class G4PolyPhiFace : public G4VCSGface {
|
||||
class G4PolyPhiFace : public G4VCSGface
|
||||
{
|
||||
|
||||
public:
|
||||
G4PolyPhiFace( const G4ReduciblePolygon *rz,
|
||||
const G4double phi, const G4double deltaPhi, const G4double phiOther );
|
||||
virtual ~G4PolyPhiFace();
|
||||
public: // with description
|
||||
|
||||
G4PolyPhiFace( const G4ReduciblePolygon *rz,
|
||||
G4double phi, G4double deltaPhi, G4double phiOther );
|
||||
// Constructor.
|
||||
// Points r,z should be supplied in clockwise order in r,z.
|
||||
// For example:
|
||||
// [1]---------[2] ^ R
|
||||
// | | |
|
||||
// | | +--> z
|
||||
// [0]---------[3]
|
||||
|
||||
virtual ~G4PolyPhiFace();
|
||||
// Destructor. Removes edges and corners.
|
||||
|
||||
G4PolyPhiFace( const G4PolyPhiFace &source );
|
||||
G4PolyPhiFace *operator=( const G4PolyPhiFace &source );
|
||||
|
||||
G4PolyPhiFace& operator=( const G4PolyPhiFace &source );
|
||||
// Copy constructor and assgnment operator.
|
||||
|
||||
G4bool Intersect( const G4ThreeVector &p, const G4ThreeVector &v,
|
||||
const G4bool outgoing, const G4double surfTolerance,
|
||||
G4bool outgoing, G4double surfTolerance,
|
||||
G4double &distance, G4double &distFromSurface,
|
||||
G4ThreeVector &normal, G4bool &allBehind );
|
||||
|
||||
G4double Distance( const G4ThreeVector &p, const G4bool outgoing );
|
||||
G4double Distance( const G4ThreeVector &p, G4bool outgoing );
|
||||
|
||||
EInside Inside( const G4ThreeVector &p, const G4double tolerance,
|
||||
EInside Inside( const G4ThreeVector &p, G4double tolerance,
|
||||
G4double *bestDistance );
|
||||
|
||||
G4ThreeVector Normal( const G4ThreeVector &p, G4double *bestDistance );
|
||||
@@ -77,34 +96,47 @@ class G4PolyPhiFace : public G4VCSGface {
|
||||
const G4AffineTransform &tranform,
|
||||
G4SolidExtentList &extentList );
|
||||
|
||||
G4VCSGface *Clone() { return new G4PolyPhiFace(*this); }
|
||||
|
||||
void Diagnose( G4VSolid *solid );
|
||||
|
||||
protected:
|
||||
G4PolyPhiFaceEdge *edges; // The edges of the face
|
||||
G4PolyPhiFaceVertex *corners; // And the corners
|
||||
G4int numEdges; // Number of edges
|
||||
G4ThreeVector normal; // Normal unit vector
|
||||
G4ThreeVector radial; // Unit vector along radial direction
|
||||
G4ThreeVector surface; // Point on surface
|
||||
G4double rMin, rMax, // Extent in r
|
||||
zMin, zMax; // Extent in z
|
||||
G4bool allBehind; // True if the entire polycone/polyhedra is behind the place
|
||||
// of this face
|
||||
|
||||
G4bool InsideEdgesExact( const G4double r, const G4double z,
|
||||
const G4double normSign, const G4ThreeVector &p, const G4ThreeVector &v );
|
||||
G4bool InsideEdges( const G4double r, const G4double z );
|
||||
G4bool InsideEdges( const G4double r, const G4double z,
|
||||
G4double *distRZ2, G4PolyPhiFaceVertex **base3Dnorm=0,
|
||||
G4ThreeVector **head3Dnorm=0 );
|
||||
inline G4VCSGface *Clone();
|
||||
// Allocates on the heap a clone of this face.
|
||||
|
||||
inline G4double ExactZOrder( const G4double z,
|
||||
const G4double qx, const G4double qy, const G4double qz,
|
||||
public: // without description
|
||||
|
||||
void Diagnose( G4VSolid *solid );
|
||||
// Throw an exception if something is found inconsistent with
|
||||
// the solid. For debugging purposes only
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
G4PolyPhiFaceEdge *edges; // The edges of the face
|
||||
G4PolyPhiFaceVertex *corners; // And the corners
|
||||
G4int numEdges; // Number of edges
|
||||
G4ThreeVector normal; // Normal unit vector
|
||||
G4ThreeVector radial; // Unit vector along radial direction
|
||||
G4ThreeVector surface; // Point on surface
|
||||
G4double rMin, rMax, // Extent in r
|
||||
zMin, zMax; // Extent in z
|
||||
G4bool allBehind; // True if the polycone/polyhedra
|
||||
// is behind the place of this face
|
||||
|
||||
G4bool InsideEdgesExact( G4double r, G4double z, G4double normSign,
|
||||
const G4ThreeVector &p, const G4ThreeVector &v );
|
||||
// Decide if the point in r,z is inside the edges of our face,
|
||||
// **but** do so consistently with other faces.
|
||||
|
||||
G4bool InsideEdges( G4double r, G4double z );
|
||||
G4bool InsideEdges( G4double r, G4double z, G4double *distRZ2,
|
||||
G4PolyPhiFaceVertex **base3Dnorm=0,
|
||||
G4ThreeVector **head3Dnorm=0 );
|
||||
// Decide if the point in r,z is inside the edges of our face.
|
||||
|
||||
inline G4double ExactZOrder( G4double z,
|
||||
G4double qx, G4double qy, G4double qz,
|
||||
const G4ThreeVector &v,
|
||||
const G4double normSign,
|
||||
G4double normSign,
|
||||
const G4PolyPhiFaceVertex *vert ) const;
|
||||
// Decide precisely whether a trajectory passes to the left, right,
|
||||
// or exactly passes through the z position of a vertex point in face.
|
||||
|
||||
void CopyStuff( const G4PolyPhiFace &source );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user