00001
00002 #ifndef OrbitModel_SkyDir_H
00003 #define OrbitModel_SkyDir_H
00004
00005
00006
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 }
00055 #endif // LHCBEVENT_SKYDIR_H