00001
00002
00003
00006
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
00025
00026
00027
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
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;
00093 float m_norm;
00094 float m_normfact;
00095 float m_cutoff;
00096 float m_coscutoff;
00097 float m_flux;
00098
00099 static const float m_rearth;
00100 static const float m_altitude;
00101
00102 std::string m_particle_name;
00103 ObserverAdapter< GalElSpectrum > m_observer;
00104 };
00105
00106 #endif // GAL_EL_SPECTRUM_H
00107