28 debug =
pset.getUntrackedParameter<
bool>(
"debug",
false);
36 theRecHits4DLabel_ = consumes<DTRecSegment4DCollection>(
parameters.getParameter<
std::string>(
"recHits4DLabel"));
49 ibooker.
book2D(
"phiSegments_numHitsVsWheel",
"phiSegments_numHitsVsWheel", 5, -2.5, 2.5, 20, 0, 20));
50 phiHistos[0]->setBinLabel(1,
"W-2", 1);
51 phiHistos[0]->setBinLabel(2,
"W-1", 1);
52 phiHistos[0]->setBinLabel(3,
"W0", 1);
53 phiHistos[0]->setBinLabel(4,
"W1", 1);
54 phiHistos[0]->setBinLabel(5,
"W2", 1);
56 ibooker.
book2D(
"phiSegments_numHitsVsSector",
"phiSegments_numHitsVsSector", 14, 0.5, 14.5, 20, 0, 20));
57 phiHistos[1]->setBinLabel(1,
"Sec1", 1);
58 phiHistos[1]->setBinLabel(2,
"Sec2", 1);
59 phiHistos[1]->setBinLabel(3,
"Sec3", 1);
60 phiHistos[1]->setBinLabel(4,
"Sec4", 1);
61 phiHistos[1]->setBinLabel(5,
"Sec5", 1);
62 phiHistos[1]->setBinLabel(6,
"Sec6", 1);
63 phiHistos[1]->setBinLabel(7,
"Sec7", 1);
64 phiHistos[1]->setBinLabel(8,
"Sec8", 1);
65 phiHistos[1]->setBinLabel(9,
"Sec9", 1);
66 phiHistos[1]->setBinLabel(10,
"Sec10", 1);
67 phiHistos[1]->setBinLabel(11,
"Sec11", 1);
68 phiHistos[1]->setBinLabel(12,
"Sec12", 1);
69 phiHistos[1]->setBinLabel(13,
"Sec13", 1);
70 phiHistos[1]->setBinLabel(14,
"Sec14", 1);
72 ibooker.
book2D(
"phiSegments_numHitsVsStation",
"phiSegments_numHitsVsStation", 4, 0.5, 4.5, 20, 0, 20));
73 phiHistos[2]->setBinLabel(1,
"St1", 1);
74 phiHistos[2]->setBinLabel(2,
"St2", 1);
75 phiHistos[2]->setBinLabel(3,
"St3", 1);
76 phiHistos[2]->setBinLabel(4,
"St4", 1);
79 thetaHistos.push_back(
80 ibooker.
book2D(
"thetaSegments_numHitsVsWheel",
"thetaSegments_numHitsVsWheel", 5, -2.5, 2.5, 20, 0, 20));
81 thetaHistos[0]->setBinLabel(1,
"W-2", 1);
82 thetaHistos[0]->setBinLabel(2,
"W-1", 1);
83 thetaHistos[0]->setBinLabel(3,
"W0", 1);
84 thetaHistos[0]->setBinLabel(4,
"W1", 1);
85 thetaHistos[0]->setBinLabel(5,
"W2", 1);
86 thetaHistos.push_back(
87 ibooker.
book2D(
"thetaSegments_numHitsVsSector",
"thetaSegments_numHitsVsSector", 14, 0.5, 14.5, 20, 0, 20));
88 thetaHistos[1]->setBinLabel(1,
"Sec1", 1);
89 thetaHistos[1]->setBinLabel(2,
"Sec2", 1);
90 thetaHistos[1]->setBinLabel(3,
"Sec3", 1);
91 thetaHistos[1]->setBinLabel(4,
"Sec4", 1);
92 thetaHistos[1]->setBinLabel(5,
"Sec5", 1);
93 thetaHistos[1]->setBinLabel(6,
"Sec6", 1);
94 thetaHistos[1]->setBinLabel(7,
"Sec7", 1);
95 thetaHistos[1]->setBinLabel(8,
"Sec8", 1);
96 thetaHistos[1]->setBinLabel(9,
"Sec9", 1);
97 thetaHistos[1]->setBinLabel(10,
"Sec10", 1);
98 thetaHistos[1]->setBinLabel(11,
"Sec11", 1);
99 thetaHistos[1]->setBinLabel(12,
"Sec12", 1);
100 thetaHistos[1]->setBinLabel(13,
"Sec13", 1);
101 thetaHistos[1]->setBinLabel(14,
"Sec14", 1);
102 thetaHistos.push_back(
103 ibooker.
book2D(
"thetaSegments_numHitsVsStation",
"thetaSegments_numHitsVsStation", 4, 0.5, 4.5, 20, 0, 20));
104 thetaHistos[2]->setBinLabel(1,
"St1", 1);
105 thetaHistos[2]->setBinLabel(2,
"St2", 1);
106 thetaHistos[2]->setBinLabel(3,
"St3", 1);
107 thetaHistos[2]->setBinLabel(4,
"St4", 1);
120 event.getByToken(theRecHits4DLabel_, all4DSegments);
124 for (chamberId = all4DSegments->id_begin(); chamberId != all4DSegments->id_end(); ++chamberId) {
129 cout <<
" Chamber: " << *chamberId <<
" has " << nsegm <<
" 4D segments" << endl;
134 bool segmNoisy =
false;
135 if ((*segment4D).hasPhi()) {
138 map<DTSuperLayerId, vector<DTRecHit1D> > hitsBySLMap;
139 for (vector<DTRecHit1D>::const_iterator
hit = phiHits.begin();
hit != phiHits.end(); ++
hit) {
144 bool isNoisy =
false;
145 bool isFEMasked =
false;
146 bool isTDCMasked =
false;
147 bool isTrigMask =
false;
150 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
153 cout <<
"Wire: " << wireId <<
" is noisy, skipping!" << endl;
160 if ((*segment4D).hasZed()) {
164 for (vector<DTRecHit1D>::const_iterator
hit = zHits.begin();
hit != zHits.end(); ++
hit) {
167 bool isNoisy =
false;
168 bool isFEMasked =
false;
169 bool isTDCMasked =
false;
170 bool isTrigMask =
false;
174 statusMap->
cellStatus(wireId, isNoisy, isFEMasked, isTDCMasked, isTrigMask, isDead, isNohv);
177 cout <<
"Wire: " << wireId <<
" is noisy, skipping!" << endl;
186 cout <<
"skipping the segment: it contains noisy cells" << endl;
193 if ((*segment4D).hasPhi()) {
194 nHits = (((*segment4D).phiSegment())->specificRecHits()).
size();
196 cout <<
"Phi segment with number of hits: " <<
nHits << endl;
197 phiHistos[0]->Fill((*chamberId).wheel(),
nHits);
198 phiHistos[1]->Fill((*chamberId).sector(),
nHits);
199 phiHistos[2]->Fill((*chamberId).station(),
nHits);
201 if ((*segment4D).hasZed()) {
202 nHits = (((*segment4D).zSegment())->specificRecHits()).
size();
204 cout <<
"Zed segment with number of hits: " <<
nHits << endl;
205 thetaHistos[0]->Fill((*chamberId).wheel(),
nHits);
206 thetaHistos[1]->Fill((*chamberId).sector(),
nHits);
207 thetaHistos[2]->Fill((*chamberId).station(),
nHits);