-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBackgroundStudy.cc
More file actions
executable file
·1859 lines (1605 loc) · 91.3 KB
/
BackgroundStudy.cc
File metadata and controls
executable file
·1859 lines (1605 loc) · 91.3 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
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
#include "BackgroundStudy.h"
#include "MathTools.h"
#include <TTree.h>
#include <algorithm>
#include <TCanvas.h>
#include <TStyle.h>
#include <TFrame.h>
#include <TLegend.h>
#include <TGraph.h>
#include <TGraphErrors.h>
#include <TF1.h>
#include <TF2.h>
BackgroundStudy::BackgroundStudy( string datacardfile ) {
//Input = new AnaInput( datacardfile );
Input = AnaInput::Instance() ;
select = new DPSelection( datacardfile ) ;
qcdS = new QCDStudy( datacardfile ) ;
haloS = new HaloStudy( datacardfile ) ;
spikeS = new SpikeStudy( datacardfile ) ;
cosmicS = new CosmicStudy( datacardfile ) ;
SkipEvents = 0 ;
Input->GetParameters("ProcessEvents", &ProcessEvents ) ;
Input->GetParameters("SkipEvents", &SkipEvents ) ;
Input->GetParameters("PlotType", &plotType ) ;
Input->GetParameters("IsData", &isData ) ;
Input->GetParameters("PhotonCuts", &photonCuts ) ;
Input->GetParameters("PhotonPFIso", &photonPFIso ) ;
Input->GetParameters("JetCuts", &jetCuts ) ;
Input->GetParameters("HFileName", &hfileName ) ;
Input->GetParameters("Path", &hfolder ) ;
Input->GetParameters("SystType", &systType ) ;
Input->GetParameters("TCut", &TCut ) ;
h_draw_ = new hDraw( hfolder, plotType ) ;
newMET = TLorentzVector( 0., 0., 0., 0. ) ;
}
BackgroundStudy::~BackgroundStudy(){
theFile->Close() ;
cout<<" File closed ! "<<endl ;
delete select ;
//delete Input ;
delete qcdS ;
delete haloS ;
delete spikeS ;
delete cosmicS ;
//delete h_draw_ ;
cout<<" done ! "<<endl ;
}
void BackgroundStudy::Write() {
obsTime->Write() ;
h_EB_Time->Write() ;
h_EB_Time0->Write() ;
h_EB_Time1->Write() ;
h_EB_Time2->Write() ;
h_EE_Time->Write() ;
h_EE_Time0->Write() ;
h_EE_Time1->Write() ;
h_EE_Time2->Write() ;
h_EE_haloTime->Write() ;
h_Eta_Phi->Write() ;
h_Eta_Time->Write() ;
h_Eta_Time1->Write() ;
h_Eta_Time2->Write() ;
h_Eta_Time3->Write() ;
h_Eta_Time4->Write() ;
h_Phi_Time->Write() ;
h_cscdPhi_Time->Write() ;
h_cscdPhi_cscTime->Write() ;
h_sMaj_Time_EB->Write() ;
h_sMaj_Time_EE->Write() ;
h_sMin_Time_EB->Write() ;
h_sMin_Time_EE->Write() ;
h_sMaj_sigIeta_EB->Write() ;
h_sMaj_sigIeta_EE->Write() ;
h_sMin_sigIeta_EB->Write() ;
h_sMin_sigIeta_EE->Write() ;
h_sigIeta_Time_EB->Write() ;
h_sigIeta_Time_EE->Write() ;
h_Pt_MET->Write() ;
h_Pt_Time_EB->Write() ;
h_Pt_Time_EE->Write() ;
h_MET_Time_EB->Write() ;
h_MET_Time_EE->Write() ;
h_hltMET_Time_EB->Write() ;
h_hltMET_Time_EE->Write() ;
h_cHadIso_Time->Write() ;
h_nHadIso_Time->Write() ;
h_photIso_Time->Write() ;
h_seedE_Time->Write() ;
h_cscdPhi_rho->Write() ;
h_met_met1->Write() ;
h_met_met2->Write() ;
h_nPhoton->Write() ;
h_jet_phot_Time->Write() ;
h_dT_jg->Write() ;
h_jetTime->Write() ;
h_jetTimeErr->Write() ;
h_tChi2->Write() ;
cs_tChi2->Write() ;
h_nVtx->Write() ;
h_nVtx_tChi2->Write() ;
h_pfMET->Write() ;
h_hltMET->Write() ;
h_sMaj_Eta->Write() ;
h_sMaj_Phi->Write() ;
h_sMaj_sMin_EB->Write() ;
h_nXtl_Eta->Write() ;
h_nXtl_Pt_EB->Write() ;
sg_Eta_Time->Write() ;
sg_Phi_Time->Write() ;
sg_sigIeta_Time->Write() ;
sg_sMaj_Time->Write() ;
sg_sMaj_Eta->Write() ;
sg_sMin_Time->Write() ;
sg_sMin_Eta->Write() ;
sg_nXtl->Write() ;
sg_nXtl_Eta->Write() ;
sg_cscdPhi->Write() ;
sg_Time->Write() ;
sg_Time_halo->Write() ;
sg_Time_spike->Write() ;
sg_Time_cosmic->Write() ;
sg_sMaj_sMin->Write() ;
sg_dPhi_MET_csc->Write() ;
sg_dPhi_MET_Jet1->Write() ;
sg_dPhi_MET_Jet2->Write() ;
sg_dPhi_MET_Jet3->Write() ;
sel_cHadIso_Time->Write() ;
sel_nHadIso_Time->Write() ;
sel_photIso_Time->Write() ;
sel_photIso_sMaj->Write() ;
sel_photIso_sMin->Write() ;
sel_photIso_sigIeta->Write() ;
sel_Time->Write();
sel_sMaj_Time->Write() ;
sel_sMaj_Eta->Write() ;
sel_sMin_Time->Write() ;
sel_sMin_Eta->Write() ;
sel_Eta_Time->Write() ;
sel_Phi_Time->Write() ;
sel_weirdXtl->Write() ;
sel_T_dPhi_gMET_1J->Write() ;
sel_T_dPhi_gMET_2J->Write() ;
sel_T_dPhi_gMET_3J->Write() ;
cs_dtdPhidEta->Write() ;
cs_Eta_Time->Write() ;
cs_Phi_Time->Write() ;
cs_sigIeta_Time->Write() ;
cs_nXtl->Write() ;
cs_swissX->Write() ;
cs_sMaj_sMin->Write() ;
cs_cscdPhi->Write() ;
cs_cHadIso_Time->Write() ;
cs_nHadIso_Time->Write() ;
cs_photIso_Time->Write() ;
cs_seedE_photE->Write() ;
sideband_photIso_cscdPhi->Write() ;
sideband_sMin_Time->Write() ;
sideband_sMaj_Time->Write() ;
sideband_sMaj_Phi->Write() ;
sideband_sMaj_sMin->Write() ;
sideband_sMaj_Eta->Write() ;
sideband_nXtl_Eta->Write() ;
sideband_cscT_ecalT->Write() ;
sideband_dtdPhidEta->Write() ;
sideband_dtdR->Write() ;
sideband_dtdPhidEta->Write() ;
sideband_cscdPhi_u->Write() ;
sideband_cscdPhi_d->Write() ;
sideband_sMaj->Write() ;
sideband_Pt_nJet->Write() ;
abcd_Pt_Time->Write() ;
abcd_MET_Time->Write() ;
abcd_MET1_T_sMET2_1J->Write() ;
abcd_MET1_T_bMET2_1J->Write() ;
abcd_MET1_T_sMET2_2J->Write() ;
abcd_MET1_T_bMET2_2J->Write() ;
abcd_MET2_Time->Write() ;
abcd_NJet_Time->Write() ;
abcd_MET1_Time_closure1->Write() ;
abcd_MET1_Time_closure2->Write() ;
sideband_dPhi_MET_csc->Write() ;
sideband_dPhi_MET_Jet1->Write() ;
sideband_dPhi_MET_Jet2->Write() ;
sideband_dPhi_MET_Jet3->Write() ;
pure_Time->Write() ;
nJets_center->Write() ;
nJets_halo->Write() ;
nJets_spike->Write() ;
nJets_cosmic->Write() ;
nHL_Eta->Write() ;
nSpk_Eta->Write() ;
nCS_Eta->Write() ;
hBg_F->Write() ;
hBg_E->Write() ;
hBg_D->Write() ;
hBg_C->Write() ;
hBg_B->Write() ;
hBg_A->Write() ;
hCol_F->Write() ;
hCol_E->Write() ;
hCol_D->Write() ;
hCol_C->Write() ;
hCol_B->Write() ;
hCol_A->Write() ;
cout<<" Output historams written ! "<< endl ;
}
void BackgroundStudy::Create() {
TString Path_fName = hfolder + hfileName + ".root" ;
theFile = new TFile( Path_fName, "RECREATE" );
theFile->cd() ;
// initial histograms
obsTime = new TH1D("obsTime", "Photon Time from seed", 160, -14.5, 25.5);
// DOE plots
h_EB_Time = new TH1D( "h_EB_Time", " Ecal time from EB", 200, -25, 25 ) ;
h_EB_Time0 = new TH1D( "h_EB_Time0", " Ecal time from EB", 200, -25, 25 ) ;
h_EB_Time1 = new TH1D( "h_EB_Time1", " Ecal time from EB", 200, -25, 25 ) ;
h_EB_Time2 = new TH1D( "h_EB_Time2", " Ecal time from EB", 200, -25, 25 ) ;
h_EE_Time = new TH1D( "h_EE_Time", " Ecal time from EE", 200, -25, 25 ) ;
h_EE_Time0 = new TH1D( "h_EE_Time0", " Ecal time from EE", 200, -25, 25 ) ;
h_EE_Time1 = new TH1D( "h_EE_Time1", " Ecal time from EE", 200, -25, 25 ) ;
h_EE_Time2 = new TH1D( "h_EE_Time2", " Ecal time from EE", 200, -25, 25 ) ;
h_EE_haloTime = new TH1D( "h_EE_haloTime", " Halo Ecal time from EE", 200, -25, 25 ) ;
// Raw information
h_Eta_Phi = new TH2D( "h_Eta_Phi", "#eta vs #phi", 102, -2.5, 2.5, 63, -3.15, 3.15 ) ;
h_Eta_Time = new TH2D( "h_Eta_Time", "#eta vs Ecal time", 102, -2.5, 2.5, 160, -20, 20 ) ;
h_Eta_Time1 = new TH2D( "h_Eta_Time1", "#eta vs Ecal time, newMET < pfMET", 102, -2.5, 2.5, 160, -20, 20 ) ;
h_Eta_Time2 = new TH2D( "h_Eta_Time2", "#eta vs Ecal time, newMET > pfMET", 102, -2.5, 2.5, 160, -20, 20 ) ;
h_Eta_Time3 = new TH2D( "h_Eta_Time3", "#eta vs Ecal time, noPhotMET < pfMET", 102, -2.5, 2.5, 160, -20, 20 ) ;
h_Eta_Time4 = new TH2D( "h_Eta_Time4", "#eta vs Ecal time, noPhotMET > pfMET", 102, -2.5, 2.5, 160, -20, 20 ) ;
h_Phi_Time = new TH2D( "h_Phi_Time", " phi vs Ecal time", 63, -3.15, 3.15, 160, -20, 20 ) ;
h_cscdPhi_Time = new TH2D( "h_cscdPhi_Time", " d#Phi vs Ecal time", 65, 0, 3.25, 160, -20, 20 ) ;
h_cscdPhi_cscTime = new TH2D( "h_cscdPhi_cscTime", " d#Phi vs CSC time", 65, 0, 3.25, 300, -75, 75 ) ;
h_sigIeta_Time_EB = new TH2D( "h_sigIeta_Time_EB", " sigma_iEta vs Ecal time", 80, 0, 0.08, 120, -15, 15 ) ;
h_sigIeta_Time_EE = new TH2D( "h_sigIeta_Time_EE", " sigma_iEta vs Ecal time", 80, 0, 0.08, 120, -15, 15 ) ;
h_sMaj_Time_EB = new TH2D( "h_sMaj_Time_EB", " sMaj vs Ecal time", 100, 0, 2, 160, -20, 20 ) ;
h_sMaj_Time_EE = new TH2D( "h_sMaj_Time_EE", " sMaj vs Ecal time", 100, 0, 2, 160, -20, 20 ) ;
h_sMin_Time_EB = new TH2D( "h_sMin_Time_EB", "sMin vs. Ecal time ", 100, 0., 0.5 , 160, -20., 20. ) ;
h_sMin_Time_EE = new TH2D( "h_sMin_Time_EE", "sMin vs. Ecal time ", 100, 0., 0.5 , 160, -20., 20. ) ;
h_sMaj_sigIeta_EB = new TH2D( "h_sMaj_sigIeta_EB", " sMaj vs Ecal time", 100, 0, 2, 80, 0, 0.08 ) ;
h_sMaj_sigIeta_EE = new TH2D( "h_sMaj_sigIeta_EE", " sMaj vs Ecal time", 100, 0, 2, 80, 0, 0.08 ) ;
h_sMin_sigIeta_EB = new TH2D( "h_sMin_sigIeta_EB", "sMin vs. Ecal time ", 100, 0., 0.5 , 80, 0, 0.08 ) ;
h_sMin_sigIeta_EE = new TH2D( "h_sMin_sigIeta_EE", "sMin vs. Ecal time ", 100, 0., 0.5 , 80, 0, 0.08 ) ;
h_Pt_MET = new TH2D( "h_Pt_MET", " Leading Pt vs MET", 50, 0, 500, 50, 0, 500 ) ;
h_tChi2 = new TH1D( "h_tChi2", " chi2 of time ", 100, 0, 10 ) ;
cs_tChi2 = new TH1D( "cs_tChi2", " chi2 of time ", 100, 0, 10 ) ;
h_nVtx_tChi2 = new TH2D( "h_nVtx_tChi2", "nVtx vs #chi2_{t}", 41,-0.5,40.5, 100, 0, 10 ) ;
h_nVtx = new TH1D( "h_nVtx", "nVtx in good control region w/ MET > 60", 41,-0.5,40.5 ) ;
h_pfMET = new TH1D("h_pfMET", "PF MET ", 100, 0, 100 ) ;
h_hltMET = new TH1D("h_hltMET", "HLT MET ", 100, 0, 100 ) ;
h_Pt_Time_EB = new TH2D( "h_Pt_Time_EB", " Pt vs Ecal time", 50, 0, 500, 120, -15, 15 ) ;
h_Pt_Time_EE = new TH2D( "h_Pt_Time_EE", " Pt vs Ecal time", 50, 0, 500, 120, -15, 15 ) ;
h_MET_Time_EB = new TH2D( "h_MET_Time_EB", " MET vs Ecal time", 50, 0, 500, 120, -15, 15 ) ;
h_MET_Time_EE = new TH2D( "h_MET_Time_EE", " MET vs Ecal time", 50, 0, 500, 120, -15, 15 ) ;
h_hltMET_Time_EB = new TH2D( "h_hltMET_Time_EB", " MET vs Ecal time", 50, 0, 500, 120, -15, 15 ) ;
h_hltMET_Time_EE = new TH2D( "h_hltMET_Time_EE", " MET vs Ecal time", 50, 0, 500, 120, -15, 15 ) ;
h_cHadIso_Time = new TH2D( "h_cHadIso_Time", " Charged Hadronic IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
h_nHadIso_Time = new TH2D( "h_nHadIso_Time", " Neutral Hadronic IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
h_photIso_Time = new TH2D( "h_photIso_Time", " Photon IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
h_seedE_Time = new TH2D( "h_seedE_Time", " seed E vs time", 100, 0, 500., 120, -15, 15 );
h_cscdPhi_rho = new TH2D( "h_cscdPhi_rho", " d#Phi vs rho", 65, 0, 3.25, 100, 100, 500. ) ;
h_met_met1 = new TH2D( "h_met_met1", " MET vs MET1", 50, 0, 500, 50, 0, 500 ) ;
h_met_met2 = new TH2D( "h_met_met2", " MET vs MET2", 50, 0, 500, 50, 0, 500 ) ;
h_nPhoton = new TH1D( "h_nPhoton", "N Photons", 11, -0.5, 10.5 ) ;
h_jet_phot_Time = new TH2D( "h_jet_phot_Time", " Jet time vs Photon time", 80, -5., 5., 120, -15, 15 ) ;
h_dT_jg = new TH1D( "h_dT_jg", " Jet time vs Photon time", 100, -5., 5. ) ;
h_jetTime = new TH1D( "h_jetTime", "Jet time", 160, -20., 20. ) ;
h_jetTimeErr = new TH1D( "h_jetTimeErr", "Jet time error", 100, 0., 5. ) ;
h_sMaj_Eta = new TH2D( "h_sMaj_Eta", " sMaj vs photon #eta", 100, 0, 2, 51, -2.5, 2.5 ) ;
h_sMaj_Phi = new TH2D( "h_sMaj_Phi", " sMaj vs photon #phi", 100, 0, 2, 63, -3.15, 3.15 ) ;
h_sMaj_sMin_EB = new TH2D( "h_sMaj_sMin_EB", " sMaj vs sMin", 100, 0, 2, 50, 0.1, 0.4 ) ;
h_nXtl_Eta = new TH2D( "h_nXtl_Eta", "N crystals vs #eta ", 50, 0, 50 , 51, -2.5, 2.5) ;
h_nXtl_Pt_EB = new TH2D( "h_nXtl_Pt_EB", "N crystals vs Pt ", 50, 0, 50 , 50, 0. , 500. ) ;
// Information from signal selection
sg_nXtl = new TH1D( "sg_nXtl", "N crystals ", 50, 0, 50 ) ;
sg_cscdPhi = new TH1D( "sg_cscdPhi", " d#Phi ", 65, 0, 3.25 ) ;
sg_Time = new TH1D( "sg_Time", "Photon Time from signal CS", 160, -14.5, 25.5);
sg_Time_halo = new TH1D( "sg_Time_halo", "Photon Time from signal but halo-tagged", 160, -14.5, 25.5);
sg_Time_spike = new TH1D( "sg_Time_spike", "Photon Time from signal but spike-tagged", 160, -14.5, 25.5);
sg_Time_cosmic= new TH1D( "sg_Time_cosmic", "Photon Time from signal but cosmic-tagged", 160, -14.5, 25.5);
sg_Eta_Time = new TH2D( "sg_Eta_Time", " eta vs Ecal time", 51, -2.5, 2.5, 160, -20, 20 ) ;
sg_Phi_Time = new TH2D( "sg_Phi_Time", " phi vs Ecal time", 63, -3.15, 3.15, 160, -20, 20 ) ;
sg_nXtl_Eta = new TH2D( "sg_nXtl_Eta", " N crystals vs #eta", 50, 0, 50 , 51, -2.5, 2.5) ;
sg_sigIeta_Time = new TH2D("sg_sigIeta_Time", " sigma_iEta vs Ecal time", 80, 0, 0.08, 120, -15, 15 ) ;
sel_cHadIso_Time = new TH2D("sel_cHadIso_Time", " Charged Hadronic IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
sel_nHadIso_Time = new TH2D("sel_nHadIso_Time", " Neutral Hadronic IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
sel_photIso_Time = new TH2D("sel_photIso_Time", " Photon IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
sel_photIso_sMaj = new TH2D("sel_photIso_sMaj", " Photon IsoDeposit vs sMajor", 100, 0, 10., 100, 0., 2. );
sel_photIso_sMin = new TH2D("sel_photIso_sMin", " Photon IsoDeposit vs sMinor", 100, 0, 10., 120, 0., 0.5 );
sel_photIso_sigIeta = new TH2D("sel_photIso_sigIeta", " Photon IsoDeposit vs sigma_iEta", 100, 0, 10., 80, 0., 0.08 );
sg_sMaj_sMin = new TH2D( "sg_sMaj_sMin", " sMaj vs sMin", 100, 0, 2, 50, 0.1, 0.4 ) ;
sg_sMaj_Time = new TH2D( "sg_sMaj_Time", " sMaj vs Ecal time", 100, 0, 2, 160, -20, 20 ) ;
sg_sMin_Time = new TH2D( "sg_sMin_Time", "sMin vs. Ecal time ", 100, 0., 0.5 , 160, -20, 20 ) ;
sg_sMaj_Eta = new TH2D( "sg_sMaj_Eta", " sMaj vs photon #eta", 100, 0, 2.0, 51, -2.5, 2.5 ) ;
sg_sMin_Eta = new TH2D( "sg_sMin_Eta", " sMin vs photon #eta", 100, 0, 0.5, 51, -2.5, 2.5 ) ;
sel_Time = new TH1D( "sel_Time", "Photon Time after sg selection & bg rejection", 160, -14.5, 25.5);
sel_Eta_Time = new TH2D( "sel_Eta_Time", " eta vs Ecal time", 153, -2.5, 2.5, 160, -20, 20 ) ;
sel_Phi_Time = new TH2D( "sel_Phi_Time", " phi vs Ecal time", 189, -3.15, 3.15, 160, -20, 20 ) ;
sel_weirdXtl = new TH2D( "sel_weridXtl", " eta vs phi ", 153, -2.5, 2.5, 189, -3.15, 3.15 ) ;
sel_sMaj_Time = new TH2D( "sel_sMaj_Time", " sMaj vs Ecal time", 100, 0, 2, 160, -20, 20 ) ;
sel_sMin_Time = new TH2D( "sel_sMin_Time", "sMin vs. Ecal time ", 100, 0., 0.5 , 160, -20, 20 ) ;
sel_sMaj_Eta = new TH2D( "sel_sMaj_Eta", " sMaj vs photon #eta", 100, 0, 2.0, 51, -2.5, 2.5 ) ;
sel_sMin_Eta = new TH2D( "sel_sMin_Eta", " sMin vs photon #eta", 100, 0, 0.5, 51, -2.5, 2.5 ) ;
sel_T_dPhi_gMET_1J = new TH2D("sel_T_dPhi_gMET_1J", "time vs dPhi( photon, MET)", 120, -15, 15, 64, 0, 3.2 ) ;
sel_T_dPhi_gMET_2J = new TH2D("sel_T_dPhi_gMET_2J", "time vs dPhi( photon, MET)", 120, -15, 15, 64, 0, 3.2 ) ;
sel_T_dPhi_gMET_3J = new TH2D("sel_T_dPhi_gMET_3J", "time vs dPhi( photon, MET)", 120, -15, 15, 64, 0, 3.2 ) ;
sg_dPhi_MET_csc = new TH2D("sg_dPhi_MET_csc", "dPhi( photon, MET) vs dPhi(photon,csc)", 64, 0, 3.2, 68, -0.2, 3.2 ) ;
sg_dPhi_MET_Jet1 = new TH2D("sg_dPhi_MET_Jet1", "dPhi( photon, MET) vs dPhi(photon,Jet)", 64, 0, 3.2, 68, -0.2, 3.2 ) ;
sg_dPhi_MET_Jet2 = new TH2D("sg_dPhi_MET_Jet2", "dPhi( photon, MET) vs dPhi(photon,Jet)", 64, 0, 3.2, 68, -0.2, 3.2 ) ;
sg_dPhi_MET_Jet3 = new TH2D("sg_dPhi_MET_Jet3", "dPhi( photon, MET) vs dPhi(photon,Jet)", 64, 0, 3.2, 68, -0.2, 3.2 ) ;
// Information from signal selection
cs_Eta_Time = new TH2D( "cs_Eta_Time", " eta vs Ecal time", 51, -2.5, 2.5, 160, -20, 20 ) ;
cs_Phi_Time = new TH2D( "cs_Phi_Time", " phi vs Ecal time", 63, -3.15, 3.15, 160, -20, 20 ) ;
cs_sMaj_sMin = new TH2D( "cs_sMaj_sMin", " sMaj vs sMin", 100, 0, 2, 50, 0.1, 0.4 ) ;
cs_nXtl = new TH1D( "cs_nXtl", "N crystals ", 50, 0, 50 ) ;
cs_swissX = new TH1D( "cs_swissX", "Swiss-X ", 110, 0, 1.1 ) ;
cs_cscdPhi = new TH1D( "cs_cscdPhi", " d#Phi ", 65, 0, 3.25 ) ;
cs_cHadIso_Time = new TH2D("cs_cHadIso_Time", " Charged Hadronic IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
cs_nHadIso_Time = new TH2D("cs_nHadIso_Time", " Neutral Hadronic IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
cs_photIso_Time = new TH2D("cs_photIso_Time", " Photon IsoDeposit vs time", 100, 0, 10., 120, -15, 15 );
cs_sigIeta_Time = new TH2D( "cs_sigIeta_Time", " sigma_iEta vs Ecal time", 80, 0, 0.08, 120, -15, 15 ) ;
cs_dtdPhidEta = new TH2D( "cs_dtdPhidEta", " DT dPhi, dEta ", 64, 0, 3.2, 50, 0, 1. ) ;
cs_seedE_photE = new TH2D( "cs_seedE_photE", " seed E vs phot E", 100, 0, 500, 100, 0, 500 ) ;
sideband_photIso_cscdPhi = new TH2D("sideband_photIso_cscdPhi", " Photon IsoDeposit vs d#Phi" , 100, 0, 10., 65, 0, 3.25 );
sideband_sMin_Time = new TH2D( "sideband_sMin_Time", " sMin vs photon time", 50, 0.1, 0.4, 160, -20, 20 ) ;
sideband_sMaj_Time = new TH2D( "sideband_sMaj_Time", " sMaj vs photon time", 100, 0, 2, 160, -20, 20 ) ;
sideband_sMaj_Phi = new TH2D( "sideband_sMaj_Phi", " sMaj vs photon #phi", 100, 0, 2, 63, -3.15, 3.15 ) ;
sideband_sMaj_sMin = new TH2D( "sideband_sMaj_sMin", " sMaj vs sMin", 100, 0, 2, 50, 0.1, 0.4 ) ;
sideband_sMaj_Eta = new TH2D( "sideband_sMaj_Eta", " sMaj vs photon #eta", 100, 0, 2, 51, -2.5, 2.5 ) ;
sideband_nXtl_Eta = new TH2D( "sideband_nXtl_Eta", " N crystals vs #eta", 50, 0, 50 , 51, -2.5, 2.5) ;
sideband_cscT_ecalT = new TH2D( "sideband_cscT_ecalT", " csc time vs Ecal time ", 300, -75, 75 , 120, -15, 15 ) ;
sideband_cscdPhi_u = new TH1D( "sideband_cscdPhi_u", " d#Phi ", 65, 0, 3.25 ) ;
sideband_cscdPhi_d = new TH1D( "sideband_cscdPhi_d", " d#Phi ", 65, 0, 3.25 ) ;
sideband_dtdPhidEta = new TH2D( "sideband_dtdPhidEta", " DT dPhi, dEta ", 64, 0, 3.2, 50, 0, 1. ) ;
sideband_dtdR = new TH1D( "sideband_dtdR", " dR( DTSeg, #gamma) ", 50, 0., 2.5 ) ;
sideband_sMaj = new TH1D( "sideband_sMaj", " sMajor ", 100, 0., 2. ) ;
sideband_Pt_nJet = new TH2D( "sideband_Pt_nJet", " Pt vs nJet", 50, 0, 500 , 10, -0.5, 9.5) ;
abcd_Pt_Time = new TH2D( "abcd_Pt_Time", " Pt vs Ecal time", 50, 0, 500, 200, -25, 25 ) ;
abcd_MET_Time = new TH2D( "abcd_MET_Time", " MET vs Ecal time", 50, 0, 500, 200, -25, 25 ) ;
abcd_MET1_T_sMET2_1J = new TH2D( "abcd_MET1_T_sMET2_1J", "MET1 vs Ecal time (MET2 < 60)", 50, 0, 500, 200, -25, 25 ) ;
abcd_MET1_T_bMET2_1J = new TH2D( "abcd_MET1_T_bMET2_1J", "MET1 vs Ecal time (MET2 > 60)", 50, 0, 500, 200, -25, 25 ) ;
abcd_MET1_T_sMET2_2J = new TH2D( "abcd_MET1_T_sMET2_2J", "MET1 vs Ecal time (MET2 < 60)", 50, 0, 500, 200, -25, 25 ) ;
abcd_MET1_T_bMET2_2J = new TH2D( "abcd_MET1_T_bMET2_2J", "MET1 vs Ecal time (MET2 > 60)", 50, 0, 500, 200, -25, 25 ) ;
abcd_MET1_Time_closure1 = new TH2D( "abcd_MET1_Time_closure1", "MET1 vs Ecal time, 1-jet closure", 50, 0, 500, 200, -25, 25 ) ;
abcd_MET1_Time_closure2 = new TH2D( "abcd_MET1_Time_closure2", "MET1 vs Ecal time, >1-jet closure", 50, 0, 500, 200, -25, 25 ) ;
abcd_MET2_Time = new TH2D( "abcd_MET2_Time", "newMET vs Ecal time, newMET < MET for |t|>3", 50, 0, 500, 200, -25, 25 ) ;
abcd_NJet_Time = new TH2D( "abcd_NJet_Time", " NJet vs Ecal time", 10, 0, 10, 200, -25, 25 ) ;
sideband_dPhi_MET_csc = new TH2D("sideband_dPhi_MET_csc", "dPhi( photon, MET) vs dPhi(photon,csc)", 64, 0, 3.2, 64, 0, 3.2 ) ;
sideband_dPhi_MET_Jet1 = new TH2D("sideband_dPhi_MET_Jet1", "dPhi(photon,MET) vs dPhi(photon,Jet)", 64, 0, 3.2, 68, -0.2, 3.2) ;
sideband_dPhi_MET_Jet2 = new TH2D("sideband_dPhi_MET_Jet2", "dPhi(photon,MET) vs dPhi(photon,Jet)", 64, 0, 3.2, 68, -0.2, 3.2) ;
sideband_dPhi_MET_Jet3 = new TH2D("sideband_dPhi_MET_Jet3", "dPhi(photon,MET) vs dPhi(photon,Jet)", 64, 0, 3.2, 68, -0.2, 3.2) ;
pure_Time = new TH1D( "pure_Time", " time for pure photon", 160, -14.5, 25.5 ) ;
nJets_center = new TH1D( "nJets_center", "N of Jets for |t| < 2", 10, -0.5, 9.5 ) ;
nJets_halo = new TH1D( "nJets_halo", "N of Jets for halo-tagged events", 10, -0.5, 9.5 ) ;
nJets_spike = new TH1D( "nJets_spike", "N of Jets for spike-tagged events", 10, -0.5, 9.5 ) ;
nJets_cosmic = new TH1D( "nJets_cosmic", "N of Jets for cosmic-tagged events", 10, -0.5, 9.5 ) ;
nHL_Eta = new TH1D( "nHL_Eta", " N of CS in |#eta|", 5, 0., 1.4 ) ;
nSpk_Eta = new TH1D( "nSpk_Eta", " N of Spike in |#eta|", 5, 0., 1.4 ) ;
nCS_Eta = new TH1D( "nCS_Eta", " N of CS in |#eta|", 5, 0., 1.4 ) ;
// x is eta region , each is 0.28
// y is different sample, 0:total, 1:halo, 2: spike, 3: cosmic
// z is jet multiplicity 0, 1, >=2
hBg_F = new TH3D( "hBg_F", "Background in |t| < 2ns region", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hBg_E = new TH3D( "hBg_E", "Background in |t| < 2ns region", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hBg_D = new TH3D( "hBg_D", "Background in D (signal) region", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hBg_C = new TH3D( "hBg_C", "Background in C ", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hBg_B = new TH3D( "hBg_B", "Background in B ", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hBg_A = new TH3D( "hBg_A", "Background in A ", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hCol_F = new TH3D( "hCol_F", "Background in |t| < 2ns region", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hCol_E = new TH3D( "hCol_E", "Background in |t| < 2ns region", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hCol_D = new TH3D( "hCol_D", "Background in D (signal) region", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hCol_C = new TH3D( "hCol_C", "Background in C ", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hCol_B = new TH3D( "hCol_B", "Background in B ", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
hCol_A = new TH3D( "hCol_A", "Background in A ", 5, 0, 5, 4, 0, 4, 3, 0, 3 ) ;
}
void BackgroundStudy::OpenAllHistograms() {
TString Path_fName = hfolder + hfileName + ".root" ;
TFile* hFile = new TFile( Path_fName, "UPDATE" );
cout<<" file opened ! "<<endl ;
qcdS->Open( hFile ) ;
haloS->Open( hFile ) ;
spikeS->Open( hFile ) ;
cosmicS->Open( hFile ) ;
Open( hFile ) ;
}
void BackgroundStudy::Open( TFile* hFile ) {
if ( hFile == NULL ) {
TString Path_fName = hfolder + hfileName + ".root" ;
theFile = new TFile( Path_fName, "UPDATE" );
//createFile = true ;
cout<<" file opened ! "<<endl ;
} else {
theFile = hFile ;
//createFile = false ;
}
/*
TString Path_fName = hfolder + hfileName + ".root" ;
cout<<" Opening : "<< Path_fName <<endl ;
theFile = (TFile*) TFile::Open( Path_fName , "READ" );
//hFile->cd() ;
*/
obsTime = (TH1D*) theFile->Get("obsTime") ;
h_EB_Time = (TH1D*) theFile->Get("h_EB_Time") ;
h_EB_Time0 = (TH1D*) theFile->Get("h_EB_Time0");
h_EB_Time1 = (TH1D*) theFile->Get("h_EB_Time1");
h_EB_Time2 = (TH1D*) theFile->Get("h_EB_Time2");
h_EE_Time = (TH1D*) theFile->Get("h_EE_Time");
h_EE_Time0 = (TH1D*) theFile->Get("h_EE_Time0");
h_EE_Time1 = (TH1D*) theFile->Get("h_EE_Time1");
h_EE_Time2 = (TH1D*) theFile->Get("h_EE_Time2");
h_EE_haloTime = (TH1D*) theFile->Get("h_EE_haloTime");
h_Eta_Phi = (TH2D*) theFile->Get("h_Eta_Phi");
h_Eta_Time = (TH2D*) theFile->Get("h_Eta_Time");
h_Eta_Time1 = (TH2D*) theFile->Get("h_Eta_Time1");
h_Eta_Time2 = (TH2D*) theFile->Get("h_Eta_Time2");
h_Eta_Time3 = (TH2D*) theFile->Get("h_Eta_Time3");
h_Eta_Time4 = (TH2D*) theFile->Get("h_Eta_Time4");
h_Phi_Time = (TH2D*) theFile->Get("h_Phi_Time");
h_cscdPhi_Time = (TH2D*) theFile->Get("h_cscdPhi_Time");
h_cscdPhi_cscTime = (TH2D*) theFile->Get("h_cscdPhi_cscTime");
h_sMaj_Time_EB = (TH2D*) theFile->Get("h_sMaj_Time_EB");
h_sMaj_Time_EE = (TH2D*) theFile->Get("h_sMaj_Time_EE");
h_sMin_Time_EB = (TH2D*) theFile->Get("h_sMin_Time_EB");
h_sMin_Time_EE = (TH2D*) theFile->Get("h_sMin_Time_EE");
h_sMaj_sigIeta_EB = (TH2D*) theFile->Get("h_sMaj_sigIeta_EB");
h_sMaj_sigIeta_EE = (TH2D*) theFile->Get("h_sMaj_sigIeta_EE");
h_sMin_sigIeta_EB = (TH2D*) theFile->Get("h_sMin_sigIeta_EB");
h_sMin_sigIeta_EE = (TH2D*) theFile->Get("h_sMin_sigIeta_EE");
h_sigIeta_Time_EB = (TH2D*) theFile->Get("h_sigIeta_Time_EB");
h_sigIeta_Time_EE = (TH2D*) theFile->Get("h_sigIeta_Time_EE");
h_Pt_MET = (TH2D*) theFile->Get("h_Pt_MET");
h_Pt_Time_EB = (TH2D*) theFile->Get("h_Pt_Time_EB");
h_Pt_Time_EE = (TH2D*) theFile->Get("h_Pt_Time_EE");
h_MET_Time_EB = (TH2D*) theFile->Get("h_MET_Time_EB");
h_MET_Time_EE = (TH2D*) theFile->Get("h_MET_Time_EE");
h_hltMET_Time_EB = (TH2D*) theFile->Get("h_hltMET_Time_EB");
h_hltMET_Time_EE = (TH2D*) theFile->Get("h_hltMET_Time_EE");
h_cHadIso_Time = (TH2D*) theFile->Get("h_cHadIso_Time");
h_nHadIso_Time = (TH2D*) theFile->Get("h_nHadIso_Time");
h_photIso_Time = (TH2D*) theFile->Get("h_photIso_Time");
h_seedE_Time = (TH2D*) theFile->Get("h_seedE_Time");
h_jet_phot_Time = (TH2D*) theFile->Get("h_jet_phot_Time");
h_dT_jg = (TH1D*) theFile->Get("h_dT_jg");
h_jetTime = (TH1D*) theFile->Get("h_jetTime");
h_jetTimeErr = (TH1D*) theFile->Get("h_jetTimeErr");
h_met_met1 = (TH2D*) theFile->Get("h_met_met1");
h_met_met2 = (TH2D*) theFile->Get("h_met_met2");
h_nPhoton = (TH1D*) theFile->Get("h_nPhoton");
h_sMaj_Eta = (TH2D*) theFile->Get("h_sMaj_Eta");
h_sMaj_Phi = (TH2D*) theFile->Get("h_sMaj_Phi");
h_sMaj_sMin_EB = (TH2D*) theFile->Get("h_sMaj_sMin_EB");
h_nXtl_Eta = (TH2D*) theFile->Get("h_nXtl_Eta");
h_nXtl_Pt_EB = (TH2D*) theFile->Get("h_nXtl_Pt_EB");
h_cscdPhi_rho = (TH2D*) theFile->Get("h_cscdPhi_rho");
h_tChi2 = (TH1D*) theFile->Get("h_tChi2");
cs_tChi2 = (TH1D*) theFile->Get("cs_tChi2");
halo_tChi2 = (TH1D*) theFile->Get("halo_tChi2");
spike_tChi2 = (TH1D*) theFile->Get("spike_tChi2");
noHalo_tChi2 = (TH1D*) theFile->Get("noHalo_tChi2");
cosmic_tChi2 = (TH1D*) theFile->Get("cosmic_tChi2");
h_nVtx_tChi2 = (TH2D*) theFile->Get("h_nVtx_tChi2");
h_nVtx = (TH1D*) theFile->Get("h_nVtx");
h_pfMET = (TH1D*) theFile->Get("h_pfMET");
h_hltMET = (TH1D*) theFile->Get("h_hltMET");
sg_Eta_Time = (TH2D*) theFile->Get("sg_Eta_Time");
sg_Phi_Time = (TH2D*) theFile->Get("sg_Phi_Time");
sg_sigIeta_Time = (TH2D*) theFile->Get("sg_sigIeta_Time");
sg_nXtl_Eta = (TH2D*) theFile->Get("sg_nXtl_Eta");
sg_cscdPhi = (TH1D*) theFile->Get("sg_cscdPhi");
sg_nXtl = (TH1D*) theFile->Get("sg_nXtl");
sg_Time = (TH1D*) theFile->Get("sg_Time");
sg_Time_halo = (TH1D*) theFile->Get("sg_Time_halo");
sg_Time_spike = (TH1D*) theFile->Get("sg_Time_spike");
sg_Time_cosmic = (TH1D*) theFile->Get("sg_Time_cosmic");
sel_cHadIso_Time = (TH2D*) theFile->Get("sel_cHadIso_Time");
sel_nHadIso_Time = (TH2D*) theFile->Get("sel_nHadIso_Time");
sel_photIso_Time = (TH2D*) theFile->Get("sel_photIso_Time");
sel_photIso_sMaj = (TH2D*) theFile->Get("sel_photIso_sMaj");
sel_photIso_sMin = (TH2D*) theFile->Get("sel_photIso_sMin");
sel_photIso_sigIeta = (TH2D*) theFile->Get("sel_photIso_sigIeta");
sg_sMaj_Time = (TH2D*) theFile->Get("sg_sMaj_Time");
sg_sMin_Time = (TH2D*) theFile->Get("sg_sMin_Time");
sg_sMaj_Eta = (TH2D*) theFile->Get("sg_sMaj_Eta");
sg_sMaj_sMin = (TH2D*) theFile->Get("sg_sMaj_sMin");
sg_sMin_Eta = (TH2D*) theFile->Get("sg_sMin_Eta");
sel_Time = (TH1D*) theFile->Get("sel_Time");
sel_weirdXtl = (TH2D*) theFile->Get("sel_weirdXtl");
sel_Eta_Time = (TH2D*) theFile->Get("sel_Eta_Time");
sel_Phi_Time = (TH2D*) theFile->Get("sel_Phi_Time");
sel_sMaj_Time = (TH2D*) theFile->Get("sel_sMaj_Time");
sel_sMin_Time = (TH2D*) theFile->Get("sel_sMin_Time");
sel_sMaj_Eta = (TH2D*) theFile->Get("sel_sMaj_Eta");
sel_sMin_Eta = (TH2D*) theFile->Get("sel_sMin_Eta");
sel_T_dPhi_gMET_1J = (TH2D*) theFile->Get("sel_T_dPhi_gMET_1J") ;
sel_T_dPhi_gMET_2J = (TH2D*) theFile->Get("sel_T_dPhi_gMET_2J") ;
sel_T_dPhi_gMET_3J = (TH2D*) theFile->Get("sel_T_dPhi_gMET_3J") ;
sg_dPhi_MET_csc = (TH2D*) theFile->Get("sg_dPhi_MET_csc") ;
sg_dPhi_MET_Jet1 = (TH2D*) theFile->Get("sg_dPhi_MET_Jet1") ;
sg_dPhi_MET_Jet2 = (TH2D*) theFile->Get("sg_dPhi_MET_Jet2") ;
sg_dPhi_MET_Jet3 = (TH2D*) theFile->Get("sg_dPhi_MET_Jet3") ;
cs_Eta_Time = (TH2D*) theFile->Get("cs_Eta_Time");
cs_Phi_Time = (TH2D*) theFile->Get("cs_Phi_Time");
cs_sigIeta_Time = (TH2D*) theFile->Get("cs_sigIeta_Time");
cs_cscdPhi = (TH1D*) theFile->Get("cs_cscdPhi");
cs_nXtl = (TH1D*) theFile->Get("cs_nXtl");
cs_swissX = (TH1D*) theFile->Get("cs_swissX");
cs_sMaj_sMin = (TH2D*) theFile->Get("cs_sMaj_sMin");
cs_cHadIso_Time = (TH2D*) theFile->Get("cs_cHadIso_Time");
cs_nHadIso_Time = (TH2D*) theFile->Get("cs_nHadIso_Time");
cs_photIso_Time = (TH2D*) theFile->Get("cs_photIso_Time");
cs_dtdPhidEta = (TH2D*) theFile->Get("cs_dtdPhidEta");
cs_seedE_photE = (TH2D*) theFile->Get("cs_seedE_photE");
sideband_photIso_cscdPhi = (TH2D*) theFile->Get("sideband_photIso_cscdPhi");
sideband_sMin_Time = (TH2D*) theFile->Get("sideband_sMin_Time");
sideband_sMaj_Time = (TH2D*) theFile->Get("sideband_sMaj_Time");
sideband_sMaj_Phi = (TH2D*) theFile->Get("sideband_sMaj_Phi");
sideband_sMaj_sMin = (TH2D*) theFile->Get("sideband_sMaj_sMin");
sideband_sMaj_Eta = (TH2D*) theFile->Get("sideband_sMaj_Eta");
sideband_nXtl_Eta = (TH2D*) theFile->Get("sideband_nXtl_Eta");
sideband_cscT_ecalT= (TH2D*) theFile->Get("sideband_cscT_ecalT");
sideband_cscdPhi_u = (TH1D*) theFile->Get("sideband_cscdPhi_u");
sideband_cscdPhi_d = (TH1D*) theFile->Get("sideband_cscdPhi_d");
sideband_dtdR = (TH1D*) theFile->Get("sideband_dtdR");
sideband_dtdPhidEta = (TH2D*) theFile->Get("sideband_dtdPhidEta");
sideband_sMaj = (TH1D*) theFile->Get("sideband_sMaj");
sideband_Pt_nJet = (TH2D*) theFile->Get("sideband_Pt_nJet");
abcd_Pt_Time = (TH2D*) theFile->Get("abcd_Pt_Time");
abcd_MET_Time = (TH2D*) theFile->Get("abcd_MET_Time");
abcd_MET1_T_sMET2_1J = (TH2D*) theFile->Get("abcd_MET1_T_sMET2_1J");
abcd_MET1_T_bMET2_1J = (TH2D*) theFile->Get("abcd_MET1_T_bMET2_1J");
abcd_MET1_T_sMET2_2J = (TH2D*) theFile->Get("abcd_MET1_T_sMET2_2J");
abcd_MET1_T_bMET2_2J = (TH2D*) theFile->Get("abcd_MET1_T_bMET2_2J");
abcd_MET1_Time_closure1 = (TH2D*) theFile->Get("abcd_MET1_Time_closure1");
abcd_MET1_Time_closure2 = (TH2D*) theFile->Get("abcd_MET1_Time_closure2");
abcd_MET2_Time = (TH2D*) theFile->Get("abcd_MET2_Time");
abcd_NJet_Time = (TH2D*) theFile->Get("abcd_NJet_Time");
sideband_dPhi_MET_csc = (TH2D*) theFile->Get("sideband_dPhi_MET_csc") ;
sideband_dPhi_MET_Jet1 = (TH2D*) theFile->Get("sideband_dPhi_MET_Jet1") ;
sideband_dPhi_MET_Jet2 = (TH2D*) theFile->Get("sideband_dPhi_MET_Jet2") ;
sideband_dPhi_MET_Jet3 = (TH2D*) theFile->Get("sideband_dPhi_MET_Jet3") ;
pure_Time = (TH1D*) theFile->Get("pure_Time");
nJets_center = (TH1D*) theFile->Get("nJets_center");
nJets_halo = (TH1D*) theFile->Get("nJets_halo");
nJets_spike = (TH1D*) theFile->Get("nJets_spike");
nJets_cosmic = (TH1D*) theFile->Get("nJets_cosmic");
nHL_Eta = (TH1D*) theFile->Get("nHL_Eta");
nSpk_Eta = (TH1D*) theFile->Get("nSpk_Eta");
nCS_Eta = (TH1D*) theFile->Get("nCS_Eta");
hBg_F = (TH3D*) theFile->Get("hBg_F") ;
hBg_E = (TH3D*) theFile->Get("hBg_E") ;
hBg_D = (TH3D*) theFile->Get("hBg_D") ;
hBg_C = (TH3D*) theFile->Get("hBg_C") ;
hBg_B = (TH3D*) theFile->Get("hBg_B") ;
hBg_A = (TH3D*) theFile->Get("hBg_A") ;
hCol_F = (TH3D*) theFile->Get("hCol_F") ;
hCol_E = (TH3D*) theFile->Get("hCol_E") ;
hCol_D = (TH3D*) theFile->Get("hCol_D") ;
hCol_C = (TH3D*) theFile->Get("hCol_C") ;
hCol_B = (TH3D*) theFile->Get("hCol_B") ;
hCol_A = (TH3D*) theFile->Get("hCol_A") ;
cout<<" link all histograms "<<endl ;
}
void BackgroundStudy::CreateHistograms() {
Create() ;
qcdS->Create( theFile ) ;
haloS->Create( theFile ) ;
spikeS->Create( theFile ) ;
cosmicS->Create( theFile ) ;
}
void BackgroundStudy::SimpleRun( string dataName, double weight ) {
// Open file and link the tree
string dataFileNames ;
if ( dataName.size() > 0 ) {
dataFileNames = dataName ;
} else {
Input->GetParameters( "TheData", &dataFileNames );
}
tr = Input->GetTree( dataFileNames, "DPAnalysis" );
totalN = tr->GetEntries();
cout<<" Get the tree ! "<<endl ;
setRtupleAddresses( tr, rt );
cout<<" Link Tree variables ! "<<endl ;
gSystem->mkdir( hfolder.c_str() );
//TString Path_fName = hfolder + hfileName + ".root" ;
//theFile = new TFile( Path_fName, "RECREATE" );
//theFile->cd() ;
int beginEvent = SkipEvents + 1 ;
cout<<" Event start from : "<< beginEvent << endl ;
cout<<" from "<< dataFileNames <<" total entries = "<< totalN <<" Process "<< ProcessEvents <<endl;
int nTrig[2] = { 0 , 0 } ;
for ( int i= beginEvent ; i< totalN ; i++ ) {
if ( ProcessEvents > 0 && i > ( ProcessEvents + beginEvent - 1 ) ) break;
tr->GetEntry( i );
select->Init( rt ) ;
if ( i % 100000 == 0 && i > 99999 ) printf(" ----- processed %8d Events \n", i ) ;
// 1. Reset the cuts and collectors
select->ResetCuts() ;
select->ResetCollection() ;
// Trigger selection
//if ( rt.triggered != 1 && rt.triggered != 3 ) continue ;
bool passTrigger = select->HLTFilter() ;
if ( !passTrigger ) continue ;
// 2. ControlSelection - Events containing at least 1 photon
uint32_t evtType = select->EventIdentification();
// 3. Get Selection Result
selectJets.clear() ;
select->GetCollection("Jet", selectJets ) ;
selectPho.clear() ;
select->GetCollection("Photon", selectPho ) ;
//// Trigger Efficiency
if ( selectPho.size() > 0 ) {
if ( rt.triggered == 1 || rt.triggered == 3 ) nTrig[0]++ ;
if ( rt.triggered == 3 ) nTrig[1]++ ;
}
//// Propagate the MET2 to others
newMET = select->newMET ;
noPhotMET = select->noPhotMET ;
//TLorentzVector met1 = select->noPhotMET ;
//printf(" pf: %.2f, met1: %.2f , met2: %.2f \n", rt.metE, noPhotMET.E() , newMET.E() ) ;
//printf(" njet : %d , nphot : %d \n", (int)selectJets.size() , (int)selectPho.size() ) ;
haloS->GetNewMET( newMET, select->noPhotMET ) ;
spikeS->GetNewMET( newMET, select->noPhotMET ) ;
cosmicS->GetNewMET( newMET, select->noPhotMET ) ;
qcdS->GetNewMET( newMET, select->noPhotMET ) ;
// 4. Raw Information - without applying any cuts
RawInfo( selectPho, selectJets, weight ) ;
qcdS->Run( selectPho, selectJets, rt, weight ) ;
// Type = 2 : Control sample , at least one photon pt > 45 GeV
bool wanted = ( (evtType >> 2) & 1 ) ;
if ( !wanted ) continue ;
//cout<<" evt type: "<< evtType ;
//cout<<" phot sz: "<< selectPho.size() <<" jet sz: "<< selectJets.size() << endl ;
// 5. Study each components
ControlStudy( selectPho, selectJets, weight ) ;
haloS->Run( selectPho, selectJets, rt, weight ) ;
spikeS->Run( selectPho, selectJets, rt, weight ) ;
cosmicS->Run( selectPho, selectJets, rt, weight ) ;
}
printf( "MET Trigger Efficiency = %d / %d = %.2f \n\n", nTrig[1] , nTrig[0], (float)nTrig[1]/(float)nTrig[0] ) ;
// Display cut flow
select->PrintCutFlow() ;
}
void BackgroundStudy::WriteDrawHistograms() {
theFile->cd() ;
Write() ;
qcdS->Write() ;
haloS->Write() ;
spikeS->Write() ;
cosmicS->Write() ;
// Draw histograms
qcdS->DrawHistograms( h_draw_ ) ;
haloS->DrawHistograms( h_draw_ ) ;
spikeS->DrawHistograms( h_draw_ ) ;
cosmicS->DrawHistograms( h_draw_ ) ;
DrawHistograms( h_draw_ ) ;
}
// The overview of the data, without applying any cuts
void BackgroundStudy::RawInfo( vector<objID>& selectPho, vector<objID>& selectJets, double weight ) {
TLorentzVector met = select->theMET ;
double pfMET_ = ( met.E() > 99.5 ) ? 99.5 : met.E() ;
double hltMET_ = ( rt.t_met > 99.5 ) ? 99.5 : rt.t_met ;
h_pfMET->Fill( pfMET_, weight ) ;
h_hltMET->Fill( hltMET_, weight ) ;
h_nPhoton->Fill( selectPho.size(), weight ) ;
h_nVtx->Fill( rt.totalNVtx, weight ) ;
for ( int k=0 ; k < rt.nPhotons ; k++ ) {
TLorentzVector gP4_ = TLorentzVector( rt.phoPx[k], rt.phoPy[k], rt.phoPz[k], rt.phoE[k] ) ;
bool badseed = badCrystal( gP4_.Eta() , gP4_.Phi() ) ;
double egScale = 1. ;
if ( systType == 5 ) egScale = ( fabs(gP4_.Eta()) < 1.479 ) ? 1.006 : 1.015 ;
if ( systType == 6 ) egScale = ( fabs(gP4_.Eta()) < 1.479 ) ? 0.994 : 0.985 ;
gP4_ = gP4_ * egScale ;
if ( fabs(gP4_.Eta() ) < 1.47 ) h_Eta_Phi->Fill( gP4_.Eta() , gP4_.Phi() , weight );
if ( badseed ) continue ;
bool haloTag = haloS->HaloTag( rt , k) ;
double nHIso = max( rt.nHadIso[k] - (0.04*gP4_.Pt()) , 0. ) ;
double phIso = max( rt.photIso[k] - (0.005*gP4_.Pt()) , 0. ) ;
double cscdPhi_ = ( rt.cscdPhi[k] > 9. ) ? 3.24 : rt.cscdPhi[k] ;
h_nVtx_tChi2->Fill( rt.totalNVtx, rt.timeChi2[k], weight ) ;
if ( met.E() - newMET.E() > 1. ) h_Eta_Time1->Fill( gP4_.Eta() , rt.seedTime[k] , weight );
if ( newMET.E() - met.E() > 1. ) h_Eta_Time2->Fill( gP4_.Eta() , rt.seedTime[k] , weight );
if ( met.E() - noPhotMET.E() > 1. ) h_Eta_Time3->Fill( gP4_.Eta() , rt.seedTime[k] , weight );
if ( noPhotMET.E() - met.E() > 1. ) h_Eta_Time4->Fill( gP4_.Eta() , rt.seedTime[k] , weight );
if ( fabs(gP4_.Eta()) < 1.45 ) {
if ( selectJets.size() >= 0 ) h_EB_Time->Fill( rt.seedTime[k] , weight );
if ( selectJets.size() == 0 ) h_EB_Time0->Fill( rt.seedTime[k] , weight );
if ( selectJets.size() == 1 ) h_EB_Time1->Fill( rt.seedTime[k] , weight );
if ( selectJets.size() >= 2 ) h_EB_Time2->Fill( rt.seedTime[k] , weight );
}
if ( fabs(gP4_.Eta()) > 1.5 ) {
if ( selectJets.size() >= 0 ) h_EE_Time->Fill( rt.seedTime[k] , weight );
if ( selectJets.size() == 0 ) h_EE_Time0->Fill( rt.seedTime[k] , weight );
if ( selectJets.size() == 1 ) h_EE_Time1->Fill( rt.seedTime[k] , weight );
if ( selectJets.size() >= 2 ) h_EE_Time2->Fill( rt.seedTime[k] , weight );
if ( haloTag ) h_EE_haloTime->Fill( rt.seedTime[k] , weight ) ;
}
if ( k ==0 ) h_Pt_MET->Fill( gP4_.Pt(), met.E(), weight ) ;
h_Eta_Time->Fill( gP4_.Eta() , rt.seedTime[k] , weight );
if ( fabs( rt.seedTime[k]) > 1.5 ) h_Phi_Time->Fill( gP4_.Phi() , rt.seedTime[k] , weight );
h_cscdPhi_cscTime->Fill( cscdPhi_, rt.cscTime[k] , weight ) ;
h_cscdPhi_rho->Fill( cscdPhi_, rt.cscRho[k] , weight ) ;
if ( fabs( gP4_.Eta() ) < 1.45 ) {
h_cscdPhi_Time->Fill( cscdPhi_ , rt.seedTime[k] , weight ) ;
h_sMin_Time_EB->Fill( rt.sMinPho[k] , rt.seedTime[k] , weight ) ;
h_sMaj_Time_EB->Fill( rt.sMajPho[k] , rt.seedTime[k] , weight ) ;
h_sMin_sigIeta_EB->Fill( rt.sMinPho[k] , rt.sigmaIeta[k] , weight ) ;
h_sMaj_sigIeta_EB->Fill( rt.sMajPho[k] , rt.sigmaIeta[k] , weight ) ;
h_sigIeta_Time_EB->Fill( rt.sigmaIeta[k], rt.seedTime[k] , weight ) ;
h_Pt_Time_EB->Fill( gP4_.Pt(), rt.seedTime[k] , weight ) ;
h_MET_Time_EB->Fill( met.E(), rt.seedTime[k] , weight ) ;
h_hltMET_Time_EB->Fill( rt.t_met, rt.seedTime[k] , weight ) ;
h_sMaj_sMin_EB->Fill( rt.sMajPho[k] , rt.sMinPho[k] , weight );
h_nXtl_Pt_EB->Fill( rt.nXtals[k], gP4_.Pt() , weight );
}
if ( fabs( gP4_.Eta() ) > 1.5 ) {
h_sMin_Time_EE->Fill( rt.sMinPho[k] , rt.seedTime[k] , weight );
h_sMaj_Time_EE->Fill( rt.sMajPho[k] , rt.seedTime[k] , weight );
h_sMin_sigIeta_EE->Fill( rt.sMinPho[k] , rt.sigmaIeta[k] , weight );
h_sMaj_sigIeta_EE->Fill( rt.sMajPho[k] , rt.sigmaIeta[k] , weight );
h_sigIeta_Time_EE->Fill( rt.sigmaIeta[k], rt.seedTime[k] , weight ) ;
h_Pt_Time_EE->Fill( gP4_.Pt(), rt.seedTime[k] , weight ) ;
h_MET_Time_EE->Fill( met.E(), rt.seedTime[k] , weight ) ;
h_hltMET_Time_EE->Fill( rt.t_met , rt.seedTime[k] , weight ) ;
}
h_sMaj_Eta->Fill( rt.sMajPho[k] , gP4_.Eta() , weight ) ;
h_nXtl_Eta->Fill( rt.nXtals[k], gP4_.Eta() , weight );
if ( rt.sMajPho[k] > 0.4 ) h_sMaj_Phi->Fill( rt.sMajPho[k] , gP4_.Phi() , weight ) ;
h_cHadIso_Time->Fill( rt.cHadIso[k] , rt.seedTime[k] , weight ) ;
h_nHadIso_Time->Fill( nHIso , rt.seedTime[k] , weight ) ;
h_photIso_Time->Fill( phIso , rt.seedTime[k] , weight ) ;
h_seedE_Time->Fill( rt.seedE[k] , rt.seedTime[k] , weight ) ;
}
}
void BackgroundStudy::ControlStudy( vector<objID>& selectPho, vector<objID>& selectJets, double weight ) {
TLorentzVector met = select->theMET ;
TLorentzVector ajet = JetVectorSum( selectJets ) ;
double dPhi_jMET = ( selectJets.size() > 0 ) ? fabs( met.DeltaPhi( ajet ) ) : -0.1 ;
FILE* logfile = fopen( "SignalList.txt" ,"a");
// Pick the photon if more than one in the event
int k = -1 ;
vector<int> glist ;
vector<int> nlist ;
vector<int> slist ;
for ( int kk = 0 ; kk < (int)selectPho.size() ; kk++) {
int m = selectPho[kk].first ;
bool haloTag = haloS->HaloTag( rt , m) ;
bool cosmicTag = cosmicS->CosmicTag(rt, m ) ;
bool spikeTag = spikeS->SpikeTag(rt, m) ;
bool ghostTag = ( haloTag || spikeTag || cosmicTag ) ? true : false ;
if ( ghostTag ) {
glist.push_back( m ) ;
} else if ( rt.seedTime[m] > TCut[2] && rt.seedTime[m] < TCut[3] ) {
k = m ; // 1. Choose late timing first but not ghost
break ;
} else if ( rt.seedTime[m] > TCut[0] && rt.seedTime[m] < TCut[1] ) {
nlist.push_back( m ) ;
} else {
slist.push_back( m ) ;
}
}
if ( k < 0 ) {
if ( nlist.size() > 0 ) k = nlist[0] ; // 2. negative timing but not ghost
else if ( slist.size() > 0 ) k = slist[0] ; // 3. in-time but not ghost
else if ( glist.size() > 0 ) k = glist[0] ; // 4. ghost
else k = 0 ;
}
//for ( size_t kk =0; kk < selectPho.size() ; kk++) {
//int k = selectPho[kk].first ;
//TLorentzVector gP4_ = selectPho[kk].second ;
TLorentzVector gP4_ = TLorentzVector( rt.phoPx[k], rt.phoPy[k], rt.phoPz[k], rt.phoE[k] ) ;
double dPhi_gMET = fabs( gP4_.DeltaPhi( met ) );
double cscdPhi_ = ( rt.cscdPhi[k] > 9. ) ? 3.24 : rt.cscdPhi[k] ;
double nHIso = max( rt.nHadIso[k] - (0.04*gP4_.Pt()) , 0. ) ;
double phIso = max( rt.photIso[k] - (0.005*gP4_.Pt()) , 0. ) ;
// Define the Tag and Check the efficiency
bool haloTag = haloS->HaloTag( rt , k) ;
bool cosmicTag = cosmicS->CosmicTag(rt, k ) ;
bool spikeTag = spikeS->SpikeTag(rt, k) ;
bool ghostTag = ( haloTag || spikeTag || cosmicTag ) ? true : false ;
// Test for ABCD region
if ( !ghostTag && selectPho[0].second.Pt() > photonCuts[8] && selectJets.size() >= jetCuts[2] && selectJets.size() <= jetCuts[3]) {
abcd_MET_Time->Fill( met.E(), rt.seedTime[k], weight);
abcd_MET2_Time->Fill( newMET.E(), rt.seedTime[k], weight);
}
// ******************
// Region A and B - Real Photon: -0.024 +/- 0.426
// ******************
bool passABCDSelection = ( newMET.E() > jetCuts[4] && rt.timeChi2[k] < 4 && selectPho[0].second.Pt() > photonCuts[8] ) ;
bool passCollSelection = ( newMET.E() < jetCuts[4] && rt.timeChi2[k] < 4 && selectPho[0].second.Pt() > photonCuts[8] ) ;
int ih = ( fabs(gP4_.Eta()) >= 1.4 ) ? 4 : ( fabs(gP4_.Eta()) / 0.28 ) ;
int nj = ( selectJets.size() > 2 ) ? 2 : (int)selectJets.size() ;
if ( !ghostTag ) {
if (passABCDSelection && selectJets.size() == 1) abcd_MET1_T_bMET2_1J->Fill( noPhotMET.E(), rt.seedTime[k], weight );
if (passCollSelection && selectJets.size() == 1) abcd_MET1_T_sMET2_1J->Fill( noPhotMET.E(), rt.seedTime[k], weight );
if (passABCDSelection && selectJets.size() > 1) abcd_MET1_T_bMET2_2J->Fill( noPhotMET.E(), rt.seedTime[k], weight );
if (passCollSelection && selectJets.size() > 1) abcd_MET1_T_sMET2_2J->Fill( noPhotMET.E(), rt.seedTime[k], weight );
if (passABCDSelection && selectJets.size() >= 1) abcd_Pt_Time->Fill( gP4_.Pt() , rt.seedTime[k], weight) ;
if ( passABCDSelection ) abcd_NJet_Time->Fill( selectJets.size(), rt.seedTime[k], weight);
}
// Another closure selection -- test of closure test !!!
if ( newMET.E() > jetCuts[4] && rt.timeChi2[k] < 4 && selectPho[0].second.Pt() < photonCuts[8] ) {
if ( selectJets.size() == 1 ) abcd_MET1_Time_closure1->Fill( noPhotMET.E(), rt.seedTime[k], weight ) ;
if ( selectJets.size() > 1 ) abcd_MET1_Time_closure2->Fill( noPhotMET.E(), rt.seedTime[k], weight ) ;
}
// Region E , |t| < 2 ns
if ( fabs(rt.seedTime[k]) < 2. && passABCDSelection ) {
if ( noPhotMET.E() > jetCuts[4] ) hBg_F->Fill( ih, 0.5, nj, weight );
if ( noPhotMET.E() < jetCuts[4] ) hBg_E->Fill( ih, 0.5, nj, weight );
}
if ( rt.seedTime[k] > TCut[0] && rt.seedTime[k] < TCut[1] && passABCDSelection ) {
// Region B
if ( noPhotMET.E() > jetCuts[4] ) {
hBg_B->Fill( ih, 0.5, nj, weight );
if ( haloTag && !cosmicTag && !spikeTag ) hBg_B->Fill( ih, 1.5, nj, weight );
if ( spikeTag && !cosmicTag ) hBg_B->Fill( ih, 2.5, nj, weight );
if ( cosmicTag ) hBg_B->Fill( ih, 3.5, nj, weight );
}
// Region A
if ( noPhotMET.E() < jetCuts[4] ) {
hBg_A->Fill( ih, 0.5, nj, weight );
if ( haloTag && !cosmicTag && !spikeTag ) hBg_A->Fill( ih, 1.5, nj, weight );
if ( spikeTag && !cosmicTag ) hBg_A->Fill( ih, 2.5, nj, weight );
if ( cosmicTag ) hBg_A->Fill( ih, 3.5, nj, weight );
if ( !ghostTag && nj >= jetCuts[2] && nj <= jetCuts[3] ) {
fprintf(logfile,"====== Region A ====== \n");
fprintf(logfile,"RunID: %d EventId: %d , LumiSec: %d \n", rt.runId, rt.eventId, rt.lumi );
fprintf(logfile," N Photon : %d \n", (int)selectPho.size() );
fprintf(logfile," MET1: %.2f (%.2f) , MET2: %.2f (%.2f)\n", noPhotMET.E(), noPhotMET.Phi(), newMET.E(), newMET.Phi() );
fprintf(logfile," N Jet : %d \n", (int)selectJets.size() );
for ( int ss=0; ss < (int)selectJets.size() ; ss++ ) {
fprintf(logfile," Jet(%d) , pt = %.2f, eta: %.2f, phi: %.2f \n",
ss, selectJets[ss].second.Pt(), selectJets[ss].second.Eta(), selectJets[ss].second.Phi() );
}
fprintf(logfile," Pho(%d) , pt = %.2f , t = %.2f ", k, gP4_.Pt() , rt.seedTime[k] );
fprintf(logfile," eta = %.2f , phi = %.2f, sMaj = %.2f, sMin = %.2f, phIso : %.2f , nHIso: %.2f, cHIso: %.2f \n",
gP4_.Eta() , gP4_.Phi(), rt.sMajPho[k] , rt.sMinPho[k], phIso, nHIso, rt.cHadIso[k] );
fprintf(logfile," cscdPhi= %.2f dt(df,dh) = (%.2f,%.2f) \n", cscdPhi_, rt.dtdPhi[k], rt.dtdEta[k] ) ;
}
}
}
// ******************
// Region C and D
// ******************
if ( rt.seedTime[k] > TCut[2] && rt.seedTime[k] < TCut[3] && passABCDSelection ) {
// Region D
if ( noPhotMET.E() > jetCuts[4] ) {
if ( !ghostTag ) {
fprintf(logfile,"====== Region D ====== \n");
fprintf(logfile,"RunID: %d EventId: %d , LumiSec: %d \n", rt.runId, rt.eventId, rt.lumi );
fprintf(logfile," N Photon : %d \n", (int)selectPho.size() );
fprintf(logfile," MET1 : %.2f , MET2 : %.2f \n", noPhotMET.E() , newMET.E() );
fprintf(logfile," N Jet : %d \n", (int)selectJets.size() );
for ( int ss=0; ss < (int)selectJets.size() ; ss++ ) {
fprintf(logfile," Jet(%d) , pt = %.2f, eta: %.2f, phi: %.2f \n",
ss, selectJets[ss].second.Pt(), selectJets[ss].second.Eta(), selectJets[ss].second.Phi() );
}
fprintf(logfile," Pho(%d) , pt = %.2f , t = %.2f ", (int)k, gP4_.Pt() , rt.seedTime[k] );
fprintf(logfile," eta = %.2f , phi = %.2f, sMaj = %.2f, sMin = %.2f, phIso : %.2f , nHIso: %.2f, cHIso: %.2f \n",
gP4_.Eta() , gP4_.Phi(), rt.sMajPho[k] , rt.sMinPho[k], phIso, nHIso, rt.cHadIso[k] );
}
hBg_D->Fill( ih, 0.5, nj, weight );
if ( haloTag && !cosmicTag && !spikeTag ) hBg_D->Fill( ih, 1.5, nj, weight );
if ( spikeTag && !cosmicTag ) hBg_D->Fill( ih, 2.5, nj, weight );
if ( cosmicTag ) hBg_D->Fill( ih, 3.5, nj, weight );
}
// Region C