CMS 3D CMS Logo

MuonTestSummary.cc
Go to the documentation of this file.
1 
2 /*
3  * See header file for a description of this class.
4  *
5  * \author G. Mila - INFN Torino
6  */
7 
8 
10 
11 // Framework
15 
20 
21 #include "DQMOffline/Muon/test/langauFit.C"
22 #include <string>
23 
24 using namespace edm;
25 using namespace std;
26 
27 
29 
30  // parameter initialization for kinematics test
31  etaExpected = ps.getParameter<double>("etaExpected");
32  phiExpected = ps.getParameter<double>("phiExpected");
33  chi2Fraction = ps.getParameter<double>("chi2Fraction");
34  chi2Spread = ps.getParameter<double>("chi2Spread");
35  resEtaSpread_tkGlb = ps.getParameter<double>("resEtaSpread_tkGlb");
36  resEtaSpread_glbSta = ps.getParameter<double>("resEtaSpread_glbSta");
37  resPhiSpread_tkGlb = ps.getParameter<double>("resPhiSpread_tkGlb");
38  resPhiSpread_glbSta = ps.getParameter<double>("resPhiSpread_glbSta");
39  resOneOvPSpread_tkGlb = ps.getParameter<double>("resOneOvPSpread_tkGlb");
40  resOneOvPSpread_glbSta = ps.getParameter<double>("resOneOvPSpread_glbSta");
41  pullEtaSpread = ps.getParameter<double>("pullEtaSpread");
42  pullPhiSpread = ps.getParameter<double>("pullPhiSpread");
43  pullOneOvPSpread = ps.getParameter<double>("pullOneOvPSpread");
44  resChargeLimit_tkGlb = ps.getParameter<double>("resChargeLimit_tkGlb");
45  resChargeLimit_glbSta = ps.getParameter<double>("resChargeLimit_glbSta");
46  resChargeLimit_tkSta = ps.getParameter<double>("resChargeLimit_tkSta");
47  numMatchedExpected_min = ps.getParameter<double>("numMatchedExpected_min");
48  numMatchedExpected_max = ps.getParameter<double>("numMatchedExpected_max");
49  matchesFractionDt_min = ps.getParameter<double>("matchesFractionDt_min");
50  matchesFractionDt_max = ps.getParameter<double>("matchesFractionDt_max");
51  matchesFractionCsc_min = ps.getParameter<double>("matchesFractionCsc_min");
52  matchesFractionCsc_max = ps.getParameter<double>("matchesFractionCsc_max");
53  resSegmTrack_rms_min = ps.getParameter<double>("resSegmTrack_rms_min");
54  resSegmTrack_rms_max = ps.getParameter<double>("resSegmTrack_rms_max");
55  resSegmTrack_mean_min = ps.getParameter<double>("resSegmTrack_mean_min");
56  resSegmTrack_mean_max = ps.getParameter<double>("resSegmTrack_mean_max");
57  expPeakEcalS9_min = ps.getParameter<double>("expPeakEcalS9_min");
58  expPeakEcalS9_max = ps.getParameter<double>("expPeakEcalS9_max");
59  expPeakHadS9_min = ps.getParameter<double>("expPeakHadS9_min");
60  expPeakHadS9_max = ps.getParameter<double>("expPeakHadS9_max");
61  expMultiplicityGlb_max = ps.getParameter<double>("expMultiplicityGlb_max");
62  expMultiplicityTk_max = ps.getParameter<double>("expMultiplicityTk_max");
63  expMultiplicitySta_max = ps.getParameter<double>("expMultiplicitySta_max");
64  expMultiplicityGlb_min = ps.getParameter<double>("expMultiplicityGlb_min");
65  expMultiplicityTk_min = ps.getParameter<double>("expMultiplicityTk_min");
66  expMultiplicitySta_min = ps.getParameter<double>("expMultiplicitySta_min");
67 
68 }
69 
71 
73  // BOOKING NEW HISTOGRAMS
74  ibooker.cd();
75  ibooker.setCurrentFolder("Muons/TestSummary");
76 
77  // kinematics test report
78  kinematicsSummaryMap = ibooker.book2D("kinematicsSummaryMap","Kinematics test summary",5,1,6,3,1,4);
79  kinematicsSummaryMap->setAxisTitle("track monitored",1);
80  kinematicsSummaryMap->setBinLabel(1,"GLB",1);
81  kinematicsSummaryMap->setBinLabel(2,"TKfromGLB",1);
82  kinematicsSummaryMap->setBinLabel(3,"STAfromGLB",1);
83  kinematicsSummaryMap->setBinLabel(4,"TK",1);
84  kinematicsSummaryMap->setBinLabel(5,"STA",1);
85  kinematicsSummaryMap->setAxisTitle("parameter tested",2);
86  kinematicsSummaryMap->setBinLabel(1,"#chi^{2}",2);
87  kinematicsSummaryMap->setBinLabel(2,"#eta",2);
88  kinematicsSummaryMap->setBinLabel(3,"#phi",2);
89 
90  //chi2 kinematics quality test report
91  chi2TestSummaryMap = ibooker.book2D("chi2TestSummaryMap","#chi2 quality test summary",5,1,6,5,1,6);
92  chi2TestSummaryMap->setAxisTitle("track monitored",1);
93  chi2TestSummaryMap->setBinLabel(1,"GLB",1);
94  chi2TestSummaryMap->setBinLabel(2,"TKfromGLB",1);
95  chi2TestSummaryMap->setBinLabel(3,"STAfromGLB",1);
96  chi2TestSummaryMap->setBinLabel(4,"TK",1);
97  chi2TestSummaryMap->setBinLabel(5,"STA",1);
98  chi2TestSummaryMap->setAxisTitle("parameter tested",2);
99  chi2TestSummaryMap->setBinLabel(1,"#chi^{2}",2);
100  chi2TestSummaryMap->setBinLabel(2,"#eta",2);
101  chi2TestSummaryMap->setBinLabel(3,"#phi",2);
102  chi2TestSummaryMap->setBinLabel(4,"#pt",2);
103  chi2TestSummaryMap->setBinLabel(5,"#q",2);
104 
105 //Kolmogorov kinematics quality test report
106  KolmogorovTestSummaryMap = ibooker.book2D("KolmogorovTestSummaryMap","Kolmogorov quality test summary",5,1,6,5,1,6);
107  KolmogorovTestSummaryMap->setAxisTitle("track monitored",1);
108  KolmogorovTestSummaryMap->setBinLabel(1,"GLB",1);
109  KolmogorovTestSummaryMap->setBinLabel(2,"TKfromGLB",1);
110  KolmogorovTestSummaryMap->setBinLabel(3,"STAfromGLB",1);
111  KolmogorovTestSummaryMap->setBinLabel(4,"TK",1);
112  KolmogorovTestSummaryMap->setBinLabel(5,"STA",1);
113  KolmogorovTestSummaryMap->setAxisTitle("parameter tested",2);
114  KolmogorovTestSummaryMap->setBinLabel(1,"#chi^{2}",2);
115  KolmogorovTestSummaryMap->setBinLabel(2,"#eta",2);
116  KolmogorovTestSummaryMap->setBinLabel(3,"#phi",2);
117  KolmogorovTestSummaryMap->setBinLabel(4,"#pt",2);
118  KolmogorovTestSummaryMap->setBinLabel(5,"#q",2);
119 
120 
121  // residuals test report
122  residualsSummaryMap = ibooker.book2D("residualsSummaryMap","Residuals test summary",4,1,5,4,1,5);
123  residualsSummaryMap->setAxisTitle("residuals",1);
124  residualsSummaryMap->setBinLabel(1,"TK-GLB",1);
125  residualsSummaryMap->setBinLabel(2,"GLB-STA",1);
126  residualsSummaryMap->setBinLabel(3,"TK-STA",1);
127  residualsSummaryMap->setBinLabel(4,"TK-STA Pull",1);
128  residualsSummaryMap->setAxisTitle("parameter tested",2);
129  residualsSummaryMap->setBinLabel(1,"#eta",2);
130  residualsSummaryMap->setBinLabel(2,"#phi",2);
131  residualsSummaryMap->setBinLabel(3,"1/p",2);
132  residualsSummaryMap->setBinLabel(4,"q",2);
133 
134  // muonId test report
135  muonIdSummaryMap = ibooker.book2D("muonIdSummaryMap","muonId test summary",4,1,5, 5,1,6);
136  muonIdSummaryMap->setAxisTitle("muons",1);
137  muonIdSummaryMap->setBinLabel(1,"GLB DT",1);
138  muonIdSummaryMap->setBinLabel(2,"GLB CSC",1);
139  muonIdSummaryMap->setBinLabel(3,"TK DT",1);
140  muonIdSummaryMap->setBinLabel(4,"TK CSC",1);
141  muonIdSummaryMap->setAxisTitle("tests",2);
142  muonIdSummaryMap->setBinLabel(1,"#assSeg",2);
143  muonIdSummaryMap->setBinLabel(2,"x mean",2);
144  muonIdSummaryMap->setBinLabel(3,"x rms",2);
145  muonIdSummaryMap->setBinLabel(4,"y mean",2);
146  muonIdSummaryMap->setBinLabel(5,"y rms",2);
147 
148  // energy test report
149  energySummaryMap = ibooker.book2D("energySummaryMap","Energy deposits test summary",3,1,4,3,1,4);
150  energySummaryMap->setAxisTitle("muons",1);
151  energySummaryMap->setBinLabel(1,"GLB",1);
152  energySummaryMap->setBinLabel(2,"TK",1);
153  energySummaryMap->setBinLabel(3,"STA",1);
154  energySummaryMap->setAxisTitle("calorimeter tested",2);
155  energySummaryMap->setBinLabel(1,"ECAL",2);
156  energySummaryMap->setBinLabel(2,"HAD",2);
157  energySummaryMap->setBinLabel(3,"H0",2);
158 
159  // multiplicity tests report
160  multiplicitySummaryMap = ibooker.book1D("multiplicitySummaryMap","muon multiplicity test summary",3,1,4);
161  multiplicitySummaryMap->setAxisTitle("muon");
162  multiplicitySummaryMap->setBinLabel(1,"GLB");
163  multiplicitySummaryMap->setBinLabel(2,"TK");
164  multiplicitySummaryMap->setBinLabel(3,"STA");
165 
166 
167  // summary test report
168  ibooker.setCurrentFolder("Muons/EventInfo");
169  summaryReport = ibooker.bookFloat("reportSummary");
170 
171  summaryReportMap = ibooker.book2D("reportSummaryMap","Muon Report Summary Map",3,1,4,7,1,8);
172  summaryReportMap->setAxisTitle("muons",1);
173  summaryReportMap->setBinLabel(1,"GLB",1);
174  summaryReportMap->setBinLabel(2,"TK",1);
175  summaryReportMap->setBinLabel(3,"STA",1);
176  summaryReportMap->setAxisTitle("test",2);
177  summaryReportMap->setBinLabel(1,"#chi^{2}/Df",2);
178  summaryReportMap->setBinLabel(2,"#eta",2);
179  summaryReportMap->setBinLabel(3,"#phi",2);
180  summaryReportMap->setBinLabel(4,"residuals",2);
181  summaryReportMap->setBinLabel(5,"muonId",2);
182  summaryReportMap->setBinLabel(6,"energyDeposits",2);
183  summaryReportMap->setBinLabel(7,"multiplicity",2);
184 
185  ibooker.setCurrentFolder("Muons/EventInfo/reportSummaryContents");
186  theSummaryContents.push_back(ibooker.bookFloat("kinematics_GLB"));
187  theSummaryContents.push_back(ibooker.bookFloat("muonId_GLB"));
188  theSummaryContents.push_back(ibooker.bookFloat("residuals_GLB"));
189  theSummaryContents.push_back(ibooker.bookFloat("GLB"));
190  theSummaryContents.push_back(ibooker.bookFloat("kinematics_TK"));
191  theSummaryContents.push_back(ibooker.bookFloat("muonId_TK"));
192  theSummaryContents.push_back(ibooker.bookFloat("residuals_TK"));
193  theSummaryContents.push_back(ibooker.bookFloat("TK"));
194  theSummaryContents.push_back(ibooker.bookFloat("kinematics_STA"));
195  theSummaryContents.push_back(ibooker.bookFloat("residuals_STA"));
196  theSummaryContents.push_back(ibooker.bookFloat("STA"));
197  theSummaryContents.push_back(ibooker.bookFloat("energyDeposits"));
198  theSummaryContents.push_back(ibooker.bookFloat("multiplicity"));
199 
200  // certification report
201  ibooker.setCurrentFolder("Muons/EventInfo");
202  summaryCertification = ibooker.bookFloat("CertificationSummary");
203  summaryCertification->Fill(-1);
204 
205  summaryCertificationMap = ibooker.book2D("CertificationSummaryMap","Muon Certification Summary Map",9,1,10,7,1,8);
206  summaryCertificationMap->setAxisTitle("muons",1);
207  summaryCertificationMap->setBinLabel(1,"GLB_Tot",1);
208  summaryCertificationMap->setBinLabel(2,"TK_Tot",1);
209  summaryCertificationMap->setBinLabel(3,"STA_tot",1);
210  summaryCertificationMap->setBinLabel(4,"GLB_B",1);
211  summaryCertificationMap->setBinLabel(5,"TK_B",1);
212  summaryCertificationMap->setBinLabel(6,"STA_B",1);
213  summaryCertificationMap->setBinLabel(7,"GLB_EC",1);
214  summaryCertificationMap->setBinLabel(8,"TK_EC",1);
215  summaryCertificationMap->setBinLabel(9,"STA_EC",1);
216  summaryCertificationMap->setAxisTitle("test",2);
217  summaryCertificationMap->setBinLabel(1,"#chi^{2}/Df",2);
218  summaryCertificationMap->setBinLabel(2,"#eta",2);
219  summaryCertificationMap->setBinLabel(3,"#phi",2);
220  summaryCertificationMap->setBinLabel(4,"residuals",2);
221  summaryCertificationMap->setBinLabel(5,"muonId",2);
222  summaryCertificationMap->setBinLabel(6,"energyDeposits",2);
223  summaryCertificationMap->setBinLabel(7,"multiplicity",2);
224 
225  ibooker.setCurrentFolder("Muons/EventInfo/CertificationContents");
226  theCertificationContents.push_back(ibooker.bookFloat("GLB_Tot"));
227  theCertificationContents.push_back(ibooker.bookFloat("STA_Tot"));
228  theCertificationContents.push_back(ibooker.bookFloat("TK_Tot"));
229  theCertificationContents.push_back(ibooker.bookFloat("GLB_B"));
230  theCertificationContents.push_back(ibooker.bookFloat("STA_B"));
231  theCertificationContents.push_back(ibooker.bookFloat("TK_B"));
232  theCertificationContents.push_back(ibooker.bookFloat("GLB_EC"));
233  theCertificationContents.push_back(ibooker.bookFloat("STA_EC"));
234  theCertificationContents.push_back(ibooker.bookFloat("TK_EC"));
235 
236 
237  for (unsigned int icert=0;icert <theCertificationContents.size();icert++){
238  theCertificationContents[icert]->Fill(-1);
239  }
240 
241  // initialisation of histo bins
242  for(int xBin=1; xBin<=5; xBin++){
243  for(int yBin=1; yBin<=3; yBin++){
244  kinematicsSummaryMap->Fill(xBin,yBin,1);
245  }
246  for(int yBin=1; yBin<=5; yBin++){
247  chi2TestSummaryMap->Fill(xBin,yBin,1);
248  KolmogorovTestSummaryMap->Fill(xBin,yBin,1);
249  }
250  }
251  for(int xBin=1; xBin<=residualsSummaryMap->getNbinsX(); xBin++){
252  for(int yBin=1; yBin<=residualsSummaryMap->getNbinsY(); yBin++){
253  residualsSummaryMap->Fill(xBin,yBin,1);
254  }
255  }
256  residualsSummaryMap->setBinContent(4, 4, 1); //not used for now
257 
258  for(int xBin=1; xBin<=muonIdSummaryMap->getNbinsX(); xBin++){
259  for(int yBin=1; yBin<=muonIdSummaryMap->getNbinsY(); yBin++){
260  muonIdSummaryMap->Fill(xBin,yBin,1);
261  }
262  }
263  for(int xBin=1; xBin<=3; xBin++){
264  for(int yBin=1; yBin<=3; yBin++){
265  energySummaryMap->Fill(xBin,yBin,1);
266  }
267  }
268  for(int xBin=1; xBin<=3; xBin++){
269  multiplicitySummaryMap->Fill(xBin,1);
270  }
271  for(int xBin=1; xBin<=3; xBin++){
272  for(int yBin=1; yBin<=7; yBin++){
273  summaryReportMap->Fill(xBin,yBin,1);
274  }
275  }
276  for(int xBin=1; xBin<=9; xBin++){
277  for(int yBin=1; yBin<=7; yBin++){
278  summaryCertificationMap->Fill(xBin,yBin,1);
279  }
280  }
283 
284  // fill the kinematics report summary
285  doKinematicsTests(igetter,"GlbMuon_Glb_", 1);
286  doKinematicsTests(igetter,"GlbMuon_Tk_", 2);
287  doKinematicsTests(igetter,"GlbMuon_Sta_",3);
288  doKinematicsTests(igetter,"TkMuon_", 4);
289  doKinematicsTests(igetter,"StaMuon_", 5);
290 
291  // fill the residuals report summary
292  doResidualsTests(igetter,"TkGlb", "eta", 1);
293  doResidualsTests(igetter,"GlbSta", "eta", 2);
294  doResidualsTests(igetter,"TkSta", "eta", 3);
295  doResidualsTests(igetter,"TkGlb", "phi", 1);
296  doResidualsTests(igetter,"GlbSta", "phi", 2);
297  doResidualsTests(igetter,"TkSta", "phi", 3);
298  doResidualsTests(igetter,"TkGlb", "oneOverp", 1);
299  doResidualsTests(igetter,"GlbSta", "oneOverp", 2);
300  doResidualsTests(igetter,"TkSta", "oneOverp", 3);
301  doResidualsTests(igetter,"GlbMuon", "qComparison", -1);
302 
303  // fill the muonID report summary
304  doMuonIDTests(igetter);
305 
306  // fill the energy report summary
307  doEnergyTests(igetter,"ecalS9PointingMuDepositedEnergy_","Glb_muons", 1);
308  doEnergyTests(igetter,"hadS9PointingMuDepositedEnergy_", "Glb_muons", 1);
309  doEnergyTests(igetter,"hoS9PointingMuDepositedEnergy_", "Glb_muons", 1);
310  doEnergyTests(igetter,"ecalS9PointingMuDepositedEnergy_", "Tk_muons", 2);
311  doEnergyTests(igetter,"hadS9PointingMuDepositedEnergy_", "Tk_muons", 2);
312  doEnergyTests(igetter,"hoS9PointingMuDepositedEnergy_", "Tk_muons", 2);
313  doEnergyTests(igetter,"ecalS9PointingMuDepositedEnergy_", "Sta_muons", 3);
314  doEnergyTests(igetter,"hadS9PointingMuDepositedEnergy_", "Sta_muons", 3);
315  doEnergyTests(igetter,"hoS9PointingMuDepositedEnergy_", "Sta_muons", 3);
316 
317  // fill the multiplicity test summary
318  doMultiplicityTests(igetter);
319 
320  // fill the final report summary
321  //Changed to KolmogorovQuality test--------------------------
322  summaryReportMap->setBinContent(1,1,double(KolmogorovTestSummaryMap->getBinContent(1,1)+KolmogorovTestSummaryMap->getBinContent(2,1)+KolmogorovTestSummaryMap->getBinContent(3,1))/3.0);
323  summaryReportMap->setBinContent(2,1,KolmogorovTestSummaryMap->getBinContent(4,1));
324  summaryReportMap->setBinContent(3,1,KolmogorovTestSummaryMap->getBinContent(5,1));
325  summaryReportMap->setBinContent(1,2,double(KolmogorovTestSummaryMap->getBinContent(1,2)+KolmogorovTestSummaryMap->getBinContent(2,2)+KolmogorovTestSummaryMap->getBinContent(3,2))/3.0);
326  summaryReportMap->setBinContent(2,2,KolmogorovTestSummaryMap->getBinContent(4,2));
327  summaryReportMap->setBinContent(3,2,KolmogorovTestSummaryMap->getBinContent(5,2));
328  summaryReportMap->setBinContent(1,3,double(KolmogorovTestSummaryMap->getBinContent(1,3)+KolmogorovTestSummaryMap->getBinContent(2,3)+KolmogorovTestSummaryMap->getBinContent(3,3))/3.0);
329  summaryReportMap->setBinContent(2,3,KolmogorovTestSummaryMap->getBinContent(4,3));
330  summaryReportMap->setBinContent(3,3,KolmogorovTestSummaryMap->getBinContent(5,3));
331 
332  //-- modified GH
333  double residualsSummary = 0;
334  //put the TRK-STA resid & pulls in the first bin ("GLB")
335  //then the GLB-TRK and GLB-STA residuals in the 2nd and 3rd
336  for(int i=3; i<=residualsSummaryMap->getNbinsX(); i++)
337  for (int j=1; j<=residualsSummaryMap->getNbinsY(); j++)
338  residualsSummary += residualsSummaryMap->getBinContent(i,j);
339  residualsSummary /=2*residualsSummaryMap->getNbinsY();
340  summaryReportMap->setBinContent(1,4, residualsSummary);
341 
342  residualsSummary=0;
343  for(int i=1; i<=1; i++)
344  for (int j=1; j<=residualsSummaryMap->getNbinsY(); j++)
345  residualsSummary += residualsSummaryMap->getBinContent(i,j);
346  residualsSummary /=1*residualsSummaryMap->getNbinsY();
347  summaryReportMap->setBinContent(2,4,residualsSummary);
348 
349  residualsSummary=0;
350  for(int i=2; i<=2; i++)
351  for (int j=1; j<=residualsSummaryMap->getNbinsY(); j++)
352  residualsSummary += residualsSummaryMap->getBinContent(i,j);
353  residualsSummary /=1*residualsSummaryMap->getNbinsY();
354  summaryReportMap->setBinContent(3,4,residualsSummary);
355 
356  //--
357 
358 
359 
360  //-- modified GH
361  float idtest=0;
362  for(int i=1; i<=2; i++)
363  for(int j=1; j<=5; j++) {
364  if(j==3 || j==5) continue; //ignore pull widths for now
365  idtest+=muonIdSummaryMap->getBinContent(i,j);
366  }
367  // idtest/=10.;
368  idtest/=6.;
369  summaryReportMap->setBinContent(1,5, idtest);
370  idtest=0;
371  for(int i=3; i<=4; i++)
372  for(int j=1; j<=5; j++) {
373  if(j==3 || j==5) continue; //ignore pull widths for now
374  idtest+=muonIdSummaryMap->getBinContent(i,j);
375  }
376  // idtest/=10.;
377  idtest/=6.;
378  summaryReportMap->setBinContent(2,5,idtest);
379  summaryReportMap->setBinContent(3,5,-1.0/6.0);
380  //--
381 
382  summaryReportMap->setBinContent(1,6,double(energySummaryMap->getBinContent(1,1)+energySummaryMap->getBinContent(1,2))/2.0);
383  summaryReportMap->setBinContent(2,6,double(energySummaryMap->getBinContent(2,1)+energySummaryMap->getBinContent(2,2))/2.0);
384  summaryReportMap->setBinContent(3,6,double(energySummaryMap->getBinContent(3,1)+energySummaryMap->getBinContent(3,2))/2.0);
385  summaryReportMap->setBinContent(1,7,multiplicitySummaryMap->getBinContent(1));
386  summaryReportMap->setBinContent(2,7,multiplicitySummaryMap->getBinContent(2));
387  summaryReportMap->setBinContent(3,7,multiplicitySummaryMap->getBinContent(3));
388 
389 
390  double kinematics_GLB = double(summaryReportMap->getBinContent(1,1)+summaryReportMap->getBinContent(1,2)+summaryReportMap->getBinContent(1,3))/3.0;
391  theSummaryContents[0]->Fill(kinematics_GLB);
392  double muonId_GLB = double(summaryReportMap->getBinContent(1,5));
393  theSummaryContents[1]->Fill(muonId_GLB);
394  double residuals_GLB = double(summaryReportMap->getBinContent(1,4));
395  theSummaryContents[2]->Fill(residuals_GLB);
396  double GLB = (kinematics_GLB+muonId_GLB+residuals_GLB)/3.0;
397  theSummaryContents[3]->Fill(GLB);
398 
399  double kinematics_TK = double(summaryReportMap->getBinContent(2,1)+summaryReportMap->getBinContent(2,2)+summaryReportMap->getBinContent(2,3))/3.0;
400  theSummaryContents[4]->Fill(kinematics_TK);
401  double muonId_TK = double(summaryReportMap->getBinContent(2,5));
402  theSummaryContents[5]->Fill(muonId_TK);
403  double residuals_TK = double(summaryReportMap->getBinContent(2,4));
404  theSummaryContents[6]->Fill(residuals_TK);
405  double TK = double(kinematics_TK+muonId_TK+residuals_TK)/3.0;
406  theSummaryContents[7]->Fill(TK);
407 
408  double kinematics_STA = double(summaryReportMap->getBinContent(3,1)+summaryReportMap->getBinContent(3,2)+summaryReportMap->getBinContent(3,3))/3.0;
409  theSummaryContents[8]->Fill(kinematics_STA);
410  double residuals_STA = double(summaryReportMap->getBinContent(3,4));
411  theSummaryContents[9]->Fill(residuals_STA);
412  double STA = double(kinematics_STA+residuals_STA)/2.0;
413  theSummaryContents[10]->Fill(STA);
414  double energyDeposits = double(summaryReportMap->getBinContent(1,6)+summaryReportMap->getBinContent(2,6)+summaryReportMap->getBinContent(3,6))/3.0;
415  theSummaryContents[11]->Fill(energyDeposits);
416  double multiplicity = double(summaryReportMap->getBinContent(1,7)+summaryReportMap->getBinContent(2,7)+summaryReportMap->getBinContent(3,7))/3.0;
417  theSummaryContents[12]->Fill(multiplicity);
418 
419  summaryReport->Fill((GLB+TK+STA+energyDeposits+multiplicity)/5.0);
420 
421 
422  //global barrel:
423  float muonIDsummary=0;
424  // for(int i=2; i<=5; i++)
425  // muonIDsummary += muonIdSummaryMap->getBinContent(2, i);
426  // summaryCertificationMap->setBinContent(4, 5, muonIDsummary/4.);
427  //for now, just report the mean:
428  muonIDsummary += muonIdSummaryMap->getBinContent(1, 2);
429  muonIDsummary += muonIdSummaryMap->getBinContent(1, 4);
430  summaryCertificationMap->setBinContent(4, 5, muonIDsummary/2.);
431 
432  //global EC:
433  muonIDsummary=0;
434  // for(int i=2; i<=5; i++)
435  // muonIDsummary += muonIdSummaryMap->getBinContent(2, i);
436  // summaryCertificationMap->setBinContent(7, 5, muonIDsummary/4.);
437  muonIDsummary += muonIdSummaryMap->getBinContent(2, 2);
438  muonIDsummary += muonIdSummaryMap->getBinContent(2, 4);
439  summaryCertificationMap->setBinContent(7, 5, muonIDsummary/2.);
440 
441  //tracker barrel:
442  muonIDsummary=0;
443  // for(int i=2; i<=5; i++)
444  // muonIDsummary += muonIdSummaryMap->getBinContent(3, i);
445  // summaryCertificationMap->setBinContent(5, 5, muonIDsummary/4.);
446  muonIDsummary += muonIdSummaryMap->getBinContent(3, 2);
447  muonIDsummary += muonIdSummaryMap->getBinContent(3, 4);
448  summaryCertificationMap->setBinContent(5, 5, muonIDsummary/2.);
449 
450  //tracker EC:
451  muonIDsummary=0;
452  // for(int i=2; i<=5; i++)
453  // muonIDsummary += muonIdSummaryMap->getBinContent(4, i);
454  // summaryCertificationMap->setBinContent(8, 5, muonIDsummary/4.);
455  muonIDsummary += muonIdSummaryMap->getBinContent(4, 2);
456  muonIDsummary += muonIdSummaryMap->getBinContent(4, 4);
457  summaryCertificationMap->setBinContent(8, 5, muonIDsummary/2.);
458 
459 
460  double muonId_GLB_B = double(summaryCertificationMap->getBinContent(4,5));
461  theCertificationContents[3]->Fill(muonId_GLB_B);
462  double muonId_GLB_EC = double(summaryCertificationMap->getBinContent(7,5));
463  theCertificationContents[6]->Fill(muonId_GLB_EC);
464 
465  double muonId_TK_B = double(summaryCertificationMap->getBinContent(5,5));
466  theCertificationContents[5]->Fill(muonId_TK_B);
467  double muonId_TK_EC = double(summaryCertificationMap->getBinContent(8,5));
468  theCertificationContents[8]->Fill(muonId_TK_EC);
469 }
470 
471 
472 void MuonTestSummary::doKinematicsTests(DQMStore::IGetter & igetter, string muonType, int bin){
473 
474  // chi2 test
475  string path = "Muons/MuonRecoAnalyzer/" + muonType + "chi2OverDf";
476  MonitorElement * chi2Histo = igetter.get(path);
477 
478  if(chi2Histo){
479  TH1F * chi2Histo_root = chi2Histo->getTH1F();
480  if(chi2Histo_root->GetEntries()>20){
481 
482  //Standard QT based on fraction of events below and above a cut
483  LogTrace(metname)<<"chi2 kin test based on fraction for "<<muonType<<endl;
484  int maxBin = chi2Histo_root->GetMaximumBin();
485  if(chi2Histo_root->Integral(maxBin+1,chi2Histo_root->GetNbinsX())!=0){
486  double fraction = double(chi2Histo_root->Integral(1,maxBin))/double(chi2Histo_root->Integral(maxBin+1,chi2Histo_root->GetNbinsX()));
487  LogTrace(metname)<<"chi2 fraction for "<<muonType<<" : "<<fraction<< " must be within "<< chi2Fraction-chi2Spread<<","<<chi2Fraction+chi2Spread<<endl;
488  if(fraction>(chi2Fraction-chi2Spread) && fraction<(chi2Fraction+chi2Spread))
489  kinematicsSummaryMap->setBinContent(bin,1,1);
490  else
491  kinematicsSummaryMap->setBinContent(bin,1,0);
492  }
493 
494  //QT based on comp wrt reference based on chi2
495  LogTrace(metname)<<"chi2 kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
496  const QReport * myQReport = chi2Histo->getQReport("Mu_Comp2RefChi2"); //get QReport associated to your ME
497  if(myQReport) {
498  LogTrace(metname) << "Chi2Report exists!!";
499  float qtresult = myQReport->getQTresult(); // get QT result value
500  int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
501  LogTrace(metname) << "qtresult " <<qtresult << " qtstatus "<<qtstatus<<endl;
502  chi2TestSummaryMap->setBinContent(bin,1,qtresult);
503  }
504  //QT based on comp wrt reference based on kolmogorov test
505  LogTrace(metname)<<"chi2 kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
506  const QReport * myQReportKolmo = chi2Histo->getQReport("Mu_Comp2RefKolmogorov");
507  if(myQReportKolmo) {
508  LogTrace(metname) << "Chi2Report Kolmogorov exists!!";
509  float qtresult = myQReportKolmo->getQTresult(); // get QT result value
510  int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
511  LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
512  KolmogorovTestSummaryMap->setBinContent(bin,1,qtresult);
513  }
514 
515  }
516  else{
517  LogTrace(metname) << "[MuonTestSummary]: Test of Chi2 Kin not performed for "<< muonType << " because # entries < 20 ";
518  }
519  }
520 
521 
522 
523  // pseudorapidity test
524  path = "Muons/MuonRecoAnalyzer/" + muonType + "eta";
525  MonitorElement * etaHisto = igetter.get(path);
526 
527  if(etaHisto){
528  TH1F * etaHisto_root = etaHisto->getTH1F();
529  if (etaHisto_root ->GetEntries()>20){
530 
531  //Standard QT based on fraction of events below and above a cut
532  LogTrace(metname)<<"eta kin test based on fraction for "<<muonType<<endl;
533  double binSize = (etaHisto_root->GetXaxis()->GetXmax()-etaHisto_root->GetXaxis()->GetXmin())/etaHisto_root->GetNbinsX();
534  int binZero = int((0-etaHisto_root->GetXaxis()->GetXmin())/binSize);
535  if(etaHisto_root->Integral(1,binZero-1)!=0 && etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())!=0){
536  double symmetryFactor =
537  double(etaHisto_root->Integral(1,binZero-1)) / double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX()));
538  double errSymmetryFactor =
539  symmetryFactor*sqrt(1.0/double(etaHisto_root->Integral(1,binZero-1)) + 1.0/double(etaHisto_root->Integral(binZero,etaHisto_root->GetNbinsX())));
540  LogTrace(metname)<<"eta symmetryFactor for "<<muonType<<" : "<<symmetryFactor<< " (expected :" <<etaExpected <<")"<<endl;
541  LogTrace(metname)<<"eta errSymmetryFactor for "<<muonType<<" : "<<errSymmetryFactor<<endl;
542  double tParameter;
543  if((symmetryFactor-etaExpected)>0) tParameter=double(symmetryFactor-etaExpected)/errSymmetryFactor;
544  else tParameter=double(-symmetryFactor+etaExpected)/errSymmetryFactor;
545  LogTrace(metname)<<"eta tParameter for "<<muonType<<" : "<<tParameter<<" (expected < 1.95)" <<endl;
546  if (tParameter<1.95) //2sigma rejection
547  kinematicsSummaryMap->setBinContent(bin,2,1);
548  else
549  kinematicsSummaryMap->setBinContent(bin,2,0);
550  }
551 
552  //QT based on comp wrt reference based on chi2
553  LogTrace(metname)<<"eta kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
554  const QReport * myQReport = etaHisto->getQReport("Mu_Comp2RefChi2"); //get QReport associated to your ME
555  if(myQReport) {
556  LogTrace(metname) << "EtaReport exists!!";
557  float qtresult = myQReport->getQTresult(); // get QT result value
558  int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
559  LogTrace(metname) << "qtresult " <<qtresult << " qtstatus "<<qtstatus<<endl;
560  chi2TestSummaryMap->setBinContent(bin,2,qtresult);
561  }
562 
563  //QT based on comp wrt reference based on kolmogorov test
564  LogTrace(metname)<<"eta kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
565  const QReport * myQReportKolmo = etaHisto->getQReport("Mu_Comp2RefKolmogorov");
566  if(myQReportKolmo) {
567  LogTrace(metname) << "EtaReport Kolmogorov exists!!";
568  float qtresult = myQReportKolmo->getQTresult(); // get QT result value
569  int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
570  LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
571  KolmogorovTestSummaryMap->setBinContent(bin,2,qtresult);
572  }
573 
574  }
575  else{
576  LogTrace(metname) << "[MuonTestSummary]: Test of Eta Kin not performed for "<< muonType << " because # entries < 20 ";
577  }
578  }
579 
580 
581 
582  // phi test
583  path = "Muons/MuonRecoAnalyzer/" + muonType + "phi";
584  MonitorElement * phiHisto = igetter.get(path);
585 
586  if(phiHisto ){
587  TH1F * phiHisto_root = phiHisto->getTH1F();
588  if(phiHisto_root ->GetEntries()>20){
589 
590  //Standard QT based on fraction of events below and above a cut
591  LogTrace(metname)<<"phi kin test based on fraction for "<<muonType<<endl;
592  double binSize = (phiHisto_root->GetXaxis()->GetXmax()-phiHisto_root->GetXaxis()->GetXmin())/phiHisto_root->GetNbinsX();
593  int binZero = int((0-phiHisto_root->GetXaxis()->GetXmin())/binSize);
594  if(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())!=0 && phiHisto_root->Integral(1,binZero)!=0){
595  double symmetryFactor =
596  double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) / double(phiHisto_root->Integral(1,binZero));
597  double errSymmetryFactor =
598  symmetryFactor*sqrt(1.0/double(phiHisto_root->Integral(binZero+1,phiHisto_root->GetNbinsX())) + 1.0/double(phiHisto_root->Integral(1,binZero)));
599  LogTrace(metname)<<"phi symmetryFactor for "<<muonType<<" : "<<symmetryFactor<< "(phi expected :" <<phiExpected <<")"<<endl;
600  LogTrace(metname)<<"phi errSymmetryFactor for "<<muonType<<" : "<<errSymmetryFactor<<endl;
601  double tParameter;
602  if((symmetryFactor-phiExpected)>0) tParameter=double(symmetryFactor-phiExpected)/errSymmetryFactor;
603  else tParameter=double(-symmetryFactor+phiExpected)/errSymmetryFactor;
604  LogTrace(metname)<<"phi tParameter for "<<muonType<<" : "<<tParameter<<" (expected < 1.95)" <<endl;
605  if (tParameter<1.95) //2sigma rejection
606  kinematicsSummaryMap->setBinContent(bin,3,1);
607  else
608  kinematicsSummaryMap->setBinContent(bin,3,0);
609  }
610 
611  //QT based on comp wrt reference based on chi2
612  LogTrace(metname)<<"phi kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
613  const QReport * myQReport = phiHisto->getQReport("Mu_Comp2RefChi2"); //get QReport associated to your ME
614  if(myQReport) {
615  LogTrace(metname) << "PhiReport exists!!";
616  float qtresult = myQReport->getQTresult(); // get QT result value
617  int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
618  LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
619  chi2TestSummaryMap->setBinContent(bin,3,qtresult);
620  }
621 
622  //QT based on comp wrt reference based on kolmogorov test
623  LogTrace(metname)<<"phi kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
624  const QReport * myQReportKolmo = phiHisto->getQReport("Mu_Comp2RefKolmogorov");
625  if(myQReportKolmo) {
626  LogTrace(metname) << "PhiReport Kolmogorov exists!!";
627  float qtresult = myQReportKolmo->getQTresult(); // get QT result value
628  int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
629  LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
630  KolmogorovTestSummaryMap->setBinContent(bin,3,qtresult);
631  }
632 
633  }
634  else{
635  LogTrace(metname) << "[MuonTestSummary]: Test of Phi Kin not performed for "<< muonType << " because # entries < 20 ";
636  }
637  }
638 
639  // pt test
640  path = "Muons/MuonRecoAnalyzer/" + muonType + "pt";
641  MonitorElement * ptHisto = igetter.get(path);
642 
643  if(ptHisto ){
644  TH1F * ptHisto_root = ptHisto->getTH1F();
645  if(ptHisto_root ->GetEntries()>20){
646 
647  //QT based on comp wrt reference based on chi2
648  LogTrace(metname)<<"pt kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
649  const QReport * myQReport = ptHisto->getQReport("Mu_Comp2RefChi2"); //get QReport associated to your ME
650  if(myQReport) {
651  LogTrace(metname) << "PtReport exists!!";
652  float qtresult = myQReport->getQTresult(); // get QT result value
653  int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
654  LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
655  chi2TestSummaryMap->setBinContent(bin,4,qtresult);
656  }
657 
658  //QT based on comp wrt reference based on kolmogorov test
659  LogTrace(metname)<<"pt kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
660  const QReport * myQReportKolmo = ptHisto->getQReport("Mu_Comp2RefKolmogorov");
661  if(myQReportKolmo) {
662  LogTrace(metname) << "PtReport Kolmogorov exists!!";
663  float qtresult = myQReportKolmo->getQTresult(); // get QT result value
664  int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
665  LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
666  KolmogorovTestSummaryMap->setBinContent(bin,4,qtresult);
667  }
668  }
669  else{
670  LogTrace(metname) << "[MuonTestSummary]: Test of Pt Kin not performed for "<< muonType << " because # entries < 20 ";
671  }
672  }
673 
674  // q test
675  path = "Muons/MuonRecoAnalyzer/" + muonType + "q";
676  MonitorElement * qHisto = igetter.get(path);
677 
678  if(ptHisto ){
679  TH1F * qHisto_root = qHisto->getTH1F();
680  if(qHisto_root ->GetEntries()>20){
681 
682  //QT based on comp wrt reference based on chi2
683  LogTrace(metname)<<"q kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
684  const QReport * myQReport = qHisto->getQReport("Mu_Comp2RefChi2"); //get QReport associated to your ME
685  if(myQReport) {
686  LogTrace(metname) << "qReport exists!!";
687  float qtresult = myQReport->getQTresult(); // get QT result value
688  int qtstatus = myQReport->getStatus() ; // get QT status value (see table below)
689  LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
690  chi2TestSummaryMap->setBinContent(bin,5,qtresult);
691  }
692 
693  //QT based on comp wrt reference based on kolmogorov test
694  LogTrace(metname)<<"q kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
695  const QReport * myQReportKolmo = qHisto->getQReport("Mu_Comp2RefKolmogorov");
696  if(myQReportKolmo) {
697  LogTrace(metname) << "qReport Kolmogorov exists!!";
698  float qtresult = myQReportKolmo->getQTresult(); // get QT result value
699  int qtstatus = myQReportKolmo->getStatus() ; // get QT status value (see table below)
700  LogTrace(metname) << "qtresult " <<qtresult<< " qtstatus "<<qtstatus<<endl;
701  KolmogorovTestSummaryMap->setBinContent(bin,5,qtresult);
702  }
703  }
704  else{
705  LogTrace(metname) << "[MuonTestSummary]: Test of q Kin not performed for "<< muonType << " because # entries < 20 ";
706  }
707  }
708 
709 }
710 //--GH new
711 void MuonTestSummary::GaussFit(string type, string parameter, MonitorElement * Histo, float &mean, float &mean_err, float &sigma, float &sigma_err) {
712 
713  // Gaussian Fit
714  float statMean = Histo->getMean(1);
715  float statSigma = Histo->getRMS(1);
716  TH1F * histo_root = Histo->getTH1F();
717  if(histo_root->GetEntries()>20){
718  TF1 *gfit = new TF1("Gaussian","gaus",(statMean-(2*statSigma)),(statMean+(2*statSigma)));
719  try {
720  histo_root->Fit(gfit, "Q0");
721  } catch (cms::Exception& iException) {
722  edm::LogError (metname)<< "[MuonTestSummary]: Exception when fitting Res_"<<type<<"_"<<parameter;
723  mean=1;
724  mean_err=1;
725  sigma=1;
726  sigma_err=1;
727  return;
728  }
729  if(gfit){
730  mean = gfit->GetParameter(1);
731  mean_err = gfit->GetParErrors()[2];
732  sigma = gfit->GetParameter(2);
733  sigma_err = gfit->GetParErrors()[2];
734  LogTrace(metname)<<"Gaussian fit mean: "<<mean<<" +- "<<mean_err<<" for "<<type<<"_"<<parameter<<endl;
735  LogTrace(metname)<<"Gaussina fit sigma: "<<sigma<<" +- "<<sigma_err<<" for "<<type<<"_"<<parameter<<endl;
736  }
737  }
738  else{
739  LogTrace(metname) << "[MuonTestSummary]: Test of Res_"<<type<<"_"<<parameter<< " not performed because # entries < 20 ";
740  //auto-pass if not enough events.
741  mean=1;
742  mean_err=1;
743  sigma=1;
744  sigma_err=1;
745  }
746 }
748 
749  // residuals test
750  if(type!="GlbMuon"){
751  string path = "Muons/MuonRecoAnalyzer/Res_" + type + "_" + parameter;
752  MonitorElement * residualsHisto = igetter.get(path);
753 
754  float mean = -1;
755  float mean_err = -1;
756  float sigma = -1;
757  float sigma_err = -1;
758 
759  if(residualsHisto){
760 
761  LogTrace(metname) << "[MuonTestSummary]: Starting Gaussian fit for Test of Res_"<<type<<"_"<<parameter<< endl;
762  GaussFit( type, parameter, residualsHisto, mean, mean_err, sigma, sigma_err);
763 
764  if(sigma!=-1 && parameter=="eta" && type=="TkGlb"){
765  if(sigma-sigma_err<resEtaSpread_tkGlb) residualsSummaryMap->setBinContent(bin, 1, 1);
766  else residualsSummaryMap->setBinContent(bin, 1, 0);
767  }
768  if(sigma!=-1 && parameter=="eta" && (type=="GlbSta" || type=="TkSta")) {
769  if(sigma-sigma_err<resEtaSpread_glbSta) residualsSummaryMap->setBinContent(bin, 1, 1);
770  else residualsSummaryMap->setBinContent(bin, 1, 0);
771  }
772  if(sigma!=-1 && parameter=="phi" && type=="TkGlb"){
773  if(sigma-sigma_err<resPhiSpread_tkGlb) residualsSummaryMap->setBinContent(bin, 2, 1);
774  else residualsSummaryMap->setBinContent(bin, 2, 0);
775  }
776  if(sigma!=-1 && parameter=="phi" && (type=="GlbSta" || type=="TkSta")){
777  if(sigma-sigma_err<resPhiSpread_glbSta) residualsSummaryMap->setBinContent(bin, 2, 1);
778  else residualsSummaryMap->setBinContent(bin, 2, 0);
779  }
780  if(sigma!=-1 && parameter=="oneOverp" && type=="TkGlb"){
781  if(sigma-sigma_err<resOneOvPSpread_tkGlb) residualsSummaryMap->setBinContent(bin, 3, 1);
782  else residualsSummaryMap->setBinContent(bin, 3, 0);
783  }
784  if(sigma!=-1 && parameter=="oneOverp" && (type=="GlbSta" || type=="TkSta")) {
785  if(sigma-sigma_err<resOneOvPSpread_glbSta) residualsSummaryMap->setBinContent(bin, 3, 1);
786  else residualsSummaryMap->setBinContent(bin, 3, 0);
787  }
788  }
789 
790 
791 
792  //--GH modified
793  if(type=="TkSta"){
794  //look at the pull:
795  string path = "Muons/MuonRecoAnalyzer/Pull_" + type + "_" + parameter;
796  MonitorElement * pullHisto = igetter.get(path);
797 
798  if(pullHisto){
799 
800  LogTrace(metname) << "[MuonTestSummary]: Starting Gaussian fit for Test of Pull_"<<type<<"_"<<parameter<< endl;
801  GaussFit( type, parameter, pullHisto, mean, mean_err, sigma, sigma_err);
802 
803  if(sigma!=-1 && parameter=="eta" ){
804  if(sigma-sigma_err<pullEtaSpread) residualsSummaryMap->setBinContent(4, 1, 1);
805  else residualsSummaryMap->setBinContent(4, 1, 0);
806  }
807  if(sigma!=-1 && parameter=="phi"){
808  if(sigma-sigma_err<pullPhiSpread) residualsSummaryMap->setBinContent(4, 2, 1);
809  else residualsSummaryMap->setBinContent(4, 2, 0);
810  }
811  if(sigma!=-1 && parameter=="oneOverp"){
812  if(sigma-sigma_err<pullOneOvPSpread) residualsSummaryMap->setBinContent(4, 3, 1);
813  else residualsSummaryMap->setBinContent(4, 3, 0);
814  }
815 
816  }//have pull histo
817  } //TkSta muons
818  }
819 
820  //this part for Global Muons:
821  else{
822  string path = "Muons/MuonRecoAnalyzer/" + type + "_" + parameter;
823  MonitorElement * residualsHisto = igetter.get(path);
824 
825  if(residualsHisto){
826  LogTrace(metname) << "[MuonTestSummary]: Test of Charge Comparison "<<type<<"_"<<parameter<< endl;
827  if((residualsHisto->getBinContent(3)+residualsHisto->getBinContent(4))!=0){
828  LogTrace(metname)<<"Charge comparison TkGlb: "<<residualsHisto->getBinContent(4)/double(residualsHisto->getBinContent(3)+residualsHisto->getBinContent(4))<<endl;
829  if(residualsHisto->getBinContent(4)/double(residualsHisto->getBinContent(3)+residualsHisto->getBinContent(4)) < resChargeLimit_tkGlb)
830  residualsSummaryMap->setBinContent(1, 4, 1);
831  else
832  residualsSummaryMap->setBinContent(1, 4, 0);
833  }
834  if((residualsHisto->getBinContent(1)+residualsHisto->getBinContent(2))!=0){
835  LogTrace(metname)<<"charge comparison GlbSta: "<<residualsHisto->getBinContent(2)/double(residualsHisto->getBinContent(1)+residualsHisto->getBinContent(2))<<endl;
836  if(residualsHisto->getBinContent(2)/double(residualsHisto->getBinContent(1)+residualsHisto->getBinContent(2)) < resChargeLimit_glbSta)
837  residualsSummaryMap->setBinContent(2, 4, 1);
838  else
839  residualsSummaryMap->setBinContent(2, 4, 0);
840  }
841  if(residualsHisto->getBinContent(5)+residualsHisto->getBinContent(6)!=0){
842  LogTrace(metname)<<"charge comparison TkSta: "<<residualsHisto->getBinContent(6)/double(residualsHisto->getBinContent(5)+residualsHisto->getBinContent(6))<<endl;
843  if(residualsHisto->getBinContent(6)/double(residualsHisto->getBinContent(5)+residualsHisto->getBinContent(6)) < resChargeLimit_tkSta)
844  residualsSummaryMap->setBinContent(3, 4, 1);
845  else
846  residualsSummaryMap->setBinContent(3, 4, 0);
847  }
848  }
849  }
850 
851 }
852 
854 
855  vector<string> muType;
856  muType.push_back("GlobalMuons");
857  muType.push_back("TrackerMuons");
858 
859  for(int i=0; i<=1; i++){
860 
861  // num matches test
862  string path = "Muons/MuonIdDQM/" + muType[i] + "/hNumMatches";
863  MonitorElement * matchesHisto = igetter.get(path);
864 
865  if(matchesHisto){
866  TH1F * matchesHisto_root = matchesHisto->getTH1F();
867  if(matchesHisto_root->GetMaximumBin() >= numMatchedExpected_min && matchesHisto_root->GetMaximumBin() <= numMatchedExpected_max)
868  muonIdSummaryMap->setBinContent(i+1,1,1);
869  else
870  muonIdSummaryMap->setBinContent(i+1,1,0);
871  }
872 
873 
874  // num of 0 associated segments
875  double numOneSegm_dt = 0;
876  int numHistos_dt=0;
877  int numHistos_csc=0;
878  MonitorElement * DT1Histo = igetter.get("Muons/MuonIdDQM/" + muType[i] + "/hDT1NumSegments");
879  if(DT1Histo)
880  {numHistos_dt++;
881  if(DT1Histo->getEntries()!=0) numOneSegm_dt+=double(DT1Histo->getBinContent(2))/double(DT1Histo->getEntries());}
882  MonitorElement * DT2Histo = igetter.get("Muons/MuonIdDQM/" + muType[i] + "/hDT2NumSegments");
883  if(DT2Histo)
884  {numHistos_dt++;
885  if(DT2Histo->getEntries()!=0) numOneSegm_dt+=double(DT2Histo->getBinContent(2))/double(DT2Histo->getEntries());}
886  MonitorElement * DT3Histo = igetter.get("Muons/MuonIdDQM/" + muType[i] + "/hDT3NumSegments");
887  if(DT3Histo)
888  {numHistos_dt++;
889  if(DT3Histo->getEntries()!=0) numOneSegm_dt+=double(DT3Histo->getBinContent(2))/double(DT3Histo->getEntries());}
890  MonitorElement * DT4Histo = igetter.get("Muons/MuonIdDQM/" + muType[i] + "/hDT4NumSegments");
891  if(DT4Histo)
892  {numHistos_dt++;
893  if(DT4Histo->getEntries()!=0) numOneSegm_dt+=double(DT4Histo->getBinContent(2))/double(DT4Histo->getEntries());}
894  double fraction_dt=0;
895  if(numOneSegm_dt!=0){
896  fraction_dt = numOneSegm_dt/double(numHistos_dt);
897  LogTrace(metname)<<"fraction_dt: "<<fraction_dt<<" for "<<muType[i]<<endl;
898  }
899 
900  double numOneSegm_csc = 0;
901  MonitorElement * CSC1Histo = igetter.get("Muons/MuonIdDQM/" + muType[i] + "/hCSC1NumSegments");
902  if(CSC1Histo)
903  {numHistos_csc++;
904  if(CSC1Histo->getEntries()!=0) numOneSegm_csc+=double(CSC1Histo->getBinContent(2))/double(CSC1Histo->getEntries());}
905  MonitorElement * CSC2Histo = igetter.get("Muons/MuonIdDQM/" + muType[i] + "/hCSC2NumSegments");
906  if(CSC2Histo)
907  {numHistos_csc++;
908  if(CSC2Histo->getEntries()!=0) numOneSegm_csc+=double(CSC2Histo->getBinContent(2))/double(CSC2Histo->getEntries());}
909  MonitorElement * CSC3Histo = igetter.get("Muons/MuonIdDQM/" + muType[i] + "/hCSC3NumSegments");
910  if(CSC3Histo)
911  {numHistos_csc++;
912  if(CSC3Histo->getEntries()!=0) numOneSegm_csc+=double(CSC3Histo->getBinContent(2))/double(CSC3Histo->getEntries());}
913  MonitorElement * CSC4Histo = igetter.get("Muons/MuonIdDQM/" + muType[i] + "/hCSC4NumSegments");
914  if(CSC4Histo)
915  {numHistos_csc++;
916  if(CSC4Histo->getEntries()!=0) numOneSegm_csc+=double(CSC4Histo->getBinContent(2))/double(CSC4Histo->getEntries());}
917  double fraction_csc=0;
918  if(numOneSegm_csc!=0){
919  fraction_csc = numOneSegm_csc/double(numHistos_csc);
920  LogTrace(metname)<<"fraction_csc: "<<fraction_csc<<" for "<<muType[i]<<endl;
921  }
922 
923 
924 
925  //--GH modified
926 
927  if(fraction_dt>matchesFractionDt_min && fraction_dt<matchesFractionDt_max)
928  muonIdSummaryMap->setBinContent(2*i+1,1,1);
929  else
930  muonIdSummaryMap->setBinContent(2*i+1,1,0);
931 
932  if(fraction_csc>matchesFractionCsc_min && fraction_csc<matchesFractionCsc_max)
933  muonIdSummaryMap->setBinContent(2*i+2,1,1);
934  else
935  muonIdSummaryMap->setBinContent(2*i+2,1,0);
936 
937 
938 
939  //--GH modified
940 
941  // residuals test
942  vector<string> DTXresHistos, DTYresHistos, CSCXresHistos, CSCYresHistos;
943  DTXresHistos.push_back("hDT1Pullx");
944  DTXresHistos.push_back("hDT2Pullx");
945  DTXresHistos.push_back("hDT3Pullx");
946  DTXresHistos.push_back("hDT4Pullx");
947 
948  DTYresHistos.push_back("hDT1Pully");
949  DTYresHistos.push_back("hDT2Pully");
950  DTYresHistos.push_back("hDT3Pully");
951 
952  CSCXresHistos.push_back("hCSC1Pullx");
953  CSCXresHistos.push_back("hCSC2Pullx");
954  CSCXresHistos.push_back("hCSC3Pullx");
955  CSCXresHistos.push_back("hCSC4Pullx");
956 
957  CSCYresHistos.push_back("hCSC1Pully");
958  CSCYresHistos.push_back("hCSC2Pully");
959  CSCYresHistos.push_back("hCSC3Pully");
960  CSCYresHistos.push_back("hCSC4Pully");
961 
962  int numPlot_dtX, numPlot_dtY, numPlot_cscX, numPlot_cscY;
963  double dtSigmaX, dtSigmaY, cscSigmaX, cscSigmaY;
964  double dtSigmaX_err, dtSigmaY_err, cscSigmaX_err, cscSigmaY_err;
965  double dtMeanX, dtMeanY, cscMeanX, cscMeanY;
966  double dtMeanX_err, dtMeanY_err, cscMeanX_err, cscMeanY_err;
967  MuonTestSummary::ResidualCheck(igetter, muType[i], DTXresHistos, numPlot_dtX, dtMeanX, dtMeanX_err, dtSigmaX, dtSigmaX_err);
968  MuonTestSummary::ResidualCheck(igetter, muType[i], DTYresHistos, numPlot_dtY, dtMeanY, dtMeanY_err, dtSigmaY, dtSigmaY_err);
969  MuonTestSummary::ResidualCheck(igetter, muType[i], CSCXresHistos, numPlot_cscX, cscMeanX, cscMeanX_err, cscSigmaX, cscSigmaX_err);
970  MuonTestSummary::ResidualCheck(igetter, muType[i], CSCYresHistos, numPlot_cscY, cscMeanY, cscMeanY_err, cscSigmaY, cscSigmaY_err);
971 
972 
973  LogTrace(metname)<<"DT mean must be between: "<<resSegmTrack_mean_min <<" and "<<resSegmTrack_mean_max<<endl;
974  LogTrace(metname)<<"DT rms must be between: "<<resSegmTrack_rms_min <<" and "<<resSegmTrack_rms_max<<endl;
975  LogTrace(metname)<<"DT X residual "<< muType[i]<<" mean: " << dtMeanX<<" +- "<< dtMeanX_err
976  <<", sigma: "<< dtSigmaX <<" +- "<<dtSigmaX_err<< endl;
977  LogTrace(metname)<<"DT Y residual "<< muType[i]<<" mean: " << dtMeanY<<" +- "<< dtMeanY_err
978  <<", sigma: "<< dtSigmaY <<" +- "<<dtSigmaY_err<< endl;
979  LogTrace(metname)<<"CSC X residual "<< muType[i]<<" mean: " << cscMeanX<<" +- "<< cscMeanX_err
980  <<", sigma: "<< cscSigmaX <<" +- "<<cscSigmaX_err<< endl;
981  LogTrace(metname)<<"CSC Y residual "<< muType[i]<<" mean: " << cscMeanY<<" +- "<< cscMeanY_err
982  <<", sigma: "<< cscSigmaY <<" +- "<<cscSigmaY_err<< endl;
983 
984 
985  //require the mean and rms to be within nsig sigma of preferred range;
986  const int nsig=2;
987  if(numPlot_dtX > 0 ) {
988  if( dtMeanX + nsig*dtMeanX_err>resSegmTrack_mean_min &&
989  dtMeanX - nsig*dtMeanX_err<resSegmTrack_mean_max)
990  muonIdSummaryMap->setBinContent(2*i+1,2,1);
991  else
992  muonIdSummaryMap->setBinContent(2*i+1,2,0);
993 
994  if( dtSigmaX + nsig*dtSigmaX_err>resSegmTrack_rms_min &&
995  dtSigmaX - nsig*dtSigmaX_err<resSegmTrack_rms_max)
996  muonIdSummaryMap->setBinContent(2*i+1,3,1);
997  else
998  muonIdSummaryMap->setBinContent(2*i+1,3,0);
999  }
1000  if(numPlot_dtY > 0 ){
1001  if( dtMeanY + nsig*dtMeanY_err>resSegmTrack_mean_min &&
1002  dtMeanY - nsig*dtMeanY_err<resSegmTrack_mean_max)
1003  muonIdSummaryMap->setBinContent(2*i+1,4,1);
1004  else
1005  muonIdSummaryMap->setBinContent(2*i+1,4,0);
1006 
1007  if( dtSigmaY + nsig*dtSigmaY_err>resSegmTrack_rms_min &&
1008  dtSigmaY - nsig*dtSigmaX_err<resSegmTrack_rms_max)
1009  muonIdSummaryMap->setBinContent(2*i+1,5,1);
1010  else
1011  muonIdSummaryMap->setBinContent(2*i+1,5,0);
1012  }
1013 
1014 
1015  if(numPlot_cscX > 0 ) {
1016  if( cscMeanX + nsig*cscMeanX_err>resSegmTrack_mean_min &&
1017  cscMeanX - nsig*cscMeanX_err<resSegmTrack_mean_max)
1018  muonIdSummaryMap->setBinContent(2*i+2,2,1);
1019  else
1020  muonIdSummaryMap->setBinContent(2*i+2,2,0);
1021 
1022  if( cscSigmaX + nsig*cscSigmaX_err>resSegmTrack_rms_min &&
1023  cscSigmaX - nsig*cscSigmaX_err<resSegmTrack_rms_max)
1024  muonIdSummaryMap->setBinContent(2*i+2,3,1);
1025  else
1026  muonIdSummaryMap->setBinContent(2*i+2,3,0);
1027  }
1028  if(numPlot_cscY > 0 ){
1029  if( cscMeanY + nsig*cscMeanY_err>resSegmTrack_mean_min &&
1030  cscMeanY - nsig*cscMeanY_err<resSegmTrack_mean_max)
1031  muonIdSummaryMap->setBinContent(2*i+2,4,1);
1032  else
1033  muonIdSummaryMap->setBinContent(2*i+2,4,0);
1034 
1035  if( cscSigmaY + nsig*cscSigmaY_err>resSegmTrack_rms_min &&
1036  cscSigmaY - nsig*cscSigmaY_err<resSegmTrack_rms_max)
1037  muonIdSummaryMap->setBinContent(2*i+2,5,1);
1038  else
1039  muonIdSummaryMap->setBinContent(2*i+2,5,0);
1040  }
1041 
1042  //---- end of modification
1043 
1044 
1045  }
1046 
1047 }
1048 
1049 void MuonTestSummary::ResidualCheck(DQMStore::IGetter &igetter, std::string muType, const std::vector<std::string>& resHistos, int &numPlot, double &Mean, double &Mean_err, double &Sigma, double &Sigma_err){
1050 
1051  numPlot=0;
1052  Mean=0;
1053  Mean_err=0;
1054  Sigma=0;
1055  Sigma_err=0;
1056  for(uint name=0; name<resHistos.size(); name++){
1057  MonitorElement * resHisto = igetter.get("Muons/MuonIdDQM/" + muType + "/"+resHistos[name]);
1058 
1059  if(resHisto){
1060  TH1F * resHisto_root = resHisto->getTH1F();
1061  if(resHisto_root->GetEntries() < 20) {
1062  LogTrace(metname) << "[MuonTestSummary]: Test of "<< muType<<" for " <<resHistos[name]<< " not performed because # entries < 20 ";
1063  continue;
1064  }
1065 
1066  //we also want to check if the peak is away from zero.
1067  //so, try fitting in 3 sigma around the histogram mean.
1068  //alternatively, could use the maximum bin (less sensitive to 1-sided tails).
1069  // float mean = resHisto_root->GetMean();
1070  float mean = resHisto_root->GetBinLowEdge(resHisto_root->GetMaximumBin());
1071  TF1 *gfit = new TF1("Gaussian","gaus",mean-3,mean+3);
1072 
1073 
1074  try {
1075  resHisto_root->Fit(gfit, "Q0");
1076  } catch (cms::Exception& iException) {
1077  edm::LogError (metname)<< "[MuonTestSummary]: Exception when fitting "<<resHistos[name];
1078  continue;
1079  }
1080  if(gfit){
1081  double mean = gfit->GetParameter(1);
1082  double mean_err = gfit->GetParError(1);
1083  double sigma = gfit->GetParameter(2);
1084  double sigma_err = gfit->GetParError(2);
1085  LogTrace(metname)<<"meanRes: "<<mean<<" +- "<<mean_err<<" for "<<resHistos[name]<<endl;
1086  LogTrace(metname)<<"sigmaRes: "<<sigma<<" +- "<<sigma_err<<" for "<<resHistos[name]<<endl;
1087 
1088  Mean+=mean;
1089  Mean_err +=mean_err * mean_err;
1090  Sigma+=sigma;
1091  Sigma_err +=sigma_err * sigma_err;
1092  numPlot++;
1093  } //if gfit? why would we not have gfit?
1094 
1095  }//histogram exists...
1096  } // loop over residuals histos
1097 
1098 
1099  if(numPlot==0){ //eg no stats
1100  Mean_err = 1;
1101  Mean=1;
1102  Sigma_err =1;
1103  Sigma = 1;
1104  }
1105  else{
1106  Mean_err = sqrt(Mean_err);
1107  Mean_err/=numPlot;
1108  Mean/=numPlot;
1109 
1110  Sigma_err = sqrt(Sigma_err);
1111  Sigma_err/=numPlot;
1112  Sigma/=numPlot;
1113  }
1114  return;
1115 
1116 }
1117 void MuonTestSummary::doEnergyTests(DQMStore::IGetter &igetter, string histname, string muonType, int binNumber){
1118 
1119  // num matches test
1120  string path = "Muons/MuonEnergyDepositAnalyzer/"+histname+muonType;
1121  MonitorElement * energyHisto = igetter.get(path);
1122  Double_t hPeak=-1, hFWHM=-1;
1123  if(energyHisto){
1124  TH1F * energyHisto_root = energyHisto->getTH1F();
1125 
1126  // Setting fit range and start values
1127  Double_t fitRange[2];
1128  Double_t startValues[4], parlimitslo[4], parlimitshi[4], fitPar[4], fitParErr[4];
1129 
1130  if (energyHisto->getEntries()>20){
1131  if(histname=="ecalS9PointingMuDepositedEnergy_"){
1132  fitRange[0]=0.04;
1133  fitRange[1]=3.0;
1134 
1135  startValues[0]=0.036; startValues[1]=0.193; startValues[2]=110.0; startValues[3]=0.06;
1136  parlimitslo[0]=0.0; parlimitslo[1]=0.; parlimitslo[2]=1.0; parlimitslo[3]=0.;
1137  parlimitshi[0]=0.05; parlimitshi[1]=0.5; parlimitshi[2]=80000.0; parlimitshi[3]=0.1;
1138 
1139  Double_t chisqr;
1140  Int_t ndf;
1141  TF1 *fit = langaufit(energyHisto_root,fitRange,startValues,parlimitslo,parlimitshi,fitPar,fitParErr,&chisqr,&ndf);
1142  if(fit){
1143  langaupro(fitPar,hPeak,hFWHM);
1144  LogTrace(metname)<<"hPeak from langau fit: "<<hPeak<<" for: "<<histname+muonType<<endl;
1145  LogTrace(metname)<<"hFWHM from langau fit: "<<hFWHM<<" for: "<<histname+muonType<<endl;
1146  }
1147  }
1148 
1149  if(histname=="hadS9PointingMuDepositedEnergy_"){
1150  fitRange[0]=0.0;
1151  fitRange[1]=7.0;
1152 
1153  startValues[0]=2.0; startValues[1]=2.4; startValues[2]=110.0; startValues[3]=4.0;
1154  parlimitslo[0]=0.0; parlimitslo[1]=0.; parlimitslo[2]=1.0; parlimitslo[3]=0.;
1155  parlimitshi[0]=4.0; parlimitshi[1]=4.0; parlimitshi[2]=80000.0; parlimitshi[3]=8.0;
1156 
1157  Double_t chisqr;
1158  Int_t ndf;
1159  TF1 *fit = langaufit(energyHisto_root,fitRange,startValues,parlimitslo,parlimitshi,fitPar,fitParErr,&chisqr,&ndf);
1160  if(fit){
1161  langaupro(fitPar,hPeak,hFWHM);
1162  LogTrace(metname)<<"hPeak from langau fit: "<<hPeak<<" for: "<<histname+muonType<<endl;
1163  LogTrace(metname)<<"hFWHM from langau fit: "<<hFWHM<<" for: "<<histname+muonType<<endl;
1164  }
1165  }
1166  }
1167  else{
1168  LogTrace(metname) << "[MuonTestSummary]: Test of Energy for "<< histname+muonType << " not performed because # entries < 20 ";
1169  }
1170  }
1171 
1172  if(histname=="ecalS9PointingMuDepositedEnergy_" && hPeak>expPeakEcalS9_min && hPeak<expPeakEcalS9_max)
1173  energySummaryMap->setBinContent(binNumber,1, 1);
1174  if(histname=="ecalS9PointingMuDepositedEnergy_" && (hPeak!=-1) &&!(hPeak>expPeakEcalS9_min && hPeak<expPeakEcalS9_max))
1175  energySummaryMap->setBinContent(binNumber,1, 0);
1176 
1177  if(histname=="hadS9PointingMuDepositedEnergy_" && hPeak>expPeakHadS9_min && hPeak<expPeakHadS9_max)
1178  energySummaryMap->setBinContent(binNumber,2, 1);
1179  if(histname=="hadS9PointingMuDepositedEnergy_" && (hPeak!=-1) && !(hPeak>expPeakHadS9_min && hPeak<expPeakHadS9_max))
1180  energySummaryMap->setBinContent(binNumber,2, 0);
1181 
1182  //missing test on ho distributions
1183 }
1185 
1186  MonitorElement* multiplicityHisto = igetter.get("Muons/MuonRecoAnalyzer/muReco");
1187 
1188  if(multiplicityHisto){
1189  if(multiplicityHisto->getEntries()>20){
1190  double multiplicity_GLB = double(multiplicityHisto->getBinContent(1)+multiplicityHisto->getBinContent(2))/double(multiplicityHisto->getEntries());
1191  LogTrace(metname)<<"multiplicity_GLB: "<<multiplicity_GLB<< " ExpMultiplicityGlb_min " <<expMultiplicityGlb_min <<" ExpMultiplicityGlb_max " <<expMultiplicityGlb_max<<endl;
1192  double multiplicity_TK = double(multiplicityHisto->getBinContent(3)+multiplicityHisto->getBinContent(4))/double(multiplicityHisto->getEntries());
1193  LogTrace(metname)<<"multiplicity_TK: "<<multiplicity_TK<< " ExpMultiplicityTk_min " <<expMultiplicityTk_min <<" ExpMultiplicityTk_max " <<expMultiplicityTk_max<<endl;
1194  double multiplicity_STA = double(multiplicityHisto->getBinContent(3)+multiplicityHisto->getBinContent(5))/double(multiplicityHisto->getEntries());
1195  LogTrace(metname)<<"multiplicity_STA: "<<multiplicity_STA<< " ExpMultiplicitySta_min " <<expMultiplicitySta_min <<" ExpMultiplicitySta_max " <<expMultiplicitySta_max<<endl;
1196 
1197  if(multiplicity_GLB>expMultiplicityGlb_min && multiplicity_GLB<expMultiplicityGlb_max)
1198  multiplicitySummaryMap->setBinContent(1,1);
1199  else
1200  multiplicitySummaryMap->setBinContent(1,0);
1201 
1202  if(multiplicity_TK>expMultiplicityTk_min && multiplicity_TK<expMultiplicityTk_max)
1203  multiplicitySummaryMap->setBinContent(2,1);
1204  else
1205  multiplicitySummaryMap->setBinContent(2,0);
1206 
1207  if(multiplicity_STA>expMultiplicitySta_min && multiplicity_STA<expMultiplicitySta_max)
1208  multiplicitySummaryMap->setBinContent(3,1);
1209  else
1210  multiplicitySummaryMap->setBinContent(3,0);
1211  }
1212  else{
1213  LogTrace(metname) << "[MuonTestSummary]: Test of Multiplicity not performed because # entries < 20 ";
1214  }
1215  }
1216 
1217 }
type
Definition: HCALResponse.h:21
T getParameter(std::string const &) const
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
void ResidualCheck(DQMStore::IGetter &, std::string muType, const std::vector< std::string > &resHistos, int &numPlot, double &Mean, double &Mean_err, double &Sigma, double &Sigma_err)
const std::string metname
void cd(void)
Definition: DQMStore.cc:269
def binNumber(station, sector)
MonitorElement * get(const std::string &path)
Definition: DQMStore.cc:305
void doMultiplicityTests(DQMStore::IGetter &)
double getEntries(void) const
get # of entries
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void Fill(long long x)
void doMuonIDTests(DQMStore::IGetter &)
T sqrt(T t)
Definition: SSEVec.h:18
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
int getStatus(void) const
get test status (see Core/interface/QTestStatus.h)
Definition: QReport.h:16
#define LogTrace(id)
int32_t langaupro(double *params, double &maxx, double &FWHM)
Definition: fitUtilities.h:120
bin
set the eta bin as selection string.
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
~MuonTestSummary() override
Destructor.
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
TH1F * getTH1F(void) const
void doKinematicsTests(DQMStore::IGetter &, std::string, int)
test operations
float getQTresult(void) const
get test result i.e. prob value
Definition: QReport.h:20
double getBinContent(int binx) const
get content of bin (1-D)
void doEnergyTests(DQMStore::IGetter &, std::string nameHisto, std::string muonType, int bin)
HLT enums.
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void GaussFit(std::string type, std::string parameter, MonitorElement *Histo, float &mean, float &mean_err, float &sigma, float &sigma_err)
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
MonitorElement * bookFloat(Args &&...args)
Definition: DQMStore.h:109
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
MuonTestSummary(const edm::ParameterSet &ps)
Constructor.
yBin
Definition: cuy.py:891
void doResidualsTests(DQMStore::IGetter &, std::string, std::string, int)