13 #include <TGraphAsymmErrors.h>
14 #include <TGraphErrors.h>
20 #include <TVirtualFitter.h>
24 #include "SaveCanvas.C"
25 #include "sPhenixStyle.C"
42 const double suppression,
44 const double pp_quiv_int_lum)
49 h_cross->Clone(TString(h_cross->GetName()) + Form(
"_copy%d", rand()));
52 h_ratio->Scale(deta * h_ratio->GetXaxis()->GetBinWidth(0) * pp_quiv_int_lum * suppression);
55 for (
int i = 1;
i <= h_ratio->GetNbinsX(); ++
i)
57 const double yield = h_ratio->GetBinContent(
i);
61 h_ratio->SetBinContent(
i, suppression);
63 h_ratio->SetBinError(
i, suppression / sqrt(yield));
67 h_ratio->SetBinContent(
i, 0);
69 h_ratio->SetBinError(
i, 0);
73 h_ratio->GetYaxis()->SetTitle(
"Relative Cross Section and Uncertainty");
78 TGraphErrors *
GetRAA(TH1 *h_pp, TH1 *h_AA)
82 double xs[1000] = {0};
83 double ys[1000] = {0};
84 double eys[1000] = {0};
88 assert(h_pp->GetNbinsX() == h_AA->GetNbinsX());
90 for (
int i = 1;
i <= h_pp->GetNbinsX(); ++
i)
92 if (h_pp->GetBinError(
i) > 0 && h_pp->GetBinError(
i) < 1 && h_AA->GetBinError(
i) > 0 && h_AA->GetBinError(
i) < 1)
94 xs[n_bin] = h_pp->GetXaxis()->GetBinCenter(
i);
96 ys[n_bin] = h_AA->GetBinContent(
i) / h_pp->GetBinContent(
i);
98 eys[n_bin] = ys[n_bin] * sqrt(pow(h_AA->GetBinError(
i) / h_AA->GetBinContent(
i), 2) + pow(h_pp->GetBinError(
i) / h_pp->GetBinContent(
i), 2));
104 TGraphErrors *ge =
new TGraphErrors(n_bin, xs, ys, NULL, eys);
105 ge->SetName(TString(
"RAA_") + h_AA->GetName());
112 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
115 TH1F *
hall = (TH1F *) f->GetObjectChecked(
"hall",
"TH1F");
117 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
120 TString s_suffix(use_AA_jet_trigger ?
"_AAJetTriggered" :
"_3yr");
121 s_suffix += TString(Form(
"_deta%.2f",
dy / 2));
123 const double b_jet_RAA = 0.6;
125 const double pp_eff = 0.6;
126 const double pp_purity = 0.4;
127 const double AuAu_eff = 0.4;
128 const double AuAu_purity = 0.4;
134 const double pp_lumi = 62;
137 const double AuAu_MB_Evt = use_AA_jet_trigger ? 218e9 : 142e9;
138 const double pAu_MB_Evt = 600e9;
151 cout <<
"CrossSection2RAA integrated luminosity assumptions in pb^-1: " << endl;
153 <<
"pp_lumi = " << pp_lumi << endl;
155 <<
"AuAu_eq_lumi_C0_10 = " << AuAu_eq_lumi_C0_10 << endl;
157 <<
"AuAu_eq_lumi_C0_20 = " << AuAu_eq_lumi_C0_20 << endl;
159 <<
"AuAu_eq_lumi_C0_100 = " << AuAu_eq_lumi_C0_100 << endl;
161 <<
"pAu_eq_lumi_C0_100 = " << pAu_eq_lumi_C0_100 << endl;
163 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2RAA_Ratio" + s_suffix,
"Draw_HFJetTruth_CrossSection2RAA_Ratio" + s_suffix, 700, 600);
168 p = (TPad *) c1->cd(idx++);
177 g_pp->SetLineColor(kRed);
178 g_AA->SetLineColor(kBlue);
182 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
184 c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2RAA" + s_suffix,
"Draw_HFJetTruth_CrossSection2RAA" + s_suffix, 1100, 800);
188 p = (TPad *) c1->cd(idx++);
191 p->DrawFrame(11, 0, 45, 1.2)
192 ->SetTitle(
";Transverse Momentum [GeV/#it{c}];#it{R}_{AA}");
194 TGraphErrors *ge_RAA =
GetRAA(g_pp, g_AA);
196 ge_RAA->SetLineWidth(4);
197 ge_RAA->SetMarkerStyle(kFullCircle);
198 ge_RAA->SetMarkerSize(3);
203 TLegend *
leg =
new TLegend(.0, .67, .85, .91);
204 leg->SetFillStyle(0);
205 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Projection",
"");
207 leg->AddEntry(
"", Form(
"#it{b}-jet Anti-k_{T} R=0.4, 0-10%% Au+Au, Year 1-3"),
"");
208 leg->AddEntry(
"", Form(
"#it{p}+#it{p}: %.0fpb^{-1} samp., %.0f%% Eff., %.0f%% Pur.", pp_lumi, pp_eff * 100, pp_purity * 100),
"");
209 leg->AddEntry(
"", Form(
"Au+Au: %.0fnb^{-1} rec., %.0f%% Eff., %.0f%% Pur.", AuAu_MB_Evt / 6.8252 / 1e9, AuAu_eff * 100, AuAu_purity * 100),
"");
212 TLegend *leg2 =
new TLegend(.17, .70, .88, .77);
213 leg2->AddEntry(ge_RAA,
"#it{b}-jet #it{R}_{AA}, Au+Au 0-10%C, #sqrt{s_{NN}}=200 GeV",
"pl");
216 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
218 c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2RAA_Theory" + s_suffix,
"Draw_HFJetTruth_CrossSection2RAA_Theory" + s_suffix, 1100, 800);
223 p = (TPad *) c1->cd(idx++);
226 p->DrawFrame(11, 0, 45, 1.2)
227 ->SetTitle(
";p_{T} [GeV];#it{R}_{AA}");
230 gLIDO->SetFillColor(kAzure - 9);
236 g20->SetLineColor(kGreen + 3);
237 g22->SetLineColor(kRed + 3);
238 g20->SetLineWidth(3);
239 g22->SetLineWidth(3);
244 ge_RAA->DrawClone(
"pe");
248 TLegend *leg1 =
new TLegend(.195, .17, .7, .3);
250 leg1->SetHeader(
"pQCD, Phys.Lett. B726 (2013) 251-256");
251 leg1->AddEntry(g20,
"g^{med} = 2.0",
"l");
252 leg1->AddEntry(g22,
"g^{med} = 2.2",
"l");
255 TLegend *leg_lido =
new TLegend(.2, .32, .55, .37);
256 leg_lido->AddEntry(gLIDO,
"LIDO, arXiv:2008.07622 [nucl-th]",
"f");
259 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
269 std::vector<double> zgs;
270 std::vector<double> ymaxs;
271 std::vector<double> ymins;
273 std::vector<double> ys;
274 std::vector<double> eys;
276 if (data_config ==
"me_bbg")
320 ymaxs = {11.564966612100944,
361 ymins = {8.872885875265245,
403 else if (data_config ==
"bbg_zg")
447 ymaxs = {9.762434858721084,
488 ymins = {7.5042886917903475,
530 else if (data_config ==
"bbg_zg_ratio")
574 ymaxs = {1.151982890151877,
615 ymins = {1.096464697907084,
659 cout << __PRETTY_FUNCTION__ <<
"Invalid configuration : " << data_config << endl;
664 for (
int i = 0;
i < zgs.size(); ++
i)
669 ys.push_back(0.5 * (ymaxs[
i] + ymins[
i]));
670 eys.push_back(0.5 * fabs(ymaxs[i] - ymins[i]));
672 integral += (zgs[1] - zgs[0]) * ys[i];
674 cout << __PRETTY_FUNCTION__ <<
" configuration : " << data_config <<
" integral = " << integral << endl;
676 TGraphErrors *ge =
new TGraphErrors(zgs.size(), zgs.data(), ys.data(), NULL, eys.data());
677 ge->SetName(TString(
"zg_") + data_config);
683 const double suppression,
684 const double deta,
const double pt_max,
685 const double pp_quiv_int_lum,
const TString data_config)
690 h_cross->Clone(TString(h_cross->GetName()) + Form(
"_copy%d", rand()));
693 h_yield->Scale(deta * h_yield->GetXaxis()->GetBinWidth(0) * pp_quiv_int_lum * suppression);
696 double sum_yield = 0;
697 for (
int i = 1;
i <= h_yield->GetNbinsX(); ++
i)
699 const double yield = h_yield->GetBinContent(
i);
700 if (h_yield->GetXaxis()->GetBinCenter(
i) <
pt_max) sum_yield += yield;
704 const double bin_width = 0.05;
705 TH1 *h_zg =
new TH1F(
"hzg_" + data_config,
"z_{g}", 0.4 / bin_width, 0.1, 0.5);
707 for (
int i = 1;
i <= h_zg->GetNbinsX(); ++
i)
709 const double x_center = h_zg->GetBinCenter(
i);
711 const double prediction = ge_prediction->Eval(x_center);
713 h_zg->SetBinContent(
i, prediction);
715 const double bin_yield = bin_width * prediction * sum_yield;
717 h_zg->SetBinError(
i, prediction / sqrt(bin_yield));
725 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
728 TH1F *
hall = (TH1F *) f->GetObjectChecked(
"hall",
"TH1F");
730 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
733 TString s_suffix(use_AA_jet_trigger ?
"_AAJetTriggered" :
"_3yr");
734 s_suffix += TString(Form(
"_deta%.2f",
dy / 2));
738 const double b_jet_RAA = 0.6;
740 const double pp_eff = 0.6;
741 const double pp_purity = 0.4;
742 const double AuAu_eff = 0.4;
743 const double AuAu_purity = 0.4;
749 const double pp_lumi = 62;
752 const double AuAu_MB_Evt = use_AA_jet_trigger ? 218e9 : 142e9;
753 const double pAu_MB_Evt = 600e9;
766 cout <<
"CrossSection2zg integrated luminosity assumptions in pb^-1: " << endl;
768 <<
"pp_lumi = " << pp_lumi << endl;
770 <<
"AuAu_eq_lumi_C0_10 = " << AuAu_eq_lumi_C0_10 << endl;
772 <<
"AuAu_eq_lumi_C0_20 = " << AuAu_eq_lumi_C0_20 << endl;
774 <<
"AuAu_eq_lumi_C0_100 = " << AuAu_eq_lumi_C0_100 << endl;
776 <<
"pAu_eq_lumi_C0_100 = " << pAu_eq_lumi_C0_100 << endl;
780 TGraphErrors *bbg_zg_ratio_prediction =
GetZgPrediction(
"bbg_zg_ratio");
782 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2zg_check" + s_suffix,
"Draw_HFJetTruth_CrossSection2zg_check" + s_suffix, 700, 600);
787 p = (TPad *) c1->cd(idx++);
796 g_pp->SetLineColor(kRed);
797 g_AA->SetLineColor(kBlue);
801 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
804 c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2zg" + s_suffix,
"Draw_HFJetTruth_CrossSection2RAA" + s_suffix, 1100, 800);
808 p = (TPad *) c1->cd(idx++);
811 p->DrawFrame(0.1, 0, .5, 13)
812 ->SetTitle(
";Jet z_{g};1/N_{jet} dN/dz_{g}");
817 g_AA->SetLineColor(kBlack);
818 g_AA->SetMarkerColor(kBlack);
819 g_AA->SetLineWidth(4);
820 g_AA->SetMarkerStyle(kFullCircle);
821 g_AA->SetMarkerSize(3);
823 g_AA->Draw(
"pe same");
826 g_pp->SetLineColor(kRed + 2);
827 g_pp->SetMarkerColor(kRed + 2);
828 g_pp->SetLineWidth(4);
829 g_pp->SetMarkerStyle(kFullCircle);
830 g_pp->SetMarkerSize(3);
832 g_pp->Draw(
"pe same");
835 TLegend *
leg =
new TLegend(.0, .77, .85, .91);
836 leg->SetFillStyle(0);
837 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Projection, Year 1-3",
"");
839 leg->AddEntry(
"", Form(
"#it{b}-jet Anti-k_{T} R=0.4, 15<p_{T}<%.0f GeV, z_{cut}>0.1, #beta=0", pt_max),
"");
842 TLegend *leg2 =
new TLegend(.2, .6, .85, .75);
843 leg2->AddEntry(g_pp, Form(
"#it{p}+#it{p}: %.0fpb^{-1} samp., %.0f%% Eff., %.0f%% Pur.", pp_lumi, pp_eff * 100, pp_purity * 100),
"pe");
844 leg2->AddEntry(g_AA, Form(
"Au+Au: %.0fnb^{-1} rec., %.0f%% Eff., %.0f%% Pur.", AuAu_MB_Evt / 6.8252 / 1e9, AuAu_eff * 100, AuAu_purity * 100),
"pe");
845 leg2->SetFillStyle(0);
848 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
850 c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2zg_ratio" + s_suffix,
"Draw_HFJetTruth_CrossSection2zg_ratio" + s_suffix, 1100, 800);
854 p = (TPad *) c1->cd(idx++);
857 p->DrawFrame(0.1, .55, .5, 1.5)
858 ->SetTitle(
";Jet z_{g};P_{AA}(z_{g})/P_{pp}(z_{g})");
860 bbg_zg_ratio_prediction->SetFillColor(kBlue - 5);
861 bbg_zg_ratio_prediction->Draw(
"3");
863 TH1 *g_AA_ratio = (TH1 *) g_AA->Clone(
"g_AA_ratio");
864 g_AA_ratio->Divide(g_pp);
866 for (
int i = 0;
i <= g_AA_ratio->GetNbinsX(); ++
i)
868 g_AA_ratio->SetBinContent(
i, 1.);
871 g_AA_ratio->Draw(
"pe same X0");
874 leg =
new TLegend(.0, .67, .85, .91);
875 leg->SetFillStyle(0);
876 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Projection, Year 1-3",
"");
878 leg->AddEntry(
"", Form(
"#it{b}-jet Anti-k_{T} R=0.4, 15<p_{T}<%.0f GeV, z_{cut}>0.1, #beta=0", pt_max),
"");
879 leg->AddEntry(
"", Form(
"#it{p}+#it{p}: %.0fpb^{-1} samp., %.0f%% Eff., %.0f%% Pur.", pp_lumi, pp_eff * 100, pp_purity * 100),
"");
880 leg->AddEntry(
"", Form(
"Au+Au: %.0fnb^{-1} rec., %.0f%% Eff., %.0f%% Pur.", AuAu_MB_Evt / 6.8252 / 1e9, AuAu_eff * 100, AuAu_purity * 100),
"");
883 leg2 =
new TLegend(.2, .2, .75, .3);
884 leg2->AddEntry(bbg_zg_ratio_prediction, Form(
"Li, Vitev, PLB 793 (2019)"),
"f");
885 leg2->AddEntry(
"", Form(
"b#rightarrowbg, g=2.0#pm0.1 MLL"),
"");
886 leg2->SetFillStyle(0);
889 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
893 const double suppression,
895 const double pp_quiv_int_lum,
896 const double ep_resolution = 1,
897 const double pt_shift = 0)
902 h_cross->Clone(TString(h_cross->GetName()) + Form(
"_copyv2%d", rand()));
905 h_ratio->Scale(deta * h_ratio->GetXaxis()->GetBinWidth(0) * pp_quiv_int_lum * suppression);
912 for (
int i = 1;
i <= h_ratio->GetNbinsX(); ++
i)
914 const double yield = h_ratio->GetBinContent(
i);
918 h_ratio->SetBinContent(
i, 0);
920 h_ratio->SetBinError(
i, 1. / sqrt(2 * yield) / ep_resolution);
922 pts.push_back(h_ratio->GetBinCenter(
i) + pt_shift);
923 v2s.push_back(h_ratio->GetBinContent(
i));
924 v2es.push_back(h_ratio->GetBinError(
i));
928 h_ratio->SetBinContent(
i, 0);
930 h_ratio->SetBinError(
i, 0);
934 h_ratio->GetYaxis()->SetTitle(
"v2 and uncertainty");
936 TGraph *
gr =
new TGraphErrors(pts.size(), &pts[0], &v2s[0], 0, &v2es[0]);
937 gr->SetName(TString(
"ge_") + h_ratio->GetName());
940 gr->SetMarkerStyle(kFullCircle);
941 gr->SetMarkerSize(2);
946 void CrossSection2v2(
const TString
infile,
const bool use_AA_jet_trigger =
true,
const double ep_resolution = 0.5,
const double dy = .7 * 2)
948 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
951 TH1F *
hall = (TH1F *) f->GetObjectChecked(
"hall",
"TH1F");
953 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
956 const double b_jet_RAA = 0.6;
958 const double pp_eff = 0.6;
959 const double pp_purity = 0.4;
960 const double AuAu_eff = 0.4;
961 const double AuAu_purity = 0.4;
967 const double pp_lumi = 62;
970 const double AuAu_MB_Evt = use_AA_jet_trigger ? 550e9 : 142e9;
971 const double pAu_MB_Evt = 600e9;
975 const double AuAu_Ncoll_C10_20 = 603;
976 const double AuAu_Ncoll_C20_40 = 296;
977 const double AuAu_Ncoll_C10_40 = (AuAu_Ncoll_C10_20 * 10 + AuAu_Ncoll_C20_40 * 20) / 30;
978 const double AuAu_Ncoll_C40_60 = 94;
979 const double AuAu_Ncoll_C60_92 = 15;
991 const double AuAu_eq_lumi_C60_92 = AuAu_MB_Evt * (.92 - .6) * AuAu_Ncoll_C60_92 /
pp_inelastic_crosssec;
997 TString s_suffix(use_AA_jet_trigger ?
"_AAJetTriggered" :
"_3yr");
998 s_suffix += Form(
"_EPR%.1f", ep_resolution);
999 s_suffix += Form(
"_deta%.2f",
dy / 2);
1001 cout <<
"CrossSection2v2 integrated luminosity assumptions in pb^-1: " << endl;
1003 <<
"pp_lumi = " << pp_lumi << endl;
1005 <<
"AuAu_eq_lumi_C0_10 = " << AuAu_eq_lumi_C0_10 << endl;
1007 <<
"AuAu_eq_lumi_C0_20 = " << AuAu_eq_lumi_C0_20 << endl;
1009 <<
"AuAu_eq_lumi_C0_100 = " << AuAu_eq_lumi_C0_100 << endl;
1011 <<
"AuAu_eq_lumi_C10_20 = " << AuAu_eq_lumi_C10_20 << endl;
1013 <<
"AuAu_eq_lumi_C20_40 = " << AuAu_eq_lumi_C20_40 << endl;
1015 <<
"AuAu_eq_lumi_C10_40 = " << AuAu_eq_lumi_C10_40 << endl;
1017 <<
"AuAu_eq_lumi_C40_60 = " << AuAu_eq_lumi_C40_60 << endl;
1019 <<
"AuAu_eq_lumi_C60_92 = " << AuAu_eq_lumi_C60_92 << endl;
1021 <<
"pAu_eq_lumi_C0_100 = " << pAu_eq_lumi_C0_100 << endl;
1023 TGraph *g_AA_C0_10 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C0_10 * AuAu_eff * AuAu_purity, ep_resolution, -1 * .7);
1024 TGraph *g_AA_C0_20 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C0_20 * AuAu_eff * AuAu_purity, ep_resolution, 0);
1025 TGraph *g_AA_C10_20 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C10_20 * AuAu_eff * AuAu_purity, ep_resolution, 0);
1026 TGraph *g_AA_C20_40 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C20_40 * AuAu_eff * AuAu_purity, ep_resolution, 1 * .7);
1027 TGraph *g_AA_C10_40 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C10_40 * AuAu_eff * AuAu_purity, ep_resolution, 1 * .7);
1028 TGraph *g_AA_C40_60 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C40_60 * AuAu_eff * AuAu_purity, ep_resolution, 2 * .7);
1029 TGraph *g_AA_C60_92 =
CrossSection2v2Uncert(h_b, b_jet_RAA,
dy, AuAu_eq_lumi_C60_92 * AuAu_eff * AuAu_purity, ep_resolution, 3 * .7);
1031 g_AA_C0_10->SetLineColor(kBlue + 3);
1032 g_AA_C10_20->SetLineColor(kAzure + 3);
1033 g_AA_C20_40->SetLineColor(kTeal + 3);
1034 g_AA_C10_40->SetLineColor(kTeal + 3);
1035 g_AA_C40_60->SetLineColor(kSpring + 3);
1037 g_AA_C0_10->SetMarkerColor(kBlue + 3);
1038 g_AA_C10_20->SetMarkerColor(kAzure + 3);
1039 g_AA_C20_40->SetMarkerColor(kTeal + 3);
1040 g_AA_C10_40->SetMarkerColor(kTeal + 3);
1041 g_AA_C40_60->SetMarkerColor(kSpring + 3);
1043 g_AA_C0_10->SetMarkerStyle(kFullCircle);
1044 g_AA_C10_20->SetMarkerStyle(kFullSquare);
1045 g_AA_C20_40->SetMarkerStyle(kFullDiamond);
1046 g_AA_C10_40->SetMarkerStyle(kFullDiamond);
1047 g_AA_C40_60->SetMarkerStyle(kFullCross);
1049 g_AA_C0_10->SetLineWidth(4);
1050 g_AA_C0_10->SetMarkerSize(3);
1051 g_AA_C10_40->SetLineWidth(4);
1052 g_AA_C10_40->SetMarkerSize(3);
1053 g_AA_C40_60->SetLineWidth(4);
1054 g_AA_C40_60->SetMarkerSize(3);
1056 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2v2" + s_suffix,
"Draw_HFJetTruth_CrossSection2v2" + s_suffix, 1100, 800);
1061 p = (TPad *) c1->cd(idx++);
1064 p->DrawFrame(15, -.1, 40, .3)
1065 ->SetTitle(
";p_{T} [GeV];v_{2}");
1067 g_AA_C0_10->Draw(
"pe");
1070 g_AA_C10_40->Draw(
"pe");
1082 TLegend *
leg =
new TLegend(.0, .67, .85, .91);
1083 leg->SetFillStyle(0);
1084 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Projection, Au+Au, Year 1-3",
"");
1085 leg->AddEntry(
"", Form(
"#it{b}-jet, Anti-k_{T} R=0.4, |#eta|<%.2f,Res(#Psi_{2})=%.1f",
dy / 2, ep_resolution),
"");
1086 leg->AddEntry(
"", Form(
"%.0fnb^{-1} rec. Au+Au, %.0f%% Eff., %.0f%% Pur.", AuAu_MB_Evt / 6.8252 / 1e9, AuAu_eff * 100, AuAu_purity * 100),
"");
1089 TLegend *leg2 =
new TLegend(.19, .5, 1, .67);
1091 leg2->AddEntry(g_AA_C0_10,
"0-10% Au+Au",
"pl");
1094 leg2->AddEntry(g_AA_C10_40,
"10-40% Au+Au ",
"pl");
1096 leg2->SetFillStyle(0);
1099 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
1106 for (
int i = 1;
i <= h->GetXaxis()->GetNbins(); ++
i)
1108 const double pT1 = h->GetXaxis()->GetBinLowEdge(
i);
1109 const double pT2 = h->GetXaxis()->GetBinUpEdge(
i);
1112 const double dpT = pT2 - pT1;
1115 const double count2sigma = 1. / dpT / dy / int_lumi;
1117 h->SetBinContent(
i, h->GetBinContent(
i) * count2sigma);
1118 h->SetBinError(
i, h->GetBinError(
i) * count2sigma);
1123 h->SetMarkerStyle(kFullCircle);
1164 const double deta = 0.6 * 2;
1166 const double pts[] =
1169 10.0000, 11.0526, 12.1053, 13.1579, 14.2105, 15.2632, 16.3158, 17.3684,
1170 18.4211, 19.4737, 20.5263, 21.5789, 22.6316, 23.6842, 24.7368, 25.7895,
1171 26.8421, 27.8947, 28.9474, 30.0000
1175 const double centrals[] =
1176 {4.1645e+03, 2.4830e+03, 1.5046e+03, 9.2707e+02, 5.8027e+02, 3.6865e+02,
1177 2.3744e+02, 1.5484e+02, 1.0215e+02, 6.8101e+01, 4.5818e+01, 3.1111e+01,
1178 2.1287e+01, 1.4663e+01, 1.0175e+01, 7.1026e+00, 4.9796e+00, 3.5103e+00,
1179 2.4892e+00, 1.7693e+00};
1180 const double min[] =
1181 {4.1645e+03 - 2.9134e+03, 2.4830e+03 - 1.7438e+03, 1.5046e+03 - 1.0602e+03,
1182 9.2707e+02 - 6.5506e+02, 5.8027e+02 - 4.1098e+02, 3.6865e+02 - 2.6159e+02, 2.3744e+02 - 1.6874e+02, 1.5484e+02 - 1.1016e+02,
1183 1.0215e+02 - 7.2725e+01, 6.8101e+01 - 4.8502e+01, 4.5818e+01 - 3.2631e+01, 3.1111e+01 - 2.2148e+01, 2.1287e+01 - 1.5142e+01,
1184 1.4663e+01 - 1.0419e+01, 1.0175e+01 - 7.2188e+00, 7.1026e+00 - 5.0296e+00, 4.9796e+00 - 3.5183e+00, 3.5103e+00 - 2.4738e+00,
1185 2.4892e+00 - 1.7492e+00, 1.7693e+00 - 1.2394e+00};
1187 const double max[] =
1188 {6.0916e+03 - 4.1645e+03, 3.6234e+03 - 2.4830e+03, 2.1900e+03 - 1.5046e+03,
1189 1.3454e+03 - 9.2707e+02, 8.3990e+02 - 5.8027e+02, 5.3224e+02 - 3.6865e+02, 3.4198e+02 - 2.3744e+02, 2.2257e+02 - 1.5484e+02,
1190 1.4657e+02 - 1.0215e+02, 9.7587e+01 - 6.8101e+01, 6.5588e+01 - 4.5818e+01, 4.4506e+01 - 3.1111e+01, 3.0444e+01 - 2.1287e+01,
1191 2.0974e+01 - 1.4663e+01, 1.4562e+01 - 1.0175e+01, 1.0176e+01 - 7.1026e+00, 7.1439e+00 - 4.9796e+00, 5.0451e+00 - 3.5103e+00,
1192 3.5856e+00 - 2.4892e+00, 2.5556e+00 - 1.7693e+00};
1194 TGraphAsymmErrors *
gr =
new TGraphAsymmErrors(20, pts, centrals, 0, 0, min,
1197 for (
int i = 0;
i < gr->GetN(); ++
i)
1199 (gr->GetY())[
i] /= deta;
1200 (gr->GetEYhigh())[
i] /= deta;
1201 (gr->GetEYlow())[
i] /= deta;
1245 const double deta = 0.6 * 2;
1247 const double pts[] =
1250 10.0000, 11.0526, 12.1053, 13.1579, 14.2105, 15.2632, 16.3158, 17.3684,
1251 18.4211, 19.4737, 20.5263, 21.5789, 22.6316, 23.6842, 24.7368, 25.7895,
1252 26.8421, 27.8947, 28.9474, 30.0000
1256 const double centrals[] =
1260 9.7368e+03, 4.9069e+03, 2.5743e+03, 1.3990e+03, 7.8344e+02, 4.5087e+02,
1261 2.6550e+02, 1.5978e+02, 9.7903e+01, 6.0993e+01, 3.8605e+01, 2.4727e+01,
1262 1.6036e+01, 1.0532e+01, 6.9729e+00, 4.6560e+00, 3.1409e+00, 2.1346e+00,
1263 1.4557e+00, 9.9826e-01
1266 const double min[] =
1270 9.7368e+03 - 6.5051e+03, 4.9069e+03 - 3.2787e+03, 2.5743e+03 - 1.7187e+03, 1.3990e+03 - 9.3274e+02, 7.8344e+02 - 5.2138e+02,
1271 4.5087e+02 - 2.9938e+02, 2.6550e+02 - 1.7584e+02, 1.5978e+02 - 1.0551e+02, 9.7903e+01 - 6.4459e+01, 6.0993e+01 - 4.0030e+01,
1272 3.8605e+01 - 2.5248e+01, 2.4727e+01 - 1.6108e+01, 1.6036e+01 - 1.0402e+01, 1.0532e+01 - 6.8006e+00, 6.9729e+00 - 4.4803e+00,
1273 4.6560e+00 - 2.9760e+00, 3.1409e+00 - 1.9970e+00, 2.1346e+00 - 1.3500e+00, 1.4557e+00 - 9.1535e-01, 9.9826e-01 - 6.2400e-01
1277 const double max[] =
1281 1.5528e+04 - 9.7368e+03, 7.7308e+03 - 4.9069e+03, 4.0147e+03 - 2.5743e+03, 2.1641e+03 - 1.3990e+03, 1.2037e+03 - 7.8344e+02,
1282 6.8902e+02 - 4.5087e+02, 4.0398e+02 - 2.6550e+02, 2.4232e+02 - 1.5978e+02, 1.4811e+02 - 9.7903e+01, 9.2103e+01 - 6.0993e+01,
1283 5.8239e+01 - 3.8605e+01, 3.7286e+01 - 2.4727e+01, 2.4185e+01 - 1.6036e+01, 1.5898e+01 - 1.0532e+01, 1.0540e+01 - 6.9729e+00,
1284 7.0510e+00 - 4.6560e+00, 4.7681e+00 - 3.1409e+00, 3.2500e+00 - 2.1346e+00, 2.2239e+00 - 1.4557e+00, 1.5310e+00 - 9.9826e-01
1288 TGraphAsymmErrors *gr =
new TGraphAsymmErrors(20, pts, centrals, 0, 0, min,
1291 for (
int i = 0;
i < gr->GetN(); ++
i)
1293 (gr->GetY())[
i] /= deta;
1294 (gr->GetEYhigh())[
i] /= deta;
1295 (gr->GetEYlow())[
i] /= deta;
1340 const double RAA[] =
1356 return new TGraph(13, pT, RAA);
1391 const double RAA[] =
1407 return new TGraph(13, pT, RAA);
1436 const vector<double>
pT{
1446 const vector<double> Raa_2piT{
1456 const vector<double> Raa_1p5piT{
1466 vector<double> Raa(
pT.size());
1467 vector<double> Raa_Error(
pT.size());
1469 for (
int i = 0;
i <
pT.size(); ++
i)
1471 Raa[
i] = 0.5 * (Raa_2piT[
i] + Raa_1p5piT[
i]);
1472 Raa_Error[
i] = 0.5 * fabs(Raa_2piT[
i] - Raa_1p5piT[
i]);
1475 return new TGraphErrors(
pT.size(),
pT.data(), Raa.data(),
nullptr, Raa_Error.data());
1495 const double pt_l[] =
1500 12.2, 14.5, 17.3, 20.7, 24.7, 29.4, 35.1, 41.9
1504 const double pt_h[] =
1509 14.5, 17.3, 20.7, 24.7, 29.4, 35.1, 41.9, 50.0
1517 0.0001145, 3.774e-05, 1.263e-05, 4.230e-06, 1.224e-06, 2.962e-07,
1518 5.837e-08, 8.882e-09
1521 const double ystat[] =
1526 1.0, 1.3, 1.7, 2.3, 3.6, 6.1, 8.9, 11
1530 const double ysyst[] =
1535 15.6, 16.3, 15.6, 17.3, 19.3, 21.0, 24.3, 32.3
1546 for (
int i = 0;
i < 8; ++
i)
1548 pT_c[
i] = 0.5 * (pt_l[
i] + pt_h[
i]);
1549 pT_e[
i] = 0.5 * (pt_h[
i] - pt_l[
i]);
1551 y_e[
i] = yval[
i] * sqrt(ystat[
i] * ystat[
i] + ysyst[
i] * ysyst[
i]) / 100;
1554 TGraphErrors *gr =
new TGraphErrors(8, pT_c, yval, pT_e, y_e);
1561 TH1 *
hall =
new TH1F(
"hall",
";p_{T} [GeV/c]", 100, 0, 100);
1562 TH1 *
h_b =
new TH1F(
"h_b",
";p_{T} [GeV/c]", 100, 0, 100);
1563 TH1 *h_bq =
new TH1F(
"h_bq",
";p_{T} [GeV/c]", 100, 0, 100);
1564 TH1 *h_bh =
new TH1F(
"h_bh",
";p_{T} [GeV/c]", 100, 0, 100);
1565 TH1 *h_bh5 =
new TH1F(
"h_bh5",
";p_{T} [GeV/c]", 100, 0, 100);
1566 TH1 *h_ch5 =
new TH1F(
"h_ch5",
";p_{T} [GeV/c]", 100, 0, 100);
1567 TH1 *h_c =
new TH1F(
"h_c",
";p_{T} [GeV/c]", 100, 0, 100);
1569 T->Draw(
"AntiKt_Truth_r04.get_pt()>>hall",
1570 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6",
1573 T->Draw(
"AntiKt_Truth_r04.get_pt()>>h_b",
1574 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1000))==5",
1577 "AntiKt_Truth_r04.get_pt()* AntiKt_Truth_r04.get_property(1001) >>h_bq",
1578 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1000))==5",
1585 T->Draw(
"AntiKt_Truth_r04.get_pt()>>h_bh5",
1586 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1010))==5 && AntiKt_Truth_r04.get_property(1011) * AntiKt_Truth_r04.get_pt() > 5",
1589 T->Draw(
"AntiKt_Truth_r04.get_pt()>>h_c",
1590 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1000))==4",
1592 T->Draw(
"AntiKt_Truth_r04.get_pt()>>h_ch5",
1593 "AntiKt_Truth_r04.get_pt()>15 && abs(AntiKt_Truth_r04.get_eta())<0.6 && abs(AntiKt_Truth_r04.get_property(1010))==4 && AntiKt_Truth_r04.get_property(1011) * AntiKt_Truth_r04.get_pt() > 5",
1603 h_b->SetLineColor(kBlue);
1604 h_b->SetMarkerColor(kBlue);
1606 h_bq->SetLineColor(kBlue + 3);
1607 h_bq->SetMarkerColor(kBlue + 3);
1609 h_bh5->SetLineColor(kBlue + 3);
1610 h_bh5->SetMarkerColor(kBlue + 3);
1611 h_bh5->SetMarkerStyle(kStar);
1613 h_c->SetLineColor(kRed);
1614 h_c->SetMarkerColor(kRed);
1616 h_ch5->SetLineColor(kRed + 3);
1617 h_ch5->SetMarkerColor(kRed + 3);
1618 h_ch5->SetMarkerStyle(kStar);
1620 TGraphAsymmErrors *gr_fonll_b =
GetFONLL_B();
1621 gr_fonll_b->SetFillColor(kBlue - 7);
1622 gr_fonll_b->SetFillStyle(3002);
1623 TGraphAsymmErrors *gr_fonll_c =
GetFONLL_C();
1624 gr_fonll_c->SetFillColor(kRed - 7);
1625 gr_fonll_c->SetFillStyle(3003);
1627 gr_phenix->SetLineColor(kGray + 2);
1628 gr_phenix->SetMarkerColor(kBlack);
1629 gr_phenix->SetMarkerStyle(kOpenCross);
1631 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_DrawCrossSection",
"Draw_HFJetTruth_DrawCrossSection", 1000, 860);
1636 p = (TPad *) c1->cd(idx++);
1644 gr_fonll_b->Draw(
"3");
1645 gr_fonll_c->Draw(
"3");
1646 gr_phenix->Draw(
"pe");
1649 h_bh5->Draw(
"same");
1652 h_ch5->Draw(
"same");
1654 hall->GetXaxis()->SetRangeUser(12, 60);
1655 hall->GetYaxis()->SetTitle(
1656 "d^{2}#sigma/(dp_{T}dy), d^{2}#sigma/(dp_{T}d#eta) [pb/(GeV/c)]");
1658 TLegend *
leg =
new TLegend(0.45, 0.6, 0.99, 0.95);
1659 leg->SetFillColor(kWhite);
1660 leg->SetFillStyle(1001);
1661 leg->SetHeader(
"#it{p}+#it{p} collisions @ sPHENIX, #sqrt{s} = 200 GeV, |#eta|<0.6");
1662 leg->AddEntry(hall,
"Inclusive jet, Pythia8, Truth, anti-k_{t}, R=0.4",
1664 leg->AddEntry(h_c,
"c-quark jet, Pythia8, Truth, anti-k_{t}, R=0.4",
"lpe");
1665 leg->AddEntry(h_b,
"b-quark jet, Pythia8, Truth, anti-k_{t}, R=0.4",
"lpe");
1666 leg->AddEntry(h_bq,
"Leading b-quark in jet, Pythia8, anti-k_{t}, R=0.4",
"lpe");
1667 leg->AddEntry(h_bh5,
1668 "b-hadron jet, Pythia8, Truth, anti-k_{t}, R=0.4, p_{T, b-hadron}>5 GeV/c",
1670 leg->AddEntry(gr_phenix,
"PHENIX inclusive jet, PRL 116, 122301 (2016)",
"ple");
1671 leg->AddEntry(gr_fonll_c,
"c-quark, FONLL v1.3.2, CTEQ6.6, |y|<0.6",
"f");
1672 leg->AddEntry(gr_fonll_b,
"b-quark, FONLL v1.3.2, CTEQ6.6, |y|<0.6",
"f");
1675 SaveCanvas(c1, TString(
_file0->GetName()) + TString(c1->GetName()), kTRUE);
1680 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
1683 TH1F *
hall = (TH1F *) f->GetObjectChecked(
"hall",
"TH1F");
1685 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
1688 hall->SetMarkerColor(kBlack);
1689 hall->SetLineColor(kBlack);
1690 hall->SetMarkerStyle(kFullCircle);
1692 h_b->SetMarkerColor(kBlue + 2);
1693 h_b->SetLineColor(kBlue + 2);
1694 h_b->SetMarkerStyle(kFullCircle);
1696 TGraphAsymmErrors *gr_fonll_b =
GetFONLL_B();
1697 gr_fonll_b->SetFillColor(kBlue - 7);
1698 gr_fonll_b->SetFillStyle(1001);
1699 TGraphAsymmErrors *gr_fonll_c =
GetFONLL_C();
1700 gr_fonll_c->SetFillColor(kRed - 7);
1701 gr_fonll_c->SetFillStyle(3003);
1703 gr_phenix->SetLineColor(kGray + 2);
1704 gr_phenix->SetLineWidth(3);
1705 gr_phenix->SetMarkerColor(kGray + 2);
1706 gr_phenix->SetMarkerSize(2);
1707 gr_phenix->SetMarkerStyle(kFullSquare);
1709 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_DrawCrossSection_PR",
"Draw_HFJetTruth_DrawCrossSection_PR", 1000, 860);
1714 p = (TPad *) c1->cd(idx++);
1718 TH1 *hframe = p->DrawFrame(12, 0.1, 70, 1e8);
1719 hframe->SetTitle(
";p_{T} [GeV/c];d^{2}#sigma/(dp_{T}d#eta) [pb/(GeV/c)]");
1721 gr_fonll_b->Draw(
"3");
1722 gr_phenix->Draw(
"pe");
1727 TLegend *
leg =
new TLegend(0.2, 0.7, 0.95, 0.92);
1728 leg->SetFillColor(kWhite);
1729 leg->SetFillStyle(1001);
1731 leg->SetHeader(
"#it{#bf{sPHENIX }} Simulation, #it{p}+#it{p} #sqrt{s} = 200 GeV, |#eta|<0.6");
1732 leg->AddEntry(hall,
"Inclusive jet, PYTHIA8 + CTEQ6L, anti-k_{T} R=0.4",
1734 leg->AddEntry(h_b,
"#it{b}-quark jet, PYTHIA8 + CTEQ6L, anti-k_{T} R=0.4",
"lpe");
1735 leg->AddEntry(gr_phenix,
"PHENIX inclusive jet, PRL 116, 122301 (2016)",
"ple");
1736 leg->AddEntry(gr_fonll_b,
"#it{b}-quark, FONLL v1.3.2, CTEQ6.6",
"f");
1739 SaveCanvas(c1, TString(
_file0->GetName()) + TString(c1->GetName()), kTRUE);
1744 const double b_jet_RAA = 0.6;
1762 const double pp_lumi_proposal = 175;
1764 const double dy_proposal = 2.;
1765 const double eff_proposal = 0.5;
1767 cout <<
"CrossSection2RAA_Proposal integrated luminosity assumptions in pb^-1: " << endl;
1769 <<
"pp_lumi_proposal = " << pp_lumi_proposal << endl;
1771 <<
"AuAu_eq_lumi_C0_20_proposal = " << AuAu_eq_lumi_C0_20_proposal << endl;
1773 TFile *
f = TFile::Open(infile +
"Draw_HFJetTruth_DrawCrossSection.root");
1776 TH1F *
h_b = (TH1F *) f->GetObjectChecked(
"h_b",
"TH1F");
1780 TCanvas *c1 =
new TCanvas(
"Draw_HFJetTruth_CrossSection2RAA_Proposal",
"Draw_HFJetTruth_CrossSection2RAA_Proposal", 1000, 860);
1785 p = (TPad *) c1->cd(idx++);
1791 h_b->GetYaxis()->SetTitle(
1792 "d^{2}#sigma/(dp_{T}d#eta) [pb/(GeV/c)]");
1795 p = (TPad *) c1->cd(idx++);
1801 TH1 *h_b_int = (TH1 *) h_b->Clone(TString(h_b->GetName()) +
"_IntrgratedCount");
1803 for (
int i = h_b_int->GetNbinsX();
i >= 1; --
i)
1805 const double cs = h_b_int->GetBinContent(
i);
1807 integral += cs * h_b_int->GetXaxis()->GetBinWidth(
i) * dy_proposal * 0.2 * AuAu_Ncoll_C0_20 /
pp_inelastic_crosssec;
1809 h_b_int->SetBinContent(
i, integral);
1810 h_b_int->SetBinError(
i, 0);
1813 h_b_int->GetYaxis()->SetTitle(
1814 "(Count > p_{T} cut)/Event 0-20% AuAu");
1817 p = (TPad *) c1->cd(idx++);
1824 TH1 *g_AA =
CrossSection2RelUncert(h_b, b_jet_RAA, dy_proposal, AuAu_eq_lumi_C0_20_proposal * eff_proposal);
1829 p = (TPad *) c1->cd(idx++);
1835 p->DrawFrame(0, 0, 100, 1.2)
1836 ->SetTitle(
";Transverse Momentum [GeV/#it{c}];#it{R}_{AA}");
1838 t.DrawLatex(10, 1, Form(
"#splitline{pp lumi %.0f pb^{-1}}{#splitline{AuAu 0-20 in 100B MB}{eff %.1f }}", pp_lumi_proposal, eff_proposal));
1840 TGraphErrors *ge_RAA =
GetRAA(g_pp, g_AA);
1841 ge_RAA->Draw(
"pe*");
1843 SaveCanvas(c1, infile +
"_" + TString(c1->GetName()), kTRUE);
1849 "/sphenix/user/jinhuang/HF-jet/event_gen/200pp_pythia8_CTEQ6L_7GeV/200pp_pythia8_CTEQ6L_7GeV_ALL.cfg_eneg_DSTReader.root",
1850 double int_lumi = 891093 / 3.332
e-02 / 1e9,
const double dy = 0.6 * 2)
1862 gStyle->SetOptStat(0);
1863 gStyle->SetOptFit(1111);
1864 TVirtualFitter::SetDefaultFitter(
"Minuit2");
1866 gSystem->Load(
"libg4eval.so");
1870 TString chian_str =
infile;
1871 chian_str.ReplaceAll(
"ALL",
"*");
1873 TChain *
t =
new TChain(
"T");
1874 const int n = t->Add(chian_str);
1878 cout <<
"int_lumi = " << int_lumi <<
" pb^-1 from " << n <<
" root files with " << chian_str << endl;
1891 const double acceptance1 = 2. * (1.1 - .4);