Read a set of injections. More...
#include <InjRea.h>
Public Member Functions | |
int | GetFirstInjectionIndex (const double aTimeStart, const double aTimeEnd) |
Returns the first injection index included in a given time range. | |
double | GetInjectionAmplitude (void) |
Returns the injection amplitude. | |
double | GetInjectionAmplitudeMax (void) |
Returns the maximum injection amplitude. | |
double | GetInjectionAmplitudeMin (void) |
Returns the minimum injection amplitude. | |
double | GetInjectionDec (void) |
Returns the injection declination. | |
double | GetInjectionEccentricity (void) |
Returns the injection eccentricity. | |
double | GetInjectionFrequency (void) |
Returns the injection frequency. | |
double | GetInjectionFrequencyMax (void) |
Returns the maximum injection frequency. | |
double | GetInjectionFrequencyMin (void) |
Returns the minimum injection frequency. | |
TH1D * | GetInjectionParamDist (const string aParamName, const int aNbins=1, const string aBinType="UNIFORM") |
Returns the 1D distribution of an injection parameter. | |
double | GetInjectionPolarization (void) |
Returns the injection polarization. | |
double | GetInjectionRa (void) |
Returns the injection right-ascension. | |
double | GetInjectionSigma (void) |
Returns the injection sigma. | |
double | GetInjectionSigmaMax (void) |
Returns the maximal value for sigma. | |
bool | GetInjectionTag (void) |
Returns the injection tag. | |
double | GetInjectionTime (void) |
Returns the injection time. | |
string | GetInjectionType (void) |
Returns the injection type. | |
string | GetInputFilePattern (void) |
Returns the input file pattern provided in the constructor. | |
int | GetLastInjectionIndex (const double aTimeStart, const double aTimeEnd) |
Returns the last injection index included in a given time range. | |
int | GetNInjections (void) |
Returns the number of injections. | |
double | GetSineGaussh0cross (void) |
Returns the SineGauss hxrss peak amplitude of current injection. | |
double | GetSineGaussh0plus (void) |
Returns the SineGauss h+rss peak amplitude of current injection. | |
bool | GetStatus (void) |
Returns the class status. | |
bool | LoadInjection (const int aInjIndex) |
Loads a given injection. | |
void | SetInjectionTag (const bool aNewTag) |
Sets a new tag value for the current injection. | |
Constructors and destructors | |
InjRea (const string aPattern, const int aVerbose=0) | |
Constructor of the InjRea class. | |
virtual | ~InjRea () |
Destructor of the InjRea class. | |
Protected Member Functions | |
Long64_t * | GetTreeOffset (void) |
Protected Attributes | |
double | inj_amp |
injection amplitude | |
double | inj_ampmax |
amplitude max | |
double | inj_ampmin |
amplitude min | |
double | inj_dec |
injection declination | |
double | inj_ecc |
injection eccentricity | |
double | inj_f0 |
injection frequency | |
double | inj_f0max |
frequency max | |
double | inj_f0min |
frequency min | |
double | inj_psi |
injection polarization angle | |
double | inj_ra |
injection right ascension | |
double | inj_sigma |
injection sigma | |
double | inj_sigmamax |
sigma max | |
double | inj_sigmamin |
sigma min | |
double | inj_time |
injection time | |
bool | status_OK |
status of the InjRea object | |
int | Verbose |
verbosity level | |
Friends | |
class | InjRec |
used to clone InjTree |
Read a set of injections.
Injection parameters, generated with the InjGen tools, are loaded in a TTree structure. Injections are indexed and parameters can be loaded. Note that this class was optimized (in terms of speed) to load injections incrementally.
InjRea::InjRea | ( | const string | aPattern, | |
const int | aVerbose = 0 | |||
) |
Constructor of the InjRea class.
Injections in the ROOT files designated by a file pattern are loaded. Each injection is tagged to 'true' by default. It is important that the injection files were generated with the InjGen class. Injection files must be time-sorted and with no overlap.
aPattern | injection file pattern | |
aVerbose | verbosity level |
InjRea::~InjRea | ( | void | ) | [virtual] |
Destructor of the InjRea class.
int InjRea::GetFirstInjectionIndex | ( | const double | aTimeStart, | |
const double | aTimeEnd | |||
) |
Returns the first injection index included in a given time range.
Returns -1 if no injection is found in this time range.
aTimeStart | GPS range start | |
aTimeEnd | GPS range stop |
double InjRea::GetInjectionAmplitude | ( | void | ) | [inline] |
Returns the injection amplitude.
double InjRea::GetInjectionAmplitudeMax | ( | void | ) | [inline] |
Returns the maximum injection amplitude.
double InjRea::GetInjectionAmplitudeMin | ( | void | ) | [inline] |
Returns the minimum injection amplitude.
double InjRea::GetInjectionDec | ( | void | ) | [inline] |
Returns the injection declination.
double InjRea::GetInjectionEccentricity | ( | void | ) | [inline] |
Returns the injection eccentricity.
double InjRea::GetInjectionFrequency | ( | void | ) | [inline] |
Returns the injection frequency.
double InjRea::GetInjectionFrequencyMax | ( | void | ) | [inline] |
Returns the maximum injection frequency.
double InjRea::GetInjectionFrequencyMin | ( | void | ) | [inline] |
Returns the minimum injection frequency.
TH1D * InjRea::GetInjectionParamDist | ( | const string | aParamName, | |
const int | aNbins = 1 , |
|||
const string | aBinType = "UNIFORM" | |||
) |
Returns the 1D distribution of an injection parameter.
The returned histograms must be deleted by the user. NB: only injections tagged to true are considered.
aParamName | parameter name (currently supported: "amplitude" and "f0") | |
aNbins | number of bins (must be >0) | |
aBinType | binning type (currently supported: "UNIFORM" and "LOG") |
double InjRea::GetInjectionPolarization | ( | void | ) | [inline] |
Returns the injection polarization.
double InjRea::GetInjectionRa | ( | void | ) | [inline] |
Returns the injection right-ascension.
double InjRea::GetInjectionSigma | ( | void | ) | [inline] |
Returns the injection sigma.
double InjRea::GetInjectionSigmaMax | ( | void | ) | [inline] |
Returns the maximal value for sigma.
bool InjRea::GetInjectionTag | ( | void | ) | [inline] |
Returns the injection tag.
double InjRea::GetInjectionTime | ( | void | ) | [inline] |
Returns the injection time.
string InjRea::GetInjectionType | ( | void | ) | [inline] |
Returns the injection type.
string InjRea::GetInputFilePattern | ( | void | ) | [inline] |
Returns the input file pattern provided in the constructor.
int InjRea::GetLastInjectionIndex | ( | const double | aTimeStart, | |
const double | aTimeEnd | |||
) |
Returns the last injection index included in a given time range.
Returns -1 if no injection is found in this time range.
aTimeStart | GPS range start | |
aTimeEnd | GPS range stop |
int InjRea::GetNInjections | ( | void | ) | [inline] |
Returns the number of injections.
double InjRea::GetSineGaussh0cross | ( | void | ) |
Returns the SineGauss hxrss peak amplitude of current injection.
double InjRea::GetSineGaussh0plus | ( | void | ) |
Returns the SineGauss h+rss peak amplitude of current injection.
bool InjRea::GetStatus | ( | void | ) | [inline] |
Returns the class status.
Reimplemented in SearchRead.
Long64_t* InjRea::GetTreeOffset | ( | void | ) | [inline, protected] |
bool InjRea::LoadInjection | ( | const int | aInjIndex | ) | [inline] |
Loads a given injection.
aInjIndex | injection index |
void InjRea::SetInjectionTag | ( | const bool | aNewTag | ) | [inline] |
Sets a new tag value for the current injection.
friend class InjRec [friend] |
used to clone InjTree
double InjRea::inj_amp [protected] |
injection amplitude
double InjRea::inj_ampmax [protected] |
amplitude max
double InjRea::inj_ampmin [protected] |
amplitude min
double InjRea::inj_dec [protected] |
injection declination
double InjRea::inj_ecc [protected] |
injection eccentricity
double InjRea::inj_f0 [protected] |
injection frequency
double InjRea::inj_f0max [protected] |
frequency max
double InjRea::inj_f0min [protected] |
frequency min
double InjRea::inj_psi [protected] |
injection polarization angle
double InjRea::inj_ra [protected] |
injection right ascension
double InjRea::inj_sigma [protected] |
injection sigma
double InjRea::inj_sigmamax [protected] |
sigma max
double InjRea::inj_sigmamin [protected] |
sigma min
double InjRea::inj_time [protected] |
injection time
bool InjRea::status_OK [protected] |
status of the InjRea object
Reimplemented in SearchRead.
int InjRea::Verbose [protected] |
verbosity level