7 #include <TGraphAsymmErrors.h>
8 #include <TGraphErrors.h>
16 #include <TVirtualFitter.h>
22 #include "SaveCanvas.C"
23 #include "sPhenixStyle.C"
59 const Int_t NConfig = 4;
61 const Int_t
N[NConfig] = {3, 5, 4, 1};
62 const Char_t *ExpName[NConfig] = {
"STAR",
"ALICE",
"ALICE",
"ALICE"};
63 const Char_t *CollName[NConfig] = {
"AuAu_10_80_200GeV",
"pp_7TeV",
"pPb_5p02TeV",
"PbPb_5p02TeV"};
64 double x[NConfig][NMax],
y[NConfig][NMax], ye[NConfig][NMax], yes_u[NConfig][NMax], yes_d[NConfig][NMax];
65 TGraphErrors *
gr[NConfig];
69 for (
int i = 0;
i < NConfig;
i++)
71 inData.open(Form(
"dat/%s_LcD0_%s.txt", ExpName[
i], CollName[i]));
72 for (
int j = 0;
j < N[
i];
j++)
74 inData >> x[
i][
j] >> y[
i][
j] >> ye[
i][
j] >> yes_u[
i][
j] >> yes_d[
i][
j];
77 gr[
i] =
new TGraphErrors(N[i], x[i], y[i], 0, ye[i]);
78 cout << Form(
"dat/%s_LcD0_%s.txt", ExpName[i], CollName[i]) << endl;
84 double x_St[1] = {3.96};
85 double y_St[1] = {1.0772};
86 double ye_St[1] = {0.1643};
87 double yes_St[1] = {0.2647};
88 double yesx_St[1] = {0.1};
89 TGraphErrors *gr_St =
new TGraphErrors(1, x_St, y_St, 0, ye_St);
90 gr_St->SetMarkerStyle(29);
91 gr_St->SetMarkerSize(2.5);
92 gr_St->SetMarkerColor(kRed - 6);
93 gr_St->SetLineWidth(4);
94 gr_St->SetLineColor(kRed - 6);
95 TGraphAsymmErrors* grs_St =
new TGraphAsymmErrors(1, x_St, y_St, yesx_St, yesx_St, yes_St, yes_St);
96 grs_St->SetFillColor(kRed - 10);
97 grs_St->SetMarkerStyle(29);
98 grs_St->SetMarkerSize(2.5);
99 grs_St->SetMarkerColor(kRed - 6);
100 grs_St->SetLineWidth(4);
101 grs_St->SetLineColor(kRed - 6);
105 TFile *fin =
new TFile(
"root/pythia_D_ratio.root");
106 TGraphErrors *gr_pythia_tmp = (TGraphErrors *) fin->Get(
"Ratio_Lc_D0");
107 TGraph *gr_pythia =
new TGraph(*gr_pythia_tmp);
108 gr_pythia->SetLineWidth(2);
109 gr_pythia->SetLineColor(16);
111 fin =
new TFile(
"root/PYTHIA8_D_ratio_200GeV_20181029_0.root");
112 TDirectoryFile *fLc = (TDirectoryFile *) fin->Get(
"Lc");
113 TH1D *h_pythia8 = (TH1D *) fLc->Get(
"LctoD0_pt_whole_rebin");
114 TGraph *gr_pythia8 =
new TGraph(h_pythia8);
115 gr_pythia8->SetLineWidth(2);
116 gr_pythia8->SetLineColor(1);
117 gr_pythia8->SetLineStyle(2);
119 fin =
new TFile(
"root/PYTHIA8_D_ratio_200GeV_20181029_CR.root");
120 fLc = (TDirectoryFile *) fin->Get(
"Lc");
121 TH1D *h_pythia8_CR = (TH1D *) fLc->Get(
"LctoD0_pt_whole_rebin");
122 TGraph *gr_pythia8_CR =
new TGraph(h_pythia8_CR);
123 gr_pythia8_CR->SetLineWidth(2);
124 gr_pythia8_CR->SetLineColor(1);
125 gr_pythia8_CR->SetLineStyle(1);
127 TGraph *gr_pythia_7TeV =
new TGraph(
"dat/PYTHIA_Lc_D0_pp_7TeV.txt",
"%lg %lg");
128 TGraph *gr_pythia_7TeV_CR =
new TGraph(
"dat/PYTHIACR_Lc_D0_pp_7TeV.txt",
"%lg %lg");
129 TGraph *gr_Greco_LHC_1 =
new TGraph(
"dat/Greco_LcD0_1_PbPb5p02TeV.txt",
"%lg %lg");
130 TGraph *gr_Greco_LHC_2 =
new TGraph(
"dat/Greco_LcD0_2_PbPb5p02TeV.txt",
"%lg %lg");
131 TGraph *gr_ShaoSong_LHC_1 =
new TGraph(
"dat/ShaoSong_LcD0_1_PbPb5p02TeV.txt",
"%lg %lg");
132 TGraph *gr_ShaoSong_LHC_2 =
new TGraph(
"dat/ShaoSong_LcD0_2_PbPb5p02TeV.txt",
"%lg %lg");
149 TGraph *gr_Greco_1 =
new TGraph(
"dat/Greco_LcD0_1_AuAu200GeV_0_20.dat",
"%lg %lg");
150 gr_Greco_1->SetLineWidth(2);
151 gr_Greco_1->SetLineStyle(2);
152 gr_Greco_1->SetLineColor(4);
153 TGraph *gr_Greco_2 =
new TGraph(
"dat/Greco_LcD0_2_AuAu200GeV_0_20.dat",
"%lg %lg");
154 gr_Greco_2->SetLineWidth(2);
155 gr_Greco_2->SetLineStyle(1);
156 gr_Greco_2->SetLineColor(4);
157 TGraph *gr_Tsinghua_1 =
new TGraph(
"dat/Tsinghua_LcD0_1_AuAu200GeV_10_80.txt",
"%lg %lg");
158 gr_Tsinghua_1->SetLineWidth(2);
159 gr_Tsinghua_1->SetLineStyle(2);
160 gr_Tsinghua_1->SetLineColor(kGreen - 6);
161 TGraph *gr_Tsinghua_2 =
new TGraph(
"dat/Tsinghua_LcD0_2_AuAu200GeV_10_80.txt",
"%lg %lg");
162 gr_Tsinghua_2->SetLineWidth(2);
163 gr_Tsinghua_2->SetLineStyle(1);
164 gr_Tsinghua_2->SetLineColor(kGreen - 6);
166 const Int_t N_Ko = 12;
167 Double_t pt_Ko[N_Ko], y1_Ko[N_Ko], y2_Ko[N_Ko], y3_Ko[N_Ko];
168 inData.open(
"dat/LcD0_Ko_0901.1382.txt");
169 for (
int i = 0;
i < N_Ko;
i++)
171 inData >> pt_Ko[
i] >> y1_Ko[
i] >> y2_Ko[
i] >> y3_Ko[
i];
174 TGraph *gr_Ko_1 =
new TGraph(N_Ko, pt_Ko, y1_Ko);
175 gr_Ko_1->SetLineWidth(2);
176 gr_Ko_1->SetLineColor(2);
177 gr_Ko_1->SetLineStyle(3);
178 TGraph *gr_Ko_2 =
new TGraph(N_Ko, pt_Ko, y2_Ko);
179 gr_Ko_2->SetLineWidth(2);
180 gr_Ko_2->SetLineColor(2);
181 gr_Ko_2->SetLineStyle(2);
182 TGraph *gr_Ko_3 =
new TGraph(N_Ko, pt_Ko, y3_Ko);
183 gr_Ko_3->SetLineWidth(2);
184 gr_Ko_3->SetLineColor(2);
185 gr_Ko_3->SetLineStyle(1);
191 TGraphErrors *gr_sPH_noPID_AuAu_0_10(
nullptr);
192 TGraphErrors *gr_sPH_noPID_pp(
nullptr);
201 const Int_t N_sPH = 20;
202 double pT_sPH[N_sPH], sig_sPH_noPID[N_sPH], sig_sPH_ideal[N_sPH];
203 double r_sPH[N_sPH], r_err_sPH_noPID[N_sPH], r_err_sPH_ideal[N_sPH];
204 double pT_sPH_noPID[N_sPH], pT_sPH_ideal[N_sPH];
205 const Double_t
offset = 0.06;
208 fin =
new TFile(
"significance/signi_0.root");
209 TH1D *
h1 = (TH1D *) fin->Get(
"NoPID_signi");
210 TH1D *
h2 = (TH1D *) fin->Get(
"Cleanideal_signi");
213 vector<int> rebin{3, 1,1, 1, 1, 1, 1, 1, 1, 1, 1};
216 int index_output = 0;
217 for (
int rebin_count : rebin)
219 vector<double> sum_x;
220 vector<double> sum_sig2;
221 for (
int i = 0;
i < rebin_count; ++
i)
223 sum_x.push_back(h1->GetBinCenter(index_input));
224 sum_sig2.push_back(pow(h1->GetBinContent(index_input), 2));
227 if (index_input > h1->GetNbinsX())
break;
231 pT_sPH[
i] = accumulate(sum_x.begin(), sum_x.end(), 0.) / sum_x.size();
232 sig_sPH_noPID[
i] = significance_scaling * sqrt(accumulate(sum_sig2.begin(), sum_sig2.end(), 0.)) / sum_sig2.size();
235 cout <<
"gr_sPH_noPID_AuAu_0_10, bin" << i <<
" pT = "
236 << pT_sPH[
i] <<
" Sig = " << sig_sPH_noPID[
i]
237 <<
"\t| sum_x.begin() = " << *sum_x.begin() <<
" sum_x.size() = " << sum_x.size()<<
"\t| scaling = "<<significance_scaling << endl;
239 pT_sPH_noPID[
i] = pT_sPH[
i];
241 r_sPH[
i] = gr[0]->Eval(pT_sPH[i]);
242 r_err_sPH_noPID[
i] = r_sPH[
i] / sig_sPH_noPID[
i];
246 if (index_input > h1->GetNbinsX())
break;
249 int n_sPH = index_output;
251 gr_sPH_noPID_AuAu_0_10 =
new TGraphErrors(n_sPH, pT_sPH_noPID, r_sPH,
nullptr, r_err_sPH_noPID);
253 gr_sPH_noPID_AuAu_0_10->SetMarkerStyle(kFullCircle);
255 gr_sPH_noPID_AuAu_0_10->SetMarkerSize(2);
256 gr_sPH_noPID_AuAu_0_10->SetMarkerColor(kBlue+1);
257 gr_sPH_noPID_AuAu_0_10->SetLineColor(kBlue+1);
258 gr_sPH_noPID_AuAu_0_10->SetLineWidth(4);
268 const Int_t N_sPH = 20;
269 double pT_sPH[N_sPH], sig_sPH_noPID[N_sPH], sig_sPH_ideal[N_sPH];
270 double r_sPH[N_sPH], r_err_sPH_noPID[N_sPH], r_err_sPH_ideal[N_sPH];
271 double pT_sPH_noPID[N_sPH], pT_sPH_ideal[N_sPH];
272 const Double_t
offset = 0.06;
275 fin =
new TFile(
"significance/signi_4.root");
276 TH1D *
h1 = (TH1D *) fin->Get(
"NoPID_signi");
277 TH1D *
h2 = (TH1D *) fin->Get(
"Cleanideal_signi");
280 vector<int> rebin{3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
283 int index_output = 0;
284 for (
int rebin_count : rebin)
286 vector<double> sum_x;
287 vector<double> sum_sig2;
288 for (
int i = 0;
i < rebin_count; ++
i)
290 sum_x.push_back(h1->GetBinCenter(index_input));
291 sum_sig2.push_back(pow(h1->GetBinContent(index_input), 2));
294 if (index_input > h1->GetNbinsX())
break;
298 pT_sPH[
i] = accumulate(sum_x.begin(), sum_x.end(), 0.) / sum_x.size();
299 sig_sPH_noPID[
i] = significance_scaling * sqrt(accumulate(sum_sig2.begin(), sum_sig2.end(), 0)) / sum_sig2.size();
302 cout <<
"gr_sPH_noPID_AuAu_0_10, bin" << i <<
" pT = "
303 << pT_sPH[
i] <<
" Sig = " << sig_sPH_noPID[
i]
304 <<
"\t| sum_x.begin() = " << *sum_x.begin() <<
" sum_x.size() = " << sum_x.size()<<
"\t| scaling = "<<significance_scaling << endl;
306 pT_sPH_noPID[
i] = pT_sPH[
i];
308 r_sPH[
i] = gr_pythia8_CR->Eval(pT_sPH[i]);
309 r_err_sPH_noPID[
i] = r_sPH[
i] / sig_sPH_noPID[
i];
313 if (index_input > h1->GetNbinsX())
break;
316 int n_sPH = index_output;
318 gr_sPH_noPID_pp =
new TGraphErrors(n_sPH, pT_sPH_noPID, r_sPH,
nullptr, r_err_sPH_noPID);
320 gr_sPH_noPID_pp->SetMarkerStyle(kFullSquare);
322 gr_sPH_noPID_pp->SetMarkerSize(2);
323 gr_sPH_noPID_pp->SetMarkerColor(kBlack);
324 gr_sPH_noPID_pp->SetLineColor(kBlack);
325 gr_sPH_noPID_pp->SetLineWidth(4);
330 TCanvas *c1 =
new TCanvas(
"Lc_BUP2022_AuAu_3yr",
"Lc_BUP2022_AuAu_3yr", 1100, 800);
335 p = (TPad *) c1->cd(idx++);
338 p->DrawFrame(0, 0, 11, 6)->SetTitle(
";#it{p}_{T} [GeV];(#Lambda_{c}^{+}+#bar{#Lambda}_{c}^{-})/(D^{0}+#bar{D}^{0})");
406 gr_pythia8->Draw(
"c");
407 gr_pythia8_CR->Draw(
"c");
409 gr_Greco_1->Draw(
"c");
410 gr_Greco_2->Draw(
"c");
414 gr_Tsinghua_1->Draw(
"c");
415 gr_Tsinghua_2->Draw(
"c");
417 TLine *la =
new TLine(0.2, 0.24, 1.5, 0.24);
419 la->SetLineColor(18);
422 TLatex *
tex =
new TLatex(0.5, 0.26,
"SHM");
423 tex->SetTextFont(12);
424 tex->SetTextSize(0.06);
476 gr_sPH_noPID_AuAu_0_10->Draw(
"p");
477 gr_sPH_noPID_pp->Draw(
"p");
489 TLegend *
leg =
new TLegend(0.1998067,0.688525,0.8001561,0.8282708);
490 leg->AddEntry(gr_sPH_noPID_pp, Form(
"%.1f pb^{-1} str. #it{p}+#it{p}",
pp_rec_3year/1e12),
"pl");
491 leg->AddEntry(gr_sPH_noPID_AuAu_0_10, Form(
"%.0f nb^{-1} rec. Au+Au, 0-10%%",
AuAu_rec_3year/1e9),
"pl");
492 leg->AddEntry(grs_St,
"STAR, Au+Au, 0-20%, PRL#bf{124}",
"plf");
496 leg =
new TLegend(0.04741459,0.8467278,0.7472027,0.8968254);
497 leg->SetFillStyle(0);
498 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} BUP 2022, Years 1-3",
"");
502 leg =
new TLegend(0.6905134,0.44,0.9302814,0.64);
504 leg->AddEntry(gr_Tsinghua_2,
"Tsinghua",
"l");
505 leg->AddEntry(gr_Greco_2,
"Catania",
"l");
506 leg->AddEntry(gr_Ko_3,
"TAMU",
"l");
507 leg->AddEntry(gr_pythia8_CR,
"PYTHIA8",
"l");
510 leg =
new TLegend(0.35, 0.5, 0.94, 0.65);
511 leg->AddEntry(gr_Tsinghua_2,
"Tsinghua: simul. coal, 10-80%",
"l");
512 leg->AddEntry(gr_Tsinghua_1,
"Tsinghua: seq. coal, 10-80%",
"l");
513 leg->AddEntry(gr_Greco_2,
"Catania: coal only, 0-20%",
"l");
514 leg->AddEntry(gr_Greco_1,
"Catania: coal+frag, 0-20%",
"l");
518 leg =
new TLegend(0.5, 0.35, 0.94, 0.5);
526 leg->AddEntry(gr_Ko_3,
"TAMU: di-quark 0-5%",
"l");
527 leg->AddEntry(gr_Ko_2,
"TAMU: 3-quark 0-5%",
"l");
528 leg->AddEntry(gr_pythia8_CR,
"PYTHIA8 (CR)",
"l");
529 leg->AddEntry(gr_pythia8,
"PYTHIA8 (Monash)",
"l");
537 SaveCanvas(c1,
"fig/" + TString(c1->GetName()), kTRUE);