GWOLLUM
4.2.0
Tools for gravitational-wave analyses
|
Generate a set of injections. More...
#include <InjGen.h>
Public Member Functions | |
unsigned int | GenerateInjections (void) |
Generates a set of injection parameters. More... | |
bool | SetAmplitudeDistribution (const string aDistribution="LOG") |
Sets the injection amplitude distribution. More... | |
void | SetAmplitudeRange (const double aMin=1e-22, const double aMax=5e-19) |
Sets the injection amplitude range. More... | |
bool | SetEccentricityDistribution (const string aDistribution="UNIFORM") |
Sets the injection eccentricity distribution. More... | |
void | SetEccentricityRange (const double aMin=0.0, const double aMax=1.0) |
Sets the injection eccentricity range. More... | |
bool | SetFrequencyDistribution (const string aDistribution="LOG") |
Sets the injection frequency distribution. More... | |
void | SetFrequencyRange (const double aMin=30.0, const double aMax=2048.0) |
Sets the injection frequency range. More... | |
void | SetInjectionTimeJitter (const double aJitter) |
Sets the maximum time jitter [s]. More... | |
void | SetInjectionTimeSpacing (const double aSpacing) |
Sets the time distance between 2 consecutive injections. More... | |
bool | SetPolarizationDistribution (const string aDistribution="UNIFORM") |
Sets the injection polarization distribution. More... | |
void | SetPolarizationRange (const double aMin=0.0, const double aMax=2.0 *TMath::Pi()) |
Sets the injection polarization range. More... | |
bool | SetSigmaDistribution (const string aDistribution="LOG") |
Sets the injection sigma distribution. More... | |
void | SetSigmaRange (const double aMin=0.01, const double aMax=1.0) |
Sets the injection sigma range. More... | |
Constructors and destructors | |
InjGen (Segments *aInSegments, const injtype aInjType, const string aInjName="gwl_inj", const unsigned int aVerbose=0) | |
Constructor of the InjGen class. More... | |
virtual | ~InjGen () |
Destructor of the InjGen class. More... | |
Public Member Functions inherited from InjTre | |
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... | |
Private Member Functions | |
double | GetAmplitude (void) |
Draws an amplitude parameter. More... | |
double | GetEccentricity (void) |
Draws a eccentricity parameter. More... | |
double | GetFrequency (void) |
Draws a frequency parameter. More... | |
double | GetPolarization (void) |
Draws a polarization parameter. More... | |
double | GetSigma (void) |
Draws a sigma parameter. More... | |
Private Attributes | |
unsigned int | ampDistribution |
0=UNIFORM, 1=LOG/10 More... | |
double | ampMax |
amplitude max More... | |
double | ampMin |
amplitude min More... | |
unsigned int | eccDistribution |
0=UNIFORM, 1=LOG/10 More... | |
double | eccMax |
eccentricity max More... | |
double | eccMin |
eccentricity min More... | |
unsigned int | f0Distribution |
0=UNIFORM, 1=LOG/10 More... | |
double | f0Max |
frequency max More... | |
double | f0Min |
frequency min More... | |
double | InjJitterMax |
Injection maximum time jitter [s]. More... | |
double | InjSpacing |
Injection spacing [s]. More... | |
Segments * | InSegments |
Input segments - DO NOT DELETE. More... | |
unsigned int | psiDistribution |
0=UNIFORM, 1=LOG/10 More... | |
double | psiMax |
psi max More... | |
double | psiMin |
psi min More... | |
TRandom3 * | rand |
Random generator. More... | |
unsigned int | sigmaDistribution |
0=UNIFORM, 1=LOG/10 More... | |
double | sigmaMax |
sigma max More... | |
double | sigmaMin |
sigma min More... | |
Additional Inherited Members | |
Protected Attributes inherited from InjTre | |
unsigned int | Verbose |
Verbosity level. More... | |
Generate a set of injections.
Several injection waveforms are supported: SineGauss, user-defined... This class is used to draw injection parameters and to save them in a InjTre structure.
InjGen::InjGen | ( | Segments * | aInSegments, |
const injtype | aInjType, | ||
const string | aInjName = "gwl_inj" , |
||
const unsigned int | aVerbose = 0 |
||
) |
Constructor of the InjGen class.
Injections are performed over a set of Segments. The injection type must be provided. For injtype::injtype_user, make sure you call SetWave().
[in] | aInSegments | Input segments. |
[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. |
|
virtual |
Destructor of the InjGen class.
unsigned int InjGen::GenerateInjections | ( | void | ) |
Generates a set of injection parameters.
The injections are generated uniformly over the sky. They are spaced in time as set with SetInjectionTimeSpacing() and SetInjectionTimeJitter().
|
private |
Draws an amplitude parameter.
|
private |
Draws a eccentricity parameter.
|
private |
Draws a frequency parameter.
|
private |
Draws a polarization parameter.
|
private |
Draws a sigma parameter.
bool InjGen::SetAmplitudeDistribution | ( | const string | aDistribution = "LOG" | ) |
Sets the injection amplitude distribution.
Amplitudes can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").
[in] | aDistribution | Distribution type. |
|
inline |
Sets the injection amplitude range.
[in] | aMin | Minimum amplitude. |
[in] | aMax | Maximum amplitude. |
bool InjGen::SetEccentricityDistribution | ( | const string | aDistribution = "UNIFORM" | ) |
Sets the injection eccentricity distribution.
Eccentricities can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").
[in] | aDistribution | Distribution type. |
|
inline |
Sets the injection eccentricity range.
[in] | aMin | Minimum eccentricity. |
[in] | aMax | Maximum eccentricity. |
bool InjGen::SetFrequencyDistribution | ( | const string | aDistribution = "LOG" | ) |
Sets the injection frequency distribution.
Frequencies can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").
[in] | aDistribution | Distribution type. |
|
inline |
Sets the injection frequency range.
[in] | aMin | Minimum frequency [Hz]. |
[in] | aMax | Maximum frequency [Hz]. |
|
inline |
Sets the maximum time jitter [s].
The time distance between 2 consecutive injections is set with SetInjectionTimeSpacing(). This function adds a random jitter between -aJitter and +aJitter.
[in] | aJitter | Time jitter [s]. |
|
inline |
Sets the time distance between 2 consecutive injections.
[in] | aSpacing | Time distance between 2 consecutive injections [s]. |
bool InjGen::SetPolarizationDistribution | ( | const string | aDistribution = "UNIFORM" | ) |
Sets the injection polarization distribution.
Polarizations can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").
[in] | aDistribution | Distribution type. |
|
inline |
Sets the injection polarization range.
[in] | aMin | Minimum polarization [rad]. |
[in] | aMax | Maximum polarization [rad]. |
bool InjGen::SetSigmaDistribution | ( | const string | aDistribution = "LOG" | ) |
Sets the injection sigma distribution.
Sigmas can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").
[in] | aDistribution | Distribution type. |
|
inline |
Sets the injection sigma range.
[in] | aMin | Minimum sigma [s]. |
[in] | aMax | Maximum sigma [s]. |
|
private |
0=UNIFORM, 1=LOG/10
|
private |
amplitude max
|
private |
amplitude min
|
private |
0=UNIFORM, 1=LOG/10
|
private |
eccentricity max
|
private |
eccentricity min
|
private |
0=UNIFORM, 1=LOG/10
|
private |
frequency max
|
private |
frequency min
|
private |
Injection maximum time jitter [s].
|
private |
Injection spacing [s].
|
private |
Input segments - DO NOT DELETE.
|
private |
0=UNIFORM, 1=LOG/10
|
private |
psi max
|
private |
psi min
|
private |
Random generator.
|
private |
0=UNIFORM, 1=LOG/10
|
private |
sigma max
|
private |
sigma min