38def BookHistograms(groupe,reconame,particletype,withTrigger=""):
39 '''
40 Function to configure the egamma histograms
41 The list is different for electrons and photons
42 usage example : BookHistograms(GroupElectronLHTight,"LHTight","Electron","WithTrigger")
43 '''
44
45 if particletype in ["Electron","Photon"] :
46 if particletype in ["Electron"] :
47 prefix = "electron"
48 tlabel = "_{e}"
49 if particletype in ["Photon"] :
50 prefix = "photon"
51 tlabel = "_{#gamma}"
52
53 hname = "N"
54 htitle = "Number of " + prefix + "s (" + reconame + " " + withTrigger+ ") ; N" + tlabel + " ; N_{event}"
55 groupe.defineHistogram(hname,title=htitle, path='',xbins=20,xmin=-0.5,xmax=19.5)
56
57 if particletype in ["Photon"] :
58 hname = "NConv"
59 htitle = "Number of converted photons (" + reconame + " " + withTrigger+ ") ; N_{Conv. #gamma} ; N_{event}"
60 groupe.defineHistogram(hname,title=htitle, path='',xbins=20,xmin=-0.5,xmax=19.5)
61
62 hname = "NUnconv"
63 htitle = "Number of unconverted photons (" + reconame + " " + withTrigger+ ") ; N_{Unconv. #gamma} ; N_{event}"
64 groupe.defineHistogram(hname,title=htitle, path='',xbins=20,xmin=-0.5,xmax=19.5)
65
66 hname= "Et"
67 htitle= particletype + " transverse energy [MeV]" + " (" + reconame + " " + withTrigger + ")" + " ; Et"+ tlabel +" ; N" + tlabel
68 groupe.defineHistogram(hname,title=htitle, path='',xbins=100,xmin=2.,xmax=102000.0)
69
70 if particletype in ["Photon"] :
71
72 hname= "EtConv"
73 htitle= "Converted #gamma transverse energy [MeV]" + " (" + reconame + " " + withTrigger + ")" + " ; Et" + tlabel + " ; N" + tlabel
74 groupe.defineHistogram(hname,title=htitle, path='',xbins=100,xmin=2.,xmax=102000.0, cutmask = 'is_pt_gt_4gevandconv')
75
76 hname= "EtUnconv"
77 htitle= "Unconverted #gamma transverse energy [MeV]" + " (" + reconame + " " + withTrigger + ")" + " ; Et" + tlabel + " ; N" + tlabel
78 groupe.defineHistogram(hname,title=htitle, path='',xbins=100,xmin=2.,xmax=102000.0, cutmask = 'is_pt_gt_4gevandunconv')
79
80 hname= "Eta"
81 htitle= particletype + " #eta" + " (" + reconame + " " + withTrigger + ")"+ " ; #eta" + tlabel + " ; N" + tlabel
82 groupe.defineHistogram(hname,title=htitle, path='',type = "TH1D", xbins=64,xmin=-3.2,xmax=3.2)
83
84 if particletype in ["Photon"] :
85 hname= "EtaConv"
86 htitle= "Converted photons #eta" + " (" + reconame + " " + withTrigger + ")"+ " ; #eta" + tlabel + " ; N" + tlabel
87 groupe.defineHistogram(hname,title=htitle, path='',xbins=64,xmin=-3.2,xmax=3.2,cutmask = 'is_pt_gt_4gevandconv')
88
89 hname= "EtaUnconv"
90 htitle= "Unconverted photons #eta" + " (" + reconame + " " + withTrigger + ")"+ " ; #eta" + tlabel + " ; N" + tlabel
91 groupe.defineHistogram(hname,title=htitle, path='',xbins=64,xmin=-3.2,xmax=3.2,cutmask = 'is_pt_gt_4gevandunconv')
92
93 hname= "Phi"
94 htitle= particletype + " #phi" + " (" + reconame + " " + withTrigger + ")" + " ; #phi" + tlabel + " ; N" + tlabel
95 groupe.defineHistogram(hname,title=htitle, path='',xbins=64,xmin=-3.2,xmax=3.2)
96
97 if particletype in ["Photon"] :
98 hname= "PhiConv"
99 htitle= "Converted photon #phi" + " (" + reconame + " " + withTrigger + ")" + " ; #phi" + tlabel + " ; N" + tlabel
100 groupe.defineHistogram(hname,title=htitle, path='',xbins=64,xmin=-3.2,xmax=3.2,cutmask = 'is_pt_gt_4gevandconv')
101
102 hname= "PhiUnconv"
103 htitle= "Unconverted photon #phi" + " (" + reconame + " " + withTrigger + ")" + " ; #phi" + tlabel + " ; N" + tlabel
104 groupe.defineHistogram(hname,title=htitle, path='',xbins=64,xmin=-3.2,xmax=3.2, cutmask = 'is_pt_gt_4gevandunconv')
105
106 hname= "Eta,Phi;Eta_Phi_with_Pt_gt_2.5GeV"
107 htitle= particletype + " #eta,#phi map (candidates with Pt>2.5GeV)" + " (" + reconame + " " + withTrigger + ") ; #eta ; #phi"
108 groupe.defineHistogram(hname,title=htitle,path='Expert',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2,cutmask = 'is_pt_gt_2_5gev')
109
110 if particletype in ["Photon"] :
111 hname= "Eta,Phi;Eta_Phi_Conv_with_Pt_gt_2.5GeV"
112 htitle= "(#eta,#phi) map of Conv. #gamma with Pt>2.5GeV" + " (" + reconame + " " + withTrigger + ") ; #eta ; #phi"
113 groupe.defineHistogram(hname,title=htitle,path='Expert',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2, cutmask = 'is_pt_gt_2_5gevandconv')
114
115 hname= "Eta,Phi;Eta_Phi_Unconv_with_Pt.gt.2.5GeV"
116 htitle= "(#eta,#phi) map of Unconv. #gamma with Pt>2.5GeV" + " (" + reconame + " " + withTrigger + ") ; #eta ; #phi"
117 groupe.defineHistogram(hname,title=htitle,path='Expert',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2, cutmask = 'is_pt_gt_2_5gevandunconv')
118
119 hname= "Eta,Phi;Eta_Phi_distribution_with_Pt.gt.4GeV"
120 htitle= particletype + " #eta,#phi map (candidates with Pt>4GeV)" + " (" + reconame + " " + prefix + " " + withTrigger + ") ; #eta ; #phi"
121 groupe.defineHistogram(hname,title=htitle,path='',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2,cutmask='is_pt_gt_4gev')
122
123 if particletype in ["Photon"] :
124 hname= "Eta,Phi;Eta_Phi_Conv_with_Pt.gt.4GeV"
125 htitle= particletype + " #eta,#phi map (candidates with Pt>4GeV)" + " (" + reconame + " " + withTrigger + ") ; #eta ; #phi"
126 groupe.defineHistogram(hname,title=htitle,path='',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2,cutmask='is_pt_gt_4gevandconv')
127
128 hname= "Eta,Phi;Eta_Phi_Unconv_with_Pt.gt.4GeV"
129 htitle= particletype + " #eta,#phi map (candidates with Pt>4GeV)" + " (" + reconame + " " + withTrigger + ") ; #eta ; #phi"
130 groupe.defineHistogram(hname,title=htitle,path='',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2,cutmask='is_pt_gt_4gevandunconv')
131
132 hname= "Eta,Phi;Eta_Phi_with_Pt.gt.20GeV"
133 htitle= particletype + " #eta,#phi map (candidates with Pt>20GeV)" + " (" + reconame + " " + withTrigger + ") ; #eta ; #phi "
134 groupe.defineHistogram(hname,title=htitle,path='Expert',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2,cutmask='is_pt_gt_20gev')
135
136 if particletype in ["Photon"] :
137 hname= "Eta,Phi;Eta_Phi_distribution_of_Conv._photons_with_Pt.gt.20GeV"
138 htitle= particletype + " #eta,#phi map (candidates with Pt>20GeV)" + " (" + reconame + " " + withTrigger + ") ; #eta ; #phi"
139 groupe.defineHistogram(hname,title=htitle,path='Expert',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2,cutmask='is_pt_gt_20gevandconv')
140
141 hname= "Eta,Phi;Eta_Phi_distribution_of_Unconv._photons_with_Pt.gt.20GeV"
142 htitle= particletype + " #eta,#phi map (candidates with Pt>20GeV)" + " (" + reconame + " " + withTrigger + ") ; #eta ; #phi"
143 groupe.defineHistogram(hname,title=htitle,path='Expert',type='TH2F',xbins=64,xmin=-3.2,xmax=3.2,ybins=64,ymin=-3.2,ymax=3.2,cutmask='is_pt_gt_20gevandunconv')
144
145 hname= "TopoEtCone40"
146 htitle = particletype + " Topocluster Isolation Energy" + " (" + reconame + " " + withTrigger + ") ; TopoEtCone40 ; N" + tlabel
147 groupe.defineHistogram(hname,title=htitle, path='',xbins=100,xmin=-10000.,xmax=40000.)
148
149 hname= "PtCone20"
150 htitle = particletype + " Track Isolation Pt" + " (" + reconame + " " + withTrigger + ") ; PtCone20 ; N" + tlabel
151 groupe.defineHistogram(hname,title=htitle, path='',xbins=64,xmin=-10000.,xmax=40000.)
152
153 hname= "Time"
154 htitle = "Time associated with " + particletype + " cluster [ns]" + " (" + reconame + " " + withTrigger + ") ; Time [ns] ; N" + tlabel
155 groupe.defineHistogram(hname,title=htitle, path='',xbins=90,xmin=-30.,xmax=60.)
156
157 if particletype in ["Photon"] :
158 hname= "RConv"
159 htitle = "Photon Conversion radius [mm] " + " (" + reconame + " " + withTrigger + ") ; Rconv ; N_{#gamma}"
160 groupe.defineHistogram(hname,title=htitle, path='',xbins=100,xmin=0.,xmax=800.)
161
162
163 hname= "Et"
164 htitle= particletype + " transverse energy [MeV]" + " (" + reconame + " " + withTrigger + ") ; Et" + tlabel + " ; N" + tlabel
165 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Expert',xbins=100,xmin=2.,xmax=102000.0,thecut='is_pt_gt_2_5gev')
166
167 hname= "Eta"
168 htitle= particletype + " #eta" + " (" + reconame + " " + withTrigger + ")" + " ; #eta" + tlabel + " ; N" + tlabel
169 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Expert',xbins=64,xmin=-3.2,xmax=3.2)
170
171 hname= "Phi"
172 htitle= particletype + " #phi" + " (" + reconame + " " + withTrigger + ")" + " ; #eta" + tlabel + " ; N" + tlabel
173 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Expert',xbins=64,xmin=-3.2,xmax=3.2)
174
175 hname= "Time"
176 htitle = "Time associated with " + particletype + " cluster [ns]" + " (" + reconame + " " + withTrigger + ") ; Time [ns] ; N" + tlabel
177 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Expert',xbins=90,xmin=-30.,xmax=60.)
178
179 if particletype in ["Photon"] :
180 hname= "RConv"
181 htitle = "Photon Conversion radius [mm] " + " (" + reconame + " " + withTrigger + ") ; Rconv [mm] ; N_{#gamma} "
182 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Expert',xbins=100,xmin=0.,xmax=800.)
183
184 hname= "ConvType"
185 htitle = "Photon Conversion Type " + " (" + reconame + " " + withTrigger + ") ; ConvType ; N_{#gamma}"
186 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Expert',xbins=6,xmin=-0.5,xmax=5.5)
187
188 hname= "ConvTrkMatch1"
189 htitle = "Photon Conversion Trak1 Match " + " (" + reconame + " " + withTrigger + ") ; ConTrkMatch1 ; N_{#gamma}"
190 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Expert',xbins=4,xmin=-0.5,xmax=0.)
191
192 hname= "ConvTrkMatch2"
193 htitle = "Photon Conversion Trak1 Match " + " (" + reconame + " " + withTrigger + ") ; ConTrkMatch2 ; N_{#gamma}"
194 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Expert',xbins=4,xmin=0.,xmax=4.)
195
196
197
198 hname= "Ehad1"
199 htitle = particletype + " energy leakage in 1st hadronic sampling " + " (" + reconame + " " + withTrigger + ")" + "; Ehad1 (MeV) ; N" + tlabel
200 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=-1000.,xmax=10000.)
201
202 if particletype in ["Electron"] :
203 hname= "EoverP"
204 htitle = particletype + " matched track E over P " + " (" + reconame + " " + withTrigger + ")" + "; EoverP ; N" + tlabel
205 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=0.,xmax=5.)
206
207 hname= "CoreEM"
208 htitle = particletype + " core energy in EM calorimeter " + " (" + reconame + " " + withTrigger + ")" + "; E (MeV) ; N" + tlabel
209 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=-5000.,xmax=250000.)
210
211 hname= "F0"
212 htitle = particletype + " fractional energy in Presampler " + " (" + reconame + " " + withTrigger + ")" + "; F0 ; N" + tlabel
213 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=-0.2,xmax=1.)
214
215 hname= "F1"
216 htitle = particletype + " fractional energy in 1st sampling " + " (" + reconame + " " + withTrigger + ")" + "; F1 ; N" + tlabel
217 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=-0.2,xmax=1.)
218
219 hname= "F2"
220 htitle = particletype + " fractional energy in 2nd sampling " + " (" + reconame + " " + withTrigger + ")" + "; F2 ; N" + tlabel
221 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=-0.2,xmax=1.)
222
223 hname= "F3"
224 htitle = particletype + " fractional energy in 3rd sampling " + " (" + reconame + " " + withTrigger + ")" + "; F3 ; N" + tlabel
225 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=-0.2,xmax=1.)
226
227 hname= "Re233e237"
228 htitle = particletype + " uncor. energy fraction in 3x3/3x7 cells in em sampling 2 " + " (" + reconame + " " + withTrigger + ")" + "; R 3x3/3x7 ; N" + tlabel
229 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=0.,xmax=2.)
230
231 hname= "Re237e277"
232 htitle = particletype + " uncor. energy fraction in 3x7/7x7 cells in em sampling 2 " + " (" + reconame + " " + withTrigger + ")" + "; R 3x7/7x7 ; N" + tlabel
233 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='ID',xbins=50,xmin=0.,xmax=2.)
234
235
236
237 if particletype in ["Electron"] :
238 hname= "NOfBLayerHits"
239 htitle = particletype + " NOfBLayerHits (" + reconame + " " + withTrigger + ") ; N_{BlayerHits} ; N_{e}"
240 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Tracks',xbins=6,xmin=-0.5,xmax=5.5)
241
242 hname= "NOfPixelHits"
243 htitle = particletype + " NOfPixelHits (" + reconame + " " + withTrigger + ") ; N_{PixelHits} ; N_{e}"
244 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Tracks',xbins=6,xmin=-0.5,xmax=5.5)
245
246 hname= "NOfSCTHits"
247 htitle = particletype + " NOfSCTHits (" + reconame + " " + withTrigger + ") ; N_{SCTHits} ; N_{e}"
248 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Tracks',xbins=26,xmin=-0.5,xmax=25.5)
249
250 hname= "NOfTRTHits"
251 htitle = particletype + " NOfTRTHits (" + reconame + " " + withTrigger + ") ; N_{TRTHits} ; N_{e}"
252 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Tracks',xbins=26,xmin=-0.5,xmax=50.5)
253
254 hname= "NOfTRTHighThresholdHits"
255 htitle = particletype + " NOfTRTHighThresholdHits (" + reconame + " " + withTrigger + ") ; N_{TRT HighThres. Hits} ; N_{e}"
256 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Tracks',xbins=26,xmin=-0.5,xmax=50.5)
257
258 hname= "DeltaEta1"
259 htitle = particletype + " track match #Delta #eta (1st sampling) " + " (" + reconame + " " + withTrigger + ") ; #Delta #eta ; N_{e} "
260 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Tracks',xbins=50,xmin=-0.05,xmax=0.05)
261
262 hname= "DeltaPhi2"
263 htitle = particletype + " track match #Delta #Phi (2st sampling) " + " (" + reconame + " " + withTrigger + ") ; #Delta #phi ; N_{e} "
264 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Tracks',xbins=50,xmin=-0.15,xmax=0.15)
265
266 hname= "Trackd0"
267 htitle = particletype + " track d0 " + " (" + reconame + " " + withTrigger + ") ; d0 ; N_{e}"
268 BookHistogramsPerRegions(thegroupe = groupe, theparttype = particletype, thename = hname, title=htitle, path='Tracks',xbins=100,xmin=-5.,xmax=5.)
269
270
271
272 hname= "LBEvoN"
273 htitle= "Number of " + particletype + "s per LB (" + reconame + " " + withTrigger + ") ; LB ; N" + tlabel
274 groupe.defineHistogram(hname,title=htitle,path='byLB',type='TH1F',xbins=2000,xmin=-0.5,xmax=1999.5)
275
276 if particletype in ["Photon"] :
277 hname= "LBEvoNPhotonsUnconv;Number_of_Unconv._photons_vs_LB"
278 htitle = "Unconverted photon number versus LB " + " (" + reconame + " " + withTrigger + ") ; LB ; N_{Unconv. #gamma}"
279 groupe.defineHistogram(hname,title=htitle, path='byLB',xbins=2000,xmin=-0.5,xmax=1999.)
280
281 hname= "LBEvoNPhotonsConv;Number_of_Conv._photons_vs_LB"
282 htitle = "Converted photon number versus LB " + " (" + reconame + " " + withTrigger + ") ; LB ; N_{Conv. #gamma}"
283 groupe.defineHistogram(hname,title=htitle, path='byLB',xbins=2000,xmin=-0.5,xmax=1999.)
284
285 hname= "is_pt_gt_4gevandconv,LB;Conversion_fraction_vs_LB"
286 htitle = "Converted photon fraction versus LB " + " (" + reconame + " " + withTrigger + ") ; LB ; Conv. #gamma fraction"
287 groupe.defineHistogram(hname,title=htitle, path='byLB',type = 'TEfficiency', xbins=2000,xmin=-0.5,xmax=1999.)
288
289 return True
290