21 #include "DQMOffline/Muon/test/langauFit.C" 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");
78 kinematicsSummaryMap = ibooker.
book2D(
"kinematicsSummaryMap",
"Kinematics test summary",5,1,6,3,1,4);
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);
91 chi2TestSummaryMap = ibooker.
book2D(
"chi2TestSummaryMap",
"#chi2 quality test summary",5,1,6,5,1,6);
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);
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);
122 residualsSummaryMap = ibooker.
book2D(
"residualsSummaryMap",
"Residuals test summary",4,1,5,4,1,5);
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);
135 muonIdSummaryMap = ibooker.
book2D(
"muonIdSummaryMap",
"muonId test summary",4,1,5, 5,1,6);
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);
149 energySummaryMap = ibooker.
book2D(
"energySummaryMap",
"Energy deposits test summary",3,1,4,3,1,4);
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);
160 multiplicitySummaryMap = ibooker.
book1D(
"multiplicitySummaryMap",
"muon multiplicity test summary",3,1,4);
162 multiplicitySummaryMap->setBinLabel(1,
"GLB");
163 multiplicitySummaryMap->setBinLabel(2,
"TK");
164 multiplicitySummaryMap->setBinLabel(3,
"STA");
169 summaryReport = ibooker.
bookFloat(
"reportSummary");
171 summaryReportMap = ibooker.
book2D(
"reportSummaryMap",
"Muon Report Summary Map",3,1,4,7,1,8);
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);
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"));
202 summaryCertification = ibooker.
bookFloat(
"CertificationSummary");
203 summaryCertification->
Fill(-1);
205 summaryCertificationMap = ibooker.
book2D(
"CertificationSummaryMap",
"Muon Certification Summary Map",9,1,10,7,1,8);
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);
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"));
237 for (
unsigned int icert=0;icert <theCertificationContents.size();icert++){
238 theCertificationContents[icert]->Fill(-1);
242 for(
int xBin=1; xBin<=5; xBin++){
244 kinematicsSummaryMap->Fill(xBin,
yBin,1);
247 chi2TestSummaryMap->Fill(xBin,
yBin,1);
248 KolmogorovTestSummaryMap->Fill(xBin,
yBin,1);
251 for(
int xBin=1; xBin<=residualsSummaryMap->getNbinsX(); xBin++){
252 for(
int yBin=1;
yBin<=residualsSummaryMap->getNbinsY();
yBin++){
253 residualsSummaryMap->Fill(xBin,
yBin,1);
256 residualsSummaryMap->setBinContent(4, 4, 1);
258 for(
int xBin=1; xBin<=muonIdSummaryMap->getNbinsX(); xBin++){
259 for(
int yBin=1;
yBin<=muonIdSummaryMap->getNbinsY();
yBin++){
260 muonIdSummaryMap->Fill(xBin,
yBin,1);
263 for(
int xBin=1; xBin<=3; xBin++){
265 energySummaryMap->Fill(xBin,
yBin,1);
268 for(
int xBin=1; xBin<=3; xBin++){
269 multiplicitySummaryMap->Fill(xBin,1);
271 for(
int xBin=1; xBin<=3; xBin++){
273 summaryReportMap->Fill(xBin,
yBin,1);
276 for(
int xBin=1; xBin<=9; xBin++){
278 summaryCertificationMap->Fill(xBin,
yBin,1);
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);
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);
304 doMuonIDTests(igetter);
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);
318 doMultiplicityTests(igetter);
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));
333 double residualsSummary = 0;
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);
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);
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);
362 for(
int i=1;
i<=2;
i++)
363 for(
int j=1; j<=5; j++) {
364 if(j==3 || j==5)
continue;
365 idtest+=muonIdSummaryMap->getBinContent(
i,j);
369 summaryReportMap->setBinContent(1,5, idtest);
371 for(
int i=3;
i<=4;
i++)
372 for(
int j=1; j<=5; j++) {
373 if(j==3 || j==5)
continue;
374 idtest+=muonIdSummaryMap->getBinContent(
i,j);
378 summaryReportMap->setBinContent(2,5,idtest);
379 summaryReportMap->setBinContent(3,5,-1.0/6.0);
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));
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);
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);
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);
419 summaryReport->Fill((GLB+TK+STA+energyDeposits+multiplicity)/5.0);
423 float muonIDsummary=0;
428 muonIDsummary += muonIdSummaryMap->getBinContent(1, 2);
429 muonIDsummary += muonIdSummaryMap->getBinContent(1, 4);
430 summaryCertificationMap->setBinContent(4, 5, muonIDsummary/2.);
437 muonIDsummary += muonIdSummaryMap->getBinContent(2, 2);
438 muonIDsummary += muonIdSummaryMap->getBinContent(2, 4);
439 summaryCertificationMap->setBinContent(7, 5, muonIDsummary/2.);
446 muonIDsummary += muonIdSummaryMap->getBinContent(3, 2);
447 muonIDsummary += muonIdSummaryMap->getBinContent(3, 4);
448 summaryCertificationMap->setBinContent(5, 5, muonIDsummary/2.);
455 muonIDsummary += muonIdSummaryMap->getBinContent(4, 2);
456 muonIDsummary += muonIdSummaryMap->getBinContent(4, 4);
457 summaryCertificationMap->setBinContent(8, 5, muonIDsummary/2.);
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);
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);
475 string path =
"Muons/MuonRecoAnalyzer/" + muonType +
"chi2OverDf";
479 TH1F * chi2Histo_root = chi2Histo->
getTH1F();
480 if(chi2Histo_root->GetEntries()>20){
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);
491 kinematicsSummaryMap->setBinContent(bin,1,0);
495 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
501 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
502 chi2TestSummaryMap->setBinContent(bin,1,qtresult);
505 LogTrace(
metname)<<
"chi2 kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
510 int qtstatus = myQReportKolmo->
getStatus() ;
511 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
512 KolmogorovTestSummaryMap->setBinContent(bin,1,qtresult);
517 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Chi2 Kin not performed for "<< muonType <<
" because # entries < 20 ";
524 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"eta";
528 TH1F * etaHisto_root = etaHisto->
getTH1F();
529 if (etaHisto_root ->GetEntries()>20){
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;
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;
547 kinematicsSummaryMap->setBinContent(bin,2,1);
549 kinematicsSummaryMap->setBinContent(bin,2,0);
553 LogTrace(
metname)<<
"eta kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
559 LogTrace(
metname) <<
"qtresult " <<qtresult <<
" qtstatus "<<qtstatus<<endl;
560 chi2TestSummaryMap->setBinContent(bin,2,qtresult);
564 LogTrace(
metname)<<
"eta kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
569 int qtstatus = myQReportKolmo->
getStatus() ;
570 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
571 KolmogorovTestSummaryMap->setBinContent(bin,2,qtresult);
576 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Eta Kin not performed for "<< muonType <<
" because # entries < 20 ";
583 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"phi";
587 TH1F * phiHisto_root = phiHisto->
getTH1F();
588 if(phiHisto_root ->GetEntries()>20){
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;
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;
606 kinematicsSummaryMap->setBinContent(bin,3,1);
608 kinematicsSummaryMap->setBinContent(bin,3,0);
612 LogTrace(
metname)<<
"phi kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
618 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
619 chi2TestSummaryMap->setBinContent(bin,3,qtresult);
623 LogTrace(
metname)<<
"phi kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
628 int qtstatus = myQReportKolmo->
getStatus() ;
629 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
630 KolmogorovTestSummaryMap->setBinContent(bin,3,qtresult);
635 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Phi Kin not performed for "<< muonType <<
" because # entries < 20 ";
640 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"pt";
644 TH1F * ptHisto_root = ptHisto->
getTH1F();
645 if(ptHisto_root ->GetEntries()>20){
648 LogTrace(
metname)<<
"pt kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
654 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
655 chi2TestSummaryMap->setBinContent(bin,4,qtresult);
659 LogTrace(
metname)<<
"pt kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
664 int qtstatus = myQReportKolmo->
getStatus() ;
665 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
666 KolmogorovTestSummaryMap->setBinContent(bin,4,qtresult);
670 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Pt Kin not performed for "<< muonType <<
" because # entries < 20 ";
675 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"q";
679 TH1F * qHisto_root = qHisto->
getTH1F();
680 if(qHisto_root ->GetEntries()>20){
683 LogTrace(
metname)<<
"q kin test based on comp wrt reference on terms of chi2 for "<<muonType<<endl;
689 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
690 chi2TestSummaryMap->setBinContent(bin,5,qtresult);
694 LogTrace(
metname)<<
"q kin test based on comp wrt reference using kolmogorov for "<<muonType<<endl;
699 int qtstatus = myQReportKolmo->
getStatus() ;
700 LogTrace(
metname) <<
"qtresult " <<qtresult<<
" qtstatus "<<qtstatus<<endl;
701 KolmogorovTestSummaryMap->setBinContent(bin,5,qtresult);
705 LogTrace(
metname) <<
"[MuonTestSummary]: Test of q Kin not performed for "<< muonType <<
" because # entries < 20 ";
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)));
720 histo_root->Fit(gfit,
"Q0");
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;
739 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Res_"<<type<<
"_"<<parameter<<
" not performed because # entries < 20 ";
751 string path =
"Muons/MuonRecoAnalyzer/Res_" + type +
"_" +
parameter;
757 float sigma_err = -1;
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);
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);
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);
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);
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);
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);
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);
795 string path =
"Muons/MuonRecoAnalyzer/Pull_" + type +
"_" +
parameter;
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);
803 if(sigma!=-1 && parameter==
"eta" ){
804 if(sigma-sigma_err<pullEtaSpread) residualsSummaryMap->setBinContent(4, 1, 1);
805 else residualsSummaryMap->setBinContent(4, 1, 0);
807 if(sigma!=-1 && parameter==
"phi"){
808 if(sigma-sigma_err<pullPhiSpread) residualsSummaryMap->setBinContent(4, 2, 1);
809 else residualsSummaryMap->setBinContent(4, 2, 0);
811 if(sigma!=-1 && parameter==
"oneOverp"){
812 if(sigma-sigma_err<pullOneOvPSpread) residualsSummaryMap->setBinContent(4, 3, 1);
813 else residualsSummaryMap->setBinContent(4, 3, 0);
822 string path =
"Muons/MuonRecoAnalyzer/" + type +
"_" +
parameter;
826 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Charge Comparison "<<type<<
"_"<<parameter<< endl;
830 residualsSummaryMap->setBinContent(1, 4, 1);
832 residualsSummaryMap->setBinContent(1, 4, 0);
837 residualsSummaryMap->setBinContent(2, 4, 1);
839 residualsSummaryMap->setBinContent(2, 4, 0);
844 residualsSummaryMap->setBinContent(3, 4, 1);
846 residualsSummaryMap->setBinContent(3, 4, 0);
855 vector<string> muType;
856 muType.push_back(
"GlobalMuons");
857 muType.push_back(
"TrackerMuons");
859 for(
int i=0;
i<=1;
i++){
862 string path =
"Muons/MuonIdDQM/" + muType[
i] +
"/hNumMatches";
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);
870 muonIdSummaryMap->setBinContent(
i+1,1,0);
875 double numOneSegm_dt = 0;
878 MonitorElement * DT1Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hDT1NumSegments");
882 MonitorElement * DT2Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hDT2NumSegments");
886 MonitorElement * DT3Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hDT3NumSegments");
890 MonitorElement * DT4Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hDT4NumSegments");
894 double fraction_dt=0;
895 if(numOneSegm_dt!=0){
896 fraction_dt = numOneSegm_dt/double(numHistos_dt);
900 double numOneSegm_csc = 0;
901 MonitorElement * CSC1Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hCSC1NumSegments");
905 MonitorElement * CSC2Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hCSC2NumSegments");
909 MonitorElement * CSC3Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hCSC3NumSegments");
913 MonitorElement * CSC4Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hCSC4NumSegments");
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;
927 if(fraction_dt>matchesFractionDt_min && fraction_dt<matchesFractionDt_max)
928 muonIdSummaryMap->setBinContent(2*
i+1,1,1);
930 muonIdSummaryMap->setBinContent(2*
i+1,1,0);
932 if(fraction_csc>matchesFractionCsc_min && fraction_csc<matchesFractionCsc_max)
933 muonIdSummaryMap->setBinContent(2*
i+2,1,1);
935 muonIdSummaryMap->setBinContent(2*
i+2,1,0);
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");
948 DTYresHistos.push_back(
"hDT1Pully");
949 DTYresHistos.push_back(
"hDT2Pully");
950 DTYresHistos.push_back(
"hDT3Pully");
952 CSCXresHistos.push_back(
"hCSC1Pullx");
953 CSCXresHistos.push_back(
"hCSC2Pullx");
954 CSCXresHistos.push_back(
"hCSC3Pullx");
955 CSCXresHistos.push_back(
"hCSC4Pullx");
957 CSCYresHistos.push_back(
"hCSC1Pully");
958 CSCYresHistos.push_back(
"hCSC2Pully");
959 CSCYresHistos.push_back(
"hCSC3Pully");
960 CSCYresHistos.push_back(
"hCSC4Pully");
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;
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;
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);
992 muonIdSummaryMap->setBinContent(2*i+1,2,0);
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);
998 muonIdSummaryMap->setBinContent(2*i+1,3,0);
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);
1005 muonIdSummaryMap->setBinContent(2*i+1,4,0);
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);
1011 muonIdSummaryMap->setBinContent(2*i+1,5,0);
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);
1020 muonIdSummaryMap->setBinContent(2*i+2,2,0);
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);
1026 muonIdSummaryMap->setBinContent(2*i+2,3,0);
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);
1033 muonIdSummaryMap->setBinContent(2*i+2,4,0);
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);
1039 muonIdSummaryMap->setBinContent(2*i+2,5,0);
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 ";
1070 float mean = resHisto_root->GetBinLowEdge(resHisto_root->GetMaximumBin());
1071 TF1 *gfit =
new TF1(
"Gaussian",
"gaus",mean-3,mean+3);
1075 resHisto_root->Fit(gfit,
"Q0");
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);
1086 LogTrace(
metname)<<
"sigmaRes: "<<sigma<<
" +- "<<sigma_err<<
" for "<<resHistos[
name]<<endl;
1089 Mean_err +=mean_err * mean_err;
1091 Sigma_err +=sigma_err * sigma_err;
1106 Mean_err =
sqrt(Mean_err);
1110 Sigma_err =
sqrt(Sigma_err);
1120 string path =
"Muons/MuonEnergyDepositAnalyzer/"+histname+muonType;
1122 Double_t hPeak=-1, hFWHM=-1;
1124 TH1F * energyHisto_root = energyHisto->
getTH1F();
1127 Double_t fitRange[2];
1128 Double_t startValues[4], parlimitslo[4], parlimitshi[4], fitPar[4], fitParErr[4];
1131 if(histname==
"ecalS9PointingMuDepositedEnergy_"){
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;
1141 TF1 *
fit = langaufit(energyHisto_root,fitRange,startValues,parlimitslo,parlimitshi,fitPar,fitParErr,&chisqr,&ndf);
1144 LogTrace(
metname)<<
"hPeak from langau fit: "<<hPeak<<
" for: "<<histname+muonType<<endl;
1145 LogTrace(
metname)<<
"hFWHM from langau fit: "<<hFWHM<<
" for: "<<histname+muonType<<endl;
1149 if(histname==
"hadS9PointingMuDepositedEnergy_"){
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;
1159 TF1 *
fit = langaufit(energyHisto_root,fitRange,startValues,parlimitslo,parlimitshi,fitPar,fitParErr,&chisqr,&ndf);
1162 LogTrace(
metname)<<
"hPeak from langau fit: "<<hPeak<<
" for: "<<histname+muonType<<endl;
1163 LogTrace(
metname)<<
"hFWHM from langau fit: "<<hFWHM<<
" for: "<<histname+muonType<<endl;
1168 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Energy for "<< histname+muonType <<
" not performed because # entries < 20 ";
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);
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);
1186 MonitorElement* multiplicityHisto = igetter.
get(
"Muons/MuonRecoAnalyzer/muReco");
1188 if(multiplicityHisto){
1191 LogTrace(
metname)<<
"multiplicity_GLB: "<<multiplicity_GLB<<
" ExpMultiplicityGlb_min " <<expMultiplicityGlb_min <<
" ExpMultiplicityGlb_max " <<expMultiplicityGlb_max<<endl;
1193 LogTrace(
metname)<<
"multiplicity_TK: "<<multiplicity_TK<<
" ExpMultiplicityTk_min " <<expMultiplicityTk_min <<
" ExpMultiplicityTk_max " <<expMultiplicityTk_max<<endl;
1195 LogTrace(
metname)<<
"multiplicity_STA: "<<multiplicity_STA<<
" ExpMultiplicitySta_min " <<expMultiplicitySta_min <<
" ExpMultiplicitySta_max " <<expMultiplicitySta_max<<endl;
1197 if(multiplicity_GLB>expMultiplicityGlb_min && multiplicity_GLB<expMultiplicityGlb_max)
1198 multiplicitySummaryMap->setBinContent(1,1);
1200 multiplicitySummaryMap->setBinContent(1,0);
1202 if(multiplicity_TK>expMultiplicityTk_min && multiplicity_TK<expMultiplicityTk_max)
1203 multiplicitySummaryMap->setBinContent(2,1);
1205 multiplicitySummaryMap->setBinContent(2,0);
1207 if(multiplicity_STA>expMultiplicitySta_min && multiplicity_STA<expMultiplicitySta_max)
1208 multiplicitySummaryMap->setBinContent(3,1);
1210 multiplicitySummaryMap->setBinContent(3,0);
1213 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Multiplicity not performed because # entries < 20 ";
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)
int32_t langaupro(double *params, double &maxx, double &FWHM)
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 doMultiplicityTests(DQMStore::IGetter &)
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void setCurrentFolder(std::string const &fullpath)
def binNumber(station, sl)
void doMuonIDTests(DQMStore::IGetter &)
MonitorElement * book1D(Args &&...args)
MonitorElement * get(std::string const &path)
bin
set the eta bin as selection string.
double getEntries() const
get # of entries
~MuonTestSummary() override
Destructor.
MonitorElement * book2D(Args &&...args)
int getStatus() const
get test status (see Core/interface/QTestStatus.h)
void doKinematicsTests(DQMStore::IGetter &, std::string, int)
test operations
double getBinContent(int binx) const
get content of bin (1-D)
void doEnergyTests(DQMStore::IGetter &, std::string nameHisto, std::string muonType, int bin)
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
float getQTresult() const
get test result i.e. prob value
MonitorElement * bookFloat(Args &&...args)
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.
void doResidualsTests(DQMStore::IGetter &, std::string, std::string, int)