35 edm::LogVerbatim(
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Constructor called!";
43 phiSegmCut =
pset.getUntrackedParameter<
double>(
"phiSegmCut", 30.);
44 nhitsCut =
pset.getUntrackedParameter<
int>(
"nhitsCut", 12);
47 topHistoFolder =
pset.getUntrackedParameter<
string>(
"topHistoFolder",
"DT/02-Segments");
49 hltDQMMode =
pset.getUntrackedParameter<
bool>(
"hltDQMMode",
false);
54 edm::LogVerbatim(
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Destructor called!";
70 for (
int wh = -2; wh <= 2; wh++) {
98 vector<const DTChamber*>::const_iterator ch_it =
chambers.begin();
99 vector<const DTChamber*>::const_iterator ch_end =
chambers.end();
100 for (; ch_it != ch_end; ++ch_it) {
110 <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event();
111 if (!(
event.id().event() % 1000))
113 <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event();
130 for (chamberId = all4DSegments->id_begin(); chamberId != all4DSegments->id_end(); ++chamberId) {
135 <<
" Chamber: " << *chamberId <<
" has " <<
distance(
range.first,
range.second) <<
" 4D segments";
140 bool segmNoisy =
false;
142 if ((*segment4D).hasPhi()) {
145 map<DTSuperLayerId, vector<DTRecHit1D> > hitsBySLMap;
146 for (vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
hit != phiHits.end(); ++
hit) {
150 bool isNoisy =
false;
151 bool isFEMasked =
false;
152 bool isTDCMasked =
false;
153 bool isTrigMask =
false;
156 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
159 <<
"Wire: " << wireId <<
" is noisy, skipping!";
165 if ((*segment4D).hasZed()) {
169 for (vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
hit != zHits.end(); ++
hit) {
171 bool isNoisy =
false;
172 bool isFEMasked =
false;
173 bool isTDCMasked =
false;
174 bool isTrigMask =
false;
177 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
180 <<
"Wire: " << wireId <<
" is noisy, skipping!";
189 <<
"skipping the segment: it contains noisy cells";
195 if ((*segment4D).hasPhi())
196 nHits = (((*segment4D).phiSegment())->specificRecHits()).
size();
197 if ((*segment4D).hasZed())
198 nHits =
nHits + ((((*segment4D).zSegment())->specificRecHits()).
size());
200 double anglePhiSegm(0.);
201 if ((*segment4D).hasPhi()) {
202 double xdir = (*segment4D).phiSegment()->localDirection().x();
203 double zdir = (*segment4D).phiSegment()->localDirection().z();
211 if (fabs((*chamberId).wheel()) == 2 && (*chamberId).station() == 1) {
215 DTChamberId checkMB((*chamberId).wheel(), mb, (*chamberId).sector());
221 if ((*cksegment4D).hasPhi())
222 nHits = (((*cksegment4D).phiSegment())->specificRecHits()).
size();
223 if ((*cksegment4D).hasZed())
224 nHits =
nHits + ((((*cksegment4D).zSegment())->specificRecHits()).
size());
235 fillHistos(*chamberId,
nHits, (*segment4D).chi2() / (*segment4D).degreesOfFreedom());
244 edm::LogVerbatim(
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Booking histos for chamber: " << chamberId;
252 sector << chamberId.
sector();
254 string chamberHistoName =
"_W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" + sector.str();
260 vector<MonitorElement*>
histos;
261 histos.push_back(ibooker.
book1D(
"h4DSegmNHits" + chamberHistoName,
"# of hits per segment", 16, 0.5, 16.5));
263 histos.push_back(ibooker.
book1D(
"h4DChi2" + chamberHistoName,
"4D Segment reduced Chi2", 20, 0, 20));
270 int sector = chamberId.
sector();
271 if (chamberId.
sector() == 13) {
273 }
else if (chamberId.
sector() == 14) {