5 from ROOT
import TBox, kGray, TLine, TMath , TF1, kBlue, kRed, kBlack
9 labelx = getattr(labels, x)
10 labely = getattr(labels, y)
15 labelx = getattr(labels, x)
23 putBox(h, 0, 0, 1, 44, offset);
putBox(h, 7, 0, 9, 44 ,offset)
24 putBox(h, 0, 48, 1, 52 ,offset);
putBox(h, 8, 48, 9, 52 ,offset)
25 putBox(h, 0, 56, 1, 64 ,offset);
putBox(h, 7, 56, 9, 64 ,offset)
27 putLine(h, 1, 0, 1, 44 );
putLine(h, 7, 0, 7, 44 );
putLine(h, 0, 44, 1, 44);
putLine(h, 7, 44, 9, 44)
28 putLine(h, 1, 48, 1, 52);
putLine(h, 8, 48, 8, 52);
putLine(h, 0, 48, 1, 48);
putLine(h, 8, 48, 9, 48);
putLine(h, 0, 52, 1, 52);
putLine(h, 8, 52, 9, 52)
29 putLine(h, 1, 56, 1, 64);
putLine(h, 7, 56, 7, 64);
putLine(h, 0, 56, 1, 56);
putLine(h, 7, 56, 9, 56 )
32 putBox(h, 0, 0, 2, 44 ,offset)
33 putBox(h, 0, 48, 1, 52 ,offset)
34 putBox(h, 0, 56, 2, 64 ,offset)
37 putLine(h, 1, 48, 1, 52);
putLine(h, 0, 48, 1, 48);
putLine(h, 0, 52, 1, 52)
41 putBox(h, 6, 0, 8, 4 ,offset);
putLine(h, 6, 0, 8, 0);
putLine(h, 6, 0, 6, 4);
putLine(h, 6, 4, 8, 4)
42 putBox(h, 7, 6, 8, 8 ,offset);
putLine(h, 7, 6, 8, 6);
putLine(h, 7, 6, 7, 8)
43 putBox(h, 6, 8, 8, 12 ,offset);
putLine(h, 6, 8, 7, 8);
putLine(h, 6, 8, 6, 12);
putLine(h, 6, 12, 8, 12)
44 putBox(h, 7, 14, 8, 16 ,offset);
putLine(h, 7, 14, 8, 14);
putLine(h, 7, 14, 7, 16)
45 putBox(h, 6, 16, 8, 20 ,offset);
putLine(h, 6, 16, 7, 16);
putLine(h, 6, 16, 6, 20);
putLine(h, 6, 20, 8, 20)
46 putBox(h, 7, 22, 8, 24 ,offset);
putLine(h, 7, 22, 8, 22);
putLine(h, 7, 22, 7, 24)
47 putBox(h, 6, 24, 8, 28 ,offset);
putLine(h, 6, 24, 7, 24);
putLine(h, 6, 24, 6, 28);
putLine(h, 6, 28, 8, 28)
48 putBox(h, 7, 30, 8, 32 ,offset);
putLine(h, 7, 30, 8, 30);
putLine(h, 7, 30, 7, 32)
49 putBox(h, 6, 32, 8, 36 ,offset);
putLine(h, 6, 32, 7, 32);
putLine(h, 6, 32, 6, 36);
putLine(h, 6, 36, 8, 36)
50 putBox(h, 7, 38, 8, 40 ,offset);
putLine(h, 7, 38, 8, 38);
putLine(h, 7, 38, 7, 40)
51 putBox(h, 6, 40, 8, 44 ,offset);
putLine(h, 6, 40, 7, 40);
putLine(h, 6, 40, 6, 44)
52 putBox(h, 5, 44, 8, 48 ,offset);
putLine(h, 5, 44, 6, 44);
putLine(h, 5, 44, 5, 48);
putLine(h, 5, 48, 8, 48)
53 putBox(h, 7, 50, 8, 52 ,offset);
putLine(h, 7, 50, 8, 50);
putLine(h, 7, 50, 7, 52)
54 putBox(h, 6, 52, 8, 56 ,offset);
putLine(h, 6, 52, 7, 52);
putLine(h, 6, 52, 6, 56);
putLine(h, 6, 56, 8, 56)
55 putBox(h, 7, 58, 8, 60 ,offset);
putLine(h, 7, 58, 8, 58);
putLine(h, 7, 58, 7, 60)
56 putBox(h, 6, 60, 8, 64 ,offset);
putLine(h, 6, 60, 7, 60);
putLine(h, 6, 60, 6, 64)
57 putBox(h, 5, 64, 8, 68 ,offset);
putLine(h, 5, 64, 6, 64);
putLine(h, 5, 64, 5, 68);
putLine(h, 5, 68, 8, 68)
58 putBox(h, 7, 70, 8, 72 ,offset);
putLine(h, 7, 70, 8, 70);
putLine(h, 7, 70, 7, 72);
putLine(h, 7, 72, 8, 72)
65 putBox(h, 2, 0, 0, 4 ,offset);
putLine(h, 2, 0, 0, 0);
putLine(h, 2, 0, 2, 4);
putLine(h, 2, 4, 0, 4)
66 putBox(h, 1, 6, 0, 8 ,offset);
putLine(h, 1, 6, 0, 6);
putLine(h, 1, 6, 1, 8)
67 putBox(h, 2, 8, 0, 12 ,offset);
putLine(h, 2, 8, 1, 8);
putLine(h, 2, 8, 2, 12);
putLine(h, 2, 12, 0, 12)
68 putBox(h, 1, 14, 0, 16 ,offset);
putLine(h, 1, 14, 0, 14);
putLine(h, 1, 14, 1, 16)
69 putBox(h, 2, 16, 0, 20 ,offset);
putLine(h, 2, 16, 1, 16);
putLine(h, 2, 16, 2, 20);
putLine(h, 2, 20, 0, 20)
70 putBox(h, 1, 22, 0, 24 ,offset);
putLine(h, 1, 22, 0, 22);
putLine(h, 1, 22, 1, 24)
71 putBox(h, 2, 24, 0, 28 ,offset);
putLine(h, 2, 24, 1, 24);
putLine(h, 2, 24, 2, 28);
putLine(h, 2, 28, 0, 28)
72 putBox(h, 1, 30, 0, 32 ,offset);
putLine(h, 1, 30, 0, 30);
putLine(h, 1, 30, 1, 32)
73 putBox(h, 2, 32, 0, 36 ,offset);
putLine(h, 2, 32, 1, 32);
putLine(h, 2, 32, 2, 36);
putLine(h, 2, 36, 0, 36)
74 putBox(h, 1, 38, 0, 40 ,offset);
putLine(h, 1, 38, 0, 38);
putLine(h, 1, 38, 1, 40)
75 putBox(h, 2, 40, 0, 44 ,offset);
putLine(h, 2, 40, 1, 40);
putLine(h, 2, 40, 2, 44)
76 putBox(h, 3, 44, 0, 48 ,offset);
putLine(h, 3, 44, 2, 44);
putLine(h, 3, 44, 3, 48);
putLine(h, 3, 48, 0, 48)
77 putBox(h, 1, 50, 0, 52 ,offset);
putLine(h, 1, 50, 0, 50);
putLine(h, 1, 50, 1, 52)
78 putBox(h, 2, 52, 0, 56 ,offset);
putLine(h, 2, 52, 1, 52);
putLine(h, 2, 52, 2, 56);
putLine(h, 2, 56, 0, 56)
79 putBox(h, 1, 58, 0, 60 ,offset);
putLine(h, 1, 58, 0, 58);
putLine(h, 1, 58, 1, 60)
80 putBox(h, 2, 60, 0, 64 ,offset);
putLine(h, 2, 60, 1, 60);
putLine(h, 2, 60, 2, 64)
81 putBox(h, 3, 64, 0, 68 ,offset);
putLine(h, 3, 64, 2, 64);
putLine(h, 3, 64, 3, 68);
putLine(h, 3, 68, 0, 68)
82 putBox(h, 1, 70, 0, 72 ,offset);
putLine(h, 1, 70, 0, 70);
putLine(h, 1, 70, 1, 72);
putLine(h, 1, 72, 0, 72)
85 putBox(h, 2, 4, 5, 8 ,offset);
putLine(h, 2, 4, 5, 4);
putLine(h, 2, 4, 2, 8);
putLine(h, 2, 8, 4, 8)
87 putBox(h, 2, 12, 5, 16 ,offset);
putLine(h, 2, 12, 4, 12);
putLine(h, 2, 12, 2, 16);
putLine(h, 2, 16, 4, 16)
89 putBox(h, 2, 20, 5, 24 ,offset);
putLine(h, 2, 20, 4, 20);
putLine(h, 2, 20, 2, 24);
putLine(h, 2, 24, 4, 24)
91 putBox(h, 2, 28, 5, 32 ,offset);
putLine(h, 2, 28, 4, 28);
putLine(h, 2, 28, 2, 32);
putLine(h, 2, 32, 5, 32)
92 putBox(h, 2, 36, 5, 40 ,offset);
putLine(h, 2, 36, 5, 36);
putLine(h, 2, 36, 2, 40);
putLine(h, 2, 40, 4, 40)
94 putBox(h, 2, 44, 5, 48 ,offset);
putLine(h, 2, 44, 4, 44);
putLine(h, 2, 44, 2, 48);
putLine(h, 2, 48, 4, 48)
96 putBox(h, 2, 52, 5, 56 ,offset);
putLine(h, 2, 52, 4, 52);
putLine(h, 2, 52, 2, 56);
putLine(h, 2, 56, 4, 56)
98 putBox(h, 2, 60, 5, 64 ,offset);
putLine(h, 2, 60, 4, 60);
putLine(h, 2, 60, 2, 64);
putLine(h, 2, 64, 5, 64)
104 putBox(h, 3, 4, 0, 8 ,offset);
putLine(h, 3, 4, 0, 4);
putLine(h, 3, 4, 3, 8);
putLine(h, 3, 8, 1, 8)
106 putBox(h, 3, 12, 0, 16 ,offset);
putLine(h, 3, 12, 1, 12);
putLine(h, 3, 12, 3, 16);
putLine(h, 3, 16, 1, 16)
108 putBox(h, 3, 20, 0, 24 ,offset);
putLine(h, 3, 20, 1, 20);
putLine(h, 3, 20, 3, 24);
putLine(h, 3, 24, 1, 24)
110 putBox(h, 3, 28, 0, 32 ,offset);
putLine(h, 3, 28, 1, 28);
putLine(h, 3, 28, 3, 32);
putLine(h, 3, 32, 0, 32)
111 putBox(h, 3, 36, 0, 40 ,offset);
putLine(h, 3, 36, 0, 36);
putLine(h, 3, 36, 3, 40);
putLine(h, 3, 40, 1, 40)
113 putBox(h, 3, 44, 0, 48 ,offset);
putLine(h, 3, 44, 1, 44);
putLine(h, 3, 44, 3, 48);
putLine(h, 3, 48, 1, 48)
115 putBox(h, 3, 52, 0, 56 ,offset);
putLine(h, 3, 52, 1, 52);
putLine(h, 3, 52, 3, 56);
putLine(h, 3, 56, 1, 56)
117 putBox(h, 3, 60, 0, 64 ,offset);
putLine(h, 3, 60, 1, 60);
putLine(h, 3, 60, 3, 64);
putLine(h, 3, 64, 0, 64)
125 putBox(h, 1, 16, 2, 20 ,offset)
132 putBox(h, 0, 16, 1, 20 ,offset)
138 if(xAxis==
"BEA" or xAxis ==
"BEC"):
139 putBox(h, 2, 0, 3, 16 ,offset)
143 if(xAxis ==
"EMA" or xAxis ==
"EMC"):
144 putBox(h, 5, 0, 6, 64 ,offset)
148 if(xAxis ==
"EOA" or xAxis ==
"EOC"):
149 putBox(h, 6, 0, 7, 64 ,offset)
152 if(xAxis[0:2] ==
"EE" or xAxis[0:2] ==
"BI" or xAxis[0:2] ==
"EI" or xAxis[0:2] ==
"BM" or xAxis[0:2] ==
"BO"):
154 for i
in range(h.GetNbinsY()+1):
155 l = TLine(0,i,0.55*h.GetNbinsX()/17,i)
156 h.GetListOfFunctions().Add(l)
157 for i
in range(h.GetNbinsX()+1):
158 l = TLine(i,0,i,0.55/17*h.GetNbinsY())
159 h.GetListOfFunctions().Add(l)
161 lx = TLine(0,0,h.GetNbinsX(),0)
162 ly = TLine(0,0,0,h.GetNbinsY())
163 lx.SetLineColor(kBlack)
164 ly.SetLineColor(kBlack)
165 h.GetListOfFunctions().Add(lx)
166 h.GetListOfFunctions().Add(ly)
173 putBox(h, 0, 0, 6, 16, offset);
putLine(h, 6, 0, 6, 16, offset);
putLine(h, 2, 16, 6, 16, offset)
174 putBox(h, 0, 16, 2, 18, offset);
putLine(h, 2, 16, 2, 18, offset)
175 putLine(h, 0, 18, 2, 18, offset)
176 putBox(h, 0, 20, 2, 22, offset);
putLine(h, 2, 20, 2, 22, offset);
putLine(h, 0, 20, 2, 20, offset);
putLine(h, 0, 22, 2, 22, offset)
177 putBox(h, 0, 24, 2, 26, offset);
putLine(h,2,24,2,26,offset);
putLine(h, 0, 24, 2, 24, offset);
putLine(h, 0, 26, 2, 26, offset)
178 putBox(h, 0, 28, 2, 30, offset);
putLine(h,2,28,2,30,offset);
putLine(h,0,28,2,28,offset);
putLine(h,0,30,2,30,offset)
179 putBox(h, 0, 32, 2, 34, offset);
putLine(h,2,32,2,34,offset);
putLine(h,0,32,2,32,offset);
putLine(h,0,34,2,34,offset)
180 putBox(h, 0, 36, 3, 38, offset);
putLine(h,3,36,3,38,offset);
putLine(h,0,36,3,36,offset);
putLine(h,2,38,3,38,offset)
181 putBox(h, 0, 38, 2, 40, offset);
putLine(h,2,38,2,40,offset);
putLine(h,0,40,2,40,offset)
182 putBox(h, 0, 42, 2, 44, offset);
putLine(h,0,42,2,42,offset);
putLine(h,2,42,2,44,offset);
putLine(h,0,44,2,44,offset)
183 putBox(h, 0, 46, 3, 48, offset);
putLine(h,3,46,3,48,offset);
putLine(h,0,46,3,46,offset);
putLine(h,2,48,3,48,offset)
184 putBox(h, 0, 48, 2, 50, offset);
putLine(h,2,48,2,50,offset);
putLine(h,0,50,2,50,offset)
185 putBox(h, 0, 52, 2, 106, offset)
189 putBox(h, 0, 108, 1, 110, offset);
putLine(h,1,108,1,110,offset);
putLine(h,0,108,1,108,offset);
putLine(h,0,110,1,110,offset)
190 putBox(h, 0, 112, 2, 116, offset);
putLine(h,2,112,2,116,offset);
putLine(h,0,112,2,112,offset)
194 putBox(h, 8, 0, 9, 106, offset);
putLine(h,8,0,8,106, offset);
putLine(h,8,106,9,106, offset);
putLine(h,9,0,9,106, offset)
195 putBox(h, 8, 108, 9, 110, offset);
putLine(h,8,108,9,108, offset);
putLine(h,8,110,9,110, offset);
putLine(h,8,108,8,110, offset);
putLine(h,9,108,9,110, offset)
196 putBox(h, 8, 112, 9, 116, offset);
putLine(h,8,112,9,112, offset);
putLine(h,8,112,8,116, offset);
putLine(h,9,112,9,116, offset)
199 putBox(h, 11, 0, 17, 16, offset);
putLine(h,11,0,11,16, offset);
putLine(h,11,16,15,16, offset)
200 putBox(h, 15, 16, 17, 18, offset);
putLine(h,15,16,15,18, offset)
205 putBox(h, 15, 20, 17, 22, offset);
putLine(h,15,20,15,22, offset);
putLine(h,15,20,17,20, offset);
putLine(h,15,22,17,22, offset)
206 putBox(h, 15, 24, 17, 26, offset);
putLine(h,15,24,15,26, offset);
putLine(h,15,24,17,24, offset);
putLine(h,15,26,17,26, offset)
207 putBox(h, 15, 28, 17, 30, offset);
putLine(h,15,28,15,30, offset);
putLine(h,15,28,17,28, offset);
putLine(h,15,30,17,30, offset)
208 putBox(h, 15, 32, 17, 34, offset);
putLine(h,15,32,15,34, offset);
putLine(h,15,32,17,32, offset);
putLine(h,15,34,17,34, offset)
209 putBox(h, 14, 36, 17, 38, offset);
putLine(h,14,36,14,38, offset);
putLine(h,14,36,17,36, offset);
putLine(h,14,38,15,38, offset)
210 putBox(h, 15, 38, 17, 40, offset);
putLine(h,15,38,15,40, offset);
putLine(h,15,40,17,40, offset)
211 putBox(h, 15, 42, 17, 44, offset);
putLine(h,15,42,15,44, offset);
putLine(h,15,42,17,42, offset);
putLine(h,15,44,17,44, offset)
212 putBox(h, 14, 46, 17, 48, offset);
putLine(h,14,46,14,48, offset);
putLine(h,14,46,17,46, offset);
putLine(h,14,48,15,48, offset)
213 putBox(h, 15, 48, 17, 50, offset);
putLine(h,15,48,15,50, offset);
putLine(h,15,50,17,50, offset)
214 putBox(h, 15, 52, 17, 106, offset)
219 putLine(h,15,106,17,106, offset)
220 putBox(h, 16, 108, 17, 110, offset);
putLine(h,16,108,16,110, offset);
putLine(h,16,108,17,108, offset);
putLine(h,16,110,17,110, offset)
221 putBox(h, 15, 112, 17, 116, offset);
putLine(h,15,112,15,116, offset);
putLine(h,15,112,17,112, offset)
224 putBox(h, 8, 18, 9, 52, 0)
226 putLine(h,15,52,15,106, offset)
231 putBox(h, 0, 0, 4, 32, offset);
putBox(h, 4, 8, 5, 10, offset)
232 putLine(h, 4, 0, 4, 8, offset);
putLine(h, 4, 8, 5, 8, offset);
putLine(h, 5, 8, 5, 10, offset);
putLine(h, 4, 10, 5, 10, offset);
putLine(h, 4, 10, 4, 32, offset)
233 putBox(h, 8, 0, 12, 32, offset);
putBox(h, 7, 8, 8, 10, offset)
234 putLine(h, 8, 0, 8, 8, offset);
putLine(h, 7, 8, 8, 8, offset);
putLine(h, 7, 8, 7, 10, offset);
putLine(h, 7, 10, 8, 10, offset);
putLine(h, 8, 10, 8, 32, offset)
236 putBox(h, 0, 32, 1, 34, offset)
237 putBox(h, 0, 34, 4, 36, offset)
238 putBox(h, 0, 36, 2, 38, offset);
putLine(h, 2, 36, 2, 38, offset)
239 putBox(h, 0, 38, 4, 40, offset)
240 putBox(h, 0, 40, 2, 42, offset)
241 putBox(h, 0, 42, 4, 44, offset)
242 putBox(h, 0, 44, 2, 46, offset);
putLine(h, 2, 44, 2, 46, offset)
243 putBox(h, 0, 46, 4, 48, offset);
putLine(h, 2, 46, 4, 46, offset)
244 putBox(h, 0, 48, 1, 50, offset);
putLine(h, 1, 48, 1, 50, offset)
245 putBox(h, 0, 50, 4, 52, offset)
246 putBox(h, 0, 52, 2, 54, offset)
247 putBox(h, 0, 54, 4, 56, offset)
248 putBox(h, 0, 56, 2, 58, offset)
249 putBox(h, 0, 58, 4, 60, offset)
250 putBox(h, 0, 60, 2, 62, offset)
251 putBox(h, 0, 62, 4, 64, offset)
252 putBox(h, 0, 64, 1, 96, offset);
putLine(h, 1, 64, 1, 96, offset);
putLine(h, 0, 96, 1, 96, offset)
254 putBox(h, -3, 32, 3, 64, 0)
257 putLine(h, 1, 32, 4, 32, offset)
258 putLine(h, 1, 34, 4, 34, offset)
259 putLine(h, 1, 48, 4, 48, offset)
260 putLine(h, 1, 50, 4, 50, offset)
261 putLine(h, 1, 64, 4, 64, offset)
262 putLine(h, 2, 36, 4, 36, offset)
263 putLine(h, 2, 38, 4, 38, offset)
264 putLine(h, 2, 40, 4, 40, offset)
265 putLine(h, 2, 42, 4, 42, offset)
266 putLine(h, 2, 44, 4, 44, offset)
267 putLine(h, 2, 52, 4, 52, offset)
268 putLine(h, 2, 54, 4, 54, offset)
269 putLine(h, 2, 56, 4, 56, offset)
270 putLine(h, 2, 58, 4, 58, offset)
271 putLine(h, 2, 60, 4, 60, offset)
272 putLine(h, 2, 62, 4, 62, offset)
274 putLine(h, 1, 32, 3, 32, offset)
275 putLine(h, 1, 34, 3, 34, offset)
276 putLine(h, 1, 48, 3, 48, offset)
277 putLine(h, 1, 50, 3, 50, offset)
278 putLine(h, 1, 64, 3, 64, offset)
279 putLine(h, 2, 36, 3, 36, offset)
280 putLine(h, 2, 38, 3, 38, offset)
281 putLine(h, 2, 40, 3, 40, offset)
282 putLine(h, 2, 42, 3, 42, offset)
283 putLine(h, 2, 44, 3, 44, offset)
284 putLine(h, 2, 52, 3, 52, offset)
285 putLine(h, 2, 54, 3, 54, offset)
286 putLine(h, 2, 56, 3, 56, offset)
287 putLine(h, 2, 58, 3, 58, offset)
288 putLine(h, 2, 60, 3, 60, offset)
289 putLine(h, 2, 62, 3, 62, offset)
292 putLine(h, 4, 34, 4, 36, offset)
293 putLine(h, 4, 38, 4, 40, offset)
294 putLine(h, 4, 42, 4, 44, offset)
295 putLine(h, 4, 46, 4, 48, offset)
296 putLine(h, 4, 50, 4, 52, offset)
297 putLine(h, 4, 54, 4, 56, offset)
298 putLine(h, 4, 58, 4, 60, offset)
299 putLine(h, 4, 62, 4, 64, offset)
301 putLine(h, 1, 32, 1, 34, offset)
302 putLine(h, 2, 40, 2, 42, offset)
303 putLine(h, 2, 52, 2, 54, offset)
304 putLine(h, 2, 56, 2, 58, offset)
305 putLine(h, 2, 60, 2, 62, offset)
309 putBox(h, 11, 32, 12, 34, offset)
310 putBox(h, 8, 34, 12, 36, offset)
311 putBox(h, 10, 36, 12, 38, offset);
putLine(h, 10, 36, 10, 38, offset)
312 putBox(h, 8, 38, 12, 40, offset)
313 putBox(h, 10, 40, 12, 42, offset);
putLine(h, 10, 40, 10, 42, offset)
314 putBox(h, 8, 42, 12, 44, offset)
315 putBox(h, 10, 44, 12, 46, offset);
putLine(h, 10, 44, 10, 46, offset)
316 putBox(h, 8, 46, 12, 48, offset)
317 putBox(h, 11, 48, 12, 50, offset);
putLine(h, 11, 48, 11, 50, offset)
318 putBox(h, 8, 50, 12, 52, offset)
319 putBox(h, 10, 52, 12, 54, offset);
putLine(h, 10, 52, 10, 54, offset)
320 putBox(h, 8, 54, 12, 56, offset)
321 putBox(h, 10, 56, 12, 58, offset);
putLine(h, 10, 56, 10, 58, offset)
322 putBox(h, 8, 58, 12, 60, offset)
323 putBox(h, 10, 60, 12, 62, offset);
putLine(h, 10, 60, 10, 62, offset)
324 putBox(h, 8, 62, 12, 64, offset)
325 putBox(h, 11, 64, 12, 96, offset);
putLine(h, 11, 64, 11, 96, offset);
putLine(h, 12, 96, 11, 96, offset)
328 putLine(h, 8, 32, 11, 32, offset)
329 putLine(h, 8, 34, 11, 34, offset)
330 putLine(h, 10, 36, 8, 36, offset)
331 putLine(h, 10, 38, 8, 38, offset)
332 putLine(h, 10, 40, 8, 40, offset)
333 putLine(h, 10, 42, 8, 42, offset)
334 putLine(h, 10, 44, 8, 44, offset)
335 putLine(h, 10, 46, 8, 46, offset)
336 putLine(h, 11, 48, 8, 48, offset)
337 putLine(h, 11, 50, 8, 50, offset)
338 putLine(h, 10, 52, 8, 52, offset)
339 putLine(h, 10, 54, 8, 54, offset)
340 putLine(h, 10, 56, 8, 56, offset)
341 putLine(h, 10, 58, 8, 58, offset)
342 putLine(h, 10, 60, 8, 60, offset)
343 putLine(h, 10, 62, 8, 62, offset)
344 putLine(h, 11, 64, 8, 64, offset)
346 putLine(h, 9, 32, 11, 32, offset)
347 putLine(h, 9, 34, 11, 34, offset)
348 putLine(h, 10, 36, 9, 36, offset)
349 putLine(h, 10, 38, 9, 38, offset)
350 putLine(h, 10, 40, 9, 40, offset)
351 putLine(h, 10, 42, 9, 42, offset)
352 putLine(h, 10, 44, 9, 44, offset)
353 putLine(h, 10, 46, 9, 46, offset)
354 putLine(h, 11, 48, 9, 48, offset)
355 putLine(h, 11, 50, 9, 50, offset)
356 putLine(h, 10, 52, 9, 52, offset)
357 putLine(h, 10, 54, 9, 54, offset)
358 putLine(h, 10, 56, 9, 56, offset)
359 putLine(h, 10, 58, 9, 58, offset)
360 putLine(h, 10, 60, 9, 60, offset)
361 putLine(h, 10, 62, 9, 62, offset)
362 putLine(h, 11, 64, 9, 64, offset)
365 putLine(h, 8, 34, 8, 36, offset)
366 putLine(h, 8, 38, 8, 40, offset)
367 putLine(h, 8, 42, 8, 44, offset)
368 putLine(h, 8, 46, 8, 48, offset)
369 putLine(h, 8, 50, 8, 52, offset)
370 putLine(h, 8, 54, 8, 56, offset)
371 putLine(h, 8, 58, 8, 60, offset)
372 putLine(h, 8, 62, 8, 64, offset)
374 putLine(h, 11, 32, 11, 34, offset)
378 box = TBox(x1-offset, y1*0.5, x2-offset, y2*0.5)
379 box.SetFillColor(kGray)
380 box.SetLineColor(kGray)
381 h.GetListOfFunctions().Add(box)
383 def putLine(h, x1, y1, x2, y2, offset=0, c=1):
384 line = TLine(x1-offset, y1*0.5, x2-offset, y2*0.5)
386 h.GetListOfFunctions().Add(line)
464 tubeLength = tubeLenght_dict.get(name03, tubeLength)
465 tubeLength = tubeLenght_dict.get(name04, tubeLength)
466 tubeLength = tubeLenght_dict.get(name03+name56, tubeLength)
467 tubeLength = tubeLenght_dict.get(name04+name56, tubeLength)
473 statphi_s = name[5:7]
476 if(name[0:3]==
"BME"):
480 statphi_c = statphi_s+
" 1"
481 statphi_c2 = statphi_s+
" 2"
482 if(name[0:3]==
"BIR" or name[0:3]==
"BIM") :
483 statphi_c = statphi_c +
" "+name[2:3]
484 statphi_c2 = statphi_c2 +
" "+name[2:3]
487 if(name[0:3] ==
"BML" and int(name[3:4])>=4
and name[5:7] ==
"13"):
488 eta_s =
str(
int(name[3:4])+1)
491 if( name[0:3] ==
"BMF"):
492 eta_s=
str(
int(name[3:4])*2-1)
494 stateta_c = name[0:2]
495 stateta_c += name[4:5]
498 stateta_IMO_c = name[0:1]
499 stateta_IMO_c += name[4:5]
500 stateta_IMO_c += eta_s
502 statphi_IMO_c = name[1:2]+
" "+statphi_s
503 if((name[0:3]==
"BIR" or name[0:3]==
"BIM")
and (name[5:7] ==
"11" or name[5:7] ==
"15" )):
504 statphi_IMO_c = statphi_IMO_c+
" "+name[2:3]
506 return (stateta_IMO_c, statphi_IMO_c, stateta_c, statphi_c, statphi_c2)
510 nBinsNum = hi_num.GetNbinsX()
512 if(name[0:4]==
"BIS8" or name[0:2]==
"BE"):
514 if(nBinsNum!=hi_den.GetNbinsX()):
520 for ibin
in range(nBinsNum):
521 entries = hi_den.GetBinContent(ibin)
522 counts = hi_num.GetBinContent(ibin)
523 if(ibin<BinsML1
or BinsML1==nBinsNum) :
530 return (countsML1, countsML2, entriesML1, entriesML2)
534 fitvaltzero = par[0] + ( par[3] / ( 1 + ( TMath.Exp((-x[0]+par[1])/par[2]) ) ) )
537 tf1_fittzero = TF1(
"func1", fittzero, 0., 200., 4)
541 fitvaltmax = par[0] + ( par[3] / ( 1 + ( TMath.Exp((x[0]-par[1])/par[2]) ) ) )
544 tf1_fittmax = TF1(
"func2", fittmax, 0., 200., 4)
551 up = h.GetBinCenter(h.GetMaximumBin()+1)
557 parESD0 = h.GetBinContent(h.GetMinimumBin())
560 parESD3 = h.GetBinContent(h.GetMaximumBin()) - h.GetBinContent(h.GetMinimumBin())
562 func1.SetRange(0., up)
563 func1.SetParameters(parESD0, parESD1, parESD2, parESD3)
564 func1.SetLineColor(kBlue+2)
565 if(h.GetEntries()>100):
567 t0 = func1.GetParameter(1)
568 t0err = func1.GetParError(1)
569 binAtT0 = h.GetBinContent(h.FindBin(t0))
573 if(func1.GetNumberFitPoints()!=0):
574 t0err += 10.0 * func1.GetChisquare() / (0.01*binAtT0*binAtT0*func1.GetNumberFitPoints())
576 parESD0 = h.GetBinContent(h.GetMinimumBin())
579 parESD3 = (h.GetBinContent(h.GetMaximumBin())-h.GetBinContent(h.GetMinimumBin()))/10.
581 func2.SetRange((down-135), (down+135))
582 func2.SetParameters(parESD0,parESD1,parESD2,parESD3)
583 func2.SetLineColor(kRed+1)
584 if(h.GetEntries()>100):
585 func2.SetParLimits(0, parESD0, 2.0*parESD0+1)
586 func2.SetParLimits(2, 5, 90)
587 func2.SetParLimits(3, 0.2*parESD3, 7*parESD3)
588 h.Fit(
"func2",
"WWRQN+")
589 tmax = func2.GetParameter(1)
590 tmaxerr = func2.GetParError(1)
591 binAtTmax = h.GetBinContent(h.FindBin(tmax))
595 if func2.GetNumberFitPoints() > 0:
596 tmaxerr += 10.0 * func2.GetChisquare() / (0.01*binAtTmax*binAtTmax*func2.GetNumberFitPoints())
598 return [t0, t0err, tmax, tmaxerr]