45 cout <<
"[DTt0DBValidation] Constructor called!" << endl;
49 dbe->setCurrentFolder(
"DT/DTDBValidation");
71 tZeroRefMap = &*t0_Ref;
72 LogTrace(
metname)<<
"[DTt0DBValidation] reference T0 version: " << t0_Ref->version();
77 LogTrace(
metname)<<
"[DTt0DBValidation] T0 to validate version: " << t0->version();
80 for(
int wheel=-2; wheel<=2; wheel++){
82 wheelSummary[wheel]->Reset();
92 DTWireId wireId((*tzero).first.wheelId,
93 (*tzero).first.stationId,
94 (*tzero).first.sectorId,
96 (*tzero).first.layerId,
97 (*tzero).first.cellId);
102 <<
" T0 mean (TDC counts): " << t0mean
103 <<
" T0_rms (TDC counts): " << t0rms;
105 t0RefMap[wireId].push_back(t0mean);
106 t0RefMap[wireId].push_back(t0rms);
113 DTWireId wireId((*tzero).first.wheelId,
114 (*tzero).first.stationId,
115 (*tzero).first.sectorId,
117 (*tzero).first.layerId,
118 (*tzero).first.cellId);
123 <<
" T0 mean (TDC counts): " << t0mean
124 <<
" T0_rms (TDC counts): " << t0rms;
126 t0Map[wireId].push_back(t0mean);
127 t0Map[wireId].push_back(t0rms);
131 for(
map<
DTWireId, vector<float> >::const_iterator theMap = t0RefMap.begin();
132 theMap != t0RefMap.end();
134 if(t0Map.find((*theMap).first) != t0Map.end()) {
137 difference = t0Map[(*theMap).first][0]-(*theMap).second[0];
140 DTLayerId layerId = (*theMap).first.layerId();
141 if(t0DiffHistos.find(layerId) == t0DiffHistos.end()) {
142 const DTTopology& dtTopo = dtGeom->layer(layerId)->specificTopology();
148 cout<<
"Filling the histo for wire: "<<(*theMap).first
149 <<
" difference: "<<difference<<endl;
150 t0DiffHistos[layerId]->Fill((*theMap).first.wire(),difference);
161 string testCriterionName =
parameters.getUntrackedParameter<
string>(
"t0TestName",
"t0DifferenceInRange");
162 for(map<DTLayerId, MonitorElement*>::const_iterator hDiff = t0DiffHistos.begin();
163 hDiff != t0DiffHistos.end();
165 const QReport * theDiffQReport = (*hDiff).second->getQReport(testCriterionName);
167 vector<dqm::me_util::Channel> badChannels = theDiffQReport->
getBadChannels();
168 for (vector<dqm::me_util::Channel>::iterator channel = badChannels.begin();
169 channel != badChannels.end(); channel++) {
170 cout <<
"layer:"<<(*hDiff).first<<
" Bad mean channels: "<<(*channel).getBin()<<
" Contents : "<<(*channel).getContents()<<endl;
172 int xBin = ((*hDiff).first.station()-1)*12+(*hDiff).first.layer()+4*((*hDiff).first.superlayer()-1);
173 if((*hDiff).first.station()==4 && (*hDiff).first.superlayer()==3)
174 xBin = ((*hDiff).first.station()-1)*12+(*hDiff).first.layer()+4*((*hDiff).first.superlayer()-2);
175 wheelSummary[(*hDiff).first.wheel()]->Fill(xBin,(*hDiff).first.sector());
178 cout <<
"-------- layer: "<<(*hDiff).first<<
" "<<theDiffQReport->
getMessage()<<
" ------- "<<theDiffQReport->
getStatus()<<endl;
197 stringstream layer; layer << lId.
layer();
201 "_St" + station.str() +
202 "_Sec" + sector.str() +
203 "_SL" + superLayer.str()+
206 dbe->setCurrentFolder(
"DT/t0Validation/Wheel" + wheel.str() +
207 "/Station" + station.str() +
208 "/Sector" + sector.str() +
209 "/SuperLayer" +superLayer.str());
212 hDifference = dbe->book1D(
"hDifference"+lHistoName,
"difference between the two t0 values",lastWire-firstWire+1, firstWire-0.5, lastWire+0.5);
214 t0DiffHistos[lId] = hDifference;
219 dbe->setCurrentFolder(
"DT/t0Validation/Summary");
220 stringstream wh; wh << wheel;
221 wheelSummary[wheel]= dbe->book2D(
"summaryWrongT0_W"+wh.str(),
"W"+wh.str()+
": summary of wrong t0 differences",44,1,45,14,1,15);
222 wheelSummary[wheel]->setBinLabel(1,
"M1L1",1);
223 wheelSummary[wheel]->setBinLabel(2,
"M1L2",1);
224 wheelSummary[wheel]->setBinLabel(3,
"M1L3",1);
225 wheelSummary[wheel]->setBinLabel(4,
"M1L4",1);
226 wheelSummary[wheel]->setBinLabel(5,
"M1L5",1);
227 wheelSummary[wheel]->setBinLabel(6,
"M1L6",1);
228 wheelSummary[wheel]->setBinLabel(7,
"M1L7",1);
229 wheelSummary[wheel]->setBinLabel(8,
"M1L8",1);
230 wheelSummary[wheel]->setBinLabel(9,
"M1L9",1);
231 wheelSummary[wheel]->setBinLabel(10,
"M1L10",1);
232 wheelSummary[wheel]->setBinLabel(11,
"M1L11",1);
233 wheelSummary[wheel]->setBinLabel(12,
"M1L12",1);
234 wheelSummary[wheel]->setBinLabel(13,
"M2L1",1);
235 wheelSummary[wheel]->setBinLabel(14,
"M2L2",1);
236 wheelSummary[wheel]->setBinLabel(15,
"M2L3",1);
237 wheelSummary[wheel]->setBinLabel(16,
"M2L4",1);
238 wheelSummary[wheel]->setBinLabel(17,
"M2L5",1);
239 wheelSummary[wheel]->setBinLabel(18,
"M2L6",1);
240 wheelSummary[wheel]->setBinLabel(19,
"M2L7",1);
241 wheelSummary[wheel]->setBinLabel(20,
"M2L8",1);
242 wheelSummary[wheel]->setBinLabel(21,
"M2L9",1);
243 wheelSummary[wheel]->setBinLabel(22,
"M2L10",1);
244 wheelSummary[wheel]->setBinLabel(23,
"M2L11",1);
245 wheelSummary[wheel]->setBinLabel(24,
"M2L12",1);
246 wheelSummary[wheel]->setBinLabel(25,
"M3L1",1);
247 wheelSummary[wheel]->setBinLabel(26,
"M3L2",1);
248 wheelSummary[wheel]->setBinLabel(27,
"M3L3",1);
249 wheelSummary[wheel]->setBinLabel(28,
"M3L4",1);
250 wheelSummary[wheel]->setBinLabel(29,
"M3L5",1);
251 wheelSummary[wheel]->setBinLabel(30,
"M3L6",1);
252 wheelSummary[wheel]->setBinLabel(31,
"M3L7",1);
253 wheelSummary[wheel]->setBinLabel(32,
"M3L8",1);
254 wheelSummary[wheel]->setBinLabel(33,
"M3L9",1);
255 wheelSummary[wheel]->setBinLabel(34,
"M3L10",1);
256 wheelSummary[wheel]->setBinLabel(35,
"M3L11",1);
257 wheelSummary[wheel]->setBinLabel(36,
"M3L12",1);
258 wheelSummary[wheel]->setBinLabel(37,
"M4L1",1);
259 wheelSummary[wheel]->setBinLabel(38,
"M4L2",1);
260 wheelSummary[wheel]->setBinLabel(39,
"M4L3",1);
261 wheelSummary[wheel]->setBinLabel(40,
"M4L4",1);
262 wheelSummary[wheel]->setBinLabel(41,
"M4L5",1);
263 wheelSummary[wheel]->setBinLabel(42,
"M4L6",1);
264 wheelSummary[wheel]->setBinLabel(43,
"M4L7",1);
265 wheelSummary[wheel]->setBinLabel(44,
"M4L8",1);
const int lastChannel() const
Returns the wire number of the last wire.
T getUntrackedParameter(std::string const &, T const &) const
const std::string metname
DTChamberId chamberId() const
Return the corresponding ChamberId.
virtual ~DTt0DBValidation()
Destructor.
int layer() const
Return the layer number.
const int firstChannel() const
Returns the wire number of the first wire.
DTSuperLayerId superlayerId() const
Return the corresponding SuperLayerId.
const std::string & getMessage(void) const
get message attached to test
void beginRun(const edm::Run &run, const edm::EventSetup &setup)
Operations.
DTt0DBValidation(const edm::ParameterSet &pset)
Constructor.
int getStatus(void) const
get test status (see Core/interface/QTestStatus.h)
const std::vector< DQMChannel > & getBadChannels(void) const
int superlayer() const
Return the superlayer number (deprecated method name)
std::vector< std::pair< DTT0Id, DTT0Data > >::const_iterator const_iterator
Access methods to data.
void bookHistos(DTLayerId lId, int firstWire, int lastWire)
static const double tzero[3]
int station() const
Return the station number.
int wheel() const
Return the wheel number.