00001 // $Header: /nfs/slac/g/glast/ground/cvs/FluxSvc/src/GalElSpectrum.h,v 1.7 2002/07/25 05:18:58 srobinsn Exp $ 00002 // Original author: P. L. Nolan, pln@egret1.Stanford.EDU 00003 00004 /* 00005 Notation: probably one of those things is called "flux" and the other 00006 is something else. Can someone look it up? 00007 */ 00008 00009 #ifndef GAL_EL_SPECTRUM_H 00010 #define GAL_EL_SPECTRUM_H 00011 00038 #include "Spectrum.h" 00039 #include "CHIMESpectrum.h" 00040 #include "facilities/Observer.h" 00041 #include <string> 00042 00043 class GalElSpectrum : public Spectrum 00044 { 00045 00046 public: 00048 GalElSpectrum(const std::string& params); 00049 virtual ~GalElSpectrum(); 00050 00051 virtual double calculate_rate(double old_rate); 00052 00054 virtual double flux(double) const; 00055 00057 virtual double solidAngle()const; 00058 00060 float flux(float cut) const; 00061 00062 virtual float flux(float lat, float lon) const; 00063 virtual float flux(std::pair<double, double> coords) const; 00064 00065 virtual float operator() (float)const; 00066 00067 float cutoff () const {return m_cutoff;}; 00068 00069 virtual void setPosition(float lat, float lon); 00070 virtual void setPosition(std::pair<double,double> coords); 00071 00073 int askGPS(); 00074 00076 float findCutoff(float rflux) const; 00077 00079 float findCutoff(float lat, float lon) const; 00080 float findCutoff(std::pair<double,double> coords) const; 00081 00083 virtual std::pair<float,float> dir(float energy)const; 00084 00085 00086 virtual std::string title() const; 00087 virtual const char * particleName() const; 00088 inline const char * nameOf() const {return "GalElSpectrum";} 00089 // use default destructor, copy constructor, and assignment op. 00090 00092 void setParticleName(std::string name); 00093 00094 private: 00095 CHIMESpectrum m_pspec; 00096 void init(float lat, float lon); 00097 float m_expo; // exponent of power-law spectrum (integral) 00098 float m_norm; 00099 float m_normfact; // fraction of sky not blocked by earth 00100 float m_cutoff; // current cutoff energy 00101 float m_coscutoff; // zenith angle of horizon 00102 float m_flux; // current flux (set when cutoff changes) 00103 00104 static const float m_rearth; // radius of earth in km 00105 static const float m_altitude; // altitude of circular orbit 00106 00107 std::string m_particle_name; 00108 ObserverAdapter< GalElSpectrum > m_observer; //obsever tag 00109 }; 00110 00111 #endif // GAL_EL_SPECTRUM_H 00112
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001