-
Notifications
You must be signed in to change notification settings - Fork 2
/
HZZ4LeptonsAnalysis_4mu.C
5185 lines (4342 loc) · 243 KB
/
HZZ4LeptonsAnalysis_4mu.C
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
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#define HZZ4LeptonsAnalysis_cxx
#include "HZZ4LeptonsAnalysis_4mu.h"
#include <TH2.h>
#include <TStyle.h>
#include <TCanvas.h>
#include <TLorentzVector.h>
#include <TNtuple.h>
#include <TSpline.h>
#include <TProfile.h>
#include <TMath.h>
#include <fstream>
#include <iostream>
#include <sstream>
#include <math.h>
#include <stdlib.h>
#include <iomanip>
#include <vector>
#include <string>
#include <cstdlib>
#include <stdio.h>
#include <libgen.h>
#include "ZZMatrixElement/MELA/src/computeAngles.h"
#include "ZZMatrixElement/MELA/src/computeAngles.cc"
#include "ZZMatrixElement/MEMCalculators/interface/MEMCalculators.h"
//#include "CondFormats/JetMETObjects/interface/JetResolutionObject.h"
//#include "JetMETCorrections/Modules/interface/JetResolution.h"
using namespace std;
// using namespace RooFit;
// using namespace meMCFM;
using namespace MEMNames;
//using namespace JME;
const double Zmass = 91.188; // nominal Z boson mass
const double mPI = 3.141592654;
void HZZ4LeptonsAnalysis::Loop(Char_t *output)
{
if (fChain == 0) return;
// Declare MEM class
MEMs combinedMEM(13,125,"CTEQ6L");
// JME
// JME::JetParameters jetparameters;
// JME::JetResolution jetresolution;
// JME::JetResolutionScaleFactor jetresolution_sf;
// BNN
Char_t datasetChar[500],bnnOUT[500],eventsOUT[500];
cout << "The output file is " << output << endl;
TString out = output;
TString datasetName=out.ReplaceAll(".root","");
sprintf(datasetChar,"%s",datasetName.Data());
sprintf(bnnOUT,"%s_bnn.txt",datasetName.Data());
sprintf(eventsOUT,"%s_bnn.root",datasetName.Data());
cout << "bnnOUT= " << bnnOUT << endl;
bnn_file.open(bnnOUT);
bnn_file << "weight int_weight lept1_pt lept1_eta lept1_phi lept1_charge lept1_pfx lept1_sip lept2_pt lept2_eta lept2_phi lept2_charge lept2_pfx lept2_sip lept3_pt lept3_eta lept3_phi lept3_charge lept3_pfx lept3_sip lept4_pt lept4_eta lept4_phi lept4_charge lept4_pfx lept4_sip iso_max sip_max Z1mass Z2mass angle_costhetastar angle_costheta1 angle_costheta2 angle_phi angle_phistar1 KD psKD gravKD pt4l mass4l pfmet jet1_pt jet1_eta jet1_phi jet1_et jet2_pt jet2_eta jet2_phi jet2_et deltaetajj massjj VD njets pfmet mT dphi" << endl;
//bnn_file << "weight lept1_pt lept1_eta lept1_phi lept1_charge lept1_pfx lept1_sip lept2_pt lept2_eta lept2_phi lept2_charge lept2_pfx lept2_sip lept3_pt lept3_eta lept3_phi lept3_charge lept3_pfx lept3_sip lept4_pt lept4_eta lept4_phi lept4_charge lept4_pfx lept4_sip Z1mass Z2mass issamesign mass4l" << endl;
//bnn_file << " target weight mu1_pt mu1_eta mu1_phi mu1_charge mu1_trackIso mu1_EcalIso mu1_HcalIso mu1_X mu1_SIP mu2_pt mu2_eta mu2_phi mu2_charge mu2_trackIso mu2_EcalIso mu2_HcalIso mu2_X mu2_SIP mu3_pt mu3_eta mu3_phi mu3_charge mu3_trackIso mu3_EcalIso mu3_HcalIso mu3_X mu3_SIP mu4_pt mu4_eta mu4_phi mu4_charge mu4_trackIso mu4_EcalIso mu4_HcalIso mu4_X mu4_SIP worst_iso_X_mu second_worst_iso_X_mu worst_vertex second_worst_vertex mZ mZstar mbestH" << endl;
// Book txt file for candidate events
Char_t txtOUT[500];
sprintf(txtOUT,"%s_txt.txt",datasetName.Data());
cout << "Opening a txt file with candidate events " << txtOUT << endl;
ofstream output_txt;
output_txt.open(txtOUT);
Char_t txtOUT_VBF[500];
sprintf(txtOUT_VBF,"%s_txt_vbf.txt",datasetName.Data());
cout << "Opening a txt file with candidate events " << txtOUT_VBF << endl;
ofstream output_txt_vbf;
output_txt_vbf.open(txtOUT_VBF);
// isSignal DM
//TString signal="2HDM";
Bool_t isSignal=false;
//isSignal=(datasetName.Contains(signal));
isSignal=(datasetName.Contains("2HDM") || datasetName.Contains("Baryonic"));
cout << "isSignal= " << isSignal << endl;
char *basename(char *path);
cout << "Basename " << basename(datasetChar) << endl;
TString datasetBase=basename(datasetChar);
// pT reweigthing
if ( datasetBase.Contains("2HDM") && datasetBase.Contains("Target") ){
datasetBase=datasetBase.ReplaceAll("_reweighted","");
datasetBase=datasetBase.ReplaceAll("output_ZprimeToA0hToA0chichihZZTo4l_2HDM_13TeV-madgraph_","");
datasetBase=datasetBase.ReplaceAll("MZp-","");
datasetBase=datasetBase.ReplaceAll("MA0-","");
cout << "DatasetBase is= " << datasetBase.Data() << endl;
}
else if ( datasetBase.Contains("Baryonic") && datasetBase.Contains("Target") ){
datasetBase=datasetBase.ReplaceAll("_reweighted","");
datasetBase=datasetBase.ReplaceAll("output_MonoHZZ4l_ZpBaryonic_13TeV-madgraph_","");
datasetBase=datasetBase.ReplaceAll("MZp-","");
datasetBase=datasetBase.ReplaceAll("MChi-","");
cout << "DatasetBase is= " << datasetBase.Data() << endl;
}
TString ggH="GluGluHToZZTo4L";
Bool_t isggH=false;
TString ggHnew="SMHiggsToZZTo4L";
isggH=(datasetName.Contains(ggH) || datasetName.Contains(ggHnew));
cout << "isggH " << isggH << endl;
TString powheg15="powheg15";
Bool_t ispowheg15=false;
ispowheg15=datasetName.Contains(powheg15);
cout << "ispowheg15= " << int(ispowheg15) << endl;
TString vbf="VBF";
Bool_t isvbf=false;
isvbf=datasetName.Contains(vbf);
cout << "isvbf= " << int(isvbf) << endl;
TString mhstring=datasetBase.ReplaceAll("GluGluToHToZZTo4L_M-","");
mhstring=mhstring.ReplaceAll("VBF_HToZZTo4L_M-","");
mhstring=mhstring.ReplaceAll("SMHiggsToZZTo4L_M-","");
mhstring=mhstring.ReplaceAll("_7TeV-powheg-pythia6","");
mhstring=mhstring.ReplaceAll("_8TeV-powheg-pythia6","");
mhstring=mhstring.ReplaceAll("_7TeV-powheg15-pythia6","");
mhstring=mhstring.ReplaceAll("_8TeV-powheg15-pythia6","");
mhstring=mhstring.ReplaceAll("_8TeV-powheg15-JHUgenV3-pythia6","");
mhstring=mhstring.ReplaceAll("_7TeV-powheg15-JHUgenV3-pythia6","");
mhstring=mhstring.ReplaceAll("output_","");
cout << "mhstring=" << mhstring << endl;
float mHgen=0.;
mHgen=atof(mhstring.Data());
cout << "mHgen= " << mHgen << endl;
//pT gen reweighting
char histotitle[500];
sprintf(histotitle,"%s",datasetBase.Data());
TH1F *pTweighthisto;
TFile *f2HDM=TFile::Open("HISTOShapes2HDM_READ_ext.root");
TFile *fBaryonic=TFile::Open("HISTOShapesZpB_READ.root");
if ( datasetBase.Contains("2HDM") && datasetBase.Contains("Target")){
pTweighthisto=(TH1F*)f2HDM->Get(histotitle);
}
else if ( datasetBase.Contains("Baryonic") && datasetBase.Contains("Target")){
pTweighthisto=(TH1F*)fBaryonic->Get(histotitle);
}
// Pileup reweighting 2016 data vs Spring16 MC in 80x
TFile *_filePU;
//_filePU= TFile::Open("pileup_MC_80x_271036-276811_69200.root");
//TH1D *puweight = (TH1D*)_filePU->Get("puweight");
_filePU= TFile::Open("puWeightsMoriond17_v2.root");
TH1F *puweight = (TH1F*)_filePU->Get("weights");
/////////////Lepton Efficiency Scale Factrons/////////////
// Load histograms
//
TFile *mu_scale_factors = new TFile("final_HZZSF_pt0_200.root");
TH2F *mu_scale_2016 = (TH2F*)gDirectory->Get("FINAL");
// correction to the error
/*
TFile *ebe_corr2012= new TFile("ebeOverallCorrections.Legacy2013.v0.root");
TH2F *ebe_mu_reco53x= (TH2F*)gDirectory->Get("mu_reco53x");
TH2F *ebe_mu_mc53x= (TH2F*)gDirectory->Get("mu_mc53x");
TFile *ebe_corr2011= new TFile("ebeOverallCorrections.LegacyPaper.42x.root");
TH2F *ebe_mu_reco42x= (TH2F*)gDirectory->Get("mu_reco42x");
TH2F *ebe_mu_mc42x= (TH2F*)gDirectory->Get("mu_mc42x");
*/
// kfactor_ggZZ(float GENmassZZ, int finalState)
TString strSystTitle[9] ={
"Nominal",
"PDFScaleDn",
"PDFScaleUp",
"QCDScaleDn",
"QCDScaleUp",
"AsDn",
"AsUp",
"PDFReplicaDn",
"PDFReplicaUp"
};
TFile* fin = TFile::Open("Kfactor_Collected_ggHZZ_2l2l_NNLO_NNPDF_NarrowWidth_13TeV.root");
// Open the files
TSpline3* ggZZ_kf[9]={NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL};
for(int f=0;f<9;f++){
ggZZ_kf[f] = (TSpline3*)fin->Get(Form("sp_kfactor_%s", strSystTitle[f].Data()));
}
fin->Close();
// Book root file (for output):
TFile * theFile = new TFile(output,"RECREATE");
//TString Vars("Weight:Run:Event:LumiSection:massZ1:massZ2:mass4l:Iso_max:Sip_max:MELA:FSR");
//TNtuple * thePlots=new TNtuple("Candidates","Candidates",Vars);
// Clone tree for Z1
//TTree *z1tree = fChain->CloneTree(0);
double DELTAPHI( double , double ) ; //call the function
double invmass (float M1, float PT1, float ETA1, float PHI1, float M2, float PT2, float ETA2, float PHI2 );
// Book relevant variables -- counters:
int N_0 = 0; // MC truth & acceptance
int N_01 = 0;
int N_02 = 0;
int N_1 = 0; // Skim
int N_2 = 0;
int N_3a = 0;
int N_3_FSR = 0;
int N_3b = 0;
int N_4a = 0;
int N_4b = 0;
int N_4c = 0;
int N_4d = 0;
int N_5 = 0;
int N_6 = 0;
int N_7 = 0;
int N_7_PFMET = 0;
int N_8 = 0;
int N_8_a = 0;
int N_8_b = 0;
int N_9 = 0;
int N_9_1FSR = 0;
int N_9_2FSR = 0;
int N_9PS = 0;
int N_9GRAV = 0;
int N_9a_VBF = 0;
int N_9b_VBF = 0;
int N_9_PFMET = 0;
int N_VBF = 0;
int N_10 = 0;
int N_11 = 0;
// counter weighted
double N_0_w = 0; // MC truth & acceptance
double N_01_w = 0;
double N_02_w = 0;
double N_1_w = 0; // Skim
double N_2_w = 0;
double N_3a_w = 0;
double N_3_FSR_w = 0;
double N_3b_w = 0;
double N_4a_w = 0;
double N_4b_w = 0;
double N_4c_w = 0;
double N_4d_w = 0;
double N_5_w = 0;
double N_6_w = 0;
double N_7_w = 0;
double N_7_PFMET_w = 0;
double N_8_w = 0;
double N_8_a_w = 0;
double N_8_b_w = 0;
double N_9_w = 0;
double N_9_1FSR_w = 0;
double N_9_2FSR_w = 0;
double N_9PS_w = 0;
double N_9GRAV_w = 0;
double N_9a_VBF_w = 0;
double N_9b_VBF_w = 0;
double N_9_PFMET_w = 0;
double N_VBF_w = 0;
double N_10_w = 0;
double N_11_w = 0;
bool useMatchingRecoToGen=false;
// Book Histos ***
TH1D *nEvent_4l_w = new TH1D("nEvent_4l_w", "nEventComplete Weighted", 23, 0., 23.);
TH1D *nEvent_4l = new TH1D("nEvent_4l", "nEventComplete", 23, 0., 23.);
TH1D *nEvent_red = new TH1D("nEvent_red", "nEventCompleteReduced", 7, 0., 7.);
TH1D *nEvent_ZZ = new TH1D("nEvent_ZZ", "nEventCompleteFromZZ", 5, 0., 5.);
TH1F *hweight = new TH1F("hweight", "hweight",10000,0.,10.);
TH1F *hgenmu_eta = new TH1F("hgenmu_eta", "hgenmu_eta",2000,-10.,10.);
TH1F *hgenmu_pt = new TH1F("hgenmu_pt", "hgenmu_pt",5000,0.,500.);
TH1F *hgenmu_largeta = new TH1F("hgenmu_largeta", "hgenmu_largeta",2000,-10.,10.);
TH1F *hgenmu_pt_largeta = new TH1F("hgenmu_pt_largeta", "hgenmu_pt_largeeta",5000,0.,500.);
TH1F *hgenmu_p_largeta = new TH1F("hgenmu_p_largeta", "hgenmu_p_largeta",5000,0.,500.);
TH1F *Gen_H_MASS = new TH1F("Gen_H_MASS", "Gen_H_MASS",8000,0.,2000.);
TH1F *Gen_H_MASS_ReWeighted = new TH1F("Gen_H_MASS_ReWeighted", "Gen_H_MASS_ReWeighted",8000,0.,2000.);
TH1F *Gen_H_MASS_ReWeightedP = new TH1F("Gen_H_MASS_ReWeightedP", "Gen_H_MASS_ReWeightedP",8000,0.,2000.);
TH1F *Gen_H_MASS_ReWeightedM = new TH1F("Gen_H_MASS_ReWeightedM", "Gen_H_MASS_ReWeightedM",8000,0.,2000.);
// Pileup reweighting
TH1F *hPUvertices = new TH1F("hPUvertices", "hPUvertices",70,0.,70.);
TH1F *hPUvertices_ReWeighted = new TH1F("hPUvertices_ReWeighted", "hPUvertices_ReWeighted",70,0.,70.);
// pfmet with logaritmic bin width
const int NMBINS = 10;
const double MMIN = 1.0, MMAX = 10000.0;
double logMbins[NMBINS+1];
float binNormNr=0.;
for (int ibin = 0; ibin <= NMBINS; ibin++) {
logMbins[ibin] = exp(log(MMIN) + (log(MMAX)-log(MMIN))*ibin/NMBINS);
cout << logMbins[ibin] << endl;
}
const int NMOBINS = 5;
const double MOMIN = 0.0, MOMAX = 10000.0;
double loglinMbins[6]={0.,25.,50.,200., 500.,10000.};
// step 0
TH1F * hPtLep_0 = new TH1F("hPtLep_0", "Pt of Lep after selection step 0", 200 , -0.5 , 199.5 );
hPtLep_0->SetXTitle("pt_Lep1 (GeV)");
TH1F * hIsoLep_0 = new TH1F("hIsoLep_0", "Isolation of Lep after selection step 0", 2000 , -10., 10.);
hIsoLep_0->SetXTitle("Iso");
TH1F * hSipLep_0 = new TH1F("hSipLep_0", "Sip of Lep after selection step 0", 1000 , -20. , 40. );
hSipLep_0->SetXTitle("Sip");
TH1F * hDxyLep_0 = new TH1F("hDxyLep_0", "Dxy of Lep after selection step 0", 1000 , -20. , 40. );
hDxyLep_0->SetXTitle("d_{xy}");
TH1F * hDzLep_0 = new TH1F("hDzLep_0", "Dz of Lep after selection step 0", 1000 , -20. , 40. );
hDzLep_0->SetXTitle("d_{z}");
TH1F * hMuHitLep_0 = new TH1F("hMuHitLep_0", "Number of muon hits of Lep after selection step 0", 61 , -0.5 , 60.5 );
hMuHitLep_0->SetXTitle("N_{muon hits}");
TH1F * hPxHitLep_0 = new TH1F("hPxHitLep_0", "Number of pixel hits of Lep after selection step 0", 11 , -0.5 , 10.5 );
hPxHitLep_0->SetXTitle("N_{pixel hits}");
TH1F * hTKLayLep_0 = new TH1F("hTKLayLep_0", "Number of tracker layers of Lep after selection step 0", 11 , -0.5 , 10.5 );
hTKLayLep_0->SetXTitle("N_{TkLayers}");
TH1F * hTKIsoLep_0 = new TH1F("hTKIsoLep_0", "Trackerisolation (sum pT) of Lep after selection step 0", 1000 , 0. , 20.);
hTKIsoLep_0->SetXTitle("Tk Iso");
//step 3
TH1F * hMZ_3 = new TH1F("hMZ_3", "Mass of Z after selection step 3", 200 , -0.5 , 199.5 );
hMZ_3->SetXTitle("mass_Z (GeV)");
TH1F * hPtZ_3 = new TH1F("hPtZ_3", "Pt of Z after selection step 3", 200 , -0.5 , 199.5 );
hPtZ_3->SetXTitle("pt_Z1 (GeV)");
TH1F * hYZ_3 = new TH1F("hYZ_3", "Y of Z after selection step 3", 500 , -5. , 5.);
hYZ_3->SetXTitle("Y_Z");
TH1F * hPtLep_3 = new TH1F("hPtLep_3", "Pt of Lep after selection step 3", 500 , -0.5 , 499.5 );
hPtLep_3->SetXTitle("pt_Lep (GeV)");
TH1F * hYLep_3 = new TH1F("hEtaLep_3", "Y of Lep after selection step 3", 500 , -5. , 5. );
hYLep_3->SetXTitle("Y of Lep");
TH1F * hIsoLep_3 = new TH1F("hIsoLep_3", "Isolation of Lep after selection step 3", 2000 , -10., 10.);
hIsoLep_3->SetXTitle("Iso");
TH1F * hSipLep_3 = new TH1F("hSipLep_3", "Sip of Lep after selection step 3", 1000 , -20. , 40. );
hSipLep_3->SetXTitle("Sip");
TH1F * hIpLep_3 = new TH1F("hIpLep_3", "Ip of Lep after selection step 3", 1000 , -20. , 40. );
hIpLep_3->SetXTitle("Ip");
TH1F * hIpErLep_3 = new TH1F("hIpErLep_3", "IpEr of Lep after selection step 3", 1000 , 0. , 10. );
hIpErLep_3->SetXTitle("IpEr");
TH1F * hIso_3 = new TH1F("hIso_3", "Isolation maxima after selection step 3", 2000 , -10. , 10. );
hIso_3->SetXTitle("Iso");
TH1F * hSip_3 = new TH1F("hSip_3", "Sip maxima after selection step 3", 1000 , -20. , 40. );
hSip_3->SetXTitle("Sip");
TH1F * hIp_3 = new TH1F("hIp_3", "Ip maxima after selection step 3", 1000 , -20. , 40. );
hIp_3->SetXTitle("Ip");
TH1F * hDjj_3 = new TH1F("hDjj_3", "Delta jets vbf selection step 1", 200, -19.5, 19.5 );
hDjj_3->SetXTitle("Delta jets");
TH1F * hMjj_3 = new TH1F("hMjj_3", "Mass jets vbf selection step 1", 200, -0.5, 499.5 );
hMjj_3->SetXTitle("Mass jets");
TH1F * hVD_3 = new TH1F("hVD_3", "Discriminant vbf selection step 1", 200, -0.5, 9.5 );
hMjj_3->SetXTitle("Discriminant");
TH1F * hPFMET_3 = new TH1F("hPFMET_3", "PF MET after selection step 3", 10000 , 0., 10000.);
hPFMET_3->SetXTitle("PF MET");
// Build the histo with constant log bin width
TH1F *hLogXPFMET_3 = new TH1F("hLogXPFMET_3","hLogXPFMET_3",NMBINS, logMbins);
hLogXPFMET_3->Sumw2();
TH1F *hLogLinXPFMET_3 = new TH1F("hLogLinXPFMET_3","hLogLinXPFMET_3",NMOBINS, loglinMbins);
hLogLinXPFMET_3->Sumw2();
//step 5
TH1F * hM4l_5 = new TH1F("hM4l_5", "Mass of four leptons after selection step 5", 1200, 4.5,1204.5 );
hM4l_5->SetXTitle("4 lepton mass (GeV)");
TH1F * hMZ1_5 = new TH1F("hMZ1_5", "Mass of Z1 after selection step 5", 200 , -0.5 , 199.5 );
hMZ1_5->SetXTitle("mass_Z1 (GeV)");
TH1F * hPtZ1_5 = new TH1F("hPtZ1_5", "Pt of Z1 after selection step 5", 200 , -0.5 , 199.5 );
hPtZ1_5->SetXTitle("pt_Z1 (GeV)");
TH1F * hYZ1_5 = new TH1F("hYZ1_5", "Y of Z1 after selection step 5", 500 , -5. , 5.);
hYZ1_5->SetXTitle("Y_Z1");
TH1F * hMZ2_5 = new TH1F("hMZ2_5", "Mass of Z2 after selection step 5", 200 , -0.5 , 199.5 );
hMZ2_5->SetXTitle("mass_Z2 (GeV)");
TH1F * hPtZ2_5 = new TH1F("hPtZ2_5", "Pt of Z2 after selection step 5", 200 , -0.5 , 199.5 );
hPtZ2_5->SetXTitle("pt_Z2 (GeV)");
TH1F * hYZ2_5 = new TH1F("hYZ2_5", "Y of Z2 after selection step 5", 500 , -5. , 5. );
hYZ2_5->SetXTitle("Y_Z2");
TH1F * hPtLep1_5 = new TH1F("hPtLep1_5", "Pt of Lep1 after selection step 5", 200 , -0.5 , 199.5 );
hPtLep1_5->SetXTitle("pt_Lep1 (GeV)");
TH1F * hYLep1_5 = new TH1F("hEtaLep1_5", "Y of Lep1 after selection step 5", 500 , -5. , 5. );
hYLep1_5->SetXTitle("Y of Lep2");
TH1F * hIsoLep1_5 = new TH1F("hIsoLep1_5", "Isolation of Lep1 after selection step 5", 2000 , -10. , 10. );
hIsoLep1_5->SetXTitle("Iso");
TH1F * hSipLep1_5 = new TH1F("hSipLep1_5", "Sip of Lep1 after selection step 5", 1000 , -20. , 40. );
hSipLep1_5->SetXTitle("Sip");
TH1F * hIpLep1_5 = new TH1F("hIpLep1_5", "Ip of Lep1 after selection step 5", 1000 , -20. , 40. );
hIpLep1_5->SetXTitle("Ip");
TH1F * hIpErLep1_5 = new TH1F("hIpErLep1_5", "IpEr of Lep1 after selection step 5", 1000 , 0. , 10. );
hIpErLep1_5->SetXTitle("IpEr");
TH1F * hPtLep2_5 = new TH1F("hPtLep2_5", "Pt of Lep2 after selection step 5", 200 , -0.5 , 199.5 );
hPtLep2_5->SetXTitle("pt_Lep2 (GeV)");
TH1F * hYLep2_5 = new TH1F("hEtaLep2_5", "Y of Lep2 after selection step 5", 500 , -5. , 5. );
hYLep2_5->SetXTitle("Y of Lep2");
TH1F * hIsoLep2_5 = new TH1F("hIsoLep2_5", "Isolation of Lep2 after selection step 5", 2000 , -10. , 10. );
hIsoLep2_5->SetXTitle("Iso");
TH1F * hSipLep2_5 = new TH1F("hSipLep2_5", "Sip of Lep2 after selection step 5", 1000 , -20. , 40. );
hSipLep2_5->SetXTitle("Sip");
TH1F * hIpLep2_5 = new TH1F("hIpLep2_5", "Ip of Lep2 after selection step 5", 1000 , -20. , 40. );
hIpLep2_5->SetXTitle("Ip");
TH1F * hIpErLep2_5 = new TH1F("hIpErLep2_5", "IpEr of Lep2 after selection step 5", 1000 , 0. , 10. );
hIpErLep2_5->SetXTitle("IpEr");
TH1F * hPtLep3_5 = new TH1F("hPtLep3_5", "Pt of Lep3 after selection step 5", 200 , -0.5 , 199.5 );
hPtLep3_5->SetXTitle("pt_Lep3 (GeV)");
TH1F * hYLep3_5 = new TH1F("hEtaLep3_5", "Y of Lep3 after selection step 5", 500 , -5. , 5. );
hYLep3_5->SetXTitle("Y of Lep2");
TH1F * hIsoLep3_5 = new TH1F("hIsoLep3_5", "Isolation of Lep3 after selection step 5", 2000 , -10. , 10. );
hIsoLep3_5->SetXTitle("Iso");
TH1F * hSipLep3_5 = new TH1F("hSipLep3_5", "Sip of Lep3 after selection step 5", 1000 , -20. , 40. );
hSipLep3_5->SetXTitle("Sip");
TH1F * hIpLep3_5 = new TH1F("hIpLep3_5", "Ip of Lep3 after selection step 5", 1000 , -20. , 40. );
hIpLep3_5->SetXTitle("Ip");
TH1F * hIpErLep3_5 = new TH1F("hIpErLep3_5", "IpEr of Lep3 after selection step 5", 1000 , 0. , 10. );
hIpErLep3_5->SetXTitle("IpEr");
TH1F * hPtLep4_5 = new TH1F("hPtLep4_5", "Pt of Lep4 after selection step 5", 200 , -0.5 , 199.5 );
hPtLep4_5->SetXTitle("pt_Lep4 (GeV)");
TH1F * hYLep4_5 = new TH1F("hEtaLep4_5", "Y of Lep4 after selection step 5", 50 , -5. , 5. );
hYLep4_5->SetXTitle("Y of Lep2");
TH1F * hIsoLep4_5 = new TH1F("hIsoLep4_5", "Isolation of Lep4 after selection step 5", 2000 , -10. , 10. );
hIsoLep4_5->SetXTitle("Iso");
TH1F * hSipLep4_5 = new TH1F("hSipLep4_5", "Sip of Lep4 after selection step 5", 1000 , -20. , 40. );
hSipLep4_5->SetXTitle("Sip");
TH1F * hIpLep4_5 = new TH1F("hIpLep4_5", "Ip of Lep4 after selection step 5", 1000 , -20. , 40. );
hIpLep4_5->SetXTitle("Ip");
TH1F * hIpErLep4_5 = new TH1F("hIpErLep4_5", "IpEr of Lep4 after selection step 5", 1000 , 0. , 10. );
hIpErLep4_5->SetXTitle("IpEr");
TH1F * hIso_5 = new TH1F("hIso_5", "Isolation maxima after selection step 5", 2000 , -10. , 10. );
hIso_5->SetXTitle("Iso");
TH1F * hSip_5 = new TH1F("hSip_5", "Sip maxima after selection step 5", 1000 , -20. , 40. );
hSip_5->SetXTitle("Sip");
TH1F * hIp_5 = new TH1F("hIp_5", "Ip maxima after selection step 5", 1000 , -20. , 40. );
hIp_5->SetXTitle("Ip");
//step 6
TH1F * hminMll_6 = new TH1F("hminMll_6", "minMll at selection step 6", 400 , 0. , 200.);
hminMll_6->SetXTitle("minMll (GeV)");
//step 7
TH1F *hM4lres_7_bin1 = new TH1F("hM4lres_7_bin1", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin2 = new TH1F("hM4lres_7_bin2", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin3 = new TH1F("hM4lres_7_bin3", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin4 = new TH1F("hM4lres_7_bin4", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin5 = new TH1F("hM4lres_7_bin5", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin6 = new TH1F("hM4lres_7_bin6", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin7 = new TH1F("hM4lres_7_bin7", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin8 = new TH1F("hM4lres_7_bin8", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin9 = new TH1F("hM4lres_7_bin9", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lres_7_bin10 = new TH1F("hM4lres_7_bin10", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hpT4lres_7_bin1 = new TH1F("hpT4lres_7_bin1", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin2 = new TH1F("hpT4lres_7_bin2", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin3 = new TH1F("hpT4lres_7_bin3", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin4 = new TH1F("hpT4lres_7_bin4", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin5 = new TH1F("hpT4lres_7_bin5", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin6 = new TH1F("hpT4lres_7_bin6", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin7 = new TH1F("hpT4lres_7_bin7", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin8 = new TH1F("hpT4lres_7_bin8", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin9 = new TH1F("hpT4lres_7_bin9", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4lres_7_bin10 = new TH1F("hpT4lres_7_bin10", "pT of four leptons in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin1 = new TH1F("hpT1res_7_bin1", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin1 = new TH1F("hpT2res_7_bin1", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin1 = new TH1F("hpT3res_7_bin1", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin1 = new TH1F("hpT4res_7_bin1", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin2 = new TH1F("hpT1res_7_bin2", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin2 = new TH1F("hpT2res_7_bin2", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin2 = new TH1F("hpT3res_7_bin2", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin2 = new TH1F("hpT4res_7_bin2", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin3 = new TH1F("hpT1res_7_bin3", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin3 = new TH1F("hpT2res_7_bin3", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin3 = new TH1F("hpT3res_7_bin3", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin3 = new TH1F("hpT4res_7_bin3", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin4 = new TH1F("hpT1res_7_bin4", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin4 = new TH1F("hpT2res_7_bin4", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin4 = new TH1F("hpT3res_7_bin4", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin4 = new TH1F("hpT4res_7_bin4", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin5 = new TH1F("hpT1res_7_bin5", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin5 = new TH1F("hpT2res_7_bin5", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin5 = new TH1F("hpT3res_7_bin5", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin5 = new TH1F("hpT4res_7_bin5", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin6 = new TH1F("hpT1res_7_bin6", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin6 = new TH1F("hpT2res_7_bin6", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin6 = new TH1F("hpT3res_7_bin6", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin6 = new TH1F("hpT4res_7_bin6", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin7 = new TH1F("hpT1res_7_bin7", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin7 = new TH1F("hpT2res_7_bin7", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin7 = new TH1F("hpT3res_7_bin7", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin7 = new TH1F("hpT4res_7_bin7", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin8 = new TH1F("hpT1res_7_bin8", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin8 = new TH1F("hpT2res_7_bin8", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin8 = new TH1F("hpT3res_7_bin8", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin8 = new TH1F("hpT4res_7_bin8", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin9 = new TH1F("hpT1res_7_bin9", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin9 = new TH1F("hpT2res_7_bin9", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin9 = new TH1F("hpT3res_7_bin9", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin9 = new TH1F("hpT4res_7_bin9", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT1res_7_bin10 = new TH1F("hpT1res_7_bin10", "pT1 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT2res_7_bin10 = new TH1F("hpT2res_7_bin10", "pT2 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT3res_7_bin10 = new TH1F("hpT3res_7_bin10", "pT3 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hpT4res_7_bin10 = new TH1F("hpT4res_7_bin10", "pT4 in eta bin after selection step 7", 2000,0.,200.);
TH1F *hM4lresol_7_bin1 = new TH1F("hM4lresol_7_bin1", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresol_7_bin2 = new TH1F("hM4lresol_7_bin2", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresol_7_bin3 = new TH1F("hM4lresol_7_bin3", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresol_7_bin4 = new TH1F("hM4lresol_7_bin4", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresol_7_bin5 = new TH1F("hM4lresol_7_bin5", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresol_7_bin6 = new TH1F("hM4lresol_7_bin6", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresolut_7_bin1 = new TH1F("hM4lresolut_7_bin1", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresolut_7_bin2 = new TH1F("hM4lresolut_7_bin2", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresolut_7_bin3 = new TH1F("hM4lresolut_7_bin3", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresolut_7_bin4 = new TH1F("hM4lresolut_7_bin4", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresolution_7_bin1 = new TH1F("hM4lresolution_7_bin1", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresolution_7_bin2 = new TH1F("hM4lresolution_7_bin2", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lresolution_7_bin3 = new TH1F("hM4lresolution_7_bin3", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH2F *hM4lres_vs_largeta_7 = new TH2F("hM4lres_vs_largeta_7", "Mass resolution of four leptons vs larget MC eta after selection step 7", 2000,-4.,4.,2000,-10.,10.);
hM4lres_vs_largeta_7->SetXTitle("4 lepton mass resolution (GeV) vs max eta");
TProfile *hM4lresProfEta_7 = new TProfile("hM4lresProfEta_7", "Profile of Mass resolution of four leptons vs large MC eta after selection step 7", 30,0.,4.,-10.,10.);
TH1F *hM4lZres_7_bin1 = new TH1F("hM4lZres_7_bin1", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin2 = new TH1F("hM4lZres_7_bin2", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin3 = new TH1F("hM4lZres_7_bin3", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin4 = new TH1F("hM4lZres_7_bin4", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin5 = new TH1F("hM4lZres_7_bin5", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin6 = new TH1F("hM4lZres_7_bin6", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin7 = new TH1F("hM4lZres_7_bin7", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin8 = new TH1F("hM4lZres_7_bin8", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin9 = new TH1F("hM4lZres_7_bin9", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hM4lZres_7_bin10 = new TH1F("hM4lZres_7_bin10", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
TH1F *hrecomu_largeta = new TH1F("hrecomu_largeta", "hrecomu_largeta",2000,-10.,10.);
TH1F *hrecomu_pt_largeta = new TH1F("hrecomu_pt_largeta", "hrecomu_pt_largeeta",5000,0.,500.);
TH1F *hrecomu_p_largeta = new TH1F("hrecomu_p_largeta", "hrecomu_p_largeta",5000,0.,500.);
TH1F * hM4l_7 = new TH1F("hM4l_7", "Mass of four leptons after selection step 7", 1200, 4.5,1204.5 );
hM4l_7->SetXTitle("4 lepton mass (GeV)");
TH1F *hM4lres_7 = new TH1F("hM4lres_7", "Mass residual of four leptons after selection step 7", 2000,-10.,10.);
hM4lres_7->SetXTitle("4 lepton mass residual (GeV)");
TH1F * hMZ1_7 = new TH1F("hMZ1_7", "Mass of Z1 after selection step 7", 200 , -0.5 , 199.5);
hMZ1_7->SetXTitle("mass_Z1 (GeV)");
TH1F * hPtZ1_7 = new TH1F("hPtZ1_7", "Pt of Z1 after selection step 7", 200 , -0.5 , 199.5);
hPtZ1_7->SetXTitle("pt_Z1 (GeV)");
TH1F * hYZ1_7 = new TH1F("hYZ1_7", "Y of Z1 after selection step 7", 500 , -5. , 5.);
hYZ1_7->SetXTitle("Y_Z1");
TH1F * hMZ2_7 = new TH1F("hMZ2_7", "Mass of Z2 after selection step 7", 200 , -0.5 , 199.5);
hMZ2_7->SetXTitle("mass_Z2 (GeV)");
TH1F * hPtZ2_7 = new TH1F("hPtZ2_7", "Pt of Z2 after selection step 7", 200 , -0.5 , 199.5);
hPtZ2_7->SetXTitle("pt_Z2 (GeV)");
TH1F * hYZ2_7 = new TH1F("hYZ2_7", "Y of Z2 after selection step 7", 500 , -5. , 5.);
hYZ2_7->SetXTitle("Y_Z2");
TH1F * hPtLep1_7 = new TH1F("hPtLep1_7", "Pt of Lep1 after selection step 7", 200 , -0.5 , 199.5 );
hPtLep1_7->SetXTitle("pt_Lep1 (GeV)");
TH1F * hYLep1_7 = new TH1F("hEtaLep1_7", "Y of Lep1 after selection step 7", 500 , -5. , 5. );
hYLep1_7->SetXTitle("Y of Lep2");
TH1F * hIsoLep1_7 = new TH1F("hIsoLep1_7", "Isolation of Lep1 after selection step 7", 2000 , -10. , 10. );
hIsoLep1_7->SetXTitle("Iso");
TH1F * hSipLep1_7 = new TH1F("hSipLep1_7", "Sip of Lep1 after selection step 7", 1000 , -20. , 40. );
hSipLep1_7->SetXTitle("Sip");
TH1F * hIpLep1_7 = new TH1F("hIpLep1_7", "Ip of Lep1 after selection step 7", 1000 , -20. , 40. );
hIpLep1_7->SetXTitle("Ip");
TH1F * hIpErLep1_7 = new TH1F("hIpErLep1_7", "IpEr of Lep1 after selection step 7", 1000 , 0. , 10. );
hIpErLep1_7->SetXTitle("IpEr");
TH1F * hPtLep2_7 = new TH1F("hPtLep2_7", "Pt of Lep2 after selection step 7", 200 , -0.5 , 199.5 );
hPtLep2_7->SetXTitle("pt_Lep2 (GeV)");
TH1F * hYLep2_7 = new TH1F("hEtaLep2_7", "Y of Lep2 after selection step 7", 500 , -5. , 5. );
hYLep2_7->SetXTitle("Y of Lep2");
TH1F * hIsoLep2_7 = new TH1F("hIsoLep2_7", "Isolation of Lep2 after selection step 7", 2000 , -10. , 10. );
hIsoLep2_7->SetXTitle("Iso");
TH1F * hSipLep2_7 = new TH1F("hSipLep2_7", "Sip of Lep2 after selection step 7", 1000 , -20. , 40. );
hSipLep2_7->SetXTitle("Sip");
TH1F * hIpLep2_7 = new TH1F("hIpLep2_7", "Ip of Lep2 after selection step 7", 1000 , -20. , 40. );
hIpLep2_7->SetXTitle("Ip");
TH1F * hIpErLep2_7 = new TH1F("hIpErLep2_7", "IpEr of Lep2 after selection step 7", 1000 , 0. , 10. );
hIpErLep2_7->SetXTitle("IpEr");
TH1F * hPtLep3_7 = new TH1F("hPtLep3_7", "Pt of Lep3 after selection step 7", 200 , -0.5 , 199.5 );
hPtLep3_7->SetXTitle("pt_Lep3 (GeV)");
TH1F * hYLep3_7 = new TH1F("hEtaLep3_7", "Y of Lep3 after selection step 7", 500 , -5. , 5. );
hYLep3_7->SetXTitle("Y of Lep2");
TH1F * hIsoLep3_7 = new TH1F("hIsoLep3_7", "Isolation of Lep3 after selection step 7", 2000 , -10. , 10. );
hIsoLep3_7->SetXTitle("Iso");
TH1F * hSipLep3_7 = new TH1F("hSipLep3_7", "Sip of Lep3 after selection step 7", 1000 , -20. , 40. );
hSipLep3_7->SetXTitle("Sip");
TH1F * hIpLep3_7 = new TH1F("hIpLep3_7", "Ip of Lep3 after selection step 7", 1000 , -20. , 40. );
hIpLep3_7->SetXTitle("Ip");
TH1F * hIpErLep3_7 = new TH1F("hIpErLep3_7", "IpEr of Lep3 after selection step 7", 1000 , 0. , 10. );
hIpErLep3_7->SetXTitle("IpEr");
TH1F * hPtLep4_7 = new TH1F("hPtLep4_7", "Pt of Lep4 after selection step 7", 200 , -0.5 , 199.5 );
hPtLep4_7->SetXTitle("pt_Lep4 (GeV)");
TH1F * hYLep4_7 = new TH1F("hEtaLep4_7", "Y of Lep4 after selection step 7", 500 , -5. , 5. );
hYLep4_7->SetXTitle("Y of Lep2");
TH1F * hIsoLep4_7 = new TH1F("hIsoLep4_7", "Isolation of Lep4 after selection step 7", 2000 , -10. , 10. );
hIsoLep4_7->SetXTitle("Iso");
TH1F * hSipLep4_7 = new TH1F("hSipLep4_7", "Sip of Lep4 after selection step 7", 1000 , -20. , 40. );
hSipLep4_7->SetXTitle("Sip");
TH1F * hIpLep4_7 = new TH1F("hIpLep4_7", "Ip of Lep4 after selection step 7", 1000 , -20. , 40. );
hIpLep4_7->SetXTitle("Ip");
TH1F * hIpErLep4_7 = new TH1F("hIpErLep4_7", "IpEr of Lep4 after selection step 7", 1000 , 0. , 10. );
hIpErLep4_7->SetXTitle("IpEr");
TH1F * hIso_7 = new TH1F("hIso_7", "Isolation maxima after selection step 7", 2000 , -10. , 10. );
hIso_7->SetXTitle("Iso");
TH1F * hSip_7 = new TH1F("hSip_7", "Sip maxima after selection step 7", 1000 , -20. , 40. );
hSip_7->SetXTitle("Sip");
TH1F * hIp_7 = new TH1F("hIp_7", "Ip maxima after selection step 7", 1000 , -20. , 40. );
hIp_7->SetXTitle("Ip");
TH1F * hPFMET_7 = new TH1F("hPFMET_7", "PF MET after selection step 7", 10000 , 0., 10000.);
hPFMET_7->SetXTitle("PF MET (GeV)");
TH1F * hDPHI_7 = new TH1F("DPHI_7", "polar angle between 4l and E_{T,miss}", 1000, 0., 5. );
hDPHI_7->SetXTitle("#DELTA#phi(4l,E_{T,miss})");
//step 8
TH1F * hM4l_8 = new TH1F("hM4l_8", "Mass of four leptons after selection step 8", 1200, 4.5, 1204.5 );
hM4l_8->SetXTitle("4 lepton mass (GeV)");
TH1F * hM4l_8_100_800 = new TH1F("hM4l_8_100_800", "Mass of four leptons after selection step 8", 1200, 4.5,1204.5 );
hM4l_8_100_800->SetXTitle("4 lepton mass (GeV)");
TH1F * hMZ1_8 = new TH1F("hMZ1_8", "Mass of Z1 after selection step 8", 200 , -0.5 , 199.5 );
hMZ1_8->SetXTitle("mass_Z1 (GeV)");
TH1F * hPtZ1_8 = new TH1F("hPtZ1_8", "Pt of Z1 after selection step 8", 200 , -0.5 , 199.5 );
hPtZ1_8->SetXTitle("pt_Z1 (GeV)");
TH1F * hYZ1_8 = new TH1F("hYZ1_8", "Y of Z1 after selection step 8", 500 , -5. , 5.);
hYZ1_8->SetXTitle("Y_Z1");
TH1F * hMZ2_8 = new TH1F("hMZ2_8", "Mass of Z2 after selection step 8", 200 , -0.5 , 199.5 );
hMZ2_8->SetXTitle("mass_Z2 (GeV)");
TH1F * hPtZ2_8 = new TH1F("hPtZ2_8", "Pt of Z2 after selection step 8", 200 , -0.5 , 199.5 );
hPtZ2_8->SetXTitle("pt_Z2 (GeV)");
TH1F * hYZ2_8 = new TH1F("hYZ2_8", "Y of Z2 after selection step 8", 500 , -5. , 5. );
hYZ2_8->SetXTitle("Y_Z2");
TH1F * hPtLep1_8 = new TH1F("hPtLep1_8", "Pt of Lep1 after selection step 8", 200 , -0.5 , 199.5 );
hPtLep1_8->SetXTitle("pt_Lep1 (GeV)");
TH1F * hYLep1_8 = new TH1F("hEtaLep1_8", "Y of Lep1 after selection step 8", 500 , -5. , 5. );
hYLep1_8->SetXTitle("Y of Lep2");
TH1F * hIsoLep1_8 = new TH1F("hIsoLep1_8", "Isolation of Lep1 after selection step 8", 2000 , -10. , 10. );
hIsoLep1_8->SetXTitle("Iso");
TH1F * hSipLep1_8 = new TH1F("hSipLep1_8", "Sip of Lep1 after selection step 8", 1000 , -20. , 40. );
hSipLep1_8->SetXTitle("Sip");
TH1F * hIpLep1_8 = new TH1F("hIpLep1_8", "Ip of Lep1 after selection step 8", 1000 , -20. , 40. );
hIpLep1_8->SetXTitle("Ip");
TH1F * hIpErLep1_8 = new TH1F("hIpErLep1_8", "IpEr of Lep1 after selection step 8", 1000 , 0. , 10. );
hIpErLep1_8->SetXTitle("IpEr");
TH1F * hPtLep2_8 = new TH1F("hPtLep2_8", "Pt of Lep2 after selection step 8", 200 , -0.5 , 199.5 );
hPtLep2_8->SetXTitle("pt_Lep2 (GeV)");
TH1F * hYLep2_8 = new TH1F("hEtaLep2_8", "Y of Lep2 after selection step 8", 500 , -5. , 5. );
hYLep2_8->SetXTitle("Y of Lep2");
TH1F * hIsoLep2_8 = new TH1F("hIsoLep2_8", "Isolation of Lep2 after selection step 8", 2000 , -10. , 10. );
hIsoLep2_8->SetXTitle("Iso");
TH1F * hSipLep2_8 = new TH1F("hSipLep2_8", "Sip of Lep2 after selection step 8", 1000 , -20. , 40. );
hSipLep2_8->SetXTitle("Sip");
TH1F * hIpLep2_8 = new TH1F("hIpLep2_8", "Ip of Lep2 after selection step 8", 1000 , -20. , 40. );
hIpLep2_8->SetXTitle("Ip");
TH1F * hIpErLep2_8 = new TH1F("hIpErLep2_8", "IpEr of Lep2 after selection step 8", 1000 , 0. , 10. );
hIpErLep2_8->SetXTitle("IpEr");
TH1F * hPtLep3_8 = new TH1F("hPtLep3_8", "Pt of Lep3 after selection step 8", 200 , -0.5 , 199.5 );
hPtLep3_8->SetXTitle("pt_Lep3 (GeV)");
TH1F * hYLep3_8 = new TH1F("hEtaLep3_8", "Y of Lep3 after selection step 8", 500 , -5. , 5. );
hYLep3_8->SetXTitle("Y of Lep2");
TH1F * hIsoLep3_8 = new TH1F("hIsoLep3_8", "Isolation of Lep3 after selection step 8", 2000 , -10. , 10. );
hIsoLep3_8->SetXTitle("Iso");
TH1F * hSipLep3_8 = new TH1F("hSipLep3_8", "Sip of Lep3 after selection step 8", 1000 , -20. , 40. );
hSipLep3_8->SetXTitle("Sip");
TH1F * hIpLep3_8 = new TH1F("hIpLep3_8", "Ip of Lep3 after selection step 8", 1000 , -20. , 40. );
hIpLep3_8->SetXTitle("Ip");
TH1F * hIpErLep3_8 = new TH1F("hIpErLep3_8", "IpEr of Lep3 after selection step 8", 1000 , 0. , 10. );
hIpErLep3_8->SetXTitle("IpEr");
TH1F * hPtLep4_8 = new TH1F("hPtLep4_8", "Pt of Lep4 after selection step 8", 200 , -0.5 , 199.5 );
hPtLep4_8->SetXTitle("pt_Lep4 (GeV)");
TH1F * hYLep4_8 = new TH1F("hEtaLep4_8", "Y of Lep4 after selection step 8", 500 , -5. , 5. );
hYLep4_8->SetXTitle("Y of Lep2");
TH1F * hIsoLep4_8 = new TH1F("hIsoLep4_8", "Isolation of Lep4 after selection step 8", 2000 , -10. , 10. );
hIsoLep4_8->SetXTitle("Iso");
TH1F * hSipLep4_8 = new TH1F("hSipLep4_8", "Sip of Lep4 after selection step 8", 1000 , -20. , 40. );
hSipLep4_8->SetXTitle("Sip");
TH1F * hIpLep4_8 = new TH1F("hIpLep4_8", "Ip of Lep4 after selection step 8", 1000 , -20. , 40. );
hIpLep4_8->SetXTitle("Ip");
TH1F * hIpErLep4_8 = new TH1F("hIpErLep4_8", "IpEr of Lep4 after selection step 8", 1000 , 0. , 10. );
hIpErLep4_8->SetXTitle("IpEr");
TH1F * hIso_8 = new TH1F("hIso_8", "Isolation maxima after selection step 8", 2000 , -10. , 10. );
hIso_8->SetXTitle("Iso");
TH1F * hSip_8 = new TH1F("hSip_8", "Sip maxima after selection step 8", 1000 , -20. , 40. );
hSip_8->SetXTitle("Sip");
TH1F * hIp_8 = new TH1F("hIp_8", "Ip maxima after selection step 8", 1000 , -20. , 40. );
hIp_8->SetXTitle("Ip");
TH1F * hDjj_8 = new TH1F("hDjj_8", "Delta jets vbf selection step 8", 200, -19.5, 19.5 );
hDjj_8->SetXTitle("Delta jets");
TH1F * hMjj_8 = new TH1F("hMjj_8", "Mass jets vbf selection step 8", 200, -0.5, 499.5 );
hMjj_8->SetXTitle("Mass jets");
TH1F * hVD_8 = new TH1F("hVD_8", "Discriminant vbf selection step 8", 200, -0.5, 9.5 );
hMjj_8->SetXTitle("Discriminant");
TH2F * hMjj_Djj_8 = new TH2F("hMjj_Djj_8", "Mjj vs Djj selection step 8", 200, -0.5,499.5,200,-19.5, 19.5 );
hMjj_Djj_8->SetXTitle("Mjj_vs_Djj");
//no FSR
TH1F * hMZ1_noFSR_8 = new TH1F("hMZ1_noFSR_8", "Mass of Z1 after selection step 8 _noFSR", 200 , -0.5 , 199.5 );
hMZ1_8->SetXTitle("mass_Z1 (GeV)");
TH1F * hMZ2_noFSR_8 = new TH1F("hMZ2_noFSR_8", "Mass of Z2 after selection step 8 _noFSR", 200 , -0.5 , 199.5 );
hMZ2_8->SetXTitle("mass_Z2 (GeV)");
TH1F * hPFMET_8 = new TH1F("hPFMET_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_8->SetXTitle("PF MET");
TH1F * hM4l_T_8 = new TH1F("hM4l_T_8", "Transverse Mass of four leptons after full selection + MET", 1200, 4.5, 1204.5 );
hM4l_T_8->SetXTitle("m_{T} + PF MET (GeV)");
TH1F *hLogLinXM4l_T_8 = new TH1F("hLogLinXM4l_T_8","hLogLinXM4l_T_8",NMOBINS, loglinMbins);
hLogLinXM4l_T_8->Sumw2();
TH1F * hDPHI_8 = new TH1F("DPHI_8", "polar angle between 4l and E_{T,miss}", 1000, 0., 5. );
hDPHI_8->SetXTitle("#DELTA#phi(4l,E_{T,miss})");
TH1D * hNgood_8 = new TH1D("hNgood", "Number of good leptons", 10, -0.5, 9.5);
hNgood_8->SetXTitle("# good leptons");
TH1D * hNbjets_8 = new TH1D("hNbjets", "Number of b jets", 10, -0.5, 9.5);
hNbjets_8->SetXTitle("# b-jets");
// Build the histo with constant log bin width
TH1F *hLogXPFMET_8 = new TH1F("hLogXPFMET_8","hLogXPFMET_8",NMBINS, logMbins);
hLogXPFMET_8->Sumw2();
TH1F *hLogLinXPFMET_8 = new TH1F("hLogLinXPFMET_8","hLogLinXPFMET_8",NMOBINS, loglinMbins);
hLogLinXPFMET_8->Sumw2();
TH1F * hPFMET_JetEnUp_8= new TH1F("hPFMET_JetEnUp_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_JetEnUp_8->Sumw2();
TH1F * hPFMET_JetEnDn_8= new TH1F("hPFMET_JetEnDn_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_JetEnDn_8->Sumw2();
TH1F * hPFMET_ElectronEnUp_8= new TH1F("hPFMET_ElectronEnUp_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_ElectronEnUp_8->Sumw2();
TH1F * hPFMET_ElectronEnDn_8= new TH1F("hPFMET_ElectronEnDn_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_ElectronEnDn_8->Sumw2();
TH1F * hPFMET_MuonEnUp_8= new TH1F("hPFMET_MuonEnUp_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_MuonEnUp_8->Sumw2();
TH1F * hPFMET_MuonEnDn_8= new TH1F("hPFMET_MuonEnDn_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_MuonEnDn_8->Sumw2();
TH1F * hPFMET_JetResUp_8= new TH1F("hPFMET_JetResUp_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_JetResUp_8->Sumw2();
TH1F * hPFMET_JetResDn_8= new TH1F("hPFMET_JetResDn_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_JetResDn_8->Sumw2();
TH1F * hPFMET_UnclusteredEnUp_8= new TH1F("hPFMET_UnclusteredEnUp_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_UnclusteredEnUp_8->Sumw2();
TH1F * hPFMET_UnclusteredEnDn_8= new TH1F("hPFMET_UnclusteredEnDn_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_UnclusteredEnDn_8->Sumw2();
TH1F * hPFMET_PhotonEnUp_8= new TH1F("hPFMET_PhotonEnUp_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_PhotonEnUp_8->Sumw2();
TH1F * hPFMET_PhotonEnDn_8= new TH1F("hPFMET_PhotonEnDn_8", "PF MET after selection step 8", 10000 , 0., 10000.);
hPFMET_PhotonEnDn_8->Sumw2();
// Step 8a with m4l window cut
TH1F * hPFMET_8a = new TH1F("hPFMET_8a", "PF MET after selection step 8a", 10000 , 0., 10000.);
hPFMET_8a->SetXTitle("PF MET (GeV)");
TH1F *hLogLinXPFMET_8a = new TH1F("hLogLinXPFMET_8a","hLogLinXPFMET_8a",NMOBINS, loglinMbins);
hLogLinXPFMET_8a->Sumw2();
TH1F * hM4l_T_8a = new TH1F("hM4l_T_8a", "Transverse Mass of four leptons after full selection + MET", 1200, 4.5, 1204.5 );
hM4l_T_8a->SetXTitle("m_{T} + PF MET (GeV)");
TH1F * hDPHI_8a = new TH1F("DPHI_8a", "polar angle between 4l and E_{T,miss}", 1000, 0., 5. );
hDPHI_8a->SetXTitle("#DELTA#phi(4l,E_{T,miss})");
TH1D * hNgood_8a = new TH1D("hNgood_8a", "Number of good leptons", 10, -0.5, 9.5);
hNgood_8a->SetXTitle("# good leptons");
TH1D * hNbjets_8a = new TH1D("hNbjets_8a", "Number of b jets", 10, -0.5, 9.5);
hNbjets_8a->SetXTitle("# b-jets");
// Step 8b with mZ window cut
TH1F * hPFMET_8b = new TH1F("hPFMET_8b", "PF MET after selection step 8b", 10000 , 0., 10000.);
hPFMET_8b->SetXTitle("PF MET (GeV)");
TH1F *hLogLinXPFMET_8b = new TH1F("hLogLinXPFMET_8b","hLogLinXPFMET_8b",NMOBINS, loglinMbins);
hLogLinXPFMET_8b->Sumw2();
// Step 9 with PFMET cut
TH1F * hM4l_9 = new TH1F("hM4l_9", "Mass of four leptons after selection step 9", 1200, 4.5, 1204.5 );
hM4l_9->SetXTitle("4 lepton mass (GeV)");
TH1F * hPFMET_9 = new TH1F("hPFMET_9", "PF MET after selection step 9", 10000 , 0., 10000.);
hPFMET_9->SetXTitle("PF MET (GeV)");
TH1F * hM4l_T_9 = new TH1F("hM4l_T_9", "Transverse Mass of four leptons after full selection + MET", 1200, 4.5, 1204.5 );
hM4l_T_9->SetXTitle("m_{T} + PF MET (GeV)");
TH1F * hDPHI_9 = new TH1F("DPHI_9", "polar angle between 4l and E_{T,miss}", 1000, 0., 5. );
hDPHI_9->SetXTitle("#DELTA#phi(4l,E_{T,miss})");
TH1D * hNgood_9 = new TH1D("hNgood_9", "Number of good leptons", 10, -0.5, 9.5);
hNgood_9->SetXTitle("# good leptons");
TH1D * hNbjets_9 = new TH1D("hNbjets_9", "Number of b jets", 10, -0.5, 9.5);
hNbjets_9->SetXTitle("# b-jets");
// Step 10 with signal region cuts
TH1F * hPFMET_10 = new TH1F("hPFMET_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_10->SetXTitle("PF MET (GeV)");
hPFMET_10->Sumw2();
TH1F * hPFMET_JetEnUp_10= new TH1F("hPFMET_JetEnUp_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_JetEnUp_10->Sumw2();
TH1F * hPFMET_JetEnDn_10= new TH1F("hPFMET_JetEnDn_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_JetEnDn_10->Sumw2();
TH1F * hPFMET_ElectronEnUp_10= new TH1F("hPFMET_ElectronEnUp_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_ElectronEnUp_10->Sumw2();
TH1F * hPFMET_ElectronEnDn_10= new TH1F("hPFMET_ElectronEnDn_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_ElectronEnDn_10->Sumw2();
TH1F * hPFMET_MuonEnUp_10= new TH1F("hPFMET_MuonEnUp_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_MuonEnUp_10->Sumw2();
TH1F * hPFMET_MuonEnDn_10= new TH1F("hPFMET_MuonEnDn_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_MuonEnDn_10->Sumw2();
TH1F * hPFMET_JetResUp_10= new TH1F("hPFMET_JetResUp_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_JetResUp_10->Sumw2();
TH1F * hPFMET_JetResDn_10= new TH1F("hPFMET_JetResDn_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_JetResDn_10->Sumw2();
TH1F * hPFMET_UnclusteredEnUp_10= new TH1F("hPFMET_UnclusteredEnUp_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_UnclusteredEnUp_10->Sumw2();
TH1F * hPFMET_UnclusteredEnDn_10= new TH1F("hPFMET_UnclusteredEnDn_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_UnclusteredEnDn_10->Sumw2();
TH1F * hPFMET_PhotonEnUp_10= new TH1F("hPFMET_PhotonEnUp_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_PhotonEnUp_10->Sumw2();
TH1F * hPFMET_PhotonEnDn_10= new TH1F("hPFMET_PhotonEnDn_10", "PF MET after selection step 10", 10000 , 0., 10000.);
hPFMET_PhotonEnDn_10->Sumw2();
// variable bin width
TH1F *hLogLinXPFMET_10 = new TH1F("hLogLinXPFMET_10","hLogLinXPFMET_10",NMOBINS, loglinMbins);
hLogLinXPFMET_10->Sumw2();
TH1F * hLogLinXPFMET_JetEnUp_10= new TH1F("hLogLinXPFMET_JetEnUp_10", "hLogLinXPFMET_JetEnUp_10",NMOBINS, loglinMbins);
hLogLinXPFMET_JetEnUp_10->Sumw2();
TH1F * hLogLinXPFMET_JetEnDn_10= new TH1F("hLogLinXPFMET_JetEnDn_10", "hLogLinXPFMET_JetEnDn_10",NMOBINS, loglinMbins);
hLogLinXPFMET_JetEnDn_10->Sumw2();
TH1F * hLogLinXPFMET_ElectronEnUp_10= new TH1F("hLogLinXPFMET_ElectronEnUp_10", "hLogLinXPFMET_ElectronEnUp_10",NMOBINS, loglinMbins);
hLogLinXPFMET_ElectronEnUp_10->Sumw2();
TH1F * hLogLinXPFMET_ElectronEnDn_10= new TH1F("hLogLinXPFMET_ElectronEnDn_10", "hLogLinXPFMET_ElectronEnDn_10",NMOBINS, loglinMbins);
hLogLinXPFMET_ElectronEnDn_10->Sumw2();
TH1F * hLogLinXPFMET_MuonEnUp_10= new TH1F("hLogLinXPFMET_MuonEnUp_10", "hLogLinXPFMET_MuonEnUp_10",NMOBINS, loglinMbins);
hLogLinXPFMET_MuonEnUp_10->Sumw2();
TH1F * hLogLinXPFMET_MuonEnDn_10= new TH1F("hLogLinXPFMET_MuonEnDn_10", "hLogLinXPFMET_MuonEnDn_10",NMOBINS, loglinMbins);
hLogLinXPFMET_MuonEnDn_10->Sumw2();
TH1F * hLogLinXPFMET_JetResUp_10= new TH1F("hLogLinXPFMET_JetResUp_10", "hLogLinXPFMET_JetResUp_10",NMOBINS, loglinMbins);
hLogLinXPFMET_JetResUp_10->Sumw2();
TH1F * hLogLinXPFMET_JetResDn_10= new TH1F("hLogLinXPFMET_JetResDn_10", "hLogLinXPFMET_JetResDn_10",NMOBINS, loglinMbins);
hLogLinXPFMET_JetResDn_10->Sumw2();
TH1F * hLogLinXPFMET_UnclusteredEnUp_10= new TH1F("hLogLinXPFMET_UnclusteredEnUp_10", "hLogLinXPFMET_UnclusteredEnUp_10",NMOBINS, loglinMbins);
hLogLinXPFMET_UnclusteredEnUp_10->Sumw2();
TH1F * hLogLinXPFMET_UnclusteredEnDn_10= new TH1F("hLogLinXPFMET_UnclusteredEnDn_10", "hLogLinXPFMET_UnclusteredEnDn_10",NMOBINS, loglinMbins);
hLogLinXPFMET_UnclusteredEnDn_10->Sumw2();
TH1F * hLogLinXPFMET_PhotonEnUp_10= new TH1F("hLogLinXPFMET_PhotonEnUp_10", "hLogLinXPFMET_PhotonEnUp_10",NMOBINS, loglinMbins);
hLogLinXPFMET_PhotonEnUp_10->Sumw2();
TH1F * hLogLinXPFMET_PhotonEnDn_10= new TH1F("hLogLinXPFMET_PhotonEnDn_10", "hLogLinXPFMET_PhotonEnDn_10",NMOBINS, loglinMbins);
hLogLinXPFMET_PhotonEnDn_10->Sumw2();
TH1F * hM4l_T_10 = new TH1F("hM4l_T_10", "Transverse Mass of four leptons + MET after step 10", 1000, 0., 1000. );
hM4l_T_10->SetXTitle("m_{T} + PF MET (GeV)");
TH1F *hLogLinXM4l_T_10 = new TH1F("hLogLinXM4l_T_10","hLogLinXM4l_T_10",NMOBINS, loglinMbins);
hLogLinXM4l_T_10->Sumw2();
TH1F * hDPHI_10 = new TH1F("DPHI_10", "polar angle between 4l and E_{T,miss} after step 10", 1000, 0., 5. );
hDPHI_10->SetXTitle("#DELTA#phi(4l,E_{T,miss})");
TH1F * hPtLep1_10 = new TH1F("hPtLep1_10", "Pt of Lep1 after selection step 10", 200 , -0.5 , 199.5 );
hPtLep1_10->SetXTitle("pt_Lep1 (GeV)");
TH1F * hPtLep2_10 = new TH1F("hPtLep2_10", "Pt of Lep2 after selection step 10", 200 , -0.5 , 199.5 );
hPtLep2_10->SetXTitle("pt_Lep2 (GeV)");
TH1F * hPtLep3_10 = new TH1F("hPtLep3_10", "Pt of Lep3 after selection step 10", 200 , -0.5 , 199.5 );
hPtLep3_10->SetXTitle("pt_Lep3 (GeV)");
TH1F * hPtLep4_10 = new TH1F("hPtLep4_10", "Pt of Lep4 after selection step 10", 200 , -0.5 , 199.5 );
hPtLep4_10->SetXTitle("pt_Lep4 (GeV)");
TH1D * hNgood_10 = new TH1D("hNgood_10", "Number of good leptons", 10, -0.5, 9.5);
hNgood_10->SetXTitle("# good leptons");
TH1D * hNbjets_10 = new TH1D("hNbjets_10", "Number of b jets", 10, -0.5, 9.5);
hNbjets_10->SetXTitle("# b-jets");
// reverted mass peak cut
TH1F * hPFMET_12 = new TH1F("hPFMET_12", "PF MET after selection step 12", 10000 , 0., 10000.);
hPFMET_12->SetXTitle("PF MET (GeV)");
TH1F *hLogLinXPFMET_12 = new TH1F("hLogLinXPFMET_12","hLogLinXPFMET_12",NMOBINS, loglinMbins);
hLogLinXPFMET_12->Sumw2();
//global histos (during step 2..)
TH1F * hN_loose_mu = new TH1F("hN_loose_mu", "N_loose_mu", 30 , 0. , 30. );
hN_loose_mu->SetXTitle("N_loose_mu");
TH1F * hN_loose_e = new TH1F("hN_loose_e", "N_loose_e", 30 , 0. , 30. );
hN_loose_e->SetXTitle("N_loose_e");
TH1F * hIso_loose_mu = new TH1F("hIso_loose_mu", "Isolation maxima after loose selection ", 2000 , -10. , 10. );
hIso_loose_mu->SetXTitle("Iso");
TH1F * hSip_loose_mu = new TH1F("hSip_loose_mu", "Sip maxima after loose selection ", 1000 , -20. , 40. );
hSip_loose_mu->SetXTitle("Sip");
TH1F * hIp_loose_mu = new TH1F("hIp_loose_mu", "Ip maxima after loose selection ", 1000 , -20. , 40. );
hIp_loose_mu->SetXTitle("Ip");
TH1F * hIso_loose_e = new TH1F("hIso_loose_e", "Isolation maxima after loose selection ", 2000 , -10. , 10. );
hIso_loose_e->SetXTitle("Iso");
TH1F * hSip_loose_e = new TH1F("hSip_loose_e", "Sip maxima after loose selection ", 1000 , -20. , 40. );
hSip_loose_e->SetXTitle("Sip");
TH1F * hIp_loose_e = new TH1F("hIp_loose_e", "Ip maxima after loose selection ", 1000 , -20. , 40. );
hIp_loose_e->SetXTitle("Ip");