38 metname_ =
"InterChannelSynchDBValidation";
39 LogVerbatim(metname_) <<
"[DTt0DBValidation] Constructor called!";
46 labelDBRef_ =
pset.getParameter<
string>(
"labelDBRef");
47 labelDB_ =
pset.getParameter<
string>(
"labelDB");
49 t0TestName_ =
"t0DifferenceInRange";
50 if (
pset.exists(
"t0TestName"))
51 t0TestName_ =
pset.getParameter<
string>(
"t0TestName");
53 outputMEsInRootFile_ =
false;
54 if (
pset.exists(
"OutputFileName")) {
55 outputMEsInRootFile_ =
true;
63 metname_ =
"InterChannelSynchDBValidation";
64 LogVerbatim(metname_) <<
"[DTt0DBValidation] Parameters initialization";
68 tZeroRefMap_ = &*t0_Ref;
69 LogVerbatim(metname_) <<
"[DTt0DBValidation] reference T0 version: " << t0_Ref->
version();
74 LogVerbatim(metname_) <<
"[DTt0DBValidation] T0 to validate version: " <<
t0->version();
79 wheelSummary_[
wheel]->Reset();
95 int channelId =
tzero->channelId;
103 LogTrace(metname_) <<
"Ref Wire: " << wireId << endl
104 <<
" T0 mean (TDC counts): " << t0mean <<
" T0_rms (TDC counts): " << t0rms;
106 t0RefMap_[wireId].push_back(t0mean);
107 t0RefMap_[wireId].push_back(t0rms);
120 int channelId =
tzero->channelId;
128 LogTrace(metname_) <<
"Wire: " << wireId << endl
129 <<
" T0 mean (TDC counts): " << t0mean <<
" T0_rms (TDC counts): " << t0rms;
131 t0Map_[wireId].push_back(t0mean);
132 t0Map_[wireId].push_back(t0rms);
135 double difference = 0;
136 for (
map<
DTWireId, vector<float>>::const_iterator theMap = t0RefMap_.begin(); theMap != t0RefMap_.end(); theMap++) {
137 if (t0Map_.find((*theMap).first) != t0Map_.end()) {
139 difference = t0Map_[(*theMap).first][0] - (*theMap).second[0];
142 DTLayerId layerId = (*theMap).first.layerId();
143 if (t0DiffHistos_.find(layerId) == t0DiffHistos_.end()) {
144 const DTTopology &dtTopo = dtGeom_->layer(layerId)->specificTopology();
150 LogTrace(metname_) <<
"Filling the histo for wire: " << (*theMap).first <<
" difference: " << difference;
151 t0DiffHistos_[layerId]->Fill((*theMap).first.wire(), difference);
158 string testCriterionName = t0TestName_;
159 for (map<DTLayerId, MonitorElement *>::const_iterator hDiff = t0DiffHistos_.begin(); hDiff != t0DiffHistos_.end();
161 const QReport *theDiffQReport = (*hDiff).second->getQReport(testCriterionName);
162 if (theDiffQReport) {
163 int xBin = ((*hDiff).first.station() - 1) * 12 + (*hDiff).first.layer() + 4 * ((*hDiff).first.superlayer() - 1);
164 if ((*hDiff).first.station() == 4 && (*hDiff).first.superlayer() == 3)
165 xBin = ((*hDiff).first.station() - 1) * 12 + (*hDiff).first.layer() + 4 * ((*hDiff).first.superlayer() - 2);
167 int qReportStatus = theDiffQReport->
getStatus() / 100;
168 wheelSummary_[(*hDiff).first.wheel()]->setBinContent(
xBin, (*hDiff).first.sector(), qReportStatus);
171 <<
" ------- " << theDiffQReport->
getStatus() <<
" ------- " << setprecision(3)
173 vector<dqm::me_util::Channel> badChannels = theDiffQReport->
getBadChannels();
174 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin(); channel != badChannels.end();
176 LogVerbatim(metname_) <<
"layer: " << (*hDiff).first <<
" Bad channel: " << (*channel).getBin()
177 <<
" Contents : " << (*channel).getContents();
187 if (outputMEsInRootFile_)
193 LogTrace(metname_) <<
" Booking histos for L: " << lId;
202 stringstream superLayer;
205 layer << lId.
layer();
207 string lHistoName =
"_W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" + sector.str() +
"_SL" + superLayer.str() +
211 "/Sector" + sector.str() +
"/SuperLayer" + superLayer.str());
214 hDifference =
dbe_->
book1D(
"T0Difference" + lHistoName,
215 "difference between the two t0 values",
216 lastWire - firstWire + 1,
220 t0DiffHistos_[lId] = hDifference;
229 "SummaryWrongT0_W" + wh.str(),
"W" + wh.str() +
": summary of wrong t0 differences", 44, 1, 45, 14, 1, 15);
231 wheelSummary_[
wheel]->setBinLabel(2,
"M1L2", 1);
232 wheelSummary_[
wheel]->setBinLabel(3,
"M1L3", 1);
233 wheelSummary_[
wheel]->setBinLabel(4,
"M1L4", 1);
234 wheelSummary_[
wheel]->setBinLabel(5,
"M1L5", 1);
235 wheelSummary_[
wheel]->setBinLabel(6,
"M1L6", 1);
236 wheelSummary_[
wheel]->setBinLabel(7,
"M1L7", 1);
237 wheelSummary_[
wheel]->setBinLabel(8,
"M1L8", 1);
238 wheelSummary_[
wheel]->setBinLabel(9,
"M1L9", 1);
239 wheelSummary_[
wheel]->setBinLabel(10,
"M1L10", 1);
240 wheelSummary_[
wheel]->setBinLabel(11,
"M1L11", 1);
241 wheelSummary_[
wheel]->setBinLabel(12,
"M1L12", 1);
242 wheelSummary_[
wheel]->setBinLabel(13,
"M2L1", 1);
243 wheelSummary_[
wheel]->setBinLabel(14,
"M2L2", 1);
244 wheelSummary_[
wheel]->setBinLabel(15,
"M2L3", 1);
245 wheelSummary_[
wheel]->setBinLabel(16,
"M2L4", 1);
246 wheelSummary_[
wheel]->setBinLabel(17,
"M2L5", 1);
247 wheelSummary_[
wheel]->setBinLabel(18,
"M2L6", 1);
248 wheelSummary_[
wheel]->setBinLabel(19,
"M2L7", 1);
249 wheelSummary_[
wheel]->setBinLabel(20,
"M2L8", 1);
250 wheelSummary_[
wheel]->setBinLabel(21,
"M2L9", 1);
251 wheelSummary_[
wheel]->setBinLabel(22,
"M2L10", 1);
252 wheelSummary_[
wheel]->setBinLabel(23,
"M2L11", 1);
253 wheelSummary_[
wheel]->setBinLabel(24,
"M2L12", 1);
254 wheelSummary_[
wheel]->setBinLabel(25,
"M3L1", 1);
255 wheelSummary_[
wheel]->setBinLabel(26,
"M3L2", 1);
256 wheelSummary_[
wheel]->setBinLabel(27,
"M3L3", 1);
257 wheelSummary_[
wheel]->setBinLabel(28,
"M3L4", 1);
258 wheelSummary_[
wheel]->setBinLabel(29,
"M3L5", 1);
259 wheelSummary_[
wheel]->setBinLabel(30,
"M3L6", 1);
260 wheelSummary_[
wheel]->setBinLabel(31,
"M3L7", 1);
261 wheelSummary_[
wheel]->setBinLabel(32,
"M3L8", 1);
262 wheelSummary_[
wheel]->setBinLabel(33,
"M3L9", 1);
263 wheelSummary_[
wheel]->setBinLabel(34,
"M3L10", 1);
264 wheelSummary_[
wheel]->setBinLabel(35,
"M3L11", 1);
265 wheelSummary_[
wheel]->setBinLabel(36,
"M3L12", 1);
266 wheelSummary_[
wheel]->setBinLabel(37,
"M4L1", 1);
267 wheelSummary_[
wheel]->setBinLabel(38,
"M4L2", 1);
268 wheelSummary_[
wheel]->setBinLabel(39,
"M4L3", 1);
269 wheelSummary_[
wheel]->setBinLabel(40,
"M4L4", 1);
270 wheelSummary_[
wheel]->setBinLabel(41,
"M4L5", 1);
271 wheelSummary_[
wheel]->setBinLabel(42,
"M4L6", 1);
272 wheelSummary_[
wheel]->setBinLabel(43,
"M4L7", 1);
273 wheelSummary_[
wheel]->setBinLabel(44,
"M4L8", 1);