54 percentual =
parameters.getUntrackedParameter<
int>(
"BadSLpercentual", 10);
77 for(
int wheel=-2; wheel<3; wheel++){
80 vector<const DTChamber*>
chambers = muonGeom->chambers();
81 for(vector<const DTChamber*>::const_iterator chamber = chambers.begin();
82 chamber != chambers.end(); ++chamber) {
91 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: Begin of LS transition";
116 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: End of LS transition, performing the DQM client operation";
124 for(map<int, MonitorElement*> ::const_iterator
histo = wheelMeanHistos.begin();
125 histo != wheelMeanHistos.end();
127 (*histo).second->Reset();
129 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
130 for(map<int, MonitorElement*> ::const_iterator
histo = wheelSigmaHistos.begin();
131 histo != wheelSigmaHistos.end();
133 (*histo).second->Reset();
136 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
137 for(map<int, MonitorElement*> ::const_iterator
histo = wheelSlopeHistos.begin();
138 histo != wheelSlopeHistos.end();
140 (*histo).second->Reset();
144 cmsMeanHistos.clear();
145 for(
int i=-2;
i<3;
i++){
146 for(
int j=1;
j<15;
j++){
147 MeanFilled[make_pair(
i,
j)]=
false;
150 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
151 cmsSigmaHistos.clear();
152 for(
int i=-2;
i<3;
i++){
153 for(
int j=1;
j<15;
j++){
154 SigmaFilled[make_pair(
i,
j)]=
false;
158 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
159 cmsSlopeHistos.clear();
160 for(
int i=-2;
i<3;
i++){
161 for(
int j=1;
j<15;
j++){
162 SlopeFilled[make_pair(
i,
j)]=
false;
169 for(
int wh=-2; wh<=3; wh++){
171 for(
int xBin=0; xBin<14; xBin++){
173 wheelMeanHistos[wh]->setBinContent(xBin,
yBin,0);
174 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
175 wheelSigmaHistos[wh]->setBinContent(xBin,
yBin,0);
176 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest"))
177 wheelSlopeHistos[wh]->setBinContent(xBin,
yBin,0);
182 for(
int xBin=0; xBin<14; xBin++){
184 wheelMeanHistos[wh]->setBinContent(xBin,
yBin,0);
185 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
186 wheelSigmaHistos[wh]->setBinContent(xBin,
yBin,0);
187 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest"))
188 wheelSlopeHistos[wh]->setBinContent(xBin,
yBin,0);
195 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: "<<nLumiSegs<<
" updates";
197 vector<const DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
198 vector<const DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
200 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: Residual Distribution tests results";
202 for (; ch_it != ch_end; ++ch_it) {
208 if(chID.
station() == 1) entry=0;
209 if(chID.
station() == 2) entry=3;
210 if(chID.
station() == 3) entry=6;
211 if(chID.
station() == 4) entry=9;
213 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
214 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
216 for(; sl_it != sl_end; ++sl_it) {
220 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: Superlayer: " << slID;
222 stringstream wheel; wheel << slID.
wheel();
224 stringstream sector; sector << slID.
sector();
225 stringstream superLayer; superLayer << slID.
superlayer();
227 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
228 string supLayer =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str() +
"_SL" + superLayer.str();
233 string GaussianCriterionName =
234 parameters.getUntrackedParameter<
string>(
"resDistributionTestName",
235 "ResidualsDistributionGaussianTest");
242 if(BinNumber == 12) BinNumber=11;
243 float mean = (*res_histo).getMean(1);
244 float sigma = (*res_histo).getRMS(1);
245 MeanHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, mean);
246 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
247 SigmaHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, sigma);
250 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
253 TH2F * res_histo_2D_root = res_histo_2D->
getTH2F();
255 if(BinNumber == 12) BinNumber=11;
256 TProfile* prof = res_histo_2D_root->ProfileX();
257 prof->GetXaxis()->SetRangeUser(0,2);
260 TF1 fitting(
"mypol1",
"pol1");
262 prof->Fit(&fitting,
"Q0");
264 edm::LogError (
"resolution") <<
"[DTResolutionTest]: Exception when fitting..."
265 <<
"SuperLayer : " << slID <<
"\n"
266 <<
" STEP : " <<
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") <<
"\n"
267 <<
"Filling slope histogram with standard value -99. for bin " << BinNumber;
268 SlopeHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, -99.);
271 double slope = fitting.GetParameter(1);
272 SlopeHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, slope);
280 string MeanCriterionName =
parameters.getUntrackedParameter<
string>(
"meanTestName",
"ResidualsMeanInRange");
281 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hMean = MeanHistos.begin();
282 hMean != MeanHistos.end();
284 const QReport * theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
285 stringstream wheel; wheel << (*hMean).first.first;
286 stringstream sector; sector << (*hMean).first.second;
289 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
290 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
291 channel != badChannels.end(); channel++) {
292 edm::LogError(
"resolution") <<
"Bad mean channel: wh: " << wheel.str()
293 <<
" st: " << stationFromBin((*channel).getBin())
294 <<
" sect: " <<sector.str()
295 <<
" sl: " << slFromBin((*channel).getBin())
296 <<
" mean (cm): " << (*channel).getContents();
297 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
298 if(
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")){
299 MeanHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
300 MeanHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
303 if(
abs((*channel).getContents())<
parameters.getUntrackedParameter<
double>(
"meanMaxLimit"))
304 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1,1);
306 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1,2);
309 if(
abs((*channel).getContents())>
parameters.getUntrackedParameter<
double>(
"meanMaxLimit")){
310 cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)]++;
311 if(((*hMean).first.second<13 &&
312 double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/11>
double(percentual)/100 &&
313 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==
false) ||
314 ((*hMean).first.first>=13 &&
315 double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/2>
double(percentual)/100 &&
316 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==
false)){
317 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]=
true;
318 wheelMeanHistos[3]->Fill(((*hMean).first.second)-1,(*hMean).first.first);
328 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
329 string SigmaCriterionName =
parameters.getUntrackedParameter<
string>(
"sigmaTestName",
"ResidualsSigmaInRange");
330 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hSigma = SigmaHistos.begin();
331 hSigma != SigmaHistos.end();
333 const QReport * theSigmaQReport = (*hSigma).second->getQReport(SigmaCriterionName);
334 stringstream wheel; wheel << (*hSigma).first.first;
335 stringstream sector; sector << (*hSigma).first.second;
336 if(theSigmaQReport) {
337 vector<dqm::me_util::Channel> badChannels = theSigmaQReport->
getBadChannels();
338 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
339 channel != badChannels.end(); channel++) {
340 edm::LogError(
"resolution") <<
"Bad sigma: wh: " << wheel.str()
341 <<
" st: " << stationFromBin((*channel).getBin())
342 <<
" sect: " <<sector.str()
343 <<
" sl: " << slFromBin((*channel).getBin())
344 <<
" sigma (cm): " << (*channel).getContents();
345 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
346 SigmaHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
347 SigmaHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
349 wheelSigmaHistos[(*hSigma).first.first]->Fill(((*hSigma).first.second)-1,(*channel).getBin()-1);
352 cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)]++;
353 if(((*hSigma).first.second<13 &&
354 double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/11>
double(percentual)/100 &&
355 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==
false) ||
356 ((*hSigma).first.first>=13 &&
357 double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/2>
double(percentual)/100 &&
358 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==
false)){
359 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]=
true;
360 wheelSigmaHistos[3]->Fill((*hSigma).first.second-1,(*hSigma).first.first);
370 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
371 string SlopeCriterionName =
parameters.getUntrackedParameter<
string>(
"slopeTestName",
"ResidualsSlopeInRange");
372 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hSlope = SlopeHistos.begin();
373 hSlope != SlopeHistos.end();
375 const QReport * theSlopeQReport = (*hSlope).second->getQReport(SlopeCriterionName);
376 stringstream wheel; wheel << (*hSlope).first.first;
377 stringstream sector; sector << (*hSlope).first.second;
378 if(theSlopeQReport) {
379 vector<dqm::me_util::Channel> badChannels = theSlopeQReport->
getBadChannels();
380 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
381 channel != badChannels.end(); channel++) {
382 edm::LogError(
"resolution") <<
"Bad slope: wh: " << wheel.str()
383 <<
" st: " << stationFromBin((*channel).getBin())
384 <<
" sect: " <<sector.str()
385 <<
" sl: " << slFromBin((*channel).getBin())
386 <<
" slope: " << (*channel).getContents();
387 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
388 SlopeHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
389 SlopeHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
391 wheelSlopeHistos[(*hSlope).first.first]->Fill(((*hSlope).first.second)-1,(*channel).getBin()-1);
394 cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)]++;
395 if(((*hSlope).first.second<13 &&
396 double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/11>
double(percentual)/100 &&
397 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==
false) ||
398 ((*hSlope).first.first>=13 &&
399 double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/2>
double(percentual)/100 &&
400 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==
false)){
401 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]=
true;
402 wheelSlopeHistos[3]->Fill((*hSlope).first.second-1,(*hSlope).first.first);
420 bool outputMEsInRootFile =
parameters.getParameter<
bool>(
"OutputMEsInRootFile");
421 if(outputMEsInRootFile){
423 dbe->save(outputFileName,
"DT/CalibrationSummary");
432 stringstream wheel; wheel << slID.
wheel();
434 stringstream sector; sector << slID.
sector();
435 stringstream superLayer; superLayer << slID.
superlayer();
437 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
440 if(
parameters.getUntrackedParameter<
bool>(
"calibModule",
false)){
442 folderRoot +
"DT/DTCalibValidation/Wheel" + wheel.str() +
443 "/Station" + station.str() +
444 "/Sector" + sector.str() +
"/";
448 folderRoot +
"DT/DTResolutionAnalysisTask/Wheel" + wheel.str() +
449 "/Station" + station.str() +
450 "/Sector" + sector.str() +
"/";
453 string histoTag =
parameters.getUntrackedParameter<
string>(
"histoTag",
"hResDist");
455 string histoname = folderName + histoTag
457 +
"_St" + station.str()
458 +
"_Sec" + sector.str()
459 +
"_SL" + superLayer.str();
468 stringstream wheel; wheel << slID.
wheel();
470 stringstream sector; sector << slID.
sector();
471 stringstream superLayer; superLayer << slID.
superlayer();
473 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
476 if(
parameters.getUntrackedParameter<
bool>(
"calibModule",
false)){
478 folderRoot +
"DT/DTCalibValidation/Wheel" + wheel.str() +
479 "/Station" + station.str() +
480 "/Sector" + sector.str() +
"/";
484 folderRoot +
"DT/DTResolutionAnalysisTask/Wheel" + wheel.str() +
485 "/Station" + station.str() +
486 "/Sector" + sector.str() +
"/";
489 string histoTag2D =
parameters.getUntrackedParameter<
string>(
"histoTag2D",
"hResDistVsDist");
491 string histoname = folderName + histoTag2D
493 +
"_St" + station.str()
494 +
"_Sec" + sector.str()
495 +
"_SL" + superLayer.str();
505 stringstream wheel; wheel << ch.
wheel();
506 stringstream sector; sector << ch.
sector();
509 string MeanHistoName =
"MeanTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
510 string SigmaHistoName =
"SigmaTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
511 string SlopeHistoName =
"SlopeTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
513 dbe->setCurrentFolder(
"DT/Tests/DTResolution");
516 MeanHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(MeanHistoName.c_str(),MeanHistoName.c_str(),11,0,11);
517 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
518 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
519 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
520 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
521 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
522 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
523 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
524 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
525 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
526 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
527 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
531 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
532 SigmaHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(SigmaHistoName.c_str(),SigmaHistoName.c_str(),11,0,11);
533 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
534 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
535 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
536 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
537 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
538 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
539 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
540 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
541 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
542 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
543 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
547 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
548 SlopeHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(SlopeHistoName.c_str(),SlopeHistoName.c_str(),11,0,11);
549 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
550 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
551 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
552 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
553 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
554 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
555 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
556 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
557 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
558 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
559 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
562 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
564 if(
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")){
565 string MeanHistoNameSetRange =
"MeanWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
566 MeanHistosSetRange[
HistoName] = dbe->book1D(MeanHistoNameSetRange.c_str(),MeanHistoNameSetRange.c_str(),11,0.5,11.5);
567 string MeanHistoNameSetRange2D =
"MeanWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
568 MeanHistosSetRange2D[
HistoName] = dbe->book2D(MeanHistoNameSetRange2D.c_str(),MeanHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 100, -0.05, 0.05);
571 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
572 string SigmaHistoNameSetRange =
"SigmaWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
573 SigmaHistosSetRange[
HistoName] = dbe->book1D(SigmaHistoNameSetRange.c_str(),SigmaHistoNameSetRange.c_str(),11,0.5,11.5);
574 string SigmaHistoNameSetRange2D =
"SigmaWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
575 SigmaHistosSetRange2D[
HistoName] = dbe->book2D(SigmaHistoNameSetRange2D.c_str(),SigmaHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 500, 0, 0.5);
578 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
579 string SlopeHistoNameSetRange =
"SlopeWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
580 SlopeHistosSetRange[
HistoName] = dbe->book1D(SlopeHistoNameSetRange.c_str(),SlopeHistoNameSetRange.c_str(),11,0.5,11.5);
581 string SlopeHistoNameSetRange2D =
"SlopeWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
582 SlopeHistosSetRange2D[
HistoName] = dbe->book2D(SlopeHistoNameSetRange2D.c_str(),SlopeHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 200, -0.1, 0.1);
590 dbe->setCurrentFolder(
"DT/CalibrationSummary");
592 if(wheelMeanHistos.find(3) == wheelMeanHistos.end()){
593 string histoName =
"MeanSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
594 wheelMeanHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
595 wheelMeanHistos[3]->setBinLabel(1,
"Sector1",1);
596 wheelMeanHistos[3]->setBinLabel(1,
"Sector1",1);
597 wheelMeanHistos[3]->setBinLabel(2,
"Sector2",1);
598 wheelMeanHistos[3]->setBinLabel(3,
"Sector3",1);
599 wheelMeanHistos[3]->setBinLabel(4,
"Sector4",1);
600 wheelMeanHistos[3]->setBinLabel(5,
"Sector5",1);
601 wheelMeanHistos[3]->setBinLabel(6,
"Sector6",1);
602 wheelMeanHistos[3]->setBinLabel(7,
"Sector7",1);
603 wheelMeanHistos[3]->setBinLabel(8,
"Sector8",1);
604 wheelMeanHistos[3]->setBinLabel(9,
"Sector9",1);
605 wheelMeanHistos[3]->setBinLabel(10,
"Sector10",1);
606 wheelMeanHistos[3]->setBinLabel(11,
"Sector11",1);
607 wheelMeanHistos[3]->setBinLabel(12,
"Sector12",1);
608 wheelMeanHistos[3]->setBinLabel(13,
"Sector13",1);
609 wheelMeanHistos[3]->setBinLabel(14,
"Sector14",1);
610 wheelMeanHistos[3]->setBinLabel(1,
"Wheel-2",2);
611 wheelMeanHistos[3]->setBinLabel(2,
"Wheel-1",2);
612 wheelMeanHistos[3]->setBinLabel(3,
"Wheel0",2);
613 wheelMeanHistos[3]->setBinLabel(4,
"Wheel+1",2);
614 wheelMeanHistos[3]->setBinLabel(5,
"Wheel+2",2);
617 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
618 if(wheelSigmaHistos.find(3) == wheelSigmaHistos.end()){
619 string histoName =
"SigmaSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
620 wheelSigmaHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
621 wheelSigmaHistos[3]->setBinLabel(1,
"Sector1",1);
622 wheelSigmaHistos[3]->setBinLabel(1,
"Sector1",1);
623 wheelSigmaHistos[3]->setBinLabel(2,
"Sector2",1);
624 wheelSigmaHistos[3]->setBinLabel(3,
"Sector3",1);
625 wheelSigmaHistos[3]->setBinLabel(4,
"Sector4",1);
626 wheelSigmaHistos[3]->setBinLabel(5,
"Sector5",1);
627 wheelSigmaHistos[3]->setBinLabel(6,
"Sector6",1);
628 wheelSigmaHistos[3]->setBinLabel(7,
"Sector7",1);
629 wheelSigmaHistos[3]->setBinLabel(8,
"Sector8",1);
630 wheelSigmaHistos[3]->setBinLabel(9,
"Sector9",1);
631 wheelSigmaHistos[3]->setBinLabel(10,
"Sector10",1);
632 wheelSigmaHistos[3]->setBinLabel(11,
"Sector11",1);
633 wheelSigmaHistos[3]->setBinLabel(12,
"Sector12",1);
634 wheelSigmaHistos[3]->setBinLabel(13,
"Sector13",1);
635 wheelSigmaHistos[3]->setBinLabel(14,
"Sector14",1);
636 wheelSigmaHistos[3]->setBinLabel(1,
"Wheel-2",2);
637 wheelSigmaHistos[3]->setBinLabel(2,
"Wheel-1",2);
638 wheelSigmaHistos[3]->setBinLabel(3,
"Wheel0",2);
639 wheelSigmaHistos[3]->setBinLabel(4,
"Wheel+1",2);
640 wheelSigmaHistos[3]->setBinLabel(5,
"Wheel+2",2);
644 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
645 if(wheelSlopeHistos.find(3) == wheelSlopeHistos.end()){
646 string histoName =
"SlopeSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
647 wheelSlopeHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
648 wheelSlopeHistos[3]->setBinLabel(1,
"Sector1",1);
649 wheelSlopeHistos[3]->setBinLabel(1,
"Sector1",1);
650 wheelSlopeHistos[3]->setBinLabel(2,
"Sector2",1);
651 wheelSlopeHistos[3]->setBinLabel(3,
"Sector3",1);
652 wheelSlopeHistos[3]->setBinLabel(4,
"Sector4",1);
653 wheelSlopeHistos[3]->setBinLabel(5,
"Sector5",1);
654 wheelSlopeHistos[3]->setBinLabel(6,
"Sector6",1);
655 wheelSlopeHistos[3]->setBinLabel(7,
"Sector7",1);
656 wheelSlopeHistos[3]->setBinLabel(8,
"Sector8",1);
657 wheelSlopeHistos[3]->setBinLabel(9,
"Sector9",1);
658 wheelSlopeHistos[3]->setBinLabel(10,
"Sector10",1);
659 wheelSlopeHistos[3]->setBinLabel(11,
"Sector11",1);
660 wheelSlopeHistos[3]->setBinLabel(12,
"Sector12",1);
661 wheelSlopeHistos[3]->setBinLabel(13,
"Sector13",1);
662 wheelSlopeHistos[3]->setBinLabel(14,
"Sector14",1);
663 wheelSlopeHistos[3]->setBinLabel(1,
"Wheel-2",2);
664 wheelSlopeHistos[3]->setBinLabel(2,
"Wheel-1",2);
665 wheelSlopeHistos[3]->setBinLabel(3,
"Wheel0",2);
666 wheelSlopeHistos[3]->setBinLabel(4,
"Wheel+1",2);
667 wheelSlopeHistos[3]->setBinLabel(5,
"Wheel+2",2);
671 stringstream wheel; wheel <<wh;
673 if(wheelMeanHistos.find(wh) == wheelMeanHistos.end()){
674 string histoName =
"MeanSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str();
675 wheelMeanHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
676 wheelMeanHistos[wh]->setBinLabel(1,
"Sector1",1);
677 wheelMeanHistos[wh]->setBinLabel(2,
"Sector2",1);
678 wheelMeanHistos[wh]->setBinLabel(3,
"Sector3",1);
679 wheelMeanHistos[wh]->setBinLabel(4,
"Sector4",1);
680 wheelMeanHistos[wh]->setBinLabel(5,
"Sector5",1);
681 wheelMeanHistos[wh]->setBinLabel(6,
"Sector6",1);
682 wheelMeanHistos[wh]->setBinLabel(7,
"Sector7",1);
683 wheelMeanHistos[wh]->setBinLabel(8,
"Sector8",1);
684 wheelMeanHistos[wh]->setBinLabel(9,
"Sector9",1);
685 wheelMeanHistos[wh]->setBinLabel(10,
"Sector10",1);
686 wheelMeanHistos[wh]->setBinLabel(11,
"Sector11",1);
687 wheelMeanHistos[wh]->setBinLabel(12,
"Sector12",1);
688 wheelMeanHistos[wh]->setBinLabel(13,
"Sector13",1);
689 wheelMeanHistos[wh]->setBinLabel(14,
"Sector14",1);
690 wheelMeanHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
691 wheelMeanHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
692 wheelMeanHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
693 wheelMeanHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
694 wheelMeanHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
695 wheelMeanHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
696 wheelMeanHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
697 wheelMeanHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
698 wheelMeanHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
699 wheelMeanHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
700 wheelMeanHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
703 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
704 if(wheelSigmaHistos.find(wh) == wheelSigmaHistos.end()){
705 string histoName =
"SigmaSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str();
706 wheelSigmaHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
707 wheelSigmaHistos[wh]->setBinLabel(1,
"Sector1",1);
708 wheelSigmaHistos[wh]->setBinLabel(2,
"Sector2",1);
709 wheelSigmaHistos[wh]->setBinLabel(3,
"Sector3",1);
710 wheelSigmaHistos[wh]->setBinLabel(4,
"Sector4",1);
711 wheelSigmaHistos[wh]->setBinLabel(5,
"Sector5",1);
712 wheelSigmaHistos[wh]->setBinLabel(6,
"Sector6",1);
713 wheelSigmaHistos[wh]->setBinLabel(7,
"Sector7",1);
714 wheelSigmaHistos[wh]->setBinLabel(8,
"Sector8",1);
715 wheelSigmaHistos[wh]->setBinLabel(9,
"Sector9",1);
716 wheelSigmaHistos[wh]->setBinLabel(10,
"Sector10",1);
717 wheelSigmaHistos[wh]->setBinLabel(11,
"Sector11",1);
718 wheelSigmaHistos[wh]->setBinLabel(12,
"Sector12",1);
719 wheelSigmaHistos[wh]->setBinLabel(13,
"Sector13",1);
720 wheelSigmaHistos[wh]->setBinLabel(14,
"Sector14",1);
721 wheelSigmaHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
722 wheelSigmaHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
723 wheelSigmaHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
724 wheelSigmaHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
725 wheelSigmaHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
726 wheelSigmaHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
727 wheelSigmaHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
728 wheelSigmaHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
729 wheelSigmaHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
730 wheelSigmaHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
731 wheelSigmaHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
735 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
736 if(wheelSlopeHistos.find(wh) == wheelSlopeHistos.end()){
737 string histoName =
"SlopeSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str();
738 wheelSlopeHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
739 wheelSlopeHistos[wh]->setBinLabel(1,
"Sector1",1);
740 wheelSlopeHistos[wh]->setBinLabel(2,
"Sector2",1);
741 wheelSlopeHistos[wh]->setBinLabel(3,
"Sector3",1);
742 wheelSlopeHistos[wh]->setBinLabel(4,
"Sector4",1);
743 wheelSlopeHistos[wh]->setBinLabel(5,
"Sector5",1);
744 wheelSlopeHistos[wh]->setBinLabel(6,
"Sector6",1);
745 wheelSlopeHistos[wh]->setBinLabel(7,
"Sector7",1);
746 wheelSlopeHistos[wh]->setBinLabel(8,
"Sector8",1);
747 wheelSlopeHistos[wh]->setBinLabel(9,
"Sector9",1);
748 wheelSlopeHistos[wh]->setBinLabel(10,
"Sector10",1);
749 wheelSlopeHistos[wh]->setBinLabel(11,
"Sector11",1);
750 wheelSlopeHistos[wh]->setBinLabel(12,
"Sector12",1);
751 wheelSlopeHistos[wh]->setBinLabel(13,
"Sector13",1);
752 wheelSlopeHistos[wh]->setBinLabel(14,
"Sector14",1);
753 wheelSlopeHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
754 wheelSlopeHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
755 wheelSlopeHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
756 wheelSlopeHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
757 wheelSlopeHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
758 wheelSlopeHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
759 wheelSlopeHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
760 wheelSlopeHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
761 wheelSlopeHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
762 wheelSlopeHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
763 wheelSlopeHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
770 return (
int) (bin /3.1)+1;
776 if(ret == 0 || bin == 11) ret = 3;
LuminosityBlockID id() const
DTResolutionTest(const edm::ParameterSet &ps)
Constructor.
T getUntrackedParameter(std::string const &, T const &) const
const QReport * getQReport(const std::string &qtname) const
get QReport corresponding to <qtname> (null pointer if QReport does not exist)
static const double slope[3]
void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
DQM Client Diagnostic.
void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
std::string getMEName(const DTSuperLayerId &slID)
Get the ME name.
void analyze(const edm::Event &e, const edm::EventSetup &c)
Analyze.
Abs< T >::type abs(const T &t)
int superLayer() const
Return the superlayer number.
const std::vector< DQMChannel > & getBadChannels(void) const
virtual ~DTResolutionTest()
Destructor.
int superlayer() const
Return the superlayer number (deprecated method name)
void bookHistos(const DTChamberId &ch)
book the new ME
std::string getMEName2D(const DTSuperLayerId &slID)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
LuminosityBlockNumber_t luminosityBlock() const
int slFromBin(int bin) const
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