Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DrawMDCuserDet.C
Go to the documentation of this file.
2 
3 void DrawMDCuserDet() {
4  //
5  // Draw Builtin Waveform with the mdc class (for user defined detectors)
6  // Author : Gabriele Vedovato
7 
8  #include <vector>
9 
10  // --------------------------------------------------------
11  // define network
12  // --------------------------------------------------------
13 
14  int nIFO = 4;
15  char ifo[NIFO_MAX][4];
16  strcpy(ifo[0],"L1");
17  strcpy(ifo[1],""); // if empty then select user detectors
18  strcpy(ifo[2],""); // if empty then select user detectors
19  strcpy(ifo[3],"V1");
20 
22  {"L1", 30.5629, -90.7742, 0.0, 0, ( +90-197.716), 0, ( -197.716)},
23 
24  {"Y2", 46.4551, -119.408, 0.0, 0, ( +90-125.999), 0, ( +45-125.999)}, // H2 LCI
25  {"Y3", 46.4551, -119.408, 0.0, 0, ( +45-125.999), 0, ( -125.999)}, // H3 LCI
26 
27  {"V1", 43.6314, 10.5045, 0.0, 0, ( +90-70.5675), 0, ( -70.5675)},
28  };
29 
30  network NET;
32  for(int i=0; i<nIFO; i++) {
33  if(strlen(ifo[i])>0) pD[i] = new detector(ifo[i]); // built in detector
34  else pD[i] = new detector(detParms[i]); // user define detector
35  }
36  for(int i=0; i<nIFO; i++) NET.add(pD[i]);
37 
38  MDC = new CWB::mdc(&NET);
39 
40 /*
41  network* net = MDC->GetNetwork();
42  int nIFO=net->ifoListSize();
43  for(int n=0;n<nIFO;n++) cout << n << " " << net->ifoName[n] << endl;
44  detector *ppD[NIFO_MAX];
45  for(int n=0; n<nIFO; n++) ppD[n] = net->getifo(n);
46  double theta=100.;
47  double phi=50.;
48  double psi=10.;
49  wavecomplex F;
50 
51  for(int n=0; n<nIFO; n++) {
52  F = pD[n]->antenna(theta,phi,psi);
53  cout << n << " -> F+ : " << F.real() << " Fx : " << F.imag() << " " << pD[n]->getTau(theta,phi) << endl;
54  F = ppD[n]->antenna(theta,phi,psi);
55  cout << n << " -> F+ : " << F.real() << " Fx : " << F.imag() << " " << ppD[n]->getTau(theta,phi) << endl;
56  cout << endl;
57  }
58  exit(0);
59 */
60 
61  char wf_name[256];
62  waveform wf;
63  vector<mdcpar> par;
64 /*
65  par.resize(3);
66  par[0].name="frequency"; par[0].value=250.;
67  par[1].name="bandwidth"; par[1].value=100.;
68  par[2].name="duration"; par[2].value=0.1;
69  MDC->AddWaveform(MDC_WNB, par);
70 */
71 
72  par.resize(2);
73  par[0].name="frequency"; par[0].value=235.;
74  par[1].name="Q"; par[1].value=3.;
75  MDC->AddWaveform(MDC_SG, par);
76 
77 /*
78  par.resize(2);
79  par[0].name="frequency"; par[0].value=235.;
80  par[1].name="Q"; par[1].value=8.9;
81  MDC->AddWaveform(MDC_SG, par);
82 */
83 /*
84  par.resize(2);
85  par[0].name="frequency"; par[0].value=235.;
86  par[1].name="Q"; par[1].value=9.;
87  MDC->AddWaveform(MDC_SGC, par);
88 */
89  MDC->Print();
90 
91  // --------------------------------------------------------
92  // define injection parameters
93  // --------------------------------------------------------
94  MDC->SetInjHrss(2.5e-21);
95  MDC->SetInjRate(0.0333333);
96  MDC->SetInjJitter(10.0);
97 
98  // --------------------------------------------------------
99  // define sky distribution
100  // --------------------------------------------------------
101  par.resize(4);
102  par[0].name="theta"; par[0].value=30;
103  par[1].name="phi"; par[1].value=60;
104  par[2].name="psi"; par[2].value=0;
105  par[3].name="gps"; par[3].value=968650050;
107 
108 
109  int id=1;
110  MDC->Draw("Y2",968650000,968650100,id,MDC_TIME);
111  MDC->Draw("Y3",968650000,968650100,id,MDC_TIME,"SAME",2);
112 // MDC->Draw("L1",968650000,968650100,id,MDC_TIME,"SAME",3);
113 // MDC->Draw("V1",968650000,968650100,id,MDC_TIME,"SAME",5);
114 
115  //MDC->Draw("Y3",968650000,968650100,id,MDC_FFT);
116  //MDC->Draw("Y3",968650000,968650100,id,MDC_TF);
117 }
CWB::mdc * MDC
Definition: DrawMDCuserDet.C:1
Definition: mdc.hh:172
watplot * Draw(TString name, int id=0, TString polarization="hp", MDC_DRAW type=MDC_TIME, TString options="ALP", Color_t color=kBlack)
Definition: mdc.cc:2288
Definition: mdc.hh:189
size_t add(detector *)
param: detector structure return number of detectors in the network
Definition: network.cc:2528
void SetInjRate(double inj_rate=MDC_INJ_RATE)
Definition: mdc.hh:279
TString mdc[4]
waveform wf
i drho i
mdcid AddWaveform(MDC_TYPE mdc_type, vector< mdcpar > par, TString uname="")
Definition: mdc.cc:445
void Print(int level=0)
Definition: mdc.cc:2707
char ifo[NIFO_MAX][8]
void SetSkyDistribution(MDC_DISTRIBUTION sky_distribution, vector< mdcpar > par, int seed=0, bool add=false)
Definition: mdc.cc:3415
#define nIFO
Definition: mdc.hh:216
network NET
Definition: cwb_dump_inj.C:12
const int NIFO_MAX
Definition: wat.hh:4
void SetInjJitter(double inj_jitter=MDC_INJ_JITTER)
Definition: mdc.hh:285
vector< mdcpar > par
double e
Definition: mdc.hh:119
strcpy(RunLabel, RUN_LABEL)
char wf_name[256]
void SetInjHrss(double inj_hrss=MDC_INJ_HRSS)
Definition: mdc.hh:275
detectorParams detParms[4]
detector ** pD
void DrawMDCuserDet()
Definition: DrawMDCuserDet.C:3