86 edm::LogVerbatim(
"resolution") <<
"[DTResolutionTest]: End of LS transition, performing the DQM client operation";
89 nLumiSegs = lumiSeg.id().luminosityBlock();
97 (*histo).second->Reset();
99 if (
parameters.getUntrackedParameter<
bool>(
"sigmaTest")) {
102 (*histo).second->Reset();
105 if (
parameters.getUntrackedParameter<
bool>(
"slopeTest")) {
108 (*histo).second->Reset();
113 for (
int i = -2;
i < 3;
i++) {
114 for (
int j = 1;
j < 15;
j++) {
118 if (
parameters.getUntrackedParameter<
bool>(
"sigmaTest")) {
120 for (
int i = -2;
i < 3;
i++) {
121 for (
int j = 1;
j < 15;
j++) {
126 if (
parameters.getUntrackedParameter<
bool>(
"slopeTest")) {
128 for (
int i = -2;
i < 3;
i++) {
129 for (
int j = 1;
j < 15;
j++) {
136 for (
int wh = -2; wh <= 3; wh++) {
141 if (
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
143 if (
parameters.getUntrackedParameter<
bool>(
"slopeTest"))
151 if (
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
153 if (
parameters.getUntrackedParameter<
bool>(
"slopeTest"))
162 vector<const DTChamber*>::const_iterator ch_it =
muonGeom->
chambers().begin();
163 vector<const DTChamber*>::const_iterator ch_end =
muonGeom->
chambers().end();
165 edm::LogVerbatim(
"resolution") <<
"[DTResolutionTest]: Residual Distribution tests results";
167 for (; ch_it != ch_end; ++ch_it) {
181 vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
182 vector<const DTSuperLayer*>::const_iterator sl_end = (*ch_it)->superLayers().end();
184 for (; sl_it != sl_end; ++sl_it) {
187 edm::LogVerbatim(
"resolution") <<
"[DTResolutionTest]: Superlayer: " << slID;
195 stringstream superLayer;
199 string supLayer =
"W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" + sector.str() +
"_SL" + superLayer.str();
204 string GaussianCriterionName =
205 parameters.getUntrackedParameter<
string>(
"resDistributionTestName",
"ResidualsDistributionGaussianTest");
207 if (GaussianReport) {
215 float mean = (*res_histo).getMean(1);
216 float sigma = (*res_histo).getRMS(1);
218 if (
parameters.getUntrackedParameter<
bool>(
"sigmaTest"))
222 if (
parameters.getUntrackedParameter<
bool>(
"slopeTest")) {
225 TH2F* res_histo_2D_root = res_histo_2D->
getTH2F();
229 TProfile* prof = res_histo_2D_root->ProfileX();
230 prof->GetXaxis()->SetRangeUser(0, 2);
233 TF1 fitting(
"mypol1",
"pol1");
235 prof->Fit(&fitting,
"Q0");
237 edm::LogError(
"resolution") <<
"[DTResolutionTest]: Exception when fitting..."
238 <<
"SuperLayer : " << slID <<
"\n"
240 <<
parameters.getUntrackedParameter<
string>(
"STEP",
"STEP3") <<
"\n"
241 <<
"Filling slope histogram with standard value -99. for bin " << BinNumber;
245 double slope = fitting.GetParameter(1);
253 string MeanCriterionName =
parameters.getUntrackedParameter<
string>(
"meanTestName",
"ResidualsMeanInRange");
256 const QReport* theMeanQReport = (*hMean).second->getQReport(MeanCriterionName);
258 wheel << (*hMean).first.first;
260 sector << (*hMean).first.second;
262 if (theMeanQReport) {
263 vector<dqm::me_util::Channel> badChannels = theMeanQReport->
getBadChannels();
264 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
267 <<
" st: " <<
stationFromBin((*channel).getBin()) <<
" sect: " << sector.str()
268 <<
" sl: " <<
slFromBin((*channel).getBin())
269 <<
" mean (cm): " << (*channel).getContents();
271 if (
parameters.getUntrackedParameter<
bool>(
"meanWrongHisto")) {
276 if (
abs((*channel).getContents()) <
parameters.getUntrackedParameter<
double>(
"meanMaxLimit"))
277 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second) - 1, (*channel).getBin() - 1, 1);
279 wheelMeanHistos[(*hMean).first.first]->Fill(((*hMean).first.second) - 1, (*channel).getBin() - 1, 2);
282 if (
abs((*channel).getContents()) >
parameters.getUntrackedParameter<
double>(
"meanMaxLimit")) {
283 cmsMeanHistos[make_pair((*hMean).first.first, (*hMean).first.second)]++;
284 if (((*hMean).first.second < 13 &&
285 double(
cmsMeanHistos[make_pair((*hMean).first.first, (*hMean).first.second)]) / 11 >
287 MeanFilled[make_pair((*hMean).first.first, (*hMean).first.second)] ==
false) ||
288 ((*hMean).first.first >= 13 &&
289 double(
cmsMeanHistos[make_pair((*hMean).first.first, (*hMean).first.second)]) / 2 >
291 MeanFilled[make_pair((*hMean).first.first, (*hMean).first.second)] ==
false)) {
292 MeanFilled[make_pair((*hMean).first.first, (*hMean).first.second)] =
true;
293 wheelMeanHistos[3]->Fill(((*hMean).first.second) - 1, (*hMean).first.first);
301 if (
parameters.getUntrackedParameter<
bool>(
"sigmaTest")) {
302 string SigmaCriterionName =
parameters.getUntrackedParameter<
string>(
"sigmaTestName",
"ResidualsSigmaInRange");
305 const QReport* theSigmaQReport = (*hSigma).second->getQReport(SigmaCriterionName);
307 wheel << (*hSigma).first.first;
309 sector << (*hSigma).first.second;
310 if (theSigmaQReport) {
311 vector<dqm::me_util::Channel> badChannels = theSigmaQReport->
getBadChannels();
312 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
315 <<
" st: " <<
stationFromBin((*channel).getBin()) <<
" sect: " << sector.str()
316 <<
" sl: " <<
slFromBin((*channel).getBin())
317 <<
" sigma (cm): " << (*channel).getContents();
322 wheelSigmaHistos[(*hSigma).first.first]->Fill(((*hSigma).first.second) - 1, (*channel).getBin() - 1);
325 cmsSigmaHistos[make_pair((*hSigma).first.first, (*hSigma).first.second)]++;
326 if (((*hSigma).first.second < 13 &&
327 double(
cmsSigmaHistos[make_pair((*hSigma).first.first, (*hSigma).first.second)]) / 11 >
329 SigmaFilled[make_pair((*hSigma).first.first, (*hSigma).first.second)] ==
false) ||
330 ((*hSigma).first.first >= 13 &&
331 double(
cmsSigmaHistos[make_pair((*hSigma).first.first, (*hSigma).first.second)]) / 2 >
333 SigmaFilled[make_pair((*hSigma).first.first, (*hSigma).first.second)] ==
false)) {
334 SigmaFilled[make_pair((*hSigma).first.first, (*hSigma).first.second)] =
true;
335 wheelSigmaHistos[3]->Fill((*hSigma).first.second - 1, (*hSigma).first.first);
343 if (
parameters.getUntrackedParameter<
bool>(
"slopeTest")) {
344 string SlopeCriterionName =
parameters.getUntrackedParameter<
string>(
"slopeTestName",
"ResidualsSlopeInRange");
347 const QReport* theSlopeQReport = (*hSlope).second->getQReport(SlopeCriterionName);
349 wheel << (*hSlope).first.first;
351 sector << (*hSlope).first.second;
352 if (theSlopeQReport) {
353 vector<dqm::me_util::Channel> badChannels = theSlopeQReport->
getBadChannels();
354 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
357 <<
" st: " <<
stationFromBin((*channel).getBin()) <<
" sect: " << sector.str()
358 <<
" sl: " <<
slFromBin((*channel).getBin())
359 <<
" slope: " << (*channel).getContents();
364 wheelSlopeHistos[(*hSlope).first.first]->Fill(((*hSlope).first.second) - 1, (*channel).getBin() - 1);
367 cmsSlopeHistos[make_pair((*hSlope).first.first, (*hSlope).first.second)]++;
368 if (((*hSlope).first.second < 13 &&
369 double(
cmsSlopeHistos[make_pair((*hSlope).first.first, (*hSlope).first.second)]) / 11 >
371 SlopeFilled[make_pair((*hSlope).first.first, (*hSlope).first.second)] ==
false) ||
372 ((*hSlope).first.first >= 13 &&
373 double(
cmsSlopeHistos[make_pair((*hSlope).first.first, (*hSlope).first.second)]) / 2 >
375 SlopeFilled[make_pair((*hSlope).first.first, (*hSlope).first.second)] ==
false)) {
376 SlopeFilled[make_pair((*hSlope).first.first, (*hSlope).first.second)] =
true;
377 wheelSlopeHistos[3]->Fill((*hSlope).first.second - 1, (*hSlope).first.first);