56 percentual =
parameters.getUntrackedParameter<
int>(
"BadSLpercentual", 10);
79 for(
int wheel=-2; wheel<3; wheel++){
82 vector<DTChamber*>
chambers = muonGeom->chambers();
83 for(vector<DTChamber*>::const_iterator chamber = chambers.begin();
84 chamber != chambers.end(); ++chamber) {
93 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: Begin of LS transition";
118 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: End of LS transition, performing the DQM client operation";
126 for(map<int, MonitorElement*> ::const_iterator
histo = wheelMeanHistos.begin();
127 histo != wheelMeanHistos.end();
129 (*histo).second->Reset();
131 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
132 for(map<int, MonitorElement*> ::const_iterator
histo = wheelSigmaHistos.begin();
133 histo != wheelSigmaHistos.end();
135 (*histo).second->Reset();
138 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
139 for(map<int, MonitorElement*> ::const_iterator
histo = wheelSlopeHistos.begin();
140 histo != wheelSlopeHistos.end();
142 (*histo).second->Reset();
146 cmsMeanHistos.clear();
147 for(
int i=-2;
i<3;
i++){
148 for(
int j=1;
j<15;
j++){
149 MeanFilled[make_pair(
i,
j)]=
false;
152 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
153 cmsSigmaHistos.clear();
154 for(
int i=-2;
i<3;
i++){
155 for(
int j=1;
j<15;
j++){
156 SigmaFilled[make_pair(
i,
j)]=
false;
160 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
161 cmsSlopeHistos.clear();
162 for(
int i=-2;
i<3;
i++){
163 for(
int j=1;
j<15;
j++){
164 SlopeFilled[make_pair(
i,
j)]=
false;
171 for(
int wh=-2; wh<=3; wh++){
173 for(
int xBin=0; xBin<14; xBin++){
174 for(
int yBin=0; yBin<11; yBin++){
175 wheelMeanHistos[wh]->setBinContent(xBin,yBin,0);
176 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
177 wheelSigmaHistos[wh]->setBinContent(xBin,yBin,0);
178 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest"))
179 wheelSlopeHistos[wh]->setBinContent(xBin,yBin,0);
184 for(
int xBin=0; xBin<14; xBin++){
185 for(
int yBin=-2; yBin<3; yBin++){
186 wheelMeanHistos[wh]->setBinContent(xBin,yBin,0);
187 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
188 wheelSigmaHistos[wh]->setBinContent(xBin,yBin,0);
189 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest"))
190 wheelSlopeHistos[wh]->setBinContent(xBin,yBin,0);
197 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: "<<nLumiSegs<<
" updates";
199 vector<DTChamber*>::const_iterator ch_it = muonGeom->chambers().begin();
200 vector<DTChamber*>::const_iterator ch_end = muonGeom->chambers().end();
202 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: Residual Distribution tests results";
204 for (; ch_it != ch_end; ++ch_it) {
210 if(chID.
station() == 1) entry=0;
211 if(chID.
station() == 2) entry=3;
212 if(chID.
station() == 3) entry=6;
213 if(chID.
station() == 4) entry=9;
215 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
216 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
218 for(; sl_it != sl_end; ++sl_it) {
222 edm::LogVerbatim (
"resolution") <<
"[DTResolutionTest]: Superlayer: " << slID;
224 stringstream wheel; wheel << slID.
wheel();
226 stringstream sector; sector << slID.
sector();
227 stringstream superLayer; superLayer << slID.
superlayer();
229 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
230 string supLayer =
"W" + wheel.str() +
"_St" + station.str() +
"_Sec" + sector.str() +
"_SL" + superLayer.str();
235 string GaussianCriterionName =
236 parameters.getUntrackedParameter<
string>(
"resDistributionTestName",
237 "ResidualsDistributionGaussianTest");
244 if(BinNumber == 12) BinNumber=11;
245 float mean = (*res_histo).getMean(1);
246 float sigma = (*res_histo).getRMS(1);
247 MeanHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, mean);
248 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
249 SigmaHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, sigma);
252 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
255 TH2F * res_histo_2D_root = res_histo_2D->
getTH2F();
257 if(BinNumber == 12) BinNumber=11;
258 TProfile* prof = res_histo_2D_root->ProfileX();
259 prof->GetXaxis()->SetRangeUser(0,2);
262 prof->Fit(
"pol1",
"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 TF1 *fitting = prof->GetFunction(
"pol1");
272 double slope = fitting->GetParameter(1);
273 SlopeHistos.find(make_pair(slID.
wheel(),slID.
sector()))->second->setBinContent(BinNumber, slope);
281 string MeanCriterionName =
parameters.getUntrackedParameter<
string>(
"meanTestName",
"ResidualsMeanInRange");
282 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hMean = MeanHistos.begin();
283 hMean != MeanHistos.end();
285 const QReport * theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
286 stringstream wheel; wheel << (*hMean).first.first;
287 stringstream sector; sector << (*hMean).first.second;
290 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
291 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
292 channel != badChannels.end(); channel++) {
293 edm::LogError(
"resolution") <<
"Bad mean channel: wh: " << wheel.str()
294 <<
" st: " << stationFromBin((*channel).getBin())
295 <<
" sect: " <<sector.str()
296 <<
" sl: " << slFromBin((*channel).getBin())
297 <<
" mean (cm): " << (*channel).getContents();
298 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
299 if(
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")){
300 MeanHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
301 MeanHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
304 if(
abs((*channel).getContents())<
parameters.getUntrackedParameter<
double>(
"meanMaxLimit"))
305 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1,1);
307 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second)-1,(*channel).getBin()-1,2);
310 if(
abs((*channel).getContents())>
parameters.getUntrackedParameter<
double>(
"meanMaxLimit")){
311 cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)]++;
312 if(((*hMean).first.second<13 &&
313 double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/11>
double(percentual)/100 &&
314 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==
false) ||
315 ((*hMean).first.first>=13 &&
316 double(cmsMeanHistos[make_pair((*hMean).first.first,(*hMean).first.second)])/2>
double(percentual)/100 &&
317 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]==
false)){
318 MeanFilled[make_pair((*hMean).first.first,(*hMean).first.second)]=
true;
319 wheelMeanHistos[3]->Fill(((*hMean).first.second)-1,(*hMean).first.first);
329 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
330 string SigmaCriterionName =
parameters.getUntrackedParameter<
string>(
"sigmaTestName",
"ResidualsSigmaInRange");
331 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hSigma = SigmaHistos.begin();
332 hSigma != SigmaHistos.end();
334 const QReport * theSigmaQReport = (*hSigma).second->getQReport(SigmaCriterionName);
335 stringstream wheel; wheel << (*hSigma).first.first;
336 stringstream sector; sector << (*hSigma).first.second;
337 if(theSigmaQReport) {
338 vector<dqm::me_util::Channel> badChannels = theSigmaQReport->
getBadChannels();
339 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
340 channel != badChannels.end(); channel++) {
341 edm::LogError(
"resolution") <<
"Bad sigma: wh: " << wheel.str()
342 <<
" st: " << stationFromBin((*channel).getBin())
343 <<
" sect: " <<sector.str()
344 <<
" sl: " << slFromBin((*channel).getBin())
345 <<
" sigma (cm): " << (*channel).getContents();
346 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
347 SigmaHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
348 SigmaHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
350 wheelSigmaHistos[(*hSigma).first.first]->Fill(((*hSigma).first.second)-1,(*channel).getBin()-1);
353 cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)]++;
354 if(((*hSigma).first.second<13 &&
355 double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/11>
double(percentual)/100 &&
356 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==
false) ||
357 ((*hSigma).first.first>=13 &&
358 double(cmsSigmaHistos[make_pair((*hSigma).first.first,(*hSigma).first.second)])/2>
double(percentual)/100 &&
359 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]==
false)){
360 SigmaFilled[make_pair((*hSigma).first.first,(*hSigma).first.second)]=
true;
361 wheelSigmaHistos[3]->Fill((*hSigma).first.second-1,(*hSigma).first.first);
371 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
372 string SlopeCriterionName =
parameters.getUntrackedParameter<
string>(
"slopeTestName",
"ResidualsSlopeInRange");
373 for(
map<pair<int,int>,
MonitorElement*>::const_iterator hSlope = SlopeHistos.begin();
374 hSlope != SlopeHistos.end();
376 const QReport * theSlopeQReport = (*hSlope).second->getQReport(SlopeCriterionName);
377 stringstream wheel; wheel << (*hSlope).first.first;
378 stringstream sector; sector << (*hSlope).first.second;
379 if(theSlopeQReport) {
380 vector<dqm::me_util::Channel> badChannels = theSlopeQReport->
getBadChannels();
381 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
382 channel != badChannels.end(); channel++) {
383 edm::LogError(
"resolution") <<
"Bad slope: wh: " << wheel.str()
384 <<
" st: " << stationFromBin((*channel).getBin())
385 <<
" sect: " <<sector.str()
386 <<
" sl: " << slFromBin((*channel).getBin())
387 <<
" slope: " << (*channel).getContents();
388 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
389 SlopeHistosSetRange.find(HistoName)->second->Fill((*channel).getBin());
390 SlopeHistosSetRange2D.find(HistoName)->second->Fill((*channel).getBin(),(*channel).getContents());
392 wheelSlopeHistos[(*hSlope).first.first]->Fill(((*hSlope).first.second)-1,(*channel).getBin()-1);
395 cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)]++;
396 if(((*hSlope).first.second<13 &&
397 double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/11>
double(percentual)/100 &&
398 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==
false) ||
399 ((*hSlope).first.first>=13 &&
400 double(cmsSlopeHistos[make_pair((*hSlope).first.first,(*hSlope).first.second)])/2>
double(percentual)/100 &&
401 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]==
false)){
402 SlopeFilled[make_pair((*hSlope).first.first,(*hSlope).first.second)]=
true;
403 wheelSlopeHistos[3]->Fill((*hSlope).first.second-1,(*hSlope).first.first);
421 bool outputMEsInRootFile =
parameters.getParameter<
bool>(
"OutputMEsInRootFile");
422 if(outputMEsInRootFile){
424 dbe->save(outputFileName,
"DT/CalibrationSummary");
433 stringstream wheel; wheel << slID.
wheel();
435 stringstream sector; sector << slID.
sector();
436 stringstream superLayer; superLayer << slID.
superlayer();
438 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
441 if(
parameters.getUntrackedParameter<
bool>(
"calibModule",
false)){
443 folderRoot +
"DT/DTCalibValidation/Wheel" + wheel.str() +
444 "/Station" + station.str() +
445 "/Sector" + sector.str() +
"/";
449 folderRoot +
"DT/DTResolutionAnalysisTask/Wheel" + wheel.str() +
450 "/Station" + station.str() +
451 "/Sector" + sector.str() +
"/";
454 string histoTag =
parameters.getUntrackedParameter<
string>(
"histoTag",
"hResDist");
456 string histoname = folderName + histoTag
458 +
"_St" + station.str()
459 +
"_Sec" + sector.str()
460 +
"_SL" + superLayer.str();
469 stringstream wheel; wheel << slID.
wheel();
471 stringstream sector; sector << slID.
sector();
472 stringstream superLayer; superLayer << slID.
superlayer();
474 string folderRoot =
parameters.getUntrackedParameter<
string>(
"folderRoot",
"Collector/FU0/");
477 if(
parameters.getUntrackedParameter<
bool>(
"calibModule",
false)){
479 folderRoot +
"DT/DTCalibValidation/Wheel" + wheel.str() +
480 "/Station" + station.str() +
481 "/Sector" + sector.str() +
"/";
485 folderRoot +
"DT/DTResolutionAnalysisTask/Wheel" + wheel.str() +
486 "/Station" + station.str() +
487 "/Sector" + sector.str() +
"/";
490 string histoTag2D =
parameters.getUntrackedParameter<
string>(
"histoTag2D",
"hResDistVsDist");
492 string histoname = folderName + histoTag2D
494 +
"_St" + station.str()
495 +
"_Sec" + sector.str()
496 +
"_SL" + superLayer.str();
506 stringstream wheel; wheel << ch.
wheel();
507 stringstream sector; sector << ch.
sector();
510 string MeanHistoName =
"MeanTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
511 string SigmaHistoName =
"SigmaTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
512 string SlopeHistoName =
"SlopeTest_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str();
514 dbe->setCurrentFolder(
"DT/Tests/DTResolution");
517 MeanHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(MeanHistoName.c_str(),MeanHistoName.c_str(),11,0,11);
518 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
519 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
520 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
521 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
522 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
523 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
524 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
525 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
526 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
527 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
528 (MeanHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
532 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
533 SigmaHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(SigmaHistoName.c_str(),SigmaHistoName.c_str(),11,0,11);
534 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
535 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
536 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
537 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
538 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
539 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
540 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
541 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
542 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
543 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
544 (SigmaHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
548 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
549 SlopeHistos[make_pair(ch.
wheel(),ch.
sector())] = dbe->book1D(SlopeHistoName.c_str(),SlopeHistoName.c_str(),11,0,11);
550 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(1,
"MB1_SL1",1);
551 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(2,
"MB1_SL2",1);
552 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(3,
"MB1_SL3",1);
553 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(4,
"MB2_SL1",1);
554 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(5,
"MB2_SL2",1);
555 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(6,
"MB2_SL3",1);
556 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(7,
"MB3_SL1",1);
557 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(8,
"MB3_SL2",1);
558 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(9,
"MB3_SL3",1);
559 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(10,
"MB4_SL1",1);
560 (SlopeHistos[make_pair(ch.
wheel(),ch.
sector())])->setBinLabel(11,
"MB4_SL3",1);
563 string HistoName =
"W" + wheel.str() +
"_Sec" + sector.str();
565 if(
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")){
566 string MeanHistoNameSetRange =
"MeanWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
567 MeanHistosSetRange[
HistoName] = dbe->book1D(MeanHistoNameSetRange.c_str(),MeanHistoNameSetRange.c_str(),11,0.5,11.5);
568 string MeanHistoNameSetRange2D =
"MeanWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
569 MeanHistosSetRange2D[
HistoName] = dbe->book2D(MeanHistoNameSetRange2D.c_str(),MeanHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 100, -0.05, 0.05);
572 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
573 string SigmaHistoNameSetRange =
"SigmaWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
574 SigmaHistosSetRange[
HistoName] = dbe->book1D(SigmaHistoNameSetRange.c_str(),SigmaHistoNameSetRange.c_str(),11,0.5,11.5);
575 string SigmaHistoNameSetRange2D =
"SigmaWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
576 SigmaHistosSetRange2D[
HistoName] = dbe->book2D(SigmaHistoNameSetRange2D.c_str(),SigmaHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 500, 0, 0.5);
579 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
580 string SlopeHistoNameSetRange =
"SlopeWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange";
581 SlopeHistosSetRange[
HistoName] = dbe->book1D(SlopeHistoNameSetRange.c_str(),SlopeHistoNameSetRange.c_str(),11,0.5,11.5);
582 string SlopeHistoNameSetRange2D =
"SlopeWrong_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str() +
"_Sec" + sector.str() +
"_SetRange" +
"_2D";
583 SlopeHistosSetRange2D[
HistoName] = dbe->book2D(SlopeHistoNameSetRange2D.c_str(),SlopeHistoNameSetRange2D.c_str(),11, 0.5, 11.5, 200, -0.1, 0.1);
591 dbe->setCurrentFolder(
"DT/CalibrationSummary");
593 if(wheelMeanHistos.find(3) == wheelMeanHistos.end()){
594 string histoName =
"MeanSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
595 wheelMeanHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
596 wheelMeanHistos[3]->setBinLabel(1,
"Sector1",1);
597 wheelMeanHistos[3]->setBinLabel(1,
"Sector1",1);
598 wheelMeanHistos[3]->setBinLabel(2,
"Sector2",1);
599 wheelMeanHistos[3]->setBinLabel(3,
"Sector3",1);
600 wheelMeanHistos[3]->setBinLabel(4,
"Sector4",1);
601 wheelMeanHistos[3]->setBinLabel(5,
"Sector5",1);
602 wheelMeanHistos[3]->setBinLabel(6,
"Sector6",1);
603 wheelMeanHistos[3]->setBinLabel(7,
"Sector7",1);
604 wheelMeanHistos[3]->setBinLabel(8,
"Sector8",1);
605 wheelMeanHistos[3]->setBinLabel(9,
"Sector9",1);
606 wheelMeanHistos[3]->setBinLabel(10,
"Sector10",1);
607 wheelMeanHistos[3]->setBinLabel(11,
"Sector11",1);
608 wheelMeanHistos[3]->setBinLabel(12,
"Sector12",1);
609 wheelMeanHistos[3]->setBinLabel(13,
"Sector13",1);
610 wheelMeanHistos[3]->setBinLabel(14,
"Sector14",1);
611 wheelMeanHistos[3]->setBinLabel(1,
"Wheel-2",2);
612 wheelMeanHistos[3]->setBinLabel(2,
"Wheel-1",2);
613 wheelMeanHistos[3]->setBinLabel(3,
"Wheel0",2);
614 wheelMeanHistos[3]->setBinLabel(4,
"Wheel+1",2);
615 wheelMeanHistos[3]->setBinLabel(5,
"Wheel+2",2);
618 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
619 if(wheelSigmaHistos.find(3) == wheelSigmaHistos.end()){
620 string histoName =
"SigmaSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
621 wheelSigmaHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
622 wheelSigmaHistos[3]->setBinLabel(1,
"Sector1",1);
623 wheelSigmaHistos[3]->setBinLabel(1,
"Sector1",1);
624 wheelSigmaHistos[3]->setBinLabel(2,
"Sector2",1);
625 wheelSigmaHistos[3]->setBinLabel(3,
"Sector3",1);
626 wheelSigmaHistos[3]->setBinLabel(4,
"Sector4",1);
627 wheelSigmaHistos[3]->setBinLabel(5,
"Sector5",1);
628 wheelSigmaHistos[3]->setBinLabel(6,
"Sector6",1);
629 wheelSigmaHistos[3]->setBinLabel(7,
"Sector7",1);
630 wheelSigmaHistos[3]->setBinLabel(8,
"Sector8",1);
631 wheelSigmaHistos[3]->setBinLabel(9,
"Sector9",1);
632 wheelSigmaHistos[3]->setBinLabel(10,
"Sector10",1);
633 wheelSigmaHistos[3]->setBinLabel(11,
"Sector11",1);
634 wheelSigmaHistos[3]->setBinLabel(12,
"Sector12",1);
635 wheelSigmaHistos[3]->setBinLabel(13,
"Sector13",1);
636 wheelSigmaHistos[3]->setBinLabel(14,
"Sector14",1);
637 wheelSigmaHistos[3]->setBinLabel(1,
"Wheel-2",2);
638 wheelSigmaHistos[3]->setBinLabel(2,
"Wheel-1",2);
639 wheelSigmaHistos[3]->setBinLabel(3,
"Wheel0",2);
640 wheelSigmaHistos[3]->setBinLabel(4,
"Wheel+1",2);
641 wheelSigmaHistos[3]->setBinLabel(5,
"Wheel+2",2);
645 if(
parameters.getUntrackedParameter<
bool>(
"slopeTest")){
646 if(wheelSlopeHistos.find(3) == wheelSlopeHistos.end()){
647 string histoName =
"SlopeSummaryRes_testFailedByAtLeastBadSL_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3");
648 wheelSlopeHistos[3] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,5,-2,3);
649 wheelSlopeHistos[3]->setBinLabel(1,
"Sector1",1);
650 wheelSlopeHistos[3]->setBinLabel(1,
"Sector1",1);
651 wheelSlopeHistos[3]->setBinLabel(2,
"Sector2",1);
652 wheelSlopeHistos[3]->setBinLabel(3,
"Sector3",1);
653 wheelSlopeHistos[3]->setBinLabel(4,
"Sector4",1);
654 wheelSlopeHistos[3]->setBinLabel(5,
"Sector5",1);
655 wheelSlopeHistos[3]->setBinLabel(6,
"Sector6",1);
656 wheelSlopeHistos[3]->setBinLabel(7,
"Sector7",1);
657 wheelSlopeHistos[3]->setBinLabel(8,
"Sector8",1);
658 wheelSlopeHistos[3]->setBinLabel(9,
"Sector9",1);
659 wheelSlopeHistos[3]->setBinLabel(10,
"Sector10",1);
660 wheelSlopeHistos[3]->setBinLabel(11,
"Sector11",1);
661 wheelSlopeHistos[3]->setBinLabel(12,
"Sector12",1);
662 wheelSlopeHistos[3]->setBinLabel(13,
"Sector13",1);
663 wheelSlopeHistos[3]->setBinLabel(14,
"Sector14",1);
664 wheelSlopeHistos[3]->setBinLabel(1,
"Wheel-2",2);
665 wheelSlopeHistos[3]->setBinLabel(2,
"Wheel-1",2);
666 wheelSlopeHistos[3]->setBinLabel(3,
"Wheel0",2);
667 wheelSlopeHistos[3]->setBinLabel(4,
"Wheel+1",2);
668 wheelSlopeHistos[3]->setBinLabel(5,
"Wheel+2",2);
672 stringstream wheel; wheel <<wh;
674 if(wheelMeanHistos.find(wh) == wheelMeanHistos.end()){
675 string histoName =
"MeanSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str();
676 wheelMeanHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
677 wheelMeanHistos[wh]->setBinLabel(1,
"Sector1",1);
678 wheelMeanHistos[wh]->setBinLabel(2,
"Sector2",1);
679 wheelMeanHistos[wh]->setBinLabel(3,
"Sector3",1);
680 wheelMeanHistos[wh]->setBinLabel(4,
"Sector4",1);
681 wheelMeanHistos[wh]->setBinLabel(5,
"Sector5",1);
682 wheelMeanHistos[wh]->setBinLabel(6,
"Sector6",1);
683 wheelMeanHistos[wh]->setBinLabel(7,
"Sector7",1);
684 wheelMeanHistos[wh]->setBinLabel(8,
"Sector8",1);
685 wheelMeanHistos[wh]->setBinLabel(9,
"Sector9",1);
686 wheelMeanHistos[wh]->setBinLabel(10,
"Sector10",1);
687 wheelMeanHistos[wh]->setBinLabel(11,
"Sector11",1);
688 wheelMeanHistos[wh]->setBinLabel(12,
"Sector12",1);
689 wheelMeanHistos[wh]->setBinLabel(13,
"Sector13",1);
690 wheelMeanHistos[wh]->setBinLabel(14,
"Sector14",1);
691 wheelMeanHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
692 wheelMeanHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
693 wheelMeanHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
694 wheelMeanHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
695 wheelMeanHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
696 wheelMeanHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
697 wheelMeanHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
698 wheelMeanHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
699 wheelMeanHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
700 wheelMeanHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
701 wheelMeanHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
704 if(
parameters.getUntrackedParameter<
bool>(
"sigmaTest")){
705 if(wheelSigmaHistos.find(wh) == wheelSigmaHistos.end()){
706 string histoName =
"SigmaSummaryRes_testFailed_" +
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") +
"_W" + wheel.str();
707 wheelSigmaHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
708 wheelSigmaHistos[wh]->setBinLabel(1,
"Sector1",1);
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") +
"_W" + wheel.str();
739 wheelSlopeHistos[wh] = dbe->book2D(histoName.c_str(),histoName.c_str(),14,0,14,11,0,11);
740 wheelSlopeHistos[wh]->setBinLabel(1,
"Sector1",1);
741 wheelSlopeHistos[wh]->setBinLabel(2,
"Sector2",1);
742 wheelSlopeHistos[wh]->setBinLabel(3,
"Sector3",1);
743 wheelSlopeHistos[wh]->setBinLabel(4,
"Sector4",1);
744 wheelSlopeHistos[wh]->setBinLabel(5,
"Sector5",1);
745 wheelSlopeHistos[wh]->setBinLabel(6,
"Sector6",1);
746 wheelSlopeHistos[wh]->setBinLabel(7,
"Sector7",1);
747 wheelSlopeHistos[wh]->setBinLabel(8,
"Sector8",1);
748 wheelSlopeHistos[wh]->setBinLabel(9,
"Sector9",1);
749 wheelSlopeHistos[wh]->setBinLabel(10,
"Sector10",1);
750 wheelSlopeHistos[wh]->setBinLabel(11,
"Sector11",1);
751 wheelSlopeHistos[wh]->setBinLabel(12,
"Sector12",1);
752 wheelSlopeHistos[wh]->setBinLabel(13,
"Sector13",1);
753 wheelSlopeHistos[wh]->setBinLabel(14,
"Sector14",1);
754 wheelSlopeHistos[wh]->setBinLabel(1,
"MB1_SL1",2);
755 wheelSlopeHistos[wh]->setBinLabel(2,
"MB1_SL2",2);
756 wheelSlopeHistos[wh]->setBinLabel(3,
"MB1_SL3",2);
757 wheelSlopeHistos[wh]->setBinLabel(4,
"MB2_SL1",2);
758 wheelSlopeHistos[wh]->setBinLabel(5,
"MB2_SL2",2);
759 wheelSlopeHistos[wh]->setBinLabel(6,
"MB2_SL3",2);
760 wheelSlopeHistos[wh]->setBinLabel(7,
"MB3_SL1",2);
761 wheelSlopeHistos[wh]->setBinLabel(8,
"MB3_SL2",2);
762 wheelSlopeHistos[wh]->setBinLabel(9,
"MB3_SL3",2);
763 wheelSlopeHistos[wh]->setBinLabel(10,
"MB4_SL1",2);
764 wheelSlopeHistos[wh]->setBinLabel(11,
"MB4_SL3",2);
771 return (
int) (bin /3.1)+1;
777 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]
static char chambers[TOTALCHAMBERS][20]
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.
std::pair< std::string, MonitorElement * > entry
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
int wheel() const
Return the wheel number.
int stationFromBin(int bin) const