GWOLLUM  4.2.0
Tools for gravitational-wave analyses
InjGen Class Reference

Generate a set of injections. More...

#include <InjGen.h>

Inheritance diagram for InjGen:
Collaboration diagram for InjGen:

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...
 
SegmentsInSegments
 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...
 

Detailed Description

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.

Author
Florent Robinet

Constructor & Destructor Documentation

◆ InjGen()

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().

Parameters
[in]aInSegmentsInput segments.
[in]aInjTypeInjection type: see InjTyp.h.
[in]aInjNameInjection name. Do not use white space, they will be repaced by "_".
[in]aVerboseVerbosity level.

◆ ~InjGen()

InjGen::~InjGen ( void  )
virtual

Destructor of the InjGen class.

Member Function Documentation

◆ GenerateInjections()

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().

Returns
The number of injections.
Todo:
Select the sky position for injections.

◆ GetAmplitude()

double InjGen::GetAmplitude ( void  )
private

Draws an amplitude parameter.

◆ GetEccentricity()

double InjGen::GetEccentricity ( void  )
private

Draws a eccentricity parameter.

◆ GetFrequency()

double InjGen::GetFrequency ( void  )
private

Draws a frequency parameter.

◆ GetPolarization()

double InjGen::GetPolarization ( void  )
private

Draws a polarization parameter.

◆ GetSigma()

double InjGen::GetSigma ( void  )
private

Draws a sigma parameter.

◆ SetAmplitudeDistribution()

bool InjGen::SetAmplitudeDistribution ( const string  aDistribution = "LOG")

Sets the injection amplitude distribution.

Amplitudes can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").

Parameters
[in]aDistributionDistribution type.

◆ SetAmplitudeRange()

void InjGen::SetAmplitudeRange ( const double  aMin = 1e-22,
const double  aMax = 5e-19 
)
inline

Sets the injection amplitude range.

Parameters
[in]aMinMinimum amplitude.
[in]aMaxMaximum amplitude.

◆ SetEccentricityDistribution()

bool InjGen::SetEccentricityDistribution ( const string  aDistribution = "UNIFORM")

Sets the injection eccentricity distribution.

Eccentricities can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").

Parameters
[in]aDistributionDistribution type.

◆ SetEccentricityRange()

void InjGen::SetEccentricityRange ( const double  aMin = 0.0,
const double  aMax = 1.0 
)
inline

Sets the injection eccentricity range.

Parameters
[in]aMinMinimum eccentricity.
[in]aMaxMaximum eccentricity.

◆ SetFrequencyDistribution()

bool InjGen::SetFrequencyDistribution ( const string  aDistribution = "LOG")

Sets the injection frequency distribution.

Frequencies can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").

Parameters
[in]aDistributionDistribution type.

◆ SetFrequencyRange()

void InjGen::SetFrequencyRange ( const double  aMin = 30.0,
const double  aMax = 2048.0 
)
inline

Sets the injection frequency range.

Parameters
[in]aMinMinimum frequency [Hz].
[in]aMaxMaximum frequency [Hz].

◆ SetInjectionTimeJitter()

void InjGen::SetInjectionTimeJitter ( const double  aJitter)
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.

Parameters
[in]aJitterTime jitter [s].

◆ SetInjectionTimeSpacing()

void InjGen::SetInjectionTimeSpacing ( const double  aSpacing)
inline

Sets the time distance between 2 consecutive injections.

Parameters
[in]aSpacingTime distance between 2 consecutive injections [s].
See also
SetInjectionTimeJitter()

◆ SetPolarizationDistribution()

bool InjGen::SetPolarizationDistribution ( const string  aDistribution = "UNIFORM")

Sets the injection polarization distribution.

Polarizations can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").

Parameters
[in]aDistributionDistribution type.

◆ SetPolarizationRange()

void InjGen::SetPolarizationRange ( const double  aMin = 0.0,
const double  aMax = 2.0*TMath::Pi() 
)
inline

Sets the injection polarization range.

Parameters
[in]aMinMinimum polarization [rad].
[in]aMaxMaximum polarization [rad].

◆ SetSigmaDistribution()

bool InjGen::SetSigmaDistribution ( const string  aDistribution = "LOG")

Sets the injection sigma distribution.

Sigmas can either be logarithmically distributed ("LOG") or uniformly distributed ("UNIFORM").

Parameters
[in]aDistributionDistribution type.

◆ SetSigmaRange()

void InjGen::SetSigmaRange ( const double  aMin = 0.01,
const double  aMax = 1.0 
)
inline

Sets the injection sigma range.

Parameters
[in]aMinMinimum sigma [s].
[in]aMaxMaximum sigma [s].

Member Data Documentation

◆ ampDistribution

unsigned int InjGen::ampDistribution
private

0=UNIFORM, 1=LOG/10

◆ ampMax

double InjGen::ampMax
private

amplitude max

◆ ampMin

double InjGen::ampMin
private

amplitude min

◆ eccDistribution

unsigned int InjGen::eccDistribution
private

0=UNIFORM, 1=LOG/10

◆ eccMax

double InjGen::eccMax
private

eccentricity max

◆ eccMin

double InjGen::eccMin
private

eccentricity min

◆ f0Distribution

unsigned int InjGen::f0Distribution
private

0=UNIFORM, 1=LOG/10

◆ f0Max

double InjGen::f0Max
private

frequency max

◆ f0Min

double InjGen::f0Min
private

frequency min

◆ InjJitterMax

double InjGen::InjJitterMax
private

Injection maximum time jitter [s].

◆ InjSpacing

double InjGen::InjSpacing
private

Injection spacing [s].

◆ InSegments

Segments* InjGen::InSegments
private

Input segments - DO NOT DELETE.

◆ psiDistribution

unsigned int InjGen::psiDistribution
private

0=UNIFORM, 1=LOG/10

◆ psiMax

double InjGen::psiMax
private

psi max

◆ psiMin

double InjGen::psiMin
private

psi min

◆ rand

TRandom3* InjGen::rand
private

Random generator.

◆ sigmaDistribution

unsigned int InjGen::sigmaDistribution
private

0=UNIFORM, 1=LOG/10

◆ sigmaMax

double InjGen::sigmaMax
private

sigma max

◆ sigmaMin

double InjGen::sigmaMin
private

sigma min


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