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 alla 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.);
112 bookWheelHistos(ibooker,
"SigmaT0",
"03-SigmaT0", wh, 50, 0, 25);
125 if (!VDriftME || !T0ME) {
126 edm::LogWarning(
"DTRunConditionVarClient") <<
"ME not available" << std::endl;
131 float vDriftMean = VDriftME->
getMean();
132 float t0Mean = T0ME->
getMean();
135 float vDriftSigma = VDriftME->
getRMS();
136 float t0Sigma = T0ME->
getRMS();
139 allwheelHistos[
"allMeanVDrift"]->Fill(vDriftMean);
140 allwheelHistos[
"allSigmaVDrift"]->Fill(vDriftSigma);
142 (wheelHistos[
wheel])[
"MeanVDrift"]->
Fill(vDriftMean);
143 (wheelHistos[
wheel])[
"SigmaVDrift"]->
Fill(vDriftSigma);
147 allwheelHistos[
"allMeanT0"]->Fill(t0Mean);
148 allwheelHistos[
"allSigmaT0"]->Fill(t0Sigma);
150 (wheelHistos[
wheel])[
"MeanT0"]->
Fill(t0Mean);
151 (wheelHistos[
wheel])[
"SigmaT0"]->
Fill(t0Sigma);
156 float vDriftDev(0.), errvDriftDev(0.);
157 percDevVDrift(indexCh, vDriftMean, vDriftSigma, vDriftDev, errvDriftDev);
160 if (
sec == 13 ||
sec == 14)
161 sec_ = (
sec == 13) ? 4 : 10;
172 if (
sec == 13 ||
sec == 14) {
173 float binVDriftDev = (wheelHistos[
wheel])[
"MeanVDriftSummary"]->getBinContent(sec_,
stat);
174 binVDriftDev = (fabs(binVDriftDev) > fabs(fillvDriftDev)) ? binVDriftDev : fillvDriftDev;
175 (wheelHistos[
wheel])[
"MeanVDriftSummary"]->setBinContent(sec_,
stat, binVDriftDev);
177 float binT0MeanVal = (wheelHistos[
wheel])[
"MeanT0Summary"]->getBinContent(sec_,
stat);
178 binT0MeanVal = (fabs(binT0MeanVal) > fabs(fillT0Mean)) ? binT0MeanVal : fillT0Mean;
179 (wheelHistos[
wheel])[
"MeanT0Summary"]->setBinContent(sec_,
stat, binT0MeanVal);
181 float binVDriftSigmVal = (wheelHistos[
wheel])[
"SigmaVDriftSummary"]->getBinContent(sec_,
stat);
182 binVDriftSigmVal = (binVDriftSigmVal > 0. && binVDriftSigmVal < vDriftSigmQ) ? binVDriftSigmVal : vDriftSigmQ;
183 (wheelHistos[
wheel])[
"SigmaVDriftSummary"]->setBinContent(sec_,
stat, binVDriftSigmVal);
185 float binT0SigmVal = (wheelHistos[
wheel])[
"SigmaT0Summary"]->getBinContent(sec_,
stat);
186 binT0SigmVal = (binT0SigmVal > 0. && binT0SigmVal < t0SigmQ) ? binT0SigmVal : t0SigmQ;
187 (wheelHistos[
wheel])[
"SigmaT0Summary"]->setBinContent(sec_,
stat, binT0SigmVal);
190 (wheelHistos[
wheel])[
"MeanVDriftSummary"]->setBinContent(sec_,
stat, fillvDriftDev);
191 (wheelHistos[
wheel])[
"MeanT0Summary"]->setBinContent(sec_,
stat, fillT0Mean);
192 (wheelHistos[
wheel])[
"SigmaVDriftSummary"]->setBinContent(sec_,
stat, vDriftSigmQ);
193 (wheelHistos[
wheel])[
"SigmaT0Summary"]->setBinContent(sec_,
stat, t0SigmQ);
197 if ((sec_ == 4 || sec_ == 10) &&
stat == 4)
200 if (vDriftDevQ > 0.85 && vDriftSigmQ > 0.85) {
202 summaryHistos[
"MeanVDriftGlbSummary"]->Fill(sec_,
wheel,
weight);
203 summaryHistos[
"SigmaVDriftGlbSummary"]->Fill(sec_,
wheel,
weight);
206 if (vDriftDevQ > 0.85 && vDriftSigmQ < 0.85) {
207 summaryHistos[
"MeanVDriftGlbSummary"]->Fill(sec_,
wheel,
weight);
209 if (vDriftDevQ < 0.85 && vDriftSigmQ > 0.85) {
210 summaryHistos[
"SigmaVDriftGlbSummary"]->Fill(sec_,
wheel,
weight);
214 if (t0MeanQ > 0.85 && t0SigmQ > 0.85) {
216 summaryHistos[
"MeanT0GlbSummary"]->Fill(sec_,
wheel,
weight);
217 summaryHistos[
"SigmaT0GlbSummary"]->Fill(sec_,
wheel,
weight);
219 if (t0MeanQ > 0.85 && t0SigmQ < 0.85) {
220 summaryHistos[
"MeanT0GlbSummary"]->Fill(sec_,
wheel,
weight);
222 if (t0MeanQ < 0.85 && t0SigmQ > 0.85) {
223 summaryHistos[
"SigmaT0GlbSummary"]->Fill(sec_,
wheel,
weight);
236 if (
var <= maxGood) {
238 }
else if (
var > maxGood &&
var < minBad) {
240 }
else if (
var >= minBad) {
248 DTChamberId indexCh,
float meanVD,
float sigmaVD,
float& devVD,
float& errdevVD) {
252 float vDriftPhi1(0.), vDriftPhi2(0.);
253 float ResPhi1(0.), ResPhi2(0.);
257 if (status1 != 0 || status2 != 0) {
259 throw cms::Exception(
"DTRunConditionVarClient") <<
"Could not find vDrift entry in DB for" << sl << endl;
262 float vDriftMed = (vDriftPhi1 + vDriftPhi2) / 2.;
264 devVD = (meanVD - vDriftMed) / vDriftMed;
265 devVD = devVD < 1. ? devVD : 1.;
267 errdevVD = sigmaVD / vDriftMed;
283 string folder =
"DT/02-Segments/" + subfolder;
293 histoLabel =
"Summary of corrections to VDrift DB values";
302 me->setBinLabel(1,
"MB1", 2);
303 me->setBinLabel(2,
"MB2", 2);
304 me->setBinLabel(3,
"MB3", 2);
305 me->setBinLabel(4,
"MB4", 2);
306 me->setAxisTitle(
"Sector", 1);
308 (wheelHistos[wh])[histoType +
"Summary"] =
me;
316 int wh = dtCh.
wheel();
326 string folder =
"DT/02-Segments/Wheel" +
wheel.str() +
"/Sector" + sector.str() +
"/Station" +
station.str();
332 LogTrace(
"DTDQM|DTMonitorModule|DTRunConditionVar") <<
"[DTRunConditionVar]: getting ME from " <<
folder << endl;