|
int | GenerateAstroParticles (const int aN, const ULong64_t aTime, const UInt_t aDuration) |
| Generates N astro-particles from this source. More...
|
|
double | GetAstroEnergy (void) |
| Returns the energy [keV] for the current astro-particle. More...
|
|
double | GetAstroPhip (void) |
| Returns \(\varphi'\) for the current astro-particle. More...
|
|
double | GetAstroThetap (void) |
| Returns \(\cos\theta'\) for the current astro-particle. More...
|
|
ULong64_t | GetAstroTime (void) |
| Returns the time for the current astro-particle. More...
|
|
string | GetName (void) |
| Returns the source name. More...
|
|
double | GetPhiPrime (const ULong64_t aTime) |
| Returns the source \(\varphi'_{S}\) angle [rad] at a given time. More...
|
|
double | GetThetaPrime (const ULong64_t aTime) |
| Returns the source \(\theta'_{S}\) angle [rad] at a given time. More...
|
|
int | GetType (void) |
| Returns the source type. More...
|
|
void | SetName (const string aName) |
| Sets the source name. More...
|
|
void | SetPosition (const double aThetaPrime, const double aPhiPrime, const double aConeAngle) |
| Sets a fix source sky location. More...
|
|
void | SetType (const Source::sourcetype aType) |
| Sets the source type. More...
|
|
int | TreeAstroGetN (void) |
| Returns the number of particles currently in the astro-particle TTree. More...
|
|
int | TreeAstroLoadEntry (const int aEntryIndex) |
| Loads a given entry in the astro-particle TTree. More...
|
|
void | TreeDelete (void) |
| Deletes the TTree. More...
|
|
void | TreeInit (void) |
| Initialize Source TTrees. More...
|
|
void | TreeReset (void) |
| Resets baskets, buffers and entries count in all branches and leaves. More...
|
|
int | TreeWrite (void) |
| Writes the source/astroparticles TTree to the current directory. More...
|
|
|
| Source (const int aNt, const double aTimeMin, const double aTimeMax, const bool aUseTimeLog, const int aNe, const double aEnergyMin, const double aEnergyMax, const bool aUseEnergyLog) |
| Source class constuctor. More...
|
|
| Source (TH2D *aFlux, TH2D *aRate=NULL) |
| Source class constuctor. More...
|
|
virtual | ~Source (void) |
| Source class destructor. More...
|
|
double | DrawEnergy (const double aTime) |
| Draws an energy value at a given time. More...
|
|
TH2D * | GetFlux (void) |
| Returns a pointer to the flux TH2D object. More...
|
|
TH1D * | GetLightCurve (const double aEnergyMin=0.0, const double aEnergyMax=-1.0) |
| Returns the source light curve between two energies. More...
|
|
int | GetParticleN (const ULong64_t aTime, const UInt_t aDuration, const double aCosTheta=1.0) |
| Computes the number of particles generated between 2 times. More...
|
|
TH2D * | GetRate (void) |
| Returns a pointer to the flux TH2D object. More...
|
|
TH1D * | GetSpectrum (const double aTimeMin=0.0, const double aTimeMax=-1.0, const bool aObserved=false) |
| Returns the source energy spectrum between two times. More...
|
|
double | GetTimeMax (void) |
| Returns the maximum time defining the SpecTime object. More...
|
|
double | GetTimeMin (void) |
| Returns the minimum time defining the SpecTime object. More...
|
|
void | MakeBandLimited (const double aFlux, const double aEnergyMin, const double aEnergyMax, TGraph *aSurface=NULL) |
| Makes a band-limited flux SpecTime object. More...
|
|
void | MakeGRBData (TH1D *aLightCurveExp, const double aE1, const double aE2, const double aPhotonIndex, const double aNint, const double aNgal, const double aZ, TGraph *aSurfaceExp, TGraph *aSurface=NULL) |
| Makes a SpecTime object using GRB data. More...
|
|
void | MakeGRBModel1 (const double aFlux, const double aEnergy0, const double aAlpha, const double aBeta, TGraph *aSurface=NULL) |
| Makes a SpecTime object using a GRB model (I). More...
|
|
void | MakePowerLawEnergy (const double aFlux, const double aEnergyDecay, TGraph *aSurface=NULL) |
| Makes a power-law flux SpecTime object. More...
|
|
void | MakePowerLawTime (const double aFlux, const double aTimeDecay, const double aEnergyMin, const double aEnergyMax, TGraph *aSurface=NULL) |
| Makes a power-law flux SpecTime object. More...
|
|
void | MakeRate (TGraph *aSurface) |
| Computes the rate given an integration surface. More...
|
|
void | MakeUniform (const double aFlux, TGraph *aSurface=NULL) |
| Makes a uniform flux SpecTime object. More...
|
|
void | SetFlux (TH2D *aFlux, TGraph *aSurface=NULL) |
| Defines a new flux fonction. More...
|
|
void | SetPhotoElectricCrossSection (TGraph *aGraph) |
| Sets the photo-electric cross-section. More...
|
|
| SpecTime (const int aNt, const double *aTimeBins, const int aNe, const double *aEnergyBins) |
| SpecTime class constuctor. More...
|
|
| SpecTime (const int aNt, const double aTimeMin, const double aTimeMax, const bool aUseTimeLog, const int aNe, const double aEnergyMin, const double aEnergyMax, const bool aUseEnergyLog) |
| SpecTime class constuctor. More...
|
|
| SpecTime (TH2D *aFlux, TH2D *aRate=NULL) |
| SpecTime class constuctor. More...
|
|
virtual | ~SpecTime (void) |
| SpecTime class destructor. More...
|
|
Describe astrophysical sources.
Description
An astrophysical source is described by a set of parameters:
- a unique name (SetName())
- a type: see Source::sourcetype (SetType())
- a sky position, \(\theta'_S\), \(\varphi'_S\) (SetPosition()) given in spherical coordinates in the Earth celestial reference frame as represented below:
Source sky position. The Earth celestial reference frame is represented in black and the associated coordinates are primed.
- a cone angle centered on the sky position (SetPosition()).
In addition, the particle emission is driven by the SpecTime class from which this class inherits.
Astro-particles
Once a source object is parameterized, this class can be used to generate astro-particles. Astro-particles are generated using a random generator. Each particle is given a set of parameters:
- a time in \([\mathrm{ms}]\), \(t_p\).
- a sky position given in spherical coordinates in the Earth celestial reference frame, \((\theta'_p,\varphi'_p)\).
- an energy in \([\mathrm{keV}]\), \(E_p\).
Astro-particles are generated with GenerateAstroParticles(). The particle parameters are randomly drawn according to the source parameters. Refer to GenerateAstroParticles() to get a full description.
Time dependency
A source is a dynamical object, meaning that its parameters can change with time. The time validity of the source is defined in the constructor via the SpecTime object. After that, the time range of the SpecTime object can no longer be changed. One must make sure that this time range covers the entire experiment. The source does not exist outside the time range specified in the SpecTime object.
The time evolution of the source cannot be changed on the fly. It must be configured from the beginning with specific function:
- Use the SpecTime configuration functions to configure the time dependency of the source flux.
- Use SetPosition() to configure the time dependency of the source geometry (like the position and the extension).
Saving the source
After configuration, the source object as well as its astro-particles can be saved to disk in a ROOT file. After opening a TFile, the following functions should be called:
- TreeInit(): intialize the TTrees:
src_tree
: source definition (one single entry)
astro_tree
: list of astro-particles
- Generate particles with GenerateAstroParticles().
- TreeWrite(): write the TTrees in the TFile.
- TreeDelete(): delete TTrees.
- Close the file.
- See also
- The SatAndLight file structure for source objects.
- Author
- Florent Robinet