Manage injection structures.
More...
#include <InjTre.h>
|
unsigned int | Add (const double aRa, const double aDec, const double aTime, const double aAmplitude, const double aEccentricity=0.0, const double aPolarization=0.0, const double aSigma=0.0, const double aFrequency=0.0) |
| Adds an injection. More...
|
|
unsigned int | GetN (void) |
| Returns the current number of injections. More...
|
|
void | Reset (void) |
| Resets the injection TTree. More...
|
|
bool | SetWave (TGraph *aHplus, TGraph *aHcross=NULL) |
| Sets the user waveform for "Wave" injections. More...
|
|
bool | Write (const string aRootFileName="./myinjections.root") |
| Writes injections to disk. More...
|
|
|
| InjTre (const injtype aInjType, const string aInjName="gwl_inj", const unsigned int aVerbose=0) |
| Constructor of the InjTre class. More...
|
|
virtual | ~InjTre () |
| Destructor of the InjTre class. More...
|
|
Manage injection structures.
Injection parameters are saved in a TTree structure.
- Name: An injection is given a name.
- Type: The type of an injection defines the method to compute the time series \(h_+(t)\) and \(h_\times(t)\). Some injections are user-defined. In that case the time series must be provided by the user with the SetWave() function. See InjTyp.h for the supported types.
- Right-ascension [rad]: sky position.
- Declination [rad]: sky position.
- Time since the GPS epoch [s]: this is the time of the injection measured at the center of the Earth.
- Eccentricity: this is a number between 0 and 1.
- Polarization angle [rad].
- Amplitude.
- Sigma [s].
- Frequency [Hz].
- Author
- Florent Robinet
◆ InjTre()
InjTre::InjTre |
( |
const injtype |
aInjType, |
|
|
const string |
aInjName = "gwl_inj" , |
|
|
const unsigned int |
aVerbose = 0 |
|
) |
| |
Constructor of the InjTre class.
An injection is identified by a name. Then, it must be given a type: see injtype. For user-defined injections, waveforms must be provided with SetWave().
- Parameters
-
[in] | aInjType | Injection type: see InjTyp.h. |
[in] | aInjName | Injection name. Do not use white space, they will be repaced by "_". |
[in] | aVerbose | Verbosity level. |
◆ ~InjTre()
Destructor of the InjTre class.
◆ Add()
unsigned int InjTre::Add |
( |
const double |
aRa, |
|
|
const double |
aDec, |
|
|
const double |
aTime, |
|
|
const double |
aAmplitude, |
|
|
const double |
aEccentricity = 0.0 , |
|
|
const double |
aPolarization = 0.0 , |
|
|
const double |
aSigma = 0.0 , |
|
|
const double |
aFrequency = 0.0 |
|
) |
| |
Adds an injection.
- Returns
- The current number of injections in the TTree.
- Parameters
-
[in] | aRa | Injection right ascension [rad]. |
[in] | aDec | Injection declination [rad]. |
[in] | aTime | Injection GPS time [s]. |
[in] | aAmplitude | Injection amplitude. |
[in] | aEccentricity | Injection eccentricity. |
[in] | aPolarization | Injection polarization angle [rad]. |
[in] | aSigma | Injection sigma [s]. |
[in] | aFrequency | Injection frequency [Hz]. |
◆ GetN()
unsigned int InjTre::GetN |
( |
void |
| ) |
|
|
inline |
Returns the current number of injections.
◆ Reset()
void InjTre::Reset |
( |
void |
| ) |
|
|
inline |
Resets the injection TTree.
- Note
- The waveform tree is also reset.
◆ SetWave()
bool InjTre::SetWave |
( |
TGraph * |
aHplus, |
|
|
TGraph * |
aHcross = NULL |
|
) |
| |
Sets the user waveform for "Wave" injections.
The source \(h_{+}\) (and optionally \(h_{\times}\)) timeseries must be provided. The TGraphs represent the wave calibrated polarized strains as a function of time in [s]. By convention, t = 0 s is taken to be the time of the injection at the center of the Earth. They are saved locally.
- Note
- If the \(h_{\times}\) is provided, it must be same the number of points as \(h_{+}\). Moreover, the two timeseries must coincide in time.
In addition to the waveform, the injection must be given:
- an amplitude \(A\) which is used to scale the waveform amplitude: \(Ah_{+}\) and \(Ah_{\times}\).
- a sky position: the declination and the right ascension.
- a polarization angle [rad].
- Returns
- true if success.
- Parameters
-
[in] | aHplus | Pointer to the \(h_{+}\) time series. |
[in] | aHcross | Pointer to the \(h_{\times}\) time series. |
◆ Write()
bool InjTre::Write |
( |
const string |
aRootFileName = "./myinjections.root" | ) |
|
Writes injections to disk.
- Note
- When writing multiple injection files, think about resetting the TTree structure with Reset().
- Parameters
-
[in] | aRootFileName | Output file name. |
◆ inj_amp
◆ inj_dec
Injection declination [rad].
◆ inj_ecc
◆ inj_f0
Injection frequency [Hz].
◆ inj_psi
Injection polarization angle [rad].
◆ inj_ra
Injection right ascension [rad].
◆ inj_sigma
◆ inj_time
◆ inj_time_ns
unsigned int InjTre::inj_time_ns |
|
private |
Injection subsecond time [ns] (only used for sorting injections in InjRea).
◆ InjTree
◆ Verbose
unsigned int InjTre::Verbose |
|
protected |
◆ wave_hcross
TGraph* InjTre::wave_hcross |
|
private |
Waveform \(h_{\times}(t)\).
◆ wave_hplus
TGraph* InjTre::wave_hplus |
|
private |
◆ wave_name
◆ wave_type
◆ WaveTree
The documentation for this class was generated from the following files: