46 for (Int_t iRPot = 0; iRPot <
RPOTSCNT; iRPot++)
52 m_faMD[iRPot][iLayer][iFiber] = faMD[iRPot][iLayer][iFiber];
53 m_fbMD[iRPot][iLayer][iFiber] = fbMD[iRPot][iLayer][iFiber];
60 return StatusCode::SUCCESS;
68 Int_t iNumUFiberHits = 0;
69 Int_t iNumVFiberHits = 0;
74 std::list<MDHIT>::const_iterator iter;
75 for (iter=ListMDHits.begin(); iter!=ListMDHits.end(); ++iter)
77 if (iRPot == (*iter).iRPot)
82 m_MapLayers.insert(std::pair<int, FIBERS>((*iter).iPlate, structFibers));
83 m_MapLayers[(*iter).iPlate].ListFibers.push_back((*iter).iFiber);
87 m_MapLayers[(*iter).iPlate].ListFibers.push_back((*iter).iFiber);
100 if (fmod(
double(
i),
double(2)) == 1) iNumUFiberHits++;
101 else iNumVFiberHits++;
118 return StatusCode::SUCCESS;
129 return StatusCode::SUCCESS;
138 Float_t b_ref[2] = {-127.0, -127.0};
139 Float_t fXInter, fYInter;
140 Float_t p_min, p_max;
141 Float_t n_min, n_max;
142 Int_t iMinP_tmp, iMaxP_tmp;
143 Int_t iMinN_tmp, iMaxN_tmp;
145 const Int_t NBINTOT = 72000;
146 Int_t Over_p[NBINTOT], Over_n[NBINTOT];
173 for (Int_t
i=0;
i<72000;
i++)
183 for (intIter=
m_MapLayers[iLayer].ListFibers.begin(); intIter!=
m_MapLayers[iLayer].ListFibers.end(); ++intIter)
191 fFibCen = (fYInter-fXInter)/sqrt(2.0);
195 Over_p[(
int)((fFibCen-0.24)*1000)+
bin+36000]++;
202 fFibCen = (fYInter+fXInter)/sqrt(2.0);
206 Over_n[(
int)((fFibCen-0.24)*1000)+
bin+36000]++;
216 std::vector<int> *max_p =
new std::vector<int>;
217 std::vector<int> *max_n =
new std::vector<int>;
219 for (Int_t
i=0;
i<72000;
i++)
221 if (Over_p[
i]>NumU) NumU = Over_p[
i];
222 if (Over_n[
i]>NumV) NumV = Over_n[
i];
227 for (Int_t
i=0;
i<72000;
i++)
235 p_min = -36.0 +
double(max_p->front())*1
e-3;
236 p_max = -36.0 +
double(max_p->back())*1
e-3;
237 iMinP_tmp = max_p->front();
238 iMaxP_tmp = max_p->back();
241 iFullWidth = max_p->size();
243 for (Int_t
i=0;
i<iFullWidth;
i++)
245 if (max_p->at(iFullWidth-
i-1)-iMinP_tmp < 500)
247 iMaxP_tmp = max_p->at(iFullWidth-
i-1);
248 p_max = -36.0 +
double(iMaxP_tmp)*1
e-3;
255 b_p = b_ref[1]+(p_min+p_max)/sqrt(2.);
272 for (Int_t
i=0;
i<72000;
i++)
280 n_min = -36.0 +
double(max_n->front())*1
e-3;
281 n_max = -36.0 +
double(max_n->back())*1
e-3;
282 iMinN_tmp = max_n->front();
283 iMaxN_tmp = max_n->back();
286 iFullWidth = max_n->size();
288 for (Int_t
i=0;
i<iFullWidth;
i++)
290 if (max_n->at(iFullWidth-
i-1)-iMinN_tmp < 500)
292 iMaxN_tmp = max_n->at(iFullWidth-
i-1);
293 n_max = -36.0 +
double(iMaxN_tmp)*1
e-3;
300 b_n = b_ref[0]+(n_min+n_max)/sqrt(2.);
325 Float_t b_mean_n=-9999.0;
326 Float_t b_mean_p=-9999.0;
332 HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 0);
335 if (b_mean_p!=-9999.0 && b_mean_n!=-9999.0)
337 HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 3);
338 if (b_mean_p!=-9999.0 && b_mean_n!=-9999.0)
HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 3);
343 if (b_mean_p!=-9999.0 && b_mean_n==-9999.0)
345 HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 1);
347 if (b_mean_p!=-9999.0 && b_mean_n!=-9999.0)
350 HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 3);
351 if (b_mean_p!=-9999.0 && b_mean_n!=-9999.0)
HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 3);
356 if (b_mean_p==-9999.0 && b_mean_n!=-9999.0)
358 HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 2);
360 if (b_mean_p!=-9999.0 && b_mean_n!=-9999.0)
363 HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 3);
364 if (b_mean_p!=-9999.0 && b_mean_n!=-9999.0)
HistFill(b_mean_p, b_mean_n, overReg_p, overReg_n, NumU, NumV, 3);
369 Float_t x_tmp, y_tmp;
371 Float_t dist_x,dist_y;
373 Int_t gFib_x, gFib_y;
379 if (b_mean_p!=-9999.0 && b_mean_n!=-9999.0)
389 min_x = 0.24/
cos(TMath::Pi()/4.);
390 min_y = 0.24/
cos(TMath::Pi()/4.);
395 for (intIter=
m_MapLayers[iLayer].ListFibers.begin(); intIter!=
m_MapLayers[iLayer].ListFibers.end(); ++intIter)
418 if (gFib_x==gFib_y)
m_fhits[iLayer]=gFib_x;
431 SetData(NumU, NumV, OL_U, OL_V);
459 iFibSel[iLayer] =
m_fhits[iLayer];