#include <GRBSim.h>
Public Methods | |
| GRBSim (long seed=0) | |
| The simulation can be initialized by setting the seed of the Random engine generator. If seed is 0, a Random GRB is computed. | |
| GRBSim (const std::string ¶ms) | |
| ~GRBSim () | |
| destructor. | |
| void | MakeGRB (double time_offset=0.) |
| Starts the GRB simulation. More... | |
| std::vector< double > | ComputeFlux (const double time) |
| void | setSpectrum (std::vector< double > myspectrum) |
| Sets the private data member m_spectrum to myspectrum. | |
| std::pair< float, float > | GRBdir () |
| The direction of the GRB is chosen randomly in the sky. | |
| std::vector< double > | Spectrum () |
Returns a vector contains the flux
in
. | |
| std::vector< double > | Energy () |
| std::vector< double > | DeltaE () |
Is the energy bin size in
(the energy is in log scale!). | |
| double | Tmax () |
| Corresponds to the time (in the GLAST frame) in which the burst ends. | |
| double | Area () |
| double | Flux (int en) |
Returns the value of the flux (
). | |
| double | Energy (int en) |
| Return the en energy bin. | |
| double | IFlux (std::vector< double > spctrmVec, double enmin=cst::enmin, double enmax=cst::enmax) |
Return the integrated flux (
for energy greather than en. More... | |
| double | IRate (std::vector< double > spctrmVec, double enmin=cst::enmin, double enmax=cst::enmax) |
Return the integrated photon rate (
) for energy greather than enmin. More... | |
| double | DrawPhotonFromSpectrum (std::vector< double > spctrmVec, float u=0.0, double enmin=cst::enmin) |
| returns a photon energy sampled from the current spectrum vector. More... | |
| double | EnergyPh () |
| long | parseParamList (std::string input, int index) |
Public Attributes | |
| GRBConstants * | myParam |
| Gathers all relevant constants for the simulation. | |
This class initializes the simulation generating shells with random Lorentz factors and stacks the shells in a vector. The evolution with the time is evaluated for all the shells and when two shells have the same radius they collide, and a GRBShock is created. All the shocks are staked in a vector. For each shock is evaluated the observed time at which it occurs. This time is used to sort the vector. GRBsim compute the spectrum at a given time and returns it in a vector. This class returns the energy of a photon (chosen from the spectrum), the flux and the rate.
|
|
Is the Area of sphere having as radius the distance of the source (in |
|
|
Compute the Flux, at given time. It returns a vector.
|
|
||||||||||||||||
|
returns a photon energy sampled from the current spectrum vector.
This is essentially a copycat from the ROOT TH1::GetRandom() method.
|
|
|
Is the vector that contains the energy bin,in |
|
|
Return the minimum energy for the photon drawn |
|
||||||||||||||||
|
Return the integrated flux ( It calculates the following integral:
|
|
||||||||||||||||
|
Return the integrated photon rate ( It calculates the following integral:
|
|
|
Starts the GRB simulation.
Initialize the simulation |
|
||||||||||||
|
Parse the parameter list. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001