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

SimpleSpectrum.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/FluxSvc/src/SimpleSpectrum.h,v 1.4 2002/07/23 19:00:57 srobinsn Exp $
00002 #ifndef SIMPLESPECTRUM_H
00003 #define SIMPLESPECTRUM_H
00004 
00013 #include "Spectrum.h"
00014 #include <string>
00015 
00016 class DOM_Element;
00017 
00018 
00019 
00020 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00023 
00024 class SimpleSpectrum : public Spectrum {
00025 public: 
00026     SimpleSpectrum(const char* name,float E0, float index=0.0);
00027     SimpleSpectrum(const char* name,float Emin, float Emax, float index);
00028     SimpleSpectrum(const DOM_Element& xelem);
00029     SimpleSpectrum(const std::string& params);
00030     
00031     SimpleSpectrum();
00032     void setPosition ( float /*lat*/, float /*lon*/ ){}
00033     virtual double calculate_rate(double old_rate);
00034     virtual float  operator()(float f)const;
00035     virtual const char* particleName()const;
00036     virtual std::string title()const;
00037 private:
00038     float parseParamList(std::string input, int index);
00039     float m_E0;         // energy base
00040     std::string m_name; // particle name to generate ("P", "gamma", ...)
00041     float m_index;      // spectral index: <=1 is delta function at E0
00042     float m_emax;
00043 };
00044 
00045 #endif

Generated on Wed Oct 16 14:01:31 2002 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001