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

TimeCandle.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/FluxSvc/src/TimeCandle.h,v 1.2 2002/08/29 02:13:10 srobinsn Exp $
00002 #ifndef TimeCandle_H
00003 #define TimeCandle_H
00004 
00013 #include "Spectrum.h"
00014 #include <string>
00015 
00016 class DOM_Element;
00017 
00018 
00019 
00020 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
00022 
00023 class TimeCandle : public Spectrum {
00024 public: 
00025     TimeCandle(const std::string& params);
00026     
00027     TimeCandle();
00028     //void setPosition ( float /*lat*/, float /*lon*/ ){}
00029     //virtual double calculate_rate(double old_rate);
00030     virtual float  operator()(float f)const;
00031     virtual const char* particleName()const;
00032     virtual std::string title()const;
00033         
00034     virtual std::pair<float,float> dir(float)const{
00035         return std::make_pair<float,float>(1.0,0.0);
00036     }     
00037     
00038     virtual std::pair<double,double> dir(double energy, HepRandomEngine* engine){return std::make_pair<double,double>(1.0,0.0);}
00039     
00040     double energySrc(HepRandomEngine* engine, double time){  return (*this)(engine->flat());}
00041     
00042     double interval (double time)
00043     {        
00044         return m_T0;
00045     }
00046 private:
00047     float parseParamList(std::string input, int index);
00048     //float m_E0;
00049     double m_T0; //how many seconds pass before each next incoming particle
00050     std::string m_name; // particle name to generate ("P", "gamma", ...)
00051     //float m_index;    // spectral index: <=1 is delta function at E0
00052     //float m_emax;
00053 };
00054 
00055 #endif

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