Import Geant4 3.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:55:53 +02:00
parent e7d7193284
commit cfcb558cfe
3050 changed files with 91703 additions and 48310 deletions
@@ -5,16 +5,21 @@
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4PointRat.hh,v 1.6 2000/02/25 15:59:16 gcosmo Exp $
// GEANT4 tag $Name: geant4-02-00 $
// $Id: G4PointRat.hh,v 1.8 2000/08/28 15:00:34 gcosmo Exp $
// GEANT4 tag $Name: geant4-03-00 $
//
// ----------------------------------------------------------------------
// Class G4PointRat
//
// Modif 8 oct 98 : A.Floquet
// G4PointRat datas are made of
// . a point 3D
// . a additional value : the scale factor which is set to 1 by default
// Class description:
//
// A G4PointRat object is composed of:
// - a point in 3D space (G4Point3D)
// - a scale factor (set to 1 by default)
// Authors: J.Sulkimo, P.Urban.
// Revisions by: A.Floquet, L.Broglia, G.Cosmo.
// ----------------------------------------------------------------------
#ifndef __G4POINT_RAT
#define __G4POINT_RAT
@@ -23,98 +28,54 @@
#include "G4Point3D.hh"
#include "G4Plane3D.hh"
// L. Broglia
// Before included in G4Point.hh
#include "G4Plane.hh"
#define SQRT_SMALL_FASTF 1.0e-18
#define SMALL SQRT_SMALL_FASTF
#define ROW 0
#define COL 1
// const G4double INFINITY = 9.0e+99;
const G4Point3D PINFINITY(kInfinity, kInfinity, kInfinity);
#define SMALL SQRT_SMALL_FASTF
#define ROW 0
#define COL 1
class G4Plane;
const G4Point3D PINFINITY(kInfinity, kInfinity, kInfinity);
class G4PointRat
{
public:
public: // with description
G4PointRat();
~G4PointRat();
// Constructor & destructor.
G4PointRat(const G4Point3D&);
// Copy constructor.
~G4PointRat();
G4PointRat& operator=(const G4Point3D&);
G4PointRat& operator=(const G4PointRat&);
// Overloaded assignment operators.
int GetType(void)const { return 4; } // This function should be removed
// if calls to this are also removed
void operator=(const G4Point3D&);
inline G4double x() const;
inline void setX (G4double Value);
inline G4double y() const;
inline void setY (G4double Value);
inline G4double z() const;
inline void setZ (G4double Value);
inline G4double w() const;
inline void setW(G4double Value);
inline G4Point3D pt() const;
// Get/Set methods for attributes.
void operator=(const G4PointRat&);
inline G4double PlaneDistance(const G4Plane3D& Pl) const;
// Returns distance from a given plane.
inline G4double x() const {return pt3d.x();}
public: // without description
inline void setX (const G4double Value) { pt3d.setX ( Value );}
G4int GetType(void) const; // This function should be removed
// if calls to this are also removed
inline G4double y() const {return pt3d.y();}
inline void setY (const G4double Value) { pt3d.setY ( Value );}
inline G4double z() const {return pt3d.z();}
inline void setZ (const G4double Value) { pt3d.setZ ( Value );}
inline G4double w() const {return s;}
inline void setW(const G4double Value) {s=Value;}
inline G4Point3D pt() const { return pt3d; }
inline G4double PlaneDistance(const G4Plane3D& Pl)
{
return ((Pl.a()*pt3d.x() + Pl.b()*pt3d.y() + Pl.c()*pt3d.z()) - Pl.d());
}
private:
G4Point3D pt3d;
G4double s;
public :
// L. Broglia
/*
inline G4Point3D Min(const G4Point3D& p)
{
if(pt3d.x() < p.x()) pt3d.setX(p.x());
if(pt3d.y() < p.y()) pt3d.setY(p.y());
if(pt3d.z() < p.z()) pt3d.setZ(p.z());
}
inline G4Point3D Max(const G4Point3D& p)
{
if(pt3d.x() > p.x()) pt3d.setX(p.x());
if(pt3d.y() > p.y()) pt3d.setY(p.y());
if(pt3d.z() > p.z()) pt3d.setZ(p.z());
}
*/
/*
inline G4Point3D Min(const G4Vector3D& v)
{
if(pt3d.x() < v.x()) pt3d.setX(v.x());
if(pt3d.y() < v.y()) pt3d.setY(v.y());
if(pt3d.z() < v.z()) pt3d.setZ(v.z());
}
inline G4Point3D Max(const G4Vector3D& v)
{
if(pt3d.x() > v.x()) pt3d.setX(v.x());
if(pt3d.y() > v.y()) pt3d.setY(v.y());
if(pt3d.z() > v.z()) pt3d.setZ(v.z());
}
*/
};
#endif
#include "G4PointRat.icc"
#endif