1 | { |
---|
2 | TString filename = ""; |
---|
3 | TString type[2] = {"Signal","ttbar"}; |
---|
4 | TFile *file[2]; |
---|
5 | TTree *t[2]; |
---|
6 | double WeiSig = 0.685*1.43*1000/74873; |
---|
7 | double WeiTBkg = 0.5558*164.6*1000/199869; |
---|
8 | double Wei[2] = {WeiSig,WeiTBkg}; |
---|
9 | |
---|
10 | for (int i = 0; i < 2; i++){ |
---|
11 | filename = "res_medium2ndEl_NewMinLep1_"; filename += type[i]; filename += ".root"; |
---|
12 | file[i] = TFile::Open(filename); |
---|
13 | t[i] = (TTree*)file[i]->Get("T"); |
---|
14 | //t[i]->SetWeight(Wei[i],"global"); |
---|
15 | } |
---|
16 | |
---|
17 | int itot[2], |
---|
18 | i1[2], |
---|
19 | i2[2], |
---|
20 | i4[2], |
---|
21 | i35[2], |
---|
22 | i46[2]; |
---|
23 | int itotNice[2], |
---|
24 | i1Nice[2], |
---|
25 | i2Nice[2], |
---|
26 | i4Nice[2], |
---|
27 | i35Nice[2], |
---|
28 | i46Nice[2]; |
---|
29 | int itotNotNice[2], |
---|
30 | i1NotNice[2], |
---|
31 | i2NotNice[2], |
---|
32 | i4NotNice[2], |
---|
33 | i35NotNice[2], |
---|
34 | i46NotNice[2]; |
---|
35 | |
---|
36 | int itotP[2], |
---|
37 | i1P[2], |
---|
38 | i2P[2], |
---|
39 | i4P[2], |
---|
40 | i35P[2], |
---|
41 | i46P[2]; |
---|
42 | int itotNiceP[2], |
---|
43 | i1NiceP[2], |
---|
44 | i2NiceP[2], |
---|
45 | i4NiceP[2], |
---|
46 | i35NiceP[2], |
---|
47 | i46NiceP[2]; |
---|
48 | int itotNotNiceP[2], |
---|
49 | i1NotNiceP[2], |
---|
50 | i2NotNiceP[2], |
---|
51 | i4NotNiceP[2], |
---|
52 | i35NotNiceP[2], |
---|
53 | i46NotNiceP[2]; |
---|
54 | |
---|
55 | int itotG[2], |
---|
56 | i1G[2], |
---|
57 | i2G[2], |
---|
58 | i4G[2], |
---|
59 | i35G[2], |
---|
60 | i46G[2]; |
---|
61 | int itotNiceG[2], |
---|
62 | i1NiceG[2], |
---|
63 | i2NiceG[2], |
---|
64 | i4NiceG[2], |
---|
65 | i35NiceG[2], |
---|
66 | i46NiceG[2]; |
---|
67 | int itotNotNiceG[2], |
---|
68 | i1NotNiceG[2], |
---|
69 | i2NotNiceG[2], |
---|
70 | i4NotNiceG[2], |
---|
71 | i35NotNiceG[2], |
---|
72 | i46NotNiceG[2]; |
---|
73 | |
---|
74 | for (int i = 0; i < 2; i++){ |
---|
75 | itot[i] = 0; |
---|
76 | i1[i] = 0; |
---|
77 | i2[i] = 0; |
---|
78 | i4[i] = 0; |
---|
79 | i35[i] = 0; |
---|
80 | i46[i] = 0; |
---|
81 | |
---|
82 | itotNice[i] = 0; |
---|
83 | i1Nice[i] = 0; |
---|
84 | i2Nice[i] = 0; |
---|
85 | i4Nice[i] = 0; |
---|
86 | i35Nice[i] = 0; |
---|
87 | i46Nice[i] = 0; |
---|
88 | |
---|
89 | itotNotNice[i] = 0; |
---|
90 | i1NotNice[i] = 0; |
---|
91 | i2NotNice[i] = 0; |
---|
92 | i4NotNice[i] = 0; |
---|
93 | i35NotNice[i] = 0; |
---|
94 | i46NotNice[i] = 0; |
---|
95 | |
---|
96 | itotP[i] = 0; |
---|
97 | i1P[i] = 0; |
---|
98 | i2P[i] = 0; |
---|
99 | i4P[i] = 0; |
---|
100 | i35P[i] = 0; |
---|
101 | i46P[i] = 0; |
---|
102 | |
---|
103 | itotNiceP[i] = 0; |
---|
104 | i1NiceP[i] = 0; |
---|
105 | i2NiceP[i] = 0; |
---|
106 | i4NiceP[i] = 0; |
---|
107 | i35NiceP[i] = 0; |
---|
108 | i46NiceP[i] = 0; |
---|
109 | |
---|
110 | itotNotNiceP[i] = 0; |
---|
111 | i1NotNiceP[i] = 0; |
---|
112 | i2NotNiceP[i] = 0; |
---|
113 | i4NotNiceP[i] = 0; |
---|
114 | i35NotNiceP[i] = 0; |
---|
115 | i46NotNiceP[i] = 0; |
---|
116 | |
---|
117 | itotG[i] = 0; |
---|
118 | i1G[i] = 0; |
---|
119 | i2G[i] = 0; |
---|
120 | i4G[i] = 0; |
---|
121 | i35G[i] = 0; |
---|
122 | i46G[i] = 0; |
---|
123 | |
---|
124 | itotNiceG[i] = 0; |
---|
125 | i1NiceG[i] = 0; |
---|
126 | i2NiceG[i] = 0; |
---|
127 | i4NiceG[i] = 0; |
---|
128 | i35NiceG[i] = 0; |
---|
129 | i46NiceG[i] = 0; |
---|
130 | |
---|
131 | itotNotNiceG[i] = 0; |
---|
132 | i1NotNiceG[i] = 0; |
---|
133 | i2NotNiceG[i] = 0; |
---|
134 | i4NotNiceG[i] = 0; |
---|
135 | i35NotNiceG[i] = 0; |
---|
136 | i46NotNiceG[i] = 0; |
---|
137 | } |
---|
138 | |
---|
139 | for (int i = 0; i < 2; i++){ |
---|
140 | int icount = 1; |
---|
141 | int nevt = t[i]->GetEntries(); |
---|
142 | for (int iev = 0; iev < nevt; iev++) { |
---|
143 | t[i]->GetEntry(iev); |
---|
144 | |
---|
145 | double mt = t[i]->GetLeaf("mtophad")->GetValue(); |
---|
146 | double HT = t[i]->GetLeaf("HT")->GetValue(); |
---|
147 | double x = t[i]->GetLeaf("cos_tlepCMtpair")->GetValue(); |
---|
148 | double y = t[i]->GetLeaf("cosWqq")->GetValue(); |
---|
149 | double pTt = t[i]->GetLeaf("pTtophad")->GetValue(); |
---|
150 | double pTtt = t[i]->GetLeaf("pTttbar")->GetValue(); |
---|
151 | double nlj = t[i]->GetLeaf("LeadingJetsInChi2")->GetValue(); |
---|
152 | double MinLep1 = t[i]->GetLeaf("MinLep1")->GetValue(); |
---|
153 | |
---|
154 | double cos1 = fabs(x); |
---|
155 | double cos2 = fabs(y); |
---|
156 | |
---|
157 | if (mt > 300 && HT > 600){ |
---|
158 | icount++; |
---|
159 | itot[i]++; |
---|
160 | if (nlj==4) |
---|
161 | itotNice[i]++; |
---|
162 | else itotNotNice[i]++; |
---|
163 | |
---|
164 | if (cos1 < 0.6 && cos2 < 0.6 && HT < 800){ |
---|
165 | i1[i]++; |
---|
166 | if (nlj==4){ |
---|
167 | i1Nice[i]++; |
---|
168 | } |
---|
169 | else { |
---|
170 | i1NotNice[i]++; |
---|
171 | } |
---|
172 | } |
---|
173 | |
---|
174 | if (cos1 > 0.6 && cos2 > 0.6 && HT < 800){ |
---|
175 | i2[i]++; |
---|
176 | |
---|
177 | if (nlj==4){ |
---|
178 | i2Nice[i]++; |
---|
179 | }else { |
---|
180 | i2NotNice[i]++; |
---|
181 | } |
---|
182 | } |
---|
183 | |
---|
184 | if ((cos1 < 0.6 && cos2 > 0.6 && HT < 800) || (cos1 > 0.6 && cos2 < 0.6 && HT < 800)){ |
---|
185 | i35[i]++; |
---|
186 | if (nlj==4){ |
---|
187 | i35Nice[i]++; |
---|
188 | } else { |
---|
189 | i35NotNice[i]++; |
---|
190 | } |
---|
191 | } |
---|
192 | |
---|
193 | if (cos1 < 0.6 && cos2 < 0.6 && HT > 800){ |
---|
194 | i46[i]++; |
---|
195 | i4[i]++; |
---|
196 | if (nlj==4){ |
---|
197 | i4Nice[i]++; |
---|
198 | i46Nice[i]++; |
---|
199 | } else { |
---|
200 | i4NotNice[i]++; |
---|
201 | i46NotNice[i]++; |
---|
202 | } |
---|
203 | } |
---|
204 | |
---|
205 | if (cos1 > 0.6 && cos2 > 0.6 && HT > 800){ |
---|
206 | i35[i]++; |
---|
207 | if (nlj==4){ |
---|
208 | i35Nice[i]++; |
---|
209 | } else { |
---|
210 | i35NotNice[i]++; |
---|
211 | } |
---|
212 | } |
---|
213 | |
---|
214 | if ((cos1 < 0.6 && cos2 > 0.6 && HT > 800) || (cos1 > 0.6 && cos2 < 0.6 && HT > 800)){ |
---|
215 | i46[i]++; |
---|
216 | if (nlj==4){ |
---|
217 | i46Nice[i]++; |
---|
218 | } else { |
---|
219 | i46NotNice[i]++; |
---|
220 | } |
---|
221 | } |
---|
222 | } |
---|
223 | |
---|
224 | //For cat cos + cat MinLep < 50 |
---|
225 | if (mt > 300 && HT > 600 && MinLep1<50){ |
---|
226 | itotP[i]++; |
---|
227 | if (nlj==4) itotNiceP[i]++; |
---|
228 | else itotNotNiceP[i]++; |
---|
229 | |
---|
230 | if (cos1 < 0.6 && cos2 < 0.6 && HT < 800){ |
---|
231 | i1P[i]++; |
---|
232 | if (nlj==4) i1NiceP[i]++; |
---|
233 | else i1NotNiceP[i]++; |
---|
234 | } |
---|
235 | |
---|
236 | if (cos1 > 0.6 && cos2 > 0.6 && HT < 800){ |
---|
237 | i2P[i]++; |
---|
238 | if (nlj==4) i2NiceP[i]++; |
---|
239 | else i2NotNiceP[i]++; |
---|
240 | } |
---|
241 | |
---|
242 | if ((cos1 < 0.6 && cos2 > 0.6 && HT < 800) || (cos1 > 0.6 && cos2 < 0.6 && HT < 800)){ |
---|
243 | i35P[i]++; |
---|
244 | if (nlj==4) i35NiceP[i]++; |
---|
245 | else i35NotNiceP[i]++; |
---|
246 | } |
---|
247 | |
---|
248 | if (cos1 < 0.6 && cos2 < 0.6 && HT > 800){ |
---|
249 | i46P[i]++; |
---|
250 | i4P[i]++; |
---|
251 | if (nlj==4){ |
---|
252 | i4NiceP[i]++; |
---|
253 | i46NiceP[i]++; |
---|
254 | } else { |
---|
255 | i4NotNiceP[i]++; |
---|
256 | i46NotNiceP[i]++; |
---|
257 | } |
---|
258 | } |
---|
259 | |
---|
260 | if (cos1 > 0.6 && cos2 > 0.6 && HT > 800){ |
---|
261 | i35P[i]++; |
---|
262 | if (nlj==4) i35NiceP[i]++; |
---|
263 | else i35NotNiceP[i]++; |
---|
264 | } |
---|
265 | |
---|
266 | if ((cos1 < 0.6 && cos2 > 0.6 && HT > 800) || (cos1 > 0.6 && cos2 < 0.6 && HT > 800)){ |
---|
267 | i46P[i]++; |
---|
268 | if (nlj==4) i46NiceP[i]++; |
---|
269 | else i46NotNiceP[i]++; |
---|
270 | } |
---|
271 | } |
---|
272 | |
---|
273 | //For cat cos + cat MinLep > 50 |
---|
274 | if (mt > 300 && HT > 600 && MinLep1>50){ |
---|
275 | itotG[i]++; |
---|
276 | if (nlj==4) itotNiceG[i]++; |
---|
277 | else itotNotNiceG[i]++; |
---|
278 | |
---|
279 | if (cos1 < 0.6 && cos2 < 0.6 && HT < 800){ |
---|
280 | i1G[i]++; |
---|
281 | if (nlj==4) i1NiceG[i]++; |
---|
282 | else i1NotNiceG[i]++; |
---|
283 | } |
---|
284 | |
---|
285 | if (cos1 > 0.6 && cos2 > 0.6 && HT < 800){ |
---|
286 | i2G[i]++; |
---|
287 | if (nlj==4) i2NiceG[i]++; |
---|
288 | else i2NotNiceG[i]++; |
---|
289 | } |
---|
290 | |
---|
291 | if ((cos1 < 0.6 && cos2 > 0.6 && HT < 800) || (cos1 > 0.6 && cos2 < 0.6 && HT < 800)){ |
---|
292 | i35G[i]++; |
---|
293 | if (nlj==4) i35NiceG[i]++; |
---|
294 | else i35NotNiceG[i]++; |
---|
295 | } |
---|
296 | |
---|
297 | if (cos1 < 0.6 && cos2 < 0.6 && HT > 800){ |
---|
298 | i4G[i]++; |
---|
299 | i46G[i]++; |
---|
300 | if (nlj==4) { |
---|
301 | i4NiceG[i]++; |
---|
302 | i46NiceG[i]++; |
---|
303 | } else { |
---|
304 | i4NotNiceG[i]++; |
---|
305 | i46NotNiceG[i]++; |
---|
306 | } |
---|
307 | } |
---|
308 | |
---|
309 | if (cos1 > 0.6 && cos2 > 0.6 && HT > 800){ |
---|
310 | i35G[i]++; |
---|
311 | if (nlj==4) i35NiceG[i]++; |
---|
312 | else i35NotNiceG[i]++; |
---|
313 | } |
---|
314 | |
---|
315 | if ((cos1 < 0.6 && cos2 > 0.6 && HT > 800) || (cos1 > 0.6 && cos2 < 0.6 && HT > 800)){ |
---|
316 | i46G[i]++; |
---|
317 | if (nlj==4) i46NiceG[i]++; |
---|
318 | else i46NotNiceG[i]++; |
---|
319 | } |
---|
320 | } |
---|
321 | } |
---|
322 | } |
---|
323 | |
---|
324 | FILE *fRes; |
---|
325 | fRes = fopen("ResReadTreeAna.txt","w+"); |
---|
326 | |
---|
327 | fprintf(fRes,"\n"); |
---|
328 | fprintf(fRes,"%10s %10s %10s %10s %10s\n","Cat","Signal","ttbar","",""); |
---|
329 | fprintf(fRes,"%10s %10s %10s %10s %10s\n"," ","Nevts" ," ","Eff(%)"," "); |
---|
330 | fprintf(fRes,"%10s %10i %10i %10i %10i\n","Total",itot[0],itot[1],100,100); |
---|
331 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",1,i1[0],i1[1],(double)i1[0]*100/itot[0],(double)i1[1]*100/itot[1]); |
---|
332 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",2,i2[0],i2[1],(double)i2[0]*100/itot[0],(double)i2[1]*100/itot[1]); |
---|
333 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",35,i35[0],i35[1],(double)i35[0]*100/itot[0],(double)i35[1]*100/itot[1]); |
---|
334 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",4,i4[0],i4[1],(double)i4[0]*100/itot[0],(double)i4[1]*100/itot[1]); |
---|
335 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",46,i46[0],i46[1],(double)i46[0]*100/itot[0],(double)i46[1]*100/itot[1]); |
---|
336 | |
---|
337 | //For cat cos + MinLep1 < 50 |
---|
338 | fprintf(fRes,"\n"); |
---|
339 | fprintf(fRes,"%10s\n","MinLep1<50"); |
---|
340 | fprintf(fRes,"%10s %10i %10i %10.2f %10.2f\n","Total",itotP[0],itotP[1],(double)itotP[0]*100/itot[0],(double)itotP[1]*100/itot[1]); |
---|
341 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",1,i1P[0],i1P[1],(double)i1P[0]*100/itot[0],(double)i1P[1]*100/itot[1]); |
---|
342 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",2,i2P[0],i2P[1],(double)i2P[0]*100/itot[0],(double)i2P[1]*100/itot[1]); |
---|
343 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",35,i35P[0],i35P[1],(double)i35P[0]*100/itot[0],(double)i35P[1]*100/itot[1]); |
---|
344 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",4,i4P[0],i4P[1],(double)i4P[0]*100/itot[0],(double)i4P[1]*100/itot[1]); |
---|
345 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",46,i46P[0],i46P[1],(double)i46P[0]*100/itot[0],(double)i46P[1]*100/itot[1]); |
---|
346 | |
---|
347 | //For cat cos + MinLep1 > 50 |
---|
348 | fprintf(fRes,"\n"); |
---|
349 | fprintf(fRes,"%10s\n","MinLep1>50"); |
---|
350 | fprintf(fRes,"%10s %10i %10i %10.2f %10.2f\n","Total",itotG[0],itotG[1],(double)itotG[0]*100/itot[0],(double)itotG[1]*100/itot[1]); |
---|
351 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",1,i1G[0],i1G[1],(double)i1G[0]*100/itot[0],(double)i1G[1]*100/itot[1]); |
---|
352 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",2,i2G[0],i2G[1],(double)i2G[0]*100/itot[0],(double)i2G[1]*100/itot[1]); |
---|
353 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",35,i35G[0],i35G[1],(double)i35G[0]*100/itot[0],(double)i35G[1]*100/itot[1]); |
---|
354 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",4,i4G[0],i4G[1],(double)i4G[0]*100/itot[0],(double)i4G[1]*100/itot[1]); |
---|
355 | fprintf(fRes,"%10i %10i %10i %10.2f %10.2f\n",46,i46G[0],i46G[1],(double)i46G[0]*100/itot[0],(double)i46G[1]*100/itot[1]); |
---|
356 | fprintf(fRes,"\n"); |
---|
357 | fprintf(fRes,"\n"); |
---|
358 | |
---|
359 | double nExTot[2]; double nExTotP[2]; double nExTotG[2]; |
---|
360 | double nExTotNice[2]; double nExTotNiceP[2]; double nExTotNiceG[2]; |
---|
361 | double nExTotNotNice[2]; double nExTotNotNiceP[2]; double nExTotNotNiceG[2]; |
---|
362 | |
---|
363 | double nExCat1[2] ; double nExCat1P[2] ; double nExCat1G[2] ; |
---|
364 | double nExCat2[2] ; double nExCat2P[2] ; double nExCat2G[2] ; |
---|
365 | double nExCat4[2] ; double nExCat4P[2] ; double nExCat4G[2] ; |
---|
366 | double nExCat35[2]; double nExCat35P[2]; double nExCat35G[2]; |
---|
367 | double nExCat46[2]; double nExCat46P[2]; double nExCat46G[2]; |
---|
368 | |
---|
369 | double nExCat1Nice[2] ; double nExCat1NiceP[2] ; double nExCat1NiceG[2] ; |
---|
370 | double nExCat2Nice[2] ; double nExCat2NiceP[2] ; double nExCat2NiceG[2] ; |
---|
371 | double nExCat4Nice[2] ; double nExCat4NiceP[2] ; double nExCat4NiceG[2] ; |
---|
372 | double nExCat35Nice[2]; double nExCat35NiceP[2]; double nExCat35NiceG[2]; |
---|
373 | double nExCat46Nice[2]; double nExCat46NiceP[2]; double nExCat46NiceG[2]; |
---|
374 | |
---|
375 | double nExCat1NotNice[2] ; double nExCat1NotNiceP[2] ; double nExCat1NotNiceG[2] ; |
---|
376 | double nExCat2NotNice[2] ; double nExCat2NotNiceP[2] ; double nExCat2NotNiceG[2] ; |
---|
377 | double nExCat4NotNice[2] ; double nExCat4NotNiceP[2] ; double nExCat4NotNiceG[2] ; |
---|
378 | double nExCat35NotNice[2] ; double nExCat35NotNiceP[2] ; double nExCat35NotNiceG[2] ; |
---|
379 | double nExCat46NotNice[2] ; double nExCat46NotNiceP[2] ; double nExCat46NotNiceG[2] ; |
---|
380 | |
---|
381 | for (int i = 0; i < 2; i++){ |
---|
382 | //All Cats for MinLep1 |
---|
383 | nExTot[i] = Wei[i]*itot[i]; |
---|
384 | nExTotNice[i] = Wei[i]*itotNice[i]; |
---|
385 | nExTotNotNice[i] = Wei[i]*itotNotNice[i]; |
---|
386 | |
---|
387 | nExCat1[i] = Wei[i]*i1[i]; |
---|
388 | nExCat2[i] = Wei[i]*i2[i]; |
---|
389 | nExCat4[i] = Wei[i]*i4[i]; |
---|
390 | nExCat35[i] = Wei[i]*i35[i]; |
---|
391 | nExCat46[i] = Wei[i]*i46[i]; |
---|
392 | |
---|
393 | nExCat1Nice[i] = Wei[i]*i1Nice[i]; |
---|
394 | nExCat2Nice[i] = Wei[i]*i2Nice[i]; |
---|
395 | nExCat4Nice[i] = Wei[i]*i4Nice[i]; |
---|
396 | nExCat35Nice[i] = Wei[i]*i35Nice[i]; |
---|
397 | nExCat46Nice[i] = Wei[i]*i46Nice[i]; |
---|
398 | |
---|
399 | nExCat1NotNice[i] = Wei[i]*i1NotNice[i]; |
---|
400 | nExCat2NotNice[i] = Wei[i]*i2NotNice[i]; |
---|
401 | nExCat4NotNice[i] = Wei[i]*i4NotNice[i]; |
---|
402 | nExCat35NotNice[i] = Wei[i]*i35NotNice[i]; |
---|
403 | nExCat46NotNice[i] = Wei[i]*i46NotNice[i]; |
---|
404 | |
---|
405 | //Cats for MinLep<50 |
---|
406 | nExTotP[i] = Wei[i]*itotP[i]; |
---|
407 | nExTotNiceP[i] = Wei[i]*itotNiceP[i]; |
---|
408 | nExTotNotNiceP[i] = Wei[i]*itotNotNiceP[i]; |
---|
409 | |
---|
410 | nExCat1P[i] = Wei[i]*i1P[i]; |
---|
411 | nExCat2P[i] = Wei[i]*i2P[i]; |
---|
412 | nExCat4P[i] = Wei[i]*i4P[i]; |
---|
413 | nExCat35P[i] = Wei[i]*i35P[i]; |
---|
414 | nExCat46P[i] = Wei[i]*i46P[i]; |
---|
415 | |
---|
416 | nExCat1NiceP[i] = Wei[i]*i1NiceP[i]; |
---|
417 | nExCat2NiceP[i] = Wei[i]*i2NiceP[i]; |
---|
418 | nExCat4NiceP[i] = Wei[i]*i4NiceP[i]; |
---|
419 | nExCat35NiceP[i] = Wei[i]*i35NiceP[i]; |
---|
420 | nExCat46NiceP[i] = Wei[i]*i46NiceP[i]; |
---|
421 | |
---|
422 | nExCat1NotNiceP[i] = Wei[i]*i1NotNiceP[i]; |
---|
423 | nExCat2NotNiceP[i] = Wei[i]*i2NotNiceP[i]; |
---|
424 | nExCat4NotNiceP[i] = Wei[i]*i4NotNiceP[i]; |
---|
425 | nExCat35NotNiceP[i] = Wei[i]*i35NotNiceP[i]; |
---|
426 | nExCat46NotNiceP[i] = Wei[i]*i46NotNiceP[i]; |
---|
427 | |
---|
428 | //Cats for MinLep<50 |
---|
429 | nExTotG[i] = Wei[i]*itotG[i]; |
---|
430 | nExTotNiceG[i] = Wei[i]*itotNiceG[i]; |
---|
431 | nExTotNotNiceG[i] = Wei[i]*itotNotNiceG[i]; |
---|
432 | |
---|
433 | nExCat1G[i] = Wei[i]*i1G[i]; |
---|
434 | nExCat2G[i] = Wei[i]*i2G[i]; |
---|
435 | nExCat4G[i] = Wei[i]*i4G[i]; |
---|
436 | nExCat35G[i] = Wei[i]*i35G[i]; |
---|
437 | nExCat46G[i] = Wei[i]*i46G[i]; |
---|
438 | |
---|
439 | nExCat1NiceG[i] = Wei[i]*i1NiceG[i]; |
---|
440 | nExCat2NiceG[i] = Wei[i]*i2NiceG[i]; |
---|
441 | nExCat4NiceG[i] = Wei[i]*i4NiceG[i]; |
---|
442 | nExCat35NiceG[i] = Wei[i]*i35NiceG[i]; |
---|
443 | nExCat46NiceG[i] = Wei[i]*i46NiceG[i]; |
---|
444 | |
---|
445 | nExCat1NotNiceG[i] = Wei[i]*i1NotNiceG[i]; |
---|
446 | nExCat2NotNiceG[i] = Wei[i]*i2NotNiceG[i]; |
---|
447 | nExCat4NotNiceG[i] = Wei[i]*i4NotNiceG[i]; |
---|
448 | nExCat35NotNiceG[i] = Wei[i]*i35NotNiceG[i]; |
---|
449 | nExCat46NotNiceG[i] = Wei[i]*i46NotNiceG[i]; |
---|
450 | } |
---|
451 | |
---|
452 | fprintf(fRes,"%10s %10s %10s\n\n","","Number of events m>300 && HT>600 expected for 1fb-1",""); |
---|
453 | |
---|
454 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","Total",nExTot[0],nExTot[1]); |
---|
455 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1[0],nExCat1[1]); |
---|
456 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2[0],nExCat2[1]); |
---|
457 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4[0],nExCat4[1]); |
---|
458 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35[0],nExCat35[1]); |
---|
459 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46[0],nExCat46[1]); |
---|
460 | |
---|
461 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","Nice",nExTotNice[0],nExTotNice[1]); |
---|
462 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1Nice[0],nExCat1Nice[1]); |
---|
463 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2Nice[0],nExCat2Nice[1]); |
---|
464 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4Nice[0],nExCat4Nice[1]); |
---|
465 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35Nice[0],nExCat35Nice[1]); |
---|
466 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46Nice[0],nExCat46Nice[1]); |
---|
467 | |
---|
468 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","NotNice",nExTotNotNice[0],nExTotNotNice[1]); |
---|
469 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1NotNice[0],nExCat1NotNice[1]); |
---|
470 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2NotNice[0],nExCat2NotNice[1]); |
---|
471 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4NotNice[0],nExCat4NotNice[1]); |
---|
472 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35NotNice[0],nExCat35NotNice[1]); |
---|
473 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46NotNice[0],nExCat46NotNice[1]); |
---|
474 | |
---|
475 | //For MinLep<50 |
---|
476 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","MinLep<50",nExTotP[0],nExTotP[1]); |
---|
477 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1P[0],nExCat1P[1]); |
---|
478 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2P[0],nExCat2P[1]); |
---|
479 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4P[0],nExCat4P[1]); |
---|
480 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35P[0],nExCat35P[1]); |
---|
481 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46P[0],nExCat46P[1]); |
---|
482 | |
---|
483 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","Nice",nExTotNiceP[0],nExTotNiceP[1]); |
---|
484 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1NiceP[0],nExCat1NiceP[1]); |
---|
485 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2NiceP[0],nExCat2NiceP[1]); |
---|
486 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4NiceP[0],nExCat4NiceP[1]); |
---|
487 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35NiceP[0],nExCat35NiceP[1]); |
---|
488 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46NiceP[0],nExCat46NiceP[1]); |
---|
489 | |
---|
490 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","NotNice",nExTotNotNiceP[0],nExTotNotNiceP[1]); |
---|
491 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1NotNiceP[0],nExCat1NotNiceP[1]); |
---|
492 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2NotNiceP[0],nExCat2NotNiceP[1]); |
---|
493 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4NotNiceP[0],nExCat4NotNiceP[1]); |
---|
494 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35NotNiceP[0],nExCat35NotNiceP[1]); |
---|
495 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46NotNiceP[0],nExCat46NotNiceP[1]); |
---|
496 | |
---|
497 | //For MinLep>50 |
---|
498 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","MinLep>50",nExTotG[0],nExTotG[1]); |
---|
499 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1G[0],nExCat1G[1]); |
---|
500 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2G[0],nExCat2G[1]); |
---|
501 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4G[0],nExCat4G[1]); |
---|
502 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35G[0],nExCat35G[1]); |
---|
503 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46G[0],nExCat46G[1]); |
---|
504 | |
---|
505 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","Nice",nExTotNiceG[0],nExTotNiceG[1]); |
---|
506 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1NiceG[0],nExCat1NiceG[1]); |
---|
507 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2NiceG[0],nExCat2NiceG[1]); |
---|
508 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4NiceG[0],nExCat4NiceG[1]); |
---|
509 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35NiceG[0],nExCat35NiceG[1]); |
---|
510 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46NiceG[0],nExCat46NiceG[1]); |
---|
511 | |
---|
512 | fprintf(fRes,"%10s %10.1f %10.1f\n\n","NotNice",nExTotNotNiceG[0],nExTotNotNiceG[1]); |
---|
513 | fprintf(fRes,"%10i %10.1f %10.1f\n",1,nExCat1NotNiceG[0],nExCat1NotNiceG[1]); |
---|
514 | fprintf(fRes,"%10i %10.1f %10.1f\n",2,nExCat2NotNiceG[0],nExCat2NotNiceG[1]); |
---|
515 | fprintf(fRes,"%10i %10.1f %10.1f\n",4,nExCat4NotNiceG[0],nExCat4NotNiceG[1]); |
---|
516 | fprintf(fRes,"%10i %10.1f %10.1f\n",35,nExCat35NotNiceG[0],nExCat35NotNiceG[1]); |
---|
517 | fprintf(fRes,"%10i %10.1f %10.1f\n\n",46,nExCat46NotNiceG[0],nExCat46NotNiceG[1]); |
---|
518 | |
---|
519 | fclose(fRes); |
---|
520 | |
---|
521 | } |
---|