File indexing completed on 2025-08-05 08:12:56
0001 #include <fstream>
0002 #include <iostream>
0003 #include "stdio.h"
0004
0005 #include <TChain.h>
0006 #include <TFile.h>
0007 #include <TGraphAsymmErrors.h>
0008 #include <TGraphErrors.h>
0009 #include <TLatex.h>
0010 #include <TLegend.h>
0011 #include <TLine.h>
0012 #include <TROOT.h>
0013 #include <TString.h>
0014 #include <TTree.h>
0015 #include <TVectorD.h>
0016 #include <TVirtualFitter.h>
0017 #include <algorithm>
0018 #include <cassert>
0019 #include <cmath>
0020 #include <vector>
0021
0022 #include "SaveCanvas.C"
0023 #include "sPhenixStyle.C"
0024
0025 const double refAuAuMB = 240e9;
0026 const double refAuAuXSec = 6.8252;
0027 const double Psi2_resolution = 0.5;
0028
0029 const double AuAu_Ncoll_C0_10 = 960.2;
0030 const double AuAu_Ncoll_C0_20 = 770.6;
0031 const double AuAu_Ncoll_60_70 = 29.8;
0032 const double AuAu_Ncoll_70_80 = 12.6;
0033 const double AuAu_Ncoll_C0_100 = 238.5;
0034 const double pAu_Ncoll_C0_100 = 4.7;
0035
0036 const double AuAu_rec_3year = (5.7 + 15) * 1e9;
0037 const double AuAu_rec_5year = AuAu_rec_3year + 30e9;
0038
0039 const double pp_inelastic_crosssec = 42e-3;
0040 const double pp_rec_3year = 6.2e12;
0041 const double pp_rec_5year = pp_rec_3year + 80e12;
0042 const double pp_beam_pol = 0.57;
0043
0044 const double OO_rec_5year = 37e9;
0045 const double OO_Ncoll_C0_100 = 9.6;
0046 const double OO_inelastic_crosssec = 1.12214;
0047
0048 const double ArAr_rec_5year = 12e9;
0049 const double ArAr_Ncoll_C0_100 = 28.5;
0050 const double ArAr_inelastic_crosssec = 2.3423;
0051
0052 void makeLcD0_BUP2022()
0053 {
0054
0055 SetsPhenixStyle();
0056
0057 gROOT->Reset();
0058
0059 const Int_t NConfig = 4;
0060 const Int_t NMax = 5;
0061 const Int_t N[NConfig] = {3, 5, 4, 1};
0062 const Char_t *ExpName[NConfig] = {"STAR", "ALICE", "ALICE", "ALICE"};
0063 const Char_t *CollName[NConfig] = {"AuAu_10_80_200GeV", "pp_7TeV", "pPb_5p02TeV", "PbPb_5p02TeV"};
0064 double x[NConfig][NMax], y[NConfig][NMax], ye[NConfig][NMax], yes_u[NConfig][NMax], yes_d[NConfig][NMax];
0065 TGraphErrors *gr[NConfig];
0066
0067
0068 ifstream inData;
0069 for (int i = 0; i < NConfig; i++)
0070 {
0071 inData.open(Form("dat/%s_LcD0_%s.txt", ExpName[i], CollName[i]));
0072 for (int j = 0; j < N[i]; j++)
0073 {
0074 inData >> x[i][j] >> y[i][j] >> ye[i][j] >> yes_u[i][j] >> yes_d[i][j];
0075 }
0076 inData.close();
0077 gr[i] = new TGraphErrors(N[i], x[i], y[i], 0, ye[i]);
0078 cout << Form("dat/%s_LcD0_%s.txt", ExpName[i], CollName[i]) << endl;
0079 gr[i]->Print();
0080 }
0081
0082
0083
0084 double x_St[1] = {3.96};
0085 double y_St[1] = {1.0772};
0086 double ye_St[1] = {0.1643};
0087 double yes_St[1] = {0.2647};
0088 double yesx_St[1] = {0.1};
0089 TGraphErrors *gr_St = new TGraphErrors(1, x_St, y_St, 0, ye_St);
0090 gr_St->SetMarkerStyle(29);
0091 gr_St->SetMarkerSize(2.5);
0092 gr_St->SetMarkerColor(kRed - 6);
0093 gr_St->SetLineWidth(4);
0094 gr_St->SetLineColor(kRed - 6);
0095 TGraphAsymmErrors* grs_St = new TGraphAsymmErrors(1, x_St, y_St, yesx_St, yesx_St, yes_St, yes_St);
0096 grs_St->SetFillColor(kRed - 10);
0097 grs_St->SetMarkerStyle(29);
0098 grs_St->SetMarkerSize(2.5);
0099 grs_St->SetMarkerColor(kRed - 6);
0100 grs_St->SetLineWidth(4);
0101 grs_St->SetLineColor(kRed - 6);
0102
0103
0104
0105 TFile *fin = new TFile("root/pythia_D_ratio.root");
0106 TGraphErrors *gr_pythia_tmp = (TGraphErrors *) fin->Get("Ratio_Lc_D0");
0107 TGraph *gr_pythia = new TGraph(*gr_pythia_tmp);
0108 gr_pythia->SetLineWidth(2);
0109 gr_pythia->SetLineColor(16);
0110
0111 fin = new TFile("root/PYTHIA8_D_ratio_200GeV_20181029_0.root");
0112 TDirectoryFile *fLc = (TDirectoryFile *) fin->Get("Lc");
0113 TH1D *h_pythia8 = (TH1D *) fLc->Get("LctoD0_pt_whole_rebin");
0114 TGraph *gr_pythia8 = new TGraph(h_pythia8);
0115 gr_pythia8->SetLineWidth(2);
0116 gr_pythia8->SetLineColor(1);
0117 gr_pythia8->SetLineStyle(2);
0118
0119 fin = new TFile("root/PYTHIA8_D_ratio_200GeV_20181029_CR.root");
0120 fLc = (TDirectoryFile *) fin->Get("Lc");
0121 TH1D *h_pythia8_CR = (TH1D *) fLc->Get("LctoD0_pt_whole_rebin");
0122 TGraph *gr_pythia8_CR = new TGraph(h_pythia8_CR);
0123 gr_pythia8_CR->SetLineWidth(2);
0124 gr_pythia8_CR->SetLineColor(1);
0125 gr_pythia8_CR->SetLineStyle(1);
0126
0127 TGraph *gr_pythia_7TeV = new TGraph("dat/PYTHIA_Lc_D0_pp_7TeV.txt", "%lg %lg");
0128 TGraph *gr_pythia_7TeV_CR = new TGraph("dat/PYTHIACR_Lc_D0_pp_7TeV.txt", "%lg %lg");
0129 TGraph *gr_Greco_LHC_1 = new TGraph("dat/Greco_LcD0_1_PbPb5p02TeV.txt", "%lg %lg");
0130 TGraph *gr_Greco_LHC_2 = new TGraph("dat/Greco_LcD0_2_PbPb5p02TeV.txt", "%lg %lg");
0131 TGraph *gr_ShaoSong_LHC_1 = new TGraph("dat/ShaoSong_LcD0_1_PbPb5p02TeV.txt", "%lg %lg");
0132 TGraph *gr_ShaoSong_LHC_2 = new TGraph("dat/ShaoSong_LcD0_2_PbPb5p02TeV.txt", "%lg %lg");
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147
0148
0149 TGraph *gr_Greco_1 = new TGraph("dat/Greco_LcD0_1_AuAu200GeV_0_20.dat", "%lg %lg");
0150 gr_Greco_1->SetLineWidth(2);
0151 gr_Greco_1->SetLineStyle(2);
0152 gr_Greco_1->SetLineColor(4);
0153 TGraph *gr_Greco_2 = new TGraph("dat/Greco_LcD0_2_AuAu200GeV_0_20.dat", "%lg %lg");
0154 gr_Greco_2->SetLineWidth(2);
0155 gr_Greco_2->SetLineStyle(1);
0156 gr_Greco_2->SetLineColor(4);
0157 TGraph *gr_Tsinghua_1 = new TGraph("dat/Tsinghua_LcD0_1_AuAu200GeV_10_80.txt", "%lg %lg");
0158 gr_Tsinghua_1->SetLineWidth(2);
0159 gr_Tsinghua_1->SetLineStyle(2);
0160 gr_Tsinghua_1->SetLineColor(kGreen - 6);
0161 TGraph *gr_Tsinghua_2 = new TGraph("dat/Tsinghua_LcD0_2_AuAu200GeV_10_80.txt", "%lg %lg");
0162 gr_Tsinghua_2->SetLineWidth(2);
0163 gr_Tsinghua_2->SetLineStyle(1);
0164 gr_Tsinghua_2->SetLineColor(kGreen - 6);
0165
0166 const Int_t N_Ko = 12;
0167 Double_t pt_Ko[N_Ko], y1_Ko[N_Ko], y2_Ko[N_Ko], y3_Ko[N_Ko];
0168 inData.open("dat/LcD0_Ko_0901.1382.txt");
0169 for (int i = 0; i < N_Ko; i++)
0170 {
0171 inData >> pt_Ko[i] >> y1_Ko[i] >> y2_Ko[i] >> y3_Ko[i];
0172 }
0173 inData.close();
0174 TGraph *gr_Ko_1 = new TGraph(N_Ko, pt_Ko, y1_Ko);
0175 gr_Ko_1->SetLineWidth(2);
0176 gr_Ko_1->SetLineColor(2);
0177 gr_Ko_1->SetLineStyle(3);
0178 TGraph *gr_Ko_2 = new TGraph(N_Ko, pt_Ko, y2_Ko);
0179 gr_Ko_2->SetLineWidth(2);
0180 gr_Ko_2->SetLineColor(2);
0181 gr_Ko_2->SetLineStyle(2);
0182 TGraph *gr_Ko_3 = new TGraph(N_Ko, pt_Ko, y3_Ko);
0183 gr_Ko_3->SetLineWidth(2);
0184 gr_Ko_3->SetLineColor(2);
0185 gr_Ko_3->SetLineStyle(1);
0186
0187
0188
0189
0190
0191 TGraphErrors *gr_sPH_noPID_AuAu_0_10(nullptr);
0192 TGraphErrors *gr_sPH_noPID_pp(nullptr);
0193
0194
0195
0196
0197
0198 {
0199 const double significance_scaling = sqrt((AuAu_rec_3year * refAuAuXSec) / (refAuAuMB));
0200
0201 const Int_t N_sPH = 20;
0202 double pT_sPH[N_sPH], sig_sPH_noPID[N_sPH], sig_sPH_ideal[N_sPH];
0203 double r_sPH[N_sPH], r_err_sPH_noPID[N_sPH], r_err_sPH_ideal[N_sPH];
0204 double pT_sPH_noPID[N_sPH], pT_sPH_ideal[N_sPH];
0205 const Double_t offset = 0.06;
0206
0207
0208 fin = new TFile("significance/signi_0.root");
0209 TH1D *h1 = (TH1D *) fin->Get("NoPID_signi");
0210 TH1D *h2 = (TH1D *) fin->Get("Cleanideal_signi");
0211
0212
0213 vector<int> rebin{3, 1,1, 1, 1, 1, 1, 1, 1, 1, 1};
0214
0215 int index_input = 1;
0216 int index_output = 0;
0217 for (int rebin_count : rebin)
0218 {
0219 vector<double> sum_x;
0220 vector<double> sum_sig2;
0221 for (int i = 0; i < rebin_count; ++i)
0222 {
0223 sum_x.push_back(h1->GetBinCenter(index_input));
0224 sum_sig2.push_back(pow(h1->GetBinContent(index_input), 2));
0225
0226 ++index_input;
0227 if (index_input > h1->GetNbinsX()) break;
0228 }
0229
0230 int i(index_output);
0231 pT_sPH[i] = accumulate(sum_x.begin(), sum_x.end(), 0.) / sum_x.size();
0232 sig_sPH_noPID[i] = significance_scaling * sqrt(accumulate(sum_sig2.begin(), sum_sig2.end(), 0.)) / sum_sig2.size();
0233
0234
0235 cout << "gr_sPH_noPID_AuAu_0_10, bin" << i << " pT = "
0236 << pT_sPH[i] << " Sig = " << sig_sPH_noPID[i]
0237 << "\t| sum_x.begin() = " << *sum_x.begin() << " sum_x.size() = " << sum_x.size()<<"\t| scaling = "<<significance_scaling << endl;
0238
0239 pT_sPH_noPID[i] = pT_sPH[i];
0240
0241 r_sPH[i] = gr[0]->Eval(pT_sPH[i]);
0242 r_err_sPH_noPID[i] = r_sPH[i] / sig_sPH_noPID[i];
0243
0244
0245 ++index_output;
0246 if (index_input > h1->GetNbinsX()) break;
0247 }
0248
0249 int n_sPH = index_output;
0250
0251 gr_sPH_noPID_AuAu_0_10 = new TGraphErrors(n_sPH, pT_sPH_noPID, r_sPH, nullptr, r_err_sPH_noPID);
0252
0253 gr_sPH_noPID_AuAu_0_10->SetMarkerStyle(kFullCircle);
0254
0255 gr_sPH_noPID_AuAu_0_10->SetMarkerSize(2);
0256 gr_sPH_noPID_AuAu_0_10->SetMarkerColor(kBlue+1);
0257 gr_sPH_noPID_AuAu_0_10->SetLineColor(kBlue+1);
0258 gr_sPH_noPID_AuAu_0_10->SetLineWidth(4);
0259 }
0260
0261
0262
0263
0264
0265 {
0266 const double significance_scaling = sqrt((pp_rec_3year * pp_inelastic_crosssec) / (refAuAuMB * .1 * (AuAu_Ncoll_60_70 + AuAu_Ncoll_70_80)));
0267
0268 const Int_t N_sPH = 20;
0269 double pT_sPH[N_sPH], sig_sPH_noPID[N_sPH], sig_sPH_ideal[N_sPH];
0270 double r_sPH[N_sPH], r_err_sPH_noPID[N_sPH], r_err_sPH_ideal[N_sPH];
0271 double pT_sPH_noPID[N_sPH], pT_sPH_ideal[N_sPH];
0272 const Double_t offset = 0.06;
0273
0274
0275 fin = new TFile("significance/signi_4.root");
0276 TH1D *h1 = (TH1D *) fin->Get("NoPID_signi");
0277 TH1D *h2 = (TH1D *) fin->Get("Cleanideal_signi");
0278
0279
0280 vector<int> rebin{3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
0281
0282 int index_input = 1;
0283 int index_output = 0;
0284 for (int rebin_count : rebin)
0285 {
0286 vector<double> sum_x;
0287 vector<double> sum_sig2;
0288 for (int i = 0; i < rebin_count; ++i)
0289 {
0290 sum_x.push_back(h1->GetBinCenter(index_input));
0291 sum_sig2.push_back(pow(h1->GetBinContent(index_input), 2));
0292
0293 ++index_input;
0294 if (index_input > h1->GetNbinsX()) break;
0295 }
0296
0297 int i(index_output);
0298 pT_sPH[i] = accumulate(sum_x.begin(), sum_x.end(), 0.) / sum_x.size();
0299 sig_sPH_noPID[i] = significance_scaling * sqrt(accumulate(sum_sig2.begin(), sum_sig2.end(), 0)) / sum_sig2.size();
0300
0301
0302 cout << "gr_sPH_noPID_AuAu_0_10, bin" << i << " pT = "
0303 << pT_sPH[i] << " Sig = " << sig_sPH_noPID[i]
0304 << "\t| sum_x.begin() = " << *sum_x.begin() << " sum_x.size() = " << sum_x.size()<<"\t| scaling = "<<significance_scaling << endl;
0305
0306 pT_sPH_noPID[i] = pT_sPH[i];
0307
0308 r_sPH[i] = gr_pythia8_CR->Eval(pT_sPH[i]);
0309 r_err_sPH_noPID[i] = r_sPH[i] / sig_sPH_noPID[i];
0310
0311
0312 ++index_output;
0313 if (index_input > h1->GetNbinsX()) break;
0314 }
0315
0316 int n_sPH = index_output;
0317
0318 gr_sPH_noPID_pp = new TGraphErrors(n_sPH, pT_sPH_noPID, r_sPH, nullptr, r_err_sPH_noPID);
0319
0320 gr_sPH_noPID_pp->SetMarkerStyle(kFullSquare);
0321
0322 gr_sPH_noPID_pp->SetMarkerSize(2);
0323 gr_sPH_noPID_pp->SetMarkerColor(kBlack);
0324 gr_sPH_noPID_pp->SetLineColor(kBlack);
0325 gr_sPH_noPID_pp->SetLineWidth(4);
0326 }
0327
0328
0329
0330 TCanvas *c1 = new TCanvas("Lc_BUP2022_AuAu_3yr", "Lc_BUP2022_AuAu_3yr", 1100, 800);
0331 c1->Divide(1, 1);
0332 int idx = 1;
0333 TPad *p;
0334
0335 p = (TPad *) c1->cd(idx++);
0336 c1->Update();
0337
0338 p->DrawFrame(0, 0, 11, 6)->SetTitle(";#it{p}_{T} [GeV];(#Lambda_{c}^{+}+#bar{#Lambda}_{c}^{-})/(D^{0}+#bar{D}^{0})");
0339
0340
0341
0342
0343
0344
0345
0346
0347
0348
0349
0350
0351
0352
0353
0354
0355
0356
0357
0358
0359
0360
0361 double x1 = 0.01;
0362 double x2 = 8.99;
0363 double y1 = 0.001;
0364 double y2 = 4;
0365
0366
0367
0368
0369
0370
0371
0372
0373
0374
0375
0376
0377
0378
0379
0380
0381
0382
0383
0384
0385
0386
0387
0388
0389
0390
0391
0392
0393
0394
0395
0396
0397
0398
0399
0400
0401
0402
0403
0404
0405
0406 gr_pythia8->Draw("c");
0407 gr_pythia8_CR->Draw("c");
0408
0409 gr_Greco_1->Draw("c");
0410 gr_Greco_2->Draw("c");
0411
0412 gr_Ko_2->Draw("c");
0413 gr_Ko_3->Draw("c");
0414 gr_Tsinghua_1->Draw("c");
0415 gr_Tsinghua_2->Draw("c");
0416
0417 TLine *la = new TLine(0.2, 0.24, 1.5, 0.24);
0418 la->SetLineWidth(5);
0419 la->SetLineColor(18);
0420
0421
0422 TLatex *tex = new TLatex(0.5, 0.26, "SHM");
0423 tex->SetTextFont(12);
0424 tex->SetTextSize(0.06);
0425
0426
0427
0428
0429
0430
0431
0432
0433
0434
0435
0436
0437
0438
0439
0440
0441
0442
0443
0444
0445
0446
0447
0448
0449
0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460
0461
0462
0463
0464
0465
0466
0467
0468
0469
0470
0471
0472
0473
0474 grs_St->Draw("2");
0475 gr_St->Draw("p");
0476 gr_sPH_noPID_AuAu_0_10->Draw("p");
0477 gr_sPH_noPID_pp->Draw("p");
0478
0479
0480
0481
0482
0483
0484
0485
0486
0487
0488
0489 TLegend *leg = new TLegend(0.1998067,0.688525,0.8001561,0.8282708);
0490 leg->AddEntry(gr_sPH_noPID_pp, Form("%.1f pb^{-1} str. #it{p}+#it{p}", pp_rec_3year/1e12), "pl");
0491 leg->AddEntry(gr_sPH_noPID_AuAu_0_10, Form("%.0f nb^{-1} rec. Au+Au, 0-10%%", AuAu_rec_3year/1e9), "pl");
0492 leg->AddEntry(grs_St, "STAR, Au+Au, 0-20%, PRL#bf{124}", "plf");
0493 leg->Draw();
0494
0495
0496 leg = new TLegend(0.04741459,0.8467278,0.7472027,0.8968254);
0497 leg->SetFillStyle(0);
0498 leg->AddEntry("", "#it{#bf{sPHENIX}} BUP 2022, Years 1-3", "");
0499
0500 leg->Draw();
0501
0502 leg = new TLegend(0.6905134,0.44,0.9302814,0.64);
0503
0504 leg->AddEntry(gr_Tsinghua_2, "Tsinghua", "l");
0505 leg->AddEntry(gr_Greco_2, "Catania", "l");
0506 leg->AddEntry(gr_Ko_3, "TAMU", "l");
0507 leg->AddEntry(gr_pythia8_CR, "PYTHIA8", "l");
0508
0509
0510 leg = new TLegend(0.35, 0.5, 0.94, 0.65);
0511 leg->AddEntry(gr_Tsinghua_2, "Tsinghua: simul. coal, 10-80%", "l");
0512 leg->AddEntry(gr_Tsinghua_1, "Tsinghua: seq. coal, 10-80%", "l");
0513 leg->AddEntry(gr_Greco_2, "Catania: coal only, 0-20%", "l");
0514 leg->AddEntry(gr_Greco_1, "Catania: coal+frag, 0-20%", "l");
0515
0516 leg->Draw();
0517
0518 leg = new TLegend(0.5, 0.35, 0.94, 0.5);
0519
0520
0521
0522
0523
0524
0525
0526 leg->AddEntry(gr_Ko_3, "TAMU: di-quark 0-5%", "l");
0527 leg->AddEntry(gr_Ko_2, "TAMU: 3-quark 0-5%", "l");
0528 leg->AddEntry(gr_pythia8_CR, "PYTHIA8 (CR)", "l");
0529 leg->AddEntry(gr_pythia8, "PYTHIA8 (Monash)", "l");
0530
0531 leg->Draw();
0532
0533 c1->Update();
0534
0535
0536
0537 SaveCanvas(c1, "fig/" + TString(c1->GetName()), kTRUE);
0538 }