6 void PlotLine(
double x1_val,
double x2_val,
double y1_val,
double y2_val,
int Line_Col,
int LineWidth,
int LineStyle)
8 TLine* Zero_line =
new TLine();
9 Zero_line -> SetX1(x1_val);
10 Zero_line -> SetX2(x2_val);
11 Zero_line -> SetY1(y1_val);
12 Zero_line -> SetY2(y2_val);
22 TH1F *h_ihcal =
new TH1F(
"h_ihcal",
"h_ihcal",3000,1100,1400);
23 for(
int i_bin = 0; i_bin < 2000; ++i_bin)
25 h_ihcal->SetBinContent(i_bin+1,100.0);
26 h_ihcal->SetBinError(i_bin+1,1.0);
29 h_ihcal->SetTitle(
"");
31 h_ihcal->GetXaxis()->SetNdivisions(505);
32 h_ihcal->GetXaxis()->SetTitle(
"x (mm)");
33 h_ihcal->GetYaxis()->SetRangeUser(-400.0,-100.0);
34 h_ihcal->GetYaxis()->SetTitle(
"y (mm)");
36 TCanvas *c_ihcal =
new TCanvas(
"c_ihcal",
"c_ihcal",10,10,800,800);
37 c_ihcal->SetLeftMargin(0.15);
38 c_ihcal->SetBottomMargin(0.15);
39 c_ihcal->SetTicks(1,1);
40 c_ihcal->SetGrid(1,1);
43 double ihcal3_uL[2] = {1154.49, -189.06};
44 double ihcal3_uR[2] = {1297.94, -349.22};
45 double ihcal3_lR[2] = {1288.18, -357.80};
46 double ihcal3_lL[2] = {1157.30, -205.56};
47 PlotLine(ihcal3_uL[0],ihcal3_uR[0],ihcal3_uL[1],ihcal3_uR[1],1,2,2);
48 PlotLine(ihcal3_uL[0],ihcal3_lL[0],ihcal3_uL[1],ihcal3_lL[1],1,2,2);
49 PlotLine(ihcal3_lL[0],ihcal3_lR[0],ihcal3_lL[1],ihcal3_lR[1],1,2,2);
50 PlotLine(ihcal3_lR[0],ihcal3_uR[0],ihcal3_lR[1],ihcal3_uR[1],1,2,2);
52 double ihcal2_uL[2] = {1157.5, -151.44};
53 double ihcal2_uR[2] = {1308.5, -286.96};
54 double ihcal2_lR[2] = {1298.8, -297.39};
55 double ihcal2_lL[2] = {1155.8, -163.92};
56 PlotLine(ihcal2_uL[0],ihcal2_uR[0],ihcal2_uL[1],ihcal2_uR[1],2,2,2);
57 PlotLine(ihcal2_uL[0],ihcal2_lL[0],ihcal2_uL[1],ihcal2_lL[1],2,2,2);
58 PlotLine(ihcal2_lL[0],ihcal2_lR[0],ihcal2_lL[1],ihcal2_lR[1],2,2,2);
59 PlotLine(ihcal2_lR[0],ihcal2_uR[0],ihcal2_lR[1],ihcal2_uR[1],2,2,2);
60 c_ihcal->SaveAs(
"./figures/c_shape_ihcal.eps");
62 TH1F *h_ohcal =
new TH1F(
"h_ohcal",
"h_ohcal",3000,1500,3000);
63 for(
int i_bin = 0; i_bin < 2000; ++i_bin)
65 h_ohcal->SetBinContent(i_bin+1,100.0);
66 h_ohcal->SetBinError(i_bin+1,1.0);
69 h_ohcal->SetTitle(
"");
71 h_ohcal->GetXaxis()->SetNdivisions(505);
72 h_ohcal->GetXaxis()->SetTitle(
"x (mm)");
73 h_ohcal->GetYaxis()->SetRangeUser(-500.0,-200.0);
74 h_ohcal->GetYaxis()->SetTitle(
"y (mm)");
76 TCanvas *c_ohcal =
new TCanvas(
"c_ohcal",
"c_ohcal",10,10,800,800);
77 c_ohcal->SetLeftMargin(0.15);
78 c_ohcal->SetBottomMargin(0.15);
79 c_ohcal->SetTicks(1,1);
80 c_ohcal->SetGrid(1,1);
82 double ohcal_uL[2] = {1777.6, -433.5};
83 double ohcal_uR[2] = {2600.4, -417.4};
84 double ohcal_lR[2] = {2601.2, -459.8};
85 double ohcal_lL[2] = {1770.9, -459.8};
86 PlotLine(ohcal_uL[0],ohcal_uR[0],ohcal_uL[1],ohcal_uR[1],2,2,2);
87 PlotLine(ohcal_uL[0],ohcal_lL[0],ohcal_uL[1],ohcal_lL[1],2,2,2);
88 PlotLine(ohcal_lL[0],ohcal_lR[0],ohcal_lL[1],ohcal_lR[1],2,2,2);
89 PlotLine(ohcal_lR[0],ohcal_uR[0],ohcal_lR[1],ohcal_uR[1],2,2,2);
90 c_ohcal->SaveAs(
"./figures/c_shape_ohcal.eps");