Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CWB_Plugin_QLWveto.C
Go to the documentation of this file.
1 #define XIFO 4
2 
3 #pragma GCC system_header
4 
5 #include "cwb.hh"
6 #include "config.hh"
7 #include "network.hh"
8 #include "wavearray.hh"
9 #include "TString.h"
10 #include "TObjArray.h"
11 #include "TObjString.h"
12 #include "TRandom.h"
13 #include "TComplex.h"
14 #include "TMath.h"
15 #include "mdc.hh"
16 #include "watplot.hh"
17 #include "gwavearray.hh"
18 #include <vector>
19 
20 //#define PLOT_LIKELIHOOD
21 //#define PLOT_WHITENED_WAVEFORMS
22 
23 #define NTHR 1
24 #define ATHR 7.58859
25 
27 void GetLveto(netcluster* pwc, int cid, int nifo, float* Lveto);
28 void GetWveto(netcluster* pwc, int cid, int nifo, float* Wveto);
30  CWB::config* cfg, bool fft=false, bool strain=false);
32 
33 
34 void
36 //!MISCELLANEA
37 // Extract whitened reconstructed waveforms, and compute the Qveto, Lveto & Wveto parameters
38 
39  cout << endl;
40  cout << "-----> CWB_Plugin_QLWveto.C" << endl;
41  cout << "ifo " << ifo.Data() << endl;
42  cout << "type " << type << endl;
43  cout << endl;
44 
45  float Qveto[2*NIFO_MAX]; // Qveto
46  float Lveto[3]; // Lveto
47  float Wveto[2]; // Wveto
48 
49  if(type==CWB_PLUGIN_CONFIG) {
50  cfg->outPlugin=true; // disable built-in output root file
51  }
52 
53  if(type==CWB_PLUGIN_ILIKELIHOOD) {
54  NET->wfsave=true; // enable waveform save
55 
56  // search output root file in the system list
57  TFile* froot = NULL;
58  TList *files = (TList*)gROOT->GetListOfFiles();
59  TString outDump="";
60  netevent* EVT;
61  int nIFO = NET->ifoListSize(); // number of detectors
62  if (files) {
63  TIter next(files);
64  TSystemFile *file;
65  TString fname;
66  bool check=false;
67  while ((file=(TSystemFile*)next())) {
68  fname = file->GetName();
69  // set output root file as the current file
70  if(fname.Contains("wave_")) {
71  froot=(TFile*)file;froot->cd();
72  outDump=fname;
73  outDump.ReplaceAll(".root.tmp",".txt");
74  //cout << "output file name : " << fname << endl;
75  }
76  }
77  if(!froot) {
78  cout << "CWB_Plugin_QLWveto.C : Error - output root file not found" << endl;
79  gSystem->Exit(1);
80  }
81  } else {
82  cout << "CWB_Plugin_QLWveto.C : Error - output root file not found" << endl;
83  gSystem->Exit(1);
84  }
85 
86  TTree* net_tree = (TTree *) froot->Get("waveburst");
87  if(net_tree==NULL) {
88  EVT = new netevent(nIFO);
89  net_tree = EVT->setTree();
90  net_tree->Branch("Qveto",Qveto,TString::Format("Qveto[%i]/F",2*cfg->nIFO));
91  net_tree->Branch("Lveto",Lveto,TString::Format("Lveto[%i]/F",3));
92  net_tree->Branch("Wveto",Wveto,TString::Format("Wveto[%i]/F",2));
93  }
94  }
95 
96  if(type==CWB_PLUGIN_OLIKELIHOOD) {
97 
98  if(TString(cfg->analysis)!="2G") {
99  cout << "CWB_Plugin_QLWveto.C -> "
100  << "CWB_PLUGIN_OLIKELIHOOD implemented only for 2G" << endl;
101  gSystem->Exit(1);
102  }
103 
104  // import ifactor
105  int gIFACTOR=-1; IMPORT(int,gIFACTOR)
106  cout << "-----> CWB_Plugin_QLWveto.C -> "
107  << " gIFACTOR : " << gIFACTOR << endl;
108 
109  // import slagShift
110  float* gSLAGSHIFT=NULL; IMPORT(float*,gSLAGSHIFT)
111 
112  int nIFO = NET->ifoListSize(); // number of detectors
113  int K = NET->nLag; // number of time lag
114  netevent* EVT;
116  //double factor = cfg->simulation==3||cfg->simulation==4 ? -gIFACTOR : cfg->factors[gIFACTOR];
117  double factor = cfg->factors[gIFACTOR];
118  int rate = 0; // select all resolutions
119 
120  // search output root file in the system list
121  TFile* froot = NULL;
122  TList *files = (TList*)gROOT->GetListOfFiles();
123  TString outDump="";
124  if (files) {
125  TIter next(files);
126  TSystemFile *file;
127  TString fname;
128  bool check=false;
129  while ((file=(TSystemFile*)next())) {
130  fname = file->GetName();
131  // set output root file as the current file
132  if(fname.Contains("wave_")) {
133  froot=(TFile*)file;froot->cd();
134  outDump=fname;
135  outDump.ReplaceAll(".root.tmp",".txt");
136  //cout << "output file name : " << fname << endl;
137  }
138  }
139  if(!froot) {
140  cout << "CWB_Plugin_QLWveto.C : Error - output root file not found" << endl;
141  gSystem->Exit(1);
142  }
143  } else {
144  cout << "CWB_Plugin_QLWveto.C : Error - output root file not found" << endl;
145  gSystem->Exit(1);
146  }
147 
148  TTree* net_tree = (TTree *) froot->Get("waveburst");
149  if(net_tree!=NULL) {
150  EVT = new netevent(net_tree,nIFO);
151  net_tree->SetBranchAddress("Qveto",Qveto);
152  net_tree->SetBranchAddress("Lveto",Lveto);
153  net_tree->SetBranchAddress("Wveto",Wveto);
154  } else {
155  EVT = new netevent(nIFO);
156  net_tree = EVT->setTree();
157  net_tree->Branch("Qveto",Qveto,TString::Format("Qveto[%i]/F",2*cfg->nIFO));
158  net_tree->Branch("Lveto",Lveto,TString::Format("Lveto[%i]/F",3));
159  net_tree->Branch("Wveto",Wveto,TString::Format("Wveto[%i]/F",2));
160  }
161  EVT->setSLags(gSLAGSHIFT); // set slags into netevent
162 
163  for(int k=0; k<K; k++) { // loop over the lags
164 
165  id = NET->getwc(k)->get(const_cast<char*>("ID"), 0, 'L', rate);
166 
167  for(int j=0; j<(int)id.size(); j++) { // loop over cluster index
168 
169  int ID = size_t(id.data[j]+0.5);
170 
171  if(NET->getwc(k)->sCuts[ID-1]!=-1) continue; // skip rejected/processed clusters
172 
173  double ofactor=0;
174  if(cfg->simulation==4) ofactor=-factor;
175  else if(cfg->simulation==3) ofactor=-gIFACTOR;
176  else ofactor=factor;
177 
178  EVT->output2G(NULL,NET,ID,k,ofactor); // get reconstructed parameters
179 
180  wavearray<double>** pwfREC = new wavearray<double>*[nIFO];
181  detector* pd = NET->getifo(0);
182  int idSize = pd->RWFID.size();
183 
184  int wfIndex=-1;
185  for (int mm=0; mm<idSize; mm++) if (pd->RWFID[mm]==ID) wfIndex=mm;
186  if(wfIndex==-1) continue;
187 
188  netcluster* pwc = NET->getwc(k);
189  cout << endl << "----------------------------------------------------------------" << endl;
190  GetLveto(pwc, ID, nIFO, Lveto);
191  cout << "Lveto : " << "fmean : " << Lveto[0] << " frms : " << Lveto[1]
192  << " Energy Ratio : " << Lveto[2] << endl << endl;
193  GetWveto(pwc, ID, nIFO, Wveto);
194  cout << "Wveto : " << " Slope : " << Wveto[0] << " Correlation : " << Wveto[1] << endl << endl;
195 
196  // extract whitened reconstructed waveforms
197  for(int n=0; n<nIFO; n++) {
198 
199  pd = NET->getifo(n);
200 
201  pwfREC[n] = pd->RWFP[wfIndex];
202  wavearray<double>* wfREC = pwfREC[n]; // array of reconstructed waveforms
203 
204 #ifdef PLOT_WHITENED_WAVEFORMS
205  //PlotWaveform(NET->ifoName[n], wfREC, cfg, false, false);
206  PlotWaveform(NET->ifoName[n], wfREC, cfg, true, false);
207 #endif
208  // reconstructed whitened waveform
209  NET->getMRAwave(ID,k,'S',0,true);
210  Qveto[n] = GetQveto(&(pd->waveForm));
211  // whitened waveform
212  NET->getMRAwave(ID,k,'W',0,true);
213  Qveto[n+nIFO] = GetQveto(&(pd->waveBand));
214 
215  //Qveto[n] = GetQveto(wfREC);
216  cout << "Qveto : " << pd->Name << " Qveto[R] = " << Qveto[n]
217  << " Qveto[W] = " << Qveto[n+nIFO] << endl;
218 
219  if(!cfg->simulation) ClearWaveforms(pd); // release waveform memory
220  }
221  cout << "----------------------------------------------------------------" << endl;
222  delete [] pwfREC;
223 
224  std::vector<int> sCuts = NET->getwc(k)->sCuts; // save cCuts
225  // set sCuts=1 to the events which must be not copied with cps to pwc
226  for(int i=0; i<(int)sCuts.size(); i++) if(i!=ID-1) NET->getwc(k)->sCuts[i]=1;
227 
228  // ID can not be used to get the event, to get event use ID=1 (ex: for watplot)
229  NET->getwc(k)->sCuts = sCuts; // restore cCuts
230 
231  if(cfg->dump) EVT->dopen(outDump.Data(),const_cast<char*>("a"),false);
232  EVT->output2G(net_tree,NET,ID,k,ofactor); // get reconstructed parameters
233  if(cfg->dump) {
234  // add Qveto to dump file
235  fprintf(EVT->fP,"Qveto: ");
236  for(int i=0; i<2*nIFO; i++) fprintf(EVT->fP,"%f ",Qveto[i]);
237  fprintf(EVT->fP,"\n");
238  // add Lveto to dump file
239  fprintf(EVT->fP,"Lveto: ");
240  for(int i=0; i<3; i++) fprintf(EVT->fP,"%f ",Lveto[i]);
241  fprintf(EVT->fP,"\n");
242  // add Wveto to dump file
243  fprintf(EVT->fP,"Wveto: ");
244  for(int i=0; i<2; i++) fprintf(EVT->fP,"%f ",Wveto[i]);
245  fprintf(EVT->fP,"\n");
246  }
247  if(cfg->dump) EVT->dclose();
248  if(!cfg->cedDump) NET->getwc(k)->sCuts[ID-1]=1; // mark as processed
249  }
250  }
251 
252  jfile->cd();
253  if(EVT) delete EVT;
254  }
255  return;
256 }
257 
258 float
260 
261  wavearray<double> x = *wf;;
262 
263  // resample data by a factor 4
264  int xsize=x.size();
265  x.FFTW(1);
266  x.resize(4*x.size());
267  x.rate(4*x.rate());
268  for(int j=xsize;j<x.size();j++) x[j]=0;
269  x.FFTW(-1);
270 
271  // extract max/min values and save the absolute values in the array 'a'
272  wavearray<double> a(x.size());
273  int size=0;
274  double dt = 1./x.rate();
275  double prev=x[0];
276  double xmax=0;
277  for (int i=1;i<x.size();i++) {
278  if(fabs(x[i])>xmax) xmax=fabs(x[i]);
279  if(prev*x[i]<0) {
280  a[size]=xmax;
281  size++;
282  xmax=0;
283  }
284  prev=x[i];
285  }
286 
287  // find max value/index ans save on amax/imax
288  int imax=-1;
289  double amax=0;
290  for (int i=1;i<size;i++) {
291  if(a[i]>amax) {amax=a[i];imax=i;}
292  }
293 
294 /*
295  cout << endl;
296  cout << "a[imax-2] " << a[imax-2] << endl;
297  cout << "a[imax-1] " << a[imax-1] << endl;
298  cout << "a[imax] " << a[imax] << endl;
299  cout << "a[imax+1] " << a[imax+1] << endl;
300  cout << "a[imax+2] " << a[imax+2] << endl;
301  cout << endl;
302 */
303 
304  // compute Qveto
305  double ein=0; // energy of max values inside NTHR
306  double eout=0; // energy of max values outside NTHR
307  for (int i=0;i<size;i++) {
308  if(abs(imax-i)<=NTHR) {
309  ein+=a[i]*a[i];
310  //cout << i << " ein " << a[i] << " " << amax << endl;
311  } else {
312  if(a[i]>amax/ATHR) eout+=a[i]*a[i];
313  //if(a[i]>amax/ATHR) cout << i << " eout " << a[i] << " " << amax << endl;
314  }
315  }
316  float Qveto = ein>0 ? eout/ein : 0.;
317  //cout << "Qveto : " << Qveto << " ein : " << ein << " eout : " << eout << endl;
318 
319  return Qveto;
320 }
321 
322 void
323 GetLveto(netcluster* pwc, int cid, int nifo, float* Lveto) {
324 //
325 // input
326 // pwc : pointer to netcluster object
327 // cid : cluster id
328 // nifo : number of detectors
329 // output
330 // Lveto[0] : line frequency
331 // Lveto[1] : line bandwitdh
332 // Lveto[2] : line enery ratio (line_energy / total_energy)
333 //
334 
335  Lveto[0] = Lveto[1] = Lveto[2] = 0;
336 
337  std::vector<int>* vint = &(pwc->cList[cid-1]); // pixel list
338  int V = vint->size(); // cluster size
339  if(!V) return;
340 
341  // ------------------------------------------------------------------
342  // Find max pixel parameters
343  // ------------------------------------------------------------------
344 
345  double likeMax=0; // maximum pixel's energy
346  double likeTot=0; // total cluster energy
347  double freqMax; // frequency of the pixel with max energy
348  double dfreqMax; // df of the pixel with max energy
349  for(int n=0; n<V; n++) {
350  netpixel* pix = pwc->getPixel(cid,n);
351  if(pix->layers%2==0) {
352  cout << "CWB_Plugin_QLWveto.C - Error : is enabled only for WDM (2G)" << endl;
353  exit(1);
354  }
355  if(!pix->core) continue; // select only the principal components pixels
356 
357  double likePix=0;
358  for(int m=0; m<nifo; m++) {
359  likePix += pow(pix->getdata('S',m),2); // like whitened reconstructed signal 00
360  likePix += pow(pix->getdata('P',m),2); // like whitened reconstructed signal 90
361  }
362 
363  double freq = pix->frequency*pix->rate/2.;
364  double df = pix->rate/2.;
365 
366  likeTot+=likePix;
367  if(likePix>likeMax) {likeMax=likePix;freqMax=freq;dfreqMax=df;}
368  }
369  //cout << "likeMax : " << likeMax << " likeTot : " << likeTot
370  // << " freqMax : " << freqMax << " dfreqMax : " << dfreqMax << endl;
371 
372  // ------------------------------------------------------------------
373  // Compute Lveto parameters
374  // ------------------------------------------------------------------
375 
376  double fmean=0; // line mean frequency
377  double frms=0; // line bandwidth
378  double likeLin=0; // line energy
379  for(int n=0; n<V; n++) {
380  netpixel* pix = pwc->getPixel(cid,n);
381  if(!pix->core) continue; // select only the principal components pixels
382 
383  double likePix=0;
384  for(int m=0; m<nifo; m++) {
385  likePix += pow(pix->getdata('S',m),2); // like whitened reconstructed signal 00
386  likePix += pow(pix->getdata('P',m),2); // like whitened reconstructed signal 90
387  }
388 
389  // the estimation is done for all pixels
390  // with freq in the range [freqMax-dfreqMax, freqMax+dfreqMax]
391  double freq = pix->frequency*pix->rate/2.;
392  if(fabs(freq-freqMax)<=dfreqMax) {
393  likeLin += likePix;
394  fmean += likePix*freq;
395  frms += likePix*freq*freq;
396  }
397  }
398 
399  fmean = fmean/likeLin;
400  frms = frms/likeLin-fmean*fmean;
401  frms = frms>0 ? sqrt(frms) : 0.;
402 
403  if(frms<dfreqMax/2.) frms=dfreqMax/2.;
404 
405  // ------------------------------------------------------------------
406  // Save Lveto parameters
407  // ------------------------------------------------------------------
408 
409  Lveto[0] = fmean; // line mean frequency
410  Lveto[1] = frms; // line bandwidth
411  Lveto[2] = likeTot>0. ? likeLin/likeTot : 0.; // energy ratio energy inside_line/total
412 
413  // ------------------------------------------------------------------
414  // plot time-frequency energy
415  // ------------------------------------------------------------------
416 
417 #if defined PLOT_LIKELIHOOD
418  watplot WTS(const_cast<char*>("wts"));
419  WTS.plot(pwc, cid, nifo, 'L', 0, const_cast<char*>("COLZ"));
420  WTS.canvas->Print("l_tfmap_scalogram.png");
421 #endif
422 
423  return;
424 }
425 
426 void
427 GetWveto(netcluster* pwc, int cid, int nifo, float* Wveto) {
428 //
429 // input
430 // pwc : pointer to netcluster object
431 // cid : cluster id
432 // nifo : number of detectors
433 // output
434 // Wveto[0] : whistle slope
435 // Wveto[1] : whistle correlation
436 //
437 
438  Wveto[0] = Wveto[1] = 0;
439 
440  std::vector<int>* vint = &(pwc->cList[cid-1]); // pixel list
441  int V = vint->size(); // cluster size
442  if(!V) return;
443 
444  std::vector<double> x;
445  std::vector<double> y;
446  std::vector<double> w;
447 
448  // extract pixels
449  for(int j=0; j<V; j++) {
450  netpixel* pix = pwc->getPixel(cid,j);
451  if(pix->layers%2==0) {
452  cout << "CWB_Plugin_QLWveto.C - Error : is enabled only for WDM (2G)" << endl;
453  exit(1);
454  }
455  if(pix->likelihood<1. || pix->frequency==0) continue;
456  //if(!pix->core) continue; // select only the principal components pixels
457 
458  double time = int(double(pix->time)/pix->layers)/pix->rate; // time in seconds from the start
459  double freq = pix->frequency*pix->rate/2.;
460 
461  x.push_back(time);
462  y.push_back(freq);
463  w.push_back(pix->likelihood);
464  }
465  int size = x.size();
466  if(size<5) return;
467 
468  double xcm, ycm, qxx, qyy, qxy, ew;
469  xcm = ycm = qxx = qyy = qxy = ew = 0;
470 
471  for(int i=0; i<size; ++i) {
472  xcm += x[i]*w[i];
473  ycm += y[i]*w[i];
474  ew += w[i];
475  }
476  xcm /= ew;
477  ycm /= ew;
478 
479  for(int i=0; i<size; ++i) {
480  qxx += (x[i] - xcm)*(x[i] - xcm)*w[i];
481  qyy += (y[i] - ycm)*(y[i] - ycm)*w[i];
482  qxy += (x[i] - xcm)*(y[i] - ycm)*w[i];
483  }
484 
485  double beta = qxy/qxx; // slope
486  double alpha = ycm-beta*xcm; // intercept
487  double corr = qxy/sqrt(qxx*qyy); // correlation
488  double duration = sqrt(qxx/ew); // duration
489  double bandwidth = sqrt(qyy/ew); // bandwidth
490 
491  //printf("alpha : %lf , beta : %lf , corr : %lf, dur : %lf , bw : %lf \n",
492  // alpha, beta, corr, duration, bandwidth);
493 
494  Wveto[0] = beta; // slope
495  Wveto[1] = fabs(corr); // correlation
496 
497  return;
498 }
499 
500 void
502  CWB::config* cfg, bool fft, bool strain) {
503 
504  watplot PTS(const_cast<char*>("ptswrc"),200,20,800,500);
505 
506  //cout << "Print " << fname << endl;
507  double tmin = wfREC->start();
508  wfREC->start(wfREC->start()-tmin);
509  if(fft) {
510  PTS.plot(wfREC, const_cast<char*>("ALP"), 1, 0, 0, true, cfg->fLow, cfg->fHigh);
511  } else {
512  PTS.plot(wfREC, const_cast<char*>("ALP"), 1, 0, 0);
513  }
514  PTS.graph[0]->SetLineWidth(1);
515  wfREC->start(wfREC->start()+tmin);
516 
517  char label[64]="";
518  if(fft) sprintf(label,"%s","fft");
519  else sprintf(label,"%s","time");
520  if(strain) sprintf(label,"%s_%s",label,"strain");
521  else sprintf(label,"%s_%s",label,"white");
522 
523  char fname[1024];
524  //sprintf(fname, "%s_wf_%s_rec_gps_%d.root",ifo.Data(),label,int(tmin));
525  sprintf(fname, "%s_wf_%s_rec_gps_%d.png",ifo.Data(),label,int(tmin));
526  PTS.canvas->Print(fname);
527  cout << "write : " << fname << endl;
528  //PTS.canvas->Write(REPLACE(fname,dirCED,gtype));
529 }
530 
531 void
533 
534  int n;
535 
536  n = ifo->IWFP.size();
537  for (int i=0;i<n;i++) {
539  delete wf;
540  }
541  ifo->IWFP.clear();
542  ifo->IWFID.clear();
543 
544  n = ifo->RWFP.size();
545  for (int i=0;i<n;i++) {
547  delete wf;
548  }
549  ifo->RWFP.clear();
550  ifo->RWFID.clear();
551 }
552 
std::vector< char * > ifoName
Definition: network.hh:591
detector * getifo(size_t n)
param: detector index
Definition: network.hh:418
CWB::config * cfg
Definition: TestCWB_Plugin.C:5
char analysis[8]
Definition: config.hh:99
TString outDump
virtual size_t size() const
Definition: wavearray.hh:127
size_t nLag
Definition: network.hh:555
double duration
void setSLags(float *slag)
Definition: netevent.cc:404
fprintf(stdout,"start=%f duration=%f rate=%f\n", x.start(), x.size()/x.rate(), x.rate())
virtual void rate(double r)
Definition: wavearray.hh:123
float GetQveto(wavearray< double > *wf)
wavearray< double > a(hp.size())
size_t frequency
Definition: netpixel.hh:93
float likelihood
Definition: netpixel.hh:96
int n
Definition: cwb_net.C:10
cout<< "skymap size : "<< L<< endl;for(int l=0;l< L;l++) sm.set(l, l);sm > const_cast< char * >("skymap.dat")
double beta
TTree * setTree()
Definition: netevent.cc:412
TString("c")
int ID
Definition: TestMDC.C:70
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<< "\t layers : "<< nLAYERS<< "\t dF(hz) : "<< dF<< "\t 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
wavearray< double > get(char *name, size_t index=0, char atype='R', int type=1, bool=true)
param: string with parameter name param: index in the amplitude array, which define detector param: c...
Definition: netcluster.cc:2188
std::vector< wavearray< double > * > RWFP
Definition: detector.hh:364
double fLow
Definition: config.hh:122
netpixel pix(nifo)
netcluster * pwc
Definition: cwb_job_obj.C:20
std::vector< TGraph * > graph
Definition: watplot.hh:176
bool cedDump
Definition: config.hh:279
waveform wf
Long_t size
WSeries< double > waveBand
Definition: detector.hh:338
size_t layers
Definition: netpixel.hh:94
int m
Definition: cwb_net.C:10
std::vector< vector_int > cList
Definition: netcluster.hh:379
virtual void start(double s)
Definition: wavearray.hh:119
int j
Definition: cwb_net.C:10
bool getMRAwave(size_t ID, size_t lag, char atype='S', int mode=0, bool tof=false)
Definition: network.cc:3635
i drho i
void plot(wavearray< double > &, char *=NULL, int=1, double=0., double=0., bool=false, float=0., float=0., bool=false, float=0., bool=false)
Definition: watplot.cc:132
bool outPlugin
Definition: config.hh:351
bool core
Definition: netpixel.hh:102
char ifo[NIFO_MAX][8]
void dopen(const char *fname, char *mode, bool header=true)
Definition: netevent.hh:291
size_t ifoListSize()
Definition: network.hh:413
wavearray< double > w
Definition: Test1.C:27
#define nIFO
TCanvas * canvas
Definition: watplot.hh:174
double factor
double time[6]
Definition: cbc_plots.C:435
jfile
Definition: cwb_job_obj.C:25
void output2G(TTree *, network *, size_t, int, double)
Definition: netevent.cc:687
TTree * net_tree
int simulation
Definition: config.hh:181
void GetLveto(netcluster *pwc, int cid, int nifo, float *Lveto)
#define IMPORT(TYPE, VAR)
Definition: cwb.hh:51
watplot * WTS
Definition: ChirpMass.C:115
i() int(T_cor *100))
network NET
Definition: cwb_dump_inj.C:12
TString label
Definition: MergeTrees.C:21
const int NIFO_MAX
Definition: wat.hh:4
int gIFACTOR
TIter next(twave->GetListOfBranches())
char fname[1024]
void GetWveto(netcluster *pwc, int cid, int nifo, float *Wveto)
std::vector< int > RWFID
Definition: detector.hh:363
int k
std::vector< wavearray< double > * > IWFP
Definition: detector.hh:361
size_t time
Definition: netpixel.hh:92
std::vector< int > IWFID
Definition: detector.hh:360
TFile * froot
netpixel * getPixel(size_t n, size_t i)
Definition: netcluster.hh:395
double dt
virtual void FFTW(int=1)
Definition: wavearray.cc:878
int nifo
FILE * fP
injected reconstructed xcor waveform
Definition: netevent.hh:122
bool wfsave
Definition: network.hh:582
netevent EVT(itree, nifo)
std::vector< int > sCuts
Definition: netcluster.hh:374
WSeries< double > waveForm
Definition: detector.hh:337
void dclose()
Definition: netevent.hh:300
#define NTHR
double fHigh
Definition: config.hh:123
void CWB_Plugin(TFile *jfile, CWB::config *cfg, network *NET, WSeries< double > *x, TString ifo, int type)
COHERENCE.
char Name[16]
Definition: detector.hh:309
double fabs(const Complex &x)
Definition: numpy.cc:37
#define ATHR
string file
Definition: cwb_online.py:385
double df
netcluster * getwc(size_t n)
param: delay index
Definition: network.hh:421
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
int nIFO
Definition: config.hh:102
Long_t id
double factors[FACTORS_MAX]
Definition: config.hh:184
list files
Definition: cwb_online.py:529
float rate
Definition: netpixel.hh:95
double getdata(char type='R', size_t n=0)
Definition: netpixel.hh:56
virtual void resize(unsigned int)
Definition: wavearray.cc:445
int check
wavearray< double > y
Definition: Test10.C:31
void ClearWaveforms(detector *ifo)
void PlotWaveform(TString ifo, wavearray< double > *wfREC, CWB::config *cfg, bool fft=false, bool strain=false)
exit(0)
bool dump
Definition: config.hh:277