45 for (Int_t iRPot = 0; iRPot <
RPOTSCNT; iRPot++)
51 m_faMD[iRPot][iLayer][iFiber] = faMD[iRPot][iLayer][iFiber];
52 m_fbMD[iRPot][iLayer][iFiber] = fbMD[iRPot][iLayer][iFiber];
59 return StatusCode::SUCCESS;
67 Int_t iNumUFiberHits = 0;
68 Int_t iNumVFiberHits = 0;
73 std::list<MDHIT>::const_iterator iter;
74 for (iter=ListMDHits.begin(); iter!=ListMDHits.end(); ++iter)
76 if (iRPot == (*iter).iRPot)
81 m_MapLayers.insert(std::pair<int, FIBERS>((*iter).iPlate, structFibers));
82 m_MapLayers[(*iter).iPlate].ListFibers.push_back((*iter).iFiber);
86 m_MapLayers[(*iter).iPlate].ListFibers.push_back((*iter).iFiber);
97 if (fmod(
double(iLayer),
double(2)) == 1) iNumUFiberHits++;
98 else iNumVFiberHits++;
113 return StatusCode::SUCCESS;
125 return StatusCode::SUCCESS;
134 Float_t fbRef[2] = {-127.0, -127.0};
135 Float_t fXInter, fYInter;
136 Float_t fMinP, fMaxP;
137 Float_t fMinN, fMaxN;
138 Int_t iMinP_tmp, iMaxP_tmp;
139 Int_t iMinN_tmp, iMaxN_tmp;
141 const Int_t NBINTOT = 72000;
142 Int_t Over_p[NBINTOT], Over_n[NBINTOT];
168 for (Int_t iBin=0;iBin<72000;iBin++)
185 fFibCen = (fYInter-fXInter)/sqrt(2.0);
189 Over_p[(
int)((fFibCen-0.24)*1000)+
bin+36000]++;
196 fFibCen = (fYInter+fXInter)/sqrt(2.0);
200 Over_n[(
int)((fFibCen-0.24)*1000)+
bin+36000]++;
210 std::vector<int> *vecMaxP =
new std::vector<int>;
211 std::vector<int> *vecMaxN =
new std::vector<int>;
213 for (Int_t
i=0;
i<72000;
i++)
215 if (Over_p[
i]>iNumU) iNumU = Over_p[
i];
216 if (Over_n[
i]>iNumV) iNumV = Over_n[
i];
221 for (Int_t
i=0;
i<NBINTOT;
i++)
223 if (Over_p[
i]==iNumU)
225 vecMaxP->push_back(
i);
229 fMinP = -36.0 +
double(vecMaxP->front())*1
e-3;
230 fMaxP = -36.0 +
double(vecMaxP->back())*1
e-3;
231 iMinP_tmp = vecMaxP->front();
232 iMaxP_tmp = vecMaxP->back();
235 iFullWidth = vecMaxP->size();
237 for (Int_t
i=0;
i<iFullWidth;
i++)
239 if (vecMaxP->at(iFullWidth-
i-1)-iMinP_tmp < 500)
241 iMaxP_tmp = vecMaxP->at(iFullWidth-
i-1);
242 fMaxP = -36.0 +
double(iMaxP_tmp)*1
e-3;
249 b_p = fbRef[1]+(fMinP+fMaxP)/sqrt(2.);
250 fOverP = fMaxP-fMinP;
266 for (Int_t
i=0;
i<NBINTOT;
i++)
268 if (Over_n[
i]==iNumV)
270 vecMaxN->push_back(
i);
274 fMinN = -36.0 +
double(vecMaxN->front())*1
e-3;
275 fMaxN = -36.0 +
double(vecMaxN->back())*1
e-3;
276 iMinN_tmp = vecMaxN->front();
277 iMaxN_tmp = vecMaxN->back();
280 iFullWidth = vecMaxN->size();
282 for (Int_t
i=0;
i<iFullWidth;
i++)
284 if (vecMaxN->at(iFullWidth-
i-1)-iMinN_tmp < 500)
286 iMaxN_tmp = vecMaxN->at(iFullWidth-
i-1);
287 fMaxN = -36.0 +
double(iMaxN_tmp)*1
e-3;
294 b_n = fbRef[0]+(fMinN+fMaxN)/sqrt(2.);
295 fOverN = fMaxN-fMinN;
328 Float_t fBMeanN = -9999.0;
329 Float_t fBMeanP = -9999.0;
335 HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 0);
338 if (fBMeanP!=-9999.0 && fBMeanN!=-9999.0)
340 HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 3);
341 if (fBMeanP!=-9999.0 && fBMeanN!=-9999.0)
343 HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 3);
349 if (fBMeanP!=-9999.0 && fBMeanN==-9999.0)
351 HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 1);
353 if (fBMeanP!=-9999.0 && fBMeanN!=-9999.0)
356 HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 3);
357 if (fBMeanP!=-9999.0 && fBMeanN!=-9999.0)
HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 3);
362 if (fBMeanP==-9999.0 && fBMeanN!=-9999.0)
364 HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 2);
366 if (fBMeanP!=-9999.0 && fBMeanN!=-9999.0)
369 HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 3);
370 if (fBMeanP!=-9999.0 && fBMeanN!=-9999.0)
HistFill(fBMeanP, fBMeanN, fOverRegP, fOverRegN, iNumU, iNumV, 3);
375 Float_t fxTmp, fyTmp;
377 Float_t fDistX,fDistY;
380 Float_t fOverlapU, fOverlapV;
381 Int_t iFibSelX, iFibSelY;
384 if (fBMeanP!=-9999.0 && fBMeanN!=-9999.0)
388 fOverlapU = fOverRegP;
389 fOverlapV = fOverRegN;
393 fMinX = 0.24/
cos(TMath::Pi()/4.0);
394 fMinY = 0.24/
cos(TMath::Pi()/4.0);
396 iFibSelX = -9999, iFibSelY = -9999;
420 if (iFibSelX==iFibSelY)
m_iFibSel[iLayer] = iFibSelX;
433 SetData(iNumU, iNumV, fOverlapU, fOverlapV);