23 int pp_inetcc,
float T_cor,
int pp_irho,
float T_cut,
float T_vED,
float T_pen,
float T_ifar) {
25 if(gtype!=
"distance" && gtype!=
"snr") {
26 cout <<
"DrawRECvsINJ : Error - wrong input gtype (snr/distance)" << endl;
33 gCANVAS =
new TCanvas(
"fom",
"PRC", 300,40, 600, 500);
34 gCANVAS->Range(-19.4801,-9.25,-17.4775,83.25);
35 gCANVAS->SetBorderSize(2);
36 gCANVAS->SetFrameFillColor(0);
45 sprintf(sim_file_name,
"merge/wave_%s.%s.root",data_label.Data(),merge_label.Data());
46 TFile* fwave = TFile::Open(sim_file_name);
47 gTRWAVE = (TTree*) gROOT->FindObject(
"waveburst");
50 sprintf(mdc_file_name,
"merge/mdc_%s.%s.root",data_label.Data(),merge_label.Data());
51 TFile *fmdc = TFile::Open(mdc_file_name);
52 gTRMDC = (TTree*) gROOT->FindObject(
"mdc");
58 if(gtype==
"snr") gCANVAS->SetLogx(
true);
59 gCANVAS->SetLogy(
true);
60 ptitle=
"Reconstructed events vs Injected events";
61 gStyle->SetOptStat(0);
64 xtitle = gtype==
"snr" ?
"Injected SNRnet" :
"distance (Mpc)";
67 RECvsINJ(0, gtype, ptitle, xtitle, ytitle, nIFO, T_win, pp_inetcc, T_cor, pp_irho, T_cut, T_vED, T_pen, T_ifar);
71 sprintf(ofname,
"%s/inj_vs_rec_snr.gif",odir.Data());
73 sprintf(ofname,
"%s/inj_vs_rec_distance.gif",odir.Data());
75 gCANVAS->Print(ofname);
78 pfname.ReplaceAll(
".gif",
".png");
79 sprintf(cmd,
"convert %s %s",ofname,pfname.Data());
90 int pp_inetcc,
float T_cor,
int pp_irho,
float T_cut,
float T_vED,
float T_pen,
float T_ifar) {
100 strcpy(tmp,
"snr[0]*snr[0]");
102 strcpy(tmp,sel);
sprintf(sel,
"sqrt(%s)>>hist(10000,1,10000)",tmp);
104 double dmin = gTRMDC->GetMinimum(
"distance");
105 double dmax = gTRMDC->GetMaximum(
"distance");
106 sprintf(sel,
"distance>>hist(30,%f,%f)",dmin,dmax);
108 gTRMDC->Draw(sel,cut,
"");
109 int nmdc = gTRMDC->GetSelectedRows();
110 cout <<
"nmdc : " << nmdc << endl;
112 TH2F *htemp = (TH2F*)gPad->GetPrimitive(
"hist");
113 htemp->GetXaxis()->SetTitle(xtitle);
114 htemp->GetYaxis()->SetTitle(ytitle);
117 htemp->GetYaxis()->SetRangeUser(0.1, pow(10.,TMath::Ceil(TMath::Log10(htemp->GetMaximum()))));
119 htemp->GetXaxis()->SetRangeUser(gTRMDC->GetMinimum(
"distance"),gTRMDC->GetMaximum(
"distance"));
121 htemp->GetXaxis()->SetTitleOffset(1.35);
122 htemp->GetYaxis()->SetTitleOffset(1.35);
123 htemp->GetXaxis()->CenterTitle(
true);
124 htemp->GetYaxis()->CenterTitle(
true);
125 htemp->GetXaxis()->SetLabelFont(42);
126 htemp->GetXaxis()->SetTitleFont(42);
127 htemp->GetYaxis()->SetLabelFont(42);
128 htemp->GetYaxis()->SetTitleFont(42);
139 sprintf(cut,
"abs(time[0]-time[%d])<%g && netcc[%d]>%g && rho[%d]>%g",
140 nIFO,T_win,pp_inetcc,T_cor,pp_irho,T_cut);
141 if(T_vED>0) {
strcpy(tmp,cut);
sprintf(cut,
"%s && neted[0]/ecor<%f",tmp,T_vED);}
142 if(T_pen>0) {
strcpy(tmp,cut);
sprintf(cut,
"%s && penalty>%f",tmp,T_pen);}
143 if(T_ifar>0) {
strcpy(tmp,cut);
sprintf(cut,
"%s && ifar>(24.*3600.*365.)*%f",tmp,T_ifar);}
144 gTRWAVE->SetLineColor(kRed);
145 gTRWAVE->SetFillColor(kRed);
146 gTRWAVE->Draw(sel,cut,
"same");
147 int nwave = gTRWAVE->GetSelectedRows();
148 cout <<
"nwave : " << nwave << endl;
152 htemp->SetTitle(title);
178 pp_inetcc, T_cor, pp_irho, T_cut, T_vED, T_pen, T_ifar);
void DrawRECvsINJ(TString gtype, TString data_label, TString odir, TString merge_label, int nIFO, float T_win, int pp_inetcc, float T_cor, int pp_irho, float T_cut, float T_vED, float T_pen, float T_ifar)
void DrawRECvsINJ(TString gtype, TString data_label, TString odir, TString merge_label, int nIFO, float T_win, int pp_inetcc, float T_cor, int pp_irho, float T_cut, float T_vED, float T_pen, float T_ifar)
void RECvsINJ(int mtype, TString gtype, TString ptitle, TString xtitle, TString ytitle, int nIFO, float T_win, int pp_inetcc, float T_cor, int pp_irho, float T_cut, float T_vED, float T_pen, float T_ifar)
TString sel("slag[1]:rho[1]")
strcpy(RunLabel, RUN_LABEL)
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)