#ifndef __GEOMETRY_H #define __GEOMETRY_H // System Headers #include #include using namespace std; class Geometry { private: //double ; public: //! Constructor of the class. Geometry ( ); //! Destructor of the class. ~Geometry ( ); //Methods //Distance between 2 points double DistPP(double A[3], double B[3]); //Finds direction of a track from A to B void FindDir(double& theta,double& phi,double A[3], double B[3]); //Modulus of a Vector double Mod(double vec[3]); //Normalizes a vector void Norm(double versor[3], double vector[3]); //Converts zenith & azimuth to a normalized vector void Dir2Vec(double versor[3],double& thetad, double& phid); //Addiction of vectors void AddVec(double sum[3],double vec1[3], double vec2[3]); //Multiplication by scalar void MultScal(double prod[3], double vec1[3], double factor); //Scalar Product double ScalProd(double vec1[3], double vec2[3]); //Angle between two vectors double Angle2Vec(double vec1[3], double vec2[3]); //Vector Product double VecProd(double prod[3],double vec1[3], double vec2[3]); //Defines a track void Track(double track[6],double A[3], double vec[3]); //Intersection of tracks void IntTrack(double A[3], double tr1[6], double tr2[6]); //Distance of a point to a track double DistPT(double P[3], double track[6]); //Find plane (from 3 points) void Plane(double plane[9], double A[3],double B[3], double C[3]); //Intersection of Track and Plane void IntTrPl(double A[3], double track[6], double plane[9]); //Definition of a Sphere void Sphere(double sphere[4],double O[3], double& radius); //Intersection of Track and Sphere void IntTrSph(double track[6],double sphere[4]); }; #endif // __GEOMETRY