31 "../../sPHENIX_work/production_analysis_cemc2x2/embedding/emcstudies/pidstudies/spacal2d/fieldmap/",
34 TString kine_config =
"eta0"
39 gStyle->SetOptStat(0);
40 gStyle->SetOptFit(1111);
41 TVirtualFitter::SetDefaultFitter(
"Minuit2");
43 gSystem->Load(
"libg4eval.so");
44 gSystem->Load(
"libemcal_ana.so");
45 gSystem->Load(
"libg4vertex.so");
80 "2-D Proj. SPACAL, e^{+} VS h^{+} in Au+Au 10%C");
94 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
95 TString kine_config =
"eta0",
96 TString ll_config =
"Edep_LL_Distribution_eval_sample",
97 TString hist_name =
"hll_edep_diff",
98 const double min_eff = 0.85)
101 TCanvas *c1 =
new TCanvas(
102 "RejectionCurvePos" + kine_config +
"_" + ll_config +
"_" + hist_name,
103 "RejectionCurvePos" + kine_config +
"_" + ll_config +
"_" + hist_name,
109 p = (TPad *) c1->cd(idx++);
113 p->DrawFrame(min_eff, 1, 1, 1e3,
114 ";Electron Efficiency;Positively Charged Hadron Rejection");
116 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
117 hist_name,
"e+",
"pi+");
119 ge->SetLineColor(kRed + 2);
120 ge->SetMarkerColor(kRed + 2);
121 ge->SetFillColor(kRed - 9);
125 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
126 hist_name,
"e+",
"kaon+");
128 ge->SetLineColor(kRed + 2);
129 ge->SetMarkerColor(kRed + 2);
130 ge->SetFillColor(kRed - 9);
132 ge->SetLineStyle(kDashed);
135 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
136 hist_name,
"e+",
"proton");
137 ge->SetLineColor(kRed + 2);
138 ge->SetMarkerColor(kRed + 2);
139 ge->SetFillColor(kRed - 9);
141 ge->SetLineStyle(kDotted);
145 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
146 hist_name,
"e+",
"pi+");
147 ge->SetLineColor(kBlue + 2);
148 ge->SetMarkerColor(kBlue + 2);
149 ge->SetFillColor(kBlue - 9);
153 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
154 hist_name,
"e+",
"kaon+");
156 ge->SetLineColor(kBlue + 2);
157 ge->SetMarkerColor(kBlue + 2);
158 ge->SetFillColor(kBlue - 9);
160 ge->SetLineStyle(kDashed);
163 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
164 hist_name,
"e+",
"proton");
165 ge->SetLineColor(kBlue + 2);
166 ge->SetMarkerColor(kBlue + 2);
167 ge->SetFillColor(kBlue - 9);
169 ge->SetLineStyle(kDotted);
173 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
174 hist_name,
"e+",
"pi+");
176 ge->SetLineColor(kGreen + 3);
177 ge->SetMarkerColor(kGreen + 3);
178 ge->SetFillColor(kGreen - 9);
182 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
183 hist_name,
"e+",
"kaon+");
184 ge->SetLineColor(kGreen + 3);
185 ge->SetMarkerColor(kGreen + 3);
186 ge->SetFillColor(kGreen - 9);
188 ge->SetLineStyle(kDashed);
191 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
192 hist_name,
"e+",
"proton");
193 ge->SetLineColor(kGreen + 3);
194 ge->SetMarkerColor(kGreen + 3);
195 ge->SetFillColor(kGreen - 9);
197 ge->SetLineStyle(kDotted);
202 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()),
209 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
210 TString kine_config =
"eta0",
211 TString ll_config =
"Edep_LL_Distribution_eval_sample",
212 TString hist_name =
"hll_edep_diff",
213 const double min_eff = 0.85)
216 TCanvas *c1 =
new TCanvas(
217 "RejectionCurve" + kine_config +
"_" + ll_config +
"_" + hist_name,
218 "RejectionCurve" + kine_config +
"_" + ll_config +
"_" + hist_name, 900,
224 p = (TPad *) c1->cd(idx++);
228 p->DrawFrame(min_eff, 1, 1, 1e3,
";Electron Efficiency;Hadron Rejection");
230 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
233 ge->SetLineColor(kRed + 2);
234 ge->SetMarkerColor(kRed + 2);
235 ge->SetFillColor(kRed - 9);
239 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
240 hist_name,
"e-",
"kaon-");
242 ge->SetLineColor(kRed + 2);
243 ge->SetMarkerColor(kRed + 2);
244 ge->SetFillColor(kRed - 9);
246 ge->SetLineStyle(kDashed);
249 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
250 hist_name,
"e-",
"anti_proton");
251 ge->SetLineColor(kRed + 2);
252 ge->SetMarkerColor(kRed + 2);
253 ge->SetFillColor(kRed - 9);
255 ge->SetLineStyle(kDotted);
259 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
261 ge->SetLineColor(kBlue + 2);
262 ge->SetMarkerColor(kBlue + 2);
263 ge->SetFillColor(kBlue - 9);
267 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
268 hist_name,
"e-",
"kaon-");
270 ge->SetLineColor(kBlue + 2);
271 ge->SetMarkerColor(kBlue + 2);
272 ge->SetFillColor(kBlue - 9);
274 ge->SetLineStyle(kDashed);
277 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
278 hist_name,
"e-",
"anti_proton");
279 ge->SetLineColor(kBlue + 2);
280 ge->SetMarkerColor(kBlue + 2);
281 ge->SetFillColor(kBlue - 9);
283 ge->SetLineStyle(kDotted);
287 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
290 ge->SetLineColor(kGreen + 3);
291 ge->SetMarkerColor(kGreen + 3);
292 ge->SetFillColor(kGreen - 9);
296 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
297 hist_name,
"e-",
"kaon-");
298 ge->SetLineColor(kGreen + 3);
299 ge->SetMarkerColor(kGreen + 3);
300 ge->SetFillColor(kGreen - 9);
302 ge->SetLineStyle(kDashed);
305 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
306 hist_name,
"e-",
"anti_proton");
307 ge->SetLineColor(kGreen + 3);
308 ge->SetMarkerColor(kGreen + 3);
309 ge->SetFillColor(kGreen - 9);
311 ge->SetLineStyle(kDotted);
316 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()),
323 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
324 TString kine_config =
"eta0",
325 TString ll_config =
"Edep_LL_Distribution_eval_sample",
326 TString hist_name =
"hll_edep_diff",
327 const double min_eff = 0.85)
330 TCanvas *c1 =
new TCanvas(
331 "RejectionCurve_PiProton" + kine_config +
"_" + ll_config +
"_"
333 "RejectionCurve_PiProton" + kine_config +
"_" + ll_config +
"_"
334 + hist_name, 900, 900);
339 p = (TPad *) c1->cd(idx++);
343 p->DrawFrame(min_eff, 10, 1, 1e3,
";Electron Efficiency;Hadron Rejection");
345 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
348 ge->SetLineColor(kRed + 2);
349 ge->SetMarkerColor(kRed + 2);
350 ge->SetFillColor(kRed - 9);
364 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
365 hist_name,
"e-",
"anti_proton");
366 ge->SetLineColor(kRed + 2);
367 ge->SetMarkerColor(kRed + 2);
368 ge->SetFillColor(kRed - 9);
370 ge->SetLineStyle(kDotted);
374 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
376 ge->SetLineColor(kBlue + 2);
377 ge->SetMarkerColor(kBlue + 2);
378 ge->SetFillColor(kBlue - 9);
392 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
393 hist_name,
"e-",
"anti_proton");
394 ge->SetLineColor(kBlue + 2);
395 ge->SetMarkerColor(kBlue + 2);
396 ge->SetFillColor(kBlue - 9);
398 ge->SetLineStyle(kDotted);
402 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
405 ge->SetLineColor(kGreen + 3);
406 ge->SetMarkerColor(kGreen + 3);
407 ge->SetFillColor(kGreen - 9);
420 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
421 hist_name,
"e-",
"anti_proton");
422 ge->SetLineColor(kGreen + 3);
423 ge->SetMarkerColor(kGreen + 3);
424 ge->SetFillColor(kGreen - 9);
426 ge->SetLineStyle(kDotted);
431 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()),
438 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
439 TString kine_config =
"eta0",
440 TString ll_config =
"Edep_LL_Distribution_eval_sample",
441 TString hist_name =
"hll_edep_diff",
442 const double min_eff = 0.85)
445 TCanvas *c1 =
new TCanvas(
446 "RejectionCurve_PiProtonPos" + kine_config +
"_" + ll_config +
"_"
448 "RejectionCurve_PiProtonPos" + kine_config +
"_" + ll_config +
"_"
449 + hist_name, 900, 900);
454 p = (TPad *) c1->cd(idx++);
458 p->DrawFrame(min_eff, 10, 1, 1e3,
459 ";Electron Efficiency;Positively Charged Hadron Rejection");
461 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
462 hist_name,
"e+",
"pi+");
464 ge->SetLineColor(kRed + 2);
465 ge->SetMarkerColor(kRed + 2);
466 ge->SetFillColor(kRed - 9);
480 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_8GeV", ll_config,
481 hist_name,
"e+",
"proton");
482 ge->SetLineColor(kRed + 2);
483 ge->SetMarkerColor(kRed + 2);
484 ge->SetFillColor(kRed - 9);
486 ge->SetLineStyle(kDotted);
490 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
491 hist_name,
"e+",
"pi+");
492 ge->SetLineColor(kBlue + 2);
493 ge->SetMarkerColor(kBlue + 2);
494 ge->SetFillColor(kBlue - 9);
508 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_4GeV", ll_config,
509 hist_name,
"e+",
"proton");
510 ge->SetLineColor(kBlue + 2);
511 ge->SetMarkerColor(kBlue + 2);
512 ge->SetFillColor(kBlue - 9);
514 ge->SetLineStyle(kDotted);
518 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
519 hist_name,
"e+",
"pi+");
521 ge->SetLineColor(kGreen + 3);
522 ge->SetMarkerColor(kGreen + 3);
523 ge->SetFillColor(kGreen - 9);
536 TGraphErrors *ge =
ExtractRejCurve(base_dir, kine_config +
"_2GeV", ll_config,
537 hist_name,
"e+",
"proton");
538 ge->SetLineColor(kGreen + 3);
539 ge->SetMarkerColor(kGreen + 3);
540 ge->SetFillColor(kGreen - 9);
542 ge->SetLineStyle(kDotted);
547 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()),
554 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
555 TString kine_config =
"eta0",
556 const double min_eff = 0.85)
559 TCanvas *c1 =
new TCanvas(
"RejectionCurve_RejMethodComparison_" + kine_config,
560 "RejectionCurve_RejMethodComparison_" + kine_config, 900, 900);
565 p = (TPad *) c1->cd(idx++);
571 p->DrawFrame(min_eff, 10, 1, 1e3,
";Electron Efficiency;Hadron Rejection");
572 TLine * l =
new TLine(0.95, 10, 0.95, 1e3);
573 l->SetLineColor(kGray);
577 TLatex *
text =
new TLatex(0.85, 1e3 * 1.1,
578 "2-D Proj. SPACAL, e^{-}-#pi^{-} separation @ 0 < #eta < 0.1");
579 text->SetTextAlign(11);
580 text->SetTextSize(0.044);
581 text->SetTextFont(42);
584 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.65, 0.4);
585 TLegend * leg2 =
new TLegend(0.65, 0.15, 0.85, 0.4);
587 TGraphErrors *ge =
new TGraphErrors();
589 leg1->AddEntry(ge,
"EMCal+HCal Likelihood",
"lx");
590 TGraphErrors *ge =
new TGraphErrors();
592 ge->SetLineStyle(kDashed);
593 leg1->AddEntry(ge,
"EMCal E/p Likelihood",
"lx");
594 TGraphErrors *ge =
new TGraphErrors();
596 ge->SetLineStyle(kDotted);
597 leg1->AddEntry(ge,
"Cut on min. E/p",
"lx");
600 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff");
601 ge->SetLineColor(kRed + 2);
602 ge->SetMarkerColor(kRed + 2);
603 ge->SetFillColor(kRed - 9);
607 leg2->AddEntry(ge,
"8 GeV/c",
"lx");
609 "EP_LL_Distribution_eval_sample",
"hll_ep_diff");
610 ge->SetLineColor(kRed + 2);
611 ge->SetMarkerColor(kRed + 2);
612 ge->SetFillColor(kRed - 9);
614 ge->SetLineStyle(kDashed);
618 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep");
619 ge->SetLineColor(kRed + 2);
620 ge->SetMarkerColor(kRed + 2);
621 ge->SetFillColor(kRed - 9);
623 ge->SetLineStyle(kDotted);
628 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff");
629 ge->SetLineColor(kBlue + 2);
630 ge->SetMarkerColor(kBlue + 2);
631 ge->SetFillColor(kBlue - 9);
635 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
637 "EP_LL_Distribution_eval_sample",
"hll_ep_diff");
638 ge->SetLineColor(kBlue + 2);
639 ge->SetMarkerColor(kBlue + 2);
640 ge->SetFillColor(kBlue - 9);
642 ge->SetLineStyle(kDashed);
646 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep");
647 ge->SetLineColor(kBlue + 2);
648 ge->SetMarkerColor(kBlue + 2);
649 ge->SetFillColor(kBlue - 9);
651 ge->SetLineStyle(kDotted);
656 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff");
657 ge->SetLineColor(kGreen + 3);
658 ge->SetMarkerColor(kGreen + 3);
659 ge->SetFillColor(kGreen - 9);
663 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
665 "EP_LL_Distribution_eval_sample",
"hll_ep_diff");
666 ge->SetLineColor(kGreen + 3);
667 ge->SetMarkerColor(kGreen + 3);
668 ge->SetFillColor(kGreen - 9);
670 ge->SetLineStyle(kDashed);
674 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep");
675 ge->SetLineColor(kGreen + 3);
676 ge->SetMarkerColor(kGreen + 3);
677 ge->SetFillColor(kGreen - 9);
679 ge->SetLineStyle(kDotted);
687 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
693 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
695 const double min_eff = 0.85)
698 TCanvas *c1 =
new TCanvas(
"RejectionCurve_ppSummary",
699 "RejectionCurve_ppSummary", 900, 900);
704 p = (TPad *) c1->cd(idx++);
710 p->DrawFrame(min_eff, 5, 1, 1e3,
711 ";Electron Efficiency;Negatively Charged Hadron Rejection");
712 TLine * l =
new TLine(0.95, 5, 0.95, 1e3);
713 l->SetLineColor(kGray);
717 TLatex *
text =
new TLatex(0.85, 1e3 * 1.1,
718 "2-D Proj. SPACAL, e^{-}-h^{-} separation in p+p");
719 text->SetTextAlign(11);
720 text->SetTextSize(0.044);
721 text->SetTextFont(42);
724 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.42, 0.4);
725 TLegend * leg2 =
new TLegend(0.42, 0.15, 0.67, 0.4);
727 TGraphErrors *ge =
new TGraphErrors();
729 leg1->AddEntry(ge,
"0.0 < #eta < 0.1",
"lx");
730 TGraphErrors *ge =
new TGraphErrors();
732 ge->SetLineStyle(kDashed);
733 leg1->AddEntry(ge,
"0.9 < #eta < 1.0",
"lx");
739 TString kine_config =
"eta0";
740 const double pt_over_p = 0.998;
743 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
747 kine_config +
"_8GeV",
748 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
750 1 +
GetHPiRatio(8 * pt_over_p,
"kaon-",
"pp"), ge_anti_proton,
752 ge->SetLineColor(kRed + 2);
753 ge->SetMarkerColor(kRed + 2);
754 ge->SetFillColor(kRed - 9);
758 leg2->AddEntry(ge,
"8 GeV/c",
"lx");
761 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
765 kine_config +
"_4GeV",
766 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
768 1 +
GetHPiRatio(4 * pt_over_p,
"kaon-",
"pp"), ge_anti_proton,
770 ge->SetLineColor(kBlue + 2);
771 ge->SetMarkerColor(kBlue + 2);
772 ge->SetFillColor(kBlue - 9);
776 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
779 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
783 kine_config +
"_2GeV",
784 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
786 1 +
GetHPiRatio(2 * pt_over_p,
"kaon-",
"pp"), ge_anti_proton,
788 ge->SetLineColor(kGreen + 3);
789 ge->SetMarkerColor(kGreen + 3);
790 ge->SetFillColor(kGreen - 9);
794 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
796 TString kine_config =
"eta0.90";
797 const double pt_over_p = 0.673;
800 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
804 kine_config +
"_8GeV",
805 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
807 1 +
GetHPiRatio(8 * pt_over_p,
"kaon-",
"pp"), ge_anti_proton,
809 ge->SetLineColor(kRed + 2);
810 ge->SetMarkerColor(kRed + 2);
811 ge->SetFillColor(kRed - 9);
814 ge->SetLineStyle(kDashed);
818 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
822 kine_config +
"_4GeV",
823 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
825 1 +
GetHPiRatio(4 * pt_over_p,
"kaon-",
"pp"), ge_anti_proton,
827 ge->SetLineColor(kBlue + 2);
828 ge->SetMarkerColor(kBlue + 2);
829 ge->SetFillColor(kBlue - 9);
832 ge->SetLineStyle(kDashed);
836 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
840 kine_config +
"_2GeV",
841 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
843 1 +
GetHPiRatio(2 * pt_over_p,
"kaon-",
"pp"), ge_anti_proton,
845 ge->SetLineColor(kGreen + 3);
846 ge->SetMarkerColor(kGreen + 3);
847 ge->SetFillColor(kGreen - 9);
850 ge->SetLineStyle(kDashed);
857 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
863 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
865 const double min_eff = 0.85)
868 TCanvas *c1 =
new TCanvas(
"RejectionCurve_ppSummaryPos",
869 "RejectionCurve_ppSummaryPos", 900, 900);
874 p = (TPad *) c1->cd(idx++);
880 p->DrawFrame(min_eff, 5, 1, 1e3,
881 ";Electron Efficiency;Positively Charged Hadron Rejection");
882 TLine * l =
new TLine(0.95, 5, 0.95, 1e3);
883 l->SetLineColor(kGray);
887 TLatex *
text =
new TLatex(0.85, 1e3 * 1.1,
888 "2-D Proj. SPACAL, e^{+}-h^{+} separation in p+p");
889 text->SetTextAlign(11);
890 text->SetTextSize(0.044);
891 text->SetTextFont(42);
894 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.42, 0.4);
895 TLegend * leg2 =
new TLegend(0.42, 0.15, 0.67, 0.4);
897 TGraphErrors *ge =
new TGraphErrors();
899 leg1->AddEntry(ge,
"0.0 < #eta < 0.1",
"lx");
900 TGraphErrors *ge =
new TGraphErrors();
902 ge->SetLineStyle(kDashed);
903 leg1->AddEntry(ge,
"0.9 < #eta < 1.0",
"lx");
909 TString kine_config =
"eta0";
910 const double pt_over_p = 0.998;
913 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
917 kine_config +
"_8GeV",
918 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
920 1 +
GetHPiRatio(8 * pt_over_p,
"kaon+",
"pp"), ge_anti_proton,
922 ge->SetLineColor(kRed + 2);
923 ge->SetMarkerColor(kRed + 2);
924 ge->SetFillColor(kRed - 9);
928 leg2->AddEntry(ge,
"8 GeV/c",
"lx");
931 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
935 kine_config +
"_4GeV",
936 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
938 1 +
GetHPiRatio(4 * pt_over_p,
"kaon+",
"pp"), ge_anti_proton,
940 ge->SetLineColor(kBlue + 2);
941 ge->SetMarkerColor(kBlue + 2);
942 ge->SetFillColor(kBlue - 9);
946 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
949 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
953 kine_config +
"_2GeV",
954 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
956 1 +
GetHPiRatio(2 * pt_over_p,
"kaon+",
"pp"), ge_anti_proton,
958 ge->SetLineColor(kGreen + 3);
959 ge->SetMarkerColor(kGreen + 3);
960 ge->SetFillColor(kGreen - 9);
964 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
966 TString kine_config =
"eta0.90";
967 const double pt_over_p = 0.673;
970 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
974 kine_config +
"_8GeV",
975 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
977 1 +
GetHPiRatio(8 * pt_over_p,
"kaon+",
"pp"), ge_anti_proton,
979 ge->SetLineColor(kRed + 2);
980 ge->SetMarkerColor(kRed + 2);
981 ge->SetFillColor(kRed - 9);
984 ge->SetLineStyle(kDashed);
988 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
992 kine_config +
"_4GeV",
993 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
995 1 +
GetHPiRatio(4 * pt_over_p,
"kaon+",
"pp"), ge_anti_proton,
997 ge->SetLineColor(kBlue + 2);
998 ge->SetMarkerColor(kBlue + 2);
999 ge->SetFillColor(kBlue - 9);
1000 ge->SetLineWidth(3);
1002 ge->SetLineStyle(kDashed);
1005 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_2GeV",
1006 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
1010 kine_config +
"_2GeV",
1011 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
1013 1 +
GetHPiRatio(2 * pt_over_p,
"kaon+",
"pp"), ge_anti_proton,
1015 ge->SetLineColor(kGreen + 3);
1016 ge->SetMarkerColor(kGreen + 3);
1017 ge->SetFillColor(kGreen - 9);
1018 ge->SetLineWidth(3);
1020 ge->SetLineStyle(kDashed);
1027 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
1033 "../../sPHENIX_work/production_analysis_cemc2x2/embedding/emcstudies/pidstudies/spacal2d/fieldmap/",
1034 TString
label =
"2-D Proj. SPACAL, e^{-} VS h^{-} in Au+Au 10%C",
1035 const double min_eff = 0.6)
1038 TCanvas *c1 =
new TCanvas(
"RejectionCurve_AuAuSummary",
1039 "RejectionCurve_AuAuSummary", 900, 900);
1044 p = (TPad *) c1->cd(idx++);
1050 p->DrawFrame(min_eff, 1, 1, 1e3,
1051 ";Electron Efficiency;Negatively Charged Hadron Rejection");
1052 TLine * l =
new TLine(0.9, 1, 0.9, 1e3);
1053 l->SetLineColor(kGray);
1057 TLatex *
text =
new TLatex(0.6, 1e3 * 1.2,
label);
1058 text->SetTextAlign(11);
1059 text->SetTextSize(0.044);
1060 text->SetTextFont(42);
1063 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.42, 0.4);
1064 TLegend * leg2 =
new TLegend(0.42, 0.15, 0.67, 0.4);
1066 TGraphErrors *ge =
new TGraphErrors();
1067 ge->SetLineWidth(3);
1068 leg1->AddEntry(ge,
"0.0 < #eta < 0.1",
"lx");
1069 TGraphErrors *ge =
new TGraphErrors();
1070 ge->SetLineWidth(3);
1071 ge->SetLineStyle(kDashed);
1072 leg1->AddEntry(ge,
"0.9 < #eta < 1.0",
"lx");
1078 TString kine_config =
"eta0";
1079 const double pt_over_p = 0.998;
1081 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1082 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
1083 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1084 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"kaon-");
1086 kine_config +
"_8GeV",
1087 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1089 GetHPiRatio(8,
"kaon-",
"AuAu10%C"), ge_anti_proton,
1091 ge->SetLineColor(kRed + 2);
1092 ge->SetMarkerColor(kRed + 2);
1093 ge->SetFillColor(kRed - 9);
1094 ge->SetLineWidth(3);
1098 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_8GeV");
1099 leg2->AddEntry(ge,
"8 GeV/c",
"lx");
1101 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_4GeV",
1102 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
1103 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1104 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"kaon-");
1106 kine_config +
"_4GeV",
1107 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1109 GetHPiRatio(4,
"kaon-",
"AuAu10%C"), ge_anti_proton,
1111 ge->SetLineColor(kBlue + 2);
1112 ge->SetMarkerColor(kBlue + 2);
1113 ge->SetFillColor(kBlue - 9);
1114 ge->SetLineWidth(3);
1117 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_4GeV");
1118 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
1120 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_2GeV",
1121 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
1122 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1123 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"kaon-");
1125 kine_config +
"_2GeV",
1126 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1128 GetHPiRatio(2,
"kaon-",
"AuAu10%C"), ge_anti_proton,
1130 ge->SetLineColor(kGreen + 3);
1131 ge->SetMarkerColor(kGreen + 3);
1132 ge->SetFillColor(kGreen - 9);
1133 ge->SetLineWidth(3);
1136 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_2GeV");
1137 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
1139 TString kine_config =
"eta0.90";
1140 const double pt_over_p = 0.673;
1142 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1143 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
1144 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1145 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"kaon-");
1147 kine_config +
"_8GeV",
1148 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1150 GetHPiRatio(8,
"kaon-",
"AuAu10%C"), ge_anti_proton,
1152 ge->SetLineColor(kRed + 2);
1153 ge->SetMarkerColor(kRed + 2);
1154 ge->SetFillColor(kRed - 9);
1155 ge->SetLineWidth(3);
1157 ge->SetLineStyle(kDashed);
1158 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_8GeV");
1161 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_4GeV",
1162 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
1163 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1164 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"kaon-");
1166 kine_config +
"_4GeV",
1167 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1169 GetHPiRatio(4,
"kaon-",
"AuAu10%C"), ge_anti_proton,
1171 ge->SetLineColor(kBlue + 2);
1172 ge->SetMarkerColor(kBlue + 2);
1173 ge->SetFillColor(kBlue - 9);
1174 ge->SetLineWidth(3);
1176 ge->SetLineStyle(kDashed);
1177 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_4GeV");
1180 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_2GeV",
1181 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"pi-");
1182 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1183 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"kaon-");
1185 kine_config +
"_2GeV",
1186 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1188 GetHPiRatio(2,
"kaon-",
"AuAu10%C"), ge_anti_proton,
1190 ge->SetLineColor(kGreen + 3);
1191 ge->SetMarkerColor(kGreen + 3);
1192 ge->SetFillColor(kGreen - 9);
1193 ge->SetLineWidth(3);
1195 ge->SetLineStyle(kDashed);
1196 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_2GeV");
1203 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
1209 "../../sPHENIX_work/production_analysis_cemc2x2/embedding/emcstudies/pidstudies/spacal2d/fieldmap/",
1210 TString
label =
"2-D Proj. SPACAL, e^{-} VS h^{+} in Au+Au 10%C",
1211 const double min_eff = 0.6)
1214 TCanvas *c1 =
new TCanvas(
"RejectionCurve_AuAuSummaryPos",
1215 "RejectionCurve_AuAuSummaryPos: " +
label, 900, 900);
1220 p = (TPad *) c1->cd(idx++);
1226 p->DrawFrame(min_eff, 1, 1, 1e3,
1227 ";Electron Efficiency;Positively Charged Hadron Rejection");
1228 TLine * l =
new TLine(0.9, 1, 0.9, 1e3);
1229 l->SetLineColor(kGray);
1233 TLatex *
text =
new TLatex(0.6, 1e3 * 1.2,
label);
1234 text->SetTextAlign(11);
1235 text->SetTextSize(0.044);
1236 text->SetTextFont(42);
1239 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.42, 0.4);
1240 TLegend * leg2 =
new TLegend(0.42, 0.15, 0.67, 0.4);
1242 TGraphErrors *ge =
new TGraphErrors();
1243 ge->SetLineWidth(3);
1244 leg1->AddEntry(ge,
"0.0 < #eta < 0.1",
"lx");
1245 TGraphErrors *ge =
new TGraphErrors();
1246 ge->SetLineWidth(3);
1247 ge->SetLineStyle(kDashed);
1248 leg1->AddEntry(ge,
"0.9 < #eta < 1.0",
"lx");
1254 TString kine_config =
"eta0";
1255 const double pt_over_p = 0.998;
1257 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1258 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
1259 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1260 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"kaon+");
1262 kine_config +
"_8GeV",
1263 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
1265 GetHPiRatio(8,
"kaon+",
"AuAu10%C"), ge_anti_proton,
1267 ge->SetLineColor(kRed + 2);
1268 ge->SetMarkerColor(kRed + 2);
1269 ge->SetFillColor(kRed - 9);
1270 ge->SetLineWidth(3);
1272 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_8GeV");
1274 leg2->AddEntry(ge,
"8 GeV/c",
"lx");
1276 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_4GeV",
1277 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
1278 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1279 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"kaon+");
1281 kine_config +
"_4GeV",
1282 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
1284 GetHPiRatio(4,
"kaon+",
"AuAu10%C"), ge_anti_proton,
1286 ge->SetLineColor(kBlue + 2);
1287 ge->SetMarkerColor(kBlue + 2);
1288 ge->SetFillColor(kBlue - 9);
1289 ge->SetLineWidth(3);
1291 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_4GeV");
1293 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
1295 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_2GeV",
1296 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
1297 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1298 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"kaon+");
1300 kine_config +
"_2GeV",
1301 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
1303 GetHPiRatio(2,
"kaon+",
"AuAu10%C"), ge_anti_proton,
1305 ge->SetLineColor(kGreen + 3);
1306 ge->SetMarkerColor(kGreen + 3);
1307 ge->SetFillColor(kGreen - 9);
1308 ge->SetLineWidth(3);
1311 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_2GeV");
1312 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
1314 TString kine_config =
"eta0.90";
1315 const double pt_over_p = 0.673;
1317 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1318 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
1319 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1320 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"kaon+");
1322 kine_config +
"_8GeV",
1323 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
1325 GetHPiRatio(8,
"kaon+",
"AuAu10%C"), ge_anti_proton,
1327 ge->SetLineColor(kRed + 2);
1328 ge->SetMarkerColor(kRed + 2);
1329 ge->SetFillColor(kRed - 9);
1330 ge->SetLineWidth(3);
1332 ge->SetLineStyle(kDashed);
1333 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_8GeV");
1336 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_4GeV",
1337 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
1338 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1339 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"kaon+");
1341 kine_config +
"_4GeV",
1342 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
1344 GetHPiRatio(4,
"kaon+",
"AuAu10%C"), ge_anti_proton,
1346 ge->SetLineColor(kBlue + 2);
1347 ge->SetMarkerColor(kBlue + 2);
1348 ge->SetFillColor(kBlue - 9);
1349 ge->SetLineWidth(3);
1351 ge->SetLineStyle(kDashed);
1352 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_4GeV");
1355 TGraphErrors *ge_pi =
ExtractRejCurve(base_dir, kine_config +
"_2GeV",
1356 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"pi+");
1357 TGraphErrors *ge_kaon =
ExtractRejCurve(base_dir, kine_config +
"_8GeV",
1358 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"kaon+");
1360 kine_config +
"_2GeV",
1361 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e+",
"proton");
1363 GetHPiRatio(2,
"kaon+",
"AuAu10%C"), ge_anti_proton,
1365 ge->SetLineColor(kGreen + 3);
1366 ge->SetMarkerColor(kGreen + 3);
1367 ge->SetFillColor(kGreen - 9);
1368 ge->SetLineWidth(3);
1370 ge->SetLineStyle(kDashed);
1371 ge->SetName(
"MergeExtractRejCurve_" + kine_config +
"_2GeV");
1378 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
1384 cout <<
"rejection_ratio - processing " << graph_name << endl;
1386 TGraph * g_2d = (TGraph *) f_2d->GetObjectChecked(graph_name,
"TGraph");
1388 TGraph * g_1d = (TGraph *) f_1d->GetObjectChecked(graph_name,
"TGraph");
1391 assert(g_1d -> GetN() == g_2d -> GetN());
1409 for (
double x = 0.6;
x < 0.99;
x += 0.01)
1413 ys[
i] = g_2d->Eval(
x) / g_1d->Eval(
x);
1415 cout <<
"At " << xs[
i] <<
" -> " << g_2d->Eval(
x) <<
"/"
1416 << g_1d->Eval(
x) <<
" = " << ys[
i] << endl;
1420 TGraph * g_r =
new TGraph(i, xs, ys);
1421 g_r->SetName(TString(g_1d->GetName()) + TString(
"_RejRatio"));
1423 g_r->SetLineStyle(g_2d->GetLineStyle());
1425 g_r->SetLineColor(g_2d->GetLineColor());
1426 g_r->SetLineWidth(g_2d->GetLineWidth());
1436 "../../sPHENIX_work/production_analysis_cemc2x2/embedding/emcstudies/pidstudies/";
1437 TString
label =
"1D VS 2D rejection ratio, e^{-} VS h^{-} in Au+Au 10%C";
1438 const double min_eff = 0.6;
1443 +
"/spacal2d/fieldmap/DrawEcal_Likelihood_Sum_RejectionCurve_AuAuSummary.root");
1444 assert(f_2d -> IsOpen());
1448 +
"/spacal1d/fieldmap/DrawEcal_Likelihood_Sum_RejectionCurve_AuAuSummary.root");
1449 assert(f_1d -> IsOpen());
1451 TCanvas *c1 =
new TCanvas(
"RejectionCurve_AuAuSummary_Compare",
1452 "RejectionCurve_AuAuSummary_Compare", 900, 900);
1457 p = (TPad *) c1->cd(idx++);
1463 p->DrawFrame(min_eff, .5, 1, 1.5,
1464 ";Electron Efficiency;h^{-} Rejection Ratio, (2D proj.)/(1D proj.)");
1465 TLine * l =
new TLine(min_eff, 1, 1, 1);
1466 l->SetLineColor(kGray);
1470 TLatex *
text =
new TLatex(0.6, 1.5 +0.03, label);
1471 text->SetTextAlign(11);
1472 text->SetTextSize(0.044);
1473 text->SetTextFont(42);
1476 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.42, 0.4);
1477 TLegend * leg2 =
new TLegend(0.42, 0.15, 0.67, 0.4);
1479 TGraph *ge =
new TGraphErrors();
1480 ge->SetLineWidth(3);
1481 leg1->AddEntry(ge,
"0.0 < #eta < 0.1",
"lx");
1482 TGraph *ge =
new TGraphErrors();
1483 ge->SetLineWidth(3);
1484 ge->SetLineStyle(kDashed);
1485 leg1->AddEntry(ge,
"0.9 < #eta < 1.0",
"lx");
1491 TString kine_config =
"eta0";
1493 TString
name = (
"MergeExtractRejCurve_" + kine_config +
"_8GeV");
1499 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_4GeV");
1502 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
1504 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_2GeV");
1507 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
1509 TString kine_config =
"eta0.90";
1511 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_8GeV");
1515 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_4GeV");
1519 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_2GeV");
1527 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
1535 "../../sPHENIX_work/production_analysis_cemc2x2/embedding/emcstudies/pidstudies/";
1537 "../../sPHENIX_work/production_analysis/embedding/emcstudies/pidstudies/";
1538 TString
label =
"2x2-Ganging rej. ratio, e^{-} VS h^{-} in Au+Au 10%C";
1539 const double min_eff = 0.6;
1544 +
"/spacal2d/fieldmap/DrawEcal_Likelihood_Sum_RejectionCurve_AuAuSummary.root");
1545 assert(f_2d -> IsOpen());
1549 +
"/spacal2d/fieldmap/DrawEcal_Likelihood_Sum_RejectionCurve_AuAuSummary.root");
1550 assert(f_1d -> IsOpen());
1552 TCanvas *c1 =
new TCanvas(
"RejectionCurve_AuAuSummary_Compare2",
1553 "RejectionCurve_AuAuSummary_Compare2", 900, 900);
1558 p = (TPad *) c1->cd(idx++);
1564 p->DrawFrame(min_eff, .0, 1, 1.1,
1565 ";Electron Efficiency;h^{-} Rejection Ratio, (2x2 Ganging)/(Nominal)");
1566 TLine * l =
new TLine(min_eff, 1, 1, 1);
1567 l->SetLineColor(kGray);
1571 TLatex *
text =
new TLatex(0.6, 1.1 +0.03, label);
1572 text->SetTextAlign(11);
1573 text->SetTextSize(0.044);
1574 text->SetTextFont(42);
1577 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.42, 0.4);
1578 TLegend * leg2 =
new TLegend(0.42, 0.15, 0.67, 0.4);
1580 TGraph *ge =
new TGraphErrors();
1581 ge->SetLineWidth(3);
1582 leg1->AddEntry(ge,
"0.0 < #eta < 0.1",
"lx");
1583 TGraph *ge =
new TGraphErrors();
1584 ge->SetLineWidth(3);
1585 ge->SetLineStyle(kDashed);
1586 leg1->AddEntry(ge,
"0.9 < #eta < 1.0",
"lx");
1588 TString kine_config =
"eta0";
1590 TString
name = (
"MergeExtractRejCurve_" + kine_config +
"_8GeV");
1594 leg2->AddEntry(ge,
"8 GeV/c",
"lx");
1596 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_4GeV");
1599 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
1601 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_2GeV");
1604 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
1606 TString kine_config =
"eta0.90";
1608 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_8GeV");
1612 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_4GeV");
1616 TString name = (
"MergeExtractRejCurve_" + kine_config +
"_2GeV");
1624 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
1630 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
1631 TString kine_config =
"eta0",
1632 const double min_eff = 0.85)
1635 TCanvas *c1 =
new TCanvas(
1636 "RejectionCurve_RejMethodComparison_AntiProton_" + kine_config,
1637 "RejectionCurve_RejMethodComparison_AntiProton_" + kine_config, 900, 900);
1642 p = (TPad *) c1->cd(idx++);
1648 p->DrawFrame(min_eff, 1, 1, 1e3,
";Electron Efficiency;Hadron Rejection");
1649 TLine * l =
new TLine(0.95, 1, 0.95, 1e3);
1650 l->SetLineColor(kGray);
1654 TLatex *
text =
new TLatex(0.85, 1e3 * 1.2,
1655 "2-D Proj. SPACAL, e^{-}-#bar{p} separation @ 0 < #eta < 0.1");
1656 text->SetTextAlign(11);
1657 text->SetTextSize(0.044);
1658 text->SetTextFont(42);
1661 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.65, 0.4);
1662 TLegend * leg2 =
new TLegend(0.65, 0.15, 0.85, 0.4);
1664 TGraphErrors *ge =
new TGraphErrors();
1665 ge->SetLineWidth(3);
1666 leg1->AddEntry(ge,
"EMCal+HCal Likelihood",
"lx");
1667 TGraphErrors *ge =
new TGraphErrors();
1668 ge->SetLineWidth(3);
1669 ge->SetLineStyle(kDashed);
1670 leg1->AddEntry(ge,
"EMCal E/p Likelihood",
"lx");
1671 TGraphErrors *ge =
new TGraphErrors();
1672 ge->SetLineWidth(3);
1673 ge->SetLineStyle(kDotted);
1674 leg1->AddEntry(ge,
"Cut on min. E/p",
"lx");
1677 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1678 ge->SetLineColor(kRed + 2);
1679 ge->SetMarkerColor(kRed + 2);
1680 ge->SetFillColor(kRed - 9);
1681 ge->SetLineWidth(3);
1684 leg2->AddEntry(ge,
"8 GeV/c",
"lx");
1686 "EP_LL_Distribution_eval_sample",
"hll_ep_diff",
"e-",
"anti_proton");
1687 ge->SetLineColor(kRed + 2);
1688 ge->SetMarkerColor(kRed + 2);
1689 ge->SetFillColor(kRed - 9);
1690 ge->SetLineWidth(3);
1691 ge->SetLineStyle(kDashed);
1695 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep",
"e-",
"anti_proton");
1696 ge->SetLineColor(kRed + 2);
1697 ge->SetMarkerColor(kRed + 2);
1698 ge->SetFillColor(kRed - 9);
1699 ge->SetLineWidth(3);
1700 ge->SetLineStyle(kDotted);
1705 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1706 ge->SetLineColor(kBlue + 2);
1707 ge->SetMarkerColor(kBlue + 2);
1708 ge->SetFillColor(kBlue - 9);
1709 ge->SetLineWidth(3);
1712 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
1714 "EP_LL_Distribution_eval_sample",
"hll_ep_diff",
"e-",
"anti_proton");
1715 ge->SetLineColor(kBlue + 2);
1716 ge->SetMarkerColor(kBlue + 2);
1717 ge->SetFillColor(kBlue - 9);
1718 ge->SetLineWidth(3);
1719 ge->SetLineStyle(kDashed);
1723 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep",
"e-",
"anti_proton");
1724 ge->SetLineColor(kBlue + 2);
1725 ge->SetMarkerColor(kBlue + 2);
1726 ge->SetFillColor(kBlue - 9);
1727 ge->SetLineWidth(3);
1728 ge->SetLineStyle(kDotted);
1733 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff",
"e-",
"anti_proton");
1734 ge->SetLineColor(kGreen + 3);
1735 ge->SetMarkerColor(kGreen + 3);
1736 ge->SetFillColor(kGreen - 9);
1737 ge->SetLineWidth(3);
1740 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
1742 "EP_LL_Distribution_eval_sample",
"hll_ep_diff",
"e-",
"anti_proton");
1743 ge->SetLineColor(kGreen + 3);
1744 ge->SetMarkerColor(kGreen + 3);
1745 ge->SetFillColor(kGreen - 9);
1746 ge->SetLineWidth(3);
1747 ge->SetLineStyle(kDashed);
1751 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep",
"e-",
"anti_proton");
1752 ge->SetLineColor(kGreen + 3);
1753 ge->SetMarkerColor(kGreen + 3);
1754 ge->SetFillColor(kGreen - 9);
1755 ge->SetLineWidth(3);
1756 ge->SetLineStyle(kDotted);
1764 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
1770 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
1771 TString kine_config =
"eta0",
1772 const double min_eff = 0.85)
1775 TCanvas *c1 =
new TCanvas(
"RejectionCurve_PIDComparison_" + kine_config,
1776 "RejectionCurve_PIDComparison_" + kine_config, 900, 900);
1781 p = (TPad *) c1->cd(idx++);
1787 p->DrawFrame(min_eff, 10, 1, 1e3,
";Electron Efficiency;Hadron Rejection");
1788 TLine * l =
new TLine(0.95, 10, 0.95, 1e3);
1789 l->SetLineColor(kGray);
1793 TLatex *
text =
new TLatex(0.85, 1e3 * 1.1,
1794 "2-D Proj. SPACAL, e^{-}-#pi^{-} separation @ 0 < #eta < 0.1");
1795 text->SetTextAlign(11);
1796 text->SetTextSize(0.044);
1797 text->SetTextFont(42);
1800 TLegend * leg1 =
new TLegend(0.12, 0.15, 0.65, 0.4);
1801 TLegend * leg2 =
new TLegend(0.65, 0.15, 0.85, 0.4);
1803 TGraphErrors *ge =
new TGraphErrors();
1804 ge->SetLineWidth(3);
1805 leg1->AddEntry(ge,
"EMCal+HCal Likelihood",
"lx");
1806 TGraphErrors *ge =
new TGraphErrors();
1807 ge->SetLineWidth(3);
1808 ge->SetLineStyle(kDashed);
1809 leg1->AddEntry(ge,
"EMCal E/p Likelihood",
"lx");
1810 TGraphErrors *ge =
new TGraphErrors();
1811 ge->SetLineWidth(3);
1812 ge->SetLineStyle(kDotted);
1813 leg1->AddEntry(ge,
"Cut on min. E/p",
"lx");
1816 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff");
1817 ge->SetLineColor(kRed + 2);
1818 ge->SetMarkerColor(kRed + 2);
1819 ge->SetFillColor(kRed - 9);
1820 ge->SetLineWidth(3);
1823 leg2->AddEntry(ge,
"8 GeV/c",
"lx");
1825 "EP_LL_Distribution_eval_sample",
"hll_ep_diff");
1826 ge->SetLineColor(kRed + 2);
1827 ge->SetMarkerColor(kRed + 2);
1828 ge->SetFillColor(kRed - 9);
1829 ge->SetLineWidth(3);
1830 ge->SetLineStyle(kDashed);
1834 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep");
1835 ge->SetLineColor(kRed + 2);
1836 ge->SetMarkerColor(kRed + 2);
1837 ge->SetFillColor(kRed - 9);
1838 ge->SetLineWidth(3);
1839 ge->SetLineStyle(kDotted);
1844 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff");
1845 ge->SetLineColor(kBlue + 2);
1846 ge->SetMarkerColor(kBlue + 2);
1847 ge->SetFillColor(kBlue - 9);
1848 ge->SetLineWidth(3);
1851 leg2->AddEntry(ge,
"4 GeV/c",
"lx");
1853 "EP_LL_Distribution_eval_sample",
"hll_ep_diff");
1854 ge->SetLineColor(kBlue + 2);
1855 ge->SetMarkerColor(kBlue + 2);
1856 ge->SetFillColor(kBlue - 9);
1857 ge->SetLineWidth(3);
1858 ge->SetLineStyle(kDashed);
1862 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep");
1863 ge->SetLineColor(kBlue + 2);
1864 ge->SetMarkerColor(kBlue + 2);
1865 ge->SetFillColor(kBlue - 9);
1866 ge->SetLineWidth(3);
1867 ge->SetLineStyle(kDotted);
1872 "Edep_LL_Distribution_eval_sample",
"hll_edep_diff");
1873 ge->SetLineColor(kGreen + 3);
1874 ge->SetMarkerColor(kGreen + 3);
1875 ge->SetFillColor(kGreen - 9);
1876 ge->SetLineWidth(3);
1879 leg2->AddEntry(ge,
"2 GeV/c",
"lx");
1881 "EP_LL_Distribution_eval_sample",
"hll_ep_diff");
1882 ge->SetLineColor(kGreen + 3);
1883 ge->SetMarkerColor(kGreen + 3);
1884 ge->SetFillColor(kGreen - 9);
1885 ge->SetLineWidth(3);
1886 ge->SetLineStyle(kDashed);
1890 "Ep_Checks_eval_sample",
"hEMCalTrk_get_ep");
1891 ge->SetLineColor(kGreen + 3);
1892 ge->SetMarkerColor(kGreen + 3);
1893 ge->SetFillColor(kGreen - 9);
1894 ge->SetLineWidth(3);
1895 ge->SetLineStyle(kDotted);
1903 base_dir + TString(
"DrawEcal_Likelihood_Sum_") + TString(c1->GetName()));
1909 "../../sPHENIX_work/production_analysis_cemc2x2/emcstudies/pidstudies/spacal2d/fieldmap/",
1910 TString kine_config =
"eta0_4GeV",
1911 TString ll_config =
"EP_LL_Distribution_ll_sample",
1912 TString hist_name =
"hll_ep_diff",
1913 TString
signal =
"e-", TString background =
"pi-")
1915 TH1F * hll_edep_diff_e = NULL;
1916 TH1F * hll_edep_diff_pi = NULL;
1920 base_dir +
"G4Hits_sPHENIX_" +
signal +
"_" + kine_config
1921 +
"-ALL.root_Ana.root.lst_EMCalLikelihood.root_DrawEcal_Likelihood_"
1922 + ll_config +
".root");
1926 hll_edep_diff_e = (TH1F *) f->GetObjectChecked(hist_name,
"TH1F");
1934 base_dir +
"/G4Hits_sPHENIX_" + background +
"_" + kine_config
1935 +
"-ALL.root_Ana.root.lst_EMCalLikelihood.root_DrawEcal_Likelihood_"
1936 + ll_config +
".root");
1940 hll_edep_diff_pi = (TH1F *) f->GetObjectChecked(hist_name,
"TH1F");
1942 assert(hll_edep_diff_pi);
1944 assert(hll_edep_diff_e->GetNbinsX() == hll_edep_diff_pi->GetNbinsX());
1946 double threshold[10000] =
1948 double eff_e[10000] =
1950 double eff_err_e[10000] =
1952 double rej_pi[10000] =
1954 double rej_err_pi[10000] =
1957 const double n_e = hll_edep_diff_e->GetSum();
1961 for (
int i = hll_edep_diff_e->GetNbinsX();
i >= 1;
i--)
1963 pass += hll_edep_diff_e->GetBinContent(
i);
1965 const double pp = pass / n_e;
1967 const double z = 1.;
1970 * sqrt(1. / n_e * pp * (1 - pp) + z * z / 4 / n_e / n_e);
1971 const double B = 1 / (1 + z * z / n_e);
1973 threshold[cnt] = hll_edep_diff_e->GetBinCenter(
i);
1974 eff_e[cnt] = (pp + z * z / 2 / n_e) * B;
1975 eff_err_e[cnt] = A * B;
1980 const double n_pi = hll_edep_diff_pi->GetSum();
1984 for (
int i = hll_edep_diff_pi->GetNbinsX();
i >= 1;
i--)
1986 pass += hll_edep_diff_pi->GetBinContent(
i);
1988 const double pp = pass / n_pi;
1990 const double z = 1.;
1993 * sqrt(1. / n_pi * pp * (1 - pp) + z * z / 4 / n_pi / n_pi);
1994 const double B = 1 / (1 + z * z / n_pi);
1996 assert(threshold[cnt] == hll_edep_diff_pi->GetBinCenter(
i));
1997 rej_pi[cnt] = (pp + z * z / 2 / n_pi) * B;
1998 rej_err_pi[cnt] = A * B;
2001 rej_err_pi[cnt] = 1 / rej_pi[cnt] * (rej_err_pi[cnt] / rej_pi[cnt]);
2002 rej_pi[cnt] = 1 / rej_pi[cnt];
2007 TGraphErrors * ge =
new TGraphErrors(cnt, eff_e, rej_pi, eff_err_e,
2016 const double weight2, TGraphErrors * ge3 = NULL,
const double weight3 = 0)
2020 const double sum_weight = weight1 + weight2 + weight3;
2023 TGraphErrors * ge = (TGraphErrors *) ge1->Clone(
"MergeExtractRejCurve");
2026 for (
int i = 0;
i < ge->GetN(); ++
i)
2030 double pass_err2 = 0;
2037 const double rej = (ge1->GetY())[
i];
2038 const double rej_err = (ge1->GetEY())[
i];
2040 pass += 1 / rej * weight1;
2041 pass_err2 += pow(rej_err / rej * (1 / rej * weight1), 2);
2047 assert(ge2 -> GetN() == ge1 -> GetN());
2049 const double rej = (ge2->GetY())[
i];
2050 const double rej_err = (ge2->GetEY())[
i];
2052 pass += 1 / rej * weight2;
2053 pass_err2 += pow(rej_err / rej * (1 / rej * weight2), 2);
2059 assert(ge3 -> GetN() == ge1 -> GetN());
2061 const double rej = (ge3->GetY())[
i];
2062 const double rej_err = (ge3->GetEY())[
i];
2064 pass += 1 / rej * weight3;
2065 pass_err2 += pow(rej_err / rej * (1 / rej * weight3), 2);
2069 pass_err2 /= sum_weight * sum_weight;
2071 (ge->GetY())[
i] = 1. / pass;
2072 (ge->GetEY())[
i] = sqrt(pass_err2) / pass * 1. / pass;
2090 if (hadron ==
"kaon-" && collision ==
"pp")
2097 else if (hadron ==
"kaon-" && collision ==
"AuAu10%C")
2104 else if (hadron ==
"kaon+" && collision ==
"pp")
2111 else if (hadron ==
"kaon+" && collision ==
"AuAu10%C")
2120 if (hadron ==
"proton" && collision ==
"pp")
2127 else if (hadron ==
"proton" && collision ==
"AuAu10%C")
2134 else if (hadron ==
"anti_proton" && collision ==
"pp")
2141 else if (hadron ==
"anti_proton" && collision ==
"AuAu10%C")
2150 cout <<
"GetHPiRatio - invalid inputs!" << endl;
2155 const double ratio = ratio2 * (pt - pt1) / (pt2 - pt1)
2156 + ratio1 * (pt2 -
pt) / (pt2 - pt1);