66 lumiblock = evt->lumiBlock();
68 if(lumiblock < 0 )
return StatusCode::FAILURE;
93 ATH_MSG_DEBUG (
" BEGIN EVENT ========================================== " );
96 MonStruct1 monstruct1;
97 MonStruct2 monstruct2;
102 size_t nEtaClusWidthCnt[5], nPhiClusWidthCnt[5];
103 int clusCount[33][9], sigclusCount[33][9];
104 for(
size_t kl = 0; kl < 33; kl++ ) {
105 for(
size_t km = 0; km < 9; km++ ) {
106 if(kl == 0 && km < 5) {
107 nEtaClusWidthCnt[km] = 0;
108 nPhiClusWidthCnt[km] = 0;
110 clusCount[kl][km] = 0;
111 sigclusCount[kl][km] = 0;
117 ATH_MSG_DEBUG (
" BEGIN Loop over Strips ========================================== " );
123 int stationName =
m_idHelperSvc->cscIdHelper().stationName(prawId);
124 int chamberType =
m_idHelperSvc->cscIdHelper().stationNameIndex(
"CSS") == stationName ? 0 : 1;
127 int wireLayer =
m_idHelperSvc->cscIdHelper().wireLayer(prawId);
128 int measuresPhi =
m_idHelperSvc->cscIdHelper().measuresPhi(prawId);
134 int ns = sectorNo < 0 ? sectorNo*(-1) : sectorNo+16;
135 int nl = (measuresPhi ? wireLayer : wireLayer+4);
141 ATH_MSG_DEBUG(
" ns = " << ns <<
"\tm_nl = " << nl <<
"\tm_sec = " << sectorNo <<
"\t m_lay= "
142 << wireLayer <<
"\t strip = " << stripId <<
"\tmPhi = " << measuresPhi);
145 monstruct1.noStrips.push_back(prd->
size());
151 monstruct1.secLayer.push_back((sectorNo + 0.2 * (wireLayer - 1) + 0.1));
152 int xfac = measuresPhi ? -1 : 1;
155 monstruct1.spid.push_back((stripId * xfac));
156 monstruct1.measphi.push_back((
int)measuresPhi);
157 monstruct1.measeta.push_back((
int)!(measuresPhi));
174 ATH_MSG_DEBUG (
"Strip q +- dq = " <<
res.charge <<
" +- " <<
res.dcharge <<
"\t t +- dt = "
175 <<
res.time <<
" +- " <<
res.dtime <<
"\t w +- dw = " <<
res.width <<
" +- "
176 <<
res.dwidth <<
"\t status= " <<
res.status <<
"\t chisq= " <<
res.chsq);
179 float kiloele = 1.0e-3;
180 float qstripADC =
res.charge * kiloele;
186 bool signal = ((qstripADC >
m_cscNoiseCut) && (
res.status >= 0)) ?
true :
false;
190 monstruct1.signal_mon.push_back((
int)signal);
191 monstruct1.noise_mon.push_back((
int)!(signal));
192 monstruct1.clus_phiSig.push_back((
int)measuresPhi && (signal));
193 monstruct1.clus_etaSig.push_back((
int)(!measuresPhi) && (signal));
194 monstruct1.clus_phiNoise.push_back((
int)measuresPhi && !(signal));
195 monstruct1.clus_etaNoise.push_back((
int)(!measuresPhi) && !(signal));
196 monstruct1.sideA.push_back((
int)(
stationEta==1) && (signal));
197 monstruct1.sideC.push_back((
int)(
stationEta==-1) && (signal));
201 sigclusCount[ns][nl]++;
202 measuresPhi ? nPhiClusWidthCnt[wireLayer]++ : nEtaClusWidthCnt[wireLayer]++ ;
206 ATH_MSG_DEBUG (
" End loop over PRD collection======================" );
208 for(
size_t lcnt = 1; lcnt < 5; lcnt++ ) {
211 fill(
"CscPrdMonitor", nPhiClusWidthCnt_mon, nEtaClusWidthCnt_mon);
215 int numeta = 0, numphi = 0;
216 int numetasignal = 0, numphisignal = 0;
218 for(
int kl = 1; kl < 33; kl++ ) {
221 for(
int km = 1; km < 9; km++ ) {
222 int lay = (km > 4 && km < 9) ? km-4 : km;
223 bool mphi = (km > 0 && km < 5) ?
true :
false;
224 std::string wlay = mphi ?
"Phi-Layer " :
"Eta-Layer: ";
226 int count = clusCount[kl][km];
227 int scount = sigclusCount[kl][km];
229 monstruct2.count_mon.push_back(
count);
230 monstruct2.scount_mon.push_back(scount);
231 monstruct2.mphi_true.push_back((
int)mphi &&
count);
232 monstruct2.mphi_false.push_back((
int)!(mphi) &&
count);
233 monstruct2.scount_phi_true.push_back((
int)mphi &&
count && scount);
234 monstruct2.scount_phi_false.push_back((
int)mphi &&
count && !scount);
235 monstruct2.scount_eta_true.push_back((
int)!(mphi) &&
count && scount);
236 monstruct2.scount_eta_false.push_back((
int)!(mphi) &&
count && !scount);
237 monstruct2.secLayer.push_back((kl-16 + 0.2 * (lay - 1) + 0.1));
243 numphisignal += scount;
244 tmp_val =
count - scount;
245 }
else tmp_val =
count;
249 numetasignal += scount;
250 tmp_val =
count - scount;
251 }
else tmp_val =
count;
253 ATH_MSG_DEBUG ( wlay <<
"Counts sec: [" << kl-16 <<
"]\tlayer: [" << km <<
"] = " <<
254 monstruct2.secLayer.back() <<
"\t = " << monstruct2.count_mon.back()
255 <<
"\t" << monstruct2.scount_mon.back());
257 monstruct2.tmp_val_mon.push_back(tmp_val);
268 fill(
"CscPrdMonitor", numphi_mon, numeta_mon, numphi_sig_mon, numeta_sig_mon, numphi_diff_mon, numeta_diff_mon );
285fill(
"CscPrdMonitor", spid, secLayer1, lumiblock_mon, noStrips, signal_mon, noise_mon, clus_phiSig, clus_etaSig, clus_etaNoise, clus_phiNoise, sideC, sideA, measphi, measeta );
297fill(
"CscPrdMonitor", count_mon, scount_mon, tmp_val_mon, secLayer, mphi_true, mphi_false, scount_phi_false, scount_phi_true, scount_eta_false, scount_eta_true );
302 ATH_MSG_DEBUG(
"CscPrdValMonAlg: fillHistograms reports success" );
304 return StatusCode::SUCCESS;