Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CWB_Plugin_MDC_OTF_Config_BRST.C
Go to the documentation of this file.
1 //!NOISE_MDC_SIMULATION
2 // Config Plugin to generate injected 'on the fly' Burst MDC
3 
4 {
5  #define GWGCCatalog "$CWB_GWAT/data/GWGCCatalog_Rev1d8.txt"
6 
7  #define SKY_RANDOM
8  //#define SKY_FIX
9  //#define SKY_GWGC
10 
11  cout << "Execute CWB_Plugin_MDC_OTF_Config_BRST.C ..." << endl;
12 
13  network** net;
15 
16  int seed = (*net)->nRun; // WARNING : seed must be the same for each detector within the same job
17 
20 
21  char wf_name[256];
23  vector<mdcpar> par;
24 
25  // declaration of the GA waveforms
26  par.resize(1);
27  double F_GA[4] = {0.0001,0.001,0.0025,0.004};
28  for(int n=0;n<4;n++) {
29  par[0].name="duration"; par[0].value=F_GA[n];
30  MDC->AddWaveform(MDC_GA, par);
31  }
32 
33  // declaration of the SGQ3 waveforms
34  par.resize(2);
35  double F_Q3[4] = {70,235,849,1615};
36  for(int n=0;n<4;n++) {
37  par[0].name="frequency"; par[0].value=F_Q3[n];
38  par[1].name="Q"; par[1].value=3.;
39  MDC->AddWaveform(MDC_SG, par);
40  }
41 
42  // declaration of the SGQ9 waveforms
43  par.resize(2);
44  double F_Q8d9[7] = {70,100,153,235,361,554,849};
45  for(int n=0;n<7;n++) {
46  par[0].name="frequency"; par[0].value=F_Q8d9[n];
47  par[1].name="Q"; par[1].value=8.9;
48  MDC->AddWaveform(MDC_SG, par);
49  }
50  double F_Q9[4] = {1053,1304,1615,2000};
51  for(int n=0;n<4;n++) {
52  par[0].name="frequency"; par[0].value=F_Q9[n];
53  par[1].name="Q"; par[1].value=9.;
54  MDC->AddWaveform(MDC_SG, par);
55  }
56 
57  // declaration of the SGQ100 waveforms
58  par.resize(2);
59  double F_Q100[4] = {70,235,849,1615};
60  for(int n=0;n<4;n++) {
61  par[0].name="frequency"; par[0].value=F_Q100[n];
62  par[1].name="Q"; par[1].value=100.;
63  MDC->AddWaveform(MDC_SG, par);
64  }
65 
66  // declaration of the WNB waveforms
67  par.resize(6);
68  double F_WNB[5] = {100,250,1000,1000,1000};
69  double B_WNB[5] = {100,100,10,1000,1000};
70  double D_WNB[5] = {0.1,0.1,0.1,0.1,0.01};
71  for(int n=0;n<5;n++) {
72  par[0].name="frequency"; par[0].value=F_WNB[n];
73  par[1].name="bandwidth"; par[1].value=B_WNB[n];
74  par[2].name="duration"; par[2].value=D_WNB[n];
75  for(int m=0;m<30;m++) {
76  par[3].name="pseed"; par[3].value=seed+100000+n*100+m;
77  par[4].name="xseed"; par[4].value=seed+100001+n*100+m;
78  par[5].name="mode"; par[5].value=1; // simmetric
79  MDC->AddWaveform(MDC_WNB, par);
80  }
81  }
82 
83  MDC->Print();
84 
85  // --------------------------------------------------------
86  // define injection parameters
87  // --------------------------------------------------------
88  MDC->SetInjHrss(2.5e-21); // injection hrss (the factors array in user_parameter.C file is used to rescale it)
89  MDC->SetInjRate(0.01); // injection rate (injections per sec)
90  MDC->SetInjJitter(10.0); // time jitter in sec
91 
92  // ---------------------------------------------------------------------------------------
93  // define sky distribution
94  // for a full description of the parameters see the CWB::mdc::SetSkyDistribution in mdc.cc
95  // ---------------------------------------------------------------------------------------
96 
97  // this example show how to set a random sky distribution
98 #ifdef SKY_RANDOM
99  par.resize(3);
100  par[0].name="entries"; par[0].value=100000; // number of entries randomly generated
101  par[1].name="rho_min"; par[1].value=0; // the source hrss is not rescaled
102  par[2].name="rho_max"; par[2].value=0; // the source hrss is not rescaled
103  MDC->SetSkyDistribution(MDC_RANDOM,par,seed); // random sky distribution (theta,phi,psi)
104 #endif
105 
106  // this example show how to set fix the injection parameters
107 #ifdef SKY_FIX
108  par.resize(6);
109  par[0].name="theta"; par[0].value=40;
110  par[1].name="phi"; par[1].value=70;
111  par[2].name="psi"; par[2].value=0;
112  par[3].name="rho"; par[3].value=1;
113  par[4].name="gps"; par[4].value=931158300;
114  par[5].name="iota"; par[5].value=0; // the angle iota (deg) is the inclination of the system
115  // which originates the burst with respect to the line of sight
116  // theta,phi are in earth greographical coordinates (latitude, longitude)
118 // theta,phi are in celestial coordinates (DEC, RA)
119 // MDC->SetSkyDistribution(MDC_CELESTIAL_FIX,par);
120 #endif
121 
122  // this example show how to use the Gravitational Wave Galaxy Catalog distribution
123 #ifdef SKY_GWGC
124  par.resize(1);
125  par[0].name="distance_thr"; par[0].value=50000; // Max source distance -> 50000 kPc
126  MDC->SetSkyDistribution(MDC_GWGC,gSystem->ExpandPathName(GWGCCatalog),par,seed);
127 #endif
128 
129 }
Definition: mdc.hh:189
double F_Q3[4]
void SetInjRate(double inj_rate=MDC_INJ_RATE)
Definition: mdc.hh:279
Definition: mdc.hh:128
int n
Definition: cwb_net.C:10
Definition: mdc.hh:151
double B_WNB[5]
int m
Definition: cwb_net.C:10
CWB_PLUGIN_IMPORT(network **, net)
mdcid AddWaveform(MDC_TYPE mdc_type, vector< mdcpar > par, TString uname="")
Definition: mdc.cc:445
void Print(int level=0)
Definition: mdc.cc:2707
void SetSkyDistribution(MDC_DISTRIBUTION sky_distribution, vector< mdcpar > par, int seed=0, bool add=false)
Definition: mdc.cc:3415
double F_GA[4]
network ** net
NOISE_MDC_SIMULATION.
Definition: mdc.hh:216
double F_WNB[5]
CWB::mdc * MDC
double F_Q100[4]
vector< mdcpar > par
#define GWGCCatalog
double F_Q8d9[7]
double D_WNB[5]
void SetInjJitter(double inj_jitter=MDC_INJ_JITTER)
Definition: mdc.hh:285
double F_Q9[4]
double e
Definition: mdc.hh:119
char wf_name[256]
void SetInjHrss(double inj_hrss=MDC_INJ_HRSS)
Definition: mdc.hh:275
Definition: mdc.hh:127