19 #include "DQMOffline/Muon/test/langauFit.C"
31 resEtaSpread_tkGlb = ps.
getParameter<
double>(
"resEtaSpread_tkGlb");
32 resEtaSpread_glbSta = ps.
getParameter<
double>(
"resEtaSpread_glbSta");
33 resPhiSpread_tkGlb = ps.
getParameter<
double>(
"resPhiSpread_tkGlb");
34 resPhiSpread_glbSta = ps.
getParameter<
double>(
"resPhiSpread_glbSta");
35 resOneOvPSpread_tkGlb = ps.
getParameter<
double>(
"resOneOvPSpread_tkGlb");
36 resOneOvPSpread_glbSta = ps.
getParameter<
double>(
"resOneOvPSpread_glbSta");
37 pullEtaSpread = ps.
getParameter<
double>(
"pullEtaSpread");
38 pullPhiSpread = ps.
getParameter<
double>(
"pullPhiSpread");
39 pullOneOvPSpread = ps.
getParameter<
double>(
"pullOneOvPSpread");
40 resChargeLimit_tkGlb = ps.
getParameter<
double>(
"resChargeLimit_tkGlb");
41 resChargeLimit_glbSta = ps.
getParameter<
double>(
"resChargeLimit_glbSta");
42 resChargeLimit_tkSta = ps.
getParameter<
double>(
"resChargeLimit_tkSta");
43 numMatchedExpected_min = ps.
getParameter<
double>(
"numMatchedExpected_min");
44 numMatchedExpected_max = ps.
getParameter<
double>(
"numMatchedExpected_max");
45 matchesFractionDt_min = ps.
getParameter<
double>(
"matchesFractionDt_min");
46 matchesFractionDt_max = ps.
getParameter<
double>(
"matchesFractionDt_max");
47 matchesFractionCsc_min = ps.
getParameter<
double>(
"matchesFractionCsc_min");
48 matchesFractionCsc_max = ps.
getParameter<
double>(
"matchesFractionCsc_max");
49 resSegmTrack_rms_min = ps.
getParameter<
double>(
"resSegmTrack_rms_min");
50 resSegmTrack_rms_max = ps.
getParameter<
double>(
"resSegmTrack_rms_max");
51 resSegmTrack_mean_min = ps.
getParameter<
double>(
"resSegmTrack_mean_min");
52 resSegmTrack_mean_max = ps.
getParameter<
double>(
"resSegmTrack_mean_max");
53 expPeakEcalS9_min = ps.
getParameter<
double>(
"expPeakEcalS9_min");
54 expPeakEcalS9_max = ps.
getParameter<
double>(
"expPeakEcalS9_max");
55 expPeakHadS9_min = ps.
getParameter<
double>(
"expPeakHadS9_min");
56 expPeakHadS9_max = ps.
getParameter<
double>(
"expPeakHadS9_max");
57 expMultiplicityGlb_max = ps.
getParameter<
double>(
"expMultiplicityGlb_max");
58 expMultiplicityTk_max = ps.
getParameter<
double>(
"expMultiplicityTk_max");
59 expMultiplicitySta_max = ps.
getParameter<
double>(
"expMultiplicitySta_max");
60 expMultiplicityGlb_min = ps.
getParameter<
double>(
"expMultiplicityGlb_min");
61 expMultiplicityTk_min = ps.
getParameter<
double>(
"expMultiplicityTk_min");
62 expMultiplicitySta_min = ps.
getParameter<
double>(
"expMultiplicitySta_min");
73 kinematicsSummaryMap = ibooker.
book2D(
"kinematicsSummaryMap",
"Kinematics test summary", 5, 1, 6, 3, 1, 4);
74 kinematicsSummaryMap->
setAxisTitle(
"track monitored", 1);
75 kinematicsSummaryMap->setBinLabel(1,
"GLB", 1);
76 kinematicsSummaryMap->setBinLabel(2,
"TKfromGLB", 1);
77 kinematicsSummaryMap->setBinLabel(3,
"STAfromGLB", 1);
78 kinematicsSummaryMap->setBinLabel(4,
"TK", 1);
79 kinematicsSummaryMap->setBinLabel(5,
"STA", 1);
80 kinematicsSummaryMap->setAxisTitle(
"parameter tested", 2);
81 kinematicsSummaryMap->setBinLabel(1,
"#chi^{2}", 2);
82 kinematicsSummaryMap->setBinLabel(2,
"#eta", 2);
83 kinematicsSummaryMap->setBinLabel(3,
"#phi", 2);
86 chi2TestSummaryMap = ibooker.
book2D(
"chi2TestSummaryMap",
"#chi2 quality test summary", 5, 1, 6, 5, 1, 6);
88 chi2TestSummaryMap->setBinLabel(1,
"GLB", 1);
89 chi2TestSummaryMap->setBinLabel(2,
"TKfromGLB", 1);
90 chi2TestSummaryMap->setBinLabel(3,
"STAfromGLB", 1);
91 chi2TestSummaryMap->setBinLabel(4,
"TK", 1);
92 chi2TestSummaryMap->setBinLabel(5,
"STA", 1);
93 chi2TestSummaryMap->setAxisTitle(
"parameter tested", 2);
94 chi2TestSummaryMap->setBinLabel(1,
"#chi^{2}", 2);
95 chi2TestSummaryMap->setBinLabel(2,
"#eta", 2);
96 chi2TestSummaryMap->setBinLabel(3,
"#phi", 2);
97 chi2TestSummaryMap->setBinLabel(4,
"#pt", 2);
98 chi2TestSummaryMap->setBinLabel(5,
"#q", 2);
101 residualsSummaryMap = ibooker.
book2D(
"residualsSummaryMap",
"Residuals test summary", 4, 1, 5, 4, 1, 5);
103 residualsSummaryMap->setBinLabel(1,
"TK-GLB", 1);
104 residualsSummaryMap->setBinLabel(2,
"GLB-STA", 1);
105 residualsSummaryMap->setBinLabel(3,
"TK-STA", 1);
106 residualsSummaryMap->setBinLabel(4,
"TK-STA Pull", 1);
107 residualsSummaryMap->setAxisTitle(
"parameter tested", 2);
108 residualsSummaryMap->setBinLabel(1,
"#eta", 2);
109 residualsSummaryMap->setBinLabel(2,
"#phi", 2);
110 residualsSummaryMap->setBinLabel(3,
"1/p", 2);
111 residualsSummaryMap->setBinLabel(4,
"q", 2);
114 muonIdSummaryMap = ibooker.
book2D(
"muonIdSummaryMap",
"muonId test summary", 4, 1, 5, 5, 1, 6);
116 muonIdSummaryMap->setBinLabel(1,
"GLB DT", 1);
117 muonIdSummaryMap->setBinLabel(2,
"GLB CSC", 1);
118 muonIdSummaryMap->setBinLabel(3,
"TK DT", 1);
119 muonIdSummaryMap->setBinLabel(4,
"TK CSC", 1);
120 muonIdSummaryMap->setAxisTitle(
"tests", 2);
121 muonIdSummaryMap->setBinLabel(1,
"#assSeg", 2);
122 muonIdSummaryMap->setBinLabel(2,
"x mean", 2);
123 muonIdSummaryMap->setBinLabel(3,
"x rms", 2);
124 muonIdSummaryMap->setBinLabel(4,
"y mean", 2);
125 muonIdSummaryMap->setBinLabel(5,
"y rms", 2);
128 energySummaryMap = ibooker.
book2D(
"energySummaryMap",
"Energy deposits test summary", 3, 1, 4, 3, 1, 4);
130 energySummaryMap->setBinLabel(1,
"GLB", 1);
131 energySummaryMap->setBinLabel(2,
"TK", 1);
132 energySummaryMap->setBinLabel(3,
"STA", 1);
133 energySummaryMap->setAxisTitle(
"calorimeter tested", 2);
134 energySummaryMap->setBinLabel(1,
"ECAL", 2);
135 energySummaryMap->setBinLabel(2,
"HAD", 2);
136 energySummaryMap->setBinLabel(3,
"H0", 2);
139 multiplicitySummaryMap = ibooker.
book1D(
"multiplicitySummaryMap",
"muon multiplicity test summary", 3, 1, 4);
141 multiplicitySummaryMap->setBinLabel(1,
"GLB");
142 multiplicitySummaryMap->setBinLabel(2,
"TK");
143 multiplicitySummaryMap->setBinLabel(3,
"STA");
147 summaryReport = ibooker.
bookFloat(
"reportSummary");
149 summaryReportMap = ibooker.
book2D(
"reportSummaryMap",
"Muon Report Summary Map", 3, 1, 4, 7, 1, 8);
151 summaryReportMap->setBinLabel(1,
"GLB", 1);
152 summaryReportMap->setBinLabel(2,
"TK", 1);
153 summaryReportMap->setBinLabel(3,
"STA", 1);
154 summaryReportMap->setAxisTitle(
"test", 2);
155 summaryReportMap->setBinLabel(1,
"#chi^{2}/Df", 2);
156 summaryReportMap->setBinLabel(2,
"#eta", 2);
157 summaryReportMap->setBinLabel(3,
"#phi", 2);
158 summaryReportMap->setBinLabel(4,
"residuals", 2);
159 summaryReportMap->setBinLabel(5,
"muonId", 2);
160 summaryReportMap->setBinLabel(6,
"energyDeposits", 2);
161 summaryReportMap->setBinLabel(7,
"multiplicity", 2);
164 theSummaryContents.push_back(ibooker.
bookFloat(
"kinematics_GLB"));
165 theSummaryContents.push_back(ibooker.
bookFloat(
"muonId_GLB"));
166 theSummaryContents.push_back(ibooker.
bookFloat(
"residuals_GLB"));
167 theSummaryContents.push_back(ibooker.
bookFloat(
"GLB"));
168 theSummaryContents.push_back(ibooker.
bookFloat(
"kinematics_TK"));
169 theSummaryContents.push_back(ibooker.
bookFloat(
"muonId_TK"));
170 theSummaryContents.push_back(ibooker.
bookFloat(
"residuals_TK"));
171 theSummaryContents.push_back(ibooker.
bookFloat(
"TK"));
172 theSummaryContents.push_back(ibooker.
bookFloat(
"kinematics_STA"));
173 theSummaryContents.push_back(ibooker.
bookFloat(
"residuals_STA"));
174 theSummaryContents.push_back(ibooker.
bookFloat(
"STA"));
175 theSummaryContents.push_back(ibooker.
bookFloat(
"energyDeposits"));
176 theSummaryContents.push_back(ibooker.
bookFloat(
"multiplicity"));
180 summaryCertification = ibooker.
bookFloat(
"CertificationSummary");
181 summaryCertification->
Fill(-1);
183 summaryCertificationMap =
184 ibooker.
book2D(
"CertificationSummaryMap",
"Muon Certification Summary Map", 9, 1, 10, 7, 1, 8);
186 summaryCertificationMap->setBinLabel(1,
"GLB_Tot", 1);
187 summaryCertificationMap->setBinLabel(2,
"TK_Tot", 1);
188 summaryCertificationMap->setBinLabel(3,
"STA_tot", 1);
189 summaryCertificationMap->setBinLabel(4,
"GLB_B", 1);
190 summaryCertificationMap->setBinLabel(5,
"TK_B", 1);
191 summaryCertificationMap->setBinLabel(6,
"STA_B", 1);
192 summaryCertificationMap->setBinLabel(7,
"GLB_EC", 1);
193 summaryCertificationMap->setBinLabel(8,
"TK_EC", 1);
194 summaryCertificationMap->setBinLabel(9,
"STA_EC", 1);
195 summaryCertificationMap->setAxisTitle(
"test", 2);
196 summaryCertificationMap->setBinLabel(1,
"#chi^{2}/Df", 2);
197 summaryCertificationMap->setBinLabel(2,
"#eta", 2);
198 summaryCertificationMap->setBinLabel(3,
"#phi", 2);
199 summaryCertificationMap->setBinLabel(4,
"residuals", 2);
200 summaryCertificationMap->setBinLabel(5,
"muonId", 2);
201 summaryCertificationMap->setBinLabel(6,
"energyDeposits", 2);
202 summaryCertificationMap->setBinLabel(7,
"multiplicity", 2);
205 theCertificationContents.push_back(ibooker.
bookFloat(
"GLB_Tot"));
206 theCertificationContents.push_back(ibooker.
bookFloat(
"STA_Tot"));
207 theCertificationContents.push_back(ibooker.
bookFloat(
"TK_Tot"));
208 theCertificationContents.push_back(ibooker.
bookFloat(
"GLB_B"));
209 theCertificationContents.push_back(ibooker.
bookFloat(
"STA_B"));
210 theCertificationContents.push_back(ibooker.
bookFloat(
"TK_B"));
211 theCertificationContents.push_back(ibooker.
bookFloat(
"GLB_EC"));
212 theCertificationContents.push_back(ibooker.
bookFloat(
"STA_EC"));
213 theCertificationContents.push_back(ibooker.
bookFloat(
"TK_EC"));
215 for (
unsigned int icert = 0; icert < theCertificationContents.size(); icert++) {
216 theCertificationContents[icert]->Fill(-1);
220 for (
int xBin = 1; xBin <= 5; xBin++) {
222 kinematicsSummaryMap->Fill(xBin,
yBin, 1);
225 chi2TestSummaryMap->Fill(xBin,
yBin, 1);
228 for (
int xBin = 1; xBin <= residualsSummaryMap->getNbinsX(); xBin++) {
229 for (
int yBin = 1;
yBin <= residualsSummaryMap->getNbinsY();
yBin++) {
230 residualsSummaryMap->Fill(xBin,
yBin, 1);
233 residualsSummaryMap->setBinContent(4, 4, 1);
235 for (
int xBin = 1; xBin <= muonIdSummaryMap->getNbinsX(); xBin++) {
236 for (
int yBin = 1;
yBin <= muonIdSummaryMap->getNbinsY();
yBin++) {
237 muonIdSummaryMap->Fill(xBin,
yBin, 1);
240 for (
int xBin = 1; xBin <= 3; xBin++) {
242 energySummaryMap->Fill(xBin,
yBin, 1);
245 for (
int xBin = 1; xBin <= 3; xBin++) {
246 multiplicitySummaryMap->Fill(xBin, 1);
248 for (
int xBin = 1; xBin <= 3; xBin++) {
250 summaryReportMap->Fill(xBin,
yBin, 1);
253 for (
int xBin = 1; xBin <= 9; xBin++) {
255 summaryCertificationMap->Fill(xBin,
yBin, 1);
262 doKinematicsTests(igetter,
"GlbMuon_Glb_", 1);
263 doKinematicsTests(igetter,
"GlbMuon_Tk_", 2);
264 doKinematicsTests(igetter,
"GlbMuon_Sta_", 3);
265 doKinematicsTests(igetter,
"TkMuon_", 4);
266 doKinematicsTests(igetter,
"StaMuon_", 5);
269 doResidualsTests(igetter,
"TkGlb",
"eta", 1);
270 doResidualsTests(igetter,
"GlbSta",
"eta", 2);
271 doResidualsTests(igetter,
"TkSta",
"eta", 3);
272 doResidualsTests(igetter,
"TkGlb",
"phi", 1);
273 doResidualsTests(igetter,
"GlbSta",
"phi", 2);
274 doResidualsTests(igetter,
"TkSta",
"phi", 3);
275 doResidualsTests(igetter,
"TkGlb",
"oneOverp", 1);
276 doResidualsTests(igetter,
"GlbSta",
"oneOverp", 2);
277 doResidualsTests(igetter,
"TkSta",
"oneOverp", 3);
278 doResidualsTests(igetter,
"GlbMuon",
"qComparison", -1);
281 doMuonIDTests(igetter);
284 doEnergyTests(igetter,
"ecalS9PointingMuDepositedEnergy_",
"Glb_muons", 1);
285 doEnergyTests(igetter,
"hadS9PointingMuDepositedEnergy_",
"Glb_muons", 1);
286 doEnergyTests(igetter,
"hoS9PointingMuDepositedEnergy_",
"Glb_muons", 1);
287 doEnergyTests(igetter,
"ecalS9PointingMuDepositedEnergy_",
"Tk_muons", 2);
288 doEnergyTests(igetter,
"hadS9PointingMuDepositedEnergy_",
"Tk_muons", 2);
289 doEnergyTests(igetter,
"hoS9PointingMuDepositedEnergy_",
"Tk_muons", 2);
290 doEnergyTests(igetter,
"ecalS9PointingMuDepositedEnergy_",
"Sta_muons", 3);
291 doEnergyTests(igetter,
"hadS9PointingMuDepositedEnergy_",
"Sta_muons", 3);
292 doEnergyTests(igetter,
"hoS9PointingMuDepositedEnergy_",
"Sta_muons", 3);
295 doMultiplicityTests(igetter);
300 double residualsSummary = 0;
303 for (
int i = 3;
i <= residualsSummaryMap->getNbinsX();
i++)
304 for (
int j = 1;
j <= residualsSummaryMap->getNbinsY();
j++)
305 residualsSummary += residualsSummaryMap->getBinContent(
i,
j);
306 residualsSummary /= 2 * residualsSummaryMap->getNbinsY();
307 summaryReportMap->setBinContent(1, 4, residualsSummary);
309 residualsSummary = 0;
310 for (
int i = 1;
i <= 1;
i++)
311 for (
int j = 1;
j <= residualsSummaryMap->getNbinsY();
j++)
312 residualsSummary += residualsSummaryMap->getBinContent(
i,
j);
313 residualsSummary /= 1 * residualsSummaryMap->getNbinsY();
314 summaryReportMap->setBinContent(2, 4, residualsSummary);
316 residualsSummary = 0;
317 for (
int i = 2;
i <= 2;
i++)
318 for (
int j = 1;
j <= residualsSummaryMap->getNbinsY();
j++)
319 residualsSummary += residualsSummaryMap->getBinContent(
i,
j);
320 residualsSummary /= 1 * residualsSummaryMap->getNbinsY();
321 summaryReportMap->setBinContent(3, 4, residualsSummary);
327 for (
int i = 1;
i <= 2;
i++)
328 for (
int j = 1;
j <= 5;
j++) {
329 if (
j == 3 ||
j == 5)
331 idtest += muonIdSummaryMap->getBinContent(
i,
j);
335 summaryReportMap->setBinContent(1, 5, idtest);
337 for (
int i = 3;
i <= 4;
i++)
338 for (
int j = 1;
j <= 5;
j++) {
339 if (
j == 3 ||
j == 5)
341 idtest += muonIdSummaryMap->getBinContent(
i,
j);
345 summaryReportMap->setBinContent(2, 5, idtest);
346 summaryReportMap->setBinContent(3, 5, -1.0 / 6.0);
349 summaryReportMap->setBinContent(
350 1, 6,
double(energySummaryMap->getBinContent(1, 1) + energySummaryMap->getBinContent(1, 2)) / 2.0);
351 summaryReportMap->setBinContent(
352 2, 6,
double(energySummaryMap->getBinContent(2, 1) + energySummaryMap->getBinContent(2, 2)) / 2.0);
353 summaryReportMap->setBinContent(
354 3, 6,
double(energySummaryMap->getBinContent(3, 1) + energySummaryMap->getBinContent(3, 2)) / 2.0);
355 summaryReportMap->setBinContent(1, 7, multiplicitySummaryMap->getBinContent(1));
356 summaryReportMap->setBinContent(2, 7, multiplicitySummaryMap->getBinContent(2));
357 summaryReportMap->setBinContent(3, 7, multiplicitySummaryMap->getBinContent(3));
359 double kinematics_GLB = double(summaryReportMap->getBinContent(1, 1) + summaryReportMap->getBinContent(1, 2) +
360 summaryReportMap->getBinContent(1, 3)) /
362 theSummaryContents[0]->Fill(kinematics_GLB);
363 double muonId_GLB = double(summaryReportMap->getBinContent(1, 5));
364 theSummaryContents[1]->Fill(muonId_GLB);
365 double residuals_GLB = double(summaryReportMap->getBinContent(1, 4));
366 theSummaryContents[2]->Fill(residuals_GLB);
367 double GLB = (kinematics_GLB + muonId_GLB + residuals_GLB) / 3.0;
368 theSummaryContents[3]->Fill(GLB);
370 double kinematics_TK = double(summaryReportMap->getBinContent(2, 1) + summaryReportMap->getBinContent(2, 2) +
371 summaryReportMap->getBinContent(2, 3)) /
373 theSummaryContents[4]->Fill(kinematics_TK);
374 double muonId_TK = double(summaryReportMap->getBinContent(2, 5));
375 theSummaryContents[5]->Fill(muonId_TK);
376 double residuals_TK = double(summaryReportMap->getBinContent(2, 4));
377 theSummaryContents[6]->Fill(residuals_TK);
378 double TK = double(kinematics_TK + muonId_TK + residuals_TK) / 3.0;
379 theSummaryContents[7]->Fill(TK);
381 double kinematics_STA = double(summaryReportMap->getBinContent(3, 1) + summaryReportMap->getBinContent(3, 2) +
382 summaryReportMap->getBinContent(3, 3)) /
384 theSummaryContents[8]->Fill(kinematics_STA);
385 double residuals_STA = double(summaryReportMap->getBinContent(3, 4));
386 theSummaryContents[9]->Fill(residuals_STA);
387 double STA = double(kinematics_STA + residuals_STA) / 2.0;
388 theSummaryContents[10]->Fill(STA);
389 double energyDeposits = double(summaryReportMap->getBinContent(1, 6) + summaryReportMap->getBinContent(2, 6) +
390 summaryReportMap->getBinContent(3, 6)) /
392 theSummaryContents[11]->Fill(energyDeposits);
393 double multiplicity = double(summaryReportMap->getBinContent(1, 7) + summaryReportMap->getBinContent(2, 7) +
394 summaryReportMap->getBinContent(3, 7)) /
396 theSummaryContents[12]->Fill(multiplicity);
398 summaryReport->Fill((GLB + TK + STA + energyDeposits + multiplicity) / 5.0);
401 float muonIDsummary = 0;
406 muonIDsummary += muonIdSummaryMap->getBinContent(1, 2);
407 muonIDsummary += muonIdSummaryMap->getBinContent(1, 4);
408 summaryCertificationMap->setBinContent(4, 5, muonIDsummary / 2.);
415 muonIDsummary += muonIdSummaryMap->getBinContent(2, 2);
416 muonIDsummary += muonIdSummaryMap->getBinContent(2, 4);
417 summaryCertificationMap->setBinContent(7, 5, muonIDsummary / 2.);
424 muonIDsummary += muonIdSummaryMap->getBinContent(3, 2);
425 muonIDsummary += muonIdSummaryMap->getBinContent(3, 4);
426 summaryCertificationMap->setBinContent(5, 5, muonIDsummary / 2.);
433 muonIDsummary += muonIdSummaryMap->getBinContent(4, 2);
434 muonIDsummary += muonIdSummaryMap->getBinContent(4, 4);
435 summaryCertificationMap->setBinContent(8, 5, muonIDsummary / 2.);
437 double muonId_GLB_B = double(summaryCertificationMap->getBinContent(4, 5));
438 theCertificationContents[3]->Fill(muonId_GLB_B);
439 double muonId_GLB_EC = double(summaryCertificationMap->getBinContent(7, 5));
440 theCertificationContents[6]->Fill(muonId_GLB_EC);
442 double muonId_TK_B = double(summaryCertificationMap->getBinContent(5, 5));
443 theCertificationContents[5]->Fill(muonId_TK_B);
444 double muonId_TK_EC = double(summaryCertificationMap->getBinContent(8, 5));
445 theCertificationContents[8]->Fill(muonId_TK_EC);
450 string path =
"Muons/MuonRecoAnalyzer/" + muonType +
"chi2OverDf";
454 TH1F *chi2Histo_root = chi2Histo->
getTH1F();
455 if (chi2Histo_root->GetEntries() > 20) {
457 LogTrace(
metname) <<
"chi2 kin test based on fraction for " << muonType << endl;
458 int maxBin = chi2Histo_root->GetMaximumBin();
459 if (chi2Histo_root->Integral(maxBin + 1, chi2Histo_root->GetNbinsX()) != 0) {
460 double fraction = double(chi2Histo_root->Integral(1, maxBin)) /
461 double(chi2Histo_root->Integral(maxBin + 1, chi2Histo_root->GetNbinsX()));
462 LogTrace(
metname) <<
"chi2 fraction for " << muonType <<
" : " << fraction <<
" must be within "
463 << chi2Fraction - chi2Spread <<
"," << chi2Fraction + chi2Spread << endl;
464 if (fraction > (chi2Fraction - chi2Spread) && fraction < (chi2Fraction + chi2Spread))
465 kinematicsSummaryMap->setBinContent(bin, 1, 1);
467 kinematicsSummaryMap->setBinContent(bin, 1, 0);
470 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Chi2 Kin not performed for " << muonType
471 <<
" because # entries < 20 ";
476 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"eta";
480 TH1F *etaHisto_root = etaHisto->
getTH1F();
481 if (etaHisto_root->GetEntries() > 20) {
483 LogTrace(
metname) <<
"eta kin test based on fraction for " << muonType << endl;
485 (etaHisto_root->GetXaxis()->GetXmax() - etaHisto_root->GetXaxis()->GetXmin()) / etaHisto_root->GetNbinsX();
486 int binZero = int((0 - etaHisto_root->GetXaxis()->GetXmin()) / binSize);
487 if (etaHisto_root->Integral(1, binZero - 1) != 0 &&
488 etaHisto_root->Integral(binZero, etaHisto_root->GetNbinsX()) != 0) {
489 double symmetryFactor = double(etaHisto_root->Integral(1, binZero - 1)) /
490 double(etaHisto_root->Integral(binZero, etaHisto_root->GetNbinsX()));
491 double errSymmetryFactor =
492 symmetryFactor *
sqrt(1.0 /
double(etaHisto_root->Integral(1, binZero - 1)) +
493 1.0 /
double(etaHisto_root->Integral(binZero, etaHisto_root->GetNbinsX())));
494 LogTrace(
metname) <<
"eta symmetryFactor for " << muonType <<
" : " << symmetryFactor
495 <<
" (expected :" << etaExpected <<
")" << endl;
496 LogTrace(
metname) <<
"eta errSymmetryFactor for " << muonType <<
" : " << errSymmetryFactor << endl;
498 if ((symmetryFactor - etaExpected) > 0)
499 tParameter = double(symmetryFactor - etaExpected) / errSymmetryFactor;
501 tParameter = double(-symmetryFactor + etaExpected) / errSymmetryFactor;
502 LogTrace(
metname) <<
"eta tParameter for " << muonType <<
" : " << tParameter <<
" (expected < 1.95)" << endl;
503 if (tParameter < 1.95)
504 kinematicsSummaryMap->setBinContent(bin, 2, 1);
506 kinematicsSummaryMap->setBinContent(bin, 2, 0);
510 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Eta Kin not performed for " << muonType
511 <<
" because # entries < 20 ";
516 path =
"Muons/MuonRecoAnalyzer/" + muonType +
"phi";
520 TH1F *phiHisto_root = phiHisto->
getTH1F();
521 if (phiHisto_root->GetEntries() > 20) {
523 LogTrace(
metname) <<
"phi kin test based on fraction for " << muonType << endl;
525 (phiHisto_root->GetXaxis()->GetXmax() - phiHisto_root->GetXaxis()->GetXmin()) / phiHisto_root->GetNbinsX();
526 int binZero = int((0 - phiHisto_root->GetXaxis()->GetXmin()) / binSize);
527 if (phiHisto_root->Integral(binZero + 1, phiHisto_root->GetNbinsX()) != 0 &&
528 phiHisto_root->Integral(1, binZero) != 0) {
529 double symmetryFactor = double(phiHisto_root->Integral(binZero + 1, phiHisto_root->GetNbinsX())) /
530 double(phiHisto_root->Integral(1, binZero));
531 double errSymmetryFactor =
532 symmetryFactor *
sqrt(1.0 /
double(phiHisto_root->Integral(binZero + 1, phiHisto_root->GetNbinsX())) +
533 1.0 / double(phiHisto_root->Integral(1, binZero)));
534 LogTrace(
metname) <<
"phi symmetryFactor for " << muonType <<
" : " << symmetryFactor
535 <<
"(phi expected :" << phiExpected <<
")" << endl;
536 LogTrace(
metname) <<
"phi errSymmetryFactor for " << muonType <<
" : " << errSymmetryFactor << endl;
538 if ((symmetryFactor - phiExpected) > 0)
539 tParameter = double(symmetryFactor - phiExpected) / errSymmetryFactor;
541 tParameter = double(-symmetryFactor + phiExpected) / errSymmetryFactor;
542 LogTrace(
metname) <<
"phi tParameter for " << muonType <<
" : " << tParameter <<
" (expected < 1.95)" << endl;
543 if (tParameter < 1.95)
544 kinematicsSummaryMap->setBinContent(bin, 3, 1);
546 kinematicsSummaryMap->setBinContent(bin, 3, 0);
550 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Phi Kin not performed for " << muonType
551 <<
" because # entries < 20 ";
557 string type,
string parameter,
MonitorElement *Histo,
float &
mean,
float &mean_err,
float &sigma,
float &sigma_err) {
559 float statMean = Histo->
getMean(1);
560 float statSigma = Histo->
getRMS(1);
561 TH1F *histo_root = Histo->
getTH1F();
562 if (histo_root->GetEntries() > 20) {
563 TF1 *gfit =
new TF1(
"Gaussian",
"gaus", (statMean - (2 * statSigma)), (statMean + (2 * statSigma)));
565 histo_root->Fit(gfit,
"Q0");
567 edm::LogError(
metname) <<
"[MuonTestSummary]: Exception when fitting Res_" << type <<
"_" << parameter;
575 mean = gfit->GetParameter(1);
576 mean_err = gfit->GetParErrors()[2];
577 sigma = gfit->GetParameter(2);
578 sigma_err = gfit->GetParErrors()[2];
579 LogTrace(
metname) <<
"Gaussian fit mean: " << mean <<
" +- " << mean_err <<
" for " << type <<
"_" << parameter
581 LogTrace(
metname) <<
"Gaussina fit sigma: " << sigma <<
" +- " << sigma_err <<
" for " << type <<
"_" << parameter
585 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Res_" << type <<
"_" << parameter
586 <<
" not performed because # entries < 20 ";
596 if (type !=
"GlbMuon") {
597 string path =
"Muons/MuonRecoAnalyzer/Res_" + type +
"_" + parameter;
603 float sigma_err = -1;
605 if (residualsHisto) {
606 LogTrace(
metname) <<
"[MuonTestSummary]: Starting Gaussian fit for Test of Res_" << type <<
"_" << parameter
608 GaussFit(type, parameter, residualsHisto, mean, mean_err, sigma, sigma_err);
610 if (sigma != -1 && parameter ==
"eta" && type ==
"TkGlb") {
611 if (sigma - sigma_err < resEtaSpread_tkGlb)
612 residualsSummaryMap->setBinContent(bin, 1, 1);
614 residualsSummaryMap->setBinContent(bin, 1, 0);
616 if (sigma != -1 && parameter ==
"eta" && (type ==
"GlbSta" || type ==
"TkSta")) {
617 if (sigma - sigma_err < resEtaSpread_glbSta)
618 residualsSummaryMap->setBinContent(bin, 1, 1);
620 residualsSummaryMap->setBinContent(bin, 1, 0);
622 if (sigma != -1 && parameter ==
"phi" && type ==
"TkGlb") {
623 if (sigma - sigma_err < resPhiSpread_tkGlb)
624 residualsSummaryMap->setBinContent(bin, 2, 1);
626 residualsSummaryMap->setBinContent(bin, 2, 0);
628 if (sigma != -1 && parameter ==
"phi" && (type ==
"GlbSta" || type ==
"TkSta")) {
629 if (sigma - sigma_err < resPhiSpread_glbSta)
630 residualsSummaryMap->setBinContent(bin, 2, 1);
632 residualsSummaryMap->setBinContent(bin, 2, 0);
634 if (sigma != -1 && parameter ==
"oneOverp" && type ==
"TkGlb") {
635 if (sigma - sigma_err < resOneOvPSpread_tkGlb)
636 residualsSummaryMap->setBinContent(bin, 3, 1);
638 residualsSummaryMap->setBinContent(bin, 3, 0);
640 if (sigma != -1 && parameter ==
"oneOverp" && (type ==
"GlbSta" || type ==
"TkSta")) {
641 if (sigma - sigma_err < resOneOvPSpread_glbSta)
642 residualsSummaryMap->setBinContent(bin, 3, 1);
644 residualsSummaryMap->setBinContent(bin, 3, 0);
649 if (type ==
"TkSta") {
651 string path =
"Muons/MuonRecoAnalyzer/Pull_" + type +
"_" + parameter;
655 LogTrace(
metname) <<
"[MuonTestSummary]: Starting Gaussian fit for Test of Pull_" << type <<
"_" << parameter
657 GaussFit(type, parameter, pullHisto, mean, mean_err, sigma, sigma_err);
659 if (sigma != -1 && parameter ==
"eta") {
660 if (sigma - sigma_err < pullEtaSpread)
661 residualsSummaryMap->setBinContent(4, 1, 1);
663 residualsSummaryMap->setBinContent(4, 1, 0);
665 if (sigma != -1 && parameter ==
"phi") {
666 if (sigma - sigma_err < pullPhiSpread)
667 residualsSummaryMap->setBinContent(4, 2, 1);
669 residualsSummaryMap->setBinContent(4, 2, 0);
671 if (sigma != -1 && parameter ==
"oneOverp") {
672 if (sigma - sigma_err < pullOneOvPSpread)
673 residualsSummaryMap->setBinContent(4, 3, 1);
675 residualsSummaryMap->setBinContent(4, 3, 0);
684 string path =
"Muons/MuonRecoAnalyzer/" + type +
"_" + parameter;
687 if (residualsHisto) {
688 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Charge Comparison " << type <<
"_" << parameter << endl;
696 resChargeLimit_tkGlb)
697 residualsSummaryMap->setBinContent(1, 4, 1);
699 residualsSummaryMap->setBinContent(1, 4, 0);
708 resChargeLimit_glbSta)
709 residualsSummaryMap->setBinContent(2, 4, 1);
711 residualsSummaryMap->setBinContent(2, 4, 0);
720 resChargeLimit_tkSta)
721 residualsSummaryMap->setBinContent(3, 4, 1);
723 residualsSummaryMap->setBinContent(3, 4, 0);
730 vector<string> muType;
731 muType.push_back(
"GlobalMuons");
732 muType.push_back(
"TrackerMuons");
734 for (
int i = 0;
i <= 1;
i++) {
736 string path =
"Muons/MuonIdDQM/" + muType[
i] +
"/hNumMatches";
740 TH1F *matchesHisto_root = matchesHisto->
getTH1F();
741 if (matchesHisto_root->GetMaximumBin() >= numMatchedExpected_min &&
742 matchesHisto_root->GetMaximumBin() <= numMatchedExpected_max)
743 muonIdSummaryMap->setBinContent(
i + 1, 1, 1);
745 muonIdSummaryMap->setBinContent(
i + 1, 1, 0);
749 double numOneSegm_dt = 0;
750 int numHistos_dt = 0;
751 int numHistos_csc = 0;
752 MonitorElement *DT1Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hDT1NumSegments");
758 MonitorElement *DT2Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hDT2NumSegments");
764 MonitorElement *DT3Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hDT3NumSegments");
770 MonitorElement *DT4Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hDT4NumSegments");
776 double fraction_dt = 0;
777 if (numOneSegm_dt != 0) {
778 fraction_dt = numOneSegm_dt / double(numHistos_dt);
779 LogTrace(
metname) <<
"fraction_dt: " << fraction_dt <<
" for " << muType[
i] << endl;
782 double numOneSegm_csc = 0;
783 MonitorElement *CSC1Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hCSC1NumSegments");
789 MonitorElement *CSC2Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hCSC2NumSegments");
795 MonitorElement *CSC3Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hCSC3NumSegments");
801 MonitorElement *CSC4Histo = igetter.
get(
"Muons/MuonIdDQM/" + muType[
i] +
"/hCSC4NumSegments");
807 double fraction_csc = 0;
808 if (numOneSegm_csc != 0) {
809 fraction_csc = numOneSegm_csc / double(numHistos_csc);
810 LogTrace(
metname) <<
"fraction_csc: " << fraction_csc <<
" for " << muType[
i] << endl;
815 if (fraction_dt > matchesFractionDt_min && fraction_dt < matchesFractionDt_max)
816 muonIdSummaryMap->setBinContent(2 *
i + 1, 1, 1);
818 muonIdSummaryMap->setBinContent(2 *
i + 1, 1, 0);
820 if (fraction_csc > matchesFractionCsc_min && fraction_csc < matchesFractionCsc_max)
821 muonIdSummaryMap->setBinContent(2 *
i + 2, 1, 1);
823 muonIdSummaryMap->setBinContent(2 *
i + 2, 1, 0);
828 vector<string> DTXresHistos, DTYresHistos, CSCXresHistos, CSCYresHistos;
829 DTXresHistos.push_back(
"hDT1Pullx");
830 DTXresHistos.push_back(
"hDT2Pullx");
831 DTXresHistos.push_back(
"hDT3Pullx");
832 DTXresHistos.push_back(
"hDT4Pullx");
834 DTYresHistos.push_back(
"hDT1Pully");
835 DTYresHistos.push_back(
"hDT2Pully");
836 DTYresHistos.push_back(
"hDT3Pully");
838 CSCXresHistos.push_back(
"hCSC1Pullx");
839 CSCXresHistos.push_back(
"hCSC2Pullx");
840 CSCXresHistos.push_back(
"hCSC3Pullx");
841 CSCXresHistos.push_back(
"hCSC4Pullx");
843 CSCYresHistos.push_back(
"hCSC1Pully");
844 CSCYresHistos.push_back(
"hCSC2Pully");
845 CSCYresHistos.push_back(
"hCSC3Pully");
846 CSCYresHistos.push_back(
"hCSC4Pully");
848 int numPlot_dtX, numPlot_dtY, numPlot_cscX, numPlot_cscY;
849 double dtSigmaX, dtSigmaY, cscSigmaX, cscSigmaY;
850 double dtSigmaX_err, dtSigmaY_err, cscSigmaX_err, cscSigmaY_err;
851 double dtMeanX, dtMeanY, cscMeanX, cscMeanY;
852 double dtMeanX_err, dtMeanY_err, cscMeanX_err, cscMeanY_err;
854 igetter, muType[
i], DTXresHistos, numPlot_dtX, dtMeanX, dtMeanX_err, dtSigmaX, dtSigmaX_err);
856 igetter, muType[i], DTYresHistos, numPlot_dtY, dtMeanY, dtMeanY_err, dtSigmaY, dtSigmaY_err);
858 igetter, muType[i], CSCXresHistos, numPlot_cscX, cscMeanX, cscMeanX_err, cscSigmaX, cscSigmaX_err);
860 igetter, muType[i], CSCYresHistos, numPlot_cscY, cscMeanY, cscMeanY_err, cscSigmaY, cscSigmaY_err);
862 LogTrace(
metname) <<
"DT mean must be between: " << resSegmTrack_mean_min <<
" and " << resSegmTrack_mean_max
864 LogTrace(
metname) <<
"DT rms must be between: " << resSegmTrack_rms_min <<
" and " << resSegmTrack_rms_max << endl;
865 LogTrace(
metname) <<
"DT X residual " << muType[
i] <<
" mean: " << dtMeanX <<
" +- " << dtMeanX_err
866 <<
", sigma: " << dtSigmaX <<
" +- " << dtSigmaX_err << endl;
867 LogTrace(
metname) <<
"DT Y residual " << muType[
i] <<
" mean: " << dtMeanY <<
" +- " << dtMeanY_err
868 <<
", sigma: " << dtSigmaY <<
" +- " << dtSigmaY_err << endl;
869 LogTrace(
metname) <<
"CSC X residual " << muType[
i] <<
" mean: " << cscMeanX <<
" +- " << cscMeanX_err
870 <<
", sigma: " << cscSigmaX <<
" +- " << cscSigmaX_err << endl;
871 LogTrace(
metname) <<
"CSC Y residual " << muType[
i] <<
" mean: " << cscMeanY <<
" +- " << cscMeanY_err
872 <<
", sigma: " << cscSigmaY <<
" +- " << cscSigmaY_err << endl;
876 if (numPlot_dtX > 0) {
877 if (dtMeanX + nsig * dtMeanX_err > resSegmTrack_mean_min && dtMeanX - nsig * dtMeanX_err < resSegmTrack_mean_max)
878 muonIdSummaryMap->setBinContent(2 * i + 1, 2, 1);
880 muonIdSummaryMap->setBinContent(2 * i + 1, 2, 0);
882 if (dtSigmaX + nsig * dtSigmaX_err > resSegmTrack_rms_min &&
883 dtSigmaX - nsig * dtSigmaX_err < resSegmTrack_rms_max)
884 muonIdSummaryMap->setBinContent(2 * i + 1, 3, 1);
886 muonIdSummaryMap->setBinContent(2 * i + 1, 3, 0);
888 if (numPlot_dtY > 0) {
889 if (dtMeanY + nsig * dtMeanY_err > resSegmTrack_mean_min && dtMeanY - nsig * dtMeanY_err < resSegmTrack_mean_max)
890 muonIdSummaryMap->setBinContent(2 * i + 1, 4, 1);
892 muonIdSummaryMap->setBinContent(2 * i + 1, 4, 0);
894 if (dtSigmaY + nsig * dtSigmaY_err > resSegmTrack_rms_min &&
895 dtSigmaY - nsig * dtSigmaX_err < resSegmTrack_rms_max)
896 muonIdSummaryMap->setBinContent(2 * i + 1, 5, 1);
898 muonIdSummaryMap->setBinContent(2 * i + 1, 5, 0);
901 if (numPlot_cscX > 0) {
902 if (cscMeanX + nsig * cscMeanX_err > resSegmTrack_mean_min &&
903 cscMeanX - nsig * cscMeanX_err < resSegmTrack_mean_max)
904 muonIdSummaryMap->setBinContent(2 * i + 2, 2, 1);
906 muonIdSummaryMap->setBinContent(2 * i + 2, 2, 0);
908 if (cscSigmaX + nsig * cscSigmaX_err > resSegmTrack_rms_min &&
909 cscSigmaX - nsig * cscSigmaX_err < resSegmTrack_rms_max)
910 muonIdSummaryMap->setBinContent(2 * i + 2, 3, 1);
912 muonIdSummaryMap->setBinContent(2 * i + 2, 3, 0);
914 if (numPlot_cscY > 0) {
915 if (cscMeanY + nsig * cscMeanY_err > resSegmTrack_mean_min &&
916 cscMeanY - nsig * cscMeanY_err < resSegmTrack_mean_max)
917 muonIdSummaryMap->setBinContent(2 * i + 2, 4, 1);
919 muonIdSummaryMap->setBinContent(2 * i + 2, 4, 0);
921 if (cscSigmaY + nsig * cscSigmaY_err > resSegmTrack_rms_min &&
922 cscSigmaY - nsig * cscSigmaY_err < resSegmTrack_rms_max)
923 muonIdSummaryMap->setBinContent(2 * i + 2, 5, 1);
925 muonIdSummaryMap->setBinContent(2 * i + 2, 5, 0);
934 const std::vector<std::string> &resHistos,
949 TH1F *resHisto_root = resHisto->
getTH1F();
950 if (resHisto_root->GetEntries() < 20) {
952 <<
" not performed because # entries < 20 ";
960 float mean = resHisto_root->GetBinLowEdge(resHisto_root->GetMaximumBin());
961 TF1 *gfit =
new TF1(
"Gaussian",
"gaus", mean - 3, mean + 3);
964 resHisto_root->Fit(gfit,
"Q0");
970 double mean = gfit->GetParameter(1);
971 double mean_err = gfit->GetParError(1);
972 double sigma = gfit->GetParameter(2);
973 double sigma_err = gfit->GetParError(2);
974 LogTrace(
metname) <<
"meanRes: " << mean <<
" +- " << mean_err <<
" for " << resHistos[
name] << endl;
975 LogTrace(
metname) <<
"sigmaRes: " << sigma <<
" +- " << sigma_err <<
" for " << resHistos[
name] << endl;
978 Mean_err += mean_err * mean_err;
980 Sigma_err += sigma_err * sigma_err;
993 Mean_err =
sqrt(Mean_err);
997 Sigma_err =
sqrt(Sigma_err);
998 Sigma_err /= numPlot;
1005 string path =
"Muons/MuonEnergyDepositAnalyzer/" + histname + muonType;
1007 Double_t hPeak = -1, hFWHM = -1;
1009 TH1F *energyHisto_root = energyHisto->
getTH1F();
1012 Double_t fitRange[2];
1013 Double_t startValues[4], parlimitslo[4], parlimitshi[4], fitPar[4], fitParErr[4];
1016 if (histname ==
"ecalS9PointingMuDepositedEnergy_") {
1020 startValues[0] = 0.036;
1021 startValues[1] = 0.193;
1022 startValues[2] = 110.0;
1023 startValues[3] = 0.06;
1024 parlimitslo[0] = 0.0;
1025 parlimitslo[1] = 0.;
1026 parlimitslo[2] = 1.0;
1027 parlimitslo[3] = 0.;
1028 parlimitshi[0] = 0.05;
1029 parlimitshi[1] = 0.5;
1030 parlimitshi[2] = 80000.0;
1031 parlimitshi[3] = 0.1;
1035 TF1 *
fit = langaufit(
1036 energyHisto_root, fitRange, startValues, parlimitslo, parlimitshi, fitPar, fitParErr, &chisqr, &ndf);
1038 langaupro(fitPar, hPeak, hFWHM);
1039 LogTrace(
metname) <<
"hPeak from langau fit: " << hPeak <<
" for: " << histname + muonType << endl;
1040 LogTrace(
metname) <<
"hFWHM from langau fit: " << hFWHM <<
" for: " << histname + muonType << endl;
1044 if (histname ==
"hadS9PointingMuDepositedEnergy_") {
1048 startValues[0] = 2.0;
1049 startValues[1] = 2.4;
1050 startValues[2] = 110.0;
1051 startValues[3] = 4.0;
1052 parlimitslo[0] = 0.0;
1053 parlimitslo[1] = 0.;
1054 parlimitslo[2] = 1.0;
1055 parlimitslo[3] = 0.;
1056 parlimitshi[0] = 4.0;
1057 parlimitshi[1] = 4.0;
1058 parlimitshi[2] = 80000.0;
1059 parlimitshi[3] = 8.0;
1063 TF1 *
fit = langaufit(
1064 energyHisto_root, fitRange, startValues, parlimitslo, parlimitshi, fitPar, fitParErr, &chisqr, &ndf);
1066 langaupro(fitPar, hPeak, hFWHM);
1067 LogTrace(
metname) <<
"hPeak from langau fit: " << hPeak <<
" for: " << histname + muonType << endl;
1068 LogTrace(
metname) <<
"hFWHM from langau fit: " << hFWHM <<
" for: " << histname + muonType << endl;
1072 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Energy for " << histname + muonType
1073 <<
" not performed because # entries < 20 ";
1077 if (histname ==
"ecalS9PointingMuDepositedEnergy_" && hPeak > expPeakEcalS9_min && hPeak < expPeakEcalS9_max)
1078 energySummaryMap->setBinContent(binNumber, 1, 1);
1079 if (histname ==
"ecalS9PointingMuDepositedEnergy_" && (hPeak != -1) &&
1080 !(hPeak > expPeakEcalS9_min && hPeak < expPeakEcalS9_max))
1081 energySummaryMap->setBinContent(binNumber, 1, 0);
1083 if (histname ==
"hadS9PointingMuDepositedEnergy_" && hPeak > expPeakHadS9_min && hPeak < expPeakHadS9_max)
1084 energySummaryMap->setBinContent(binNumber, 2, 1);
1085 if (histname ==
"hadS9PointingMuDepositedEnergy_" && (hPeak != -1) &&
1086 !(hPeak > expPeakHadS9_min && hPeak < expPeakHadS9_max))
1087 energySummaryMap->setBinContent(binNumber, 2, 0);
1092 MonitorElement *multiplicityHisto = igetter.
get(
"Muons/MuonRecoAnalyzer/muReco");
1094 if (multiplicityHisto) {
1098 LogTrace(
metname) <<
"multiplicity_GLB: " << multiplicity_GLB <<
" ExpMultiplicityGlb_min "
1099 << expMultiplicityGlb_min <<
" ExpMultiplicityGlb_max " << expMultiplicityGlb_max << endl;
1102 LogTrace(
metname) <<
"multiplicity_TK: " << multiplicity_TK <<
" ExpMultiplicityTk_min " << expMultiplicityTk_min
1103 <<
" ExpMultiplicityTk_max " << expMultiplicityTk_max << endl;
1106 LogTrace(
metname) <<
"multiplicity_STA: " << multiplicity_STA <<
" ExpMultiplicitySta_min "
1107 << expMultiplicitySta_min <<
" ExpMultiplicitySta_max " << expMultiplicitySta_max << endl;
1109 if (multiplicity_GLB > expMultiplicityGlb_min && multiplicity_GLB < expMultiplicityGlb_max)
1110 multiplicitySummaryMap->setBinContent(1, 1);
1112 multiplicitySummaryMap->setBinContent(1, 0);
1114 if (multiplicity_TK > expMultiplicityTk_min && multiplicity_TK < expMultiplicityTk_max)
1115 multiplicitySummaryMap->setBinContent(2, 1);
1117 multiplicitySummaryMap->setBinContent(2, 0);
1119 if (multiplicity_STA > expMultiplicitySta_min && multiplicity_STA < expMultiplicitySta_max)
1120 multiplicitySummaryMap->setBinContent(3, 1);
1122 multiplicitySummaryMap->setBinContent(3, 0);
1124 LogTrace(
metname) <<
"[MuonTestSummary]: Test of Multiplicity not performed because # entries < 20 ";
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
virtual void setCurrentFolder(std::string const &fullpath)
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)
constexpr unsigned int maxBin
const std::string metname
virtual TH1F * getTH1F() const
void doMultiplicityTests(DQMStore::IGetter &)
Log< level::Error, false > LogError
void doMuonIDTests(DQMStore::IGetter &)
virtual double getEntries() const
get # of entries
virtual MonitorElement * get(std::string const &fullpath) const
virtual double getBinContent(int binx) const
get content of bin (1-D)
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
~MuonTestSummary() override
Destructor.
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
T getParameter(std::string const &) const
void doKinematicsTests(DQMStore::IGetter &, std::string, int)
test operations
void doEnergyTests(DQMStore::IGetter &, std::string nameHisto, std::string muonType, int bin)
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 * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
MuonTestSummary(const edm::ParameterSet &ps)
Constructor.
void doResidualsTests(DQMStore::IGetter &, std::string, std::string, int)
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)