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

GRBSpectrum Class Reference

Main interface to FluxSvc for the physical model This class inherits from ISpectrum, and allows to pass the result of GRB physical model simulation to the GLAST simulation framework. More...

#include <GRBSpectrum.h>

List of all members.

Public Methods

 GRBSpectrum (const std::string &params)
virtual ~GRBSpectrum ()
double flux (double time) const
double interval (double time)
 Returns the time interval. More...

std::pair< double, double > dir (double, HepRandomEngine *)
 Galactic direction.

float operator() (float u) const
 Draws from the current spectrum the energy of a sampled photon. More...

double energySrc (HepRandomEngine *engine, double time)
 returns the energy of a sampled photon. More...

std::string title () const
const char * particleName () const
const char * nameOf () const

Friends

class GRBmanager


Detailed Description

Main interface to FluxSvc for the physical model This class inherits from ISpectrum, and allows to pass the result of GRB physical model simulation to the GLAST simulation framework.

Author:
Nicola Omodei nicola.omodei@pi.infn.it , Johann Cohen-Tanugi johann.cohen@pi.infn.it


Constructor & Destructor Documentation

GRBSpectrum::GRBSpectrum const std::string &    params
 

This initializes the simulation parsing the parameters.

Parameters:
params  are set in the xml source library in xml directory. It contains the name of the file in which the seed is read. The seed is necessary to initialize the random number generator. Saving the seed in an external file it is possible to reproduce a particular GRB or increase the seed each time a simulation is running.
An example the xml source declaration for this spectrum should appears:
    <source name=" GRBspectrum_Gal">
    <spectrum  escale="GeV"> <SpectrumClass name="GRBSpectrum" params="temp.txt"/>
    <!--This will live the direction free-->
    <use_spectrum frame="galaxy"/>
    </spectrum> </source>
    


Member Function Documentation

double GRBSpectrum::energySrc HepRandomEngine *    engine,
double    time
 

returns the energy of a sampled photon.

Method called by FluxSource::event(). It returns the energy of a sampled photon, by calling the operator() method.

Parameters:
engine  random engine for uniform sampling;
time  current time.

double GRBSpectrum::flux double    time const
 

Computes the flux, in photons/m^2/s, for a given time time is actually not used because the spectrum is already updated.

double GRBSpectrum::interval double    time
 

Returns the time interval.

Given , it computes for which and returns the time interval

float GRBSpectrum::operator() float    u const
 

Draws from the current spectrum the energy of a sampled photon.

Parameters:
u  uniform random number drawn in the method energySrc .


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 11:43:33 2003 by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001