Main Page   Namespace List   Compound List   File List   Compound Members   File Members  

SkyDir.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/astro/astro/SkyDir.h,v 1.2 2002/08/13 10:01:16 srobinsn Exp $
00002 #ifndef OrbitModel_SkyDir_H
00003 #define OrbitModel_SkyDir_H
00004 
00005 
00006 // Include files
00007 #include "CLHEP/Vector/Rotation.h"
00008 #include "CLHEP/Vector/ThreeVector.h"
00009 
00010 namespace astro {
00011     
00012     
00019     class SkyDir
00020     {
00021     public:
00022         enum CoordSystem { 
00023             GALACTIC,  
00024                 CELESTIAL 
00025         };
00028         SkyDir(double param1=0, double param2=0, CoordSystem inputType = CELESTIAL);
00029         SkyDir(Hep3Vector);
00030         
00032         Hep3Vector& operator () () {return m_dir;}
00033         double l () const;
00034         double b () const;
00035         double ra () const;
00036         double dec () const;
00037         const Hep3Vector& dir () const {return m_dir;}
00038         
00040         double SkyDir::difference(const SkyDir& other)const;
00041         
00042     private:
00043         static HepRotation s_celestialToGalactic;
00044         
00045         Hep3Vector m_dir;
00046         std::pair<double,double> setGalCoordsFromDir() const;
00047         
00048     };
00049     
00050     inline double SkyDir::difference(const SkyDir& other)const{
00051         return 2.*asin(0.5*(m_dir-other.dir()).mag());
00052     }
00053     
00054 } // namespace astro
00055 #endif    // LHCBEVENT_SKYDIR_H

Generated on Wed Aug 14 10:09:35 2002 for astro by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001