33 LogTrace(
"DTDQM|DTMonitorClient|DTResolutionAnalysisTest") <<
"[DTResolutionAnalysisTest]: Constructor";
48 LogTrace(
"DTDQM|DTMonitorClient|DTResolutionAnalysisTest")
49 <<
"DTResolutionAnalysisTest: analyzed " <<
nevents <<
" events";
53 LogTrace(
"DTDQM|DTMonitorClient|DTResolutionAnalysisTest") <<
"[DTResolutionAnalysisTest]: BeginRun";
66 ibooker.
book2D(
"ResidualsGlbSummary",
"# of SLs with good mean and good sigma of residuals", 12, 1, 13, 5, -2, 3);
70 meanDistr[-2] = ibooker.
book1D(
"MeanDistr",
"Mean value of the residuals all (cm)", 100, -0.1, 0.1);
71 meanDistr[-1] = ibooker.
book1D(
"MeanDistr_Phi",
"Mean value of the residuals #phi SL (cm)", 100, -0.1, 0.1);
73 ibooker.
book1D(
"MeanDistr_ThetaWh0",
"Mean values of the residuals #theta SL Wh 0 (cm)", 100, -0.1, 0.1);
75 ibooker.
book1D(
"MeanDistr_ThetaWh1",
"Mean value of the residuals #theta SL Wh +/-1 (cm)", 100, -0.1, 0.1);
77 ibooker.
book1D(
"MeanDistr_ThetaWh2",
"Mean value of the residuals #theta SL Wh +/-2 (cm)", 100, -0.1, 0.1);
79 for (
int wh = -2; wh <= 2; wh++) {
82 for (
int st = 1; st <= 4; st++) {
85 for (
int sl = 1; sl <= 3; sl++) {
86 if (sl == 2 && st == 4)
112 string histoTitle =
"# of SLs with good mean of residuals";
118 sigmaDistr[-2] = ibooker.
book1D(
"SigmaDistr",
"Sigma value of the residuals all (cm)", 50, 0.0, 0.2);
119 sigmaDistr[-1] = ibooker.
book1D(
"SigmaDistr_Phi",
"Sigma value of the residuals #phi SL (cm)", 50, 0.0, 0.2);
121 ibooker.
book1D(
"SigmaDistr_ThetaWh0",
"Sigma value of the residuals #theta SL Wh 0 (cm)", 50, 0.0, 0.2);
123 ibooker.
book1D(
"SigmaDistr_ThetaWh1",
"Sigma value of the residuals #theta SL Wh +/-1 (cm)", 50, 0.0, 0.2);
125 ibooker.
book1D(
"SigmaDistr_ThetaWh2",
"Sigma value of the residuals #theta SL Wh +/-2 (cm)", 50, 0.0, 0.2);
127 histoTitle =
"# of SLs with good sigma of residuals";
135 for (
int sector = 1; sector <= 12; sector++) {
143 LogTrace(
"DTDQM|DTMonitorClient|DTResolutionAnalysisTest")
144 <<
"[DTResolutionAnalysisTest]: Base folder " <<
topHistoFolder <<
" does not exist. Skipping client operation."
152 LogTrace(
"DTDQM|DTMonitorClient|DTResolutionAnalysisTest")
153 <<
"[DTResolutionAnalysisTest]: End of Run transition, performing the DQM client operation" << endl;
158 for (vector<const DTChamber*>::const_iterator ch_it =
muonGeom->
chambers().begin();
165 for (vector<const DTSuperLayer*>::const_iterator sl_it = (*ch_it)->superLayers().begin();
166 sl_it != (*ch_it)->superLayers().end();
173 float statMean = res_histo->
getMean(1);
174 float statSigma = res_histo->
getRMS(1);
177 TH1F* histo_root = res_histo->
getTH1F();
181 int binSect = slID.
sector();
184 else if (slID.
sector() == 14)
194 if (histo_root->GetEntries() > 20) {
195 TF1* gfit =
new TF1(
"Gaussian",
"gaus", (statMean - (2 * statSigma)), (statMean + (2 * statSigma)));
197 histo_root->Fit(gfit,
"Q0 SERIAL",
"", -0.1, 0.1);
199 LogWarning(
"DTDQM|DTMonitorModule|DTResolutionAnalysisTask")
200 <<
"[DTResolutionAnalysisTask]: Exception when fitting SL : " << slID;
203 if ((binSect == 4 || binSect == 10) && slID.
station() == 4)
211 mean = gfit->GetParameter(1);
212 sigma = gfit->GetParameter(2);
225 string histoType =
"MeanDistr_Phi";
227 histoType =
"MeanDistr_Theta";
230 histoType =
"SigmaDistr_Phi";
232 histoType =
"SigmaDistr_Theta";
239 if ((slID.
sector() == 13 || slID.
sector() == 14) && binSL == 12)
241 if ((slID.
sector() == 13 || slID.
sector() == 14) && binSL == 13)
260 if ((binSect == 4 || binSect == 10) && slID.
station() == 4)
279 LogVerbatim(
"DTDQM|DTMonitorModule|DTResolutionAnalysisTask")
280 <<
"[DTResolutionAnalysisTask] Fit of " << slID <<
" not performed because # entries < 20 ";
283 if ((binSect == 4 || binSect == 10) && slID.
station() == 4)
292 LogWarning(
"DTDQM|DTMonitorModule|DTResolutionAnalysisTask")
293 <<
"[DTResolutionAnalysisTask] Histo: " <<
getMEName(slID) <<
" not found" << endl;
305 string histoTitle =
"# of SLs with wrong mean of residuals (Wheel " +
wheel.str() +
")";
323 histoTitle =
"# of SLs with wrong sigma of residuals (Wheel " +
wheel.str() +
")";
346 string MeanHistoName =
"MeanTest_W" +
wheel.str() +
"_Sec" + sector.str();
347 string SigmaHistoName =
"SigmaTest_W" +
wheel.str() +
"_Sec" + sector.str();
352 if (sect != 4 && sect != 10) {
355 ibooker.
book1D(MeanHistoName.c_str(),
"Mean (from gaussian fit) of the residuals distribution", 11, 1, 12);
358 ibooker.
book1D(MeanHistoName.c_str(),
"Mean (from gaussian fit) of the residuals distribution", 13, 1, 14);
360 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(1,
"MB1_SL1", 1);
361 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(2,
"MB1_SL2", 1);
362 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(3,
"MB1_SL3", 1);
363 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(4,
"MB2_SL1", 1);
364 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(5,
"MB2_SL2", 1);
365 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(6,
"MB2_SL3", 1);
366 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(7,
"MB3_SL1", 1);
367 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(8,
"MB3_SL2", 1);
368 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(9,
"MB3_SL3", 1);
369 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(10,
"MB4_SL1", 1);
370 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(11,
"MB4_SL3", 1);
372 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(12,
"MB4S13_SL1", 1);
373 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(13,
"MB4S13_SL3", 1);
376 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(12,
"MB4S14_SL1", 1);
377 (
MeanHistos[make_pair(wh, sect)])->setBinLabel(13,
"MB4S14_SL3", 1);
380 if (sect != 4 && sect != 10) {
382 ibooker.
book1D(SigmaHistoName.c_str(),
"Sigma (from gaussian fit) of the residuals distribution", 11, 1, 12);
385 ibooker.
book1D(SigmaHistoName.c_str(),
"Sigma (from gaussian fit) of the residuals distribution", 13, 1, 14);
387 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(1,
"MB1_SL1", 1);
388 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(2,
"MB1_SL2", 1);
389 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(3,
"MB1_SL3", 1);
390 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(4,
"MB2_SL1", 1);
391 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(5,
"MB2_SL2", 1);
392 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(6,
"MB2_SL3", 1);
393 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(7,
"MB3_SL1", 1);
394 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(8,
"MB3_SL2", 1);
395 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(9,
"MB3_SL3", 1);
396 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(10,
"MB4_SL1", 1);
397 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(11,
"MB4_SL3", 1);
399 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(12,
"MB4S13_SL1", 1);
400 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(13,
"MB4S13_SL3", 1);
403 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(12,
"MB4S14_SL1", 1);
404 (
SigmaHistos[make_pair(wh, sect)])->setBinLabel(13,
"MB4S14_SL3", 1);
415 stringstream superLayer;
423 "DT/DTCalibValidation/Wheel" +
wheel.str() +
"/Station" +
station.str() +
"/Sector" + sector.str() +
"/";
425 string histoname =
folderName +
"hResDist" +
"_W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" + sector.str() +
426 "_SL" + superLayer.str();
429 histoname =
folderName +
"hResDist_STEP3" +
"_W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" + sector.str() +
430 "_SL" + superLayer.str();
439 if (
ret == 0 ||
bin == 11)
474 (*histo).second->Reset();
478 (*histo).second->Reset();
481 for (
int indx = -2; indx != 3; ++indx) {