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 prof->Fit(
"pol1",
"Q0");
262 edm::LogError (
"resolution") <<
"[DTResolutionTest]: Exception when fitting..."
263 <<
"SuperLayer : " << slID <<
"\n"
264 <<
" STEP : " <<
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") <<
"\n"
265 <<
"Filling slope histogram with standard value -99. for bin " << BinNumber;
266 SlopeHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, -99.);
269 TF1 *fitting = prof->GetFunction(
"pol1");
270 double slope = fitting->GetParameter(1);
271 SlopeHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, slope);
279 string MeanCriterionName =
parameters.getUntrackedParameter<
string>(
"meanTestName",
"ResidualsMeanInRange");
280 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hMean = MeanHistos.begin();
281 hMean != MeanHistos.end();
283 const QReport * theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
284 stringstream wheel; wheel << (*hMean).first.first;
285 stringstream sector; sector << (*hMean).first.second;
288 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
289 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
290 channel != badChannels.end(); channel++) {
291 edm::LogError(
"resolution") <<
"Bad mean channel: wh: " << wheel.str()
292 <<
" st: " << stationFromBin((*channel).getBin())
293 <<
" sect: " <<sector.str()
294 <<
" sl: " << slFromBin((*channel).getBin())
295 <<
" mean (cm): " << (*channel).getContents();
296 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
297 if(
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")){
298 MeanHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
299 MeanHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
302 if(
abs((*channel).getContents())<
parameters.getUntrackedParameter<
double>(
"meanMaxLimit"))
303 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1,1);
305 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1,2);
308 if(
abs((*channel).getContents())>
parameters.getUntrackedParameter<
double>(
"meanMaxLimit")){
309 cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)]++;
310 if(((*hMean).first.second<13 &&
311 double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/11>
double(percentual)/100 &&
312 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==
false) ||
313 ((*hMean).first.first>=13 &&
314 double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/2>
double(percentual)/100 &&
315 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==
false)){
316 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]=
true;
317 wheelMeanHistos[3]->Fill(((*hMean).first.second)-1,(*hMean).first.first);
327 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
328 string SigmaCriterionName =
parameters.getUntrackedParameter<
string>(
"sigmaTestName",
"ResidualsSigmaInRange");
329 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hSigma = SigmaHistos.begin();
330 hSigma != SigmaHistos.end();
332 const QReport * theSigmaQReport = (*hSigma).second->getQReport(SigmaCriterionName);
333 stringstream wheel; wheel << (*hSigma).first.first;
334 stringstream sector; sector << (*hSigma).first.second;
335 if(theSigmaQReport) {
336 vector<dqm::me_util::Channel> badChannels = theSigmaQReport->
getBadChannels();
337 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
338 channel != badChannels.end(); channel++) {
339 edm::LogError(
"resolution") <<
"Bad sigma: wh: " << wheel.str()
340 <<
" st: " << stationFromBin((*channel).getBin())
341 <<
" sect: " <<sector.str()
342 <<
" sl: " << slFromBin((*channel).getBin())
343 <<
" sigma (cm): " << (*channel).getContents();
344 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
345 SigmaHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
346 SigmaHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
348 wheelSigmaHistos[(*hSigma).first.first]->Fill(((*hSigma).first.second)-1,(*channel).getBin()-1);
351 cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)]++;
352 if(((*hSigma).first.second<13 &&
353 double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/11>
double(percentual)/100 &&
354 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==
false) ||
355 ((*hSigma).first.first>=13 &&
356 double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/2>
double(percentual)/100 &&
357 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==
false)){
358 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]=
true;
359 wheelSigmaHistos[3]->Fill((*hSigma).first.second-1,(*hSigma).first.first);
369 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
370 string SlopeCriterionName =
parameters.getUntrackedParameter<
string>(
"slopeTestName",
"ResidualsSlopeInRange");
371 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hSlope = SlopeHistos.begin();
372 hSlope != SlopeHistos.end();
374 const QReport * theSlopeQReport = (*hSlope).second->getQReport(SlopeCriterionName);
375 stringstream wheel; wheel << (*hSlope).first.first;
376 stringstream sector; sector << (*hSlope).first.second;
377 if(theSlopeQReport) {
378 vector<dqm::me_util::Channel> badChannels = theSlopeQReport->
getBadChannels();
379 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
380 channel != badChannels.end(); channel++) {
381 edm::LogError(
"resolution") <<
"Bad slope: wh: " << wheel.str()
382 <<
" st: " << stationFromBin((*channel).getBin())
383 <<
" sect: " <<sector.str()
384 <<
" sl: " << slFromBin((*channel).getBin())
385 <<
" slope: " << (*channel).getContents();
386 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
387 SlopeHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
388 SlopeHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
390 wheelSlopeHistos[(*hSlope).first.first]->Fill(((*hSlope).first.second)-1,(*channel).getBin()-1);
393 cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)]++;
394 if(((*hSlope).first.second<13 &&
395 double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/11>
double(percentual)/100 &&
396 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==
false) ||
397 ((*hSlope).first.first>=13 &&
398 double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/2>
double(percentual)/100 &&
399 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==
false)){
400 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]=
true;
401 wheelSlopeHistos[3]->Fill((*hSlope).first.second-1,(*hSlope).first.first);
419 bool outputMEsInRootFile =
parameters.getParameter<
bool>(
"OutputMEsInRootFile");
420 if(outputMEsInRootFile){
422 dbe->save(outputFileName,
"DT/CalibrationSummary");
431 stringstream wheel; wheel << slID.
wheel();
433 stringstream sector; sector << slID.
sector();
434 stringstream superLayer; superLayer << slID.
superlayer();
436 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
439 if(
parameters.getUntrackedParameter<
bool>(
"calibModule",
false)){
441 folderRoot +
"DT/DTCalibValidation/Wheel" + wheel.str() +
442 "/Station" + station.str() +
443 "/Sector" + sector.str() +
"/";
447 folderRoot +
"DT/DTResolutionAnalysisTask/Wheel" + wheel.str() +
448 "/Station" + station.str() +
449 "/Sector" + sector.str() +
"/";
452 string histoTag =
parameters.getUntrackedParameter<
string>(
"histoTag",
"hResDist");
454 string histoname = folderName + histoTag
456 +
"_St" + station.str()
457 +
"_Sec" + sector.str()
458 +
"_SL" + superLayer.str();
467 stringstream wheel; wheel << slID.
wheel();
469 stringstream sector; sector << slID.
sector();
470 stringstream superLayer; superLayer << slID.
superlayer();
472 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
475 if(
parameters.getUntrackedParameter<
bool>(
"calibModule",
false)){
477 folderRoot +
"DT/DTCalibValidation/Wheel" + wheel.str() +
478 "/Station" + station.str() +
479 "/Sector" + sector.str() +
"/";
483 folderRoot +
"DT/DTResolutionAnalysisTask/Wheel" + wheel.str() +
484 "/Station" + station.str() +
485 "/Sector" + sector.str() +
"/";
488 string histoTag2D =
parameters.getUntrackedParameter<
string>(
"histoTag2D",
"hResDistVsDist");
490 string histoname = folderName + histoTag2D
492 +
"_St" + station.str()
493 +
"_Sec" + sector.str()
494 +
"_SL" + superLayer.str();
504 stringstream wheel; wheel << ch.
wheel();
505 stringstream sector; sector << ch.
sector();
508 string MeanHistoName =
"MeanTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
509 string SigmaHistoName =
"SigmaTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
510 string SlopeHistoName =
"SlopeTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
512 dbe->setCurrentFolder(
"DT/Tests/DTResolution");
515 MeanHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(MeanHistoName.c_str(),MeanHistoName.c_str(),11,0,11);
516 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
517 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
518 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
519 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
520 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
521 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
522 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
523 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
524 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
525 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
526 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
530 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
531 SigmaHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(SigmaHistoName.c_str(),SigmaHistoName.c_str(),11,0,11);
532 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
533 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
534 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
535 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
536 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
537 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
538 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
539 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
540 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
541 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
542 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
546 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
547 SlopeHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(SlopeHistoName.c_str(),SlopeHistoName.c_str(),11,0,11);
548 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
549 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
550 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
551 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
552 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
553 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
554 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
555 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
556 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
557 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
558 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
561 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
563 if(
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")){
564 string MeanHistoNameSetRange =
"MeanWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
565 MeanHistosSetRange[
HistoName] = dbe->book1D(MeanHistoNameSetRange.c_str(),MeanHistoNameSetRange.c_str(),11,0.5,11.5);
566 string MeanHistoNameSetRange2D =
"MeanWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
567 MeanHistosSetRange2D[
HistoName] = dbe->book2D(MeanHistoNameSetRange2D.c_str(),MeanHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 100, -0.05, 0.05);
570 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
571 string SigmaHistoNameSetRange =
"SigmaWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
572 SigmaHistosSetRange[
HistoName] = dbe->book1D(SigmaHistoNameSetRange.c_str(),SigmaHistoNameSetRange.c_str(),11,0.5,11.5);
573 string SigmaHistoNameSetRange2D =
"SigmaWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
574 SigmaHistosSetRange2D[
HistoName] = dbe->book2D(SigmaHistoNameSetRange2D.c_str(),SigmaHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 500, 0, 0.5);
577 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
578 string SlopeHistoNameSetRange =
"SlopeWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
579 SlopeHistosSetRange[
HistoName] = dbe->book1D(SlopeHistoNameSetRange.c_str(),SlopeHistoNameSetRange.c_str(),11,0.5,11.5);
580 string SlopeHistoNameSetRange2D =
"SlopeWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
581 SlopeHistosSetRange2D[
HistoName] = dbe->book2D(SlopeHistoNameSetRange2D.c_str(),SlopeHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 200, -0.1, 0.1);
589 dbe->setCurrentFolder(
"DT/CalibrationSummary");
591 if(wheelMeanHistos.find(3) == wheelMeanHistos.end()){
592 string histoName =
"MeanSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
593 wheelMeanHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
594 wheelMeanHistos[3]->setBinLabel(1,
"Sector1",1);
595 wheelMeanHistos[3]->setBinLabel(1,
"Sector1",1);
596 wheelMeanHistos[3]->setBinLabel(2,
"Sector2",1);
597 wheelMeanHistos[3]->setBinLabel(3,
"Sector3",1);
598 wheelMeanHistos[3]->setBinLabel(4,
"Sector4",1);
599 wheelMeanHistos[3]->setBinLabel(5,
"Sector5",1);
600 wheelMeanHistos[3]->setBinLabel(6,
"Sector6",1);
601 wheelMeanHistos[3]->setBinLabel(7,
"Sector7",1);
602 wheelMeanHistos[3]->setBinLabel(8,
"Sector8",1);
603 wheelMeanHistos[3]->setBinLabel(9,
"Sector9",1);
604 wheelMeanHistos[3]->setBinLabel(10,
"Sector10",1);
605 wheelMeanHistos[3]->setBinLabel(11,
"Sector11",1);
606 wheelMeanHistos[3]->setBinLabel(12,
"Sector12",1);
607 wheelMeanHistos[3]->setBinLabel(13,
"Sector13",1);
608 wheelMeanHistos[3]->setBinLabel(14,
"Sector14",1);
609 wheelMeanHistos[3]->setBinLabel(1,
"Wheel-2",2);
610 wheelMeanHistos[3]->setBinLabel(2,
"Wheel-1",2);
611 wheelMeanHistos[3]->setBinLabel(3,
"Wheel0",2);
612 wheelMeanHistos[3]->setBinLabel(4,
"Wheel+1",2);
613 wheelMeanHistos[3]->setBinLabel(5,
"Wheel+2",2);
616 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
617 if(wheelSigmaHistos.find(3) == wheelSigmaHistos.end()){
618 string histoName =
"SigmaSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
619 wheelSigmaHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
620 wheelSigmaHistos[3]->setBinLabel(1,
"Sector1",1);
621 wheelSigmaHistos[3]->setBinLabel(1,
"Sector1",1);
622 wheelSigmaHistos[3]->setBinLabel(2,
"Sector2",1);
623 wheelSigmaHistos[3]->setBinLabel(3,
"Sector3",1);
624 wheelSigmaHistos[3]->setBinLabel(4,
"Sector4",1);
625 wheelSigmaHistos[3]->setBinLabel(5,
"Sector5",1);
626 wheelSigmaHistos[3]->setBinLabel(6,
"Sector6",1);
627 wheelSigmaHistos[3]->setBinLabel(7,
"Sector7",1);
628 wheelSigmaHistos[3]->setBinLabel(8,
"Sector8",1);
629 wheelSigmaHistos[3]->setBinLabel(9,
"Sector9",1);
630 wheelSigmaHistos[3]->setBinLabel(10,
"Sector10",1);
631 wheelSigmaHistos[3]->setBinLabel(11,
"Sector11",1);
632 wheelSigmaHistos[3]->setBinLabel(12,
"Sector12",1);
633 wheelSigmaHistos[3]->setBinLabel(13,
"Sector13",1);
634 wheelSigmaHistos[3]->setBinLabel(14,
"Sector14",1);
635 wheelSigmaHistos[3]->setBinLabel(1,
"Wheel-2",2);
636 wheelSigmaHistos[3]->setBinLabel(2,
"Wheel-1",2);
637 wheelSigmaHistos[3]->setBinLabel(3,
"Wheel0",2);
638 wheelSigmaHistos[3]->setBinLabel(4,
"Wheel+1",2);
639 wheelSigmaHistos[3]->setBinLabel(5,
"Wheel+2",2);
643 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
644 if(wheelSlopeHistos.find(3) == wheelSlopeHistos.end()){
645 string histoName =
"SlopeSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
646 wheelSlopeHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
647 wheelSlopeHistos[3]->setBinLabel(1,
"Sector1",1);
648 wheelSlopeHistos[3]->setBinLabel(1,
"Sector1",1);
649 wheelSlopeHistos[3]->setBinLabel(2,
"Sector2",1);
650 wheelSlopeHistos[3]->setBinLabel(3,
"Sector3",1);
651 wheelSlopeHistos[3]->setBinLabel(4,
"Sector4",1);
652 wheelSlopeHistos[3]->setBinLabel(5,
"Sector5",1);
653 wheelSlopeHistos[3]->setBinLabel(6,
"Sector6",1);
654 wheelSlopeHistos[3]->setBinLabel(7,
"Sector7",1);
655 wheelSlopeHistos[3]->setBinLabel(8,
"Sector8",1);
656 wheelSlopeHistos[3]->setBinLabel(9,
"Sector9",1);
657 wheelSlopeHistos[3]->setBinLabel(10,
"Sector10",1);
658 wheelSlopeHistos[3]->setBinLabel(11,
"Sector11",1);
659 wheelSlopeHistos[3]->setBinLabel(12,
"Sector12",1);
660 wheelSlopeHistos[3]->setBinLabel(13,
"Sector13",1);
661 wheelSlopeHistos[3]->setBinLabel(14,
"Sector14",1);
662 wheelSlopeHistos[3]->setBinLabel(1,
"Wheel-2",2);
663 wheelSlopeHistos[3]->setBinLabel(2,
"Wheel-1",2);
664 wheelSlopeHistos[3]->setBinLabel(3,
"Wheel0",2);
665 wheelSlopeHistos[3]->setBinLabel(4,
"Wheel+1",2);
666 wheelSlopeHistos[3]->setBinLabel(5,
"Wheel+2",2);
670 stringstream wheel; wheel <<wh;
672 if(wheelMeanHistos.find(wh) == wheelMeanHistos.end()){
673 string histoName =
"MeanSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str();
674 wheelMeanHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
675 wheelMeanHistos[wh]->setBinLabel(1,
"Sector1",1);
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") +
"_W" + wheel.str();
705 wheelSigmaHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
706 wheelSigmaHistos[wh]->setBinLabel(1,
"Sector1",1);
707 wheelSigmaHistos[wh]->setBinLabel(2,
"Sector2",1);
708 wheelSigmaHistos[wh]->setBinLabel(3,
"Sector3",1);
709 wheelSigmaHistos[wh]->setBinLabel(4,
"Sector4",1);
710 wheelSigmaHistos[wh]->setBinLabel(5,
"Sector5",1);
711 wheelSigmaHistos[wh]->setBinLabel(6,
"Sector6",1);
712 wheelSigmaHistos[wh]->setBinLabel(7,
"Sector7",1);
713 wheelSigmaHistos[wh]->setBinLabel(8,
"Sector8",1);
714 wheelSigmaHistos[wh]->setBinLabel(9,
"Sector9",1);
715 wheelSigmaHistos[wh]->setBinLabel(10,
"Sector10",1);
716 wheelSigmaHistos[wh]->setBinLabel(11,
"Sector11",1);
717 wheelSigmaHistos[wh]->setBinLabel(12,
"Sector12",1);
718 wheelSigmaHistos[wh]->setBinLabel(13,
"Sector13",1);
719 wheelSigmaHistos[wh]->setBinLabel(14,
"Sector14",1);
720 wheelSigmaHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
721 wheelSigmaHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
722 wheelSigmaHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
723 wheelSigmaHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
724 wheelSigmaHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
725 wheelSigmaHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
726 wheelSigmaHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
727 wheelSigmaHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
728 wheelSigmaHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
729 wheelSigmaHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
730 wheelSigmaHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
734 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
735 if(wheelSlopeHistos.find(wh) == wheelSlopeHistos.end()){
736 string histoName =
"SlopeSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str();
737 wheelSlopeHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
738 wheelSlopeHistos[wh]->setBinLabel(1,
"Sector1",1);
739 wheelSlopeHistos[wh]->setBinLabel(2,
"Sector2",1);
740 wheelSlopeHistos[wh]->setBinLabel(3,
"Sector3",1);
741 wheelSlopeHistos[wh]->setBinLabel(4,
"Sector4",1);
742 wheelSlopeHistos[wh]->setBinLabel(5,
"Sector5",1);
743 wheelSlopeHistos[wh]->setBinLabel(6,
"Sector6",1);
744 wheelSlopeHistos[wh]->setBinLabel(7,
"Sector7",1);
745 wheelSlopeHistos[wh]->setBinLabel(8,
"Sector8",1);
746 wheelSlopeHistos[wh]->setBinLabel(9,
"Sector9",1);
747 wheelSlopeHistos[wh]->setBinLabel(10,
"Sector10",1);
748 wheelSlopeHistos[wh]->setBinLabel(11,
"Sector11",1);
749 wheelSlopeHistos[wh]->setBinLabel(12,
"Sector12",1);
750 wheelSlopeHistos[wh]->setBinLabel(13,
"Sector13",1);
751 wheelSlopeHistos[wh]->setBinLabel(14,
"Sector14",1);
752 wheelSlopeHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
753 wheelSlopeHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
754 wheelSlopeHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
755 wheelSlopeHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
756 wheelSlopeHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
757 wheelSlopeHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
758 wheelSlopeHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
759 wheelSlopeHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
760 wheelSlopeHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
761 wheelSlopeHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
762 wheelSlopeHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
769 return (
int) (bin /3.1)+1;
775 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