22 cout<<
"cwb_report_prod_2.C starts..."<<endl;
39 gStyle->SetTitleOffset(1.4,
"X");
41 gStyle->SetTitleOffset(2.0,
"Y");
42 gStyle->SetLabelOffset(0.010,
"X");
43 gStyle->SetLabelOffset(0.010,
"Y");
44 gStyle->SetLabelFont(42,
"X");
45 gStyle->SetLabelFont(42,
"Y");
46 gStyle->SetTitleFont(42,
"X");
47 gStyle->SetTitleFont(42,
"Y");
48 gStyle->SetTitleSize(0.05,
"X");
49 gStyle->SetTitleSize(0.04,
"Y");
50 gStyle->SetLabelSize(0.06,
"X");
51 gStyle->SetLabelSize(0.06,
"Y");
53 gStyle->SetTitleH(0.060);
54 gStyle->SetTitleW(0.95);
55 gStyle->SetTitleY(0.99);
56 gStyle->SetTitleFont(12,
"D");
57 gStyle->SetTitleColor(kBlue,
"D");
58 gStyle->SetTextFont(12);
59 gStyle->SetTitleFillColor(kWhite);
60 gStyle->SetLineColor(kWhite);
61 gStyle->SetNumberContours(256);
62 gStyle->SetCanvasColor(kWhite);
63 gStyle->SetStatBorderSize(1);
64 gStyle->SetOptStat(kFALSE);
67 gStyle->SetFrameBorderMode(0);
87 TCanvas *
c1 =
new TCanvas(
"c",
"C",0,0,600,600);
94 c1->SetRightMargin(0.1517039);
95 c1->SetTopMargin(0.0772727);
96 c1->SetBottomMargin(0.103939);
97 gStyle->SetPalette(1,0);
99 TChain
wave(
"waveburst");
100 TChain
live(
"liveTime");
118 cout <<
"cwb_report_prod_2.C Error : Leaf " << veto_name
119 <<
" is not present in tree" << endl;
127 TIter
next(
wave.GetListOfBranches());
128 while ((branch=(TBranch*)
next())) {
129 if (
TString(
"slag").CompareTo(branch->GetName())==0) slagFound=
true;
133 cout <<
"cwb_report_prod_2.C : Error - wave tree do not contains slag leaf : " 151 if(bifo) XDQF[nXDQF++]=
VDQF[
j];
160 nameVETO[
j]=veto_name;
162 W.fChain->SetBranchAddress(nameVETO[
j].Data(),&VETO[
j]);
165 gSystem->Exec(
"date");
193 wave.SetEstimate(nsize);
194 wave.Draw(TString::Format(
"rho[%d]",
pp_irho).Data(),
"",
"goff");
202 double far_drho = double(far_rho_max-far_rho_min)/double(far_rho_bin);
226 cout <<
"Start CWB::Toolbox::getLiveTime : be patient, it takes a while ..." << endl;
231 for(j=0; j<Wlag[
nIFO].
size(); j++) {
232 lagslag[std::make_pair(
int(Wslag[nIFO].data[j]),
int(Wlag[nIFO].data[j]))] =
j;
235 Rlag =
Tlag; Rlag = 0.;
236 Elag =
Tlag; Elag = 0.;
237 Olag =
Tlag; Olag = 0.;
242 cout <<
"cwb_report_prod_2.C Error : Error opening " << fname << endl;
250 TChain live1(
"liveTime");
256 fprintf(flive,
"slag=%i\t lag=%i\t ",0,0);
257 for (
int jj=0; jj<
nIFO; jj++)
fprintf(flive,
"%s:slag=%5.2f\tlag=%5.2f\t",IFO[jj],0.,0.);
258 fprintf(flive,
"live=%9.2f\n",liveZero);
259 printf(
"live time: zero lags = %10.1f \n",liveZero);
262 fprintf(flive,
"slag=%i\t lag=%i\t ",(
int)Wslag[nIFO].data[j],(
int)Wlag[nIFO].data[j]);
263 for (
int jj=0; jj<
nIFO; jj++) {
264 fprintf(flive,
"%s:slag=%5.2f\tlag=%5.2f\t",IFO[jj],Wslag[jj].data[j],Wlag[jj].data[j]);
268 fprintf(flive,
"nonzero lags live=%10.1f \n",liveTot);
270 printf(
"total live time: non-zero lags = %10.1f \n",liveTot);
271 cout <<
"End CWB::Toolbox::getLiveTime : ";cout.flush();gSystem->Exec(
"/bin/date");
277 for(
int i=0;i<
nlag;i++)
if(Wlag[nIFO][i]<min_lag) min_lag=Wlag[
nIFO][
i];
278 for(
int i=0;i<nlag;i++) if(Wlag[nIFO][i]>
max_lag) max_lag=Wlag[nIFO][i];
279 int*
iy_lag =
new int[max_lag+1];
280 for(
int i=0;i<=
max_lag;i++) iy_lag[i]=-1;
281 for(
int i=0;i<
nlag;i++) iy_lag[
int(Wlag[nIFO][i])-
min_lag]=
i;
282 double** y_lag =
new double*[
nlag];
283 double** y_lag_veto =
new double*[
nlag];
284 for(
int i=0;i<
nlag;i++) {
290 for (
int i=0;i<
nlag;i++)
for (
int j=0; j<
pp_rho_bin; j++) {y_lag[
i][
j] = 0.;y_lag_veto[
i][
j] = 0.;}
294 TH1F*
xCor =
new TH1F(
"xCor",
"",100,0.4,1.);
295 xCor->SetTitleOffset(1.3,
"Y");
297 xCor->GetXaxis()->SetTitle(
"network correlation");
298 xCor->GetYaxis()->SetTitle(
"events");
300 TH1F*
dens =
new TH1F(
"dens",
"",100,0.,3);
301 dens->SetTitleOffset(1.3,
"Y");
303 dens->GetXaxis()->SetTitle(
"-log10(cluster density)");
304 dens->GetYaxis()->SetTitle(
"events");
306 TH1F*
hpf =
new TH1F(
"hpf",
"",100,0.,1.);
307 hpf->SetTitleOffset(1.3,
"Y");
309 hpf->GetXaxis()->SetTitle(
"penalty factor");
310 hpf->GetYaxis()->SetTitle(
"events");
312 TH1F*
hvED =
new TH1F(
"hvED",
"",200,0,2.);
313 hvED->SetTitleOffset(1.3,
"Y");
315 hvED->GetXaxis()->SetTitle(
"hvED consistency");
316 hvED->GetYaxis()->SetTitle(
"events");
318 TH1F*
ecor =
new TH1F(
"ecor",
"",200,0,10.);
319 ecor->SetTitleOffset(1.3,
"Y");
321 ecor->GetXaxis()->SetTitle(
"correlated amplitude");
322 ecor->GetYaxis()->SetTitle(
"events");
324 TH1F*
ECOR =
new TH1F(
"ECOR",
"",200,0,10.);
325 ECOR->SetTitleOffset(1.3,
"Y");
327 ECOR->GetXaxis()->SetTitle(
"#rho(ECOR))");
328 ECOR->GetYaxis()->SetTitle(
"events");
330 TH1F*
Like =
new TH1F(
"Like",
"",100,1,4.);
331 Like->SetTitleOffset(1.3,
"Y");
333 Like->GetXaxis()->SetTitle(
"log10(likelihood)");
334 Like->GetYaxis()->SetTitle(
"events");
336 TH1F*
Mchirp =
new TH1F(
"Mchirp",
"",100,0.,40.);
337 Mchirp->SetTitleOffset(1.3,
"Y");
338 Mchirp->SetTitle(
"After pp cuts");
339 Mchirp->GetXaxis()->SetTitle(
"reconstructed chirp mass(M_{#odot})");
340 Mchirp->GetYaxis()->SetTitle(
"events");
342 TH1F*
McErr =
new TH1F(
"McErr",
"",100,0.,1.);
343 McErr->SetTitleOffset(1.3,
"Y");
344 McErr->SetTitle(
"After pp cuts");
345 McErr->GetXaxis()->SetTitle(
"pixels used in reconstruction/total");
346 McErr->GetYaxis()->SetTitle(
"events");
348 TH1F*
cutF =
new TH1F(
"cutF",
"",24,60,2048.);
349 cutF->SetTitleOffset(1.2,
"Y");
350 cutF->GetXaxis()->SetTitle(
"frequency, Hz");
352 cutF->SetStats(kFALSE);
353 cutF->SetFillColor(2);
359 rhocc->SetTitle(
"0 < cc < 1");
360 rhocc->SetTitleOffset(1.3,
"Y");
361 rhocc->GetXaxis()->SetTitle(
"network correlation");
362 rhocc->GetYaxis()->SetTitle(
"#rho");
363 rhocc->SetStats(kFALSE);
364 rhocc->SetMarkerStyle(20);
365 rhocc->SetMarkerSize(0.5);
366 rhocc->SetMarkerColor(1);
368 TH2F*
ECOR_cc =
new TH2F(
"ECOR_cc",
"",100,0.,1.,500,0,15.);
369 ECOR_cc->SetTitleOffset(1.3,
"Y");
370 ECOR_cc->GetXaxis()->SetTitle(
"network correlation");
371 ECOR_cc->GetYaxis()->SetTitle(
"#rho(ECOR)");
372 ECOR_cc->SetStats(kFALSE);
373 ECOR_cc->SetMarkerStyle(20);
374 ECOR_cc->SetMarkerSize(0.5);
375 ECOR_cc->SetMarkerColor(1);
377 TH2F*
ecor_cc =
new TH2F(
"ecor_cc",
"",100,0.,1.,500,0,15.);
378 ecor_cc->SetTitleOffset(1.3,
"Y");
379 ecor_cc->GetXaxis()->SetTitle(
"network correlation");
380 ecor_cc->GetYaxis()->SetTitle(
"#rho(ecor)");
381 ecor_cc->SetStats(kFALSE);
382 ecor_cc->SetMarkerStyle(20);
383 ecor_cc->SetMarkerSize(0.5);
384 ecor_cc->SetMarkerColor(1);
387 rho_subnet->SetTitle(
"0 < subnet < 1");
388 rho_subnet->SetTitleOffset(1.3,
"Y");
389 rho_subnet->GetXaxis()->SetTitle(
"subnet");
390 rho_subnet->GetYaxis()->SetTitle(
"#rho");
391 rho_subnet->SetMarkerStyle(20);
392 rho_subnet->SetMarkerColor(1);
393 rho_subnet->SetMarkerSize(0.5);
394 rho_subnet->SetStats(kFALSE);
397 rho_vED->SetTitle(
"0 < vED < 1");
398 rho_vED->SetTitleOffset(1.3,
"Y");
399 rho_vED->GetXaxis()->SetTitle(
"vED");
400 rho_vED->GetYaxis()->SetTitle(
"#rho");
401 rho_vED->SetMarkerStyle(20);
402 rho_vED->SetMarkerColor(1);
403 rho_vED->SetMarkerSize(0.5);
404 rho_vED->SetStats(kFALSE);
409 rho_pf->SetTitle(
"0 < penalty < 1");
410 rho_pf->GetXaxis()->SetTitle(
"penalty");
413 rho_pf->SetTitle(
"chi2");
414 rho_pf->GetXaxis()->SetTitle(
"log10(chi2)");
416 rho_pf->SetTitleOffset(1.3,
"Y");
417 rho_pf->GetYaxis()->SetTitle(
"#rho");
418 rho_pf->SetMarkerStyle(20);
419 rho_pf->SetMarkerColor(1);
420 rho_pf->SetMarkerSize(0.5);
421 rho_pf->SetStats(kFALSE);
423 TH2F*
pf_cc =
new TH2F(
"pf_cc",
"",100,0.,1.,100,0,1.);
424 pf_cc->SetTitleOffset(1.3,
"Y");
425 pf_cc->GetXaxis()->SetTitle(
"network correlation");
426 pf_cc->GetYaxis()->SetTitle(
"penalty");
427 pf_cc->SetMarkerStyle(20);
428 pf_cc->SetMarkerColor(1);
429 pf_cc->SetMarkerSize(0.8);
430 pf_cc->SetStats(kFALSE);
432 TH2F*
pf_vED =
new TH2F(
"pf_vED",
"",100,0.,1.,100,0,1.);
433 pf_vED->SetTitleOffset(1.3,
"Y");
434 pf_vED->GetXaxis()->SetTitle(
"vED consistency");
435 pf_vED->GetYaxis()->SetTitle(
"penalty");
436 pf_vED->SetMarkerStyle(20);
437 pf_vED->SetMarkerColor(1);
438 pf_vED->SetMarkerSize(0.8);
439 pf_vED->SetStats(kFALSE);
441 TH2F*
pf_ed =
new TH2F(
"pf_ed",
"",100,0.,1.,100,0.,1.);
442 pf_ed->SetTitleOffset(1.3,
"Y");
443 pf_ed->GetXaxis()->SetTitle(
"energy disbalance");
444 pf_ed->GetYaxis()->SetTitle(
"penalty");
445 pf_ed->SetMarkerStyle(20);
446 pf_ed->SetMarkerColor(1);
447 pf_ed->SetMarkerSize(0.8);
448 pf_ed->SetStats(kFALSE);
450 TH2F*
rho_L =
new TH2F(
"rho_L",
"",500,0.,5.,500,0,5.);
451 rho_L->SetTitleOffset(1.3,
"Y");
452 rho_L->GetYaxis()->SetTitle(
"log10(average SNR)");
453 rho_L->GetXaxis()->SetTitle(
"log10(2*#rho^2)");
454 rho_L->SetStats(kFALSE);
455 rho_L->SetMarkerStyle(20);
456 rho_L->SetMarkerSize(0.5);
457 rho_L->SetMarkerColor(1);
460 rho_mchirp->SetTitle(
"rho vs Mchirp(after pp cuts)");
461 rho_mchirp->SetTitleOffset(1.3,
"Y");
462 rho_mchirp->GetXaxis()->SetTitle(
"Mchirp");
463 rho_mchirp->GetYaxis()->SetTitle(
"#rho");
464 rho_mchirp->SetMarkerStyle(20);
465 rho_mchirp->SetMarkerColor(1);
466 rho_mchirp->SetMarkerSize(0.5);
467 rho_mchirp->SetStats(kFALSE);
473 for (
int qq=0;qq<sm_ra_dec.size(); qq++) sm_ra_dec.set(qq,0);
491 int hrho_col[2] = {1,3};
492 for(
int j=0; j<2; j++) {
495 hrho[
j]->SetTitleOffset(1.3,
"Y");
497 hrho[
j]->GetXaxis()->SetTitle(_title);
498 hrho[
j]->GetYaxis()->SetTitle(
"events");
499 hrho[
j]->GetYaxis()->SetTitleOffset(2.0);
500 hrho[
j]->GetYaxis()->CenterTitle(
true);
501 hrho[
j]->SetLineColor(hrho_col[j]);
502 hrho[
j]->SetFillColor(hrho_col[j]);
503 hrho[
j]->SetStats(kFALSE);
504 hrho[
j]->SetMinimum(0.5);
507 hrho[0]->SetTitle(
"full events (black), after pp cuts (green)");
511 for(
int j=0; j<nIFO+1; j++){
513 hF[
j] =
new TH1F(ch1,ch1,nBins,T_bgn,T_end);
514 hF[
j]->GetXaxis()->SetTitle(fname);
515 hF[
j]->GetXaxis()->SetTitleSize(0.1);
516 hF[
j]->GetXaxis()->SetLabelSize(0.1);
517 hF[
j]->GetXaxis()->SetTitleOffset(0.9);
519 hF2[
j] =
new TH1F(ch1,ch1,24,32,2048.);
520 hF2[
j]->GetXaxis()->SetTitle(
"frequency, (80 Hz per bin)");
521 hF2[
j]->GetXaxis()->SetTitleSize(0.1);
522 hF2[
j]->GetXaxis()->SetLabelSize(0.1);
523 hF2[
j]->GetXaxis()->SetTitleOffset(0.9);
525 sprintf(_title,
"%s : fraction (%%)",IFO[j-1]);
526 hF[
j]->GetYaxis()->SetTitle(_title);
527 hF2[
j]->GetYaxis()->SetTitle(_title);
529 hF[
j]->GetYaxis()->SetTitleSize(0.12);
530 hF[
j]->GetYaxis()->SetLabelSize(0.1);
531 hF[
j]->GetYaxis()->SetTitleOffset(0.4);
532 hF[
j]->SetStats(kFALSE);
533 hF[
j]->SetLineColor(1);
534 hF[
j]->SetFillColor(1);
535 hF[
j]->SetTitle(
"full events");
536 hF2[
j]->GetYaxis()->SetTitleSize(0.12);
537 hF2[
j]->GetYaxis()->SetLabelSize(0.1);
538 hF2[
j]->GetYaxis()->SetTitleOffset(0.4);
539 hF2[
j]->SetStats(kFALSE);
540 hF2[
j]->SetLineColor(1);
541 hF2[
j]->SetFillColor(1);
542 hF2[
j]->SetTitle(
"full events");
547 for(
int j=0; j<3; j++){
549 hR[
j] =
new TH1F(fname,
"",nBins,T_bgn,T_end);
550 hR[
j]->SetTitleOffset(1.3,
"Y");
552 hR[
j]->GetXaxis()->SetTitle(fname);
553 hR[
j]->GetYaxis()->SetTitle(
"rate, Hz");
554 hR[
j]->GetYaxis()->SetTitleOffset(2.0);
555 hR[
j]->SetTitle(
"full events (black), after pp cuts (green)");
556 hR[
j]->SetStats(kFALSE);
557 hR[
j]->SetLineColor(hR_col[j]);
558 hR[
j]->SetFillColor(hR_col[j]);
567 fprintf(ftrig,
"# -/+ - not passed/passed final selection cuts\n");
568 fprintf(ftrig,
"# 1 - effective correlated amplitude rho \n");
569 fprintf(ftrig,
"# 2 - correlation coefficient 0/1 (1G/2G)\n");
570 fprintf(ftrig,
"# 3 - correlation coefficient 2\n");
571 fprintf(ftrig,
"# 4 - correlation coefficient 3\n");
572 fprintf(ftrig,
"# 5 - correlated amplitude \n");
573 fprintf(ftrig,
"# 6 - time shift \n");
574 fprintf(ftrig,
"# 7 - time super shift \n");
575 fprintf(ftrig,
"# 8 - likelihood \n");
576 fprintf(ftrig,
"# 9 - penalty factor \n");
577 fprintf(ftrig,
"# 10 - energy disbalance \n");
578 fprintf(ftrig,
"# 11 - central frequency \n");
579 fprintf(ftrig,
"# 12 - bandwidth \n");
580 fprintf(ftrig,
"# 13 - duration \n");
581 fprintf(ftrig,
"# 14 - number of pixels \n");
582 fprintf(ftrig,
"# 15 - frequency resolution \n");
583 fprintf(ftrig,
"# 16 - cwb run number \n");
585 for(
int j=0; j<
nIFO; j++)
fprintf(ftrig,
"# %2d - time for %s detector \n",++i,IFO[j]);
586 for(
int j=0; j<
nIFO; j++)
fprintf(ftrig,
"# %2d - sSNR for %s detector \n",++i,IFO[j]);
587 for(
int j=0; j<
nIFO; j++)
fprintf(ftrig,
"# %2d - hrss for %s detector \n",++i,IFO[j]);
588 fprintf(ftrig,
"# %2d - PHI \n",++i);
589 fprintf(ftrig,
"# %2d - THETA \n",++i);
590 fprintf(ftrig,
"# %2d - PSI \n",++i);
593 cout<<
"total events: "<<ntrg<<endl;
594 printf(
"data start GPS: %15.5f \n",sTARt);
595 printf(
"data stop GPS: %15.5f \n",sTOp);
609 cout <<
"cwb_report_prod_2.C : Start event loop ..." << endl;
610 for(
int i=0; i<
ntrg; i++) {
613 if(i%10000==0) cout <<
"cwb_report_prod_2.C : loop 1 - processed: " << i <<
"/" << ntrg << endl;
619 for(
int j=0;j<
nXDQF;j++) {
621 if((XDQF[j].
cat==
CWB_CAT2)&&(!VETO[j])) {countVETO[
j]++;bveto=
true;}
622 if((XDQF[j].
cat==
CWB_CAT3)&&(VETO[j])) {countVETO[
j]++;saveVETO[
j]=0;save_veto=0;}
623 if((XDQF[j].
cat==
CWB_HVETO)&&(VETO[j])) {countVETO[
j]++;saveVETO[
j]=0;save_veto=0;}
627 double WLag = W.lag[
nIFO];
628 double WSLag = W.slag[
nIFO];
631 if((WLag==0)&&(WSLag==0))
continue;
635 if((WLag==0)&&(WSLag==0))
continue;
639 if((WLag==0)&&(WSLag==0))
continue;
649 rUn =
int(W.run+0.1);
650 hR[0]->Fill(
float(W.gps[0]),
Trun.
data[rUn]);
653 hR[1]->Fill(
float(W.gps[0]));
657 for(
int j=0;j<
nFCUT;j++) {
658 if((W.frequency[0]>
lowFCUT[j])&&(W.frequency[0]<=
highFCUT[j])) bcut=
true;
662 vED = W.neted[0]/W.ecor;
667 acor = sqrt(W.ecor/nIFO);
670 if (
T_scc>0) {
if(W.netcc[2] <
T_scc) save =
false;}
671 if (
T_pen>0) {
if(W.penalty <
T_pen) save =
false;}
678 if (
T_efrac>0) {
if(W.chirp[5]*W.chirp[3] + log10(W.size[1])/10<
T_efrac) save =
false;}
687 pf_cc->Fill(xcor,W.penalty);
688 if(W.frequency[0]>0 && W.duration[0]>0) dens->Fill(-log10(W.size[0]*0.5/W.duration[0]/W.frequency[0]));
689 pf_vED->Fill(vED,W.penalty);
690 pf_ed->Fill(vED,W.penalty);
691 hvED->Fill(
fabs(vED));
692 hpf->Fill(W.penalty);
696 for(
int j=0;j<
nXDQF;j++) {
700 for(
int j=0;j<
nXDQF;j++) {
705 int wslag=0; wslag=W.slag[
nIFO];
706 fprintf(ftrig,
"%5.4f %4.3f %4.3f %4.3f %5.2f %7.3f %7d %5.1e %4.3f %4.3f ",
707 rho,xcor,xcor2,xcor3,acor,W.lag[nIFO],wslag,W.likelihood,W.penalty,vED);
708 fprintf(ftrig,
"%4.0f %4.0f %4.3f %3d %3.1d %5d ",
709 W.frequency[0],W.bandwidth[0],
710 W.duration[0],W.size[0],W.rate[0],
int(W.run));
712 for(j=0; j<
nIFO; j++)
fprintf(ftrig,
"%14.4f ",W.time[j]);
713 for(j=0; j<
nIFO; j++)
fprintf(ftrig,
"%5.1e ",W.sSNR[j]);
714 for(j=0; j<
nIFO; j++)
fprintf(ftrig,
"%5.1e ",W.hrss[j]);
715 if(TMath::IsNaN(W.psi[0])) W.psi[0]=-1000;
716 fprintf(ftrig,
"%4.2f %4.2f %4.2f ",W.phi[0], W.theta[0], W.psi[0]);
721 int indx = lagslag[std::make_pair(
int(W.slag[nIFO]),
int(W.lag[nIFO]))];
722 Rlag.
data[indx] += 1.;
733 if(rho >
Xcut.
data[j] && save_veto==1) {y_lag_veto[iy_lag[
int(W.lag[nIFO])-
min_lag]][
j] += 1.;}
746 for(
int i=0;i<
nlag;i++) {
748 delete [] y_lag_veto[
i];
752 for(
int i=0; i<
ntrg; i++) {
755 if(i%10000==0) cout <<
"cwb_report_prod_2.C : loop 2 - processed: " << i <<
"/" << ntrg << endl;
761 sm_ra_dec.add(sm_ra_dec.getSkyIndex(-(W.theta[2]-90.),W.phi[2]),1);
765 vED = W.neted[0]/W.ecor;
770 for(j=0; j<
nIFO; j++) {
771 if(W.snr[j]>mSNR) {detId=j+1; mSNR=W.snr[
j];}
776 rho_L->Fill(log10(2*rho*rho),log10(W.likelihood/nIFO));
778 rhocc->Fill(xcor,rho);
779 ecor_cc->Fill(xcor,W.rho[0]);
780 ECOR_cc->Fill(xcor,W.rho[1]);
781 rho_subnet->Fill(W.netcc[2],rho);
782 rho_vED->Fill(vED,rho);
783 float chi2 = W.penalty>0 ? log10(W.penalty) : 0;
784 if(
TString(analysis)==
"1G") rho_pf->Fill(W.penalty,rho);
785 else rho_pf->Fill(chi2,rho);
787 float Wgps=float(W.gps[0]);
788 float Wfreq=float(W.frequency[0]);
791 hF[detId]->Fill(Wgps,100.);
793 hF2[detId]->Fill(Wfreq,100.);
796 ecor->Fill(sqrt(W.ecor/nIFO));
797 ECOR->Fill(sqrt(W.ECOR/nIFO));
798 Like->Fill(log10(W.likelihood));
800 Mchirp->Fill(W.chirp[1]);
801 McErr->Fill(W.chirp[5]);
802 rho_mchirp->Fill(W.chirp[1],rho);
804 if (!
SAVE[i])
continue;
813 for(
int j=0;j<
nXDQF;j++) {
814 cout <<
"Events vetoed by " << nameVETO[
j].Data() <<
" - " << countVETO[
j] << endl;
821 if(Wlag[nIFO].data[j]>0.) {
822 fprintf(filelags,
"%6.3f %6.3f %d %d\n",
823 Wslag[nIFO].data[j],Wlag[nIFO].data[j],(
int)Tlag.
data[j],(
int)Rlag.
data[j]);
829 if(pp_rho_vs_rate_no_multiplicity) cout <<
"start rate vs mutiplicity ..." << endl;
831 if(pp_rho_vs_rate_no_multiplicity) {
853 if(!out_far.good()) {cout <<
"Error Opening File " << fname << endl;
exit(1);}
857 if(!out_efar.good()) {cout <<
"Error Opening File " << fname << endl;
exit(1);}
863 if(y>=1) out_far << x <<
"\t\t" << y << endl;
864 if(y<1) out_far << x <<
"\t\t" << y << endl;
866 if(y>=1) out_efar << x <<
"\t\t" << y <<
"\t\t" << ex <<
"\t" << ey << endl;
867 if(y<1) out_efar << x <<
"\t\t" << y <<
"\t" << ex <<
"\t" << ey << endl;
902 for (
int k=1; k<
nlag; k++) {
904 if(Tlag[k]>0) rate=y_lag[
k][
j]/Tlag[
k];
911 sigma= sqrt((sum-elag*mean*mean)/elag);
916 cout << fname << endl;
926 for (
int k=1; k<nlag-1; k++) {
928 if(Tlag[k]>0) rate=y_lag_veto[
k][
j]/Tlag[
k];
935 sigma= sqrt((sum-elag*mean*mean)/elag);
940 cout << fname << endl;
946 pf_vED->Draw(
"colz");
948 c1->Update(); c1->SaveAs(fname);
953 c1->Update(); c1->SaveAs(fname);
958 c1->Update(); c1->SaveAs(fname);
963 c1->Update(); c1->SaveAs(fname);
966 c1 =
new TCanvas(
"c",
"C",0,0,1400,400*nIFO);
967 c1->SetBorderMode(0);
969 c1->SetBorderSize(2);
972 c1->SetBottomMargin(0.143939);
973 c1->SetRightMargin(0.1517039);
974 c1->SetTopMargin(0.0772727);
978 for(i=1; i<nIFO+1; i++) {
981 hF[
i]->Divide(hF[0]); hF[
i]->SetMaximum(100.);
982 gStyle->SetOptStat(kFALSE);
983 gPad->SetBottomMargin(0.2);
985 hF[
i]->GetYaxis()->SetLabelSize(0.06);
986 hF[
i]->GetXaxis()->SetTimeDisplay(1);
994 for(i=1; i<nIFO+1; i++) {
997 hF2[
i]->Divide(hF2[0]); hF2[
i]->SetMaximum(100.);
998 gStyle->SetOptStat(kFALSE);
999 gPad->SetBottomMargin(0.2);
1000 hF2[
i]->Draw(
"HIST");
1001 hF2[
i]->GetYaxis()->SetLabelSize(0.06);
1014 c1 =
new TCanvas(
"c",
"C",0,0,1400,1050);
1015 c1->SetBorderMode(0);
1016 c1->SetFillColor(0);
1017 c1->SetBorderSize(2);
1020 c1->SetBottomMargin(0.143939);
1022 c1->SetRightMargin(0.10);
1023 c1->SetLeftMargin(0.15);
1024 c1->SetTopMargin(0.0772727);
1028 hR[1]->Divide(hR[0]);
1029 hR[1]->Draw(
"HIST");
1030 hR[1]->SetMinimum(1.
e-5);
1031 gStyle->SetOptStat(kFALSE);
1032 hR[1]->Draw(
"HIST");
1033 hR[1]->GetXaxis()->SetTimeDisplay(1);
1034 hR[1]->GetXaxis()->SetLabelSize(0.04);
1035 for(i=2; i<3; i++) { hR[
i]->Divide(hR[0]); hR[
i]->Draw(
"same"); }
1037 c1->Update(); c1->SaveAs(fname);
1040 c1->SetLogy(kFALSE);
1044 gr2->SetTitle(_title);
1045 gr2->SetLineColor(1);
1046 gr2->SetMarkerStyle(20);
1047 gr2->SetMarkerColor(1);
1048 gr2->SetMarkerSize(1);
1050 gr2->GetHistogram()->SetXTitle(
"lag");
1051 gr2->GetHistogram()->SetYTitle(
"rate, Hz");
1052 gr2->GetHistogram()->GetXaxis()->SetNdivisions(508);
1055 c1->Update(); c1->SaveAs(fname);
1058 c1->SetLogy(kFALSE);
1062 gr2->SetTitle(
"live vs lag");
1063 gr2->SetLineColor(1);
1064 gr2->SetMarkerStyle(20);
1065 gr2->SetMarkerColor(1);
1066 gr2->SetMarkerSize(1);
1068 gr2->GetHistogram()->GetXaxis()->SetNdivisions(508);
1069 gr2->GetHistogram()->SetXTitle(
"lag");
1070 gr2->GetHistogram()->SetYTitle(
"live, days");
1074 c1->Update(); c1->SaveAs(fname);
1076 #define YEAR (24.*3600.*365.) 1080 if(
pp_rho_log) c1->SetLogx(kTRUE);
else c1->SetLogx(kFALSE);
1087 gr1->SetTitle(
"after pp-cuts");
1088 gr1->SetLineColor(1);
1089 gr1->SetMarkerStyle(20);
1090 gr1->SetMarkerColor(1);
1091 gr1->SetMarkerSize(1);
1092 gr1->SetMinimum(0.5/liveTot*
YEAR);
1095 gr1->GetHistogram()->SetXTitle(
"#rho");
1096 gr1->GetHistogram()->SetYTitle(
"rate, 1/year");
1099 c1->Update(); c1->SaveAs(fname);
1104 if(
pp_rho_log) c1->SetLogx(kTRUE);
else c1->SetLogx(kFALSE);
1107 Ycut_veto_year *=
YEAR;
1108 Yerr_veto_year *=
YEAR;
1109 TGraphErrors* gr1_veto;
1111 gr1_veto->SetTitle(
"after pp-cuts & vetoes");
1112 gr1_veto->SetLineColor(1);
1113 gr1_veto->SetMarkerStyle(20);
1114 gr1_veto->SetMarkerColor(1);
1115 gr1_veto->SetMarkerSize(1);
1116 gr1_veto->SetMinimum(0.5/liveTot*YEAR);
1118 gr1_veto->Draw(
"AP");
1119 gr1_veto->GetHistogram()->SetXTitle(
"#rho");
1120 gr1_veto->GetHistogram()->SetYTitle(
"rate, 1/year");
1123 c1->Update(); c1->SaveAs(fname);
1126 if(
pp_rho_log) c1->SetLogx(kTRUE);
else c1->SetLogx(kFALSE);
1127 gr1->SetTitle(
"after pp-cuts (black), after pp-cuts & vetoes (red) ");
1129 gr1_veto->SetLineColor(2);
1130 gr1_veto->SetMarkerColor(2);
1131 gr1_veto->Draw(
"P,same");
1133 c1->Update(); c1->SaveAs(fname);
1137 if(pp_rho_vs_rate_no_multiplicity) {
1140 if(
pp_rho_log) c1->SetLogx(kTRUE);
else c1->SetLogx(kFALSE);
1143 Ycut_multi_year *=
YEAR;
1144 Yerr_multi_year *=
YEAR;
1145 TGraphErrors* gr1_multi;
1147 gr1_multi->SetLineColor(1);
1148 gr1_multi->SetMarkerStyle(20);
1149 gr1_multi->SetMarkerColor(1);
1150 gr1_multi->SetMarkerSize(1);
1151 gr1_multi->SetMinimum(0.5/liveTot);
1153 gr1_multi->Draw(
"AP");
1154 gr1_multi->GetHistogram()->SetXTitle(
"#rho");
1155 gr1_multi->GetHistogram()->SetYTitle(
"rate, Hz");
1158 c1->Update(); c1->SaveAs(fname);
1161 if(
pp_rho_log) c1->SetLogx(kTRUE);
else c1->SetLogx(kFALSE);
1163 gr1->SetTitle(
"after pp-cuts (black), no-multiplicity (green) ");
1164 gr1_multi->SetLineColor(kGreen+2);
1165 gr1_multi->SetMarkerColor(kGreen+2);
1166 gr1_multi->Draw(
"P,same");
1167 sprintf(fname,
"%s/rate_threshold_multi_compare.eps",
netdir);
1168 c1->Update(); c1->SaveAs(fname);
1172 c1->SetLogy(kFALSE);
1175 c1->Update(); c1->SaveAs(fname);
1181 c1->Update(); c1->SaveAs(fname);
1187 c1->Update(); c1->SaveAs(fname);
1189 gStyle->SetOptStat(kTRUE);
1194 c1->Update(); c1->SaveAs(fname);
1197 if(
pp_rho_log) c1->SetLogx(kTRUE);
else c1->SetLogx(kFALSE);
1200 c1->Update();c1->SaveAs(fname);
1203 hrho[0]->Draw(
"HIST");
1204 hrho[1]->Draw(
"same");
1206 c1->Update(); c1->SaveAs(fname);
1209 gROOT->LoadMacro(wat_dir+
"/tools/cwb/postproduction/burst/h12ascii.C");
1211 h12ascii(hrho[0],fname);
1213 h12ascii(hrho[1],fname);
1219 c1->Update(); c1->SaveAs(fname);
1224 c1->Update(); c1->SaveAs(fname);
1227 Mchirp->Draw(
"HIST");
1229 c1->Update(); c1->SaveAs(fname);
1232 c1->SetLogy(kFALSE);
1233 McErr->Draw(
"HIST");
1235 c1->Update(); c1->SaveAs(fname);
1238 c1->SetLogx(kFALSE);
1239 if(
pp_rho_log) c1->SetLogy(kTRUE);
else c1->SetLogy(kFALSE);
1240 rho_subnet->Draw(
"colz");
1242 c1->Update(); c1->SaveAs(fname);
1245 c1->SetLogx(kFALSE);
1246 if(
pp_rho_log) c1->SetLogy(kTRUE);
else c1->SetLogy(kFALSE);
1247 rho_vED->Draw(
"colz");
1249 c1->Update(); c1->SaveAs(fname);
1252 c1->SetLogx(kFALSE);
1253 if(
pp_rho_log) c1->SetLogy(kTRUE);
else c1->SetLogy(kFALSE);
1254 rho_pf->Draw(
"colz");
1256 c1->Update(); c1->SaveAs(fname);
1259 c1->SetLogx(kFALSE);
1260 if(
pp_rho_log) c1->SetLogy(kTRUE);
else c1->SetLogy(kFALSE);
1261 rhocc->Draw(
"colz");
1263 c1->Update(); c1->SaveAs(fname);
1266 ECOR_cc->Draw(
"HIST");
1268 c1->Update(); c1->SaveAs(fname);
1271 ecor_cc->Draw(
"HIST");
1273 c1->Update(); c1->SaveAs(fname);
1277 if(
pp_rho_log) c1->SetLogy(kTRUE);
else c1->SetLogy(kFALSE);
1278 rho_mchirp->Draw(
"colz");
1280 c1->Update(); c1->SaveAs(fname);
1281 c1->SetLogx(kFALSE);
1287 gsm_theta_phi->
SetTitle(
"Latitude - Longitude");
1289 gsm_theta_phi->
Draw();
1291 gsm_theta_phi->
GetCanvas()->SaveAs(fname);
1292 delete gsm_theta_phi;
1295 gsm_ra_dec->
SetTitle(
"right ascension - declination");
1299 gsm_ra_dec->
GetHistogram()->GetXaxis()->SetTitle(
"right ascension, degree");
1300 gsm_ra_dec->
GetHistogram()->GetYaxis()->SetTitle(
"declination, degree");
wavearray< double > Yfar(far_rho_bin)
wavearray< double > Ycut_veto(pp_rho_bin)
void Export(TString fname="")
wavearray< double > Yerr_veto(pp_rho_bin)
wavearray< double > Trun(500000)
wavearray< double > Yerr_multi(pp_rho_bin)
wavearray< double > yCUT(pp_rho_bin)
wavearray< double > Xfar(far_rho_bin)
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
wavearray< int > SAVE(ntrg)
void Draw(int dpaletteId=1, Option_t *option="colfz")
cout<< "Start CWB::Toolbox::getLiveTime : be patient, it takes a while ..."<< endl;liveTot=CWB::Toolbox::getLiveTime(nIFO, live, Trun, Wlag, Wslag, Tlag, Tdlag, cwb_lag_number, cwb_slag_number);std::map< std::pair< int, int >, int > lagslag
wavearray< int > Wsel(ntrg)
void Import(TString umacro="")
wavearray< double > yERR(pp_rho_bin)
wavearray< double > Xerr(pp_rho_bin)
size_t getSkyIndex(double th, double ph)
param: theta param: phi
wavearray< double > Yerr(pp_rho_bin)
virtual size_t size() const
ofstream out_lf(fname, ios::out)
wavearray< double > Ycut(pp_rho_bin)
wavearray< double > Xcut(pp_rho_bin)
fprintf(flive,"nonzero lags live=%10.1f \, liveTot)
printf("total live time: non-zero lags = %10.1f \, liveTot)
TIter next(wave.GetListOfBranches())
void SetGalacticDisk(double gpsGalacticDisk=0.0)
wavearray< int > LAG_PASS(ntrg)
wavearray< double > Tdlag
void SetTitle(TString title)
wavearray< double > Ycut_multi(pp_rho_bin)
void SetWorldMap(bool drawWorldMap=true)
double fabs(const Complex &x)
strcpy(RunLabel, RUN_LABEL)
sprintf(fname,"%s/live.txt", netdir)
void set(size_t i, double a)
param: sky index param: value to set
wavearray< double > Wlag[NIFO_MAX+1]
detectorParams detParms[4]
void add(size_t i, double a)
param: sky index param: value to add
virtual void resize(unsigned int)
void SetSingleDetectorMode()
wavearray< double > Wslag[NIFO_MAX+1]