93 Source(
const int aNt,
const double aTimeMin,
const double aTimeMax,
const bool aUseTimeLog,
94 const int aNe,
const double aEnergyMin,
const double aEnergyMax,
const bool aUseEnergyLog);
110 Source(TH2D* aFlux, TH2D* aRate=NULL);
128 type_photon_background
146 int GenerateAstroParticles(
const int aN,
const ULong64_t aTime,
const UInt_t aDuration);
154 void SetName(
const string aName);
160 inline string GetName(
void){
return src_name; };
180 void SetPosition(
const double aThetaPrime,
const double aPhiPrime,
const double aConeAngle);
189 return src_thetap->Eval((
double)aTime);
199 return src_phip->Eval((
double)aTime);
263 if(src_tree!=NULL) src_tree->Reset();
264 if(astro_tree!=NULL) astro_tree->Reset();
277 if(src_tree!=NULL) nb+=src_tree->Write();
278 if(astro_tree!=NULL) nb+=astro_tree->Write();
288 if(src_tree!=NULL)
delete src_tree;
289 if(astro_tree!=NULL)
delete astro_tree;
300 if(astro_tree!=NULL)
return astro_tree->GetEntries();
311 if(astro_tree!=NULL)
return astro_tree->GetEntry(aEntryIndex);
355 void CommonConstructor(
void);
This module is used to describe spectra and light curves of astrophysical sources.
Describe astrophysical sources.
Definition: Source.h:62
TGraph * src_cosconeangle
source cone angle [rad] as a function of time.
Definition: Source.h:323
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.
sourcetype
Enumerator to describe the type of astrophysical sources.
Definition: Source.h:125
@ type_photon
source of photons.
Definition: Source.h:126
@ type_cosmic
source of cosmic rays.
Definition: Source.h:127
string GetName(void)
Returns the source name.
Definition: Source.h:160
double GetAstroThetap(void)
Returns for the current astro-particle.
Definition: Source.h:220
double astro_thetap
astroparticle .
Definition: Source.h:328
double GetThetaPrime(const ULong64_t aTime)
Returns the source angle [rad] at a given time.
Definition: Source.h:188
void TreeReset(void)
Resets baskets, buffers and entries count in all branches and leaves.
Definition: Source.h:262
void SetType(const Source::sourcetype aType)
Sets the source type.
Definition: Source.h:168
int TreeWrite(void)
Writes the source/astroparticles TTree to the current directory.
Definition: Source.h:275
TTree * astro_tree
astroparticle tree.
Definition: Source.h:326
int GetType(void)
Returns the source type.
Definition: Source.h:206
int TreeAstroLoadEntry(const int aEntryIndex)
Loads a given entry in the astro-particle TTree.
Definition: Source.h:310
ULong64_t GetAstroTime(void)
Returns the time for the current astro-particle.
Definition: Source.h:227
TTree * src_tree
source parameter tree.
Definition: Source.h:319
TGraph * src_thetap
source as a function of time.
Definition: Source.h:321
string src_name
source name.
Definition: Source.h:313
ULong64_t astro_time
astroparticle time [ms].
Definition: Source.h:327
int TreeAstroGetN(void)
Returns the number of particles currently in the astro-particle TTree.
Definition: Source.h:299
double astro_energy
astroparticle energy [keV].
Definition: Source.h:330
void TreeDelete(void)
Deletes the TTree.
Definition: Source.h:287
double GetAstroEnergy(void)
Returns the energy [keV] for the current astro-particle.
Definition: Source.h:234
double astro_phip
astroparticle phi prime.
Definition: Source.h:329
double GetAstroPhip(void)
Returns for the current astro-particle.
Definition: Source.h:213
int src_type
source type, see Sources::sourcetype.
Definition: Source.h:320
TGraph * src_phip
source as a function of time.
Definition: Source.h:322
double GetPhiPrime(const ULong64_t aTime)
Returns the source angle [rad] at a given time.
Definition: Source.h:198
Astrophysical source spectra and light curves.
Definition: SpecTime.h:32