36 edm::LogVerbatim(
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Constructor called!";
44 phiSegmCut =
pset.getUntrackedParameter<
double>(
"phiSegmCut", 30.);
45 nhitsCut =
pset.getUntrackedParameter<
int>(
"nhitsCut", 12);
48 topHistoFolder =
pset.getUntrackedParameter<
string>(
"topHistoFolder",
"DT/02-Segments");
50 hltDQMMode =
pset.getUntrackedParameter<
bool>(
"hltDQMMode",
false);
55 edm::LogVerbatim(
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
"[DTSegmentAnalysisTask] Destructor called!";
71 for (
int wh = -2; wh <= 2; wh++) {
99 vector<const DTChamber*>::const_iterator ch_it =
chambers.begin();
100 vector<const DTChamber*>::const_iterator ch_end =
chambers.end();
101 for (; ch_it != ch_end; ++ch_it) {
111 <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event();
112 if (!(
event.id().event() % 1000))
114 <<
"[DTSegmentAnalysisTask] Analyze #Run: " <<
event.id().run() <<
" #Event: " <<
event.id().event();
132 for (chamberId = all4DSegments->id_begin(); chamberId != all4DSegments->id_end(); ++chamberId) {
137 <<
" Chamber: " << *chamberId <<
" has " <<
distance(
range.first,
range.second) <<
" 4D segments";
142 bool segmNoisy =
false;
144 if ((*segment4D).hasPhi()) {
147 map<DTSuperLayerId, vector<DTRecHit1D> > hitsBySLMap;
148 for (vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
hit != phiHits.end(); ++
hit) {
152 bool isNoisy =
false;
153 bool isFEMasked =
false;
154 bool isTDCMasked =
false;
155 bool isTrigMask =
false;
158 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
161 <<
"Wire: " << wireId <<
" is noisy, skipping!";
167 if ((*segment4D).hasZed()) {
171 for (vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
hit != zHits.end(); ++
hit) {
173 bool isNoisy =
false;
174 bool isFEMasked =
false;
175 bool isTDCMasked =
false;
176 bool isTrigMask =
false;
179 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
182 <<
"Wire: " << wireId <<
" is noisy, skipping!";
191 <<
"skipping the segment: it contains noisy cells";
197 if ((*segment4D).hasPhi())
198 nHits = (((*segment4D).phiSegment())->specificRecHits()).
size();
199 if ((*segment4D).hasZed())
200 nHits = nHits + ((((*segment4D).zSegment())->specificRecHits()).
size());
202 double anglePhiSegm(0.);
203 if ((*segment4D).hasPhi()) {
204 double xdir = (*segment4D).phiSegment()->localDirection().x();
205 double zdir = (*segment4D).phiSegment()->localDirection().z();
213 if (fabs((*chamberId).wheel()) == 2 && (*chamberId).station() == 1) {
217 DTChamberId checkMB((*chamberId).wheel(), mb, (*chamberId).sector());
223 if ((*cksegment4D).hasPhi())
224 nHits = (((*cksegment4D).phiSegment())->specificRecHits()).
size();
225 if ((*cksegment4D).hasZed())
226 nHits = nHits + ((((*cksegment4D).zSegment())->specificRecHits()).
size());
237 fillHistos(*chamberId, nHits, (*segment4D).chi2() / (*segment4D).degreesOfFreedom());
246 edm::LogVerbatim(
"DTDQM|DTMonitorModule|DTSegmentAnalysisTask") <<
" Booking histos for chamber: " << chamberId;
254 sector << chamberId.
sector();
256 string chamberHistoName =
"_W" +
wheel.str() +
"_St" +
station.str() +
"_Sec" + sector.str();
262 vector<MonitorElement*>
histos;
263 histos.push_back(ibooker.
book1D(
"h4DSegmNHits" + chamberHistoName,
"# of hits per segment", 16, 0.5, 16.5));
265 histos.push_back(ibooker.
book1D(
"h4DChi2" + chamberHistoName,
"4D Segment reduced Chi2", 20, 0, 20));
272 int sector = chamberId.
sector();
273 if (chamberId.
sector() == 13) {
275 }
else if (chamberId.
sector() == 14) {