GWOLLUM  4.2.0
Tools for gravitational-wave analyses
InjRea Class Reference

Read a set of injections. More...

#include <InjRea.h>

Inheritance diagram for InjRea:

Public Member Functions

double GetInjectionAmplitude (void)
 Returns the current injection amplitude. More...
 
double GetInjectionAmplitudeMax (const unsigned int aNameIndex)
 Returns the maximum injection amplitude. More...
 
double GetInjectionAmplitudeMin (const unsigned int aNameIndex)
 Returns the minimum injection amplitude. More...
 
double GetInjectionDec (void)
 Returns the current injection declination [rad]. More...
 
double GetInjectionEccentricity (void)
 Returns the current injection eccentricity. More...
 
double GetInjectionFrequency (void)
 Returns the current injection frequency [Hz]. More...
 
double GetInjectionFrequencyMax (const unsigned int aNameIndex)
 Returns the maximum injection frequency [Hz]. More...
 
double GetInjectionFrequencyMin (const unsigned int aNameIndex)
 Returns the minimum injection frequency [Hz]. More...
 
Long64_t GetInjectionIndex (void)
 Returns the index of the current injection. More...
 
Long64_t GetInjectionIndexAfter (const double aTime)
 Returns the index of the first injection after a given time. More...
 
string GetInjectionName (const unsigned int aNameIndex)
 Returns a given injection name in the list. More...
 
string GetInjectionName (void)
 Returns the current injection name. More...
 
unsigned int GetInjectionNameIndex (void)
 Returns the current injection name index. More...
 
unsigned int GetInjectionNameN (void)
 Returns the number of injection names. More...
 
TH1D * GetInjectionParamDist (const string aParamName, const unsigned int aNbins=1, const string aBinType="UNIFORM")
 Returns the 1D distribution of an injection parameter. More...
 
double GetInjectionPolarization (void)
 Returns the current injection polarization [rad]. More...
 
double GetInjectionRa (void)
 Returns the current injection right-ascension [rad]. More...
 
double GetInjectionSigma (void)
 Returns the current injection sigma [s]. More...
 
double GetInjectionSigmaMax (const unsigned int aNameIndex)
 Returns the maximum injection sigma [s]. More...
 
double GetInjectionSigmaMin (const unsigned int aNameIndex)
 Returns the minimum injection sigma [s]. More...
 
bool GetInjectionTag (const Long64_t aInjIndex)
 Returns an injection tag. More...
 
bool GetInjectionTag (void)
 Returns the current injection tag. More...
 
double GetInjectionTime (void)
 Returns the current injection GPS time [s]. More...
 
double GetInjectionTimeEnd (void)
 Returns the GPS ending time of the injection [s] at the center of the Earth. More...
 
double GetInjectionTimeMax (const unsigned int aNameIndex)
 Returns the maximum injection GPS time. More...
 
double GetInjectionTimeMin (const unsigned int aNameIndex)
 Returns the minimum injection GPS time. More...
 
double GetInjectionTimeStart (void)
 Returns the GPS starting time of the injection [s] at the center of the Earth. More...
 
injtype GetInjectionType (void)
 Returns the current injection type. More...
 
string GetInputFilePattern (void)
 Returns the input file pattern provided in the constructor. More...
 
Long64_t GetN (const unsigned int aNameIndex)
 Returns the number of injections of a given name. More...
 
Long64_t GetN (void)
 Returns the number of injections. More...
 
double GetSineGaussh0cross (void)
 Returns the SineGauss \(h_{\times rss}\) peak amplitude of current injection. More...
 
double GetSineGaussh0plus (void)
 Returns the SineGauss \(h_{+rss}\) peak amplitude of current injection. More...
 
int LoadInjection (const Long64_t aInjIndex)
 Loads a given injection. More...
 
void SetInjectionTag (const bool aTag)
 Sets a new tag value to the current injection. More...
 
void SetInjectionTag (const Long64_t aInjIndex, const bool aTag)
 Sets a new tag value to an injection. More...
 
Constructors and destructors
 InjRea (const string aPattern, const unsigned int aVerbose=0)
 Constructor of the InjRea class. More...
 
virtual ~InjRea ()
 Destructor of the InjRea class. More...
 

Protected Attributes

TChain * InjTree
 Injection tree. More...
 
unsigned int Verbose
 Verbosity level. More...
 
TGraph * wave_hcross
 Waveform \(h_{\times}(t)\). More...
 
TGraph * wave_hplus
 Waveform \(h_{+}(t)\). More...
 

Private Attributes

double inj_amp
 Injection amplitude. More...
 
double * inj_ampmax
 Amplitude max. More...
 
double * inj_ampmin
 Amplitude min. More...
 
double inj_dec
 Injection declination. More...
 
double inj_ecc
 Injection eccentricity. More...
 
double inj_f0
 Injection frequency. More...
 
double * inj_f0max
 Frequency max. More...
 
double * inj_f0min
 Frequency min. More...
 
Long64_t inj_index
 Current injection index. More...
 
double inj_psi
 Injection polarization angle. More...
 
double inj_ra
 Injection right ascension. More...
 
double inj_sigma
 Injection sigma. More...
 
double * inj_sigmamax
 Sigma max. More...
 
double * inj_sigmamin
 Sigma min. More...
 
bool * inj_tag
 Injection tags. More...
 
double inj_time
 Injection time. More...
 
double * inj_timemax
 Time max. More...
 
double * inj_timemin
 Time min. More...
 
string pattern
 Input file pattern. More...
 
TTreeIndex * sort_index
 TTree index. More...
 
string * wave_name
 Waveform name. More...
 
Long64_t * wave_name_n
 
vector< string > wave_names
 List of waveform names. More...
 
UInt_t wave_type
 Waveform type: see InjTyp.h. More...
 
TChain * WaveTree
 Waveform tree. More...
 

Detailed Description

Read a set of injections.

Injection parameters, generated with the InjGen class, are loaded.

Author
Florent Robinet

Constructor & Destructor Documentation

◆ InjRea()

InjRea::InjRea ( const string  aPattern,
const unsigned int  aVerbose = 0 
)

Constructor of the InjRea class.

Injections in ROOT files designated by a file pattern are loaded. Each injection is tagged to 'true' by default. Injection files must be generated with the InjGen class.

Parameters
aPatternInjection file pattern.
aVerboseVerbosity level.

◆ ~InjRea()

InjRea::~InjRea ( void  )
virtual

Destructor of the InjRea class.

Member Function Documentation

◆ GetInjectionAmplitude()

double InjRea::GetInjectionAmplitude ( void  )
inline

Returns the current injection amplitude.

◆ GetInjectionAmplitudeMax()

double InjRea::GetInjectionAmplitudeMax ( const unsigned int  aNameIndex)
inline

Returns the maximum injection amplitude.

Parameters
[in]aNameIndexIndex in the list of names. If this index is out-of-range, the global maximum is returned.

◆ GetInjectionAmplitudeMin()

double InjRea::GetInjectionAmplitudeMin ( const unsigned int  aNameIndex)
inline

Returns the minimum injection amplitude.

Parameters
[in]aNameIndexIndex in the list of names. If this index is out-of-range, the global minimum is returned.

◆ GetInjectionDec()

double InjRea::GetInjectionDec ( void  )
inline

Returns the current injection declination [rad].

◆ GetInjectionEccentricity()

double InjRea::GetInjectionEccentricity ( void  )
inline

Returns the current injection eccentricity.

◆ GetInjectionFrequency()

double InjRea::GetInjectionFrequency ( void  )
inline

Returns the current injection frequency [Hz].

◆ GetInjectionFrequencyMax()

double InjRea::GetInjectionFrequencyMax ( const unsigned int  aNameIndex)
inline

Returns the maximum injection frequency [Hz].

Parameters
[in]aNameIndexIndex in the list of names. If this index is out-of-range, the global maximum is returned.

◆ GetInjectionFrequencyMin()

double InjRea::GetInjectionFrequencyMin ( const unsigned int  aNameIndex)
inline

Returns the minimum injection frequency [Hz].

Parameters
[in]aNameIndexIndex in the list of names. If this index is out-of-range, the global minimum is returned.

◆ GetInjectionIndex()

Long64_t InjRea::GetInjectionIndex ( void  )
inline

Returns the index of the current injection.

◆ GetInjectionIndexAfter()

Long64_t InjRea::GetInjectionIndexAfter ( const double  aTime)

Returns the index of the first injection after a given time.

Note
The found injection is loaded.
Returns
If no injections are found after the reference time, the number of injections is returned and the last injection is loaded.
Parameters
[in]aTimeReference time [s].

◆ GetInjectionName() [1/2]

string InjRea::GetInjectionName ( const unsigned int  aNameIndex)
inline

Returns a given injection name in the list.

Parameters
[in]aNameIndexIndex in the list of names.
Precondition
The input index must be smaller than GetInjectionNameN().

◆ GetInjectionName() [2/2]

string InjRea::GetInjectionName ( void  )
inline

Returns the current injection name.

◆ GetInjectionNameIndex()

unsigned int InjRea::GetInjectionNameIndex ( void  )
inline

Returns the current injection name index.

◆ GetInjectionNameN()

unsigned int InjRea::GetInjectionNameN ( void  )
inline

Returns the number of injection names.

◆ GetInjectionParamDist()

TH1D * InjRea::GetInjectionParamDist ( const string  aParamName,
const unsigned int  aNbins = 1,
const string  aBinType = "UNIFORM" 
)

Returns the 1D distribution of an injection parameter.

Note
The returned histograms must be deleted by the user.
Warning
Only injections tagged to true are considered.
Parameters
[in]aParamNameParameter name. Currently supported: "amplitude" and "f0".
[in]aNbinsNumber of bins (must be >0).
[in]aBinTypeBinning type. Currently supported: "UNIFORM" and "LOG".

◆ GetInjectionPolarization()

double InjRea::GetInjectionPolarization ( void  )
inline

Returns the current injection polarization [rad].

◆ GetInjectionRa()

double InjRea::GetInjectionRa ( void  )
inline

Returns the current injection right-ascension [rad].

◆ GetInjectionSigma()

double InjRea::GetInjectionSigma ( void  )
inline

Returns the current injection sigma [s].

◆ GetInjectionSigmaMax()

double InjRea::GetInjectionSigmaMax ( const unsigned int  aNameIndex)
inline

Returns the maximum injection sigma [s].

Parameters
[in]aNameIndexIndex in the list of names. If this index is out-of-range, the global maximum is returned.

◆ GetInjectionSigmaMin()

double InjRea::GetInjectionSigmaMin ( const unsigned int  aNameIndex)
inline

Returns the minimum injection sigma [s].

Parameters
[in]aNameIndexIndex in the list of names. If this index is out-of-range, the global minimum is returned.

◆ GetInjectionTag() [1/2]

bool InjRea::GetInjectionTag ( const Long64_t  aInjIndex)
inline

Returns an injection tag.

Parameters
[in]aInjIndexInjection index.

◆ GetInjectionTag() [2/2]

bool InjRea::GetInjectionTag ( void  )
inline

Returns the current injection tag.

◆ GetInjectionTime()

double InjRea::GetInjectionTime ( void  )
inline

Returns the current injection GPS time [s].

◆ GetInjectionTimeEnd()

double InjRea::GetInjectionTimeEnd ( void  )

Returns the GPS ending time of the injection [s] at the center of the Earth.

It depends on the type of waveform:

  • Sine-Gaussian waveform: this is 10 sigmas after the injection time.
  • User-defined waveform: end time of the \(h_{+}\) time series relatively to the injection time.
    Returns
    0 if the waveform type is unknown.

◆ GetInjectionTimeMax()

double InjRea::GetInjectionTimeMax ( const unsigned int  aNameIndex)
inline

Returns the maximum injection GPS time.

Parameters
[in]aNameIndexIndex in the list of names. If this index is out-of-range, the global maximum is returned.

◆ GetInjectionTimeMin()

double InjRea::GetInjectionTimeMin ( const unsigned int  aNameIndex)
inline

Returns the minimum injection GPS time.

Parameters
[in]aNameIndexIndex in the list of names. If this index is out-of-range, the global minimum is returned.

◆ GetInjectionTimeStart()

double InjRea::GetInjectionTimeStart ( void  )

Returns the GPS starting time of the injection [s] at the center of the Earth.

It depends on the type of waveform:

  • Sine-Gaussian waveform: this is 10 sigmas before the injection time.
  • User-defined waveform: start time of the \(h_{+}\) time series relatively to the injection time.
    Returns
    0 if the waveform type is unknown.

◆ GetInjectionType()

injtype InjRea::GetInjectionType ( void  )
inline

Returns the current injection type.

◆ GetInputFilePattern()

string InjRea::GetInputFilePattern ( void  )
inline

Returns the input file pattern provided in the constructor.

◆ GetN() [1/2]

Long64_t InjRea::GetN ( const unsigned int  aNameIndex)
inline

Returns the number of injections of a given name.

Parameters
[in]aNameIndexIndex in the list of names.

◆ GetN() [2/2]

Long64_t InjRea::GetN ( void  )
inline

Returns the number of injections.

◆ GetSineGaussh0cross()

double InjRea::GetSineGaussh0cross ( void  )

Returns the SineGauss \(h_{\times rss}\) peak amplitude of current injection.

For details see K. Riles, LIGO-T040055-00

◆ GetSineGaussh0plus()

double InjRea::GetSineGaussh0plus ( void  )

Returns the SineGauss \(h_{+rss}\) peak amplitude of current injection.

For details see K. Riles, LIGO-T040055-00

◆ LoadInjection()

int InjRea::LoadInjection ( const Long64_t  aInjIndex)

Loads a given injection.

Returns
The function returns the number of bytes read from the input buffer. If entry does not exist or if an I/O error occurs, the function returns 0.
Parameters
[in]aInjIndexInjection index.

◆ SetInjectionTag() [1/2]

void InjRea::SetInjectionTag ( const bool  aTag)
inline

Sets a new tag value to the current injection.

Parameters
[in]aTagNew tag value.

◆ SetInjectionTag() [2/2]

void InjRea::SetInjectionTag ( const Long64_t  aInjIndex,
const bool  aTag 
)
inline

Sets a new tag value to an injection.

Parameters
[in]aInjIndexInjection index.
[in]aTagNew tag value.

Member Data Documentation

◆ inj_amp

double InjRea::inj_amp
private

Injection amplitude.

◆ inj_ampmax

double* InjRea::inj_ampmax
private

Amplitude max.

◆ inj_ampmin

double* InjRea::inj_ampmin
private

Amplitude min.

◆ inj_dec

double InjRea::inj_dec
private

Injection declination.

◆ inj_ecc

double InjRea::inj_ecc
private

Injection eccentricity.

◆ inj_f0

double InjRea::inj_f0
private

Injection frequency.

◆ inj_f0max

double* InjRea::inj_f0max
private

Frequency max.

◆ inj_f0min

double* InjRea::inj_f0min
private

Frequency min.

◆ inj_index

Long64_t InjRea::inj_index
private

Current injection index.

◆ inj_psi

double InjRea::inj_psi
private

Injection polarization angle.

◆ inj_ra

double InjRea::inj_ra
private

Injection right ascension.

◆ inj_sigma

double InjRea::inj_sigma
private

Injection sigma.

◆ inj_sigmamax

double* InjRea::inj_sigmamax
private

Sigma max.

◆ inj_sigmamin

double* InjRea::inj_sigmamin
private

Sigma min.

◆ inj_tag

bool* InjRea::inj_tag
private

Injection tags.

◆ inj_time

double InjRea::inj_time
private

Injection time.

◆ inj_timemax

double* InjRea::inj_timemax
private

Time max.

◆ inj_timemin

double* InjRea::inj_timemin
private

Time min.

◆ InjTree

TChain* InjRea::InjTree
protected

Injection tree.

◆ pattern

string InjRea::pattern
private

Input file pattern.

◆ sort_index

TTreeIndex* InjRea::sort_index
private

TTree index.

◆ Verbose

unsigned int InjRea::Verbose
protected

Verbosity level.

◆ wave_hcross

TGraph* InjRea::wave_hcross
protected

Waveform \(h_{\times}(t)\).

◆ wave_hplus

TGraph* InjRea::wave_hplus
protected

Waveform \(h_{+}(t)\).

◆ wave_name

string* InjRea::wave_name
private

Waveform name.

◆ wave_name_n

Long64_t* InjRea::wave_name_n
private

◆ wave_names

vector<string> InjRea::wave_names
private

List of waveform names.

◆ wave_type

UInt_t InjRea::wave_type
private

Waveform type: see InjTyp.h.

◆ WaveTree

TChain* InjRea::WaveTree
private

Waveform tree.


The documentation for this class was generated from the following files: