#include <ISpectrum.h>
Public Member Functions | |
| virtual const char * | particleName () const=0 |
| particle name that must be known to the particle service | |
| virtual double | flux (double time) const=0 |
| calculate the flux, particles/m^2/sr. | |
| virtual double | solidAngle () const |
| return effective solid angle that will be used to determine the actual rate. | |
| virtual std::string | title () const=0 |
| return a title describing the spectrum | |
| virtual double | interval (double time)=0 |
| virtual double | energy (double time=0)=0 |
| return energy, either GeV or MeV | |
| virtual std::pair< double, double > | dir (double energy)=0 |
| return direction in a pair: | |
Class for holding function definitions of Spectrums... an abstract base class.
Notes: The input variable "time" means the time when the event is called - that is, when the function flux(time1) gets called, what should be returned is the flux (c/s/m^2/sr) for the source at that time (time1), and/or when interval(time1) gets called, it is asking for the interval between time1 and the time when the next particle arrives.
However, using these finctions is tricky, since they seem to contradict each other (i.e. "what happens if the flux at a certain time is really low, but the interval to the next particle is really short?") The answer lies in understanding which figure the FluxSvc code will use to find the next particle, and it works this way:
1. FluxSvc will first call interval(time1) to find out when the next particle comes. if this is a "good" (nonnegative) number, then this will be the time when the next particle is understood to arrive. If this is instead a negative number (say -1), then the process will go to step 2:
2. FluxSvc will then call flux(time1) to determine the average flux for that time, and then calculate the arrival time for the next particle using the poisson distribution, as well as the solid angle of the source (since flux is in units of c/s/m^2/sr.)
So, if interval(time) is set up to already know when the next particle will arrive (this is necessary for sources with a high time-variance), then FluxSvc will just use it, and otherwise, flux(time) will be used to calculate the next time.
Definition at line 49 of file ISpectrum.h.
|
|
return direction in a pair:
|
|
|
return energy, either GeV or MeV
|
|
|
calculate the flux, particles/m^2/sr. (default zero)
|
|
|
a (randomized) interval to the next event.
|
|
|
particle name that must be known to the particle service
|
|
|
return effective solid angle that will be used to determine the actual rate. If the source declared in the xml file is using the "use_spectrum" tag, telling FluxSvc to use all the directional information from the class itself, then the solid_angle function really only tells FluxSvc what angular area the flux is over, so that it can calculate a rate. Definition at line 68 of file ISpectrum.h.
00068 {return 1.0;} //flag that doesen't calculate.
|
|
|
return a title describing the spectrum
|
1.3.3