GWOLLUM 4.2.0
Tools for gravitational-wave analyses
Loading...
Searching...
No Matches
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.
bool SetAmplitudeDistribution (const string aDistribution="LOG")
 Sets the injection amplitude distribution.
void SetAmplitudeRange (const double aMin=1e-22, const double aMax=5e-19)
 Sets the injection amplitude range.
bool SetEccentricityDistribution (const string aDistribution="UNIFORM")
 Sets the injection eccentricity distribution.
void SetEccentricityRange (const double aMin=0.0, const double aMax=1.0)
 Sets the injection eccentricity range.
bool SetFrequencyDistribution (const string aDistribution="LOG")
 Sets the injection frequency distribution.
void SetFrequencyRange (const double aMin=30.0, const double aMax=2048.0)
 Sets the injection frequency range.
void SetInjectionTimeJitter (const double aJitter)
 Sets the maximum time jitter [s].
void SetInjectionTimeSpacing (const double aSpacing)
 Sets the time distance between 2 consecutive injections.
bool SetPolarizationDistribution (const string aDistribution="UNIFORM")
 Sets the injection polarization distribution.
void SetPolarizationRange (const double aMin=0.0, const double aMax=2.0 *TMath::Pi())
 Sets the injection polarization range.
bool SetSigmaDistribution (const string aDistribution="LOG")
 Sets the injection sigma distribution.
void SetSigmaRange (const double aMin=0.01, const double aMax=1.0)
 Sets the injection sigma range.
Constructors and destructors
 InjGen (Segments *aInSegments, const injtype aInjType, const string aInjName="gwl_inj", const unsigned int aVerbose=0)
 Constructor of the InjGen class.
virtual ~InjGen ()
 Destructor of the InjGen class.
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.
unsigned int GetN (void)
 Returns the current number of injections.
void Reset (void)
 Resets the injection TTree.
bool SetWave (TGraph *aHplus, TGraph *aHcross=NULL)
 Sets the user waveform for "Wave" injections.
bool Write (const string aRootFileName="./myinjections.root")
 Writes injections to disk.
 InjTre (const injtype aInjType, const string aInjName="gwl_inj", const unsigned int aVerbose=0)
 Constructor of the InjTre class.
virtual ~InjTre ()
 Destructor of the InjTre class.

Private Member Functions

double GetAmplitude (void)
 Draws an amplitude parameter.
double GetEccentricity (void)
 Draws a eccentricity parameter.
double GetFrequency (void)
 Draws a frequency parameter.
double GetPolarization (void)
 Draws a polarization parameter.
double GetSigma (void)
 Draws a sigma parameter.

Private Attributes

unsigned int ampDistribution
 0=UNIFORM, 1=LOG/10
double ampMax
 amplitude max
double ampMin
 amplitude min
unsigned int eccDistribution
 0=UNIFORM, 1=LOG/10
double eccMax
 eccentricity max
double eccMin
 eccentricity min
unsigned int f0Distribution
 0=UNIFORM, 1=LOG/10
double f0Max
 frequency max
double f0Min
 frequency min
double InjJitterMax
 Injection maximum time jitter [s].
double InjSpacing
 Injection spacing [s].
SegmentsInSegments
 Input segments - DO NOT DELETE.
unsigned int psiDistribution
 0=UNIFORM, 1=LOG/10
double psiMax
 psi max
double psiMin
 psi min
TRandom3 * rand
 Random generator.
unsigned int sigmaDistribution
 0=UNIFORM, 1=LOG/10
double sigmaMax
 sigma max
double sigmaMin
 sigma min

Additional Inherited Members

Protected Attributes inherited from InjTre
Monitormon
 Class monitor.

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: