8 #include <TGraphAsymmErrors.h>
14 string input_5GeV =
"/sphenix/user/xusun/TestBeam/ShowerCalibAna/Proto4ShowerInfoRAW_1087.root";
15 TFile *File_5GeV = TFile::Open(input_5GeV.c_str());
16 TH2F *h_mAsymmEnergy_pion_5GeV = (TH2F*)File_5GeV->Get(
"h_mAsymmEnergy_pion");
17 TH1F *h_mEnergy_pion_5GeV = (TH1F*)h_mAsymmEnergy_pion_5GeV->ProjectionY()->Clone();
18 TH2F *h_mAsymmEnergy_pion_leveling_5GeV = (TH2F*)File_5GeV->Get(
"h_mAsymmEnergy_pion_leveling");
19 TH1F *h_mEnergy_pion_leveling_5GeV = (TH1F*)h_mAsymmEnergy_pion_leveling_5GeV->ProjectionY()->Clone();
21 string input_8GeV =
"/sphenix/user/xusun/TestBeam/ShowerCalibAna/Proto4ShowerInfoRAW_0422.root";
22 TFile *File_8GeV = TFile::Open(input_8GeV.c_str());
23 TH2F *h_mAsymmEnergy_pion_8GeV = (TH2F*)File_8GeV->Get(
"h_mAsymmEnergy_pion");
24 TH1F *h_mEnergy_pion_8GeV = (TH1F*)h_mAsymmEnergy_pion_8GeV->ProjectionY()->Clone();
25 TH2F *h_mAsymmEnergy_pion_leveling_8GeV = (TH2F*)File_8GeV->Get(
"h_mAsymmEnergy_pion_leveling");
26 TH1F *h_mEnergy_pion_leveling_8GeV = (TH1F*)h_mAsymmEnergy_pion_leveling_8GeV->ProjectionY()->Clone();
28 string input_12GeV =
"/sphenix/user/xusun/TestBeam/ShowerCalibAna/Proto4ShowerInfoRAW_0571.root";
29 TFile *File_12GeV = TFile::Open(input_12GeV.c_str());
30 TH2F *h_mAsymmEnergy_pion_12GeV = (TH2F*)File_12GeV->Get(
"h_mAsymmEnergy_pion");
31 TH1F *h_mEnergy_pion_12GeV = (TH1F*)h_mAsymmEnergy_pion_12GeV->ProjectionY()->Clone();
32 TH2F *h_mAsymmEnergy_pion_leveling_12GeV = (TH2F*)File_12GeV->Get(
"h_mAsymmEnergy_pion_leveling");
33 TH1F *h_mEnergy_pion_leveling_12GeV = (TH1F*)h_mAsymmEnergy_pion_leveling_12GeV->ProjectionY()->Clone();
35 TCanvas *c_AsymmEnergy_energy =
new TCanvas(
"c_AsymmEnergy_energy",
"c_AsymmEnergy_energy",1500,500);
36 c_AsymmEnergy_energy->Divide(3,1);
37 for(
int i_pad = 0; i_pad < 3; ++i_pad)
39 c_AsymmEnergy_energy->cd(i_pad+1);
40 c_AsymmEnergy_energy->cd(i_pad+1)->SetLeftMargin(0.15);
41 c_AsymmEnergy_energy->cd(i_pad+1)->SetBottomMargin(0.15);
42 c_AsymmEnergy_energy->cd(i_pad+1)->SetTicks(1,1);
43 c_AsymmEnergy_energy->cd(i_pad+1)->SetGrid(0,0);
46 c_AsymmEnergy_energy->cd(1);
47 h_mEnergy_pion_5GeV->SetLineColor(1);
48 h_mEnergy_pion_5GeV->Draw(
"h");
49 h_mEnergy_pion_leveling_5GeV->SetLineColor(2);
50 h_mEnergy_pion_leveling_5GeV->Draw(
"h same");
52 TLegend *leg_5GeV =
new TLegend(0.55,0.7,0.75,0.85);
53 leg_5GeV->SetBorderSize(0);
54 leg_5GeV->SetFillColor(10);
55 leg_5GeV->AddEntry(h_mEnergy_pion_5GeV,
"before leveling",
"h");
56 leg_5GeV->AddEntry(h_mEnergy_pion_leveling_5GeV,
"after leveling",
"h");
59 c_AsymmEnergy_energy->cd(2);
60 h_mEnergy_pion_8GeV->SetLineColor(1);
61 h_mEnergy_pion_8GeV->Draw(
"h");
62 h_mEnergy_pion_leveling_8GeV->SetLineColor(2);
63 h_mEnergy_pion_leveling_8GeV->Draw(
"h same");
65 TLegend *leg_8GeV =
new TLegend(0.55,0.7,0.75,0.85);
66 leg_8GeV->SetBorderSize(0);
67 leg_8GeV->SetFillColor(10);
68 leg_8GeV->AddEntry(h_mEnergy_pion_8GeV,
"before leveling",
"h");
69 leg_8GeV->AddEntry(h_mEnergy_pion_leveling_8GeV,
"after leveling",
"h");
72 c_AsymmEnergy_energy->cd(3);
73 h_mEnergy_pion_12GeV->SetLineColor(1);
74 h_mEnergy_pion_12GeV->Draw(
"h");
75 h_mEnergy_pion_leveling_12GeV->SetLineColor(2);
76 h_mEnergy_pion_leveling_12GeV->Draw(
"h same");
78 TLegend *leg_12GeV =
new TLegend(0.55,0.7,0.75,0.85);
79 leg_12GeV->SetBorderSize(0);
80 leg_12GeV->SetFillColor(10);
81 leg_12GeV->AddEntry(h_mEnergy_pion_12GeV,
"before leveling",
"h");
82 leg_12GeV->AddEntry(h_mEnergy_pion_leveling_12GeV,
"after leveling",
"h");