-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRAA_fakecheck.C
More file actions
622 lines (523 loc) · 33 KB
/
Copy pathRAA_fakecheck.C
File metadata and controls
622 lines (523 loc) · 33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
// Raghav Kunnawalkam Elayavalli
// June 18th 2014
// CERN
//
// Macro to look specifically at the fake or supernova jets in the Jet55or65 PbPb data forest.
//
// This macro will look at specific jet quality cuts (or if possible track cuts) aimed at understanding where these crazy jets come from and help to remove them.
// list of cuts:
// 1) chargedMax / jtpt > 0.01
// 2) TMath::Max(charged Max, neutral Max) / TMath::Max(charged Sum, neutral Sum) < 0.975 - from 12003 and 14007
// 3) jtpt/trgObj_pt < 2. this should also remove all weird jets with much greater pt than the triggered object.
// Modify the script to run on condor! for each file. otherwise it takes forever to run on all those files in TChain.
// - Done
// better question: should i include the duplicate event calculation here? since it requires the loop structure.
// naa i'll add it in a separate include.
// June 27 - list of cuts from the HIN-14-001 and HIN-14-007 analysis
// QA1 - chargedMax/jtpt > 0.05
// QA2 - chargedMax > 4
// QA3 - (chargedSum+photonSum+neutralSum+muSum+eSum)/jtpt > 1.01
// QA4 - chargeMax/chargeSum < 0.975
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <TH1F.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TFile.h>
#include <TTree.h>
#include <TF1.h>
#include <TCanvas.h>
#include <TLegend.h>
#include <TGraphErrors.h>
#include <TGraphAsymmErrors.h>
#include <TH1.h>
#include <TH2.h>
#include <TH3.h>
#include <TFile.h>
#include <TStyle.h>
#include <TStopwatch.h>
#include <TRandom3.h>
#include <TChain.h>
#include <TProfile.h>
#include <TStopwatch.h>
#include <TCut.h>
#include <cstdlib>
#include <cmath>
#include "TLegend.h"
#include "TLatex.h"
#include "TMath.h"
#include "TLine.h"
using namespace std;
static const int nbins_pt = 29;
static const double boundaries_pt[nbins_pt+1] = {22, 27, 33, 39, 47, 55, 64, 74, 84, 97, 114, 133, 153, 174, 196, 220, 245, 272, 300, 330, 362, 395, 430, 468, 507, 548, 592, 638, 790, 967};
//static const double boundaries_run_job[job_no+1] = {};
// divide by bin width
void divideBinWidth(TH1 *h)
{
h->Sumw2();
for (int i=0;i<=h->GetNbinsX();i++)
{
Float_t val = h->GetBinContent(i);
Float_t valErr = h->GetBinError(i);
if(val!=0){
val/=h->GetBinWidth(i);
valErr/=h->GetBinWidth(i);
h->SetBinContent(i,val);
h->SetBinError(i,valErr);
}
}
h->GetXaxis()->CenterTitle();
h->GetYaxis()->CenterTitle();
}
void RAA_fakecheck(int startfile = 0, int endfile = 1, int radius = 3, char *algo = "Vs", char *jet_type = "PF"){
TH1::SetDefaultSumw2();
TStopwatch timer;
timer.Start();
bool printDebug = true;
if(printDebug) cout<<"Radius = "<<radius<<" and Algo = "<<algo<<" "<<jet_type<<endl;
// Change to macro to run on condor since its taking a freaking long time.
//
std::string infile;
infile = "jetRAA_PbPb_data_forest.txt";
std::ifstream instr(infile.c_str(),std::ifstream::in);
std::string filename;
//int nFiles = 11;
//just to read the files till the start number
if(printDebug) cout<<"reading from "<<startfile<<" to "<<endfile<<endl;
for(int ifile = 0;ifile<startfile;ifile++){
instr>>filename;
}
const int N = 5;
//Create chain
TChain* ch[N];
string dir[N] = {
"hltanalysis",
"skimanalysis",
//"hcalNoise",
Form("ak%s%d%sJetAnalyzer",algo,radius,jet_type),
//"akPu5PFJetAnalyzer",
//"multiPhotonAnalyzer",
//"ppTrack",
//"pfcandAnalyzer",
//"anaMET",
//"muonTree",
"hiEvtAnalyzer",
"hltobject"
};
string trees[N] = {
"HltTree",
"HltTree",
//"hbhenoise",
"t",
//"t",
//"photon",
//"trackTree",
//"pfTree",
//"metTree",
//"HLTMuTree",
"HiTree",
"jetObjTree"
};
// data files for PbPb Jet55or66 are a list. So we need to TChain them first and then we should be able to use those chaing to get the events. they will have the same names as we used here.
//TChain *jetpbpb1 = new TChain(Form("ak%s%dPFJetAnalyzer/t",algo,radius));
//TChain *evtpbpb1 = new TChain("hiEvtAnalyzer/HiTree");
//TChain *hltpbpb1 = new TChain("hltanalysis/HltTree");
//TChain *skmpbpb1 = new TChain("skimanalysis/HltTree");
//TChain *hltobjpbpb1 = new TChain("hltobject/jetObjTree");
for(int i = 0;i<N;i++) ch[i] = new TChain(string(dir[i]+"/"+trees[i]).data());
for(int ifile = startfile;ifile<endfile;ifile++){
instr>>filename;
if(printDebug) cout<<"File: "<<ifile<<" = "<<filename<<endl;
for(int i = 0;i<N;i++){
//ch[i] = new TChain(string(dir[i]+"/"+trees[i]).data());
ch[i]->Add(filename.c_str());
if(printDebug) cout << "Tree loaded " << string(dir[i]+"/"+trees[i]).data() << endl;
if(printDebug) cout << "Entries : " << ch[i]->GetEntries() << endl;
}
//jetpbpb1->Add(filename.c_str());
//hltpbpb1->Add(filename.c_str());
//skmpbpb1->Add(filename.c_str());
//hltobjpbpb1->Add(filename.c_str());
//evtpbpb1->Add(filename.c_str());
//if(printDebug) cout<<"Entries = "<<jetpbpb1->GetEntries()<<endl;
}
//these ones were used when i ran the macro standalone in root.
// // file list - are all named like this: /mnt/hadoop/cms/store/user/dgulhan/HIMC/Jet55or65/HIRun2011-14Mar2014-v2-6lumi-jet55or65-forest-v9/merged/HiForest_Pythia_Hydjet_Jet80_Track8_Jet19_STARTHI53_LV1_merged_forest_##.root
// // where ## goes from 0-11
// for(int i = 0;i<=11;i++){
// if(i==9)continue;
// jetpbpb1->Add(Form("/mnt/hadoop/cms/store/user/dgulhan/HIMC/Jet55or65/HIRun2011-14Mar2014-v2-6lumi-jet55or65-forest-v9/merged/HiForest_Pythia_Hydjet_Jet80_Track8_Jet19_STARTHI53_LV1_merged_forest_%d.root",i));
// hltpbpb1->Add(Form("/mnt/hadoop/cms/store/user/dgulhan/HIMC/Jet55or65/HIRun2011-14Mar2014-v2-6lumi-jet55or65-forest-v9/merged/HiForest_Pythia_Hydjet_Jet80_Track8_Jet19_STARTHI53_LV1_merged_forest_%d.root",i));
// skmpbpb1->Add(Form("/mnt/hadoop/cms/store/user/dgulhan/HIMC/Jet55or65/HIRun2011-14Mar2014-v2-6lumi-jet55or65-forest-v9/merged/HiForest_Pythia_Hydjet_Jet80_Track8_Jet19_STARTHI53_LV1_merged_forest_%d.root",i));
// evtpbpb1->Add(Form("/mnt/hadoop/cms/store/user/dgulhan/HIMC/Jet55or65/HIRun2011-14Mar2014-v2-6lumi-jet55or65-forest-v9/merged/HiForest_Pythia_Hydjet_Jet80_Track8_Jet19_STARTHI53_LV1_merged_forest_%d.root",i));
// hltobjpbpb1->Add(Form("/mnt/hadoop/cms/store/user/dgulhan/HIMC/Jet55or65/HIRun2011-14Mar2014-v2-6lumi-jet55or65-forest-v9/merged/HiForest_Pythia_Hydjet_Jet80_Track8_Jet19_STARTHI53_LV1_merged_forest_%d.root",i));
// }
//jetpbpb1->AddFriend(evtpbpb1);
//jetpbpb1->AddFriend(hltpbpb1);
//jetpbpb1->AddFriend(skmpbpb1);
//jetpbpb1->AddFriend(hltobjpbpb1);
ch[2]->AddFriend(ch[0]);
ch[2]->AddFriend(ch[1]);
ch[2]->AddFriend(ch[3]);
ch[2]->AddFriend(ch[4]);
ch[3]->AddFriend(ch[0]);
ch[3]->AddFriend(ch[1]);
ch[3]->AddFriend(ch[2]);
ch[3]->AddFriend(ch[4]);
Float_t nEntries = (Float_t)ch[2]->GetEntries();
if(printDebug) cout<<"Total number of entries = "<<nEntries<<endl;
//jetpbpb1->Print();
//jetpbpb1->GetListOfBranches();
//jetpbpb1->GetListOfFriends();
//jetpbpb1->AddFriend(hltpbpb1);
//if(printDebug) cout<<"# of events which satisfy the Jet55 criteria = "<<ch[2]->GetEntries("HLT_HIJet55_v1")<<endl;
//if(printDebug) cout<<"# of events which satisfy the Jet65 criteria = "<<ch[2]->GetEntries("HLT_HIJet65_v1")<<endl;
//if(printDebug) cout<<"testing if HLT tree knows that branch, no of entries there = "<<hltpbpb1->GetEntries("HLT_HIJet55_v1")<<endl;
//if(printDebug) cout<<"# of events which satisfy Jet55 but fail Jet65 and Jet80 = "<<ch[2]->GetEntries("HLT_HIJet55_v1&&!HLT_HIJet65_v1&&!HLT_HIJet80_v1")<<endl;
TDatime date;
// declare the output file here:
TFile fout(Form("/net/hisrv0001/home/rkunnawa/WORK/RAA/CMSSW_5_3_20/src/Output/pbpb_ak%s%d%s_fakejet_histos_%d_%d.root",algo,radius,jet_type,date.GetDate(),endfile),"RECREATE");
fout.cd();
//histogram from the HLT_HIJet55 trigger alone
TH1F *hJet55 = new TH1F("hJet55","Jets pt which are selected by HLT_HIJet55 trigger (along with eventsel)",1000,0,1000);
TH1F *hJet55_QA1 = new TH1F("hJet55_QA1","HLT_HIJet55 jets with chMax/jtpt>0.05 (along with eventsel)",1000,0,1000);
TH1F *hJet55_QA2_a = new TH1F("hJet55_QA2_a","HLT_HIJet55 jets with chargedMax/chargedSum<0.975",1000,0,1000);
TH1F *hJet55_QA2_b = new TH1F("hJet55_QA2_b","HLT_HIJet55 jets with Max(neutralMax,chargedMax)/Max(chargedSum,neutralSum)<0.975 (along with eventsel)",1000,0,1000);
TH1F *hJet55_QA1_2b = new TH1F("hJet55_QA1_2b","HLT_HIJet55 jets with chMax/jtpt>0.01 and Max(neutralMax,chargedMax)/Max(chargedSum,neutralSum)<0.975 (along with eventsel)",1000,0,1000);
TH1F *hJet55_QA3 = new TH1F("hJet55_QA3","HLT_HIJet55 jets with jtpt/trgobjpt<3 (along with eventsel)",1000,0,1000);
TH1F *hJet55_QA4 = new TH1F("hJet55_QA4","HLT_HIJet55 jets with (chSum+phSum+neSum+muSum+eSum)/jtpt>1.01 (along with eventsel)",1000,0,1000);
TH1F *hJet65 = new TH1F("hJet65","Jets pt which are selected by HLT_HIJet65 trigger (along with eventsel)",1000,0,1000);
TH1F *hJet65_QA1 = new TH1F("hJet65_QA1","HLT_HIJet65 jets with chMax/jtpt>0.01 (along with eventsel)",1000,0,1000);
TH1F *hJet65_QA2_a = new TH1F("hJet65_QA2_a","HLT_HIJet65 jets with chargedMax/chargedSum<0.975",1000,0,1000);
TH1F *hJet65_QA2_b = new TH1F("hJet65_QA2_b","HLT_HIJet65 jets with Max(neutralMax,chargedMax)/Max(chargedSum,neutralSum)<0.975 (along with eventsel)",1000,0,1000);
TH1F *hJet65_QA1_2b = new TH1F("hJet65_QA1_2b","HLT_HIJet65 jets with chMax/jtpt>0.01 and Max(neutralMax,chargedMax)/Max(chargedSum,neutralSum)<0.975 (along with eventsel)",1000,0,1000);
TH1F *hJet65_QA3 = new TH1F("hJet65_QA3","HLT_HIJet65 jets with jtpt/trgobjpt<3 (along with eventsel)",1000,0,1000);
TH1F *hJet65_QA4 = new TH1F("hJet65_QA4","HLT_HIJet65 jets with (chSum+phSum+neSum+muSum+eSum)/jtpt>1.01 (along with eventsel)",1000,0,1000);
TH3F *hJet55_3D = new TH3F("hJet55_3D","3D lego histogram of jets with Jet55 trigger, pt vs eta vs phi",60,-2.5,2.5,60,-3,3,1000,0,1000);
TH1F *hJet55Fake = new TH1F("hJet55Fake","jets with pt>80 which pass Jet55 and fail higher triggers",1000,0,1000);
// the above one is just to get a feel for all the jets in the Jet55 trigger.
TH1F *hJet55_trg = new TH1F("hJet55_trg","HLT_HIJet55 and trgpt>=55 and <65 along with eventsel",1000,0,1000);
TH1F *hJet55_trg_QA1 = new TH1F("hJet55_trg_QA1","HLT_HI_Jet55 and trgpt>=55 and <65 eventsel and chMax/jtpt>0.01",1000,0,1000);
TH1F *hJet55_trg_QA2_a = new TH1F("hJet55_trg_QA2_a","HLT_HIJet55 with trgpt>=55 and <65 jets with chargedMax/chargedSum<0.975",1000,0,1000);
TH1F *hJet55_trg_QA2_b = new TH1F("hJet55_trg_QA2_b","HLT_HI_Jet55 and trgpt>=55 and <65 eventsel and Max(neutralMax,chargedMax)/Max(chargedSum,neutralSum)<0.975",1000,0,1000);
TH1F *hJet55_trg_QA1_2b = new TH1F("hJet55_trg_QA1_2b","HLT_HI_Jet55 and trgpt>=55 and <65 eventsel and Max(neutralMax,chargedMax)/Max(chargedSum,neutralSum)<0.975 and chMax/jtpt>0.01",1000,0,1000);
TH1F *hJet55_trg_QA3 = new TH1F("hJet55_trg_QA3","HLT_HI_Jet55 and trgpt>=55 and <65 eventsel and jtpt/trgobjpt<3",1000,0,1000);
TH1F *hJet55_trg_QA4 = new TH1F("hJet55_trg_QA4","HLT_HIJet55 and trgpt>=55 and <65 jets with (chSum+phSum+neSum+muSum+eSum)/jtpt>1.01 (along with eventsel)",1000,0,1000);
TH1F *hJet55_only = new TH1F("hJet55_only","HLT_HIJet55 jets with no HLT_HIJet65 and no 80 along with eventsel",1000,0,1000);
TH1F *hJet65_only = new TH1F("hJet65_only","HLT_HIJet65 jets with no HLT_HIJet80 along with eventsel",1000,0,1000);
TH1F *hJet65_trg = new TH1F("hJet65_trg","HLT_HIJet65 and trgpt>=65 and <80 along with eventsel",1000,0,1000);
TH1F *hJet65_trg_QA1 = new TH1F("hJet65_trg_QA1","HLT_HIJet65 and trgpt>=65 and <80 with chMax/jtpt>0.01 and with eventsel",1000,0,1000);
TH1F *hJet65_trg_QA2_a = new TH1F("hJet65_trg_QA2_a","HLT_HIJet55 with trgpt>=65 and <80 jets with chargedMax/chargedSum<0.975",1000,0,1000);
TH1F *hJet65_trg_QA2_b = new TH1F("hJet65_trg_QA2_b","HLT_HIJet65 and trgpt>=65 and <80 with evetsel and Max(neutralMax,chargedMax)/Max(chargedSum,neutralSum)<0.975",1000,0,1000);
TH1F *hJet65_trg_QA1_2b = new TH1F("hJet65_trg_QA1_2b","HLT_HI_Jet65 and trgpt>=65 and <80 eventsel and Max(neutralMax,chargedMax)/Max(chargedSum,neutralSum)<0.975 and chMax/jtpt>0.01",1000,0,1000);
TH1F *hJet65_trg_QA3 = new TH1F("hJet65_trg_QA3","HLT_HIJet 65 and trgpt>=65 and <80 with jtpt/trgobjpt<3 and eventsel",1000,0,1000);
TH1F *hJet65_trg_QA4 = new TH1F("hJet65_trg_QA4","HLT_HIJet55 with trgpt>=65 and <80 jets with (chSum+phSum+neSum+muSum+eSum)/jtpt>1.01 (along with eventsel)",1000,0,1000);
// should i make one with QA1 and QA3? since QA2 wont work in R=0.2
TH1F *hJet55_trg_QA1_3 = new TH1F("hJet55_trg_QA1_3","HLT_HIJet55 jets with trgpt>=55 and <65 with eventsel and QA1 and QA3",1000,0,1000);
TH1F *hJet65_trg_QA1_3 = new TH1F("hJet65_trg_QA1_3","HLT_HIJet65 jets with trgpt>=65 and <80 with eventsel and QA1 and QA3",1000,0,1000);
TH1F *hJet55_QA1_3 = new TH1F("hJet55_QA1_3","HLT_HIJet55 jets with eventsel and QA1 and QA3",1000,0,1000);
TH1F *hJet65_QA1_3 = new TH1F("hJet65_QA1_3","HLT_HIJet65 jets with eventsel and QA1 and QA3",1000,0,1000);
/*
//include the jet80 tree just to find the numbers the fake cut removes.
TFile *fin80 = TFile::Open("/mnt/hadoop/cms/store/user/velicanu/HIRun2011-14Mar2014-v2-6lumi-jet80-forest-v4ANDv9-merged/0.root");
TTree *Jet80 = (TTree*)fin80->Get(Form("ak%s%dPFJetAnalyzer/t",algo,radius));
//Jet80->Print();
TTree *evt80 = (TTree*)fin80->Get("hiEvtAnalyzer/HiTree");
//evt80->Print();
TTree *hlt80 = (TTree*)fin80->Get("hltanalysis/HltTree");
//hlt80->Print();
TTree *skm80 = (TTree*)fin80->Get("skimanalysis/HltTree");
//skm80->Print();
TTree *Trg80 = (TTree*)fin80->Get("hltobject/jetObjTree");
//Trg80->Print();
Jet80->AddFriend(evt80);
Jet80->AddFriend(hlt80);
Jet80->AddFriend(skm80);
Jet80->AddFriend(Trg80);
*/
TCut jet55 = "HLT_HIJet55_v1";
TCut jet65 = "HLT_HIJet65_v1";
TCut jet80 = "HLT_HIJet80_v1";
TCut evtSel = "abs(vz)<15&&pcollisionEventSelection&&pHBHENoiseFilter&&abs(jteta)<2";
TCut qalCut1 = "(chargedMax/jtpt)>0.05";
TCut qalCut2_b = "(TMath::Max(chargedMax,neutralMax)/TMath::Max(chargedSum,neutralSum))<0.975";
TCut qalCut2_a = "(chargedMax/chargedSum)<0.975";
TCut qalCut3 = "(jtpt/pt)<3";
TCut qalCut4 = "((chargedSum+photonSum+neutralSum+muSum+eSum)/jtpt)>1.01";
TCut jet55only = "HLT_HIJet55_v1&&!HLT_HIJet65_v1&&!HLT_HIJet80_v1";
TCut jet65only = "HLT_HIJet65_v1&&!HLT_HIJet80_v1";
TCut largejetpt = "jtpt>80";
TCut trg55 = "pt>=55&&pt<65";
TCut trg65 = "pt>=65&&pt<80";
TCut trg80 = "pt>=80";
//TH1F total,evtSel,jet55,jet55_evtsel,jet55only_ectsel,jet55_evtSel_QA1,jet55_evtSel_QA2,jet55_evtSel_QA3,jet55_evtSel_QA1_2,jet55_evtSel_QA1_3,jet55_evtSel_QA3_2;
//TH1F jet55_trg55,jet55_trg_evtSel,jet55only_trg55_evtSel,jet55_trg55_evtSel_QA1,jet55_trg55_evtSel_QA2,jet55_trg55_evtSel_QA3,jet55_trg55_evtSel_qalCut1_qalCut2,jet55_trg55_evtSel_qalCut1_qalCut3,jet55_trg55_evtSel_qalCut3_qalCut2;
//TH1F jet65,jet65_evtSel,jet65only_evtSel,jet65_evtSel_qalCut1,jet65_evtSel_qalCut3,jet65_evtSel_qalCut3,jet65_evtSel_qalCut1_qalCut3,jet65_evtSel_qalCut1_qalCut2,jet65_evtSel_qalCut3_qalCut2;
//TH1F jet65_
//if(printDebug) cout<<"total # of entries = "<<ch[2]->GetEntries()<<endl;
/*
if(printDebug) cout<<"total # of entries = "<<ch[2]->GetEntries()<<endl;
ch[3]->Draw("hiBin>>total");
if(printDebug) cout<<"with evtSel added = "<<ch[2]->GetEntries(evtSel)<<endl;
//ch[2]->Draw("evtSel","hiBin",);
if(printDebug) cout<<"with evtSel added = "<<ch[2]->GetEntries(evtSel)<<endl;
ch[3]->Draw("hiBin>>evtSel",evtSel);
if(printDebug) cout<<"with jet55"<<" = "<<ch[2]->GetEntries(jet55)<<endl;
ch[3]->Draw("hiBin>>jet55",jet55);
if(printDebug) cout<<"with evtSel and Jet55 added = "<<ch[2]->GetEntries(jet55&&evtSel)<<endl;
ch[3]->Draw("hiBin>>jet55_evtsel",jet55&&evtSel);
if(printDebug) cout<<"with Jet55_only and evtSel added = "<<ch[2]->GetEntries(jet55only&&evtSel)<<endl;
ch[3]->Draw("hiBin>>jet55only_evtsel",jet55only&&evtSel);
*/
//ch[2]->Project("total","hiBin");
//cout<<"with evtSel added = "<<ch[2]->GetEntries(evtSel)<<endl;
//ch[2]->Project("evtSel","hiBin",);
//if(printDebug) cout<<"with evtSel added = "<<ch[2]->GetEntries(evtSel)<<endl;
//ch[2]->Project("evtSel","hiBin",evtSel);
/*
if(printDebug) cout<<"with jet55"<<" = "<<ch[2]->GetEntries(jet55)<<endl;
//ch[2]->Project("jet55","hiBin",jet55);
if(printDebug) cout<<"with evtSel and Jet55 added = "<<ch[2]->GetEntries(jet55&&evtSel)<<endl;
//ch[2]->Project("jet55_evtsel","hiBin",jet55&&evtSel);
if(printDebug) cout<<"with Jet55_only and evtSel added = "<<ch[2]->GetEntries(jet55only&&evtSel)<<endl;
//ch[2]->Project("jet55only_evtsel","hiBin",jet55only&&evtSel);
if(printDebug) cout<<"jet55 && evtSel && qalCut1"<<" = "<<ch[2]->GetEntries(jet55&&evtSel&&qalCut1)<<endl;
//ch[2]->Project("jet55_evtSel_QA1","hiBin",jet55&&evtSel&&qalCut1);
if(printDebug) cout<<"jet55 && evtSel && qalCut2"<<" = "<<ch[2]->GetEntries(jet55&&evtSel&&qalCut2)<<endl;
//ch[2]->Project("jet55_evtSel_QA2","hiBin",jet55&&evtSel&&qalCut2);
if(printDebug) cout<<"jet55 && evtSel && qalCut3"<<" = "<<ch[2]->GetEntries(jet55&&evtSel&&qalCut3)<<endl;
//ch[2]->Project("jet55_evtSel_QA3","hiBin",jet55&&evtSel&&qalCut3);
if(printDebug) cout<<"jet55 and evtSel and QA1_2 = "<<ch[2]->GetEntries(jet55&&evtSel&&qalCut1&&qalCut2)<<endl;
//ch[2]->Project("jet55_evtSel_QA1_QA2","hiBin",jet55&&evtSel&&qalCut1&&qalCut2);
if(printDebug) cout<<"jet55 and evtSel and QA1_3 = "<<ch[2]->GetEntries(jet55&&evtSel&&qalCut1&&qalCut3)<<endl;
//ch[2]->Project("jet55_evtSel_QA1_QA3","hiBin",jet55&&evtSel&&qalCut1&&qalCut3);
if(printDebug) cout<<"jet55 and evtSel and QA2_3 = "<<ch[2]->GetEntries(jet55&&evtSel&&qalCut2&&qalCut3)<<endl;
//ch[2]->Project("jet55_evtSel_QA3_QA2","hiBin",jet55&&evtSel&&qalCut3&&qalCut2);
*/
//cout<<"with jet55 and trgObjpt selection"<<" = "<<ch[2]->GetEntries(jet55&&trg55)<<endl;
//ch[2]->Project("jet55_trg55","hiBin",jet55&&trg55);
/*
if(printDebug) cout<<"with evtSel and Jet55 and trgobjpt added = "<<ch[2]->GetEntries(jet55&&trg55&&evtSel)<<endl;
//ch[2]->Project("jet55_trg55_evtSel","hiBin",jet55&&trg55&&evtSel);
if(printDebug) cout<<"with Jet55_only and trgObjpt and evtSel added = "<<ch[2]->GetEntries(jet55only&&trg55&&evtSel)<<endl;
//ch[2]->Project("jet55only_trg55_evtSel","hiBin",jet55only&&trg55&&evtSel);
if(printDebug) cout<<"jet55 and trgObjpt && evtSel && qalCut1"<<" = "<<ch[2]->GetEntries(jet55&&trg55&&evtSel&&qalCut1)<<endl;
//ch[2]->Project("jet55_trg55_evtSel_QA1","hiBin",jet55&&trg55&&evtSel&&qalCut1);
if(printDebug) cout<<"jet55 and trgObjpt && evtSel && qalCut2"<<" = "<<ch[2]->GetEntries(jet55&&trg55&&evtSel&&qalCut2)<<endl;
//ch[2]->Project("jet55_trg55_evtSel_QA2","hiBin",jet55&&trg55&&evtSel&&qalCut2);
if(printDebug) cout<<"jet55 and trgObjpt && evtSel && qalCut3"<<" = "<<ch[2]->GetEntries(jet55&&trg55&&evtSel&&qalCut3)<<endl;
//ch[2]->Project("jet55_trg55_evtSel_QA3","hiBin",jet55&&trg55&&evtSel&&qalCut3);
if(printDebug) cout<<"jet55 and trgObjpt and evtSel and QA1_2 = "<<ch[2]->GetEntries(jet55&&trg55&&evtSel&&qalCut1&&qalCut2)<<endl;
//ch[2]->Project("jet55_trg55_evtSel_qalCut1_qalCut2","hiBin",jet55&&trg55&&evtSel&&qalCut1&&qalCut2);
if(printDebug) cout<<"jet55 and trgObjpt and evtSel and QA1_3 = "<<ch[2]->GetEntries(jet55&&trg55&&evtSel&&qalCut1&&qalCut3)<<endl;
//ch[2]->Project("jet55_trg55_evtSel_qalCut1_qalCut3","hiBin",jet55&&trg55&&evtSel&&qalCut1&&qalCut3);
if(printDebug) cout<<"jet55 and trgObjpt and evtSel and QA2_3 = "<<ch[2]->GetEntries(jet55&&trg55&&evtSel&&qalCut2&&qalCut3)<<endl;
//ch[2]->Project("jet55_trg55_evtSel_qalCut1_qa3Cut2","hiBin",jet55&&trg55&&evtSel&&qalCut3&&qalCut2);
if(printDebug) cout<<"with jet65"<<" = "<<ch[2]->GetEntries(jet65)<<endl;
//ch[2]->Project("jet65","hiBin",jet65);
if(printDebug) cout<<"with evtSel and Jet65 added = "<<ch[2]->GetEntries(jet65&&evtSel)<<endl;
//ch[2]->Project("jet65_evtSel","hiBin",jet65&&evtSel);
if(printDebug) cout<<"with Jet65_only and evtSel added = "<<ch[2]->GetEntries(jet65only&&evtSel)<<endl;
//ch[2]->Project("jet65only_evtSel","hiBin",jet65only&&evtSel);
if(printDebug) cout<<"jet65 && evtSel && qalCut1"<<" = "<<ch[2]->GetEntries(jet65&&evtSel&&qalCut1)<<endl;
//ch[2]->Project("jet65_evtSel_qalCut1","hiBin",jet65&&evtSel&&qalCut1);
if(printDebug) cout<<"jet65 && evtSel && qalCut2"<<" = "<<ch[2]->GetEntries(jet65&&evtSel&&qalCut2)<<endl;
//ch[2]->Project("jet65_evtSel_qalCut2","hiBin",jet65&&evtSel&&qalCut2);
if(printDebug) cout<<"jet65 && evtSel && qalCut3"<<" = "<<ch[2]->GetEntries(jet65&&evtSel&&qalCut3)<<endl;
//ch[2]->Project("jet65_evtSel_qalCut3","hiBin",jet65&&evtSel&&qalCut3);
if(printDebug) cout<<"jet65 and evtSel and QA1_2 = "<<ch[2]->GetEntries(jet65&&evtSel&&qalCut1&&qalCut2)<<endl;
//ch[2]->Project("jet65_evtSel_qalCut1_qalCut2","hiBin",jet65&&evtSel&&qalCut1&&qalCut2);
if(printDebug) cout<<"jet65 and evtSel and QA1_3 = "<<ch[2]->GetEntries(jet65&&evtSel&&qalCut1&&qalCut3)<<endl;
//ch[2]->Project("jet65_evtSel_qalCut1_qalCut3","hiBin",jet65&&evtSel&&qalCut1&&qalCut3);
if(printDebug) cout<<"jet65 and evtSel and QA2_3 = "<<ch[2]->GetEntries(jet65&&evtSel&&qalCut2&&qalCut3)<<endl;
//ch[2]->Project("jet65_evtSel_qalCut3_qalCut2","hiBin",jet65&&evtSel&&qalCut3&&qalCut2);
if(printDebug) cout<<"with jet65 and trgObjpt selection"<<" = "<<ch[2]->GetEntries(jet65&&trg65)<<endl;
//ch[2]->Project("jet65_trg65","hiBin",jet65&&trg65);
if(printDebug) cout<<"with evtSel and Jet65 and trgobjpt added = "<<ch[2]->GetEntries(jet65&&trg65&&evtSel)<<endl;
//ch[2]->Project("jet65_trg65_evtSel","hiBin",jet65&&trg65&&evtSel);
if(printDebug) cout<<"with Jet65_only and trgObjpt and evtSel added = "<<ch[2]->GetEntries(jet65only&&trg65&&evtSel)<<endl;
//ch[2]->Project("jet65only_trg65_evtSel","hiBin",jet65only&&trg65&&evtSel);
if(printDebug) cout<<"jet65 and trgObjpt && evtSel && qalCut1"<<" = "<<ch[2]->GetEntries(jet65&&trg65&&evtSel&&qalCut1)<<endl;
//ch[2]->Project("jet65_trg65_evtSel_qalCut1","hiBin",jet65&&trg65&&evtSel&&qalCut1);
if(printDebug) cout<<"jet65 and trgObjpt && evtSel && qalCut2"<<" = "<<ch[2]->GetEntries(jet65&&trg65&&evtSel&&qalCut2)<<endl;
//ch[2]->Project("jet65_trg65_evtSel_qalCut2","hiBin",jet65&&trg65&&evtSel&&qalCut2);
if(printDebug) cout<<"jet65 and trgObjpt && evtSel && qalCut3"<<" = "<<ch[2]->GetEntries(jet65&&trg65&&evtSel&&qalCut3)<<endl;
//ch[2]->Project("jet65_trg65_evtSel_qalCut3","hiBin",jet65&&trg65&&evtSel&&qalCut3);
if(printDebug) cout<<"jet65 and trgObjpt and evtSel and QA1_2 = "<<ch[2]->GetEntries(jet65&&trg65&&evtSel&&qalCut1&&qalCut2)<<endl;
//ch[2]->Project("jet65_trg65_evtSel_qalCut1_qalCut2","hiBin",jet65&&trg65&&evtSel&&qalCut1&&qalCut2);
if(printDebug) cout<<"jet65 and trgObjpt and evtSel and QA1_3 = "<<ch[2]->GetEntries(jet65&&trg65&&evtSel&&qalCut1&&qalCut3)<<endl;
//ch[2]->Project("jet65_trg65_evtSel_qalCut1_qalCut3","hiBin",jet65&&trg65&&evtSel&&qalCut1&&qalCut3);
if(printDebug) cout<<"jet65 and trgObjpt and evtSel and QA2_3 = "<<ch[2]->GetEntries(jet65&&trg65&&evtSel&&qalCut2&&qalCut3)<<endl;
//ch[2]->Project("jet65_trg65_evtSel_qalCut3_qalCut2","hiBin",jet65&&trg65&&evtSel&&qalCut3&&qalCut2);
*/
/*
if(printDebug) cout<<"with jet80"<<" = "<<Jet80->GetEntries(jet80)<<endl;
if(printDebug) cout<<"with evtSel and Jet80 added = "<<Jet80->GetEntries(jet80&&evtSel)<<endl;
if(printDebug) cout<<"jet80 && evtSel && qalCut1"<<" = "<<Jet80->GetEntries(jet80&&evtSel&&qalCut1)<<endl;
if(printDebug) cout<<"jet80 && evtSel && qalCut2"<<" = "<<Jet80->GetEntries(jet80&&evtSel&&qalCut2)<<endl;
if(printDebug) cout<<"jet80 && evtSel && qalCut3"<<" = "<<Jet80->GetEntries(jet80&&evtSel&&qalCut3)<<endl;
if(printDebug) cout<<"jet80 and evtSel and QA1_2 = "<<Jet80->GetEntries(jet80&&evtSel&&qalCut1&&qalCut2)<<endl;
if(printDebug) cout<<"jet80 and evtSel and QA1_3 = "<<Jet80->GetEntries(jet80&&evtSel&&qalCut1&&qalCut3)<<endl;
if(printDebug) cout<<"jet80 and evtSel and QA2_3 = "<<Jet80->GetEntries(jet80&&evtSel&&qalCut2&&qalCut3)<<endl;
if(printDebug) cout<<"with jet80 and trgObjpt selection"<<" = "<<Jet80->GetEntries(jet80&&trg80)<<endl;
if(printDebug) cout<<"with evtSel and Jet680 and trgobjpt added = "<<Jet80->GetEntries(jet80&&trg80&&evtSel)<<endl;
//if(printDebug) cout<<"with Jet65_only and trgObjpt and evtSel added = "<<ch[2]->GetEntries(jet65only&&trg65&&evtSel)<<endl;
if(printDebug) cout<<"jet80 and trgObjpt && evtSel && qalCut1"<<" = "<<Jet80->GetEntries(jet80&&trg80&&evtSel&&qalCut1)<<endl;
if(printDebug) cout<<"jet80 and trgObjpt && evtSel && qalCut2"<<" = "<<Jet80->GetEntries(jet80&&trg80&&evtSel&&qalCut2)<<endl;
if(printDebug) cout<<"jet80 and trgObjpt && evtSel && qalCut3"<<" = "<<Jet80->GetEntries(jet80&&trg80&&evtSel&&qalCut3)<<endl;
if(printDebug) cout<<"jet80 and trgObjpt and evtSel and QA1_2 = "<<Jet80->GetEntries(jet80&&trg80&&evtSel&&qalCut1&&qalCut2)<<endl;
if(printDebug) cout<<"jet80 and trgObjpt and evtSel and QA1_3 = "<<Jet80->GetEntries(jet80&&trg80&&evtSel&&qalCut1&&qalCut3)<<endl;
if(printDebug) cout<<"jet80 and trgObjpt and evtSel and QA2_3 = "<<Jet80->GetEntries(jet80&&trg80&&evtSel&&qalCut2&&qalCut3)<<endl;
*/
if(printDebug) cout<<"jet55 only and trig 55 and eventSel and largejetpt"<<" = "<<ch[2]->GetEntries(evtSel&&jet55only&&trg55&&largejetpt)<<endl;
//ch[2]->Print();
ch[2]->Project("hJet55_trg_QA1_3","jtpt",jet55&&trg55&&evtSel&&qalCut1&&qalCut3);
hJet55_trg_QA1_3->Print("base");
ch[2]->Project("hJet65_trg_QA1_3","jtpt",jet65&&trg65&&evtSel&&qalCut1&&qalCut3);
hJet65_trg_QA1_3->Print("base");
ch[2]->Project("hJet55_QA1_3","jtpt",jet55&&evtSel&&qalCut1&&qalCut3);
hJet55_QA1_3->Print("base");
ch[2]->Project("hJet65_QA1_3","jtpt",jet65&&evtSel&&qalCut1&&qalCut3);
hJet65_QA1_3->Print("base");
ch[2]->Project("hJet55","jtpt",jet55&&evtSel);
hJet55->Print("base");
ch[2]->Project("hJet55_QA1","jtpt",evtSel&&jet55&&qalCut1);
hJet55_QA1->Print("base");
ch[2]->Project("hJet55_QA2_a","jtpt",evtSel&&jet55&&qalCut2_a);
hJet55_QA2_a->Print("base");
ch[2]->Project("hJet55_QA2_b","jtpt",evtSel&&jet55&&qalCut2_b);
hJet55_QA2_b->Print("base");
ch[2]->Project("hJet55_QA1_2b","jtpt",evtSel&&jet55&&qalCut1&&qalCut2_b);
hJet55_QA1_2b->Print("base");
ch[2]->Project("hJet55_QA3","jtpt",evtSel&&jet55&&qalCut3);
hJet55_QA3->Print("base");
ch[2]->Project("hJet55_QA4","jtpt",evtSel&&jet55&&qalCut4);
hJet55_QA4->Print("base");
ch[2]->Project("hJet55Fake","jtpt",evtSel&&jet55only&&largejetpt);
hJet55Fake->Print("base");
ch[2]->Project("hJet55_only","jtpt",jet55only&&evtSel);
hJet55_only->Print("base");
ch[2]->Project("hJet55_3D","jteta:jtphi:jtpt",evtSel&&jet55only&&largejetpt);
hJet55_3D->Print("base");
ch[2]->Project("hJet55_trg","jtpt",evtSel&&jet55&&trg55);
hJet55_trg->Print("base");
ch[2]->Project("hJet55_trg_QA1","jtpt",evtSel&&jet55&&trg55&&qalCut1);
hJet55_trg_QA1->Print("base");
ch[2]->Project("hJet55_trg_QA2_a","jtpt",evtSel&&jet55&&trg55&&qalCut2_a);
hJet55_trg_QA2_a->Print("base");
ch[2]->Project("hJet55_trg_QA2_b","jtpt",evtSel&&jet55&&trg55&&qalCut2_b);
hJet55_trg_QA2_b->Print("base");
ch[2]->Project("hJet55_trg_QA1_2b","jtpt",evtSel&&jet55&&trg55&&qalCut1&&qalCut2_b);
hJet55_trg_QA1_2b->Print("base");
ch[2]->Project("hJet55_trg_QA3","jtpt",evtSel&&jet55&&trg55&&qalCut3);
hJet55_trg_QA3->Print("base");
ch[2]->Project("hJet65","jtpt",jet65&&evtSel);
hJet65->Print("base");
ch[2]->Project("hJet65_QA1","jtpt",evtSel&&jet65&&qalCut1);
hJet65_QA1->Print("base");
ch[2]->Project("hJet65_QA2_a","jtpt",evtSel&&jet65&&qalCut2_a);
hJet65_QA2_a->Print("base");
ch[2]->Project("hJet65_QA2_b","jtpt",evtSel&&jet65&&qalCut2_b);
hJet65_QA2_b->Print("base");
ch[2]->Project("hJet65_QA1_2b","jtpt",evtSel&&jet65&&qalCut1&&qalCut2_b);
hJet65_QA1_2b->Print("base");
ch[2]->Project("hJet65_QA3","jtpt",evtSel&&jet65&&qalCut3);
hJet65_QA3->Print("base");
ch[2]->Project("hJet65_QA4","jtpt",evtSel&&jet65&&qalCut4);
hJet65_QA4->Print("base");
ch[2]->Project("hJet65_only","jtpt",evtSel&&jet65only);
hJet65_only->Print("base");
ch[2]->Project("hJet65_trg","jtpt",evtSel&&jet65&&trg65);
hJet65_trg->Print("base");
ch[2]->Project("hJet65_trg_QA1","jtpt",evtSel&&jet65&&trg65&&qalCut1);
hJet65_trg_QA1->Print("base");
ch[2]->Project("hJet65_trg_QA2_a","jtpt",evtSel&&jet65&&trg65&&qalCut2_a);
hJet65_trg_QA2_a->Print("base");
ch[2]->Project("hJet65_trg_QA2_b","jtpt",evtSel&&jet65&&trg65&&qalCut2_b);
hJet65_trg_QA2_b->Print("base");
ch[2]->Project("hJet65_trg_QA3","jtpt",evtSel&&jet65&&trg65&&qalCut3);
hJet65_trg_QA3->Print("base");
ch[2]->Project("hJet65_trg_QA4","jtpt",evtSel&&jet65&&trg65&&qalCut4);
hJet65_trg_QA4->Print("base");
ch[2]->Project("hJet65_trg_QA1_2b","jtpt",evtSel&&jet65&&trg65&&qalCut1&&qalCut2_b);
hJet65_trg_QA1_2b->Print("base");
hJet55 = (TH1F*)hJet55->Rebin(nbins_pt,"hJet55",boundaries_pt);
divideBinWidth(hJet55);
hJet55_QA1 = (TH1F*)hJet55_QA1->Rebin(nbins_pt,"hJet55_QA1",boundaries_pt);
divideBinWidth(hJet55_QA1);
hJet55_QA2_a = (TH1F*)hJet55_QA2_a->Rebin(nbins_pt,"hJet55_QA2_a",boundaries_pt);
divideBinWidth(hJet55_QA2_a);
hJet55_QA2_b = (TH1F*)hJet55_QA2_b->Rebin(nbins_pt,"hJet55_QA2_b",boundaries_pt);
divideBinWidth(hJet55_QA2_b);
hJet55_QA1_2b = (TH1F*)hJet55_QA1_2b->Rebin(nbins_pt,"hJet55_QA1_2b",boundaries_pt);
divideBinWidth(hJet55_QA1_2b);
hJet55_QA3 = (TH1F*)hJet55_QA3->Rebin(nbins_pt,"hJet55_QA3",boundaries_pt);
divideBinWidth(hJet55_QA3);
hJet55_QA4 = (TH1F*)hJet55_QA4->Rebin(nbins_pt,"hJet55_QA4",boundaries_pt);
divideBinWidth(hJet55_QA4);
hJet55_only = (TH1F*)hJet55_only->Rebin(nbins_pt,"hJet55_only",boundaries_pt);
divideBinWidth(hJet55_only);
hJet55Fake = (TH1F*)hJet55Fake->Rebin(nbins_pt,"hJet55Fake",boundaries_pt);
divideBinWidth(hJet55Fake);
hJet55_trg = (TH1F*)hJet55_trg->Rebin(nbins_pt,"hJet55_trg",boundaries_pt);
divideBinWidth(hJet55_trg);
hJet55_trg_QA1 = (TH1F*)hJet55_trg_QA1->Rebin(nbins_pt,"hJet55_trg_QA1",boundaries_pt);
divideBinWidth(hJet55_trg_QA1);
hJet55_trg_QA2_a = (TH1F*)hJet55_trg_QA2_a->Rebin(nbins_pt,"hJet55_trg_QA2_a",boundaries_pt);
divideBinWidth(hJet55_trg_QA2_a);
hJet55_trg_QA2_b = (TH1F*)hJet55_trg_QA2_b->Rebin(nbins_pt,"hJet55_trg_QA2_b",boundaries_pt);
divideBinWidth(hJet55_trg_QA2_b);
hJet55_trg_QA1_2b = (TH1F*)hJet55_trg_QA1_2b->Rebin(nbins_pt,"hJet55_trg_QA1_2b",boundaries_pt);
divideBinWidth(hJet55_trg_QA1_2b);
hJet55_trg_QA3 = (TH1F*)hJet55_trg_QA3->Rebin(nbins_pt,"hJet55_trg_QA3",boundaries_pt);
divideBinWidth(hJet55_trg_QA3);
hJet55_trg_QA4 = (TH1F*)hJet55_trg_QA4->Rebin(nbins_pt,"hJet55_trg_QA4",boundaries_pt);
divideBinWidth(hJet55_trg_QA4);
hJet65 = (TH1F*)hJet65->Rebin(nbins_pt,"hJet65",boundaries_pt);
divideBinWidth(hJet65);
hJet65_QA1 = (TH1F*)hJet65_QA1->Rebin(nbins_pt,"hJet65_QA1",boundaries_pt);
divideBinWidth(hJet65_QA1);
hJet65_QA2_a = (TH1F*)hJet65_QA2_a->Rebin(nbins_pt,"hJet65_QA2_a",boundaries_pt);
divideBinWidth(hJet65_QA2_a);
hJet65_QA2_b = (TH1F*)hJet65_QA2_b->Rebin(nbins_pt,"hJet65_QA2_b",boundaries_pt);
divideBinWidth(hJet65_QA2_b);
hJet65_QA1_2b = (TH1F*)hJet65_QA1_2b->Rebin(nbins_pt,"hJet65_QA1_2b",boundaries_pt);
divideBinWidth(hJet65_QA1_2b);
hJet65_QA3 = (TH1F*)hJet65_QA3->Rebin(nbins_pt,"hJet65_QA3",boundaries_pt);
divideBinWidth(hJet65_QA3);
hJet65_QA4 = (TH1F*)hJet65_QA4->Rebin(nbins_pt,"hJet65_QA4",boundaries_pt);
divideBinWidth(hJet65_QA4);
hJet65_only = (TH1F*)hJet65_only->Rebin(nbins_pt,"hJet65_only",boundaries_pt);
divideBinWidth(hJet65_only);
//hJet65_fake = (TH1F*)hJet65_fake->Rebin(nbins_pt,"hJet65_fake",boundaries_pt);
//divideBinWidth(hJet65_fake);
hJet65_trg = (TH1F*)hJet65_trg->Rebin(nbins_pt,"hJet65_trg",boundaries_pt);
divideBinWidth(hJet65_trg);
hJet65_trg_QA1 = (TH1F*)hJet65_trg_QA1->Rebin(nbins_pt,"hJet65_trg_QA1",boundaries_pt);
divideBinWidth(hJet65_trg_QA1);
hJet65_trg_QA2_a = (TH1F*)hJet65_trg_QA2_a->Rebin(nbins_pt,"hJet65_trg_QA2_a",boundaries_pt);
divideBinWidth(hJet65_trg_QA2_a);
hJet65_trg_QA2_b = (TH1F*)hJet65_trg_QA2_b->Rebin(nbins_pt,"hJet65_trg_QA2_b",boundaries_pt);
divideBinWidth(hJet65_trg_QA2_b);
hJet65_trg_QA1_2b = (TH1F*)hJet65_trg_QA1_2b->Rebin(nbins_pt,"hJet65_trg_QA1_2b",boundaries_pt);
divideBinWidth(hJet65_trg_QA1_2b);
hJet65_trg_QA3 = (TH1F*)hJet65_trg_QA3->Rebin(nbins_pt,"hJet65_trg_QA3",boundaries_pt);
divideBinWidth(hJet65_trg_QA3);
hJet65_trg_QA4 = (TH1F*)hJet65_trg_QA4->Rebin(nbins_pt,"hJet65_trg_QA4",boundaries_pt);
divideBinWidth(hJet65_trg_QA4);
hJet55_trg_QA1_3 = (TH1F*)hJet55_trg_QA1_3->Rebin(nbins_pt,"hJet55_trg_QA1_3",boundaries_pt);
divideBinWidth(hJet55_trg_QA1_3);
hJet65_trg_QA1_3 = (TH1F*)hJet65_trg_QA1_3->Rebin(nbins_pt,"hJet65_trg_QA1_3",boundaries_pt);
divideBinWidth(hJet65_trg_QA1_3);
hJet55_QA1_3 = (TH1F*)hJet55_QA1_3->Rebin(nbins_pt,"hJet55_QA1_3",boundaries_pt);
divideBinWidth(hJet55_QA1_3);
hJet65_QA1_3 = (TH1F*)hJet65_QA1_3->Rebin(nbins_pt,"hJet65_QA1_3",boundaries_pt);
divideBinWidth(hJet65_QA1_3);
fout.Write();
fout.Close();
timer.Stop();
cout<<"Real time(min) = "<<(Float_t)timer.RealTime()/60<<endl;
cout<<"CPU time(min) = "<<(Float_t)timer.CpuTime()/60<<endl;
cout<<"All done"<<endl;
}