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

SimpleSpectrum.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/flux/flux/SimpleSpectrum.h,v 1.9 2001/10/20 07:20:35 srobinsn Exp $
00002 //
00003 //
00004 // Spectrum: base class for energy spectrum objects
00005 // SimpleSpectrum: define a particle and spectral index
00006 //
00007 
00008 #ifndef SIMPLESPECTRUM_H
00009 #define SIMPLESPECTRUM_H
00010 #include "flux/Spectrum.h"
00011 #include <string>
00012 
00013 class DOM_Element;
00014 
00015 
00016 
00017 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00020 
00021 class SimpleSpectrum : public Spectrum {
00022 public: 
00023     SimpleSpectrum(const char* name,float E0, float index=0.0);
00024     SimpleSpectrum(const char* name,float Emin, float Emax, float index);
00025     SimpleSpectrum(const DOM_Element& xelem);
00026         SimpleSpectrum(const std::string& params);
00027 
00028     SimpleSpectrum();
00029     void setPosition ( float /*lat*/, float /*lon*/ ){}
00030     virtual double calculate_rate(double old_rate);
00031     virtual float  operator()(float f)const;
00032     virtual const char* particleName()const;
00033     virtual std::string title()const;
00034 private:
00035     float parseParamList(std::string input, int index);
00036     float m_E0;         // energy base
00037     std::string m_name; // particle name to generate ("P", "gamma", ...)
00038     float m_index;      // spectral index: <=1 is delta function at E0
00039     float m_emax;
00040 };
00041 
00042 #endif

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