25 #define MAXIFAR 10000. 27 #define MAXRADIUS 1000 38 TCanvas*
co_canvas =
new TCanvas(
"sd2",
"SD2", 3, 47, 1000, 802);
39 co_canvas->SetGridx();
40 co_canvas->SetGridy();
43 std::array<float, 5> BBH_MTotBins = {4.0, 27.25, 51.50, 75.75, 100.0};
44 std::array<float, 5> IMBHB_MTotBins = {100.0, 200.0, 400.0, 600.0, 800.0};
45 std::array<float, 5> MTotBins = {0.0, 0.0, 0.0, 0.0, 0.0};
46 std::array<float, 5> MChirpBins = {0.0, 0.0, 0.0, 0.0, 0.0};
47 std::array<float, 5> BBH_MChirpBins = {1.74, 8.07, 14.92, 21.77, 100.0};
48 std::array<float, 5> IMBHB_MChirpBins = {
49 1.74, 100.0, 149.2, 217.7, 500.0};
50 std::array<float, 4> ChieffBins = {-1.0, -0.4, 0.4, 1.0};
51 std::array<float, 4> ChipBins = {0.0, 0.3333, 0.6666, 1.0};
52 std::array<float, 4> CosiBins = {-1.0, -0.86602540, 0.86602540, 1.0};
53 TString CosiBinsT[4] = {
"-1",
"-#sqrt{3}/2",
"#sqrt{3}/2",
"1"};
54 std::array<float, 5> EtaBins = {0.25, 0.24, 0.22, 0.18, 0.0};
57 Color_t col_arr[4] = {kBlue, kCyan, kGreen - 9, kOrange};
58 Color_t col_arr2[3] = {kViolet - 1, kGreen - 9, kRed};
60 if (opt.Contains(
"IMBHB")) {
61 MTotBins = IMBHB_MTotBins;
62 MChirpBins = IMBHB_MChirpBins;
64 MTotBins = BBH_MTotBins;
65 MChirpBins = BBH_MChirpBins;
72 cout <<
"Sensitive Distance vs IFAR ROC plot: Mtot" << endl;
73 TMultiGraph*
mg =
new TMultiGraph();
77 std::vector<TGraphErrors*> co_gr(4);
78 TLegend* leg =
new TLegend(0.6, 0.7, 0.9, 0.9,
"",
"brNDC");
80 while (bin_count < 4) {
81 sel.Form(
"(mass[0]+mass[1] >= %f) && (mass[0]+mass[1] < %f)",
82 MTotBins[bin_count], MTotBins[bin_count + 1]);
84 sim_file_name, mdc_file_name, sel, shell_volume, col_arr[bin_count],
86 if (co_gr[bin_count]->GetN() > 1) {
87 mg->Add(co_gr[bin_count]);
88 sel.Form(
"M_{total} #in [%3.2f, %3.2f] M_{#odot}",
89 MTotBins[bin_count], MTotBins[bin_count + 1]);
90 leg->AddEntry(co_gr[bin_count], sel,
"l");
94 mg->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
95 mg->GetXaxis()->SetTitle(
"Inverse False Alarm Rate [yr]");
98 mg->GetXaxis()->SetTitleOffset(1.3);
99 mg->GetYaxis()->SetTitleOffset(1.25);
100 mg->GetXaxis()->SetTickLength(0.01);
101 mg->GetYaxis()->SetTickLength(0.01);
102 mg->GetXaxis()->CenterTitle(kTRUE);
103 mg->GetYaxis()->CenterTitle(kTRUE);
104 mg->GetXaxis()->SetTitleFont(42);
105 mg->GetXaxis()->SetLabelFont(42);
106 mg->GetYaxis()->SetTitleFont(42);
107 mg->GetYaxis()->SetLabelFont(42);
111 leg->SetFillColorAlpha(0, 0.7);
117 co_canvas->SaveAs(fname);
121 cout <<
"Sensitive Distance vs rho[1] ROC plot: Mtot" << endl;
122 TMultiGraph* mgr =
new TMultiGraph();
124 while (bin_count < 4) {
125 sel.Form(
"(mass[0]+mass[1] >= %f) && (mass[0]+mass[1] < %f)",
126 MTotBins[bin_count], MTotBins[bin_count + 1]);
128 sim_file_name, mdc_file_name, sel, shell_volume, col_arr[bin_count],
130 if (co_gr[bin_count]->GetN() > 1) {
131 mgr->Add(co_gr[bin_count]);
139 mgr->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
140 mgr->GetXaxis()->SetTitle(
"Magnitude Test Statistic (rho[1])");
143 mgr->GetXaxis()->SetTitleOffset(1.3);
144 mgr->GetYaxis()->SetTitleOffset(1.25);
145 mgr->GetXaxis()->SetTickLength(0.01);
146 mgr->GetYaxis()->SetTickLength(0.01);
147 mgr->GetXaxis()->CenterTitle(kTRUE);
148 mgr->GetYaxis()->CenterTitle(kTRUE);
149 mgr->GetXaxis()->SetTitleFont(42);
150 mgr->GetXaxis()->SetLabelFont(42);
151 mgr->GetYaxis()->SetTitleFont(42);
152 mgr->GetYaxis()->SetLabelFont(42);
155 leg->SetFillColorAlpha(0, 1.0);
159 co_canvas->SetLogy();
161 co_canvas->SaveAs(fname);
162 co_canvas->SetLogy(0);
166 cout <<
"Sensitive Distance vs IFAR ROC plot: Chieff" << endl;
167 TMultiGraph* mg2 =
new TMultiGraph();
168 TLegend* leg2 =
new TLegend(0.6, 0.8, 0.9, 0.9,
"",
"tlNDC");
170 while (bin_count < 3) {
172 "(spin[2]*mass[0]+spin[5]*mass[1])/(mass[1]+mass[0])>= %f && " 173 "(spin[2]*mass[0]+spin[5]*mass[1])/(mass[1]+mass[0])< %f",
174 ChieffBins[bin_count], ChieffBins[bin_count + 1]);
176 sim_file_name, mdc_file_name, sel, shell_volume,
179 if (co_gr[bin_count]->GetN() > 1) {
180 mg2->Add(co_gr[bin_count]);
181 sel.Form(
"#chi_{eff} #in [%3.1f, %3.1f]", ChieffBins[bin_count],
182 ChieffBins[bin_count + 1]);
183 leg2->AddEntry(co_gr[bin_count], sel,
"l");
188 mg2->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
189 mg2->GetXaxis()->SetTitle(
"Inverse False Alarm Rate [yr]");
192 mg2->GetXaxis()->SetTitleOffset(1.3);
193 mg2->GetYaxis()->SetTitleOffset(1.25);
194 mg2->GetXaxis()->SetTickLength(0.01);
195 mg2->GetYaxis()->SetTickLength(0.01);
196 mg2->GetXaxis()->CenterTitle(kTRUE);
197 mg2->GetYaxis()->CenterTitle(kTRUE);
198 mg2->GetXaxis()->SetTitleFont(42);
199 mg2->GetXaxis()->SetLabelFont(42);
200 mg2->GetYaxis()->SetTitleFont(42);
201 mg2->GetYaxis()->SetLabelFont(42);
206 leg2->SetFillColor(0);
207 leg2->SetFillColorAlpha(0, 0.7);
212 co_canvas->SaveAs(fname);
216 cout <<
"Sensitive Distance vs IFAR ROC plot: Chip" << endl;
217 TMultiGraph* mg4 =
new TMultiGraph();
218 TLegend* leg4 =
new TLegend(0.6, 0.8, 0.9, 0.9,
"",
"tlNDC");
220 while (bin_count < 3) {
221 sel.Form(
"chip >= %f && chip < %f", ChipBins[bin_count],
222 ChipBins[bin_count + 1]);
224 sim_file_name, mdc_file_name, sel, shell_volume,
227 if (co_gr[bin_count]->GetN() > 1) {
228 mg4->Add(co_gr[bin_count]);
229 sel.Form(
"#chi_{p} #in [%3.1f, %3.1f]", ChipBins[bin_count],
230 ChipBins[bin_count + 1]);
231 leg4->AddEntry(co_gr[bin_count], sel,
"l");
236 mg4->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
237 mg4->GetXaxis()->SetTitle(
"Inverse False Alarm Rate [yr]");
240 mg4->GetXaxis()->SetTitleOffset(1.3);
241 mg4->GetYaxis()->SetTitleOffset(1.25);
242 mg4->GetXaxis()->SetTickLength(0.01);
243 mg4->GetYaxis()->SetTickLength(0.01);
244 mg4->GetXaxis()->CenterTitle(kTRUE);
245 mg4->GetYaxis()->CenterTitle(kTRUE);
246 mg4->GetXaxis()->SetTitleFont(42);
247 mg4->GetXaxis()->SetLabelFont(42);
248 mg4->GetYaxis()->SetTitleFont(42);
249 mg4->GetYaxis()->SetLabelFont(42);
254 leg4->SetFillColor(0);
255 leg4->SetFillColorAlpha(0, 0.7);
260 co_canvas->SaveAs(fname);
264 cout <<
"Sensitive Distance vs IFAR ROC plot: Inclination" << endl;
265 TMultiGraph* mg6 =
new TMultiGraph();
266 TLegend* leg6 =
new TLegend(0.6, 0.8, 0.9, 0.9,
"",
"tlNDC");
268 while (bin_count < 3) {
269 sel.Form(
"iota[1] >= %f && iota[1] < %f", CosiBins[bin_count],
270 CosiBins[bin_count + 1]);
272 sim_file_name, mdc_file_name, sel, shell_volume,
275 if (co_gr[bin_count]->GetN() > 1) {
276 mg6->Add(co_gr[bin_count]);
277 sel.Form(
"#Cos(#iota) #in [%s, %s]", CosiBinsT[bin_count].Data(),
278 CosiBinsT[bin_count + 1].Data());
279 leg6->AddEntry(co_gr[bin_count], sel,
"l");
284 mg6->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
285 mg6->GetXaxis()->SetTitle(
"Inverse False Alarm Rate [yr]");
288 mg6->GetXaxis()->SetTitleOffset(1.3);
289 mg6->GetYaxis()->SetTitleOffset(1.25);
290 mg6->GetXaxis()->SetTickLength(0.01);
291 mg6->GetYaxis()->SetTickLength(0.01);
292 mg6->GetXaxis()->CenterTitle(kTRUE);
293 mg6->GetYaxis()->CenterTitle(kTRUE);
294 mg6->GetXaxis()->SetTitleFont(42);
295 mg6->GetXaxis()->SetLabelFont(42);
296 mg6->GetYaxis()->SetTitleFont(42);
297 mg6->GetYaxis()->SetLabelFont(42);
302 leg6->SetFillColor(0);
303 leg6->SetFillColorAlpha(0, 0.7);
308 co_canvas->SaveAs(fname);
312 cout <<
"Sensitive Distance vs rho[1] ROC plot: Chieff" << endl;
313 TMultiGraph* mg2r =
new TMultiGraph();
315 while (bin_count < 3) {
317 "(spin[2]*mass[0]+spin[5]*mass[1])/(mass[1]+mass[0])>= %f && " 318 "(spin[2]*mass[0]+spin[5]*mass[1])/(mass[1]+mass[0])< %f",
319 ChieffBins[bin_count], ChieffBins[bin_count + 1]);
321 sim_file_name, mdc_file_name, sel, shell_volume,
324 if (co_gr[bin_count]->GetN() > 1) {
325 mg2r->Add(co_gr[bin_count]);
332 mg2r->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
333 mg2r->GetXaxis()->SetTitle(
"Magnitude Test Statistic (rho[1])");
336 mg2r->GetXaxis()->SetTitleOffset(1.3);
337 mg2r->GetYaxis()->SetTitleOffset(1.25);
338 mg2r->GetXaxis()->SetTickLength(0.01);
339 mg2r->GetYaxis()->SetTickLength(0.01);
340 mg2r->GetXaxis()->CenterTitle(kTRUE);
341 mg2r->GetYaxis()->CenterTitle(kTRUE);
342 mg2r->GetXaxis()->SetTitleFont(42);
343 mg2r->GetXaxis()->SetLabelFont(42);
344 mg2r->GetYaxis()->SetTitleFont(42);
345 mg2r->GetYaxis()->SetLabelFont(42);
348 leg2->SetFillColorAlpha(0, 1.0);
352 co_canvas->SetLogy();
354 co_canvas->SaveAs(fname);
355 co_canvas->SetLogy(0);
359 cout <<
"Sensitive Distance vs rho[1] ROC plot: Chip" << endl;
360 TMultiGraph* mg4r =
new TMultiGraph();
362 while (bin_count < 3) {
363 sel.Form(
"chip >= %f && chip < %f", ChipBins[bin_count],
364 ChipBins[bin_count + 1]);
366 sim_file_name, mdc_file_name, sel, shell_volume,
369 if (co_gr[bin_count]->GetN() > 1) {
370 mg4r->Add(co_gr[bin_count]);
378 mg4r->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
379 mg4r->GetXaxis()->SetTitle(
"Magnitude Test Statistic (rho[1])");
382 mg4r->GetXaxis()->SetTitleOffset(1.3);
383 mg4r->GetYaxis()->SetTitleOffset(1.25);
384 mg4r->GetXaxis()->SetTickLength(0.01);
385 mg4r->GetYaxis()->SetTickLength(0.01);
386 mg4r->GetXaxis()->CenterTitle(kTRUE);
387 mg4r->GetYaxis()->CenterTitle(kTRUE);
388 mg4r->GetXaxis()->SetTitleFont(42);
389 mg4r->GetXaxis()->SetLabelFont(42);
390 mg4r->GetYaxis()->SetTitleFont(42);
391 mg4r->GetYaxis()->SetLabelFont(42);
394 leg4->SetFillColorAlpha(0, 1.0);
398 co_canvas->SetLogy();
400 co_canvas->SaveAs(fname);
401 co_canvas->SetLogy(0);
405 cout <<
"Sensitive Distance vs rho[1] ROC plot: Inclination" << endl;
406 TMultiGraph* mg6r =
new TMultiGraph();
408 while (bin_count < 3) {
409 sel.Form(
"iota[1] >= %f && iota[1] < %f", CosiBins[bin_count],
410 CosiBins[bin_count + 1]);
412 sim_file_name, mdc_file_name, sel, shell_volume,
415 if (co_gr[bin_count]->GetN() > 1) {
416 mg6r->Add(co_gr[bin_count]);
424 mg6r->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
425 mg6r->GetXaxis()->SetTitle(
"Magnitude Test Statistic (rho[1])");
428 mg6r->GetXaxis()->SetTitleOffset(1.3);
429 mg6r->GetYaxis()->SetTitleOffset(1.25);
430 mg6r->GetXaxis()->SetTickLength(0.01);
431 mg6r->GetYaxis()->SetTickLength(0.01);
432 mg6r->GetXaxis()->CenterTitle(kTRUE);
433 mg6r->GetYaxis()->CenterTitle(kTRUE);
434 mg6r->GetXaxis()->SetTitleFont(42);
435 mg6r->GetXaxis()->SetLabelFont(42);
436 mg6r->GetYaxis()->SetTitleFont(42);
437 mg6r->GetYaxis()->SetLabelFont(42);
440 leg6->SetFillColorAlpha(0, 1.0);
444 co_canvas->SetLogy();
446 co_canvas->SaveAs(fname);
447 co_canvas->SetLogy(0);
451 cout <<
"Sensitive Distance vs IFAR ROC plot: Mchirp" << endl;
452 TMultiGraph* mg3 =
new TMultiGraph();
453 TLegend* leg3 =
new TLegend(0.6, 0.7, 0.9, 0.9,
"",
"brNDC");
455 while (bin_count < 4) {
456 sel.Form(
"(chirp[0] >= %f) && (chirp[0] < %f)", MChirpBins[bin_count],
457 MChirpBins[bin_count + 1]);
459 sim_file_name, mdc_file_name, sel, shell_volume, col_arr[bin_count],
461 if (co_gr[bin_count]->GetN() > 1) {
462 mg3->Add(co_gr[bin_count]);
463 sel.Form(
"M_{chirp} #in [%3.2f, %3.2f] M_{#odot}",
464 MTotBins[bin_count], MTotBins[bin_count + 1]);
465 leg3->AddEntry(co_gr[bin_count], sel,
"l");
470 mg3->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
471 mg3->GetXaxis()->SetTitle(
"Inverse False Alarm Rate [yr]");
474 mg3->GetXaxis()->SetTitleOffset(1.3);
475 mg3->GetYaxis()->SetTitleOffset(1.25);
476 mg3->GetXaxis()->SetTickLength(0.01);
477 mg3->GetYaxis()->SetTickLength(0.01);
478 mg3->GetXaxis()->CenterTitle(kTRUE);
479 mg3->GetYaxis()->CenterTitle(kTRUE);
480 mg3->GetXaxis()->SetTitleFont(42);
481 mg3->GetXaxis()->SetLabelFont(42);
482 mg3->GetYaxis()->SetTitleFont(42);
483 mg3->GetYaxis()->SetLabelFont(42);
488 leg3->SetFillColor(0);
489 leg3->SetFillColorAlpha(0, 0.7);
494 co_canvas->SaveAs(fname);
498 cout <<
"Sensitive Distance vs rho[1] ROC plot: Mchirp" << endl;
499 TMultiGraph* mg3r =
new TMultiGraph();
501 while (bin_count < 4) {
502 sel.Form(
"(chirp[0] >= %f) && (chirp[0] < %f)", MChirpBins[bin_count],
503 MChirpBins[bin_count + 1]);
505 sim_file_name, mdc_file_name, sel, shell_volume, col_arr[bin_count],
507 if (co_gr[bin_count]->GetN() > 1) {
508 mg3r->Add(co_gr[bin_count]);
516 mg3r->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
517 mg3r->GetXaxis()->SetTitle(
"Magnitude Test Statistic (rho[1])");
520 mg3r->GetXaxis()->SetTitleOffset(1.3);
521 mg3r->GetYaxis()->SetTitleOffset(1.25);
522 mg3r->GetXaxis()->SetTickLength(0.01);
523 mg3r->GetYaxis()->SetTickLength(0.01);
524 mg3r->GetXaxis()->CenterTitle(kTRUE);
525 mg3r->GetYaxis()->CenterTitle(kTRUE);
526 mg3r->GetXaxis()->SetTitleFont(42);
527 mg3r->GetXaxis()->SetLabelFont(42);
528 mg3r->GetYaxis()->SetTitleFont(42);
529 mg3r->GetYaxis()->SetLabelFont(42);
532 leg3->SetFillColorAlpha(0, 1.0);
536 co_canvas->SetLogy();
538 co_canvas->SaveAs(fname);
542 cout <<
"Sensitive Distance vs IFAR ROC plot: Symmetric Mass Ratio" << endl;
543 TMultiGraph* mg5 =
new TMultiGraph();
544 TLegend* leg5 =
new TLegend(0.6, 0.7, 0.9, 0.9,
"",
"brNDC");
546 while (bin_count < 4) {
548 "(mass[0]*mass[1]/pow(mass[0]+mass[1],2.0) <= %f) && " 549 "(mass[0]*mass[1]/pow(mass[0]+mass[1],2.0) > %f)",
550 EtaBins[bin_count], EtaBins[bin_count + 1]);
552 sim_file_name, mdc_file_name, sel, shell_volume, col_arr[bin_count],
554 if (co_gr[bin_count]->GetN() > 1) {
555 mg5->Add(co_gr[bin_count]);
556 sel.Form(
"#eta #in [%3.3f, %3.3f]", EtaBins[bin_count + 1],
558 leg5->AddEntry(co_gr[bin_count], sel,
"l");
563 mg5->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
564 mg5->GetXaxis()->SetTitle(
"Inverse False Alarm Rate [yr]");
567 mg5->GetXaxis()->SetTitleOffset(1.3);
568 mg5->GetYaxis()->SetTitleOffset(1.25);
569 mg5->GetXaxis()->SetTickLength(0.01);
570 mg5->GetYaxis()->SetTickLength(0.01);
571 mg5->GetXaxis()->CenterTitle(kTRUE);
572 mg5->GetYaxis()->CenterTitle(kTRUE);
573 mg5->GetXaxis()->SetTitleFont(42);
574 mg5->GetXaxis()->SetLabelFont(42);
575 mg5->GetYaxis()->SetTitleFont(42);
576 mg5->GetYaxis()->SetLabelFont(42);
582 leg5->SetFillColorAlpha(0, 0.9);
586 co_canvas->SetLogy(0);
588 co_canvas->SaveAs(fname);
592 cout <<
"Sensitive Distance vs rho[1] ROC plot: Symmetric Mass Ratio" 594 TMultiGraph* mg5r =
new TMultiGraph();
596 while (bin_count < 4) {
598 "(mass[0]*mass[1]/pow(mass[0]+mass[1],2.0) <= %f) && " 599 "(mass[0]*mass[1]/pow(mass[0]+mass[1],2.0) > %f)",
600 EtaBins[bin_count], EtaBins[bin_count + 1]);
602 sim_file_name, mdc_file_name, sel, shell_volume, col_arr[bin_count],
604 if (co_gr[bin_count]->GetN() > 1) {
605 mg5r->Add(co_gr[bin_count]);
613 mg5r->GetYaxis()->SetTitle(
"Sensitive Distance [Mpc]");
614 mg5r->GetXaxis()->SetTitle(
"Magnitude Test Statistic (rho[1])");
617 mg5r->GetXaxis()->SetTitleOffset(1.3);
618 mg5r->GetYaxis()->SetTitleOffset(1.25);
619 mg5r->GetXaxis()->SetTickLength(0.01);
620 mg5r->GetYaxis()->SetTickLength(0.01);
621 mg5r->GetXaxis()->CenterTitle(kTRUE);
622 mg5r->GetYaxis()->CenterTitle(kTRUE);
623 mg5r->GetXaxis()->SetTitleFont(42);
624 mg5r->GetXaxis()->SetLabelFont(42);
625 mg5r->GetYaxis()->SetTitleFont(42);
626 mg5r->GetYaxis()->SetLabelFont(42);
629 leg5->SetFillColorAlpha(0, 1.0);
633 co_canvas->SetLogy(1);
635 co_canvas->SaveAs(fname);
639 delete mg, mgr, mg2, mg2r, mg3, mg3r, mg4, mg4r, mg5, mg5r, mg6, mg6r;
640 delete leg, leg2, leg3, leg4, leg5, leg6;
TString sel("slag[1]:slag[2]")
sprintf(tfres,"(1/%g)x(%g) (sec)x(Hz)", 2 *df, df)
void DrawRadiusIFARplots(char *sim_file_name, char *mdc_file_name, float shell_volume, TString opt)