1 #include "sPhenixStyle.h"
2 #include "sPhenixStyle.C"
8 TCanvas *cJer =
new TCanvas();
9 TCanvas *cJes =
new TCanvas();
10 TLegend *
leg =
new TLegend(.4,.5,.9,.9);
11 TLegend *
corr =
new TLegend(0.35,0.5,0.85,0.75);
17 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Internal",
"");
18 leg->AddEntry(
"",
"p+p #sqrt{s_{NN}}=200 GeV",
"");
19 leg->AddEntry(
"",
"anti-#it{k}_{#it{t}} #it{R} = 0.4, |#eta| < 1.1",
"");
20 string rad[] = {
"0",
"1",
"1.5",
"2",
"2.5"};
22 const int nCorrStat = 2;
23 const int nRads =
sizeof(
rad)/
sizeof(rad[0]);
25 TGraphErrors *jes[nCorrStat][nRads];
26 TGraphErrors *jer[nCorrStat][nRads];
28 TFile *fin[nCorrStat][nRads];
31 int colors[] = {1, 2, 4, kGreen +2, kViolet, kCyan, kOrange, kMagenta+2, kAzure-2};
33 for(
int i = 0;
i < nCorrStat;
i++)
35 for(
int j = 0;
j < nRads;
j++)
37 fin[
i][
j] =
new TFile(Form(
"hists_R04_dR%s_Corr%d_isLin0.root",rad[
j].c_str(),
i));
39 jes[
i][
j] = (TGraphErrors*)fin[
i][
j] ->
Get(
"g_jes_cent0");
40 jes[
i][
j] ->
SetTitle(
";p_{T,truth} [GeV]; #LTp_{T,reco}/p_{T,truth}#GT");
42 jer[
i][
j] = (TGraphErrors*)fin[
i][
j] ->
Get(
"g_jer_cent0");
43 jer[
i][
j] ->
SetTitle(
";p_{T,truth} [GeV];#sigma(p_{T,reco}/p_{T,truth}) / #LTp_{T,reco}/p_{T,truth}#GT");
58 if(
i == 0)leg ->
AddEntry(jes[
i][j],Form(
"#DeltaR = %sR", rad[j].c_str()),
"p");
64 jes[
i][
j] ->
GetYaxis() -> SetRangeUser(0.5,1.8);
67 else jes[
i][
j] ->
Draw(
"samep");
70 if(
i == 0 && j == 0) jer[
i][
j] ->
Draw(
"ap");
71 else jer[
i][
j] ->
Draw(
"samep");
76 TLine *one =
new TLine(0,1,80,1);
79 tag.SetTextSize(0.04);
80 tag.DrawLatexNDC(0.39,0.75,
"W/ W/o");
84 cJes -> SaveAs(
"plots/JES_CorrectionComp.pdf");
87 tag.SetTextSize(0.04);
88 tag.DrawLatexNDC(0.39,0.75,
"W/ W/o");
91 cJer -> SaveAs(
"plots/JER_CorrectionComp.pdf");
95 TCanvas *cJesClean =
new TCanvas();
96 jes[0][0] ->
GetYaxis() -> SetRangeUser(0.5,1.80);
97 jes[0][0] ->
Draw(
"ap");
98 jes[1][0] ->
Draw(
"same p");
106 leg->AddEntry(
"",
"#it{#bf{sPHENIX}} Internal",
"");
107 leg->AddEntry(
"",
"p+p #sqrt{s_{NN}}=200 GeV",
"");
108 leg->AddEntry(
"",
"anti-#it{k}_{#it{t}} #it{R} = 0.4, |#eta| < 1.1",
"");
109 leg ->
AddEntry(jes[0][0],
"Uncalibrated",
"p");
110 leg ->
AddEntry(jes[1][0],
"Calibrated",
"p");
115 TCanvas *cJerClean =
new TCanvas();
116 jer[0][0] ->
Draw(
"ap");
117 jer[1][0] ->
Draw(
"same p");
123 cJerClean -> SaveAs(
"plots/JER_CorrectionComp_NoIso.pdf");
124 cJesClean -> SaveAs(
"plots/JES_CorrectionComp_NoIso.pdf");
126 TCanvas *cJesCleanZoom =
new TCanvas();
127 jes[1][0] ->
GetYaxis() -> SetRangeUser(0.98,1.02);
128 jes[1][0] ->
GetXaxis() -> SetLimits(0,80);
129 jes[1][0] ->
Draw(
"aP");
133 cJesCleanZoom -> SaveAs(
"plots/JES_CorrectionComp_NoIso_Zoom.pdf");