forked from hvanhaev/CommonFSQFramework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
DiffractiveAndTrack.py
executable file
·1852 lines (1377 loc) · 108 KB
/
DiffractiveAndTrack.py
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
#!/usr/bin/env python
#from rootpy.math.physics.vector import LorentzVector
import sys, os, time
sys.path.append(os.path.dirname(__file__))
sys.path.append('/cr/data01/castor/')
import ROOT
ROOT.gROOT.SetBatch(True)
import ParticleDataTool as pd
from collections import Counter
from bad_calo_channel_list import bad_channels_eta_phi_dNdEta
from bad_calo_channel_list2 import bad_channels_eta_phi_Run247934 #lhcf run 247934
# from ROOT import edm
from array import *
import math
import numpy as np
from math import cosh
from math import sinh
from math import sin
from math import cos
from math import tan
from math import pi
from math import sqrt
from math import log10
from math import atan
from math import exp
import random
import CommonFSQFramework.Core.ExampleProofReader
EventSelection_with_Xi = True
Training_Signal = "DD"
# self.HF_energy_scale =1.00#0.9 #1.1
# ParameterSet = 'Seb_dNdEta_LHCf'
# ParameterSet = 'Melike_dNdEta'
# ParameterSet = 'Seb_LHCf_Run247934'
# ParameterSet = 'MC'
def compareTracketa(first,second):
if first[0] > second[0]: return 1
if first[0] == second[0]: return 0
if first[0] < second[0]: return -1
def compareGeneta(first,second):
if first[0].eta() > second[0].eta(): return 1
if first[0].eta() == second[0].eta(): return 0
if first[0].eta() < second[0].eta(): return -1
def compareGenrapidity(first,second):
if first[0].Rapidity() > second[0].Rapidity(): return 1
if first[0].Rapidity() == second[0].Rapidity(): return 0
if first[0].Rapidity() < second[0].Rapidity(): return -1
class DiffractiveAndTrack(CommonFSQFramework.Core.ExampleProofReader.ExampleProofReader):
def CreateTree(self,tree):
tree.Branch('EventselectionXiprocessDD', self.OUTEventselectionXiprocessDD,'EventselectionXiprocessDD/I')
tree.Branch('EventselectionXiprocessSD1', self.OUTEventselectionXiprocessSD1,'EventselectionXiprocessSD1/I')
tree.Branch('EventselectionXiprocessSD2', self.OUTEventselectionXiprocessSD2,'EventselectionXiprocessSD2/I')
tree.Branch('EventselectionXiprocessRest', self.OUTEventselectionXiprocessRest,'EventselectionXiprocessRest/I')
tree.Branch('Pythia8processid', self.OUTPythia8processid,'Pythia8processid/I')
tree.Branch('log10XixGen', self.OUTlog10XixGen,'log10XixGen/F')
tree.Branch('log10XiyGen', self.OUTlog10XiyGen,'log10XiyGen/F')
tree.Branch('log10XixReco', self.OUTlog10XixReco,'log10XixReco/F')
tree.Branch('log10XiyReco', self.OUTlog10XiyReco,'log10XiyReco/F')
tree.Branch('deltazero', self.OUTdeltazero,'deltazero/F')
tree.Branch('forwardgendelta', self.OUTforwardgendelta, 'forwardgendelta/F')
tree.Branch('deltaeta', self.OUTdeltaeta,'deltaeta/F')
tree.Branch('etamin', self.OUTetamin, 'etamin/F')
tree.Branch('RGmean', self.OUTrapditygapmean,'RGmean/F')
tree.Branch('etamax', self.OUTetamax, 'etamax/F')
tree.Branch('CastorNtowers', self.OUTCastorNtowers, 'CastorNtowers/I')
tree.Branch('HFminusNtowers', self.OUTHFminusNtowers,'HFminusNtowers/I')
tree.Branch('HFplusNtowers', self.OUTHFplusNtowers,'HFplusNtowers/I')
tree.Branch('Ntracks', self.OUTNtracks,'Ntracks/I')
tree.Branch('Etarange', self.OUTEtarange, 'Etarange/I')
tree.Branch('log10XiDD', self.OUTlog10XiDD,'log10XiDD/F')
tree.Branch('CaloReducedenergyClass', self.OUTCaloReducedenergyClass,'CaloReducedenergyClass/I')
tree.Branch('CastorSumEnergy', self.OUTCastorSumEnergy, 'CastorSumEnergy/F')
tree.Branch('HFSumEnergy', self.OUTHFSumEnergy, 'HFSumEnergy/F')
tree.Branch('MaxHFEnergy', self.OUTMaxHFEnergy, 'MaxHFEnergy/F')
tree.Branch('MaxCastorEnergy', self.OUTMaxCastorEnergy, 'MaxCastorEnergy/F')
# tree.Branch('EvtWeight', self.OUTEvtWeight, 'EvtWeight/F')
# def init(self, ParameterSet="MC", HF_energy_scale=1.0, Track_efficiency_scale=1.0, maxEvents = None):
def init(self, maxEvents = None):
self.maxEvents = maxEvents
self.hist = {}
self.hist["hNentries"] = ROOT.TH1F("hNentries","hNentries",10, 0, 20)
self.hist["hNentriesWithEventSelectionCuts"] = ROOT.TH1F("NentriesWithEventSelectionCuts","NentriesWithEventSelectionCuts",10, 0, 20)
self.hist["hProcessesIdPythia"] = ROOT.TH1F("hProcessesIdPythia","hProcessesIdPythia",10, 0, 20)
self.hist["hProcessescut"] = ROOT.TH1F("hProcessescut","hProcessescut",10, 0, 20)
self.hist["hProcessescuteta"] = ROOT.TH1F("hProcessescuteta","hProcessescuteta",10, 0, 20)
self.hist["BunchCrossing"] = ROOT.TH1F("BunchCrossing", "BunchCrossing", 3600, 0-0.5, 3600-0.5)
self.hist["Runs"] = ROOT.TH1F("Runs", "Runs", 2000, 246000-0.5, 278000-0.5)
self.hist["HFEnergy"] = ROOT.TH1F("HFEnergy","HFEnergy",100, 0, 200)
nBinSumE =250;
MinSumE = 0 ;
MaxSumE = 2500;
ntow= 101
Mintow=-0.5
Maxtow= 100.5
self.hist["Hist_sum_CAS_E"] = ROOT.TH1F("Hist_sum_CAS_E", "Hist_sum_CAS_E" ,nBinSumE, MinSumE, MaxSumE)
self.hist["Hist_HFSumEnergy"] = ROOT.TH1F("Hist_HFSumEnergy", "Hist_HFSumEnergy" ,nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_CastorSumEnergy"] = ROOT.TH1F("Hist_CastorSumEnergy", "Hist_CastorSumEnergy" ,nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_eventXiID_HFSumEnergy"] = ROOT.TH1F("Hist_eventXiID_HFSumEnergy", "Hist_eventXiID_HFSumEnergy" ,nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_eventXiID_CastorSumEnergy"] = ROOT.TH1F("Hist_eventXiID_CastorSumEnergy", "Hist_eventXiID_CastorSumEnergy" ,nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_MaxHFEnergy"] = ROOT.TH1F("Hist_MaxHFEnergy","Hist_MaxHFEnergy",nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_MaxCastorEnergy"] = ROOT.TH1F("Hist_MaxCastorEnergy","Hist_MaxCastorEnergy",nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_eventXiID_MaxHFEnergy"] = ROOT.TH1F("Hist_eventXiID_MaxHFEnergy","Hist_eventXiID_MaxHFEnergy",nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_eventXiID_MaxCastorEnergy"] = ROOT.TH1F("Hist_eventXiID_MaxCastorEnergy","Hist_eventXiID_MaxCastorEnergy",nBinSumE,MinSumE, MaxSumE)
self.hist["hParticleCounts"] = ROOT.TH1F("hParticleCounts","hParticleCounts",10, 0, 20)
self.hist["Hist_2Drecogen_EnergyX"] = ROOT.TH2D("Hist_2Drecogen_EnergyX", "Hist_2Drecogen_EnergyX", 100, 0, 8000,100, 0, 8000)
self.hist["Hist_2Drecogen_EnergyY"] = ROOT.TH2D("Hist_2Drecogen_EnergyY", "Hist_2Drecogen_EnergyY", 100, 0, 8000,100, 0, 8000)
self.hist["Hist_numberoftowerebovenoise_endcap"] = ROOT.TH1F("Hist_numberoftowerebovenoise_endcap","Hist_numberoftowerebovenoise_endcap",ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_barrel"] = ROOT.TH1F("Hist_numberoftowerebovenoise_barrel","Hist_numberoftowerebovenoise_barrel",ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_endcapforwardtransition"] = ROOT.TH1F("Hist_numberoftowerebovenoise_endcapforwardtransition","Hist_numberoftowerebovenoise_endcapforwardtransition",ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_forwardplus"] = ROOT.TH1F("Hist_numberoftowerebovenoise_forwardplus","Hist_numberoftowerebovenoise_forwardplus",ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_forwardminus"] = ROOT.TH1F("Hist_numberoftowerebovenoise_forwardminus","Hist_numberoftowerebovenoise_forwardminus",ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_castor"] = ROOT.TH1F("Hist_numberoftowerebovenoise_castor","Hist_numberoftowerebovenoise_castor",18,0,18)
self.hist["Hist_eventXiID_numberoftowerebovenoise_forwardplus"] = ROOT.TH1F("Hist_eventXiID_numberoftowerebovenoise_forwardplus","Hist_eventXiID_numberoftowerebovenoise_forwardplus",ntow,Mintow,Maxtow)
self.hist["Hist_eventXiID_numberoftowerebovenoise_forwardminus"] = ROOT.TH1F("Hist_eventXiID_numberoftowerebovenoise_forwardminus","Hist_eventXiID_numberoftowerebovenoise_forwardminus",ntow,Mintow,Maxtow)
self.hist["Hist_eventXiID_numberoftowerebovenoise_castor"] = ROOT.TH1F("Hist_eventXiID_numberoftowerebovenoise_castor","Hist_eventXiID_numberoftowerebovenoise_castor",18, 0,18)
nEtaBins = 8
EtaBins = array('d',[-6.6, -5.2, -3.2, -2.8, -1.4, 1.4, 2.8, 3.2, 5.2])
NbrVtxBins = 20
BinVtxMin = 0
BinVtxMax = 20
self.hist["Hist_NrVtx"] = ROOT.TH1F("Hist_NrVtx_","Hist_NrVtx",NbrVtxBins,BinVtxMin, BinVtxMax)
self.hist["Hist_NrVtxdelta"] = ROOT.TH1F("Hist_NrVtxdelta","Hist_NrVtxdelta",1000,BinVtxMin,50)
self.hist["Hist_NrVtxdeltacut"] = ROOT.TH1F("Hist_NrVtxdeltacut","Hist_NrVtxdeltacut",1000,BinVtxMin,50)
NbrEtaBins = 50
BinEtaMin = -6.5
BinEtaMax = 5.5
NbrDetaBins = 50
DetaMin = 0
DetaMax = 11
self.hist["Hist_GP_forwardgendelta"] = ROOT.TH1F("Hist_GP_forwardgendelta", "Hist_GP_forwardgendelta", NbrDetaBins, 0,9)
self.hist["Hist_GP_eventXiID_forwardgendelta"] = ROOT.TH1F("Hist_GP_eventXiID_forwardgendelta", "Hist_GP_eventXiID_forwardgendelta", NbrDetaBins, 0,9)
self.hist["Hist_GP_eventXiID_Min"] = ROOT.TH1F("Hist_GP_eventXiID_Min", "Hist_GP_eventXiID_Min", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_eventXiID_Max"] = ROOT.TH1F("Hist_GP_eventXiID_Max", "Hist_GP_eventXiID_Max", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_eventXiID_DeltaMax"] = ROOT.TH1F("Hist_GP_eventXiID_DeltaMax", "Hist_GP_eventXiID_DeltaMax", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_GP_eventXiID_DeltaZero"] = ROOT.TH1F("Hist_GP_eventXiID_DeltaZero", "Hist_GP_eventXiID_DeltaZero", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_eventXiID_Min"] = ROOT.TH1F("Hist_eventXiID_Min", "Hist_eventXiID_Min", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_eventXiID_Max"] = ROOT.TH1F("Hist_eventXiID_Max", "Hist_eventXiID_Max", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_eventXiID_DeltaMax"] = ROOT.TH1F("Hist_eventXiID_DeltaMax", "Hist_eventXiID_DeltaMax", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_eventXiID_DeltaZero"] = ROOT.TH1F("Hist_eventXiID_DeltaZero", "Hist_eventXiID_DeltaZero", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_eventEtaID_Min"] = ROOT.TH1F("Hist_eventEtaID_Min", "Hist_eventEtaID_Min", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_eventEtaID_Max"] = ROOT.TH1F("Hist_eventEtaID_Max", "Hist_eventEtaID_Max", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_eventEtaID_DeltaMax"] = ROOT.TH1F("Hist_eventEtaID_DeltaMax", "Hist_eventEtaID_DeltaMax", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_Eta_Min"] = ROOT.TH1F("Hist_Eta_Min", "Hist_Eta_Min", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_Eta_Max"] = ROOT.TH1F("Hist_Eta_Max", "Hist_Eta_Max", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_Eta_Delta"] = ROOT.TH1F("Hist_Eta_Delta", "Hist_Eta_Delta", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_forwarddelta"] = ROOT.TH1F("Hist_forwarddelta", "Hist_forwarddelta", NbrDetaBins, 0,9)
self.hist["Hist_eventXiID_forwarddelta"] = ROOT.TH1F("Hist_eventXiID_forwarddelta", "Hist_eventXiID_forwarddelta", NbrDetaBins, 0,9)
self.hist["Hist_Eta_DeltaZero"] = ROOT.TH1F("Hist_Eta_DeltaZero", "Hist_Eta_DeltaZero", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_Eta_DeltaMax"] = ROOT.TH1F("Hist_Eta_DeltaMax", "Hist_Eta_DeltaMax", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_2D_genreco_Deltapos"] = ROOT.TH2D("Hist_2D_genreco_Deltapos", "Hist_2D_genreco_Deltapos", NbrEtaBins, BinEtaMin, BinEtaMax,NbrEtaBins, BinEtaMin, BinEtaMax)
# Gen PArticle
self.hist["Hist_2D_recogen_Mean"] = ROOT.TH2D("Hist_2D_recogen_Mean","Hist_2D_recogen_Mean",NbrEtaBins, BinEtaMin, BinEtaMax,NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_Min"] = ROOT.TH1F("Hist_GP_Min", "Hist_GP_Min", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_Max"] = ROOT.TH1F("Hist_GP_Max", "Hist_GP_Max", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_Delta"] = ROOT.TH1F("Hist_GP_Delta","Hist_GP_Delta", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_GP_DeltaZero"] = ROOT.TH1F("Hist_GP_DeltaZero", "Hist_GP_DeltaZero", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_GP_DeltaMax"] = ROOT.TH1F("Hist_GP_DeltaMax", "Hist_GP_DeltaMax", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_GP_deltagenreco"] = ROOT.TH1F("Hist_GP_deltagenreco", "Hist_GP_deltagenreco", NbrDetaBins, -10, DetaMax)
self.hist["Hist_2D_recogen_DeltaZero"] = ROOT.TH2D("Hist_2D_recogen_DeltaZero","Hist_2D_recogen_DeltaZero", NbrDetaBins, DetaMin, DetaMax,NbrDetaBins, DetaMin, DetaMax);
self.hist["Hist_2D_recogen_DeltaMax"] = ROOT.TH2D("Hist_2D_recogen_DeltaMax","Hist_2D_recogen_DeltaMax", NbrDetaBins, DetaMin, DetaMax,NbrDetaBins, DetaMin, DetaMax);
self.hist["Hist_2D_recogen_EtaMiniumum"] = ROOT.TH2D("Hist_2D_recogen_EtaMiniumum","Hist_2D_recogen_EtaMiniumum",NbrEtaBins, BinEtaMin, BinEtaMax,NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_2D_recogen_forwarddeltaEtaMiniumum"] = ROOT.TH2D("Hist_2D_recogen_forwarddeltaEtaMiniumum", "Hist_2D_recogen_forwarddeltaEtaMiniumum", NbrDetaBins, 0,9,NbrDetaBins, 0,9)
self.hist["Hist_2D_recogen_EtaMax"]= ROOT.TH2D("Hist_2D_recogen_EtaMax","Hist_2D_recogen_EtaMax",NbrEtaBins, BinEtaMin, BinEtaMax,NbrEtaBins, BinEtaMin, BinEtaMax)
NbrSizeBins = 50
SizeEMin = 0
BinSizeEMax = 50
self.hist["Hist_NbrTracks"] = ROOT.TH1F("Hist_NbrTracks","Hist_NbrTracks",NbrSizeBins, SizeEMin,50)
self.hist["Hist_eventXiID_NbrTracks"] = ROOT.TH1F("Hist_eventXiID_NbrTracks","Hist_eventXiID_NbrTracks",NbrSizeBins, SizeEMin,50)
PhiMin = -5
PhiMax = 5
NbrPhiBins = 50
self.hist["Hist_trkPhi"] = ROOT.TH1F("Hist_trkPhi","Hist_trkPhi",NbrPhiBins, PhiMin, PhiMax)
self.hist["Hist_Eta"] = ROOT.TH1F("Hist_Eta","Hist_Eta",NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_reducedEta"] = ROOT.TH1F("Hist_reducedEta","Hist_reducedEta",NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_2D_Calotower_eta_phi"] = ROOT.TH2D("Hist_2D_Calotower_eta_phi","Hist_2D_Calotower_eta_phi",101,-50.5,50.5,81, -0.5, 80.5)
self.hist["Hist_2D_Calotower_eta_phi_withnoisytowers"] = ROOT.TH2D("Hist_2D_Calotower_eta_phi_withnoisytowers","Hist_2D_Calotower_eta_phi_withnoisytowers",101,-50.5,50.5,81, -0.5, 80.5)
self.hist["Hist_2D_Calotower_Energy_eta_phi"] = ROOT.TProfile2D("Hist_2D_Calotower_Energy_eta_phi","Hist_2D_Calotower_Energy_eta_phi",101,-50.5,50.5,81, -0.5, 80.5)
self.hist["Castortower2D_Energy_sec"] = ROOT.TH2D("Castortower2D_Energy_sec","Castortower2D_Energy_sec", 100, 0, 100, 81, -0.5, 80.5)
self.hist["Hist_2D_Calotower_noiseTower_eta_phi"] = ROOT.TH2D("Hist_2D_Calotower_noiseTower_eta_phi","Hist_2D_Calotower_noiseTower_eta_phi",101,-50.5,50.5,81, -0.5, 80.5)
self.hist["Hist_2D_Calotower_noiseTower_Energy_eta_phi"] = ROOT.TProfile2D("Hist_2D_Calotower_noiseTower_Energy_eta_phi","Hist_2D_Calotower_noiseTower_Energy_eta_phi",101,-50.5,50.5,81, -0.5, 80.5)
self.hist["Hist_trkEta"] = ROOT.TH1F("Hist_trkEta","Hist_trkEta",NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_trkplusEta"] = ROOT.TH1F("Hist_trkplusEta","Hist_trkplusEta",NbrEtaBins, BinEtaMin, BinEtaMax)
NbrLogMBins = 100
LogMin = -3.5
LogMax = 5.5
NbrEBins = 50
BinEMin = 0
BinEMax = 50
self.hist["Hist_log10Mx"] = ROOT.TH1F("Hist_log10Mx", "Hist_log10Mx", NbrLogMBins, LogMin, LogMax)
self.hist["Hist_log10My"] = ROOT.TH1F("Hist_log10My", "Hist_log10My", NbrLogMBins, LogMin, LogMax)
self.hist["Hist_2D_log10MxMy"] = ROOT.TH2D("Hist_2D_log10MxMy", "Hist_2D_log10MxMy", NbrLogMBins, LogMin, LogMax, NbrLogMBins, LogMin, LogMax)
self.hist["Hist_2D_eventXiID_log10MxMy"] = ROOT.TH2D("Hist_2D_eventXiID_log10MxMy", "Hist_2D_eventXiID_log10MxMy", NbrLogMBins, LogMin, LogMax, NbrLogMBins, LogMin, LogMax)
Process_ID = ["_NONE","_Rest","_SD1","_SD2","_DD", "_CD"]
self.hist["Hist_GP_Mx"] = ROOT.TH1F("Hist_GP_Mx", "Hist_GP_Mx", NbrLogMBins, LogMin, LogMax)
self.hist["Hist_GP_My"] = ROOT.TH1F("Hist_GP_My", "Hist_GP_My", NbrLogMBins, LogMin, LogMax)
self.hist["Hist_GP_log10Mx"] = ROOT.TH1F("Hist_GP_log10Mx", "Hist_GP_log10Mx", NbrLogMBins, LogMin, LogMax)
self.hist["Hist_GP_log10My"] = ROOT.TH1F("Hist_GP_log10My", "Hist_GP_log10My", NbrLogMBins, LogMin, LogMax)
self.hist["Hist_2D_GP_log10MxMy"] = ROOT.TH2D("Hist_2D_GP_log10MxMy", "Hist_2D_GP_log10MxMy", NbrLogMBins, LogMin, LogMax, NbrLogMBins, LogMin, LogMax)
self.hist["Hist_Energy"] = ROOT.TH1F("Hist_Energy", "Hist_Energy" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_barrel"] = ROOT.TH1F("Hist_Energy_barrel", "Hist_Energy_barrel" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_endcap"] = ROOT.TH1F("Hist_Energy_endcap", "Hist_Energy_endcap" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_endcap_forwardtransition"] = ROOT.TH1F("Hist_Energy_endcap_forwardtransition", "Hist_Energy_endcap_forwardtransition" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_forward"] = ROOT.TH1F("Hist_Energy_forward", "Hist_Energy_forward" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_forwardplus"] = ROOT.TH1F("Hist_Energy_forwardplus", "Hist_Energy_forwardplus" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_forwardminus"] = ROOT.TH1F("Hist_Energy_forwardminus", "Hist_Energy_forwardminus" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_Castor"] = ROOT.TH1F("Hist_Energy_Castor", "Hist_Energy_Castor" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy"] = ROOT.TH1F("Hist_eventXiID_Energy", "Hist_eventXiID_Energy" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_barrel"] = ROOT.TH1F("Hist_eventXiID_Energy_barrel", "Hist_eventXiID_Energy_barrel" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_endcap"] = ROOT.TH1F("Hist_eventXiID_Energy_endcap", "Hist_eventXiID_Energy_endcap" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_endcap_forwardtransition"] = ROOT.TH1F("Hist_eventXiID_Energy_endcap_forwardtransition", "Hist_eventXiID_Energy_endcap_forwardtransition" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_forward"] = ROOT.TH1F("Hist_eventXiID_Energy_forward", "Hist_eventXiID_Energy_forward" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_forwardplus"] = ROOT.TH1F("Hist_eventXiID_Energy_forwardplus", "Hist_eventXiID_Energy_forwardplus" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_forwardminus"] = ROOT.TH1F("Hist_eventXiID_Energy_forwardminus", "Hist_eventXiID_Energy_forwardminus" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_Castor"] = ROOT.TH1F("Hist_eventXiID_Energy_Castor", "Hist_eventXiID_Energy_Castor" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy"] = ROOT.TH1F("Hist_eventXiID_reducedEnergy", "Hist_eventXiID_reducedEnergy" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_barrel"] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_barrel", "Hist_eventXiID_reducedEnergy_barrel" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_endcap"] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_endcap", "Hist_eventXiID_reducedEnergy_endcap" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_endcap_forwardtransition"] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_endcap_forwardtransition", "Hist_eventXiID_reducedEnergy_endcap_forwardtransition" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_forward"] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_forward", "Hist_eventXiID_reducedEnergy_forward" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_forwardplus"] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_forwardplus", "Hist_eventXiID_reducedEnergy_forwardplus" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_forwardminus"] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_forwardminus", "Hist_eventXiID_reducedEnergy_forwardminus" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_Castor"] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_Castor", "Hist_eventXiID_reducedEnergy_Castor" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy"] = ROOT.TH1F("Hist_reducedEnergy", "Hist_reducedEnergy" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_barrel"] = ROOT.TH1F("Hist_reducedEnergy_barrel", "Hist_reducedEnergy_barrel" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_endcap"] = ROOT.TH1F("Hist_reducedEnergy_endcap", "Hist_reducedEnergy_endcap" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_endcap_forwardtransition"] = ROOT.TH1F("Hist_reducedEnergy_endcap_forwardtransition", "Hist_reducedEnergy_endcap_forwardtransition" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_forward"] = ROOT.TH1F("Hist_reducedEnergy_forward", "Hist_reducedEnergy_forward" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_forwardplus"] = ROOT.TH1F("Hist_reducedEnergy_forwardplus", "Hist_reducedEnergy_forwardplus" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_forwardminus"] = ROOT.TH1F("Hist_reducedEnergy_forwardminus", "Hist_reducedEnergy_forwardminus" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_Castor"] = ROOT.TH1F("Hist_reducedEnergy_Castor", "Hist_reducedEnergy_Castor" , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_CaloReducedenergyClass"]= ROOT.TH1F("Hist_CaloReducedenergyClass","Hist_CaloReducedenergyClass",NbrEBins, BinEMin, BinEMax)
self.hist["Hist_CaloReducedenergyClass_nocastor"]= ROOT.TH1F("Hist_CaloReducedenergyClass_nocastor","Hist_CaloReducedenergyClass_nocastor",NbrEBins, BinEMin, BinEMax)
self.hist["Hist_CaloReducedenergyClass_noHFm"]= ROOT.TH1F("Hist_CaloReducedenergyClass_noHFm","Hist_CaloReducedenergyClass_noHFm",NbrEBins, BinEMin, BinEMax)
self.hist["Hist_CaloReducedenergyClass_noHFp"]= ROOT.TH1F("Hist_CaloReducedenergyClass_noHFp","Hist_CaloReducedenergyClass_noHFp",NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_CaloReducedenergyClass"]= ROOT.TH1F("Hist_eventXiID_CaloReducedenergyClass","Hist_eventXiID_CaloReducedenergyClass",NbrEBins, BinEMin, BinEMax)
NbrLogXiBins = 100
LogXiMin = -11.5
LogXiMax = 0.5
NbrXiBins = 50
XiMin = 0
XiMax = 5
NbrLogXiBins = 100
LogXiMin = -11.5
self.hist["Hist_XiX"] = ROOT.TH1F("Hist_XiX", "Hist_XiX", NbrXiBins, XiMin, XiMax)
self.hist["Hist_XiY"] = ROOT.TH1F("Hist_XiY", "Hist_XiY", NbrXiBins, XiMin, XiMax)
self.hist["Hist_GP_log10XiDD"] = ROOT.TH1F("Hist_GP_log10XiDD", "Hist_GP_log10XiDD", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_Aftercutlog10XiDD"] = ROOT.TH1F("Hist_GP_Aftercutlog10XiDD", "Hist_GP_Aftercutlog10XiDD", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_log10XiDD_Deltamax"]= ROOT.TH2D("Hist_2D_log10XiDD_Deltamax","Hist_2D_log10XiDD_Deltamax",NbrLogXiBins, LogXiMin, LogXiMax,NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_Reco_log10XiDD"] = ROOT.TH1F("Hist_Reco_log10XiDD", "Hist_Reco_log10XiDD", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_eventXiID_Reco_log10XiDD"] = ROOT.TH1F("Hist_eventXiID_Reco_log10XiDD", "Hist_eventXiID_Reco_log10XiDD", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_RecoLogXi_DDGenLogXi_DD"] = ROOT.TH2D("Hist_2D_RecoLogXi_DDGenLogXi_DD", "Hist_2D_RecoLogXi_DDGenLogXi_DD", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_log10XiX"] = ROOT.TH1F("Hist_log10XiX", "Hist_log10XiX", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_log10XiY"] = ROOT.TH1F("Hist_log10XiY", "Hist_log10XiY", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10XiX"] = ROOT.TH1F("Hist_GP_log10XiX", "Hist_GP_log10XiX", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10XiY"] = ROOT.TH1F("Hist_GP_log10XiY", "Hist_GP_log10XiY", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10XiX_protonplus"] = ROOT.TH1F("Hist_GP_log10XiX_protonplus", "Hist_GP_log10XiX_protonplus", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10XiY_protonminus"] = ROOT.TH1F("Hist_GP_log10XiY_protonminus", "Hist_GP_log10XiY_protonminus", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10MaxXi"] = ROOT.TH1F("Hist_GP_log10MaxXi", "Hist_GP_log10MaxXi", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_Aftercutlog10XiX"] = ROOT.TH1F("Hist_GP_Aftercutlog10XiX", "Hist_GP_Aftercutlog10XiX", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_Aftercutlog10XiY"] = ROOT.TH1F("Hist_GP_Aftercutlog10XiY", "Hist_GP_Aftercutlog10XiY", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_Aftercutlog10MaxXi"] = ROOT.TH1F("Hist_GP_Aftercutlog10MaxXi", "Hist_GP_Aftercutlog10MaxXi", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2Dlog10XiXXiY"] = ROOT.TH2D("Hist_2Dlog10XiXXiY", "Hist_2Dlog10XiXXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2DLogRecoXiX_logGenXiX"] = ROOT.TH2D("Hist_2DLogRecoXiX_logGenXiX", "Hist_2DLogRecoXiX_logGenXiX", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2DLogRecoXiY_logGenLogXiY"] = ROOT.TH2D("Hist_2DLogRecoXiY_logGenLogXiY", "Hist_2DLogRecoXiY_logGenLogXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2DLogGenXiX_LogGenXiY"] = ROOT.TH2D("Hist_2DLogGenXiX_LogGenXiY", "Hist_2DLogGenXiX_LogGenXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_Aftercut2DLogGenXiX_LogGenXiY"] = ROOT.TH2D("Hist_Aftercut2DLogGenXiX_LogGenXiY", "Hist_Aftercut2DLogGenXiX_LogGenXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_FG2_RecoLogXiXGenLogXiX"] = ROOT.TH2D("Hist_2D_FG2_RecoLogXiXGenLogXiX", "Hist_2D_FG2_RecoLogXiXGenLogXiX", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_FG2_RecoLogXiYGenLogXiY"] = ROOT.TH2D("Hist_2D_FG2_RecoLogXiYGenLogXiY", "Hist_2D_FG2_RecoLogXiYGenLogXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_FG1_RecoLogXiXGenLogXiX"] = ROOT.TH2D("Hist_2D_FG1_RecoLogXiXGenLogXiX", "Hist_2D_FG1_RecoLogXiXGenLogXiX", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_FG1_RecoLogXiYGenLogXiY"] = ROOT.TH2D("Hist_2D_FG1_RecoLogXiYGenLogXiY", "Hist_2D_FG1_RecoLogXiYGenLogXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_CG_RecoLogXiXGenLogXiX"] = ROOT.TH2D("Hist_2D_CG_RecoLogXiXGenLogXiX", "Hist_2D_CG_RecoLogXiXGenLogXiX", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_CG_RecoLogXiYGenLogXiY"] = ROOT.TH2D("Hist_2D_CG_RecoLogXiYGenLogXiY", "Hist_2D_CG_RecoLogXiYGenLogXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_FG2_2DLogGenXiX_LogGenXiY"] = ROOT.TH2D("Hist_2D_FG2_2DLogGenXiX_LogGenXiY", "Hist_2D_FG2_2DLogGenXiX_LogGenXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_FG1_2DLogGenXiX_LogGenXiY"] = ROOT.TH2D("Hist_2D_FG1_2DLogGenXiX_LogGenXiY", "Hist_2D_FG1_2DLogGenXiX_LogGenXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_CG_2DLogGenXiX_LogGenXiY"] = ROOT.TH2D("Hist_2D_CG_2DLogGenXiX_LogGenXiY", "Hist_2D_CG_2DLogGenXiX_LogGenXiY", NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_eventXiID_log10XiX"] = ROOT.TH1F("Hist_eventXiID_log10XiX", "Hist_eventXiID_log10XiX", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_eventXiID_log10XiY"] = ROOT.TH1F("Hist_eventXiID_log10XiY", "Hist_eventXiID_log10XiY", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_eventXiID_log10XiX"] = ROOT.TH1F("Hist_GP_eventXiID_log10XiX", "Hist_GP_eventXiID_log10XiX", NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_eventXiID_log10XiY"] = ROOT.TH1F("Hist_GP_eventXiID_log10XiY", "Hist_GP_eventXiID_log10XiY", NbrLogXiBins, LogXiMin,LogXiMax)
for ip in Process_ID:
self.hist["Hist_Eta_Min"+str(ip)] = ROOT.TH1D("Hist_Eta_Min"+str(ip),"Hist_Eta_Min ", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_Eta_Max"+str(ip)] = ROOT.TH1D("Hist_Eta_Max"+str(ip),"Hist_Eta_Max ", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_Eta_Delta"+str(ip)] = ROOT.TH1D("Hist_Eta_Delta"+str(ip),"Hist_Eta_Delta ", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_Eta_DeltaZero"+str(ip)] = ROOT.TH1D("Hist_Eta_DeltaZero"+str(ip),"Hist_Eta_DeltaZero ", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_Eta_DeltaMax"+str(ip)] = ROOT.TH1F("Hist_Eta_DeltaMax"+str(ip), "Hist_Eta_DeltaMax"+str(ip), NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_forwarddelta"+str(ip)] = ROOT.TH1F("Hist_forwarddelta"+str(ip), "Hist_forwarddelta"+str(ip), NbrDetaBins, 0,9)
self.hist["Hist_Eta"+str(ip)] = ROOT.TH1F("Hist_Eta"+str(ip), "Hist_Eta"+str(ip), nEtaBins, EtaBins)
self.hist["Hist_reducedEta"+str(ip)] = ROOT.TH1F("Hist_reducedEta"+str(ip), "Hist_reducedEta"+str(ip), nEtaBins, EtaBins)
self.hist["Hist_GP_DeltaMax"+str(ip)] = ROOT.TH1F("Hist_GP_DeltaMax"+str(ip), "Hist_GP_DeltaMax"+str(ip), NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_GP_Min"+str(ip)] = ROOT.TH1D("Hist_GP_Min"+str(ip),"Hist_GP_Min ", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_Max"+str(ip)] = ROOT.TH1D("Hist_GP_Max"+str(ip),"Hist_GP_Max ", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_Delta"+str(ip)] = ROOT.TH1D("Hist_GP_Delta"+str(ip),"Hist_GP_Delta ", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_GP_DeltaZero"+str(ip)] = ROOT.TH1D("Hist_GP_DeltaZero"+str(ip),"Hist_GP_DeltaZero ", NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_Energy"+str(ip)] = ROOT.TH1F("Hist_Energy"+str(ip), "Hist_Energy"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_barrel"+str(ip)] = ROOT.TH1F("Hist_Energy_barrel"+str(ip), "Hist_Energy_barrel"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_endcap"+str(ip)] = ROOT.TH1F("Hist_Energy_endcap"+str(ip), "Hist_Energy_endcap"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_endcap_forwardtransition"+str(ip)] = ROOT.TH1F("Hist_Energy_endcap_forwardtransition"+str(ip), "Hist_Energy_endcap_forwardtransition"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_forward"+str(ip)] = ROOT.TH1F("Hist_Energy_forward"+str(ip), "Hist_Energy_forward"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_forwardplus"+str(ip)] = ROOT.TH1F("Hist_Energy_forwardplus"+str(ip), "Hist_Energy_forwardplus"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_forwardminus"+str(ip)] = ROOT.TH1F("Hist_Energy_forwardminus"+str(ip), "Hist_Energy_forwardminus"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_Energy_Castor"+str(ip)] = ROOT.TH1F("Hist_Energy_Castor"+str(ip), "Hist_Energy_Castor"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_CaloReducedenergyClass"+str(ip)]= ROOT.TH1F("Hist_CaloReducedenergyClass"+str(ip),"Hist_CaloReducedenergyClass"+str(ip),NbrEBins, BinEMin, BinEMax)
self.hist["Hist_CaloReducedenergyClass_nocastor"+str(ip)]= ROOT.TH1F("Hist_CaloReducedenergyClass_nocastor"+str(ip),"Hist_CaloReducedenergyClass_nocastor"+str(ip),NbrEBins, BinEMin, BinEMax)
self.hist["Hist_CaloReducedenergyClass_noHFm"+str(ip)]= ROOT.TH1F("Hist_CaloReducedenergyClass_noHFm"+str(ip),"Hist_CaloReducedenergyClass_noHFm"+str(ip),NbrEBins, BinEMin, BinEMax)
self.hist["Hist_CaloReducedenergyClass_noHFp"+str(ip)]= ROOT.TH1F("Hist_CaloReducedenergyClass_noHFp"+str(ip),"Hist_CaloReducedenergyClass_noHFp"+str(ip),NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy"+str(ip)] = ROOT.TH1F("Hist_reducedEnergy"+str(ip), "Hist_reducedEnergy"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_barrel"+str(ip)] = ROOT.TH1F("Hist_reducedEnergy_barrel"+str(ip), "Hist_reducedEnergy_barrel"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_endcap"+str(ip)] = ROOT.TH1F("Hist_reducedEnergy_endcap"+str(ip), "Hist_reducedEnergy_endcap"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_endcap_forwardtransition"+str(ip)] = ROOT.TH1F("Hist_reducedEnergy_endcap_forwardtransition"+str(ip), "Hist_reducedEnergy_endcap_forwardtransition"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_forward"+str(ip)] = ROOT.TH1F("Hist_reducedEnergy_forward"+str(ip), "Hist_reducedEnergy_forward"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_forwardplus"+str(ip)] = ROOT.TH1F("Hist_reducedEnergy_forwardplus"+str(ip), "Hist_reducedEnergy_forwardplus"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_forwardminus"+str(ip)] = ROOT.TH1F("Hist_reducedEnergy_forwardminus"+str(ip), "Hist_reducedEnergy_forwardminus"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_reducedEnergy_Castor"+str(ip)] = ROOT.TH1F("Hist_reducedEnergy_Castor"+str(ip), "Hist_reducedEnergy_Castor"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_2D_log10MxMy"+str(ip)] = ROOT.TH2D("Hist_2D_log10MxMy"+str(ip), "Hist_2D_log10MxMy"+str(ip), NbrLogMBins, LogMin, LogMax, NbrLogMBins, LogMin, LogMax)
self.hist["Hist_2D_eventXiID_log10MxMy"+str(ip)] = ROOT.TH2D("Hist_2D_eventXiID_log10MxMy"+str(ip), "Hist_2D_eventXiID_log10MxMy"+str(ip), NbrLogMBins, LogMin, LogMax, NbrLogMBins, LogMin, LogMax)
self.hist["Hist_log10Mx"+str(ip)] = ROOT.TH1D("Hist_log10Mx"+str(ip), "Hist_log10Mx"+str(ip), NbrLogMBins, LogMin, LogMax)
self.hist["Hist_log10My"+str(ip)] = ROOT.TH1D("Hist_log10My"+str(ip), "Hist_log10My"+str(ip), NbrLogMBins, LogMin, LogMax)
self.hist["Hist_GP_log10Mx"+str(ip)] = ROOT.TH1D("Hist_GP_log10Mx"+str(ip), "Hist_GP_log10Mx"+str(ip), NbrLogMBins, LogMin, LogMax)
self.hist["Hist_GP_log10My"+str(ip)] = ROOT.TH1D("Hist_GP_log10My"+str(ip), "Hist_GP_log10My"+str(ip), NbrLogMBins, LogMin, LogMax)
self.hist["Hist_2D_GP_log10MxMy"+str(ip)] = ROOT.TH2D("Hist_2D_GP_log10MxMy"+str(ip), "Hist_2D_GP_log10MxMy"+str(ip), NbrLogMBins, LogMin, LogMax, NbrLogMBins, LogMin, LogMax)
self.hist["Hist_GP_log10XiX"+str(ip)] = ROOT.TH1F("Hist_GP_log10XiX"+str(ip), "Hist_GP_log10XiX"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10XiX_protonplus"+str(ip)] = ROOT.TH1F("Hist_GP_log10XiX_protonplus"+str(ip), "Hist_GP_log10XiX_protonplus"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10XiY_protonminus"+str(ip)] = ROOT.TH1F("Hist_GP_log10XiY_protonminus"+str(ip), "Hist_GP_log10XiY_protonminus"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10XiY"+str(ip)] = ROOT.TH1F("Hist_GP_log10XiY"+str(ip), "Hist_GP_log10XiY"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10MaxXi"+str(ip)] = ROOT.TH1F("Hist_GP_log10MaxXi"+str(ip), "Hist_GP_log10MaxXi"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_Aftercutlog10XiX"+str(ip)] = ROOT.TH1F("Hist_GP_Aftercutlog10XiX"+str(ip), "Hist_GP_Aftercutlog10XiX"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_Aftercutlog10XiY"+str(ip)] = ROOT.TH1F("Hist_GP_Aftercutlog10XiY"+str(ip), "Hist_GP_Aftercutlog10XiY"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_Aftercutlog10MaxXi"+str(ip)] = ROOT.TH1F("Hist_GP_Aftercutlog10MaxXi"+str(ip), "Hist_GP_Aftercutlog10MaxXi"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2D_log10XiDD_Deltamax"+str(ip)]= ROOT.TH2D("Hist_2D_log10XiDD_Deltamax"+str(ip),"Hist_2D_log10XiDD_Deltamax"+str(ip),NbrLogXiBins, LogXiMin, LogXiMax,NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_Xi"+str(ip)] = ROOT.TH1F("Hist_Xi"+str(ip), "Hist_Xi"+str(ip), NbrXiBins, XiMin, XiMax)
self.hist["Hist_Xi"+str(ip)] = ROOT.TH1F("Hist_Xi"+str(ip), "Hist_Xi"+str(ip), NbrXiBins, XiMin, XiMax)
self.hist["Hist_XiX"+str(ip)] = ROOT.TH1F("Hist_XiX"+str(ip), "Hist_XiX"+str(ip), NbrXiBins, XiMin, XiMax)
self.hist["Hist_XiY"+str(ip)] = ROOT.TH1F("Hist_XiY"+str(ip), "Hist_XiY"+str(ip), NbrXiBins, XiMin, XiMax)
self.hist["Hist_log10Xi"+str(ip)] = ROOT.TH1F("Hist_log10Xi"+str(ip), "Hist_log10Xi"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_log10Xi"+str(ip)] = ROOT.TH1F("Hist_log10Xi"+str(ip), "Hist_log10Xi"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_log10XiX"+str(ip)] = ROOT.TH1F("Hist_log10XiX"+str(ip), "Hist_log10XiX"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_log10XiY"+str(ip)] = ROOT.TH1F("Hist_log10XiY"+str(ip), "Hist_log10XiY"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2Dlog10XiXXiY"+str(ip)] = ROOT.TH2D("Hist_2Dlog10XiXXiY"+str(ip), "Hist_2Dlog10XiXXiY"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_Reco_log10XiDD"+str(ip)] = ROOT.TH1F("Hist_Reco_log10XiDD"+str(ip), "Hist_Reco_log10XiDD"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2DLogRecoXiX_logGenXiX"+str(ip)] = ROOT.TH2D("Hist_2DLogRecoXiX_logGenXiX"+str(ip), "Hist_2DLogRecoXiX_logGenXiX"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2DLogRecoXiY_logGenLogXiY"+str(ip)] = ROOT.TH2D("Hist_2DLogRecoXiY_logGenLogXiY"+str(ip), "Hist_2DLogRecoXiY_logGenLogXiY"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_2DLogGenXiX_LogGenXiY"+str(ip)] = ROOT.TH2D("Hist_2DLogGenXiX_LogGenXiY"+str(ip), "Hist_2DLogGenXiX_LogGenXiY"+str(ip), NbrLogXiBins,LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_Aftercut2DLogGenXiX_LogGenXiY"+str(ip)] = ROOT.TH2D("Hist_Aftercut2DLogGenXiX_LogGenXiY"+str(ip), "Hist_Aftercut2DLogGenXiX_LogGenXiY"+str(ip), NbrLogXiBins,LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_log10XiDD"+str(ip)] = ROOT.TH1F("Hist_GP_log10XiDD"+str(ip), "Hist_GP_log10XiDD"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_Aftercutlog10XiDD"+str(ip)] = ROOT.TH1F("Hist_GP_Aftercutlog10XiDD"+str(ip), "Hist_GP_Aftercutlog10XiDD"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_numberoftowerebovenoise_forwardplus"+str(ip)] = ROOT.TH1F("Hist_numberoftowerebovenoise_forwardplus"+str(ip),"Hist_numberoftowerebovenoise_forwardplus"+str(ip),ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_forwardminus"+str(ip)] = ROOT.TH1F("Hist_numberoftowerebovenoise_forwardminus"+str(ip),"Hist_numberoftowerebovenoise_forwardminus"+str(ip),ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_castor"+str(ip)] = ROOT.TH1F("Hist_numberoftowerebovenoise_castor"+str(ip),"Hist_numberoftowerebovenoise_castor"+str(ip),18, 0,18)
self.hist["Hist_NbrTracks"+str(ip)] = ROOT.TH1F("Hist_NbrTracks"+str(ip),"Hist_NbrTracks"+str(ip),NbrSizeBins, SizeEMin,50)
self.hist["Hist_eventXiID_NbrTracks"+str(ip)] = ROOT.TH1F("Hist_eventXiID_NbrTracks"+str(ip),"Hist_eventXiID_NbrTracks"+str(ip),NbrSizeBins, SizeEMin,50)
self.hist["Hist_numberoftowerebovenoise_endcap"+str(ip)] = ROOT.TH1F("Hist_numberoftowerebovenoise_endcap"+str(ip),"Hist_numberoftowerebovenoise_endcap"+str(ip),ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_barrel"+str(ip)] = ROOT.TH1F("Hist_numberoftowerebovenoise_barrel"+str(ip),"Hist_numberoftowerebovenoise_barrel"+str(ip),ntow,Mintow,Maxtow)
self.hist["Hist_numberoftowerebovenoise_endcapforwardtransition"+str(ip)] = ROOT.TH1F("Hist_numberoftowerebovenoise_endcapforwardtransition"+str(ip),"Hist_numberoftowerebovenoise_endcapforwardtransition"+str(ip),ntow,Mintow,Maxtow)
self.hist["Hist_HFSumEnergy"+str(ip)] = ROOT.TH1F("Hist_HFSumEnergy"+str(ip), "Hist_HFSumEnergy"+str(ip) ,nBinSumE, MinSumE, MaxSumE)
self.hist["Hist_CastorSumEnergy"+str(ip)] = ROOT.TH1F("Hist_CastorSumEnergy"+str(ip), "Hist_CastorSumEnergy"+str(ip) ,nBinSumE, MinSumE, MaxSumE)
self.hist["Hist_MaxHFEnergy"+str(ip)] = ROOT.TH1F("Hist_MaxHFEnergy"+str(ip),"Hist_MaxHFEnergy"+str(ip),nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_MaxCastorEnergy"+str(ip)] = ROOT.TH1F("Hist_MaxCastorEnergy"+str(ip),"Hist_MaxCastorEnergy"+str(ip),nBinSumE,MinSumE, MaxSumE)
# eventID is process Id which is defined by the cuts that are applied on Xi , no using process ID from Pythi8
self.hist["Hist_GP_eventXiID_Min"+str(ip)] = ROOT.TH1D("Hist_GP_eventXiID_Min"+str(ip),"Hist_GP_eventXiID_Min ", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_eventXiID_Max"+str(ip)] = ROOT.TH1D("Hist_GP_eventXiID_Max"+str(ip),"Hist_GP_eventXiID_Max ", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_GP_eventXiID_DeltaMax"+str(ip)] = ROOT.TH1F("Hist_GP_eventXiID_DeltaMax"+str(ip), "Hist_GP_eventXiID_DeltaMax"+str(ip), NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_GP_eventXiID_DeltaZero"+str(ip)] = ROOT.TH1F("Hist_GP_eventXiID_DeltaZero"+str(ip), "Hist_GP_eventXiID_DeltaZero"+str(ip), NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_eventXiID_forwarddelta"+str(ip)] = ROOT.TH1F("Hist_eventXiID_forwarddelta"+str(ip), "Hist_eventXiID_forwarddelta"+str(ip), NbrDetaBins, 0,9)
self.hist["Hist_eventXiID_Min"+str(ip)] = ROOT.TH1D("Hist_eventXiID_Min"+str(ip),"Hist_eventXiID_Min ", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_eventXiID_Max"+str(ip)] = ROOT.TH1D("Hist_eventXiID_Max"+str(ip),"Hist_eventXiID_Max ", NbrEtaBins, BinEtaMin, BinEtaMax)
self.hist["Hist_eventXiID_DeltaMax"+str(ip)] = ROOT.TH1F("Hist_eventXiID_DeltaMax"+str(ip), "Hist_eventXiID_DeltaMax"+str(ip), NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_eventXiID_DeltaZero"+str(ip)] = ROOT.TH1F("Hist_eventXiID_DeltaZero"+str(ip), "Hist_eventXiID_DeltaZero"+str(ip), NbrDetaBins, DetaMin, DetaMax)
self.hist["Hist_eventXiID_log10Mx"+str(ip)] = ROOT.TH1D("Hist_eventXiID_log10Mx"+str(ip), "Hist_eventXiID_log10Mx"+str(ip), NbrLogMBins, LogMin, LogMax)
self.hist["Hist_eventXiID_log10My"+str(ip)] = ROOT.TH1D("Hist_eventXiID_log10My"+str(ip), "Hist_eventXiID_log10My"+str(ip), NbrLogMBins, LogMin, LogMax)
self.hist["Hist_eventXiID_GP_2Dlog10MxMy"+str(ip)] = ROOT.TH2D("Hist_eventXiID_GP_2Dlog10MxMy"+str(ip), "Hist_eventXiID_GP_2Dlog10MxMy"+str(ip), NbrLogMBins, LogMin, LogMax, NbrLogMBins, LogMin, LogMax)
self.hist["Hist_eventXiID_log10XiX"+str(ip)] = ROOT.TH1F("Hist_eventXiID_log10XiX"+str(ip), "Hist_eventXiID_log10XiX"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_eventXiID_log10XiY"+str(ip)] = ROOT.TH1F("Hist_eventXiID_log10XiY"+str(ip), "Hist_eventXiID_log10XiY"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_eventXiID_log10XiX"+str(ip)] = ROOT.TH1F("Hist_GP_eventXiID_log10XiX"+str(ip), "Hist_GP_eventXiID_log10XiX"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_GP_eventXiID_log10XiY"+str(ip)] = ROOT.TH1F("Hist_GP_eventXiID_log10XiY"+str(ip), "Hist_GP_eventXiID_log10XiY"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_eventXiID_2DLogGenXiX_LogGenXiY"+str(ip)] = ROOT.TH2D("Hist_eventXiID_2DLogGenXiX_LogGenXiY"+str(ip), "Hist_eventXiID_2DLogGenXiX_LogGenXiY"+str(ip), NbrLogXiBins,LogXiMin,LogXiMax, NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_eventXiID_Reco_log10XiDD"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Reco_log10XiDD"+str(ip), "Hist_eventXiID_Reco_log10XiDD"+str(ip), NbrLogXiBins, LogXiMin,LogXiMax)
self.hist["Hist_eventXiID_Energy"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Energy"+str(ip), "Hist_eventXiID_Energy"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_barrel"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Energy_barrel"+str(ip), "Hist_eventXiID_Energy_barrel"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_endcap"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Energy_endcap"+str(ip), "Hist_eventXiID_Energy_endcap"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_endcap_forwardtransition"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Energy_endcap_forwardtransition"+str(ip), "Hist_eventXiID_Energy_endcap_forwardtransition"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_forward"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Energy_forward"+str(ip), "Hist_eventXiID_Energy_forward"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_forwardplus"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Energy_forwardplus"+str(ip), "Hist_eventXiID_Energy_forwardplus"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_forwardminus"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Energy_forwardminus"+str(ip), "Hist_eventXiID_Energy_forwardminus"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_Energy_Castor"+str(ip)] = ROOT.TH1F("Hist_eventXiID_Energy_Castor"+str(ip), "Hist_eventXiID_Energy_Castor"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy"+str(ip)] = ROOT.TH1F("Hist_eventXiID_reducedEnergy"+str(ip), "Hist_eventXiID_reducedEnergy"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_barrel"+str(ip)] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_barrel"+str(ip), "Hist_eventXiID_reducedEnergy_barrel"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_endcap"+str(ip)] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_endcap"+str(ip), "Hist_eventXiID_reducedEnergy_endcap"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_endcap_forwardtransition"+str(ip)] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_endcap_forwardtransition"+str(ip), "Hist_eventXiID_reducedEnergy_endcap_forwardtransition"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_forward"+str(ip)] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_forward"+str(ip), "Hist_eventXiID_reducedEnergy_forward"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_forwardplus"+str(ip)] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_forwardplus"+str(ip), "Hist_eventXiID_reducedEnergy_forwardplus"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_forwardminus"+str(ip)] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_forwardminus"+str(ip), "Hist_eventXiID_reducedEnergy_forwardminus"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_reducedEnergy_Castor"+str(ip)] = ROOT.TH1F("Hist_eventXiID_reducedEnergy_Castor"+str(ip), "Hist_eventXiID_reducedEnergy_Castor"+str(ip) , NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_numberoftowerebovenoise_forwardplus"+str(ip)] = ROOT.TH1F("Hist_eventXiID_numberoftowerebovenoise_forwardplus"+str(ip),"Hist_eventXiID_numberoftowerebovenoise_forwardplus"+str(ip),ntow,Mintow,Maxtow)
self.hist["Hist_eventXiID_numberoftowerebovenoise_forwardminus"+str(ip)] = ROOT.TH1F("Hist_eventXiID_numberoftowerebovenoise_forwardminus"+str(ip),"Hist_eventXiID_numberoftowerebovenoise_forwardminus"+str(ip),ntow,Mintow,Maxtow)
self.hist["Hist_eventXiID_numberoftowerebovenoise_castor"+str(ip)] = ROOT.TH1F("Hist_eventXiID_numberoftowerebovenoise_castor"+str(ip),"Hist_eventXiID_numberoftowerebovenoise_castor"+str(ip),16, 0,16)
self.hist["Hist_eventXiID_CaloReducedenergyClass"+str(ip)]= ROOT.TH1F("Hist_eventXiID_CaloReducedenergyClass"+str(ip),"Hist_eventXiID_CaloReducedenergyClass"+str(ip),NbrEBins, BinEMin, BinEMax)
self.hist["Hist_eventXiID_HFSumEnergy"+str(ip)] = ROOT.TH1F("Hist_eventXiID_HFSumEnergy"+str(ip), "Hist_eventXiID_HFSumEnergy"+str(ip) ,nBinSumE, MinSumE, MaxSumE)
self.hist["Hist_eventXiID_CastorSumEnergy"+str(ip)] = ROOT.TH1F("Hist_eventXiID_CastorSumEnergy"+str(ip), "Hist_eventXiID_CastorSumEnergy"+str(ip) ,nBinSumE, MinSumE, MaxSumE)
self.hist["Hist_eventXiID_MaxHFEnergy"+str(ip)] = ROOT.TH1F("Hist_eventXiID_MaxHFEnergy"+str(ip),"Hist_eventXiID_MaxHFEnergy"+str(ip),nBinSumE,MinSumE, MaxSumE)
self.hist["Hist_eventXiID_MaxCastorEnergy"+str(ip)] = ROOT.TH1F("Hist_eventXiID_MaxCastorEnergy"+str(ip),"Hist_eventXiID_MaxCastorEnergy"+str(ip),nBinSumE,MinSumE, MaxSumE)
for h in self.hist:
self.hist[h].Sumw2()
self.GetOutputList().Add(self.hist[h])
self.pdg_helper = pd.PYTHIAParticleData()
self.castor_tower_p4 = []
self.CMenergy = 13000 # GeV
self.protonmass = 0.938 # GeV
self.logXi_p = -8.28 # Mp*2/CMenergylog10(1/13e3/13e3)
for isec in xrange(0,16):
self.castor_tower_p4.append( ROOT.ROOT.Math.LorentzVector('ROOT::Math::PxPyPzE4D<double>')(0,0,0,0) )
self.OUTlog10XixGen = array( 'f', 1 * [0] )
self.OUTlog10XiyGen = array( 'f', 1 * [0] )
self.OUTlog10XixReco = array( 'f', 1 * [0] )
self.OUTlog10XiyReco = array( 'f', 1 * [0] )
self.OUTlog10MxGen = array( 'f', 1 * [0] )
self.OUTlog10MyGen = array( 'f', 1 * [0] )
self.OUTlog10MxReco = array( 'f', 1 * [0] )
self.OUTlog10MyReco = array( 'f', 1 * [0] )
self.OUTdeltazero = array( 'f', 1 * [0] )
self.OUTforwardgendelta = array('f', 1 * [0])
self.OUTdeltaeta = array( 'f', 1 * [0] )
self.OUTetamin = array( 'f', 1 * [0] )
self.OUTrapditygapmean = array( 'f', 1 * [0] )
self.OUTetamax = array( 'f', 1 * [0] )
self.OUTCastorNtowers = array( 'i', 1 * [0] )
self.OUTHFminusNtowers = array( 'i', 1 * [0] )
self.OUTNtracks = array( 'i', 1 * [0] )
self.OUTEtarange = array( 'f', 1 * [0] )
self.OUTHFplusNtowers = array( 'i', 1 * [0] )
self.OUTlog10XiDD = array( 'f', 1 * [0] )
self.OUTPythia8processid = array('i', 1 * [0] )
self.OUTEventselectionXiprocessDD = array( 'i', 1 * [0] )
self.OUTEventselectionXiprocessSD1 = array( 'i', 1 * [0] )
self.OUTEventselectionXiprocessSD2 = array( 'i', 1 * [0] )
self.OUTEventselectionXiprocessRest = array( 'i', 1 * [0] )
self.OUTCaloReducedenergyClass = array( 'i', 1 * [0] )
self.OUTCastorSumEnergy= array( 'f', 1 * [0] )
self.OUTHFSumEnergy= array('f', 1 * [0] )
self.OUTMaxHFEnergy = array('f', 1 * [0])
self.OUTMaxCastorEnergy = array('f', 1 * [0])
# self.Ou
# sigTreeDD = ROOT.TTree("sigTreeDD", "selected DD events")
# self.CreateTree(sigTreeDD)
# setattr(self, "sigTreeDD", sigTreeDD)
# self.addToOutput(self.sigTreeDD)
# sigTreeSD1 = ROOT.TTree("sigTreeSD1", "selected DD events")
# self.CreateTree(sigTreeSD1)
# setattr(self, "sigTreeSD1", sigTreeSD1)
# self.addToOutput(self.sigTreeSD1)
# sigTreeSD2 = ROOT.TTree("sigTreeSD2", "selected DD events")
# self.CreateTree(sigTreeSD2)
# setattr(self, "sigTreeSD2", sigTreeSD2)
# self.addToOutput(self.sigTreeSD2)
# bkgTreeDD = ROOT.TTree("bkgTreeDD", "all events except DD")
# self.CreateTree(bkgTreeDD)
# setattr(self, "bkgTreeDD",bkgTreeDD)
# self.addToOutput(self.bkgTreeDD)
# bkgTreeSD1 = ROOT.TTree("bkgTreeSD1", "all events except DD")
# self.CreateTree(bkgTreeSD1)
# setattr(self, "bkgTreeSD1",bkgTreeSD1)
# self.addToOutput(self.bkgTreeSD1)
# bkgTreeSD2 = ROOT.TTree("bkgTreeSD2", "all events except DD")
# self.CreateTree(bkgTreeSD2)
# setattr(self, "bkgTreeSD2",bkgTreeSD2)
# self.addToOutput(self.bkgTreeSD2)
AllTree = ROOT.TTree("AllTree", "all events")
self.CreateTree(AllTree)
setattr(self, "AllTree",AllTree)
self.addToOutput(self.AllTree)
def get_Pythia_Process_ID(self):
# if self.fChain.processID == 101:
# return '_Rest', self.fChain.processID
if self.fChain.processID == 103:
return '_SD1', self.fChain.processID
if self.fChain.processID == 104:
return '_SD2', self.fChain.processID
if self.fChain.processID == 105:
return '_DD', self.fChain.processID
# if self.fChain.processID == 106:
# return '_CD', self.fChain.processID
return '_Rest', -1
# def get_EventSelectionXiProcess_ID(self,GenXi_DD,GenXiX,GenXiY):
# if (log10(GenXi_DD) > -3) :
# return '_Rest', -1
# elif (log10(GenXiY) < self.logXi_p + 0.04) and (log10(GenXiY) > self.logXi_p-0.04):
# return '_SD1', 103
# elif (log10(GenXiX) < self.logXi_p + 0.04) and (log10(GenXiX) > self.logXi_p -0.04):
# return '_SD2', 104
# return '_DD', 105
def get_MultiEventSelectionXiProcess_ID(self,Genlog10XiX,Genlog10XiY,deltaeta,protonMinus,protonPlus):
Classes = []
if deltaeta > 4 and (Genlog10XiY> -6 or Genlog10XiX >-7) and not protonMinus and not protonPlus : #delta>3
# if (log10(GenXi_DD) < -5) :
Classes.append('_DD')
if (Genlog10XiY> -6 and Genlog10XiY <-1 and protonMinus):
# if (Genlog10XiY> -6 and abs(Genlog10XiX - self.logXi_p)< 0.04):
Classes.append('_SD1')
if (Genlog10XiX >-7 and Genlog10XiX <-1 and protonPlus):
# if (Genlog10XiX >-7 and abs(Genlog10XiY - self.logXi_p)< 0.04):
Classes.append('_SD2')
if (len(Classes)==0):
Classes.append('_Rest')
return Classes
def get_Process_ID_from_String(self,process):
if "Rest" in process:
return -1
if "SD1" in process:
return 103
if "SD2" in process:
return 104
if "DD" in process:
return 105
if "CD" in process:
return -1
sys.exit(1)
def analyze(self):
Nbrvertex = 1
self.hist["hNentries"].Fill("all",1)
self.hist["hNentriesWithEventSelectionCuts"].Fill("all",1)
vVertexZ = 0
if self.ParameterSet == 'Seb_LHCf_Run247934'.lower() or self.ParameterSet == 'cuet'.lower():
vVertexZ = self.fChain.ZeroTeslaTracking_PixelnoPreSplitting_VtxZ
else:
vVertexZ = self.fChain.ZeroTeslaPixelnoPreSplittingVtx_vrtxZ
Nbrvertex = vVertexZ.size()
# Nbrvertex = self.fChain.ZeroTeslaTracking_PixelnoPreSplitting_VtxX.size()
# Nbrvertex = self.fChain.ZeroTeslaPixelnoPreSplittingVtx_vrtxX.size()
deltavertex = 0
if Nbrvertex == 2:
deltavertex = (abs(vVertexZ[0] - vVertexZ[1]))
self.hist["Hist_NrVtxdelta"].Fill(deltavertex)
if self.isData:
if self.ParameterSet == 'Melike_dNdEta'.lower() or self.ParameterSet == 'Seb_dNdEta_LHCf'.lower():
if not self.fChain.run == 247324: return 1
else:
if not self.fChain.run == 247934 : return 1 #247934
# if not self.fChain.run == 247324 and not self.fChain.run == 247934: return 1
if Nbrvertex > 2: return 0
self.hist["Hist_NrVtx"].Fill(Nbrvertex)
self.hist["hNentries"].Fill("runcut",1)
self.hist["hNentriesWithEventSelectionCuts"].Fill("run",1)
if Nbrvertex == 2:
self.hist["Hist_NrVtxdeltacut"].Fill(deltavertex)
if self.isData and abs(deltavertex)> 0.5 : return 0
if not self.isData and abs(deltavertex)>0.5 :
self.hist["hNentriesWithEventSelectionCuts"].Fill("mc_vtxcut",1)
# if abs(vVertexZ[0] - vVertexZ[1])> 0.5 : return 0
# if abs(self.fChain.ZeroTeslaPixelnoPreSplittingVtx_vrtxZ[0] - self.fChain.ZeroTeslaPixelnoPreSplittingVtx_vrtxZ[1])> 0.5 : return 0
# Nbrvertex = 1
self.hist["hNentriesWithEventSelectionCuts"].Fill("vtxcut",1)
weight = 1
num = 0
# genTracks
#num = self.fChain.genTracks.size()
Eta = 0
theta= 0
Ntrack = 0
phi = 0
#print self.maxEta # see slaveParams below
#self.hist["numGenTracks"].Fill(1)
#############################################################
# also write a ttree #
# #
# create the branches and assign the fill-variables to them #
#############################################################
self.hist["hProcessescut"].Fill("all",1)
self.hist["hProcessesIdPythia"].Fill("all",1)
Pythia_Process_ID = '_NONE'
int_Pythia_Process_ID = -11
EventSelectionXiProcess_IDs = []
if not self.isData:
Pythia_Process_ID, int_Pythia_Process_ID = self.get_Pythia_Process_ID()
self.hist["hProcessesIdPythia"].Fill(Pythia_Process_ID[1:],1)
self.hist["hNentriesWithEventSelectionCuts"].Fill("Vrtx Cut",1)
self.hist["BunchCrossing"].Fill(self.fChain.bx)
self.hist["Runs"].Fill(self.fChain.run)
#######################HFCUT##################################
HFCut = False
CaloTower = self.fChain.CaloTowersp4.size()
for icalo in xrange(0,CaloTower):
calop4 = self.fChain.CaloTowersp4[icalo]
caloem = self.fChain.CaloTowersemEnergy[icalo]
calohad = self.fChain.CaloTowershadEnergy[icalo]
if abs(calop4.eta()) > 3.2 and abs(calop4.eta()) < 5.2 :
if (calop4.e()) > 5:
HFCut = True
# if HFCut == False : return 0
Eta = 0
GenParticleClass = []
ChargedGenParticleClass = []
theta = 0
mingeneta = -1
maxgeneta = -1
forwardgendelta= -1
deltaeta=-1
delta_zero_gen = -1
delta_max_gen = -1
delta_Gen_zero_pos = -1
deltaetamax_Gen_pos = -1
# deltagenreco = -1
Etarange = -1
CLOSE = 0.004
mass=0
# self.hist["hNentriess"].Fill("hf cut",1)
if not self.isData:
ngenParticle = self.fChain.genParticlesp4.size()
# final state particles from the genParticles collection
for igenP in xrange(ngenParticle):
genp4 = self.fChain.genParticlesp4[igenP]
genid = self.fChain.genParticlespdg[igenP]
genst = self.fChain.genParticlesstatus[igenP]
if genst != 1: continue
GenParticleClass.append([genp4,genid])
if self.pdg_helper.charge(genid) == 0 : continue ######### only use charged particles
ChargedGenParticleClass.append([genp4,genid])
# if len(ChargedGenParticleClass) == 0:
# return 0
# ChargedGenParticleClass.sort(cmp=compareGeneta)
ChargedGenParticleClass.sort(cmp=compareGenrapidity)
GenParticleClass.sort(cmp=compareGenrapidity)
mingeneta = ChargedGenParticleClass[0][0].eta()
maxgeneta = ChargedGenParticleClass[len(ChargedGenParticleClass)-1][0].eta()
self.hist["Hist_GP_Min"].Fill(mingeneta)
self.hist["Hist_GP_Max"].Fill(maxgeneta)
Etarange = maxgeneta - mingeneta
forwardgendelta = max(abs(mingeneta -(-6.0)), abs(maxgeneta-5.2))
self.hist["Hist_GP_Delta"].Fill(Etarange)
self.hist["Hist_GP_forwardgendelta"].Fill(forwardgendelta)
self.hist["Hist_GP_eventXiID_forwardgendelta"].Fill(forwardgendelta)
for igp in xrange(len(GenParticleClass)-1):
genp4 = GenParticleClass[igp][0]
genid = GenParticleClass[igp][1]
deltaeta = GenParticleClass[igp+1][0].eta() - GenParticleClass[igp][0].eta()
if (deltaeta > delta_max_gen):
delta_max_gen = deltaeta
deltaetamax_Gen_pos = igp
if GenParticleClass[igp+1][0].eta() > 0 and GenParticleClass[igp][0].eta() < 0:
delta_zero_gen = deltaeta
delta_Gen_zero_pos = igp
protonMinus = False
if (deltaetamax_Gen_pos == 0):
mass = GenParticleClass[0][0].M()
if (abs(mass - self.protonmass) < CLOSE):
protonMinus = True
protonPlus = False
if (deltaetamax_Gen_pos == len(GenParticleClass)-2):
mass = GenParticleClass[len(GenParticleClass)-1][0].M()
if (abs(mass - self.protonmass) < CLOSE):
protonPlus = True
self.hist["Hist_GP_DeltaMax"].Fill(delta_max_gen)
self.hist["Hist_GP_DeltaZero"].Fill(delta_zero_gen)
self.hist["Hist_GP_Min" + Pythia_Process_ID].Fill(mingeneta)
self.hist["Hist_GP_Max" + Pythia_Process_ID].Fill(maxgeneta)
self.hist["Hist_GP_Delta" + Pythia_Process_ID].Fill(Etarange)
self.hist["Hist_GP_DeltaMax" + Pythia_Process_ID].Fill(delta_max_gen)
self.hist["Hist_GP_DeltaZero" + Pythia_Process_ID].Fill(delta_zero_gen)
# if len(GenParticleClass) == 0:
# return 0
# calculate Mx2 and My2 for all genetrated particles
XGenEtot = 0
XPxtot = 0
XPytot = 0
XPztot = 0
YGenEtot = 0
YPxtot = 0
YPytot = 0
YPztot = 0
Mx2 = 0
My2 = 0
MxGen = 0
MyGen = 0
MeanGen =0
Px = 0
Py= 0
Px2 = 0
Py2= 0
GenXi_DD = 0
for igp in xrange(0,len(GenParticleClass)):
# if GenParticleClass[igp][0].eta() <= ChargedGenParticleClass[deltaetamax_Gen_pos][0].eta():
if GenParticleClass[igp][0].eta() <= GenParticleClass[deltaetamax_Gen_pos][0].eta():
XGenEtot += GenParticleClass[igp][0].E()
XPxtot += GenParticleClass[igp][0].Px()
XPytot += GenParticleClass[igp][0].Py()
XPztot += GenParticleClass[igp][0].Pz()
# if GenParticleClass[igp][0].eta() >= ChargedGenParticleClass[deltaetamax_Gen_pos+1][0].eta():
if GenParticleClass[igp][0].eta() >= GenParticleClass[deltaetamax_Gen_pos+1][0].eta():
YGenEtot += GenParticleClass[igp][0].E()
YPxtot += GenParticleClass[igp][0].Px()
YPytot += GenParticleClass[igp][0].Py()
YPztot += GenParticleClass[igp][0].Pz()
# MeanGen = (ChargedGenParticleClass[deltaetamax_Gen_pos+1][0].eta() + ChargedGenParticleClass[deltaetamax_Gen_pos][0].eta())/2
MeanGen = (GenParticleClass[deltaetamax_Gen_pos+1][0].eta() + GenParticleClass[deltaetamax_Gen_pos][0].eta())/2
Px2 = XPxtot**2 + XPytot**2 +XPztot**2
Py2 = YPxtot**2 + YPytot**2 +YPztot**2
Px = sqrt(Px2)
Py = sqrt(Py2)
Mx2 = (XGenEtot+Px)*(XGenEtot-Px)
My2 = (YGenEtot+Py)*(YGenEtot-Py)
if Mx2<=0: Mx2=1.01e-6
if My2<=0: My2=1.01e-6
MyGen = sqrt(My2)
MxGen = sqrt(Mx2)
self.hist["Hist_GP_Mx"].Fill(MxGen)
self.hist["Hist_GP_log10Mx"].Fill(log10(MxGen))
self.hist["Hist_GP_My"].Fill(MyGen)
self.hist["Hist_GP_log10My"].Fill(log10(MyGen))
self.hist["Hist_2D_GP_log10MxMy"].Fill(log10(MxGen),log10(MyGen))
self.hist["Hist_GP_log10Mx"+ Pythia_Process_ID].Fill(log10(MxGen))
self.hist["Hist_GP_log10My"+ Pythia_Process_ID].Fill(log10(MyGen))
self.hist["Hist_2D_GP_log10MxMy"+ Pythia_Process_ID].Fill(log10(MxGen),log10(MyGen))
GenXiX = Mx2/self.CMenergy/self.CMenergy
GenXiY = My2/self.CMenergy/self.CMenergy
Genlog10XiX = log10(GenXiX)
Genlog10XiY = log10(GenXiY)
GenXi_DD = Mx2*My2/(self.protonmass**2 * self.CMenergy**2)
GenMaxXi = max(GenXiX, GenXiY)
self.hist["Hist_GP_log10XiX"].Fill(log10(GenXiX))
self.hist["Hist_GP_log10XiY"].Fill(log10(GenXiY))
self.hist["Hist_GP_log10MaxXi"].Fill(log10(GenMaxXi))
self.hist["Hist_GP_log10XiX"+Pythia_Process_ID].Fill(log10(GenXiX))
self.hist["Hist_GP_log10XiY"+Pythia_Process_ID].Fill(log10(GenXiY))
self.hist["Hist_GP_log10MaxXi"+Pythia_Process_ID].Fill(log10(GenMaxXi))
self.hist["Hist_2DLogGenXiX_LogGenXiY"].Fill(log10(GenXiX),log10(GenXiY))
self.hist["Hist_2DLogGenXiX_LogGenXiY"+Pythia_Process_ID].Fill(log10(GenXiX),log10(GenXiY))
self.hist["Hist_GP_log10XiDD"].Fill(log10(GenXi_DD))
self.hist["Hist_GP_log10XiDD"+Pythia_Process_ID].Fill(log10(GenXi_DD))
self.hist["Hist_2D_log10XiDD_Deltamax"].Fill(log10(GenXi_DD), delta_max_gen)
self.hist["Hist_2D_log10XiDD_Deltamax"+Pythia_Process_ID].Fill(log10(GenXi_DD), delta_max_gen)
if protonPlus:
self.hist["Hist_GP_log10XiX_protonplus"].Fill(log10(GenXiX))
self.hist["Hist_GP_log10XiX_protonplus" + Pythia_Process_ID].Fill(log10(GenXiX))
if protonMinus:
self.hist["Hist_GP_log10XiY_protonminus"].Fill(log10(GenXiY))
self.hist["Hist_GP_log10XiY_protonminus" + Pythia_Process_ID].Fill(log10(GenXiY))
# EventSelectionXiProcess_ID, int_EventSelectionXiProcess_ID = self.get_EventSelectionXiProcess_ID(GenXi_DD,GenXiX,GenXiY)
EventSelectionXiProcess_IDs = self.get_MultiEventSelectionXiProcess_ID(Genlog10XiX,Genlog10XiY,delta_max_gen,protonMinus,protonPlus)
for EventSelectionXiProcess_ID in EventSelectionXiProcess_IDs:
self.hist["hProcessescut"].Fill(EventSelectionXiProcess_ID[1:],1)
self.hist["Hist_GP_eventXiID_DeltaMax"+ EventSelectionXiProcess_ID].Fill(delta_max_gen)
self.hist["Hist_GP_eventXiID_DeltaZero"+ EventSelectionXiProcess_ID].Fill(delta_zero_gen)
self.hist["Hist_GP_eventXiID_Min"+ EventSelectionXiProcess_ID].Fill(mingeneta)
self.hist["Hist_GP_eventXiID_Max"+ EventSelectionXiProcess_ID].Fill(maxgeneta)
self.hist["Hist_eventXiID_GP_2Dlog10MxMy"+ EventSelectionXiProcess_ID].Fill(log10(MxGen),log10(MyGen))
self.hist["Hist_eventXiID_log10Mx"+ EventSelectionXiProcess_ID].Fill(log10(MxGen))
self.hist["Hist_eventXiID_log10My"+ EventSelectionXiProcess_ID].Fill(log10(MyGen))
self.hist["Hist_GP_eventXiID_log10XiX"+EventSelectionXiProcess_ID].Fill(log10(GenXiX))
self.hist["Hist_GP_eventXiID_log10XiY"+EventSelectionXiProcess_ID].Fill(log10(GenXiY))
self.hist["Hist_eventXiID_2DLogGenXiX_LogGenXiY"+EventSelectionXiProcess_ID].Fill(log10(GenXiX),log10(GenXiY))
self.hist["Hist_GP_eventXiID_DeltaMax"].Fill(delta_max_gen)
self.hist["Hist_GP_eventXiID_DeltaZero"].Fill(delta_zero_gen)
self.hist["Hist_GP_eventXiID_Min"].Fill(mingeneta)
self.hist["Hist_GP_eventXiID_Max"].Fill(maxgeneta)
self.hist["Hist_GP_eventXiID_log10XiX"].Fill(log10(GenXiX))
self.hist["Hist_GP_eventXiID_log10XiY"].Fill(log10(GenXiY))
##################Track##############################################################3
TrackCandClass = []
Nbrtracks = 0
vTrackTheta = 0
vTrackPhi = 0
if self.ParameterSet == 'Seb_LHCf_Run247934'.lower() or self.ParameterSet == 'cuet'.lower() or self.ParameterSet == 'cuetplus'.lower():
vTrackTheta = self.fChain.ZeroTeslaTracking_PixelnoPreSplitting_TrackTheta
vTrackPhi = self.fChain.ZeroTeslaTracking_PixelnoPreSplitting_TrackPhi
else:
vTrackTheta = self.fChain.ZeroTeslaPixelnoPreSplittingVtx_trktheta
vTrackPhi = self.fChain.ZeroTeslaPixelnoPreSplittingVtx_trkphi
nTrackCand = vTrackPhi.size()
# nTrackCand = self.fChain.ZeroTeslaPixelnoPreSplittingVtx_trktheta.size()
for itrk in xrange(nTrackCand):
if self.Track_efficiency_scale<1.0:
if (random.random() > self.Track_efficiency_scale):
continue
theta = vTrackTheta[itrk]
trkphi = vTrackPhi[itrk]
# theta= self.fChain.ZeroTeslaPixelnoPreSplittingVtx_trktheta[itrk]
# trkphi = self.fChain.ZeroTeslaPixelnoPreSplittingVtx_trkphi[itrk]