Import Geant4 0.1.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: G4FConicalSurface.hh,v 2.8 1998/12/03 17:21:46 broglia Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
// $Id: G4FConicalSurface.hh,v 1.3 1999/05/19 16:54:47 magni Exp $
|
||||
// GEANT4 tag $Name: geant4-00-01 $
|
||||
//
|
||||
#ifndef __FCONIC_H
|
||||
#define __FCONIC_H
|
||||
@@ -56,56 +56,8 @@ public:
|
||||
// Add by L. Broglia
|
||||
tan_angle = (large_radius-small_radius)/length;
|
||||
}
|
||||
|
||||
G4FConicalSurface( const G4Point3D& o, const G4Vector3D& a,
|
||||
G4double l, G4double sr, G4double lr );
|
||||
|
||||
G4FConicalSurface( const G4FConicalSurface& c );
|
||||
|
||||
~G4FConicalSurface() {}
|
||||
|
||||
virtual G4Vector3D SurfaceNormal( const G4Point3D& p ) const;
|
||||
|
||||
virtual int Inside( const G4Vector3D& x ) const;
|
||||
|
||||
G4String GetEntityType(){return G4String("FConical_Surface");}
|
||||
|
||||
// STEP additions
|
||||
virtual char *Name() const { return "G4FConicalSurface"; }
|
||||
virtual void PrintOn( ostream& os = G4cout ) const;
|
||||
|
||||
int operator==( const G4FConicalSurface& c );
|
||||
|
||||
int Intersect( const G4Ray& ry ) ;
|
||||
void CalcBBox();
|
||||
|
||||
// Add by L. Broglia
|
||||
virtual G4double HowNear( const G4Vector3D& x ) const;
|
||||
|
||||
inline void Comp( G4Vector3D& v, G4Point3D& min , G4Point3D& max)
|
||||
{
|
||||
if(v.x() > max.x() ) max.setX(v.x());
|
||||
if(v.y() > max.y() ) max.setY(v.y());
|
||||
if(v.z() > max.z() ) max.setZ(v.z());
|
||||
|
||||
if(v.x() < min.x()) min.setX(v.x());
|
||||
if(v.y() < min.y()) min.setY(v.y());
|
||||
if(v.z() < min.z()) min.setZ(v.z());
|
||||
}
|
||||
|
||||
|
||||
virtual int WithinBoundary( const G4Vector3D& x ) const;
|
||||
virtual G4double Scale() const;
|
||||
virtual G4double Area() const;
|
||||
virtual void resize( G4double l, G4double sr, G4double lr );
|
||||
|
||||
G4double GetLength() const { return length; }
|
||||
G4double GetSmallRadius() const { return small_radius; }
|
||||
G4double GetLargeRadius() const { return large_radius; }
|
||||
G4double GetTan_Angle() const { return tan_angle; }
|
||||
|
||||
// Description of functions -----------------------------------------
|
||||
//
|
||||
|
||||
// constructor utilized into G4BREPSolidPCone
|
||||
// default constructor
|
||||
//----->G4FConicalSurface() : G4ConicalSurface() { length = 1.0;
|
||||
//-----> small_radius = 0.0;
|
||||
@@ -118,46 +70,89 @@ public:
|
||||
// G4FConicalSurface
|
||||
// fifth argument is the large radius of the
|
||||
// G4FConicalSurface
|
||||
//----->G4FConicalSurface( const G4ThreeVec& o, const G4ThreeVec& a,
|
||||
//-----> G4double l, G4double sr, G4double lr );
|
||||
//
|
||||
// destructor
|
||||
//----->virtual ~G4FConicalSurface() {}
|
||||
//
|
||||
// copy constructor
|
||||
//----->G4FConicalSurface( const G4FConicalSurface& c );
|
||||
|
||||
G4FConicalSurface( const G4Point3D& o, const G4Vector3D& a,
|
||||
G4double l, G4double sr, G4double lr );
|
||||
|
||||
G4FConicalSurface( const G4FConicalSurface& c );
|
||||
|
||||
~G4FConicalSurface() {}
|
||||
|
||||
virtual G4Vector3D SurfaceNormal( const G4Point3D& p ) const;
|
||||
|
||||
// Return 0 if point x is outside G4ConicalSurface, 1 if Inside.
|
||||
virtual int Inside( const G4Vector3D& x ) const;
|
||||
|
||||
G4String GetEntityType(){return G4String("FConical_Surface");}
|
||||
|
||||
// STEP additions
|
||||
//
|
||||
// function to return class name
|
||||
//----->virtual char *NameOf() const { return "G4FConicalSurface"; }
|
||||
//
|
||||
virtual char *Name() const { return "G4FConicalSurface"; }
|
||||
// printing function
|
||||
//----->virtual void PrintOn( ostream& os = G4cout ) const;
|
||||
//
|
||||
virtual void PrintOn( ostream& os = G4cout ) const;
|
||||
|
||||
// equality operator
|
||||
//----->int operator==( const G4FConicalSurface& c );
|
||||
//
|
||||
int operator==( const G4FConicalSurface& c );
|
||||
|
||||
// This function count the number of intersections of a
|
||||
// bounded conical surface by a ray.
|
||||
// At first, calculates the intersections with the semi-infinite
|
||||
// conical surfsace. After, count the intersections within the
|
||||
// finite conical surface boundaries, and set "distance" to the
|
||||
// closest distance from the start point to the nearest intersection
|
||||
// If the point is on the surface it returns or the intersection with
|
||||
// the opposite surface or kInfinity
|
||||
// If no intersection is founded, set distance = kInfinity and
|
||||
// return 0
|
||||
|
||||
int Intersect( const G4Ray& ry ) ;
|
||||
void CalcBBox();
|
||||
|
||||
// Add by L. Broglia
|
||||
|
||||
// Shortest distance from the point x to the G4FConicalSurface.
|
||||
// The distance will be positive always positive
|
||||
|
||||
virtual G4double HowNear( const G4Vector3D& x ) const;
|
||||
|
||||
// function which returns true (1) if the point x is within the boundary
|
||||
// returns false (0) otherwise
|
||||
//----->virtual int WithinBoundary( const G4ThreeVec& x ) const;
|
||||
//
|
||||
|
||||
virtual int WithinBoundary( const G4Vector3D& x ) const;
|
||||
|
||||
// function to return the size of a G4FConicalSurface.
|
||||
// Used for Scale-invariant tests of surface thickness.
|
||||
// If the small radius is zero, returns the large radius.
|
||||
//----->virtual G4double Scale() const;
|
||||
//
|
||||
|
||||
virtual G4double Scale() const;
|
||||
|
||||
// function to calculate the Area of a G4FConicalSurface
|
||||
//----->virtual G4double Area() const;
|
||||
//
|
||||
virtual G4double Area() const;
|
||||
|
||||
// function to change the radii and length of the G4FConicalSurface
|
||||
// the first (input) argument is the new length
|
||||
// the second (input) argument is the new small radius
|
||||
// the third (input) argument is the new large radius
|
||||
//----->virtual void resize( G4double l, G4double sr, G4double lr );
|
||||
//
|
||||
|
||||
virtual void resize( G4double l, G4double sr, G4double lr );
|
||||
|
||||
// functions to return the dimensions of the G4FConicalSurface
|
||||
//----->G4double GetLength() const { return length; }
|
||||
//----->G4double GetSmallRadius() const { return small_radius; }
|
||||
//----->G4double GetLargeRadius() const { return large_radius; }
|
||||
|
||||
G4double GetLength() const { return length; }
|
||||
|
||||
// functions to return the dimensions of the G4FConicalSurface
|
||||
|
||||
G4double GetSmallRadius() const { return small_radius; }
|
||||
|
||||
// functions to return the dimensions of the G4FConicalSurface
|
||||
|
||||
G4double GetLargeRadius() const { return large_radius; }
|
||||
|
||||
// functions to return the dimensions of the G4FConicalSurface
|
||||
|
||||
G4double GetTan_Angle() const { return tan_angle; }
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user