Back to home page

sPhenix code displayed by LXR

 
 

    


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;  // b
0027 const double Psi2_resolution = 0.5;
0028 
0029 const double AuAu_Ncoll_C0_10 = 960.2;   // [DOI:?10.1103/PhysRevC.87.034911?]
0030 const double AuAu_Ncoll_C0_20 = 770.6;   // [DOI:?10.1103/PhysRevC.91.064904?]
0031 const double AuAu_Ncoll_60_70 = 29.8;    //PHYSICAL REVIEW C 87, 034911 (2013)
0032 const double AuAu_Ncoll_70_80 = 12.6;    //PHYSICAL REVIEW C 87, 034911 (2013)
0033 const double AuAu_Ncoll_C0_100 = 238.5;  // BUP2020
0034 const double pAu_Ncoll_C0_100 = 4.7;     // pb^-1 [sPH-TRG-000]
0035 
0036 const double AuAu_rec_3year = (5.7 + 15) * 1e9;       // BUP2020
0037 const double AuAu_rec_5year = AuAu_rec_3year + 30e9;  // BUP2020
0038 
0039 const double pp_inelastic_crosssec = 42e-3;        // 42 mb [sPH-TRG-000]
0040 const double pp_rec_3year = 6.2e12;                // BUP2020
0041 const double pp_rec_5year = pp_rec_3year + 80e12;  // BUP2020
0042 const double pp_beam_pol = 0.57;
0043 
0044 const double OO_rec_5year = 37e9;              // BUP2020
0045 const double OO_Ncoll_C0_100 = 9.6;            // BUP2020
0046 const double OO_inelastic_crosssec = 1.12214;  // BUP2020
0047 
0048 const double ArAr_rec_5year = 12e9;             // BUP2020
0049 const double ArAr_Ncoll_C0_100 = 28.5;          // BUP2020
0050 const double ArAr_inelastic_crosssec = 2.3423;  // BUP2020
0051 
0052 void makeLcD0_BUP2020()
0053 {
0054   //  gROOT->LoadMacro("sPhenixStyle.C");
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};  // ALICE_pp, ALICE_pPb, STAR_AuAu
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   // STAR data points
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   // STAR Central data
0083   // Updated with https://drupal.star.bnl.gov/STAR/files/starpublications/318/data.html
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   // Theory calculations
0104   // pythia6
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   // pythia8
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   const Int_t N_Greco = 14;
0135   Double_t pt_Greco[N_Greco], y_Greco[N_Greco], ye_Greco[N_Greco];
0136   inData.open("dat/LcD0_Greco_1407.5069.txt");
0137   for(int i=0;i<N_Greco;i++) {
0138     double a, b, c;
0139     inData >> a >> b >> c;
0140     pt_Greco[i] = a;
0141     y_Greco[i] = (b+c)/2.;
0142     ye_Greco[i] = fabs(b-c)/2.;
0143   }
0144   inData.close();
0145   TGraphErrors *gr_Greco = new TGraphErrors(N_Greco, pt_Greco, y_Greco, 0, ye_Greco);
0146   gr_Greco->SetFillColor(16);
0147   gr_Greco->SetLineColor(16);
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   // sPHENIX projection
0189   // **************************
0190 
0191   TGraphErrors *gr_sPH_noPID_AuAu_0_10(nullptr);
0192   TGraphErrors *gr_sPH_noPID_pp(nullptr);
0193 
0194   ///////////////////////////////////////////////////////////////////////////
0195   // LC projection 0-10%
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     //  TFile *fin = new TFile("signi_0_10.root");
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     // cout<<" ok "<<endl;
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       //      sig_sPH_ideal[i] = h2->GetBinContent(i + 1);
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       //      pT_sPH_ideal[i] = pT_sPH[i] + offset;
0241       r_sPH[i] = gr[0]->Eval(pT_sPH[i]);
0242       r_err_sPH_noPID[i] = r_sPH[i] / sig_sPH_noPID[i];
0243       //      r_err_sPH_ideal[i] = r_sPH[i] / sig_sPH_ideal[i];
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     // gr_sPH_noPID->SetMarkerSize(1.8);
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   // LC projection 60-80% to pp
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     //  TFile *fin = new TFile("signi_0_10.root");
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     // cout<<" ok "<<endl;
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       //      sig_sPH_ideal[i] = h2->GetBinContent(i + 1);
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       //      pT_sPH_ideal[i] = pT_sPH[i] + offset;
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       //      r_err_sPH_ideal[i] = r_sPH[i] / sig_sPH_ideal[i];
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     // gr_sPH_noPID->SetMarkerSize(1.8);
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_BUP2020_AuAu_3yr", "Lc_BUP2020_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, 9, 4.5)->SetTitle(";#it{p}_{T} [GeV];(#Lambda_{c}^{+}+#bar{#Lambda}_{c}^{-})/(D^{0}+#bar{D}^{0})");
0339   //  TCanvas *c1 = new TCanvas("c1", "c1", 0, 0, 800, 600);
0340   //  gStyle->SetOptFit(0);
0341   //  gStyle->SetOptStat(0);
0342   //  gStyle->SetEndErrorSize(0);
0343 
0344   //  c1->SetFillColor(10);
0345   //  c1->SetFillStyle(0);
0346   //  c1->SetBorderMode(0);
0347   //  c1->SetBorderSize(0);
0348   //  c1->SetFrameFillColor(10);
0349   //  c1->SetFrameFillStyle(0);
0350   //  c1->SetFrameBorderMode(0);
0351   //  c1->SetLeftMargin(0.11);
0352   //  c1->SetRightMargin(0.03);
0353   //  c1->SetTopMargin(0.03);
0354   //  c1->SetBottomMargin(0.14);
0355   //  c1->SetLogy();
0356   // c1->SetTickx();
0357   // c1->SetTicky();
0358 //  c1->Draw();
0359 //  c1->cd();
0360 
0361   double x1 = 0.01;
0362   double x2 = 8.99;
0363   double y1 = 0.001;
0364   double y2 = 4;
0365   //  TH1 *h0 = new TH1D("h0", "", 1, x1, x2);
0366   //  h0->SetMinimum(y1);
0367   //  h0->SetMaximum(y2);
0368   //  h0->GetXaxis()->SetNdivisions(208);
0369   //  h0->GetXaxis()->CenterTitle();
0370   //  h0->GetXaxis()->SetTitle("Transverse Momentum p_{T} (GeV/c)");
0371   //  h0->GetXaxis()->SetTitleOffset(0.95);
0372   //  h0->GetXaxis()->SetTitleSize(0.06);
0373   //  h0->GetXaxis()->SetLabelOffset(0.01);
0374   //  h0->GetXaxis()->SetLabelSize(0.045);
0375   //  h0->GetXaxis()->SetLabelFont(42);
0376   //  h0->GetXaxis()->SetTitleFont(42);
0377   //  h0->GetYaxis()->SetNdivisions(505);
0378   //  h0->GetYaxis()->SetTitle("(#Lambda_{c}^{+}+#bar{#Lambda}_{c}^{-})/(D^{0}+#bar{D}^{0})");
0379   //  h0->GetYaxis()->SetTitleOffset(0.8);
0380   //  h0->GetYaxis()->SetTitleSize(0.06);
0381   //  h0->GetYaxis()->SetLabelOffset(0.018);
0382   //  h0->GetYaxis()->SetLabelSize(0.045);
0383   //  h0->GetYaxis()->SetLabelFont(42);
0384   //  h0->GetYaxis()->SetTitleFont(42);
0385   //  h0->Draw("c");
0386 
0387 //  TLine *l1 = new TLine(x1, y1, x2, y1);
0388 //  l1->SetLineWidth(3);
0389 //  l1->Draw("same");
0390 //  TLine *l2 = new TLine(x1, y2, x2, y2);
0391 //  l2->SetLineWidth(3);
0392 //  l2->Draw("same");
0393 //  TLine *l3 = new TLine(x1, y1, x1, y2);
0394 //  l3->SetLineWidth(3);
0395 //  l3->Draw("same");
0396 //  TLine *l4 = new TLine(x2, y1, x2, y2);
0397 //  l4->SetLineWidth(3);
0398 //  l4->Draw("same");
0399 
0400 //   gr_pythia->SetFillColor(16);
0401 //   gr_pythia->SetLineWidth(2);
0402 //   gr_pythia->SetLineStyle(2);
0403 //   gr_pythia->SetLineColor(1);
0404 //   gr_pythia->Draw("c");
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   //  gr_Ko_1->Draw("c");
0412   gr_Ko_2->Draw("c");
0413   gr_Ko_3->Draw("c");  // pythia
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   //  la->Draw("same");
0421 
0422   TLatex *tex = new TLatex(0.5, 0.26, "SHM");
0423   tex->SetTextFont(12);
0424   tex->SetTextSize(0.06);
0425   //  tex->Draw("same");
0426 
0427   /*
0428   // plotting the data points
0429   const Int_t kStyle[NConfig] = {20, 20, 24, 20};
0430   const Int_t kColor[NConfig] = {1, 2, 4, 1};
0431   const double xo = fabs(x2-x1)/80.;
0432   const double yo = fabs(y2-y1)/80.;
0433   for(int i=0;i<1;i++) {  // STAR
0434 
0435     for(int j=0;j<N[i];j++) { 
0436       double x1 = x[i][j] - xo;
0437       double x2 = x[i][j] + xo;
0438       double y1 = y[i][j] - yes_d[i][j];
0439       double y2 = y[i][j] + yes_u[i][j];
0440       
0441       TLine *la = new TLine(x1, y1, x1, y1+yo);
0442       la->SetLineColor(kColor[i]);
0443       la->SetLineWidth(1);
0444       la->Draw("same");
0445       TLine *lb = new TLine(x2, y1, x2, y1+yo);
0446       lb->SetLineColor(kColor[i]);
0447       lb->SetLineWidth(1);
0448       lb->Draw("same");
0449       TLine *lc = new TLine(x1, y2, x1, y2-yo);
0450       lc->SetLineColor(kColor[i]);
0451       lc->SetLineWidth(1);
0452       lc->Draw("same");
0453       TLine *ld = new TLine(x2, y2, x2, y2-yo);
0454       ld->SetLineColor(kColor[i]);
0455       ld->SetLineWidth(1);
0456       ld->Draw("same");
0457       TLine *le = new TLine(x1, y1, x2, y1);
0458       le->SetLineColor(kColor[i]);
0459       le->SetLineWidth(2);
0460       le->Draw("same");
0461       TLine *lf = new TLine(x1, y2, x2, y2);
0462       lf->SetLineColor(kColor[i]);
0463       lf->SetLineWidth(2);
0464       lf->Draw("same");
0465     }
0466     gr[i]->SetMarkerStyle(kStyle[i]);
0467     gr[i]->SetMarkerColor(kColor[i]);
0468     gr[i]->SetMarkerSize(1.8);
0469     gr[i]->SetLineColor(kColor[i]);
0470     gr[i]->SetLineWidth(2);
0471     gr[i]->Draw("p");
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   //  gr_sPH_ideal->Draw("p");
0479 
0480 //  tex = new TLatex(x1 + 0.2, y2 * 0.9, "Au+Au, #sqrt{s_{NN}}=200GeV");
0481 //  tex->SetTextFont(42);
0482 //  tex->SetTextSize(0.05);
0483 //  tex->Draw("same");
0484 //  tex = new TLatex(x1 + 0.2, y2 * 0.9, "#sqrt{s_{NN}}=200GeV");
0485 //  tex->SetTextFont(42);
0486 //  tex->SetTextSize(0.055);
0487   //  tex->Draw("same");
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}} Projection, Years 1-3", "");
0499 //  leg->AddEntry("", ("Years 1-3"), "");
0500   leg->Draw();
0501 
0502   leg = new TLegend(0.6905134,0.44,0.9302814,0.64);
0503 //  leg->SetFillStyle(0);
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   leg->Draw();
0509 
0510   leg = new TLegend(0.5, 0.55, 0.94, 0.7);
0511   leg->AddEntry(gr_Tsinghua_2, "Tsinghua: seq. coal, 10-80%", "l");
0512   leg->AddEntry(gr_Tsinghua_1, "Tsinghua: simul. 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 //  leg->Draw();
0516 
0517   leg = new TLegend(0.64, 0.48, 0.94, 0.64);
0518 //  leg->SetFillColor(10);
0519 //  leg->SetFillStyle(10);
0520 //  leg->SetLineStyle(4000);
0521 //  leg->SetLineColor(10);
0522 //  leg->SetLineWidth(0.);
0523 //  leg->SetTextFont(42);
0524 //  leg->SetTextSize(0.035);
0525   leg->AddEntry(gr_Ko_3, "TAMU: di-quark 0-5%", "l");
0526   leg->AddEntry(gr_Ko_2, "TAMU: 3-quark 0-5%", "l");
0527   leg->AddEntry(gr_pythia8_CR, "PYTHIA8 (CR)", "l");
0528   leg->AddEntry(gr_pythia8, "PYTHIA8 (Monash)", "l");
0529 //  leg->Draw();
0530 
0531   c1->Update();
0532 
0533   //  c1->SaveAs("fig/LcD0_proj_0_10_24B.pdf");
0534   //  c1->SaveAs("fig/LcD0_proj_0_10_24B.png");
0535   SaveCanvas(c1, "fig/" + TString(c1->GetName()), kTRUE);
0536 }