Logo coherent WaveBurst  
Library Reference Guide
Logo
GNGen.hh
Go to the documentation of this file.
1 /*
2 # Copyright (C) 2019 Sergey Klimenko, Valentin Necula, Vaibhav Tiwari
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17 
18 
19 #ifndef GNGEN_HH
20 #define GNGEN_HH
21 
22 #include "TRandom3.h"
23 #include "TH3F.h"
24 
25 class GNGen{
26 public:
27  // all masses in units of solar mass
28  GNGen(double mSMBH, double mmin, double mmax, double beta=2);
29  GNGen(const GNGen& x);
30  ~GNGen();
31 
32  //
33  void setFreqCutoff(double f);
34 
35  // prints or saves in a file a list of m1, m2, rp, e values to be used by PN codes!
36  void generateEvents(int n, char* fn=0);
37 
38  // generates m1, m2, rp, e (with evolution of orbit to higher frequency)
39  // returns leading order merger time estimate (not very accurate)
40  double generateEvent(double& m1, double& m2, double& rp, double& e);
41 
42 private:
43  double minM, maxM, beta, smbhM;
44  TH3F* dGammadmdMdr;
45  TRandom3 rnd;
46  double freqCutoff;
47  void EvolveRa(double m1, double m2, double& rp, double& ra);
48 };
49 
50 #endif
double m1
int n
Definition: cwb_net.C:28
cout<< endl;cout<< "ts size = "<< ts.size()<< " ts rate = "<< ts.rate()<< endl;tf.Forward(ts, wdm);int levels=tf.getLevel();cout<< "tf size = "<< tf.size()<< endl;double dF=tf.resolution();double dT=1./(2 *dF);cout<< "rate(hz) : "<< RATE<< "\ layers : "<< nLAYERS<< "\ dF(hz) : "<< dF<< "\ dT(ms) : "<< dT *1000.<< endl;int itime=TIME_PIXEL_INDEX;int ifreq=FREQ_PIXEL_INDEX;int index=(levels+1) *itime+ifreq;double time=itime *dT;double freq=(ifreq >0) ? ifreq *dF :dF/4;cout<< endl;cout<< "PIXEL TIME = "<< time<< " sec "<< endl;cout<< "PIXEL FREQ = "<< freq<< " Hz "<< endl;cout<< endl;wavearray< double > x
void generateEvents(int n, char *fn=0)
Definition: GNGen.cc:252
TH3F * dGammadmdMdr
Definition: GNGen.hh:44
cout<< "SNR "<< xsnr<< endl;wavearray< double > f
Definition: ComputeSNR.C:75
TRandom3 rnd
Definition: GNGen.hh:45
double ra
Definition: ConvertGWGC.C:46
~GNGen()
Definition: GNGen.cc:108
double rp
void setFreqCutoff(double f)
Definition: GNGen.cc:112
double minM
Definition: GNGen.hh:43
double e
Definition: GNGen.hh:25
double maxM
Definition: GNGen.hh:43
GNGen(double mSMBH, double mmin, double mmax, double beta=2)
Definition: GNGen.cc:37
double beta
Definition: GNGen.hh:43
double smbhM
Definition: GNGen.hh:43
double generateEvent(double &m1, double &m2, double &rp, double &e)
Definition: GNGen.cc:201
double m2
double mmax
void EvolveRa(double m1, double m2, double &rp, double &ra)
Definition: GNGen.cc:161
double mmin
double freqCutoff
Definition: GNGen.hh:46