9 int hbdchanIHC[4][4] = {{16, 12, 8, 4},
14 string inputfile =
"/sphenix/user/xusun/TestBeam/ShowerCalib/Proto4ShowerInfoRAW_0422_CalibTest.root";
15 TFile *File_InPut = TFile::Open(inputfile.c_str());
17 TH1F *h_hcalin_tower_calib_manual[16];
18 TH1F *h_hcalin_tower_calib_produced[16];
19 TH1F *h_hcalout_tower_calib_manual[16];
20 TH1F *h_hcalout_tower_calib_produced[16];
21 for(
int i_tower = 0; i_tower < 16; ++i_tower)
25 HistName= Form(
"h_hcalin_lg_tower_%d_raw",i_tower);
26 h_hcalin_tower_calib_manual[i_tower] = (TH1F*)File_InPut->Get(HistName.c_str())->Clone();
28 HistName= Form(
"h_hcalin_lg_tower_%d_calib",i_tower);
29 h_hcalin_tower_calib_produced[i_tower] = (TH1F*)File_InPut->Get(HistName.c_str())->Clone();
31 HistName= Form(
"h_hcalout_lg_tower_%d_raw",i_tower);
32 h_hcalout_tower_calib_manual[i_tower] = (TH1F*)File_InPut->Get(HistName.c_str())->Clone();
34 HistName= Form(
"h_hcalout_lg_tower_%d_calib",i_tower);
35 h_hcalout_tower_calib_produced[i_tower] = (TH1F*)File_InPut->Get(HistName.c_str())->Clone();
38 TCanvas *c_hcal_in =
new TCanvas(
"c_hcal_in",
"c_hcal_in",10,10,1600,1600);
39 c_hcal_in->Divide(4,4);
40 TLegend *leg_in =
new TLegend(0.4,0.5,0.8,0.8);
41 leg_in->SetFillColor(0);
42 leg_in->AddEntry(h_hcalin_tower_calib_produced[0],
"production",
"l");
43 leg_in->AddEntry(h_hcalin_tower_calib_manual[0],
"manual",
"p");
44 for(
int i_row = 0; i_row < 4; ++i_row)
46 for(
int i_col = 0; i_col < 4; ++i_col)
48 int i_pad = 4*i_row+i_col+1;
49 int i_tower = hbdchanIHC[i_row][i_col]-1;
51 c_hcal_in->cd(i_pad)->SetLogy();
52 h_hcalin_tower_calib_produced[i_tower]->SetLineColor(1);
53 h_hcalin_tower_calib_produced[i_tower]->SetLineWidth(2);
54 h_hcalin_tower_calib_produced[i_tower]->Draw(
"hE");
56 h_hcalin_tower_calib_manual[i_tower]->SetMarkerColor(2);
57 h_hcalin_tower_calib_manual[i_tower]->SetMarkerSize(1.5);
58 h_hcalin_tower_calib_manual[i_tower]->SetMarkerStyle(24);
59 h_hcalin_tower_calib_manual[i_tower]->Draw(
"p same");
63 c_hcal_in->SaveAs(
"../figures/HCAL_ShowerCalib/c_hcalin_towercalib_comparison.eps");
65 TCanvas *c_hcal_out =
new TCanvas(
"c_hcal_out",
"c_hcal_out",10,10,1600,1600);
66 c_hcal_out->Divide(4,4);
67 TLegend *leg_out =
new TLegend(0.4,0.5,0.8,0.8);
68 leg_out->SetFillColor(0);
69 leg_out->AddEntry(h_hcalout_tower_calib_produced[0],
"production",
"l");
70 leg_out->AddEntry(h_hcalout_tower_calib_manual[0],
"manual",
"p");
71 for(
int i_row = 0; i_row < 4; ++i_row)
73 for(
int i_col = 0; i_col < 4; ++i_col)
75 int i_pad = 4*i_row+i_col+1;
76 int i_tower = hbdchanIHC[i_row][i_col]-1;
77 c_hcal_out->cd(i_pad);
78 c_hcal_out->cd(i_pad)->SetLogy();
79 h_hcalout_tower_calib_produced[i_tower]->SetLineColor(1);
80 h_hcalout_tower_calib_produced[i_tower]->SetLineWidth(2);
81 h_hcalout_tower_calib_produced[i_tower]->Draw(
"hE");
83 h_hcalout_tower_calib_manual[i_tower]->SetMarkerColor(2);
84 h_hcalout_tower_calib_manual[i_tower]->SetMarkerSize(1.5);
85 h_hcalout_tower_calib_manual[i_tower]->SetMarkerStyle(24);
86 h_hcalout_tower_calib_manual[i_tower]->Draw(
"p same");
87 leg_out->Draw(
"same");
90 c_hcal_out->SaveAs(
"../figures/HCAL_ShowerCalib/c_hcalout_towercalib_comparison.eps");