1 #include "sPhenixStyle.h"
2 #include "sPhenixStyle.C"
10 TH1::SetDefaultSumw2();
11 TH2::SetDefaultSumw2();
13 TFile *
f =
new TFile(
"hists.root",
"READ");
14 TFile *f_pp =
new TFile(
"hists_pp.root",
"READ");
15 int ppExists = f_pp->IsOpen();
17 TCanvas *
c =
new TCanvas(
"c",
"c");
20 TLegend *
leg =
new TLegend(.25,.2,.6,.5);
22 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Internal",
"");
23 leg->AddEntry(
"",
"Au+Au #sqrt{s_{NN}}=200 GeV",
"");
24 leg->AddEntry(
"",
"anti-#it{k}_{#it{t}} #it{R} = 0.4, |#eta| < 1.1",
"");
27 TLegend *cleg =
new TLegend(.7,.2,.9,.45);
28 cleg->SetFillStyle(0);
31 int colors[] = {1,2,4,kGreen+2, kViolet,kCyan,kOrange+2,kMagenta+2,kAzure-2};
32 string labels[] = {
"pp",
"0-10%",
"10-30%",
"30-50%",
"50-80%"};
33 TGraphErrors *g_jes[11];
34 TGraphErrors *g_jer[11];
36 for(
int i = 0;
i < 11;
i++){
37 if(!(f->GetListOfKeys()->Contains(Form(
"g_jes_cent%i",
i))))
continue;
38 g_jes[
i] = (TGraphErrors*) f->Get(Form(
"g_jes_cent%i",
i));
39 g_jer[
i] = (TGraphErrors*) f->Get(Form(
"g_jer_cent%i",
i));
42 TGraphErrors *g_jes_pp;
43 TGraphErrors *g_jer_pp;
46 g_jes_pp = (TGraphErrors*) f_pp->Get(
"g_jes_cent0");
47 g_jer_pp = (TGraphErrors*) f_pp->Get(
"g_jer_cent0");
50 TCanvas *
c2 =
new TCanvas(
"c2",
"c2");
51 TMultiGraph *mg1 =
new TMultiGraph();
52 for(
int i = 0;
i < ncent;
i++){
53 g_jes[
i]->SetMarkerColor(colors[
i+1]);
54 g_jes[
i]->SetLineColor(colors[
i+1]);
55 mg1->Add(g_jes[
i],
"p");
56 cleg->AddEntry(g_jes[i],labels[i].c_str(),
"p");
61 mg1->Add(g_jes_pp,
"p");
62 cleg->AddEntry(g_jes_pp,
"pp",
"p");
68 mg1->GetXaxis()->SetRangeUser(5,100);
69 mg1->GetXaxis()->SetTitle(
"p_{T,truth} [GeV]");
70 mg1->GetYaxis()->SetTitle(
"#LTp_{T,reco}/p_{T,truth}#GT");
75 TCanvas * c3 =
new TCanvas(
"c3",
"c3");
76 TMultiGraph *mg2 =
new TMultiGraph();
77 TLegend *cleg2 =
new TLegend(.3,.6,.5,.9);
78 cleg2->SetFillStyle(0);
80 for(
int i = 0;
i < ncent;
i++){
81 g_jer[
i]->SetMarkerColor(colors[
i]);
82 g_jer[
i]->SetLineColor(colors[i]);
83 mg2->Add(g_jer[i],
"p");
84 cleg2->AddEntry(g_jes[i],labels[i].c_str(),
"p");
88 mg2->Add(g_jer_pp,
"p");
89 cleg2->AddEntry(g_jes_pp,
"pp",
"p");
95 mg2->GetXaxis()->SetTitle(
"p_{T,truth} [GeV]");
96 mg2->GetYaxis()->SetTitle(
"#sigma(p_{T,reco}/p_{T,truth}) / #LTp_{T,reco}/p_{T,truth}#GT");
98 TLegend *leg2 =
new TLegend(.4,.6,.8,.9);
99 leg2->SetFillStyle(0);
100 leg2->AddEntry(
"",
"#it{#bf{sPHENIX}} Internal",
"");
101 leg2->AddEntry(
"",
"Au+Au #sqrt{s_{NN}}=200 GeV",
"");
102 leg2->AddEntry(
"",
"anti-#it{k}_{#it{t}} #it{R} = 0.4, |#eta| < 1.1",
"");
107 c2->SaveAs(Form(
"plots/AuAu_JES_R04.pdf"));
108 c3->SaveAs(Form(
"plots/AuAu_JER_R04.pdf"));
110 TLegend *cleg3 =
new TLegend(.3,.8,.5,.93);
111 cleg3->SetFillStyle(0);
112 TLegend *leg3 =
new TLegend(.4,.7,.8,.93);
113 leg3->SetFillStyle(0);
114 leg3->AddEntry(
"",
"#it{#bf{sPHENIX}} Internal",
"");
115 leg3->AddEntry(
"",
"Au+Au #sqrt{s_{NN}}=200 GeV",
"");
116 leg3->AddEntry(
"",
"anti-#it{k}_{#it{t}} #it{R} = 0.4, |#eta| < 1.1",
"");
119 TH3F *h_subEt = (TH3F*) f->Get(
"h_subEt_pt");
120 string cent[] = {
"Inclusive",
"0-10%",
"10-30%",
"30-50%",
"50-80%"};
121 for(
int i = 0;
i < ncent;
i++){
122 h_subEt->GetZaxis()->SetRange(
i+1,
i+1);
123 TH2F *h_proj = (TH2F*) h_subEt->Project3D(
"yx");
124 h_proj->Draw(
"COLZ");
125 TH1F *h_prof = (TH1F*)h_proj->ProfileX();
126 h_prof->Draw(
"SAME");
127 h_proj->GetXaxis()->SetTitle(
"p_{T}^{reco} [GeV]");
128 h_proj->GetYaxis()->SetTitle(
"Subtracted E_{T}");
129 h_proj->GetYaxis()->SetRangeUser(0,h_prof->GetBinContent(1)*2);
131 cleg3->AddEntry(
"%s",cent[
i].c_str());
134 c3->SaveAs(Form(
"plots/AuAu_subtracted_Et_cent%i.pdf",
i));