Logo Coherent WaveBurst  
Reference Guide
Logo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cwb_net.C
Go to the documentation of this file.
1 // Coherent WaveBurst production script for GW network
2 {
4 
5  TB.checkFile(gSystem->Getenv("CWB_ROOTLOGON_FILE"));
6  TB.checkFile(gSystem->Getenv("CWB_PARAMETERS_FILE"));
7  TB.checkFile(gSystem->Getenv("CWB_UPARAMETERS_FILE"));
8 
9 
10  int i,j,n,m;
11 
12  if(search=='E' || search=='E') cout<<"\n un-modeled search (Energy): "<<SEARCH()<<endl;
13  if(search=='b' || search=='B') cout<<"\n un-modeled search (single stream): "<<SEARCH()<<endl;
14  if(search=='r' || search=='R') cout<<"\n un-modeled search (dual stream): "<<SEARCH()<<endl;
15  if(search=='i' || search=='I') cout<<"\n elliptical polarisation: "<<SEARCH()<<endl;
16  if(search=='g' || search=='G') cout<<"\n circular polarisation: "<<SEARCH()<<endl;
17  if(search=='s' || search=='S') cout<<"\n linear polarisation: "<<SEARCH()<<endl;
18 
19  // Check single detector mode
20  // if nIFO=1 the analysis is done as a network of 2 equal detectors
21  bool singleDetector=false;
22  if(nIFO==1) {
23  cout << "------> cWB in Sigle Detector Mode !!!" << endl;
24  singleDetector=true;
25  sprintf(ifo[1],"%s",ifo[0]);
26  strcpy(refIFO,ifo[0]);
29  strcpy(frFiles[2],frFiles[1]); // mdc frFiles
30  strcpy(frFiles[1],frFiles[0]);
31 
32  for(int i=0;i<nDQF;i++) DQF[i+nDQF]=DQF[i];
33  nDQF*=2;
34 
35  eDisbalance = false; // disable energy disbalance
36  lagSize = 1;
37  lagOff = 0;
38  mode = 1; // 1 - exclude duplicate delay configurations
39  delta = 0; // weak regulator
40  GAMMA() = 0; // force regulator not to be hard
41 
42  nIFO++;
43  }
44 
45 
46  cout<<" network of ";
47  for(i=0; i<nIFO; i++) cout<<ifo[i]<<" ";
48  cout<<" detectors\n\n";
49 
50 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
51 // declarations
52 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
53 
54  Meyer<double> B(1024); // set wavelet for resampling
55  Meyer<double> S(1024,2); // set wavelet for production
56 
59 
60  wavearray<double> x; // temporary time series
61  WSeries<double> wM; // mdc WSeries
62  WSeries<float> v[nIFO]; // noise variability
63  detector* pD[nIFO]; // pointers to detectors
64  WSeries<double>* pTF[nIFO]; // pointers to WSeries
65 
66  for(i=0; i<nIFO; i++) pD[i] = new detector(ifo[i]);
67 
68  network NET; // network
69 
70  for(i=0; i<nIFO; i++) NET.add(pD[i]);
72  NET.setAntenna();
73  NET.constraint(delta,GAMMA());
74  NET.setDelay(refIFO);
75  NET.Edge = segEdge;
76  NET.netCC = netCC;
77  NET.netRHO = netRHO;
78  NET.EFEC = EFEC;
79  NET.precision = precision;
80  NET.nSky = nSky;
82 
83  double mTau=NET.getDelay("MAX"); // maximum time delay
84  double dTau=NET.getDelay(); // time delay difference
85  cout<<"maximum time delay between detectors: "<<mTau<<endl;
86  cout<<" maximum time delay difference: "<<dTau<<endl;
87  cout<<" skymap search mode: "<<mode<<endl;
88  cout<<" skymap angular resolution: "<<angle<<endl;
89  cout<<" skymap size in polar angle: "<<Theta1<<", "<<Theta2<<endl;
90  cout<<" skymap size in azimuthal angle: "<<Phi1<<", "<<Phi2<<endl;
91  cout<<" netRHO and netCC: "<<netRHO<<", "<<netCC<<endl;
92  cout<<" regulator delta, local: "<<delta<<" "<<NET.local<<endl<<endl;
93 
94  injection mdc(nIFO);
95  livetime live;
96  netevent netburst(nIFO,Psave);
97  variability wavevar;
98  wavenoise noiserms;
99 
100  gSystem->Exec("/bin/date");
101  gSystem->Exec("/bin/hostname");
102  gRandom->SetSeed(0);
103 
104  // parse input
105 
106  int dump_infos_and_exit = TString(gSystem->Getenv("CWB_DUMP_INFOS_AND_EXIT")).Atoi();
107  int dump_sensitivity_and_exit = TString(gSystem->Getenv("CWB_DUMP_SENSITIVITY_AND_EXIT")).Atoi();
108 
109  TString srunID = TString(gSystem->Getenv("CWB_JOBID"));
110  runID = srunID.Atoi();
111 
112  cout<<"job ID: "<<runID<<endl;
113  cout<<"Output: "<<output_dir<<"\n label: "<<data_label<<endl;
114 
115  NET.setRunID(runID);
116 
117  // ---------------------------------------------------------------------
118  // CWB HISTORY INIT
119  // ---------------------------------------------------------------------
120 
121  CWB::Toolbox histTB;
122  char job_stage[256];
123  if(simulation==1) sprintf(job_stage,"SIMULATION");
124  else sprintf(job_stage,"PRODUCTION");
125 
126  char* cwbBuffer = histTB.getEnvCWB();
127  if(cwbBuffer!=NULL) {
128  history.AddHistory(job_stage, "CWB_ENV", cwbBuffer);
129  delete [] cwbBuffer;
130  }
131 
132  history.AddHistory(job_stage, "WATVERSION", watversion('s'));
133  history.AddHistory(job_stage, "WORKDIR", work_dir);
134  history.AddHistory(job_stage, "DATALABEL", data_label);
135 
136  char cmd_line[512]="";
137  for(int i=0;i<gApplication->Argc();i++) sprintf(cmd_line,"%s %s",cmd_line,gApplication->Argv(i));
138  history.AddHistory(job_stage, "CMDLINE", cmd_line);
139 
140  char* rootlogonBuffer = histTB.readFile("rootlogon.C");
141  if(rootlogonBuffer!=NULL) {
142  history.AddHistory(job_stage, "ROOTLOGON", rootlogonBuffer);
143  delete [] rootlogonBuffer;
144  }
145 
146  // save configuration files
147  TString cwb_parameters_name = TString(gSystem->Getenv("CWB_PARAMETERS_FILE"));
148  for(int i=0;i<gApplication->Argc()-1;i++) { // skip last argument (net.C)
149  if(TString(gApplication->Argv(i)).Contains(".C")) {
150  char* parametersBuffer = histTB.readFile(gApplication->Argv(i));
151  if(parametersBuffer!=NULL) {
152  if(TString(gApplication->Argv(i))==cwb_parameters_name) {
153  history.AddHistory(job_stage, "PARAMETERS", parametersBuffer);
154  } else {
155  history.AddLog(job_stage, parametersBuffer);
156  }
157  }
158  delete [] parametersBuffer;
159  }
160  }
161 
162  history.AddLog(job_stage, "START JOB");
163  int job_start_time=CWB::Time("now").GetGPS();
164 
165  // ---------------------------------------------------------------------
166  // JOB INIT
167  // ---------------------------------------------------------------------
168 
169  #include <vector>
170 
171  // cwb toolbox
173  CWB::Toolbox frTB[nIFO+1]; // the first nIFO positions contains the ifo frFiles, nIFO+1 contains the sim frFile
174  int nfrFiles[nIFO+1];
175  vector<waveSegment> detSegs;
176  vector<waveSegment> cat1List,cat2List;
177  int jobID;int slagID;int segID[20];
178  double mdcShift=0.;
179  vector<TString> ifos(nIFO);
180  for(int n=0;n<nIFO;n++) ifos[n]=ifo[n];
181 
182  if((simulation)&&((slagSize>1)||(lagSize!=1))) {
183  cout << "Error : slagSize<=1 & lagSize==1 in simulation mode !!!" << endl;exit(1);
184  }
185 
186  if(slagSize>0) { // SLAG Segments
187 
188  cout << endl << "START SLAG Init ..." << endl << endl;
189 
190  // get zero lag merged dq cat 1 list
191  // used only to get slagSegs && slagJobList
192  cat1List=slagTB.readSegList(nDQF, DQF, CWB_CAT1);
193 
194  // get number/list of possible super lag jobs
195  vector<waveSegment> slagJobList=slagTB.getSlagJobList(cat1List, segLen);
196  int slagSegs=slagJobList.size();
197 
198  // get super lag list
199  vector<slag> slagList=slagTB.getSlagList(nIFO, slagSize, slagSegs, slagOff, slagMin, slagMax, slagSite);
200 
201  // init slag structures
202  slag SLAG=slagTB.getSlag(slagList,runID);
203  if(SLAG.jobId!=runID) {cout << "jobID " << runID << " not found in the slag list !!!" << endl;exit(1);}
204  slagID = SLAG.slagId[0];
205  jobID = SLAG.jobId;
206  for(n=0; n<nIFO; n++) segID[n]=SLAG.segId[n];
207  cout << "SuperLag=" << slagID << " jobID=" << jobID;
208  for(n=0; n<nIFO; n++) cout << " segID[" << ifo[n] << "]=" << segID[n];cout << endl;
209 
210  // set slag shifts into the DQF structures
211  for(int n=0;n<nIFO;n++) ifos[n]=ifo[n];
212  slagTB.setSlagShifts(SLAG, ifos, segLen, nDQF, DQF);
213 
214  // get shifted merged dq cat 1 list
215  cat1List=slagTB.readSegList(nDQF, DQF, CWB_CAT1);
216 
217  // extract detector's slag segments range from dq cat 1
218  detSegs=slagTB.getSegList(SLAG, slagJobList, segLen, segMLS, segEdge, cat1List);
219  cout << "Slag Segments" << endl;
220 
221  cout << endl << "END SLAG Init ..." << endl << endl;
222 
223  } else { // Standard Segments
224 
225  jobID = runID;
226  slagID = 0;
227  for(int n=0;n<nIFO;n++) segID[n]=0;
228 
229  // get shifted merged dq cat 1 list
230  cat1List=slagTB.readSegList(nDQF, DQF, CWB_CAT1);
231 
232  // extract detector's segments range from dq cat 1
233  detSegs=slagTB.getSegList(jobID, nIFO, segLen, segMLS, segEdge, cat1List);
234  cout << "Standard Segments" << endl;
235  }
236 
237  // store slags in NET class
238  float slagShift[20];
239  for(n=0; n<nIFO; n++) slagShift[n]=(segID[n]-segID[0])*segLen;
240  slagShift[nIFO]=slagID;
241  netburst.setSLags(slagShift);
242 
243  // print detector's segments for this job
244  cout.precision(14);
245  for(int i=0;i<nIFO;i++) {
246  cout << "detSegs_dq1[" << ifo[i] << "] Range : " << detSegs[i].start << "-" << detSegs[i].stop << endl;
247  }
248  if(detSegs.size()==0) {cout << "no segments found for this job, job terminated !!!" << endl;exit(1);}
249 
250  // set & get frame file list
251  frfile FRF[nIFO+1];
252  for(n=0; n<nIFO; n++) {
253  nfrFiles[n]=frTB[n].frl2FrTree(frFiles[n]);
254  cout << ifo[n] << " -> nfrFiles : " << nfrFiles[n] << endl;
255  FRF[n] = frTB[n].getFrList(detSegs[n].start-dataShift[n], detSegs[n].stop-dataShift[n], segEdge); // dataShift
256  }
258  // set frame file list
259  nfrFiles[nIFO]=frTB[nIFO].frl2FrTree(frFiles[nIFO]);
260  cout << "MDC " << " -> nfrFiles : " << nfrFiles[nIFO] << endl;
261  if(mdc_shift.startMDC<0) {
262  // read mdc range from mdc frl files
263  waveSegment mdc_range = frTB[nIFO].getFrRange();
264  cout << "mdc_range : " << mdc_range.start << " " << mdc_range.stop << endl;
265  mdc_shift.startMDC=mdc_range.start;
266  mdc_shift.stopMDC=mdc_range.stop;
267  }
268  mdcShift = frTB[nIFO].getMDCShift(mdc_shift, detSegs[0].start);
269  cout << "mdcShift : " << mdcShift << endl;
270  FRF[nIFO] = frTB[nIFO].getFrList(detSegs[0].start-mdcShift, detSegs[0].stop-mdcShift, segEdge);
271  }
272 
273  // get shifted merged dq cat 2 list
274  cat2List=slagTB.readSegList(nDQF, DQF, CWB_CAT2);
275  // store cat2List into network class
277 
278  // check if seg+cat2 data length is not zero
279  vector<waveSegment> detSegs_dq2;
280  detSegs_dq2.push_back(detSegs[0]);
281  detSegs_dq2 = slagTB.mergeSegLists(detSegs_dq2,cat2List);
282  for(int i=0;i<detSegs_dq2.size();i++) {
283  cout << "detSegs_dq2[" << i << "] Range : " << detSegs_dq2[i].start << "-" << detSegs_dq2[i].stop << endl;
284  }
285  double detSegs_ctime = slagTB.getTimeSegList(detSegs_dq2);
286  cout << "live time after cat 2 : " << detSegs_ctime << endl;
287  if(detSegs_ctime<segTHR) {cout << "job segment live time after cat2 < " << segTHR << " sec, job terminated !!!" << endl;exit(1);}
288 
289  double Tb=detSegs[0].start;
290  double Te=detSegs[0].stop;
291  double dT = Te-Tb; // WB segment duration
292 
293  // read input framelist file
294 
295  char file[512], tdf00[512], tdf90[512], buFFer[1024];
296  int rnID = int(gRandom->Rndm(13)*1.e9); // random name ID
297 
298  if(simulation) { // reag MDC log file
299  i=NET.readMDClog(injectionList,double(long(Tb))-mdcShift);
300  printf("GPS: %16.6f saved, injections: %d\n",double(long(Tb)),i);
301  frTB[nIFO].shiftBurstMDCLog(NET.mdcList, ifos, mdcShift);
302  for(int i=0;i<NET.mdcTime.size();i++) NET.mdcTime[i]+=mdcShift;
303 
304  // check if seg+cat2+inj data length is not zero
305  vector<waveSegment> mdcSegs(NET.mdcTime.size());
306  for(int k=0;k<NET.mdcTime.size();k++) {mdcSegs[k].start=NET.mdcTime[k]-gap;mdcSegs[k].stop=NET.mdcTime[k]+gap;}
307  vector<waveSegment> mdcSegs_dq2 = slagTB.mergeSegLists(detSegs_dq2,mdcSegs);
308  double mdcSegs_ctime = slagTB.getTimeSegList(mdcSegs_dq2);
309  cout << "live time in zero lag after cat2+inj : " << mdcSegs_ctime << endl;
310  if(mdcSegs_ctime==0) {cout << "job segment with zero cat2+inj live time in zero lag, job terminated !!!" << endl;exit(1);}
311  }
312 
313  if(dump_infos_and_exit) exit(0);
314 
315  if(mask>0.) NET.setSkyMask(mask,skyMaskFile);
316 
317  for(i=0; i<nIFO; i++) {
318  frTB[i].readFrames(FRF[i],channelNamesRaw[i],x);
319  x.start(x.start()+dataShift[i]); // dataShift
320  x.start(x.start()-segLen*(segID[i]-segID[0])); // SLAG
321  if(singleDetector) TB.resampleToPowerOfTwo(x);
322  sprintf(file,"%s/%s_%d_%s_%d_%d.dat",
323  nodedir,ifo[i],int(Tb),data_label,runID,rnID);
324  if(dump_sensitivity_and_exit) { // used only to save sensitivity
325  sprintf(file,"%s/sensitivity_%s_%d_%s_job%d.txt",dump_dir,ifo[i],int(Tb),data_label,runID);
326  cout << endl << "Dump Sensitivity : " << file << endl << endl;
327  TB.makeSpectrum(file, x);
328  continue;
329  }
330  if(dcCal[i]>0.) x*=dcCal[i]; // DC correction
331  if(fResample>0) {
332  x.FFT(1); x.resize(fResample/x.rate()*x.size()); x.FFT(-1); x.rate(fResample); //RESAMPLING
333  }
334  pTF[i] = pD[i]->getTFmap();
335  pTF[i]->Forward(x,B,levelR);
336  pTF[i]->getLayer(x,0);
337  pTF[i]->Forward(x,S,levelD);
338  pTF[i]->DumpBinary(file);
339  n = pTF[i]->size();
340 
341  fprintf(stdout,"start=%f duration=%f rate=%f\n",
342  x.start(),x.size()/x.rate(),x.rate());
343  if(i>0 && pTF[0]->start() != x.start()) {
344  cout << "net.C - Error : data not synchronized" << endl;
345  cout << ifo[i] << " " << x.start() << " != " << ifo[0] << " " << pTF[0]->start() << endl;
346  exit(1);
347  }
348  if(i>0 && pTF[0]->rate() != x.rate()) {
349  cout << "net.C - Error : data have different rates" << endl;
350  cout << ifo[i] << " " << x.rate() << " != " << ifo[0] << " " << pTF[0]->rate() << endl;
351  exit(1);
352  }
353 
354  if(simulation) {
355  frTB[nIFO].readFrames(FRF[nIFO],channelNamesMDC[i],x); // SLAG
356  x.start(x.start()+mdcShift); // SLAG
357  sprintf(file,"%s/mdc%s_%d_%s_%d_%d.dat",
358  nodedir,ifo[i],int(Tb),data_label,runID,rnID);
359  cout<<file<<endl;
360  if(fResample>0) {
361  x.FFT(1); x.resize(fResample/x.rate()*x.size()); x.FFT(-1); x.rate(fResample); //RESAMPLING
362  }
363  wM.Forward(x,B,levelR);
364  wM.getLayer(x,0);
365  wM.Forward(x,S,levelD);
366  wM.DumpBinary(file);
367  m = wM.size();
368 
369  fprintf(stdout,"start=%f duration=%f rate=%f\n",
370  x.start(),x.size()/x.rate(),x.rate());
371  if(i>0 && wM.start() != x.start()) exit(1);
372  if(i>0 && wM.rate() != x.rate()) exit(1);
373  if(n != m) exit(1);
374  }
375  if(singleDetector) break;
376  }
377  if(dump_sensitivity_and_exit) exit(0);
378 
379  size_t lags = 0;
380  double factor = 1.0; // strain factor
381  double R = x.rate(); // data rate
382  x.resize(0);
383 
384  char tmpFile[1024];
385  char outFile[1024];
386  char endFile[1024];
387  char outDump[1024];
388  char endDump[1024];
389  char out_CED[1024];
390  char end_CED[1024];
391  char command[1024];
392  FileStat_t fstemp;
393 
394 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
395 // if simulation==1, loop on the injection strain factors
396 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
397 
398  if(!simulation) nfactor = 1;
399 
400  for(int iii=0; iii<nfactor; iii++) {
401 
402  if(simulation) {
403  factor=factors[iii];
404  cout<<"factor="<<factor<<endl;
405  char sim_label[512];
406  sprintf(sim_label,"%d_%d_%s_%g_job%d",int(Tb),int(dT),data_label,factor,runID);
407 
408  sprintf(outFile,"%s/wave_%s.root",nodedir,sim_label);
409  sprintf(endFile,"%s/wave_%s.root",output_dir,sim_label);
410  sprintf(tmpFile,"%s/wave_%s.root.tmp",nodedir,sim_label);
411  sprintf(outDump,"%s/wave_%s.txt",nodedir,sim_label);
412  sprintf(endDump,"%s/wave_%s.txt",output_dir,sim_label);
413  sprintf(out_CED,"%s/ced_%s",nodedir,sim_label);
414  sprintf(end_CED,"%s/ced_%s",output_dir,sim_label);
415 
416  if(!gSystem->GetPathInfo(endFile,fstemp)) {
417  printf("The file %s already exists - skip\n",endFile);
418  fflush(stdout);
419  TFile rf(endFile);
420  if(!rf.IsZombie()) continue;
421  }
422 
423  }
424  else {
425  char prod_label[512];
426  sprintf(prod_label,"%d_%d_%s_slag%d_lag%d_%d_job%d",
427  int(Tb),int(dT),data_label,slagID,lagOff,lagSize,runID);
428 
429  sprintf(outFile,"%s/wave_%s.root",nodedir,prod_label);
430  sprintf(endFile,"%s/wave_%s.root",output_dir,prod_label);
431  sprintf(tmpFile,"%s/wave_%s.root.tmp",nodedir,prod_label);
432  sprintf(outDump,"%s/wave_%s.txt",nodedir,prod_label);
433  sprintf(endDump,"%s/wave_%s.txt",output_dir,prod_label);
434  sprintf(out_CED,"%s/ced_%s",nodedir,prod_label);
435  sprintf(end_CED,"%s/ced_%s",output_dir,prod_label);
436  }
437 
438  cout<<"output file on the node: "<<outFile<<endl;
439  cout<<"final output file name : "<<endFile<<endl;
440  cout<<"temporary output file : "<<tmpFile<<endl;
441 
442  gSystem->Exec("/bin/date"); GetProcInfo();
443 
444 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
445 // data conditioning
446 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
447 
448  for(i=0; i<nIFO; i++) {
449  sprintf(file,"%s/%s_%d_%s_%d_%d.dat",
450  nodedir,ifo[i],int(Tb),data_label,runID,rnID);
451  pTF[i]->setLevel(levelD);
452  pTF[i]->ReadBinary(file);
453 
454  if(simulation) {
455  sprintf(file,"%s/mdc%s_%d_%s_%d_%d.dat",
456  nodedir,ifo[i],int(Tb),data_label,runID,rnID);
457  wM.setLevel(levelD);
458  wM.ReadBinary(file); wM*=factor;
459  pTF[i]->add(wM);
460  wM*=1./factor;
461  }
462 
463  pTF[i]->lprFilter(2,0,Tlpr,4.);
464  pTF[i]->setlow(fLow);
465  pD[i]->white(60.,1,8.,20.);
466  if(simulation) pD[i]->setsim(wM,NET.getmdcTime(),10.,8.,true);
467  pTF[i]->Inverse(levelD-levelF);
468  pTF[i]->lprFilter(2,0,Tlpr,4.);
469  pTF[i]->Forward(levelD-levelF);
470  pTF[i]->sethigh(fHigh);
471  v[i] = pTF[i]->variability();
472  pD[i]->bandPass(); // band pass filtering
473 
474  cout<<"After "<<ifo[i]<<" data conditioning"<<endl;
475  gSystem->Exec("/bin/date"); GetProcInfo();
476 
477  if(singleDetector) {*pD[1]=*pD[0]; break;}
478  }
479 /* MLAG
480  if(!simulation) { // setup lags
481  lags = NET.setTimeShifts(lagSize,lagStep,lagOff,lagMax,lagFile,lagMode,lagSite);
482  cout<<"lag step: "<<lagStep<<endl;
483  cout<<"number of time lags: "<<lags<<endl;
484  }
485  else if(!lags) lags = NET.setTimeShifts();
486 
487  double TL = NET.setVeto(gap);
488  cout<<"live time in zero lag: "<<TL<<endl<<endl; // set veto array
489  if(TL <= 0.) exit(1); // exit if live time is zero
490 */
491 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
492 // initialization of the output files
493 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
494 
495  TFile *froot = new TFile(tmpFile, "RECREATE");
496  TTree* net_tree = netburst.setTree();
497  TTree* live_tree= live.setTree();
498 
499  if(simulation) {
500  TTree* mdc_tree = mdc.setTree();
501  }
502  else {
503  TTree* var_tree = wavevar.setTree();
504  TTree* noise_tree = noiserms.setTree();
505  }
506 
507  //if(dump) netburst.dopen(outDump,"w");
508 
509 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
510 // start of the coherent search
511 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
512 
513  Long_t xid,xsize,xflags,xmt;
514  int xestat = gSystem->GetPathInfo(outDump,&xid,&xsize,&xflags,&xmt);
515  if (xestat==0) {
516  sprintf(command,"/bin/rm %s",outDump);
517  gSystem->Exec(command);
518  }
519 
520  int mlagSize=lagOff+lagSize;
521  int mlagOff=lagOff;
522 
523  if(mlagStep==0) mlagStep=lagSize; // if mlagStep=0 -> standard lag analysis
524 
525  for(int mlag=mlagOff;mlag<mlagSize;mlag+=mlagStep) {
526 
527  lagOff = mlag;
528  lagSize = lagOff+mlagStep<=mlagSize ? mlagStep : mlagSize-lagOff;
529  if(lagSize==0) continue;
530 
531  cout << "lagSize : " << lagSize << " lagOff : " << lagOff << endl;
532 
533 
534  if(!simulation) { // setup lags
535  lags = NET.setTimeShifts(lagSize,lagStep,lagOff,lagMax,lagFile,lagMode,lagSite);
536  cout<<"lag step: "<<lagStep<<endl;
537  cout<<"number of time lags: "<<lags<<endl;
538  }
539  else if(!lags) lags = NET.setTimeShifts();
540 
541  double TL = NET.setVeto(gap);
542  cout<<"live time in zero lag: "<<TL<<endl<<endl; // set veto array
543  if(TL <= 0.) exit(1); // exit if live time is zero
544 
545 
546  double Ao;
547  wavearray<int> np(NET.nLag); // pixel counter
548  bool append = false; // file append for savemode
549  int ceddir = 0; // flag if ced directory exists
550 
551  cout<<"Start coherent search: "; gSystem->Exec("/bin/date");
552 
553  for(i=levelD; i>=l_low; i--) { // loop over TF resolutions
554 
555  if(i<=l_high) {
556 
557  sprintf(tdf00,"%s/Meyer1024wat482_00_L%1d.dat",filter_dir,i);
558  NET.setDelayFilters(tdf00);
559  if(i==l_high) {
560  NET.setDelayIndex();
561  NET.setIndexMode(1);
562  }
563 
564  Ao = NET.threshold(bpp,dTau);
565  NET.set2or(x2or*Ao*Ao);
566  cout<<"pixel threshold in units of noise rms: "<<Ao<<endl;
567  cout<<"2 OR threshold in units of noise var: "<<x2or*Ao*Ao<<endl;
568 
569  cout<<"total pixels: "<<NET.coherence(Ao)<<" ";
570 
571  n = size_t(2.*Tgap*pD[0]->getTFmap()->resolution(0)+0.1);
572  m = size_t(Fgap/pD[0]->getTFmap()->resolution(0)+0.0001);
573 
574  cout<<"clusters: "<<NET.cluster(n,m)<<" ";
575  cout<<"selected pixels: "<<NET.likelihood('E',Acore)<<"\n";
576 
577  for(j=0; j<NET.nLag; j++) {
578  sprintf(file,"%s/pix_%d_%s_%d_%d_%d.lag",
579  nodedir,int(Tb),data_label,int(j),iii,rnID);
580  wc = *(NET.getwc(j));
581  if(!append) np.data[j] = wc.write(file,0);
582  else np.data[j] += wc.write(file,1);
583  cout<<wc.csize()<<"|"<<wc.size()<<"|"<<np.data[j]<<" ";
584  }
585  cout<<endl;
586  append = true;
587  }
588 
589  if(i>l_low) NET.Inverse(1);
590  gSystem->Exec("/bin/date"); GetProcInfo();
591 
592  }
593 
594 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
595 // supercluster analysis
596 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
597 
598  for(j=0; j<lags; j++){
599  sprintf(file,"%s/pix_%d_%s_%d_%d_%d.lag",
600  nodedir,int(Tb),data_label,int(j),iii,rnID);
601  wc.read(file);
602  m = wc.supercluster('L',NET.e2or,true);
603  pwc = NET.getwc(j); pwc->cpf(wc,true);
604  cout<<m<<"|"<<pwc->size()<<" ";
605  sprintf(command,"/bin/rm %s",file);
606  gSystem->Exec(command);
607  }
608  cout<<endl;
609  cout<<"events in the buffer: "<<NET.events()<<"\n";
610  gSystem->Exec("/bin/date"); GetProcInfo();
611 
612 
613 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
614 // likelihood
615 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
616 
617  for(i=l_low; i<=l_high; i++) {
618  sprintf(tdf00,"%s/Meyer1024wat482_00%s_L%1d.dat",filter_dir,filter,i);
619  sprintf(tdf90,"%s/Meyer1024wat482_90%s_L%1d.dat",filter_dir,filter,i);
620  NET.setDelayFilters(tdf00,tdf90);
621 
622  if(i==l_low) {
623  NET.setDelayIndex();
624  NET.setIndexMode(mode);
625  }
626 
627  cout<<"selected core pixels: "<<NET.likelihood(SEARCH(),Acore)<<" for level "<<i<<"\n";
628  cout<<"rejected weak pixels: "<<NET.netcut(netRHO,'r',0,1)<<"\n"; // remove weak glitches
629  cout<<"rejected loud pixels: "<<NET.netcut(netCC,'c',0,1)<<"\n"; // remove loud glitches
630  cout<<"events in the buffer: "<<NET.events()<<"\n";
631 
632  if(cedDump) {
633  cout<<"dump ced into "<<out_CED<<"\n";
634  //if(CED(&NET,out_CED,cedRHO)) ceddir = 1;
635  //if(netburst.ced(&NET,out_CED,cedRHO,factor)) ceddir = 1;
636  CWB::ced ced(&NET,&netburst,out_CED);
637  ced.SetOptions(cedRHO);
638  if(singleDetector) ced.SetChannelName(channelNamesRaw[0]);
639  bool fullCED = singleDetector ? false : true;
640  if(ced.Write(factor,fullCED)) ceddir = 1;
641  }
642 
643  if(i<l_high) NET.Forward(1);
644  }
645 
646  gSystem->Exec("/bin/date");
647  gSystem->Exec("/bin/date"); GetProcInfo();
648  cout<<"\nSearch done\n";
649  cout<<"reconstructed events: "<<NET.events()<<"\n";
650 
651  if(simulation) NET.printwc(0);
652 
653 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
654 // save data in root file
655 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
656 
657  if(dump) netburst.dopen(outDump,"w");
658 
659  //live.output(live_tree,&NET);
660  live.output(live_tree,&NET,slagShift); // FIX LIVETIME
661 
662  if(simulation) {
663  netburst.output(net_tree,&NET,factor);
664  mdc.output(mdc_tree,&NET,factor);
665  }
666  else {
667  netburst.output(net_tree,&NET);
668  for(i=0; i<nIFO; i++) {
669 // wavevar.output(var_tree,&v[i],i+1,segEdge);
670  noiserms.output(noise_tree,&pD[i].nRMS,i+1,R/2);
671  }
672  }
673 
674  history.AddLog(job_stage, "STOP JOB");
675  history.Write();
676 
677  froot->Write();
678  if(dump) netburst.dclose();
679 
680  } // end mlag loop
681 
682  froot->Close();
683 
684  sprintf(command,"/bin/mv %s %s", tmpFile, outFile);
685  if(!cedDump) gSystem->Exec(command);
686  sprintf(command,"/bin/mv %s %s",outFile,endFile);
687  if(!cedDump) gSystem->Exec(command);
688  sprintf(command,"/bin/mv %s %s",outDump,endDump);
689  if(!cedDump && dump) gSystem->Exec(command);
690  xestat = gSystem->GetPathInfo(end_CED,&xid,&xsize,&xflags,&xmt);
691  if (xestat==0) {
692  sprintf(command,"/bin/mv %s/* %s/.",out_CED,end_CED);
693  } else {
694  sprintf(command,"/bin/mv %s %s",out_CED,end_CED);
695  }
696  if(cedDump && ceddir) gSystem->Exec(command);
697 
698  }
699 
700 // clean-up temporary data files
701 
702  for(i=0; i<nIFO; i++) {
703  sprintf(file,"%s/%s_%d_%s_%d_%d.dat",nodedir,ifo[i],int(Tb),data_label,runID,rnID);
704  sprintf(command,"/bin/rm %s",file);
705  gSystem->Exec(command);
706 
707  if(simulation) {
708  sprintf(file,"%s/mdc%s_%d_%s_%d_%d.dat",nodedir,ifo[i],int(Tb),data_label,runID,rnID);
709  sprintf(command,"/bin/rm %s",file);
710  gSystem->Exec(command);
711  }
712  if(singleDetector) break;
713  }
714  cout<<"Stopping the job "<<runID<<endl;
715  gSystem->Exec("/bin/date");
716  int job_stop_time=CWB::Time("now").GetGPS();
717 
718  int job_elapsed_time = (job_stop_time-job_start_time);
719  int job_elapsed_hour = int(job_elapsed_time/3600);
720  int job_elapsed_min = int((job_elapsed_time-3600*job_elapsed_hour)/60);
721  int job_elapsed_sec = int(job_elapsed_time-3600*job_elapsed_hour-60*job_elapsed_min);
722  int job_data_size_sec = int(detSegs[0].stop-detSegs[0].start);
723  double job_speed_factor = double(job_data_size_sec)/double(job_elapsed_time);
724  cout << endl;
725  printf("Job Elapsed Time - %02d:%02d:%02d (hh:mm:ss)\n",job_elapsed_hour,job_elapsed_min,job_elapsed_sec);
726  printf("Job Speed Factor - %2.1fX\n",job_speed_factor);
727  cout << endl;
728 
729 // return 0;
730  exit(0);
731 }
char skyMaskFile[1024]
void sethigh(double f)
Definition: wseries.hh:114
TString outDump
double segMLS
Definition: test_config1.C:47
double netCC
Definition: network.hh:578
int slagSize
Definition: test_config1.C:65
virtual size_t size() const
Definition: wavearray.hh:127
double startMDC
Definition: Toolbox.hh:88
size_t write(const char *file, int app=0)
Definition: netcluster.cc:2989
size_t nLag
Definition: network.hh:555
TTree * setTree()
Definition: variability.cc:42
void white(double dT=0, int wtype=1, double offset=0., double stride=0.)
what it does: see algorithm description in wseries.hh
Definition: detector.hh:240
void printwc(size_t)
Definition: network.cc:2627
double start
Definition: network.hh:37
int job_elapsed_min
Definition: cwb_net.C:720
double lagStep
Definition: test_config1.C:53
char filter_dir[1024]
size_t * slagSite
Definition: test_config1.C:69
int slagOff
Definition: test_config1.C:68
mdcshift mdc_shift
Definition: test_config1.C:93
size_t add(detector *)
param: detector structure return number of detectors in the network
Definition: network.cc:2528
printf("total live time: non-zero lags = %10.1f \n", liveTot)
void set2or(double p)
param: threshold
Definition: network.hh:453
TString live
size_t readMDClog(char *, double=0., int=11, int=12)
param: MDC log file param: approximate gps time
Definition: network.cc:3339
void setAntenna(detector *)
param: detector (use theta, phi index array)
Definition: network.cc:2815
std::vector< double > * getmdcTime()
Definition: network.hh:404
fprintf(stdout,"start=%f duration=%f rate=%f\n", x.start(), x.size()/x.rate(), x.rate())
char channelNamesMDC[NIFO_MAX][50]
double fHigh
virtual void rate(double r)
Definition: wavearray.hh:123
double delta
#define np
WSeries< double > * pTF[nIFO]
Definition: cwb_net.C:64
WSeries< float > v[nIFO]
Definition: cwb_net.C:62
char channelNamesRaw[NIFO_MAX][50]
virtual WSeries< float > variability(double=0., double=-1., double=-1.)
param: first - time window to calculate normalization constants second - low frequency boundary for c...
Definition: wseries.cc:1278
double job_speed_factor
Definition: cwb_net.C:723
size_t * lagSite
Definition: test_config1.C:58
int n
Definition: cwb_net.C:10
double angle
char * watversion(char c='s')
Definition: watversion.hh:21
TString("c")
size_t setIndexMode(size_t=0)
Definition: network.cc:8072
double stopMDC
Definition: Toolbox.hh:89
double x2or
double bpp
Definition: test_config1.C:22
void add(const wavearray< DataType_t > &, int=0, int=0, int=0)
Definition: wavearray.cc:728
bool eDisbalance
Definition: network.hh:580
TString mdc[4]
virtual void ReadBinary(const char *, int=0)
Definition: wavearray.cc:392
char frFiles[NIFO_MAX+1][256]
Definition: test_config1.C:166
int slagMax
Definition: test_config1.C:67
wavearray< double > x
Definition: cwb_net.C:60
vector< int > segId
Definition: Toolbox.hh:84
void setlow(double f)
Definition: wseries.hh:107
size_t setSkyMask(double f, char *fname)
Definition: network.cc:3182
size_t lagOff
Definition: test_config1.C:54
double Te
CWB::History * history
double & gap
int i
Definition: cwb_net.C:10
CWB::Toolbox frTB[nIFO+1]
Definition: cwb_net.C:173
double Theta2
char refIFO[4]
Definition: test_config1.C:14
virtual size_t supercluster(char atype, double S, bool core)
param: statistic: E - excess power, L - likelihood param: selection threshold T for likelihood cluste...
Definition: netcluster.cc:789
int m
Definition: cwb_net.C:10
static double getTimeSegList(vector< waveSegment > list)
Definition: Toolbox.cc:592
virtual void start(double s)
Definition: wavearray.hh:119
vector< waveSegment > detSegs_dq2
Definition: cwb_net.C:279
double segEdge
Definition: test_config1.C:49
int j
Definition: cwb_net.C:10
int l_low
Definition: test_config1.C:40
std::vector< double > mdcTime
Definition: network.hh:596
long coherence(double, double=0., double=0.)
param: threshold on lognormal pixel energy (in units of noise rms) param: threshold on total pixel en...
Definition: network.cc:3784
search
size_t cluster(int kt, int kf)
param: time gap in pixels return: number of reconstructed clusters
Definition: network.hh:303
static bool checkFile(TString fName, bool question=false, TString message="")
Definition: Toolbox.cc:3956
void setRunID(size_t n)
param: run
Definition: network.hh:437
int jobID
Definition: cwb_net.C:177
double netCC
Definition: test_config1.C:33
CWB::Toolbox TB
Definition: ComputeSNR.C:5
int jobId
Definition: Toolbox.hh:82
char ifo[NIFO_MAX][8]
double Tgap
Definition: test_config1.C:23
double Edge
Definition: network.hh:560
double Theta1
double fResample
Definition: test_config1.C:27
static char * getEnvCWB()
Definition: Toolbox.cc:4599
char injectionList[1024]
double mdcShift
Definition: cwb_net.C:178
int job_stop_time
Definition: cwb_net.C:716
nDQF
Definition: cwb_eced.C:92
int Psave
Definition: test_config1.C:75
CWB::Toolbox slagTB
Definition: cwb_net.C:172
double Acore
Definition: test_config1.C:28
void constraint(double d=1., double g=0.0001)
param: constraint parameter, p=0 - no constraint
Definition: network.hh:445
char * rootlogonBuffer
Definition: cwb_net.C:140
double segTHR
Definition: test_config1.C:48
bool singleDetector
size_t mode
nc append(pix)
#define nIFO
char tdf90[1024]
Definition: cwb_job_obj.C:16
char data_label[512]
Definition: test_config1.C:160
double precision
Definition: network.hh:575
double factor
TTree * setTree()
Definition: wavenoise.cc:44
static char * readFile(TString ifName)
Definition: Toolbox.cc:2815
int job_start_time
Definition: cwb_net.C:163
char end_CED[1024]
Definition: cwb_job_obj.C:17
void Forward(size_t k)
param: number of steps
Definition: network.hh:71
int levelD
TTree * net_tree
double setVeto(double=5.)
param: time window around injections
Definition: network.cc:3456
char lagMode[2]
Definition: test_config1.C:57
char tdf00[1024]
Definition: cwb_job_obj.C:15
bool local
Definition: network.hh:571
static void resampleToPowerOfTwo(wavearray< double > &w)
Definition: Toolbox.cc:5818
vector< slag > slagList
i() int(T_cor *100))
network NET
Definition: cwb_dump_inj.C:12
void setDelayIndex(double rate)
param: MDC log file
Definition: network.cc:2865
std::vector< std::string > mdcList
Definition: network.hh:594
dqfile DQF[12]
Definition: test_config1.C:171
double dataShift[NIFO_MAX]
Definition: test_config1.C:87
double getDelay(const char *c="")
Definition: network.cc:2787
bool EFEC
int getLayer(wavearray< DataType_t > &w, double n)
param: n - layer number
Definition: wseries.cc:175
static vector< waveSegment > getSlagJobList(vector< waveSegment > ilist, int seglen=600)
Definition: Toolbox.cc:1771
int mlagStep
segLen
Definition: cwb_eced.C:7
detector * pD[nIFO]
Definition: cwb_net.C:63
double precision
frfile FRF[nIFO+1]
Definition: cwb_net.C:251
double cedRHO
bool eDisbalance
int k
netcluster * pwc
Definition: cwb_net.C:58
void Inverse(size_t k)
Definition: network.hh:73
std::vector< waveSegment > segList
Definition: network.hh:598
size_t cpf(const netcluster &, bool=false, int=0)
Definition: netcluster.cc:99
int nfrFiles[nIFO+1]
Definition: cwb_net.C:174
void output(TTree *waveTree, network *net, float *slag=NULL, vector< waveSegment > detSegs=DEFAULT_WAVESEGMENT)
Definition: livetime.cc:91
void setDelay(const char *="L1")
Definition: network.cc:2736
void bandPass(double f1, double f2, double a=0.)
Definition: detector.hh:265
double e2or
Definition: network.hh:566
string command
Definition: cwb_online.py:382
void setLevel(size_t n)
Definition: wseries.hh:94
long likelihood(char='E', double=sqrt(2.), int=0, size_t=0, int=-1, bool=false)
Definition: network.cc:4415
double Phi1
size_t size()
Definition: netcluster.hh:129
void output(TTree *, WSeries< double > *, int=0, double=1.)
Definition: wavenoise.cc:66
TFile * froot
static double getMDCShift(mdcshift mshift, double time)
Definition: Toolbox.cc:2276
double factors[100]
Definition: test_config1.C:84
virtual void DumpBinary(const char *, int=0)
Definition: wavearray.cc:335
static slag getSlag(vector< slag > slagList, int jobid)
Definition: Toolbox.cc:1824
size_t events()
Definition: network.hh:311
static int shiftBurstMDCLog(std::vector< std::string > &mdcList, vector< TString > ifos, double mdc_shift)
Definition: Toolbox.cc:2154
vector< waveSegment > detSegs
Definition: cwb_net.C:175
static void setSlagShifts(slag SLAG, vector< TString > ifos, double segLen, int nDQF, dqfile *DQF)
Definition: Toolbox.cc:1997
cout<<" network of ";for(i=0;i< nIFO;i++) cout<< ifo[i]<<" ";cout<<" detectors\n\n";Meyer< double > B(1024)
double dcCal[NIFO_MAX]
Definition: test_config1.C:78
static vector< slag > getSlagList(size_t nIFO, size_t slagSize, int slagSegs, int slagOff, size_t slagMin, size_t slagMax, size_t *slagSite, char *slagFile=NULL)
Definition: Toolbox.cc:790
char filter[1024]
static vector< waveSegment > readSegList(dqfile DQF)
Definition: Toolbox.cc:391
char cmd_line[512]
Definition: cwb_net.C:136
int job_elapsed_time
Definition: cwb_net.C:718
double Tb
double Fgap
Definition: test_config1.C:24
WSeries< double > wM
Definition: cwb_net.C:61
double fLow
WSeries< double > * getTFmap()
param: no parameters
Definition: detector.hh:161
Definition: Meyer.hh:18
TString cwb_parameters_name
Definition: cwb_net.C:147
vector< int > slagId
Definition: Toolbox.hh:83
size_t csize()
Definition: netcluster.hh:133
char dump_dir[512]
Definition: test_config1.C:156
string file
Definition: cwb_online.py:385
int job_data_size_sec
Definition: cwb_net.C:722
double mTau
int slagID
Definition: cwb_net.C:177
char * lagFile
Definition: test_config1.C:56
virtual void lprFilter(double, int=0, double=0., double=0.)
Definition: wseries.cc:1108
static vector< waveSegment > getSegList(int jobId, int nIFO, double segLen, double segMLS, double segEdge, vector< waveSegment > dqList)
Definition: Toolbox.cc:2779
void AddLog(char *Stage, char *Log, TDatime *Time=NULL)
Definition: History.cc:169
void Forward(int n=-1)
param: wavelet - n is number of steps (-1 means full decomposition)
Definition: wseries.cc:228
vector< TString > ifos(nIFO)
strcpy(RunLabel, RUN_LABEL)
Definition: Toolbox.hh:81
Meyer< double > S(1024, 2)
netcluster * getwc(size_t n)
param: delay index
Definition: network.hh:421
static void makeSpectrum(wavearray< double > &psd, wavearray< double > x, double chuncklen=8, double scratchlen=0, bool oneside=true)
Definition: Toolbox.cc:4705
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
nfactor[0]
Definition: cwb_eced.C:10
double mask
double netRHO
Definition: test_config1.C:32
vector< waveSegment > cat2List
Definition: cwb_net.C:176
bool dump
void setDelayFilters(detector *=NULL)
Definition: network.cc:7706
static vector< waveSegment > mergeSegLists(vector< waveSegment > &ilist1, vector< waveSegment > &ilist2)
Definition: Toolbox.cc:332
int l_high
Definition: test_config1.C:41
char nodedir[1024]
Definition: test_config1.C:187
long nSky
Definition: network.hh:556
double detSegs_ctime
Definition: cwb_net.C:285
TTree * setTree()
Definition: livetime.cc:63
double Phi2
Definition: ced.hh:26
int job_elapsed_hour
Definition: cwb_net.C:719
char work_dir[512]
Definition: test_config1.C:143
int segID[20]
Definition: cwb_net.C:177
double dT
Definition: testWDM_5.C:12
size_t netcut(double, char='L', size_t=0, int=1)
param: threshold param: minimum cluster size processed by the corrcut param: cluster type return: num...
Definition: network.cc:2967
long nSky
int levelR
Definition: test_config1.C:37
int slagMin
Definition: test_config1.C:66
int rnID
cout<< "live time after cat 2 : "<< detSegs_ctime<< endl;if(detSegs_ctime< segTHR){cout<< "job segment live time after cat2 < "<< segTHR<< " sec, job terminated !!!"<< endl;exit(1);}double Tb=detSegs[0].start;double Te=detSegs[0].stop;double dT=Te-Tb;char file[512], tdf00[512], tdf90[512], buFFer[1024];int rnID=int(gRandom->Rndm(13)*1.e9);if(simulation){i=NET.readMDClog(injectionList, double(long(Tb))-mdcShift);printf("GPS: %16.6f saved, injections: %d\n", double(long(Tb)), i);frTB[nIFO].shiftBurstMDCLog(NET.mdcList, ifos, mdcShift);for(int i=0;i< NET.mdcTime.size();i++) NET.mdcTime[i]+=mdcShift;vector< waveSegment > mdcSegs(NET.mdcTime.size());for(int k=0;k< NET.mdcTime.size();k++){mdcSegs[k].start=NET.mdcTime[k]-gap;mdcSegs[k].stop=NET.mdcTime[k]+gap;}vector< waveSegment > mdcSegs_dq2=slagTB.mergeSegLists(detSegs_dq2, mdcSegs);double mdcSegs_ctime=slagTB.getTimeSegList(mdcSegs_dq2);cout<< "live time in zero lag after cat2+inj : "<< mdcSegs_ctime<< endl;if(mdcSegs_ctime==0){cout<< "job segment with zero cat2+inj live time in zero lag, job terminated !!!"<< endl;exit(1);}}if(dump_infos_and_exit) exit(0);if(mask >0.) NET.setSkyMask(mask, skyMaskFile);for(i=0;i< nIFO;i++){frTB[i].readFrames(FRF[i], channelNamesRaw[i], x);x.start(x.start()+dataShift[i]);x.start(x.start()-segLen *(segID[i]-segID[0]));if(singleDetector) TB.resampleToPowerOfTwo(x);sprintf(file,"%s/%s_%d_%s_%d_%d.dat", nodedir, ifo[i], int(Tb), data_label, runID, rnID);if(dump_sensitivity_and_exit){sprintf(file,"%s/sensitivity_%s_%d_%s_job%d.txt", dump_dir, ifo[i], int(Tb), data_label, runID);cout<< endl<< "Dump Sensitivity : "<< file<< endl<< endl;TB.makeSpectrum(file, x);continue;}if(dcCal[i]>0.) x *=dcCal[i];if(fResample >0){x.FFT(1);x.resize(fResample/x.rate()*x.size());x.FFT(-1);x.rate(fResample);}pTF[i]=pD[i]-> getTFmap()
simulation
Definition: cwb_eced.C:9
double Tlpr
size_t read(const char *)
Definition: netcluster.cc:3096
int job_elapsed_sec
Definition: cwb_net.C:721
virtual void resize(unsigned int)
Definition: wavearray.cc:445
int setTimeShifts(size_t=1, double=1., size_t=0, size_t=0, const char *=NULL, const char *="w", size_t *=NULL)
param number of time lags param time shift step in seconds param first lag ID param maximum lag ID pa...
Definition: network.cc:7290
char output_dir[512]
Definition: test_config1.C:146
void Inverse(int n=-1)
param: n - number of steps (-1 means full reconstruction)
Definition: wseries.cc:273
double stop
Definition: network.hh:38
size_t setsim(WSeries< double > &, std::vector< double > *, double=5., double=8., bool saveWF=false)
Definition: detector.cc:1348
double netRHO
Definition: network.hh:579
void GetProcInfo(TString str="")
Definition: Toolfun.hh:219
virtual void FFT(int=1)
Definition: wavearray.cc:814
void AddHistory(char *Stage, char *Type, char *History, TDatime *Time=NULL)
Definition: History.cc:207
#define SEARCH(TYPE)
Definition: xroot.hh:4
bool EFEC
Definition: network.hh:569
size_t lagMax
Definition: test_config1.C:55
bool cedDump
int levelF
netcluster wc
Definition: cwb_net.C:57
void setSkyMaps(double, double=0., double=180., double=0., double=360.)
param: sky map granularity step, degrees param: theta begin, degrees param: theta end...
Definition: network.cc:2656
exit(0)
#define GAMMA(TYPE)
Definition: xroot.hh:5
double threshold(double, double)
param: selected fraction of LTF pixels assuming Gaussian noise param: maximum time delay between dete...
Definition: network.cc:2613
size_t lagSize
Definition: test_config1.C:52
vector< waveSegment > cat1List
Definition: cwb_net.C:176