16 std::vector<float> spid;
17 std::vector<float> secLayer;
18 std::vector<int> lumiblock_mon;
19 std::vector<int> noStrips;
20 std::vector<int> signal_mon;
21 std::vector<int> noise_mon;
22 std::vector<int> clus_phiSig;
23 std::vector<int> clus_etaSig;
24 std::vector<int> clus_etaNoise;
25 std::vector<int> clus_phiNoise;
26 std::vector<int>
sideC;
27 std::vector<int>
sideA;
28 std::vector<int> measphi;
29 std::vector<int> measeta;
33 std::vector<int> count_mon;
34 std::vector<int> scount_mon;
35 std::vector<float> tmp_val_mon;
36 std::vector<float> secLayer;
37 std::vector<int> mphi_true;
38 std::vector<int> mphi_false;
39 std::vector<int> scount_phi_false;
40 std::vector<int> scount_phi_true;
41 std::vector<int> scount_eta_false;
42 std::vector<int> scount_eta_true;
70 if(
lumiblock < 0 )
return StatusCode::FAILURE;
95 ATH_MSG_DEBUG (
" BEGIN EVENT ========================================== " );
98 MonStruct1 monstruct1;
99 MonStruct2 monstruct2;
104 size_t nEtaClusWidthCnt[5], nPhiClusWidthCnt[5];
105 int clusCount[33][9], sigclusCount[33][9];
106 for(
size_t kl = 0;
kl < 33;
kl++ ) {
107 for(
size_t km = 0;
km < 9;
km++ ) {
108 if(
kl == 0 &&
km < 5) {
109 nEtaClusWidthCnt[
km] = 0;
110 nPhiClusWidthCnt[
km] = 0;
112 clusCount[
kl][
km] = 0;
113 sigclusCount[
kl][
km] = 0;
119 ATH_MSG_DEBUG (
" BEGIN Loop over Strips ========================================== " );
124 Identifier prawId = praw.
identify();
129 int wireLayer =
m_idHelperSvc->cscIdHelper().wireLayer(prawId);
130 int measuresPhi =
m_idHelperSvc->cscIdHelper().measuresPhi(prawId);
136 int ns = sectorNo < 0 ? sectorNo*(-1) : sectorNo+16;
137 int nl = (measuresPhi ? wireLayer : wireLayer+4);
143 ATH_MSG_DEBUG(
" ns = " <<
ns <<
"\tm_nl = " << nl <<
"\tm_sec = " << sectorNo <<
"\t m_lay= "
144 << wireLayer <<
"\t strip = " << stripId <<
"\tmPhi = " << measuresPhi);
147 monstruct1.noStrips.push_back(prd->
size());
153 monstruct1.secLayer.push_back((sectorNo + 0.2 * (wireLayer - 1) + 0.1));
154 int xfac = measuresPhi ? -1 : 1;
157 monstruct1.spid.push_back((stripId * xfac));
158 monstruct1.measphi.push_back((
int)measuresPhi);
159 monstruct1.measeta.push_back((
int)!(measuresPhi));
176 ATH_MSG_DEBUG (
"Strip q +- dq = " <<
res.charge <<
" +- " <<
res.dcharge <<
"\t t +- dt = "
177 <<
res.time <<
" +- " <<
res.dtime <<
"\t w +- dw = " <<
res.width <<
" +- "
178 <<
res.dwidth <<
"\t status= " <<
res.status <<
"\t chisq= " <<
res.chsq);
181 float kiloele = 1.0e-3;
182 float qstripADC =
res.charge * kiloele;
192 monstruct1.signal_mon.push_back((
int)
signal);
193 monstruct1.noise_mon.push_back((
int)!(
signal));
194 monstruct1.clus_phiSig.push_back((
int)measuresPhi && (
signal));
195 monstruct1.clus_etaSig.push_back((
int)(!measuresPhi) && (
signal));
196 monstruct1.clus_phiNoise.push_back((
int)measuresPhi && !(
signal));
197 monstruct1.clus_etaNoise.push_back((
int)(!measuresPhi) && !(
signal));
203 sigclusCount[
ns][nl]++;
204 measuresPhi ? nPhiClusWidthCnt[wireLayer]++ : nEtaClusWidthCnt[wireLayer]++ ;
208 ATH_MSG_DEBUG (
" End loop over PRD collection======================" );
210 for(
size_t lcnt = 1; lcnt < 5; lcnt++ ) {
213 fill(
"CscPrdMonitor", nPhiClusWidthCnt_mon, nEtaClusWidthCnt_mon);
217 int numeta = 0, numphi = 0;
218 int numetasignal = 0, numphisignal = 0;
220 for(
int kl = 1;
kl < 33;
kl++ ) {
223 for(
int km = 1;
km < 9;
km++ ) {
224 int lay = (
km > 4 &&
km < 9) ?
km-4 :
km;
225 bool mphi = (
km > 0 &&
km < 5) ?
true :
false;
226 std::string wlay = mphi ?
"Phi-Layer " :
"Eta-Layer: ";
231 monstruct2.count_mon.push_back(
count);
232 monstruct2.scount_mon.push_back(
scount);
233 monstruct2.mphi_true.push_back((
int)mphi &&
count);
234 monstruct2.mphi_false.push_back((
int)!(mphi) &&
count);
235 monstruct2.scount_phi_true.push_back((
int)mphi &&
count &&
scount);
236 monstruct2.scount_phi_false.push_back((
int)mphi &&
count && !
scount);
237 monstruct2.scount_eta_true.push_back((
int)!(mphi) &&
count &&
scount);
238 monstruct2.scount_eta_false.push_back((
int)!(mphi) &&
count && !
scount);
239 monstruct2.secLayer.push_back((
kl-16 + 0.2 * (lay - 1) + 0.1));
247 }
else tmp_val =
count;
253 }
else tmp_val =
count;
255 ATH_MSG_DEBUG ( wlay <<
"Counts sec: [" <<
kl-16 <<
"]\tlayer: [" <<
km <<
"] = " <<
256 monstruct2.secLayer.back() <<
"\t = " << monstruct2.count_mon.back()
257 <<
"\t" << monstruct2.scount_mon.back());
259 monstruct2.tmp_val_mon.push_back(tmp_val);
270 fill(
"CscPrdMonitor", numphi_mon, numeta_mon, numphi_sig_mon, numeta_sig_mon, numphi_diff_mon, numeta_diff_mon );
287 fill(
"CscPrdMonitor", spid, secLayer1, lumiblock_mon, noStrips, signal_mon, noise_mon, clus_phiSig, clus_etaSig, clus_etaNoise, clus_phiNoise,
sideC,
sideA, measphi, measeta );
299 fill(
"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 );
304 ATH_MSG_DEBUG(
"CscPrdValMonAlg: fillHistograms reports success" );
306 return StatusCode::SUCCESS;