35 LogVerbatim(
"DTDQM|DTMonitorClient|DTRunConditionVarClient") <<
"DTRunConditionVarClient: Constructor called";
58 LogVerbatim(
"DTDQM|DTMonitorClient|DTRunConditionVarClient") <<
"DTRunConditionVarClient: Destructor called";
62 LogTrace(
"DTDQM|DTMonitorClient|DTResolutionAnalysisTest") <<
"[DTRunConditionVarClient]: BeginRun";
74 LogVerbatim(
"DTDQM|DTMonitorClient|DTRunConditionVarClient") <<
"DTRunConditionVarClient: end job";
79 ibooker.
book2D(
"VDriftGlbSummary",
"# of MBs with good mean and good sigma of vDrift", 12, 1, 13, 5, -2, 3);
80 glbT0Summary = ibooker.
book2D(
"T0GlbSummary",
"# of MBs with good mean and good sigma of t0", 12, 1, 13, 5, -2, 3);
84 summaryHistos[
"MeanVDriftGlbSummary"] =
85 ibooker.
book2D(
"MeanVDriftGlbSummary",
"mean VDrift average per sector", 12, 1., 13., 5, -2., 3.);
86 allwheelHistos[
"allMeanVDrift"] =
87 ibooker.
book1D(
"VDriftMeanAllWheels",
"mean VDrift for all chambers", 60, 0.0048, 0.006);
91 summaryHistos[
"SigmaVDriftGlbSummary"] =
92 ibooker.
book2D(
"SigmaVDriftGlbSummary",
"# of Chambers with good sigma VDrift", 12, 1., 13., 5, -2., 3.);
93 allwheelHistos[
"allSigmaVDrift"] =
94 ibooker.
book1D(
"VDriftSigmaAllWheels",
"sigma VDrift for all chambers", 30, 0., 0.0006);
98 summaryHistos[
"MeanT0GlbSummary"] =
99 ibooker.
book2D(
"MeanT0GlbSummary",
"mean T0 average per sector", 12, 1., 13., 5, -2., 3.);
100 allwheelHistos[
"allMeanT0"] = ibooker.
book1D(
"T0MeanAllWheels",
"mean T0 for all chambers", 100, -25., 25.);
104 summaryHistos[
"SigmaT0GlbSummary"] =
105 ibooker.
book2D(
"SigmaT0GlbSummary",
"# of Chambers with good sigma T0", 12, 1., 13., 5, -2., 3.);
106 allwheelHistos[
"allSigmaT0"] = ibooker.
book1D(
"T0SigmaAllWheels",
"sigma T0 for all chambers", 50, 0, 25);
108 for (
int wh = -2; wh <= 2; wh++) {
109 bookWheelHistos(ibooker,
"MeanVDrift",
"02-MeanVDrift", wh, 60, 0.0048, 0.006,
true);
110 bookWheelHistos(ibooker,
"SigmaVDrift",
"02-SigmaVDrift", wh, 30, 0., 0.0006);
111 bookWheelHistos(ibooker,
"MeanT0",
"03-MeanT0", wh, 100, -25., 25.,
false,
true);
112 bookWheelHistos(ibooker,
"SigmaT0",
"03-SigmaT0", wh, 50, 0, 25,
false,
true);
125 if (!VDriftME || !T0ME) {
126 edm::LogWarning(
"DTRunConditionVarClient") <<
"ME not available" << std::endl;
131 float vDriftMean = VDriftME->
getMean();
133 float t0Mean = T0ME->
getMean();
136 float vDriftSigma = VDriftME->
getRMS();
137 float t0Sigma = T0ME->
getRMS();
140 allwheelHistos[
"allMeanVDrift"]->Fill(vDriftMean);
141 allwheelHistos[
"allSigmaVDrift"]->Fill(vDriftSigma);
143 (wheelHistos[
wheel])[
"MeanVDrift"]->
Fill(vDriftMean);
144 (wheelHistos[
wheel])[
"SigmaVDrift"]->
Fill(vDriftSigma);
148 allwheelHistos[
"allMeanT0"]->Fill(t0Mean);
149 allwheelHistos[
"allSigmaT0"]->Fill(t0Sigma);
157 float vDriftDev(0.), errvDriftDev(0.);
158 percDevVDrift(indexCh, vDriftMean, vDriftSigma, vDriftDev, errvDriftDev);
161 if (
sec == 13 ||
sec == 14)
162 sec_ = (
sec == 13) ? 4 : 10;
173 if (
sec == 13 ||
sec == 14) {
174 float binVDriftDev = (wheelHistos[
wheel])[
"MeanVDriftSummary"]->getBinContent(sec_,
stat);
175 binVDriftDev = (fabs(binVDriftDev) > fabs(fillvDriftDev)) ? binVDriftDev : fillvDriftDev;
176 (wheelHistos[
wheel])[
"MeanVDriftSummary"]->setBinContent(sec_,
stat, binVDriftDev);
178 float binT0MeanVal = (wheelHistos[
wheel])[
"MeanT0Summary"]->getBinContent(sec_,
stat);
179 binT0MeanVal = (fabs(binT0MeanVal) > fabs(fillT0Mean)) ? binT0MeanVal : fillT0Mean;
180 (wheelHistos[
wheel])[
"MeanT0Summary"]->setBinContent(sec_,
stat, binT0MeanVal);
182 float binVDriftSigmVal = (wheelHistos[
wheel])[
"SigmaVDriftSummary"]->getBinContent(sec_,
stat);
183 binVDriftSigmVal = (binVDriftSigmVal > 0. && binVDriftSigmVal < vDriftSigmQ) ? binVDriftSigmVal : vDriftSigmQ;
184 (wheelHistos[
wheel])[
"SigmaVDriftSummary"]->setBinContent(sec_,
stat, binVDriftSigmVal);
186 float binT0SigmVal = (wheelHistos[
wheel])[
"SigmaT0Summary"]->getBinContent(sec_,
stat);
187 binT0SigmVal = (binT0SigmVal > 0. && binT0SigmVal < t0SigmQ) ? binT0SigmVal : t0SigmQ;
188 (wheelHistos[
wheel])[
"SigmaT0Summary"]->setBinContent(sec_,
stat, binT0SigmVal);
191 (wheelHistos[
wheel])[
"MeanVDriftSummary"]->setBinContent(sec_,
stat, fillvDriftDev);
192 (wheelHistos[
wheel])[
"MeanT0Summary"]->setBinContent(sec_,
stat, fillT0Mean);
193 (wheelHistos[
wheel])[
"SigmaVDriftSummary"]->setBinContent(sec_,
stat, vDriftSigmQ);
194 (wheelHistos[
wheel])[
"SigmaT0Summary"]->setBinContent(sec_,
stat, t0SigmQ);
198 if ((sec_ == 4 || sec_ == 10) &&
stat == 4)
201 if (vDriftDevQ > 0.85 && vDriftSigmQ > 0.85) {
203 summaryHistos[
"MeanVDriftGlbSummary"]->Fill(sec_,
wheel,
weight);
204 summaryHistos[
"SigmaVDriftGlbSummary"]->Fill(sec_,
wheel,
weight);
207 if (vDriftDevQ > 0.85 && vDriftSigmQ < 0.85) {
208 summaryHistos[
"MeanVDriftGlbSummary"]->Fill(sec_,
wheel,
weight);
210 if (vDriftDevQ < 0.85 && vDriftSigmQ > 0.85) {
211 summaryHistos[
"SigmaVDriftGlbSummary"]->Fill(sec_,
wheel,
weight);
215 if (t0MeanQ > 0.85 && t0SigmQ > 0.85) {
217 summaryHistos[
"MeanT0GlbSummary"]->Fill(sec_,
wheel,
weight);
218 summaryHistos[
"SigmaT0GlbSummary"]->Fill(sec_,
wheel,
weight);
220 if (t0MeanQ > 0.85 && t0SigmQ < 0.85) {
221 summaryHistos[
"MeanT0GlbSummary"]->Fill(sec_,
wheel,
weight);
223 if (t0MeanQ < 0.85 && t0SigmQ > 0.85) {
224 summaryHistos[
"SigmaT0GlbSummary"]->Fill(sec_,
wheel,
weight);
237 if (
var <= maxGood) {
239 }
else if (
var > maxGood &&
var < minBad) {
241 }
else if (
var >= minBad) {
249 DTChamberId indexCh,
float meanVD,
float sigmaVD,
float& devVD,
float& errdevVD) {
253 float vDriftPhi1(0.), vDriftPhi2(0.);
254 float ResPhi1(0.), ResPhi2(0.);
258 if (status1 != 0 || status2 != 0) {
260 throw cms::Exception(
"DTRunConditionVarClient") <<
"Could not find vDrift entry in DB for" << sl << endl;
263 float vDriftMed = (vDriftPhi1 + vDriftPhi2) / 2.;
265 devVD = (meanVD - vDriftMed) / vDriftMed;
266 devVD = devVD < 1. ? devVD : 1.;
268 errdevVD = sigmaVD / vDriftMed;
285 string folder =
"DT/02-Segments/" + subfolder;
294 for (
int st = 1; st <= 4; st++) {
313 histoLabel =
"Summary of corrections to VDrift DB values";
322 me->setBinLabel(1,
"MB1", 2);
323 me->setBinLabel(2,
"MB2", 2);
324 me->setBinLabel(3,
"MB3", 2);
325 me->setBinLabel(4,
"MB4", 2);
326 me->setAxisTitle(
"Sector", 1);
328 (wheelHistos[wh])[histoType +
"Summary"] =
me;
336 int wh = dtCh.
wheel();
346 string folder =
"DT/02-Segments/Wheel" +
wheel.str() +
"/Sector" + sector.str() +
"/Station" +
station.str();
352 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
"[DTRunConditionVar]: getting ME from " <<
folder << endl;