57 cout <<
" Initialise Constructor " << endl;
79 dbe->setCurrentFolder(dirName.c_str());
84 h_1D.resize(NUM_VARS);
85 h_2D.resize(NUM_VARS_2D);
86 h_1D_NVTX.resize(NUM_VARS_NVTX);
96 cout <<
"Calling destructor" << endl;
107 cout<<
" InitStatistics() " << endl;
112 LOG_BINNING_ENABLED = 1;
114 LOG_BINNING_RATIO = 1.1;
126 main_titles.resize(NUM_VARS);
127 axis_titles.resize(NUM_VARS);
128 names.resize(NUM_VARS);
129 param.resize(NUM_VARS, vector<double>(3) );
130 isContinuous.resize(NUM_VARS);
132 titles_2D.resize(NUM_VARS_2D);
133 names_2D.resize(NUM_VARS_2D);
135 main_titles_NVtxs.resize(NUM_VARS_NVTX);
136 axis_titles_NVtxs.resize(NUM_VARS_NVTX);
137 names_NVtxs.resize(NUM_VARS_NVTX);
140 cout <<
"InitStatistics(): vectors resized " << endl;
143 main_titles[0 ] =
"Total Tracker Momentum, #Delta R = 0.3";
144 main_titles[1 ] =
"Total EM Cal Energy, #Delta R = 0.3";
145 main_titles[2 ] =
"Total Had Cal Energy, #Delta R = 0.3";
146 main_titles[3 ] =
"Total HO Cal Energy, #Delta R = 0.3";
147 main_titles[4 ] =
"Number of Tracker Tracks, #Delta R = 0.3";
148 main_titles[5 ] =
"Number of Jets around Muon, #Delta R = 0.3";
149 main_titles[6 ] =
"Tracker p_{T} within veto cone, #Delta R = 0.3";
150 main_titles[7 ] =
"EM E_{T} within veto cone, #Delta R = 0.3";
151 main_titles[8 ] =
"Had E_{T} within veto cone, #Delta R = 0.3";
152 main_titles[9 ] =
"HO E_{T} within veto cone, #Delta R = 0.3";
153 main_titles[10] =
"Average Momentum per Track, #Delta R = 0.3";
154 main_titles[11] =
"Weighted Energy, #Delta R = 0.3";
156 main_titles[12] =
"Total Tracker Momentum, #Delta R = 0.5";
157 main_titles[13] =
"Total EM Cal Energy, #Delta R = 0.5";
158 main_titles[14] =
"Total Had Cal Energy, #Delta R = 0.5";
159 main_titles[15] =
"Total HO Cal Energy, #Delta R = 0.5";
160 main_titles[16] =
"Number of Tracker Tracks, #Delta R = 0.5";
161 main_titles[17] =
"Number of Jets around Muon, #Delta R = 0.5";
162 main_titles[18] =
"Tracker p_{T} within veto cone, #Delta R = 0.5";
163 main_titles[19] =
"EM E_{T} within veto cone, #Delta R = 0.5";
164 main_titles[20] =
"Had E_{T} within veto cone, #Delta R = 0.5";
165 main_titles[21] =
"HO E_{T} within veto cone, #Delta R = 0.5";
166 main_titles[22] =
"Average Momentum per Track, #Delta R = 0.5";
167 main_titles[23] =
"Weighted Energy, #Delta R = 0.5";
170 main_titles[24 ] =
"Relative Detector-Based Isolation, #Delta R = 0.3";
171 main_titles[25 ] =
"Relative Detector-Based Isolation, #Delta R = 0.5";
174 main_titles[26 ] =
"Sum PF Charged Hadron Pt, #Delta R = 0.3";
175 main_titles[27 ] =
"Sum PF Neutral Hadron Pt, #Delta R = 0.3";
176 main_titles[28 ] =
"Sum PF Photon Et, #Delta R = 0.3";
177 main_titles[29 ] =
"Sum PF Neutral Hadron Pt (Higher Pt threshold), #Delta R = 0.3";
178 main_titles[30 ] =
"Sum PF Photon Et (Higher Pt threshold), #Delta R = 0.3";
179 main_titles[31 ] =
"Sum PF Charged Particles Pt not from PV (for Pu corrections), #Delta R = 0.3";
182 main_titles[32 ] =
"Sum PF Charged Hadron Pt, #Delta R = 0.4";
183 main_titles[33 ] =
"Sum PF Neutral Hadron Pt, #Delta R = 0.4";
184 main_titles[34 ] =
"Sum PF Photon Et, #Delta R = 0.4";
185 main_titles[35 ] =
"Sum PF Neutral Hadron Pt (Higher Pt threshold), #Delta R = 0.4";
186 main_titles[36 ] =
"Sum PF Photon Et (Higher Pt threshold), #Delta R = 0.4";
187 main_titles[37 ] =
"Sum PF Charged Particles Pt not from PV (for Pu corrections), #Delta R = 0.4";
189 main_titles[38 ] =
"Relative PF Isolation, #Delta R = 0.3";
190 main_titles[39 ] =
"Relative PF Isolation, #Delta R = 0.4";
192 main_titles[40 ] =
"Relative PF Isolation (Higher Pt threshold), #Delta R = 0.3";
193 main_titles[41 ] =
"Relative PF Isolation (Higher Pt threshold), #Delta R = 0.4";
195 main_titles[42 ] =
"Sum DR Isolation Profile for Charged Hadron, #Delta R = 0.4";
197 main_titles[43 ] =
"Sum DR Isolation Profile for Neutral Hadron, #Delta R = 0.4";
199 main_titles[44 ] =
"Sum DR Isolation Profile for Photon, #Delta R = 0.4";
201 main_titles[45 ] =
"Mean DR Isolation Profile for Charged Hadron, #Delta R = 0.4";
203 main_titles[46 ] =
"Mean DR Isolation Profile for Neutral Hadron, #Delta R = 0.4";
205 main_titles[47 ] =
"Mean DR Isolation Profile for Photon, #Delta R = 0.4";
211 cout <<
"InitStatistics(): main titles 1D DONE " << endl;
213 titles_2D[0] =
"Total Tracker Momentum, #Delta R = 0.3";
214 titles_2D[1] =
"Total EM Cal Energy, #Delta R = 0.3";
215 titles_2D[2] =
"Total Had Cal Energy, #Delta R = 0.3";
216 titles_2D[3] =
"Total HO Cal Energy, #Delta R = 0.3";
217 titles_2D[4] =
"Sum PF Charged Hadron Pt, #Delta R = 0.4";
218 titles_2D[5] =
"Sum PF Neutral Hadron Pt, #Delta R = 0.4";
219 titles_2D[6] =
"Sum PF Photon Et, #Delta R = 0.4";
220 titles_2D[7] =
"Sum PF Charged Pt Not from PV, #Delta R = 0.4";
221 titles_2D[8] =
"Relative Detector-Based Isolation, #Delta R = 0.4";
222 titles_2D[9] =
"Relative PF Isolation, #Delta R = 0.4";
225 main_titles_NVtxs[0] =
"Sum PF Neutral Hadron Pt, #DeltaR = 0.4 ( 0 < N_{Vtx} < 15)";
226 main_titles_NVtxs[1] =
"Sum PF Neutral Hadron Pt, #DeltaR = 0.4 (15 < N_{Vtx} < 30)";
227 main_titles_NVtxs[2] =
"Sum PF Neutral Hadron Pt, #DeltaR = 0.4 (30 < N_{Vtx})";
228 main_titles_NVtxs[3] =
"Sum PF Photon Et, #DeltaR = 0.4 ( 0 < N_{Vtx} < 15)";
229 main_titles_NVtxs[4] =
"Sum PF Photon Et, #DeltaR = 0.4 (15 < N_{Vtx} < 30)";
230 main_titles_NVtxs[5] =
"Sum PF Photon Et, #DeltaR = 0.4 (30 < N_{Vtx})";
234 cout <<
"InitStatistics(): main titles 2D DONE " << endl;
238 axis_titles[0 ] =
"#Sigma p_{T} (GeV)";
239 axis_titles[1 ] =
"#Sigma E_{T}^{EM} (GeV)";
240 axis_titles[2 ] =
"#Sigma E_{T}^{Had} (GeV)";
241 axis_titles[3 ] =
"#Sigma E_{T}^{HO} (GeV)";
242 axis_titles[4 ] =
"N_{Tracks}";
243 axis_titles[5 ] =
"N_{Jets}";
244 axis_titles[6 ] =
"#Sigma p_{T,veto} (GeV)";
245 axis_titles[7 ] =
"#Sigma E_{T,veto}^{EM} (GeV)";
246 axis_titles[8 ] =
"#Sigma E_{T,veto}^{Had} (GeV)";
247 axis_titles[9 ] =
"#Sigma E_{T,veto}^{HO} (GeV)";
248 axis_titles[10] =
"#Sigma p_{T} / N_{Tracks} (GeV)";
249 axis_titles[11] =
"(1.5) X #Sigma E_{T}^{EM} + #Sigma E_{T}^{Had}";
251 axis_titles[12] =
"#Sigma p_{T} (GeV)";
252 axis_titles[13] =
"#Sigma E_{T}^{EM} (GeV)";
253 axis_titles[14] =
"#Sigma E_{T}^{Had} (GeV)";
254 axis_titles[15] =
"#Sigma E_{T}^{HO} (GeV)";
255 axis_titles[16] =
"N_{Tracks}";
256 axis_titles[17] =
"N_{Jets}";
257 axis_titles[18] =
"#Sigma p_{T,veto} (GeV)";
258 axis_titles[19] =
"#Sigma E_{T,veto}^{EM} (GeV)";
259 axis_titles[20] =
"#Sigma E_{T,veto}^{Had} (GeV)";
260 axis_titles[21] =
"#Sigma E_{T,veto}^{HO} (GeV)";
261 axis_titles[22] =
"#Sigma p_{T} / N_{Tracks} (GeV)";
262 axis_titles[23] =
"(1.5) X #Sigma E_{T}^{EM} + #Sigma E_{T}^{Had}";
264 axis_titles[24] =
"(#Sigma Tk p_{T} + #Sigma ECAL p_{T} + #Sigma HCAL p_{T})/ Mu p_{T} (GeV)";
265 axis_titles[25] =
"(#Sigma Tk p_{T} + #Sigma ECAL p_{T} + #Sigma HCAL p_{T})/ Mu p_{T} (GeV)";
267 axis_titles[26] =
"#Sigma PFCharged p_{T}";
268 axis_titles[27] =
"#Sigma PFNeutral p_{T}";
269 axis_titles[28] =
"#Sigma PFPhoton p_{T}";
270 axis_titles[29] =
"#Sigma PFNeutral p_{T}";
271 axis_titles[30] =
"#Sigma PFPhoton p_{T}";
272 axis_titles[31] =
"#Sigma PFCharged p_{T}";
274 axis_titles[32] =
"#Sigma PFCharged p_{T}";
275 axis_titles[33] =
"#Sigma PFNeutral p_{T}";
276 axis_titles[34] =
"#Sigma PFPhoton p_{T}";
277 axis_titles[35] =
"#Sigma PFNeutral p_{T}";
278 axis_titles[36] =
"#Sigma PFPhoton p_{T}";
279 axis_titles[37] =
"#Sigma PFCharged p_{T}";
281 axis_titles[38] =
"(#Sigma PFCharged p_{T} + #Sigma PFNeutral p_{T} + #Sigma PFPhoton p_{T}) Mu p_{T} (GeV)";
282 axis_titles[39] =
"(#Sigma PFCharged p_{T} + #Sigma PFNeutral p_{T} + #Sigma PFPhoton p_{T}) Mu p_{T} (GeV)";
283 axis_titles[40] =
"(#Sigma PFCharged p_{T} + #Sigma PFNeutral p_{T} + #Sigma PFPhoton p_{T}) Mu p_{T} (GeV)";
284 axis_titles[41] =
"(#Sigma PFCharged p_{T} + #Sigma PFNeutral p_{T} + #Sigma PFPhoton p_{T}) Mu p_{T} (GeV)";
286 axis_titles[42] =
"#Sigma DR PFCharged";
287 axis_titles[43] =
"#Sigma DR PFNeutral";
288 axis_titles[44] =
"#Sigma DR PFPhoton";
290 axis_titles[45] =
"Mean DR PFCharged";
291 axis_titles[46] =
"Mean DR PFNeutral";
292 axis_titles[47] =
"Mean DR PFPhoton";
297 axis_titles_NVtxs[0] =
"#Sigma PFNeutral p_{T}";
298 axis_titles_NVtxs[1] =
"#Sigma PFNeutral p_{T}";
299 axis_titles_NVtxs[2] =
"#Sigma PFNeutral p_{T}";
300 axis_titles_NVtxs[3] =
"#Sigma PFPhoton p_{T}";
301 axis_titles_NVtxs[4] =
"#Sigma PFPhoton p_{T}";
302 axis_titles_NVtxs[5] =
"#Sigma PFPhoton p_{T}";
305 cout <<
"InitStatistics(): main titles 1D DONE " << endl;
309 names[0 ] =
"sumPt_R03";
310 names[1 ] =
"emEt_R03";
311 names[2 ] =
"hadEt_R03";
312 names[3 ] =
"hoEt_R03";
313 names[4 ] =
"nTracks_R03";
314 names[5 ] =
"nJets_R03";
315 names[6 ] =
"trackerVetoPt_R03";
316 names[7 ] =
"emVetoEt_R03";
317 names[8 ] =
"hadVetoEt_R03";
318 names[9 ] =
"hoVetoEt_R03";
319 names[10] =
"avgPt_R03";
320 names[11] =
"weightedEt_R03";
322 names[12] =
"sumPt_R05";
323 names[13] =
"emEt_R05";
324 names[14] =
"hadEt_R05";
325 names[15] =
"hoEt_R05";
326 names[16] =
"nTracks_R05";
327 names[17] =
"nJets_R05";
328 names[18] =
"trackerVetoPt_R05";
329 names[19] =
"emVetoEt_R05";
330 names[20] =
"hadVetoEt_R05";
331 names[21] =
"hoVetoEt_R05";
332 names[22] =
"avgPt_R05";
333 names[23] =
"weightedEt_R05";
335 names[24] =
"relDetIso_R03";
336 names[25] =
"relDetIso_R05";
338 names[26] =
"pfChargedPt_R03";
339 names[27] =
"pfNeutralPt_R03";
340 names[28] =
"pfPhotonPt_R03";
341 names[29] =
"pfNeutralPt_HT_R03";
342 names[30] =
"pfPhotonPt_HT_R03";
343 names[31] =
"pfChargedPt_PU_R03";
345 names[32] =
"pfChargedPt_R04";
346 names[33] =
"pfNeutralPt_R04";
347 names[34] =
"pfPhotonPt_R04";
348 names[35] =
"pfNeutralPt_HT_R04";
349 names[36] =
"pfPhotonPt_HT_R04";
350 names[37] =
"pfChargedPt_PU_R04";
352 names[38] =
"relPFIso_R03";
353 names[39] =
"relPFIso_R04";
355 names[40] =
"relPFIso_HT_R03";
356 names[41] =
"relPFIso_HT_R04";
358 names[42] =
"SumDR_PFCharged_R04";
359 names[43] =
"SumDR_PFNeutral_R04";
360 names[44] =
"SumDR_PFPhoton_R04";
362 names[45] =
"MeanDR_PFCharged_R04";
363 names[46] =
"MeanDR_PFNeutral_R04";
364 names[47] =
"MeanDR_PFPhoton_R04";
369 cout <<
"InitStatistics(): names 1D DONE " << endl;
372 names_2D[0] =
"SumPt_R03" ;
373 names_2D[1] =
"emEt_R03" ;
374 names_2D[2] =
"hadEt_R03" ;
375 names_2D[3] =
"hoEt_R03" ;
376 names_2D[4] =
"pfChargedPt_R04" ;
377 names_2D[5] =
"pfNeutralPt_R04" ;
378 names_2D[6] =
"pfPhotonPt_R04" ;
379 names_2D[7] =
"pfChargedPUPt_R04" ;
380 names_2D[8] =
"relDetIso_R03" ;
381 names_2D[9] =
"relPFIso_R04" ;
384 cout <<
"InitStatistics(): names 2D DONE " << endl;
387 names_NVtxs[0] =
"pfNeutralPt_R04_PV0to15";
388 names_NVtxs[1] =
"pfNeutralPt_R04_PV15to30";
389 names_NVtxs[2] =
"pfNeutralPt_R04_PV30toInf";
390 names_NVtxs[3] =
"pfPhotonPt_R04_PV0to15";
391 names_NVtxs[4] =
"pfPhotonPt_R04_PV15to30";
392 names_NVtxs[5] =
"pfPhotonPt_R04_PV30toInf";
402 param[0 ][0]= (int)( 20.0/S_BIN_WIDTH); param[0 ][1]= 0.0; param[0 ][2]= param[0 ][0]*S_BIN_WIDTH;
403 param[1 ][0]= (int)( 20.0/S_BIN_WIDTH); param[1 ][1]= 0.0; param[1 ][2]= param[1 ][0]*S_BIN_WIDTH;
404 param[2 ][0]= (int)( 20.0/S_BIN_WIDTH); param[2 ][1]= 0.0; param[2 ][2]= param[2 ][0]*S_BIN_WIDTH;
405 param[3 ][0]= 20; param[3 ][1]= 0.0; param[3 ][2]= 2.0;
406 param[4 ][0]= 16; param[4 ][1]= -0.5; param[4 ][2]= param[4 ][0]-0.5;
407 param[5 ][0]= 4; param[5 ][1]= -0.5; param[5 ][2]= param[5 ][0]-0.5;
408 param[6 ][0]= (int)( 40.0/S_BIN_WIDTH); param[6 ][1]= 0.0; param[6 ][2]= param[6 ][0]*S_BIN_WIDTH;
409 param[7 ][0]= 20; param[7 ][1]= 0.0; param[7 ][2]= 10.0;
410 param[8 ][0]= (int)( 20.0/S_BIN_WIDTH); param[8 ][1]= 0.0; param[8 ][2]= param[8 ][0]*S_BIN_WIDTH;
411 param[9 ][0]= 20; param[9 ][1]= 0.0; param[9 ][2]= 5.0;
412 param[10][0]= (int)( 15.0/S_BIN_WIDTH); param[10][1]= 0.0; param[10][2]= param[10][0]*S_BIN_WIDTH;
413 param[11][0]= (int)( 20.0/S_BIN_WIDTH); param[11][1]= 0.0; param[11][2]= param[11][0]*S_BIN_WIDTH;
415 param[12][0]= (int)( 20.0/S_BIN_WIDTH); param[12][1]= 0.0; param[12][2]= param[12][0]*S_BIN_WIDTH;
416 param[13][0]= (int)( 20.0/S_BIN_WIDTH); param[13][1]= 0.0; param[13][2]= param[13][0]*S_BIN_WIDTH;
417 param[14][0]= (int)( 20.0/S_BIN_WIDTH); param[14][1]= 0.0; param[14][2]= param[14][0]*S_BIN_WIDTH;
418 param[15][0]= 20; param[15][1]= 0.0; param[15][2]= 2.0;
419 param[16][0]= 16; param[16][1]= -0.5; param[16][2]= param[16][0]-0.5;
420 param[17][0]= 4; param[17][1]= -0.5; param[17][2]= param[17][0]-0.5;
421 param[18][0]= (int)( 40.0/S_BIN_WIDTH); param[18][1]= 0.0; param[18][2]= param[18][0]*S_BIN_WIDTH;
422 param[19][0]= 20; param[19][1]= 0.0; param[19][2]= 10.0;
423 param[20][0]= (int)( 20.0/S_BIN_WIDTH); param[20][1]= 0.0; param[20][2]= param[20][0]*S_BIN_WIDTH;
424 param[21][0]= 20; param[21][1]= 0.0; param[21][2]= 5.0;
425 param[22][0]= (int)( 15.0/S_BIN_WIDTH); param[22][1]= 0.0; param[22][2]= param[22][0]*S_BIN_WIDTH;
426 param[23][0]= (int)( 20.0/S_BIN_WIDTH); param[23][1]= 0.0; param[23][2]= param[23][0]*S_BIN_WIDTH;
428 param[24][0]= 50; param[24][1]= 0.0; param[24][2]= 1.0;
429 param[25][0]= 50; param[25][1]= 0.0; param[25][2]= 1.0;
432 param[26 ][0]= (int)( 20.0/S_BIN_WIDTH); param[26 ][1]= 0.0; param[26 ][2]= param[26 ][0]*S_BIN_WIDTH;
433 param[27 ][0]= (int)( 20.0/S_BIN_WIDTH); param[27 ][1]= 0.0; param[27 ][2]= param[27 ][0]*S_BIN_WIDTH;
434 param[28 ][0]= (int)( 20.0/S_BIN_WIDTH); param[28 ][1]= 0.0; param[28 ][2]= param[28 ][0]*S_BIN_WIDTH;
435 param[29 ][0]= (int)( 20.0/S_BIN_WIDTH); param[29 ][1]= 0.0; param[29 ][2]= param[29 ][0]*S_BIN_WIDTH;
436 param[30 ][0]= (int)( 20.0/S_BIN_WIDTH); param[30 ][1]= 0.0; param[30 ][2]= param[30 ][0]*S_BIN_WIDTH;
437 param[31 ][0]= (int)( 20.0/S_BIN_WIDTH); param[31 ][1]= 0.0; param[31 ][2]= param[31 ][0]*S_BIN_WIDTH;
439 param[32 ][0]= (int)( 20.0/S_BIN_WIDTH); param[32 ][1]= 0.0; param[32 ][2]= param[32 ][0]*S_BIN_WIDTH;
440 param[33 ][0]= (int)( 20.0/S_BIN_WIDTH); param[33 ][1]= 0.0; param[33 ][2]= param[33 ][0]*S_BIN_WIDTH;
441 param[34 ][0]= (int)( 20.0/S_BIN_WIDTH); param[34 ][1]= 0.0; param[34 ][2]= param[34 ][0]*S_BIN_WIDTH;
442 param[35 ][0]= (int)( 20.0/S_BIN_WIDTH); param[35 ][1]= 0.0; param[35 ][2]= param[35 ][0]*S_BIN_WIDTH;
443 param[36 ][0]= (int)( 20.0/S_BIN_WIDTH); param[36 ][1]= 0.0; param[36 ][2]= param[36 ][0]*S_BIN_WIDTH;
444 param[37 ][0]= (int)( 20.0/S_BIN_WIDTH); param[37 ][1]= 0.0; param[37 ][2]= param[37 ][0]*S_BIN_WIDTH;
446 param[38][0]= 50; param[38][1]= 0.0; param[38][2]= 1.0;
447 param[39][0]= 50; param[39][1]= 0.0; param[39][2]= 1.0;
449 param[40][0]= 50; param[40][1]= 0.0; param[40][2]= 1.0;
450 param[41][0]= 50; param[41][1]= 0.0; param[41][2]= 1.0;
452 param[42][0]= 50; param[42][1]= 0.0; param[42][2]= 5;
453 param[43][0]= 50; param[43][1]= 0.0; param[43][2]= 5;
454 param[44][0]= 50; param[44][1]= 0.0; param[44][2]= 5;
456 param[45][0]= 50; param[45][1]= 0.0; param[45][2]= 0.4;
457 param[46][0]= 50; param[46][1]= 0.0; param[46][2]= 0.4;
458 param[47][0]= 50; param[47][1]= 0.0; param[47][2]= 0.4;
463 isContinuous[0 ] = 1;
464 isContinuous[1 ] = 1;
465 isContinuous[2 ] = 1;
466 isContinuous[3 ] = 1;
467 isContinuous[4 ] = 0;
468 isContinuous[5 ] = 0;
469 isContinuous[6 ] = 1;
470 isContinuous[7 ] = 1;
471 isContinuous[8 ] = 1;
472 isContinuous[9 ] = 1;
473 isContinuous[10] = 1;
474 isContinuous[11] = 1;
476 isContinuous[12] = 1;
477 isContinuous[13] = 1;
478 isContinuous[14] = 1;
479 isContinuous[15] = 1;
480 isContinuous[16] = 0;
481 isContinuous[17] = 0;
482 isContinuous[18] = 1;
483 isContinuous[19] = 1;
484 isContinuous[20] = 1;
485 isContinuous[21] = 1;
486 isContinuous[22] = 1;
487 isContinuous[23] = 1;
489 isContinuous[24] = 1;
490 isContinuous[25] = 1;
491 isContinuous[26] = 1;
492 isContinuous[27] = 1;
493 isContinuous[28] = 1;
494 isContinuous[29] = 1;
495 isContinuous[30] = 1;
496 isContinuous[31] = 1;
497 isContinuous[32] = 1;
498 isContinuous[33] = 1;
499 isContinuous[34] = 1;
500 isContinuous[35] = 1;
501 isContinuous[36] = 1;
502 isContinuous[37] = 1;
503 isContinuous[38] = 1;
504 isContinuous[39] = 1;
505 isContinuous[40] = 1;
506 isContinuous[41] = 1;
507 isContinuous[42] = 1;
508 isContinuous[43] = 1;
509 isContinuous[44] = 1;
510 isContinuous[45] = 1;
511 isContinuous[46] = 1;
512 isContinuous[47] = 1;
516 cout <<
"InitStatistics(): DONE " << endl;
527 cout <<
"[MuonIsolationDQM]: analyze()"<<endl;
532 iEvent.
getByToken(theMuonCollectionLabel_,muons);
535 cout <<
"[MuonIsolationDQM]: Number of muons -> " << muons->size() << endl;
538 int theMuonData = muons->size();
539 h_nMuons->Fill(theMuonData);
541 cout <<
"[MuonIsolationDQM]: Vertex is Valid" << endl;
547 iEvent.
getByToken(theVertexCollectionLabel_, vertexHandle);
551 for (reco::VertexCollection::const_iterator
v = vertex.begin();
v!=vertex.end(); ++
v){
552 if (
v->isFake())
continue;
553 if (
v->ndof() < 4)
continue;
554 if (fabs(
v->z()) > 24.0)
continue;
560 cout <<
"[MuonIsolationDQM]: Vertex is Valid" << endl;
565 dbe->setCurrentFolder(
dirName.c_str());
566 for (reco::MuonCollection::const_iterator
muon = muons->begin();
muon!=muons->end(); ++
muon){
567 if (requireSTAMuon &&
muon->isStandAloneMuon()) {
572 else if (requireTRKMuon &&
muon->isTrackerMuon()) {
577 else if (requireGLBMuon &&
muon->isGlobalMuon()) {
581 FillNVtxHistos(_numPV);
593 float MuPt = muon.
pt();
608 if (theData[4] != 0) theData[10] = (double)theData[0] / (
double)theData[4];
609 else theData[10] = -99;
611 theData[11] = 1.5 * theData[1] + theData[2];
626 if (theData[16] != 0) theData[22] = (double)theData[12] / (
double)theData[16];
627 else theData[22] = -99;
629 theData[23] = 1.5 * theData[13] + theData[14];
631 theData[24] = (theData[0]+theData[1]+theData[2]) / MuPt;
632 theData[25] = (theData[12]+theData[13]+theData[14]) / MuPt;
648 theData[38] = (theData[26] + theData[27] + theData[28]) / MuPt;
649 theData[39] = (theData[32] + theData[33] + theData[34]) / MuPt;
651 theData[40] = (theData[26] + theData[29] + theData[30]) / MuPt;
652 theData[41] = (theData[32] + theData[35] + theData[36]) / MuPt;
672 theData2D[8] = theData2D[0] + theData2D[1] + theData2D[2] + theData2D[3] / MuPt;
673 theData2D[9] = theData2D[4] + theData2D[5] + theData2D[6] / MuPt;
677 theDataNVtx[1] = theDataNVtx[0];
678 theDataNVtx[2] = theDataNVtx[0];
681 theDataNVtx[4] = theDataNVtx[3];
682 theDataNVtx[5] = theDataNVtx[3];
687 edm::LogInfo(
"Tutorial") <<
"\n#########################################\n\n"
688 <<
"Lets get started! "
689 <<
"\n\n#########################################\n";
691 cout <<
"[MuonIsolationDQM]: beginJob" << endl;
693 dbe->setCurrentFolder(
dirName.c_str());
701 cout <<
"[MuonIsolationDQM]: beginRun" << endl;
711 if (! dbe->get(
dirName+
"/nMuons"))
return;
716 edm::LogInfo(
"Tutorial") <<
"\n#########################################\n\n"
717 <<
"Total Number of Events: " <<
nEvents
718 <<
"\n\n#########################################\n"
719 <<
"\nInitializing Histograms...\n";
721 edm::LogInfo(
"Tutorial") <<
"\nIntializing Finished. Filling...\n";
725 edm::LogInfo(
"Tutorial") <<
"\nSaved. Peace, homie, I'm out.\n";
729 h_nMuons = dbe->book1D(
"nMuons", title_sam +
"Number of Muons", 20, 0., 20.);
730 h_nMuons->setAxisTitle(
"Number of Muons",XAXIS);
731 h_nMuons->setAxisTitle(
"Fraction of Events",YAXIS);
734 for(
int var = 0; var < NUM_VARS; var++){
735 h_1D[var] = dbe->book1D(
names[var],
736 title_sam + main_titles[var] + title_cone,
741 h_1D[var]->setAxisTitle(axis_titles[var],XAXIS);
742 GetTH1FromMonitorElement(h_1D[var])->Sumw2();
746 for (
int var = 0; var<NUM_VARS_2D; var++){
747 h_2D[var] = dbe->bookProfile(names_2D[var] +
"_VsPV", titles_2D[var] +
" Vs PV", 50, 0.5, 50.5, 20, 0.0, 20.0);
749 h_2D[var]->setAxisTitle(
"Number of PV", XAXIS);
750 h_2D[var]->setAxisTitle(titles_2D[var] +
" (GeV)" ,YAXIS);
751 h_2D[var]->getTH1()->Sumw2();
755 for (
int var=0; var<NUM_VARS_NVTX; var++){
756 h_1D_NVTX[var] = dbe->book1D(names_NVtxs[var], main_titles_NVtxs[var], 50, 0.0, 10.0);
757 h_1D_NVTX[var]->setAxisTitle(axis_titles_NVtxs[var],XAXIS);
758 GetTH1FromMonitorElement(h_1D_NVTX[var])->Sumw2();
763 for(
int var=0; var<NUM_VARS; var++){
764 double entries = GetTH1FromMonitorElement(h_1D[var])->GetEntries();
765 GetTH1FromMonitorElement(h_1D[var])->Scale(1./entries);
771 cout <<
"FillHistos( "<< numPV <<
" )"<< endl;
775 for(
int var=0; var<NUM_VARS; var++){
776 h_1D[var]->Fill(theData[var]);
780 for (
int var=0; var<NUM_VARS_2D; var++){
781 h_2D[var]->Fill(numPV,theData2D[var]);
785 cout <<
"FillHistos( "<< numPV <<
" ): DONE"<< endl;
790 if (PV < 15) { h_1D_NVTX[0]->Fill(theDataNVtx[0]); h_1D_NVTX[3]->Fill(theDataNVtx[3]); }
791 if (PV >= 15 && PV < 30) { h_1D_NVTX[1]->Fill(theDataNVtx[1]); h_1D_NVTX[4]->Fill(theDataNVtx[4]); }
792 if (PV >= 30) { h_1D_NVTX[2]->Fill(theDataNVtx[2]); h_1D_NVTX[5]->Fill(theDataNVtx[5]); }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
float sumPt
sum-pt of tracks
static const HistoName names[]
float sumNeutralHadronEtHighThreshold
sum pt of neutral hadrons with a higher threshold
bool getByToken(EDGetToken token, Handle< PROD > &result) const
const MuonPFIsolation & pfSumDRIsoProfileR04() const
#define DEFINE_FWK_MODULE(type)
MuonIsolationDQM(const edm::ParameterSet &)
const MuonPFIsolation & pfMeanDRIsoProfileR04() const
float hadVetoEt
hcal sum-et in the veto region in r-phi
std::vector< Vertex > VertexCollection
collection of Vertex objects
float sumPhotonEt
sum pt of PF photons
const MuonIsolation & isolationR05() const
float sumNeutralHadronEt
sum pt of neutral hadrons
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
virtual void beginJob(void)
void RecordData(const reco::Muon &muon)
const MuonPFIsolation & pfIsolationR03() const
int nJets
number of jets in the cone
virtual void analyze(const edm::Event &, const edm::EventSetup &)
float hoVetoEt
ho sum-et in the veto region in r-phi
int nTracks
number of tracks in the cone (excluding veto region)
virtual void beginRun(void)
float emVetoEt
ecal sum-et in the veto region in r-phi
const MuonPFIsolation & pfIsolationR04() const
T const * product() const
float sumPhotonEtHighThreshold
sum pt of PF photons with a higher threshold
virtual float pt() const GCC11_FINAL
transverse momentum
float trackerVetoPt
(sum-)pt inside the veto region in r-phi
const MuonIsolation & isolationR03() const
TH1 * GetTH1FromMonitorElement(MonitorElement *me)
float sumChargedHadronPt
sum-pt of charged Hadron