Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

GalElSpectrum.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/flux/flux/GalElSpectrum.h,v 1.6 2001/10/18 03:30:16 srobinsn Exp $
00002 // Original author: P. L. Nolan, pln@egret1.Stanford.EDU
00003 //
00006 /*! The spectrum is the power law found in Barwick et al., ApJ 498, 779 (1998).
00007     The low-energy rollover is ignored.
00008     Also ignored are the east-west effect and the gradual nature of the
00009     geomagnetic cutoff.  The power law is cut off sharply at the cutoff
00010     energy and directions are isotropic above the  horizon.
00011     The cutoff energy is obtained by querying a CHIMESpectrum object and
00012     adjusting for the smaller mass of the electron.  (Actually the electron
00013     mass is assumed to be zero.)
00014 
00015     As with CHIMESpectrum, the flux normalization is handled in a screwy
00016     way.  We should come up with a better way to handle this.
00017     The value returned is in electrons/(m^2 sec ster), as if it was
00018     isotropic.  This value is obtained by taking the observed isotropic
00019     flux and multiplying by a correction factor for the fraction of the
00020     sky blocked by the earth.  Thus the total integrated flux in
00021     electrons/(m^2 sec) can be obtained by multiplying by 4*pi.
00022     */
00023 /*
00024     Notation: probably one of those things is called "flux" and the other
00025     is something else.  Can someone look it up?
00026 */
00027 // P. L. Nolan, April 1999
00028 
00029 #ifndef GAL_EL_SPECTRUM_H
00030 #define GAL_EL_SPECTRUM_H
00031 
00032 
00033 #include "flux/Spectrum.h"
00034 #include "flux/CHIMESpectrum.h"
00035 #include "facilities/Observer.h"
00036 #include <string>
00037 
00038 class GalElSpectrum : public Spectrum
00039 {
00040   
00041  public:
00043     GalElSpectrum(const std::string& params);
00044     virtual ~GalElSpectrum();
00045 
00046     virtual double calculate_rate(double old_rate);
00047 
00049     virtual double flux() const;
00050     
00052     virtual double solidAngle()const;
00053 
00055     float flux(float cut) const;
00056  
00057     virtual float flux(float lat, float lon) const;
00058     virtual float flux(std::pair<double, double> coords) const;
00059 
00060     virtual float operator() (float)const;
00061 
00062     float cutoff () const {return m_cutoff;};
00063 
00064     virtual void setPosition(float lat, float lon);
00065     virtual void setPosition(std::pair<double,double> coords);
00066  
00068     int askGPS();
00069 
00071     float findCutoff(float rflux) const;
00072 
00074     float findCutoff(float lat, float lon) const;
00075     float findCutoff(std::pair<double,double> coords) const;
00076 
00078     virtual std::pair<float,float> dir(float energy)const;
00079 
00080 
00081     virtual std::string title() const;
00082     virtual const char * particleName() const;
00083     inline  const char * nameOf() const {return "GalElSpectrum";}
00084     //   use default destructor, copy constructor, and assignment op.
00085 
00087     void setParticleName(std::string name);
00088  
00089  private:
00090     CHIMESpectrum m_pspec;
00091     void init(float lat, float lon);
00092     float m_expo;   // exponent of power-law spectrum (integral)
00093     float m_norm;
00094     float m_normfact; // fraction of sky not blocked by earth
00095     float m_cutoff; // current cutoff energy
00096     float m_coscutoff;  // zenith angle of horizon
00097     float m_flux;   // current flux (set when cutoff changes)
00098 
00099     static const float m_rearth;    // radius of earth in km
00100     static const float m_altitude;  // altitude of circular orbit
00101 
00102     std::string m_particle_name;
00103     ObserverAdapter< GalElSpectrum > m_observer; //obsever tag
00104 };
00105 
00106 #endif // GAL_EL_SPECTRUM_H
00107 

Generated at Wed Nov 21 12:20:34 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000