55 prescaleFactor =
parameters.getUntrackedParameter<
int>(
"diagnosticPrescale", 1);
57 percentual =
parameters.getUntrackedParameter<
int>(
"BadSLpercentual", 10);
68 edm::LogVerbatim (
"resolution") <<
"DTResolutionTest: analyzed " << nevents <<
" events";
93 vector<const DTChamber*>
chambers = muonGeom->chambers();
94 for(vector<const DTChamber*>::const_iterator
chamber = chambers.begin();
103 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: End of LS transition, performing the DQM client operation";
109 if ( nLumiSegs%prescaleFactor != 0 )
return;
111 for(map<int, MonitorElement*> ::const_iterator
histo = wheelMeanHistos.begin();
112 histo != wheelMeanHistos.end();
114 (*histo).second->Reset();
116 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
117 for(map<int, MonitorElement*> ::const_iterator
histo = wheelSigmaHistos.begin();
118 histo != wheelSigmaHistos.end();
120 (*histo).second->Reset();
123 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
124 for(map<int, MonitorElement*> ::const_iterator
histo = wheelSlopeHistos.begin();
125 histo != wheelSlopeHistos.end();
127 (*histo).second->Reset();
131 cmsMeanHistos.clear();
132 for(
int i=-2;
i<3;
i++){
133 for(
int j=1; j<15; j++){
134 MeanFilled[make_pair(
i,j)]=
false;
137 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
138 cmsSigmaHistos.clear();
139 for(
int i=-2;
i<3;
i++){
140 for(
int j=1; j<15; j++){
141 SigmaFilled[make_pair(
i,j)]=
false;
145 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
146 cmsSlopeHistos.clear();
147 for(
int i=-2;
i<3;
i++){
148 for(
int j=1; j<15; j++){
149 SlopeFilled[make_pair(
i,j)]=
false;
156 for(
int wh=-2; wh<=3; wh++){
158 for(
int xBin=0; xBin<14; xBin++){
160 wheelMeanHistos[wh]->setBinContent(xBin,
yBin,0);
161 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
162 wheelSigmaHistos[wh]->setBinContent(xBin,
yBin,0);
163 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest"))
164 wheelSlopeHistos[wh]->setBinContent(xBin,
yBin,0);
169 for(
int xBin=0; xBin<14; xBin++){
171 wheelMeanHistos[wh]->setBinContent(xBin,
yBin,0);
172 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
173 wheelSigmaHistos[wh]->setBinContent(xBin,
yBin,0);
174 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest"))
175 wheelSlopeHistos[wh]->setBinContent(xBin,
yBin,0);
182 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: "<<nLumiSegs<<
" updates";
184 vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
185 vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
187 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: Residual Distribution tests results";
189 for (; ch_it != ch_end; ++ch_it) {
195 if(chID.
station() == 1) entry=0;
196 if(chID.
station() == 2) entry=3;
197 if(chID.
station() == 3) entry=6;
198 if(chID.
station() == 4) entry=9;
200 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
201 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
203 for(; sl_it != sl_end; ++sl_it) {
207 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: Superlayer: " << slID;
211 stringstream sector; sector << slID.
sector();
212 stringstream superLayer; superLayer << slID.
superlayer();
214 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
215 string supLayer =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str() +
"_SL" + superLayer.str();
220 string GaussianCriterionName =
221 parameters.getUntrackedParameter<
string>(
"resDistributionTestName",
222 "ResidualsDistributionGaussianTest");
230 if(BinNumber == 12) BinNumber=11;
231 float mean = (*res_histo).getMean(1);
232 float sigma = (*res_histo).getRMS(1);
233 MeanHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, mean);
234 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
235 SigmaHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, sigma);
238 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
242 TH2F * res_histo_2D_root = res_histo_2D->
getTH2F();
244 if(BinNumber == 12) BinNumber=11;
245 TProfile* prof = res_histo_2D_root->ProfileX();
246 prof->GetXaxis()->SetRangeUser(0,2);
249 TF1 fitting(
"mypol1",
"pol1");
251 prof->Fit(&fitting,
"Q0");
253 edm::LogError (
"resolution") <<
"[DTResolutionTest]: Exception when fitting..." 254 <<
"SuperLayer : " << slID <<
"\n" 255 <<
" STEP : " <<
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") <<
"\n" 256 <<
"Filling slope histogram with standard value -99. for bin " << BinNumber;
257 SlopeHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, -99.);
260 double slope = fitting.GetParameter(1);
261 SlopeHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, slope);
269 string MeanCriterionName =
parameters.getUntrackedParameter<
string>(
"meanTestName",
"ResidualsMeanInRange");
270 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hMean = MeanHistos.begin();
271 hMean != MeanHistos.end();
273 const QReport * theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
274 stringstream
wheel; wheel << (*hMean).first.first;
275 stringstream sector; sector << (*hMean).first.second;
278 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
279 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
280 channel != badChannels.end(); channel++) {
281 edm::LogError(
"resolution") <<
"Bad mean channel: wh: " << wheel.str()
282 <<
" st: " << stationFromBin((*channel).getBin())
283 <<
" sect: " <<sector.str()
284 <<
" sl: " << slFromBin((*channel).getBin())
285 <<
" mean (cm): " << (*channel).getContents();
286 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
287 if(
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")){
288 MeanHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
289 MeanHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
292 if(
abs((*channel).getContents())<
parameters.getUntrackedParameter<
double>(
"meanMaxLimit"))
293 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1,1);
295 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1,2);
298 if(
abs((*channel).getContents())>
parameters.getUntrackedParameter<
double>(
"meanMaxLimit")){
299 cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)]++;
300 if(((*hMean).first.second<13 &&
301 double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/11>
double(percentual)/100 &&
302 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==
false) ||
303 ((*hMean).first.first>=13 &&
304 double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/2>
double(percentual)/100 &&
305 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==
false)){
306 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]=
true;
307 wheelMeanHistos[3]->Fill(((*hMean).first.second)-1,(*hMean).first.first);
315 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
316 string SigmaCriterionName =
parameters.getUntrackedParameter<
string>(
"sigmaTestName",
"ResidualsSigmaInRange");
317 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hSigma = SigmaHistos.begin();
318 hSigma != SigmaHistos.end();
320 const QReport * theSigmaQReport = (*hSigma).second->getQReport(SigmaCriterionName);
321 stringstream
wheel; wheel << (*hSigma).first.first;
322 stringstream sector; sector << (*hSigma).first.second;
323 if(theSigmaQReport) {
324 vector<dqm::me_util::Channel> badChannels = theSigmaQReport->
getBadChannels();
325 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
326 channel != badChannels.end(); channel++) {
327 edm::LogError(
"resolution") <<
"Bad sigma: wh: " << wheel.str()
328 <<
" st: " << stationFromBin((*channel).getBin())
329 <<
" sect: " <<sector.str()
330 <<
" sl: " << slFromBin((*channel).getBin())
331 <<
" sigma (cm): " << (*channel).getContents();
332 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
333 SigmaHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
334 SigmaHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
336 wheelSigmaHistos[(*hSigma).first.first]->Fill(((*hSigma).first.second)-1,(*channel).getBin()-1);
339 cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)]++;
340 if(((*hSigma).first.second<13 &&
341 double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/11>
double(percentual)/100 &&
342 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==
false) ||
343 ((*hSigma).first.first>=13 &&
344 double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/2>
double(percentual)/100 &&
345 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==
false)){
346 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]=
true;
347 wheelSigmaHistos[3]->Fill((*hSigma).first.second-1,(*hSigma).first.first);
355 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
356 string SlopeCriterionName =
parameters.getUntrackedParameter<
string>(
"slopeTestName",
"ResidualsSlopeInRange");
357 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hSlope = SlopeHistos.begin();
358 hSlope != SlopeHistos.end();
360 const QReport * theSlopeQReport = (*hSlope).second->getQReport(SlopeCriterionName);
361 stringstream
wheel; wheel << (*hSlope).first.first;
362 stringstream sector; sector << (*hSlope).first.second;
363 if(theSlopeQReport) {
364 vector<dqm::me_util::Channel> badChannels = theSlopeQReport->
getBadChannels();
365 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
366 channel != badChannels.end(); channel++) {
367 edm::LogError(
"resolution") <<
"Bad slope: wh: " << wheel.str()
368 <<
" st: " << stationFromBin((*channel).getBin())
369 <<
" sect: " <<sector.str()
370 <<
" sl: " << slFromBin((*channel).getBin())
371 <<
" slope: " << (*channel).getContents();
372 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
373 SlopeHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
374 SlopeHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
376 wheelSlopeHistos[(*hSlope).first.first]->Fill(((*hSlope).first.second)-1,(*channel).getBin()-1);
379 cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)]++;
380 if(((*hSlope).first.second<13 &&
381 double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/11>
double(percentual)/100 &&
382 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==
false) ||
383 ((*hSlope).first.first>=13 &&
384 double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/2>
double(percentual)/100 &&
385 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==
false)){
386 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]=
true;
387 wheelSlopeHistos[3]->Fill((*hSlope).first.second-1,(*hSlope).first.first);
413 stringstream sector; sector << slID.
sector();
414 stringstream superLayer; superLayer << slID.
superlayer();
416 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
419 if(
parameters.getUntrackedParameter<
bool>(
"calibModule",
false)){
421 folderRoot +
"DT/DTCalibValidation/Wheel" + wheel.str() +
422 "/Station" + station.str() +
423 "/Sector" + sector.str() +
"/";
427 folderRoot +
"DT/DTResolutionAnalysisTask/Wheel" + wheel.str() +
428 "/Station" + station.str() +
429 "/Sector" + sector.str() +
"/";
432 string histoTag =
parameters.getUntrackedParameter<
string>(
"histoTag",
"hResDist");
434 string histoname = folderName + histoTag
436 +
"_St" + station.str()
437 +
"_Sec" + sector.str()
438 +
"_SL" + superLayer.str();
449 stringstream sector; sector << slID.
sector();
450 stringstream superLayer; superLayer << slID.
superlayer();
452 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
455 if(
parameters.getUntrackedParameter<
bool>(
"calibModule",
false)){
457 folderRoot +
"DT/DTCalibValidation/Wheel" + wheel.str() +
458 "/Station" + station.str() +
459 "/Sector" + sector.str() +
"/";
463 folderRoot +
"DT/DTResolutionAnalysisTask/Wheel" + wheel.str() +
464 "/Station" + station.str() +
465 "/Sector" + sector.str() +
"/";
468 string histoTag2D =
parameters.getUntrackedParameter<
string>(
"histoTag2D",
"hResDistVsDist");
470 string histoname = folderName + histoTag2D
472 +
"_St" + station.str()
473 +
"_Sec" + sector.str()
474 +
"_SL" + superLayer.str();
483 stringstream sector; sector << ch.
sector();
486 string MeanHistoName =
"MeanTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
487 string SigmaHistoName =
"SigmaTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
488 string SlopeHistoName =
"SlopeTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
495 MeanHistos[make_pair(ch.
wheel(),ch.
sector())] = ibooker.
book1D(MeanHistoName.c_str(),MeanHistoName.c_str(),11,0,11);
497 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
498 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
499 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
500 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
501 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
502 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
503 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
504 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
505 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
506 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
510 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
512 SigmaHistos[make_pair(ch.
wheel(),ch.
sector())] = ibooker.
book1D(SigmaHistoName.c_str(),SigmaHistoName.c_str(),11,0,11);
514 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
515 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
516 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
517 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
518 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
519 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
520 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
521 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
522 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
523 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
527 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
529 SlopeHistos[make_pair(ch.
wheel(),ch.
sector())] = ibooker.
book1D(SlopeHistoName.c_str(),SlopeHistoName.c_str(),11,0,11);
531 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
532 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
533 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
534 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
535 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
536 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
537 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
538 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
539 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
540 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
543 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
545 if(
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")){
546 string MeanHistoNameSetRange =
"MeanWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" 547 + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
549 MeanHistosSetRange[
HistoName] = ibooker.
book1D(MeanHistoNameSetRange.c_str(),MeanHistoNameSetRange.c_str(),11,0.5,11.5);
550 string MeanHistoNameSetRange2D =
"MeanWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" 551 + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
552 MeanHistosSetRange2D[
HistoName] = ibooker.
book2D(MeanHistoNameSetRange2D.c_str(),MeanHistoNameSetRange2D.c_str(),
553 11, 0.5, 11.5, 100, -0.05, 0.05);
556 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
557 string SigmaHistoNameSetRange =
"SigmaWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" 558 + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
560 SigmaHistosSetRange[
HistoName] = ibooker.
book1D(SigmaHistoNameSetRange.c_str(),SigmaHistoNameSetRange.c_str(),11,0.5,11.5);
561 string SigmaHistoNameSetRange2D =
"SigmaWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3")
562 +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
564 SigmaHistosSetRange2D[
HistoName] = ibooker.
book2D(SigmaHistoNameSetRange2D.c_str(),SigmaHistoNameSetRange2D.c_str(),
565 11, 0.5, 11.5, 500, 0, 0.5);
568 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
569 string SlopeHistoNameSetRange =
"SlopeWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3")
570 +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
572 SlopeHistosSetRange[
HistoName] = ibooker.
book1D(SlopeHistoNameSetRange.c_str(),SlopeHistoNameSetRange.c_str(),11,0.5,11.5);
573 string SlopeHistoNameSetRange2D =
"SlopeWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" 574 + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
576 SlopeHistosSetRange2D[
HistoName] = ibooker.
book2D(SlopeHistoNameSetRange2D.c_str(),SlopeHistoNameSetRange2D.c_str(),
577 11, 0.5, 11.5, 200, -0.1, 0.1);
586 if(wheelMeanHistos.find(3) == wheelMeanHistos.end()){
587 string histoName =
"MeanSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
589 wheelMeanHistos[3] = ibooker.
book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
591 wheelMeanHistos[3]->setBinLabel(1,
"Sector1",1);
592 wheelMeanHistos[3]->setBinLabel(2,
"Sector2",1);
593 wheelMeanHistos[3]->setBinLabel(3,
"Sector3",1);
594 wheelMeanHistos[3]->setBinLabel(4,
"Sector4",1);
595 wheelMeanHistos[3]->setBinLabel(5,
"Sector5",1);
596 wheelMeanHistos[3]->setBinLabel(6,
"Sector6",1);
597 wheelMeanHistos[3]->setBinLabel(7,
"Sector7",1);
598 wheelMeanHistos[3]->setBinLabel(8,
"Sector8",1);
599 wheelMeanHistos[3]->setBinLabel(9,
"Sector9",1);
600 wheelMeanHistos[3]->setBinLabel(10,
"Sector10",1);
601 wheelMeanHistos[3]->setBinLabel(11,
"Sector11",1);
602 wheelMeanHistos[3]->setBinLabel(12,
"Sector12",1);
603 wheelMeanHistos[3]->setBinLabel(13,
"Sector13",1);
604 wheelMeanHistos[3]->setBinLabel(14,
"Sector14",1);
605 wheelMeanHistos[3]->setBinLabel(1,
"Wheel-2",2);
606 wheelMeanHistos[3]->setBinLabel(2,
"Wheel-1",2);
607 wheelMeanHistos[3]->setBinLabel(3,
"Wheel0",2);
608 wheelMeanHistos[3]->setBinLabel(4,
"Wheel+1",2);
609 wheelMeanHistos[3]->setBinLabel(5,
"Wheel+2",2);
612 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
613 if(wheelSigmaHistos.find(3) == wheelSigmaHistos.end()){
614 string histoName =
"SigmaSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
616 wheelSigmaHistos[3] = ibooker.
book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
618 wheelSigmaHistos[3]->setBinLabel(1,
"Sector1",1);
619 wheelSigmaHistos[3]->setBinLabel(2,
"Sector2",1);
620 wheelSigmaHistos[3]->setBinLabel(3,
"Sector3",1);
621 wheelSigmaHistos[3]->setBinLabel(4,
"Sector4",1);
622 wheelSigmaHistos[3]->setBinLabel(5,
"Sector5",1);
623 wheelSigmaHistos[3]->setBinLabel(6,
"Sector6",1);
624 wheelSigmaHistos[3]->setBinLabel(7,
"Sector7",1);
625 wheelSigmaHistos[3]->setBinLabel(8,
"Sector8",1);
626 wheelSigmaHistos[3]->setBinLabel(9,
"Sector9",1);
627 wheelSigmaHistos[3]->setBinLabel(10,
"Sector10",1);
628 wheelSigmaHistos[3]->setBinLabel(11,
"Sector11",1);
629 wheelSigmaHistos[3]->setBinLabel(12,
"Sector12",1);
630 wheelSigmaHistos[3]->setBinLabel(13,
"Sector13",1);
631 wheelSigmaHistos[3]->setBinLabel(14,
"Sector14",1);
632 wheelSigmaHistos[3]->setBinLabel(1,
"Wheel-2",2);
633 wheelSigmaHistos[3]->setBinLabel(2,
"Wheel-1",2);
634 wheelSigmaHistos[3]->setBinLabel(3,
"Wheel0",2);
635 wheelSigmaHistos[3]->setBinLabel(4,
"Wheel+1",2);
636 wheelSigmaHistos[3]->setBinLabel(5,
"Wheel+2",2);
640 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
641 if(wheelSlopeHistos.find(3) == wheelSlopeHistos.end()){
642 string histoName =
"SlopeSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
644 wheelSlopeHistos[3] = ibooker.
book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
646 wheelSlopeHistos[3]->setBinLabel(1,
"Sector1",1);
647 wheelSlopeHistos[3]->setBinLabel(2,
"Sector2",1);
648 wheelSlopeHistos[3]->setBinLabel(3,
"Sector3",1);
649 wheelSlopeHistos[3]->setBinLabel(4,
"Sector4",1);
650 wheelSlopeHistos[3]->setBinLabel(5,
"Sector5",1);
651 wheelSlopeHistos[3]->setBinLabel(6,
"Sector6",1);
652 wheelSlopeHistos[3]->setBinLabel(7,
"Sector7",1);
653 wheelSlopeHistos[3]->setBinLabel(8,
"Sector8",1);
654 wheelSlopeHistos[3]->setBinLabel(9,
"Sector9",1);
655 wheelSlopeHistos[3]->setBinLabel(10,
"Sector10",1);
656 wheelSlopeHistos[3]->setBinLabel(11,
"Sector11",1);
657 wheelSlopeHistos[3]->setBinLabel(12,
"Sector12",1);
658 wheelSlopeHistos[3]->setBinLabel(13,
"Sector13",1);
659 wheelSlopeHistos[3]->setBinLabel(14,
"Sector14",1);
660 wheelSlopeHistos[3]->setBinLabel(1,
"Wheel-2",2);
661 wheelSlopeHistos[3]->setBinLabel(2,
"Wheel-1",2);
662 wheelSlopeHistos[3]->setBinLabel(3,
"Wheel0",2);
663 wheelSlopeHistos[3]->setBinLabel(4,
"Wheel+1",2);
664 wheelSlopeHistos[3]->setBinLabel(5,
"Wheel+2",2);
668 stringstream
wheel; wheel <<wh;
670 if(wheelMeanHistos.find(wh) == wheelMeanHistos.end()){
671 string histoName =
"MeanSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3")
672 +
"_W" + wheel.str();
674 wheelMeanHistos[wh] = ibooker.
book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
676 wheelMeanHistos[wh]->setBinLabel(2,
"Sector2",1);
677 wheelMeanHistos[wh]->setBinLabel(3,
"Sector3",1);
678 wheelMeanHistos[wh]->setBinLabel(4,
"Sector4",1);
679 wheelMeanHistos[wh]->setBinLabel(5,
"Sector5",1);
680 wheelMeanHistos[wh]->setBinLabel(6,
"Sector6",1);
681 wheelMeanHistos[wh]->setBinLabel(7,
"Sector7",1);
682 wheelMeanHistos[wh]->setBinLabel(8,
"Sector8",1);
683 wheelMeanHistos[wh]->setBinLabel(9,
"Sector9",1);
684 wheelMeanHistos[wh]->setBinLabel(10,
"Sector10",1);
685 wheelMeanHistos[wh]->setBinLabel(11,
"Sector11",1);
686 wheelMeanHistos[wh]->setBinLabel(12,
"Sector12",1);
687 wheelMeanHistos[wh]->setBinLabel(13,
"Sector13",1);
688 wheelMeanHistos[wh]->setBinLabel(14,
"Sector14",1);
689 wheelMeanHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
690 wheelMeanHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
691 wheelMeanHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
692 wheelMeanHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
693 wheelMeanHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
694 wheelMeanHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
695 wheelMeanHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
696 wheelMeanHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
697 wheelMeanHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
698 wheelMeanHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
699 wheelMeanHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
702 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
703 if(wheelSigmaHistos.find(wh) == wheelSigmaHistos.end()){
704 string histoName =
"SigmaSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3")
705 +
"_W" + wheel.str();
707 wheelSigmaHistos[wh] = ibooker.
book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
709 wheelSigmaHistos[wh]->setBinLabel(2,
"Sector2",1);
710 wheelSigmaHistos[wh]->setBinLabel(3,
"Sector3",1);
711 wheelSigmaHistos[wh]->setBinLabel(4,
"Sector4",1);
712 wheelSigmaHistos[wh]->setBinLabel(5,
"Sector5",1);
713 wheelSigmaHistos[wh]->setBinLabel(6,
"Sector6",1);
714 wheelSigmaHistos[wh]->setBinLabel(7,
"Sector7",1);
715 wheelSigmaHistos[wh]->setBinLabel(8,
"Sector8",1);
716 wheelSigmaHistos[wh]->setBinLabel(9,
"Sector9",1);
717 wheelSigmaHistos[wh]->setBinLabel(10,
"Sector10",1);
718 wheelSigmaHistos[wh]->setBinLabel(11,
"Sector11",1);
719 wheelSigmaHistos[wh]->setBinLabel(12,
"Sector12",1);
720 wheelSigmaHistos[wh]->setBinLabel(13,
"Sector13",1);
721 wheelSigmaHistos[wh]->setBinLabel(14,
"Sector14",1);
722 wheelSigmaHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
723 wheelSigmaHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
724 wheelSigmaHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
725 wheelSigmaHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
726 wheelSigmaHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
727 wheelSigmaHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
728 wheelSigmaHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
729 wheelSigmaHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
730 wheelSigmaHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
731 wheelSigmaHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
732 wheelSigmaHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
736 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
737 if(wheelSlopeHistos.find(wh) == wheelSlopeHistos.end()){
738 string histoName =
"SlopeSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3")
739 +
"_W" + wheel.str();
741 wheelSlopeHistos[wh] = ibooker.
book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
743 wheelSlopeHistos[wh]->setBinLabel(2,
"Sector2",1);
744 wheelSlopeHistos[wh]->setBinLabel(3,
"Sector3",1);
745 wheelSlopeHistos[wh]->setBinLabel(4,
"Sector4",1);
746 wheelSlopeHistos[wh]->setBinLabel(5,
"Sector5",1);
747 wheelSlopeHistos[wh]->setBinLabel(6,
"Sector6",1);
748 wheelSlopeHistos[wh]->setBinLabel(7,
"Sector7",1);
749 wheelSlopeHistos[wh]->setBinLabel(8,
"Sector8",1);
750 wheelSlopeHistos[wh]->setBinLabel(9,
"Sector9",1);
751 wheelSlopeHistos[wh]->setBinLabel(10,
"Sector10",1);
752 wheelSlopeHistos[wh]->setBinLabel(11,
"Sector11",1);
753 wheelSlopeHistos[wh]->setBinLabel(12,
"Sector12",1);
754 wheelSlopeHistos[wh]->setBinLabel(13,
"Sector13",1);
755 wheelSlopeHistos[wh]->setBinLabel(14,
"Sector14",1);
756 wheelSlopeHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
757 wheelSlopeHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
758 wheelSlopeHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
759 wheelSlopeHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
760 wheelSlopeHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
761 wheelSlopeHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
762 wheelSlopeHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
763 wheelSlopeHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
764 wheelSlopeHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
765 wheelSlopeHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
766 wheelSlopeHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
773 return (
int) (bin /3.1)+1;
779 if(ret == 0 || bin == 11) ret = 3;
LuminosityBlockID id() const
DTResolutionTest(const edm::ParameterSet &ps)
Constructor.
~DTResolutionTest() override
Destructor.
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
MonitorElement * get(const std::string &path)
static const double slope[3]
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
std::string getMEName(const DTSuperLayerId &slID)
Get the ME name.
void bookHistos(DQMStore::IBooker &, const DTChamberId &ch)
book the new ME
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override
Endjob.
MonitorElement * book1D(Args &&...args)
Abs< T >::type abs(const T &t)
int superLayer() const
Return the superlayer number.
const std::vector< DQMChannel > & getBadChannels(void) const
bin
set the eta bin as selection string.
int superlayer() const
Return the superlayer number (deprecated method name)
void setCurrentFolder(const std::string &fullpath)
MonitorElement * book2D(Args &&...args)
std::string getMEName2D(const DTSuperLayerId &slID)
LuminosityBlockNumber_t luminosityBlock() const
int slFromBin(int bin) const
void dqmEndLuminosityBlock(DQMStore::IBooker &, DQMStore::IGetter &, edm::LuminosityBlock const &, edm::EventSetup const &) override
DQM Client Diagnostic.
int station() const
Return the station number.
TH2F * getTH2F(void) const
static char chambers[264][20]
int wheel() const
Return the wheel number.
int stationFromBin(int bin) const