ATLAS Offline Software
ALFA_MDMultiple.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include <algorithm> // std::copy
7 
9  AthMessaging("ALFA_MDMultiple")
10 {
11  memset(&m_iNumHitsLayer, 0.0, sizeof(m_iNumHitsLayer));
12 
13  m_fOverlapCut = 0.0;
15  m_iNumLayerCut = 0;
16  m_iRPot = 0;
17  m_iUVCut = 0;
18 
19 
20  m_fRecXPos = nullptr;
21  m_fRecYPos = nullptr;
22  m_fOvU = nullptr;
23  m_fOvV = nullptr;
24  m_iNU = nullptr;
25  m_iNV = nullptr;
26  m_fRecXPos = new std::vector<Float_t>();
27  m_fRecYPos = new std::vector<Float_t>();
28  m_fOvU = new std::vector<Float_t>();
29  m_fOvV = new std::vector<Float_t>();
30  m_iNU = new std::vector<Int_t>();
31  m_iNV = new std::vector<Int_t>();
32 
33  for (auto & iLayer : m_iFibSel)
34  {
35  iLayer = nullptr;
36  iLayer = new std::vector<Int_t>();
37  }
38 
39  m_iTrackMatch[0] = nullptr;
40  m_iTrackMatch[1] = nullptr;
41  m_iTrackMatch[0] = new std::vector<Int_t>();
42  m_iTrackMatch[1] = new std::vector<Int_t>();
43 }
44 
46  AthMessaging("ALFA_MDMultiple")
47 {
48 // std::copy(obj.m_iNumHitsLayer, obj.m_iNumHitsLayer + sizeof(obj.m_iNumHitsLayer)/sizeof(Int_t), m_iNumHitsLayer);
49  std::copy(obj.m_iNumHitsLayer, obj.m_iNumHitsLayer + ALFALAYERSCNT*ALFAPLATESCNT, m_iNumHitsLayer);
50 
51  m_fOverlapCut = obj.m_fOverlapCut;
52  m_iMultiplicityCut = obj.m_iMultiplicityCut;
53  m_iNumLayerCut = obj.m_iNumLayerCut;
54  m_iRPot = obj.m_iRPot;
55  m_iUVCut = obj.m_iUVCut;
56 
57  m_fRecXPos = nullptr;
58  m_fRecYPos = nullptr;
59  m_fOvU = nullptr;
60  m_fOvV = nullptr;
61  m_iNU = nullptr;
62  m_iNV = nullptr;
63  m_fRecXPos = new std::vector<Float_t>();
64  m_fRecYPos = new std::vector<Float_t>();
65  m_fOvU = new std::vector<Float_t>();
66  m_fOvV = new std::vector<Float_t>();
67  m_iNU = new std::vector<Int_t>();
68  m_iNV = new std::vector<Int_t>();
69 
70  std::copy(obj.m_fRecXPos->begin(), obj.m_fRecXPos->end(), m_fRecXPos->begin());
71  std::copy(obj.m_fRecYPos->begin(), obj.m_fRecYPos->end(), m_fRecYPos->begin());
72  std::copy(obj.m_fOvU->begin(), obj.m_fOvU->end(), m_fOvU->begin());
73  std::copy(obj.m_fOvV->begin(), obj.m_fOvV->end(), m_fOvV->begin());
74  std::copy(obj.m_iNU->begin(), obj.m_iNU->end(), m_iNU->begin());
75  std::copy(obj.m_iNV->begin(), obj.m_iNV->end(), m_iNV->begin());
76 
77  for (int iLayer=0; iLayer<ALFALAYERSCNT*ALFAPLATESCNT; iLayer++)
78  {
79  m_iFibSel[iLayer] = new std::vector<Int_t>(*obj.m_iFibSel[iLayer]);
80  }
81 
82  m_iTrackMatch[0] = nullptr;
83  m_iTrackMatch[1] = nullptr;
84  m_iTrackMatch[0] = new std::vector<Int_t>();
85  m_iTrackMatch[1] = new std::vector<Int_t>();
86  std::copy(obj.m_iTrackMatch[0]->begin(), obj.m_iTrackMatch[0]->end(), m_iTrackMatch[0]->begin());
87  std::copy(obj.m_iTrackMatch[1]->begin(), obj.m_iTrackMatch[1]->end(), m_iTrackMatch[1]->begin());
88 }
89 
91 {
92  if (this != &obj)
93  {
94 // std::swap(m_iNumHitsLayer, obj.m_iNumHitsLayer);
95  Int_t nLayers = ALFALAYERSCNT*ALFAPLATESCNT;
96 
97  for (int i = 0; i < nLayers; i++)
98  m_iNumHitsLayer[i] = obj.m_iNumHitsLayer[i];
99 
100  m_fOverlapCut = obj.m_fOverlapCut;
101  m_iMultiplicityCut = obj.m_iMultiplicityCut;
102  m_iNumLayerCut = obj.m_iNumLayerCut;
103  m_iRPot = obj.m_iRPot;
104  m_iUVCut = obj.m_iUVCut;
105 
106 // std::swap(m_fRecXPos, obj.m_fRecXPos);
107 // std::swap(m_fRecYPos, obj.m_fRecYPos);
108 // std::swap(m_fOvU , obj.m_fOvU);
109 // std::swap(m_fOvV , obj.m_fOvV);
110 // std::swap(m_iNU , obj.m_iNU);
111 // std::swap(m_iNV , obj.m_iNV);
112 // std::swap(m_iFibSel, obj.m_iFibSel);
113 // std::swap(m_iTrackMatch, obj.m_iTrackMatch);
114 
115  std::copy(m_fRecXPos->begin(), m_fRecXPos->end(), obj.m_fRecXPos->begin());
116  std::copy(m_fRecYPos->begin(), m_fRecYPos->end(), obj.m_fRecYPos->begin());
117  std::copy(m_fOvU->begin(), m_fOvU->end(), obj.m_fOvU->begin());
118  std::copy(m_fOvV->begin(), m_fOvV->end(), obj.m_fOvV->begin());
119  std::copy(m_iNU->begin(), m_iNU->end(), obj.m_iNU->begin());
120  std::copy(m_iNV->begin(), m_iNV->end(), obj.m_iNV->begin());
121 
122  for (int iLayer = 0; iLayer < nLayers; iLayer++)
123  {
124  m_iFibSel[iLayer] = nullptr;
125  m_iFibSel[iLayer] = new std::vector<Int_t>();
126  std::copy(m_iFibSel[iLayer]->begin(), m_iFibSel[iLayer]->end(), obj.m_iFibSel[iLayer]->begin());
127  }
128 
129  m_iTrackMatch[0] = nullptr;
130  m_iTrackMatch[1] = nullptr;
131  m_iTrackMatch[0] = new std::vector<Int_t>();
132  m_iTrackMatch[1] = new std::vector<Int_t>();
133  std::copy(m_iTrackMatch[0]->begin(), m_iTrackMatch[0]->end(), obj.m_iTrackMatch[0]->begin());
134  std::copy(m_iTrackMatch[1]->begin(), m_iTrackMatch[1]->end(), obj.m_iTrackMatch[1]->begin());
135  }
136 
137  return *this;
138 }
139 
141 {
142  if (m_fRecXPos!=nullptr) {delete m_fRecXPos; m_fRecXPos=nullptr;}
143  if (m_fRecYPos!=nullptr) {delete m_fRecYPos; m_fRecYPos=nullptr;}
144  if (m_fOvU!=nullptr) {delete m_fOvU; m_fOvU=nullptr;}
145  if (m_fOvV!=nullptr) {delete m_fOvV; m_fOvV=nullptr;}
146  if (m_iNU!=nullptr) {delete m_iNU; m_iNU=nullptr;}
147  if (m_iNV!=nullptr) {delete m_iNV; m_iNV=nullptr;}
148 
149  for (auto & iLayer : m_iFibSel)
150  {
151  if (iLayer!=nullptr) {delete iLayer; iLayer=nullptr;}
152  }
153  if (m_iTrackMatch[0]!=nullptr) {delete m_iTrackMatch[0]; m_iTrackMatch[0]=nullptr;}
154  if (m_iTrackMatch[1]!=nullptr) {delete m_iTrackMatch[1]; m_iTrackMatch[1]=nullptr;}
155 }
156 
157 StatusCode ALFA_MDMultiple::Initialize(Int_t iRPot, Float_t faMD[RPOTSCNT][ALFALAYERSCNT*ALFAPLATESCNT][ALFAFIBERSCNT], Float_t fbMD[RPOTSCNT][ALFALAYERSCNT*ALFAPLATESCNT][ALFAFIBERSCNT], Int_t iMultiplicityCut, Int_t iNumLayerCut, Int_t iUVCut, Float_t fOverlapCut)
158 {
159  ATH_MSG_DEBUG("ALFA_MDMultiple::Initialize()");
160 
161  m_iRPot = iRPot;
162  m_iUVCut = iUVCut;
163  m_iNumLayerCut = iNumLayerCut;
164  m_iMultiplicityCut = iMultiplicityCut;
165  m_fOverlapCut = fOverlapCut;
166 
167  for (Int_t iPot=0; iPot<RPOTSCNT; iPot++)
168  {
169  for (Int_t iLayer=0; iLayer<ALFALAYERSCNT*ALFAPLATESCNT; iLayer++)
170  {
171  for (Int_t iFiber=0; iFiber<ALFAFIBERSCNT; iFiber++)
172  {
173  m_faMD[iPot][iLayer][iFiber] = faMD[iPot][iLayer][iFiber];
174  m_fbMD[iPot][iLayer][iFiber] = fbMD[iPot][iLayer][iFiber];
175  }
176  }
177  }
178 
179 // std::cout << "m_iMultiplicityCut, m_iUVCut = " << m_iMultiplicityCut << ", " << m_iUVCut << std::endl;
180 
181  return StatusCode::SUCCESS;
182 }
183 
184 StatusCode ALFA_MDMultiple::Execute(const std::list<MDHIT> &ListMDHits)
185 {
186  ATH_MSG_DEBUG("ALFA_MDMultiple::Execute()");
187 
188  FIBERS structFibers;
189  m_MapLayers.clear();
190 
191  std::list<MDHIT>::const_iterator iter;
192  for (iter=ListMDHits.begin(); iter!=ListMDHits.end(); ++iter)
193  {
194  if (m_iRPot == (*iter).iRPot)
195  {
196  if(m_MapLayers.find((*iter).iPlate)==m_MapLayers.end())
197  {
198  structFibers.ListFibers.clear();
199  m_MapLayers.insert(std::pair<int, FIBERS>((*iter).iPlate, structFibers));
200  m_MapLayers[(*iter).iPlate].ListFibers.push_back((*iter).iFiber);
201  }
202  else m_MapLayers[(*iter).iPlate].ListFibers.push_back((*iter).iFiber);
203  }
204  }
205 
206  // RECONSTRUCTION
207  std::vector<double> b_p, b_n;
208  std::vector<double> Ov_p, Ov_n;
209  std::vector<int> Num_p, Num_n;
210  std::vector<int> FSel_n[ALFAPLATESCNT], FSel_p[ALFAPLATESCNT];
211  std::vector<int> iTrackMatch[2];
212 
213 
214  //Checking that the multiplicity cut conditions are satisfied
215  //At least more than UV_cut layers have a multiplicity lower than multi_cut
216 // Int_t iNumUFiberHits=0, iNumVFiberHits=0;
217 // for (Int_t iLayer=0; iLayer<ALFALAYERSCNT*ALFAPLATESCNT; iLayer++)
218 // {
219 // if ((Int_t)m_MapLayers[iLayer].ListFibers.size()<=m_iMultiplicityCut && (Int_t)m_MapLayers[iLayer].ListFibers.size()>0)
220 // {
221 // // prohozen U/V?
222 // // if (fmod(double(iLayer),double(2)) == 1) iNumUFiberHits++;
223 // // else iNumVFiberHits++;
224 //
225 // if (fmod(double(iLayer),double(2)) == 0) iNumUFiberHits++;
226 // else iNumVFiberHits++;
227 // }
228 // }
229 
230 // if (iNumUFiberHits>=m_iMultiplicityCut && iNumVFiberHits>=m_iMultiplicityCut)
231  {
232  Reco_Track(b_p, b_n, Ov_p, Ov_n, Num_p, Num_n, FSel_n, FSel_p, iTrackMatch);
233 
234  //Now sorting the tracks using NumU+NumV criteria -------------------------------
235  Int_t iCntSort=0;
236  Int_t iMaxSum=0;
237  std::vector<Int_t> MaxTrackID;
238  Int_t iTmpMaxTrackID = -1;
239 
240 // std::cout << "b_p.size = " << b_p.size() << std::endl;
241  while (iCntSort<(Int_t)b_p.size())
242  {
243  iMaxSum=0;
244  for (Int_t i=0; i<(Int_t)b_p.size(); i++)
245  {
246  //Checking that the maximum was not already used
247  Bool_t MaxUsed=false;
248 
249  for (int j : MaxTrackID)
250  {
251  if (i==j) {MaxUsed = true; break;}
252  }
253 
254  if (((Num_p[i]+Num_n[i])>iMaxSum) && (!MaxUsed))
255  {
256  iMaxSum = Num_p[i]+Num_n[i];
257  iTmpMaxTrackID=i;
258  }
259  }
260  MaxTrackID.push_back(iTmpMaxTrackID);
261  iCntSort++;
262  }
263 
264 // std::cout << "MaxTrackID size = " << MaxTrackID.size() << std::endl;
265 
266 // for (Int_t i=0; i<(Int_t)b_p.size();i++)
267  for (int i : MaxTrackID)
268  {
269 // std::cout << " [" << i << "] = " << MaxTrackID[i] << std::endl;
270 // if (fabs((b_p[i]+b_n[i])/2.0) < 135.5)
271  {
272  m_fRecXPos->push_back((b_p[i]-b_n[i])/2.0);
273  m_fRecYPos->push_back((b_p[i]+b_n[i])/2.0);
274 
275  m_fOvU->push_back(Ov_p[i]);
276  m_fOvV->push_back(Ov_n[i]);
277  m_iNU->push_back(Num_p[i]);
278  m_iNV->push_back(Num_n[i]);
279 
280  //the U and V are somehow interchanged, therefore they are here interchanged back.
281 // m_fOvU->push_back(Ov_n[MaxTrackID[i]]); //just for test
282 // m_fOvV->push_back(Ov_p[MaxTrackID[i]]); //just for test
283 // m_iNU->push_back(Num_n[MaxTrackID[i]]); //just for test
284 // m_iNV->push_back(Num_p[MaxTrackID[i]]); //just for test
285 
286  m_iTrackMatch[0]->push_back(iTrackMatch[0][i]);
287  m_iTrackMatch[1]->push_back(iTrackMatch[1][i]);
288 
289 // std::cout << "iTrackMatch[0][" << MaxTrackID[i] << "] = " << iTrackMatch[0][MaxTrackID[i]] << std::endl;
290 // std::cout << "iTrackMatch[1][" << MaxTrackID[i] << "] = " << iTrackMatch[1][MaxTrackID[i]] << std::endl;
291 // std::cout << "x, y = " << (b_p[MaxTrackID[i]]-b_n[MaxTrackID[i]])/2.0 << ", " << (b_p[MaxTrackID[i]]+b_n[MaxTrackID[i]])/2.0 << std::endl;
292 
293  for (Int_t iPlate=0; iPlate<ALFAPLATESCNT; iPlate++)
294  {
295  m_iFibSel[2*iPlate]->push_back(FSel_p[iPlate][i]);
296  m_iFibSel[2*iPlate+1]->push_back(FSel_n[iPlate][i]);
297 // m_iFibSel[2*iPlate+1]->push_back(FSel_p[iPlate][MaxTrackID[i]]); //just for test
298 // m_iFibSel[2*iPlate]->push_back(FSel_n[iPlate][MaxTrackID[i]]); //just for test
299  }
300  }
301  }
302 // {
304 // {
305 // m_fRecXPos->push_back((b_p[i]-b_n[i])/2.0);
306 // m_fRecYPos->push_back((b_p[i]+b_n[i])/2.0);
307 
312 
313 // //the U and V are somehow interchanged, therefore they are here interchanged back.
314 // m_fOvU->push_back(Ov_n[i]);
315 // m_fOvV->push_back(Ov_p[i]);
316 // m_iNU->push_back(Num_n[i]);
317 // m_iNV->push_back(Num_p[i]);
318 
319 // m_iTrackMatch[0]->push_back(iTrackMatch[0][i]);
320 // m_iTrackMatch[1]->push_back(iTrackMatch[1][i]);
321 
322 // std::cout << "iTrackMatch[0][" << i << "] = " << iTrackMatch[0][i] << std::endl;
323 // std::cout << "iTrackMatch[1][" << i << "] = " << iTrackMatch[1][i] << std::endl;
324 // std::cout << "x, y = " << (b_p[i]-b_n[i])/2.0 << ", " << (b_p[i]+b_n[i])/2.0 << std::endl;
325 
326 // for (Int_t iPlate=0; iPlate<ALFAPLATESCNT; iPlate++)
327 // {
330 // m_iFibSel[2*iPlate+1]->push_back(FSel_p[iPlate][i]);
331 // m_iFibSel[2*iPlate]->push_back(FSel_n[iPlate][i]);
332 // }
333 // }
334 
335 // }
336 
337 // std::cout << "------------------------------------------------------------------" << std::endl;
338  }
339 
340 
341  return StatusCode::SUCCESS;
342 }
343 
344 StatusCode ALFA_MDMultiple::Finalize(Float_t (&fRecXPos)[MAXTRACKNUM], Float_t (&fRecYPos)[MAXTRACKNUM])
345 {
346  ATH_MSG_DEBUG("ALFA_MDMultiple::Finalize()");
347 
348  Int_t iTrackNum=0, iSize=0;
349  std::fill_n(&fRecXPos[0], sizeof(fRecXPos)/sizeof(Float_t), -9999.0);
350  std::fill_n(&fRecYPos[0], sizeof(fRecYPos)/sizeof(Float_t), -9999.0);
351 
352  iSize = (m_fRecXPos->size() <= m_fRecYPos->size())? m_fRecXPos->size() : m_fRecYPos->size();
353  iTrackNum = (iSize < MAXTRACKNUM)? iSize : MAXTRACKNUM;
354 
355  for (Int_t i=0; i<iTrackNum; i++)
356  {
357  fRecXPos[i] = m_fRecXPos->at(i);
358  fRecYPos[i] = m_fRecYPos->at(i);
359  }
360 
361  return StatusCode::SUCCESS;
362 }
363 
364 /************************************************/
365 /* Making projection and storing in an array */
366 /************************************************/
367 void ALFA_MDMultiple::Proj_Store(Int_t iFiberSide, Int_t (&iOver)[72000], Float_t fbRef, Int_t iSideFlag)
368 {
369  ATH_MSG_DEBUG("ALFA_MDMultiple::Pro_Store()");
370 
371  Float_t fSign;
372  Float_t fXInter, fYInter;
373  Float_t FibCen;
374 
375  if (m_faMD[m_iRPot][iSideFlag][0]>0) fSign=1.0;
376  else fSign=-1.0;
377 
378  for (int & iBin : iOver)
379  {
380  iBin=0;
381  }
382 
383  // coverity bug 13955 fixed bellow
384 // std::list<int>::iterator intIter;
385 // for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
386 // {
387 // for (intIter=m_MapLayers[2*iLayer+iFiberSide].ListFibers.begin(); intIter!=m_MapLayers[2*iLayer+iFiberSide].ListFibers.end(); intIter++)
388 // {
389 // if (*intIter!=9999)
390 // {
391 // //Depending on layer orientation, computing the projection of the hit fiber
392 // fXInter= fSign*(fbRef-m_fbMD[m_iRPot][iLayer*2+iSideFlag][*intIter])/(1+fSign*m_faMD[m_iRPot][iLayer*2+iSideFlag][*intIter]);
393 // fYInter= (fSign*m_faMD[m_iRPot][iLayer*2+iSideFlag][*intIter]*fbRef+m_fbMD[m_iRPot][iLayer*2+iSideFlag][*intIter])/(1+fSign*m_faMD[m_iRPot][iLayer*2+iSideFlag][*intIter])-fbRef;
394 // FibCen = (fYInter-fSign*fXInter)/sqrt(2.0);
395 
396 // //Filling the table with the hit fiber
397 // for (Int_t iBin=0; iBin<480; iBin++)
398 // {
399 // iOver[(int)((FibCen-0.24)*1000)+iBin+36000]++;
400 // }
401 // }
402 // }
403 // }
404 
405  for (UInt_t iLayer=0; iLayer!=ALFAPLATESCNT; ++iLayer)
406  {
407  const unsigned int thisSideLayer = iLayer*2+iSideFlag;
408  const unsigned int thisLayer = 2*iLayer+iFiberSide;
409  const std::list<int> & thisFiberContainer = m_MapLayers[thisLayer].ListFibers;
410  for (const auto & thisFiber:thisFiberContainer)
411  {
412  if (thisFiber!=9999)
413  {
414  //Depending on layer orientation, computing the projection of the hit fiber
415  fXInter= fSign*(fbRef-m_fbMD[m_iRPot][thisSideLayer][thisFiber])/(1+fSign*m_faMD[m_iRPot][thisSideLayer][thisFiber]);
416  fYInter= (fSign*m_faMD[m_iRPot][thisSideLayer][thisFiber]*fbRef+m_fbMD[m_iRPot][thisSideLayer][thisFiber])/(1+fSign*m_faMD[m_iRPot][thisSideLayer][thisFiber])-fbRef;
417  FibCen = (fYInter-fSign*fXInter)/sqrt(2.0);
418 
419  //Filling the table with the hit fiber
420  for (Int_t iBin=0; iBin<480; iBin++)
421  {
422  iOver[(int)((FibCen-0.24)*1000)+iBin+36000]++;
423  }
424  }
425  }
426  }
427 }
428 
429 /************************************************/
430 /* Making projection and storing in an array */
431 /************************************************/
432 void ALFA_MDMultiple::Proj_Store(std::vector<Int_t> FiberHit[ALFAPLATESCNT], Int_t (&iOver)[72000], Float_t fbRef, Int_t iSideFlag)
433 {
434  ATH_MSG_DEBUG("ALFA_MDMultiple::Pro_Store()");
435 
436  Float_t fSign;
437  Float_t fXInter, fYInter;
438  Float_t FibCen;
439 
440  if (m_faMD[m_iRPot][iSideFlag][0]>0) fSign=1.0;
441  else fSign=-1.0;
442 
443  for (int & iBin : iOver)
444  {
445  iBin=0;
446  }
447 
448  int iHit = 9999;
449  for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
450  {
451  for (UInt_t j=0; j<FiberHit[iLayer].size(); j++)
452  {
453  iHit = FiberHit[iLayer][j];
454  if (iHit!=9999)
455  {
456  //Depending on layer orientation, computing the projection of the hit fiber
457  fXInter= fSign*(fbRef-m_fbMD[m_iRPot][iLayer*2+iSideFlag][iHit])/(1+fSign*m_faMD[m_iRPot][iLayer*2+iSideFlag][iHit]);
458  fYInter= (fSign*m_faMD[m_iRPot][iLayer*2+iSideFlag][iHit]*fbRef+m_fbMD[m_iRPot][iLayer*2+iSideFlag][iHit])/(1+fSign*m_faMD[m_iRPot][iLayer*2+iSideFlag][iHit])-fbRef;
459  FibCen = (fYInter-fSign*fXInter)/sqrt(2.0);
460 
461  //Filling the table with the hit fiber
462  for (Int_t iBin=0; iBin<480; iBin++)
463  {
464  iOver[(int)((FibCen-0.24)*1000)+iBin+36000]++;
465  }
466  }
467  }
468  }
469 }
470 
471 /************************************************/
472 /* Identifying plateau in projection array */
473 /************************************************/
474 void ALFA_MDMultiple::Find_Proj(const Int_t iOver[72000], Float_t fbRef, Float_t &fb, Float_t &fOv, Int_t &iNum)
475 {
476  ATH_MSG_DEBUG("ALFA_MDMultiple::Find_Proj()");
477 
478  std::vector<int> iSizePlateau;
479  Int_t iNumFib=0;
480  Int_t p_tmp_min;
481 // Int_t p_tmp_max;
482  Float_t p_min;
483  Float_t p_max;
484 
485  //Determine the maximum number of overlapping fibers in both directions
486  for (Int_t i=0;i<72000;i++)
487  {
488  if (iOver[i]>iNumFib) iNumFib=iOver[i];
489  }
490 
491  // Filling array for all values equal to the maximum
492  if (iNumFib>=m_iUVCut)
493  {
494  for (Int_t i=0;i<72000;i++)
495  {
496  if (iOver[i]==iNumFib)
497  {
498  iSizePlateau.push_back(i);
499  }
500  }
501 
502 // Finding first and last position where the maximum is found
503  p_min = -36.0 + double(iSizePlateau.front())*1e-3;
504  p_tmp_min = iSizePlateau.front();
505 
506  p_max = -36.0 + double(iSizePlateau.back())*1e-3;
507 // p_tmp_max = iSizePlateau.back();
508 
509 // Making sure that the plateau belongs to the same track
510  Int_t full_width = iSizePlateau.size();
511 
512  for (Int_t i=0; i<full_width; i++)
513  {
514  if (iSizePlateau[full_width-i-1]-p_tmp_min < 500)
515  {
516 // p_tmp_max = iSizePlateau[full_width-i-1];
517  p_max = -36.0 + double(iSizePlateau[full_width-i-1])*1e-3;
518 
519  break;
520  }
521  }
522 
523  if ((p_max-p_min)<m_fOverlapCut)
524  {
525 // Storing the coordinate of the maximum
526  fb = fbRef+(p_min+p_max)/sqrt(2.0);
527  fOv = p_max-p_min;
528  }
529  }
530 
531  iNum = iNumFib;
532 }
533 
534 /************************************************/
535 /************************************************/
536 /* Identifying fibers on the track */
537 /************************************************/
538 /************************************************/
539 
540 void ALFA_MDMultiple::Finding_Fib(Int_t iFiberSide, Float_t fbRef, Float_t fbRec, Int_t (&iFSel)[10], Int_t iSideFlag)
541 {
542  ATH_MSG_DEBUG("ALFA_MDMultiple::Finding_Fib()");
543 
544  Float_t b_pos, b_neg;
545  Float_t x, y, x_tmp, y_tmp;
546  Float_t min_dist;
547  Float_t dist_x, dist_y;
548  Float_t dist_full;
549  Float_t fib_dist;
550 // Int_t gFib;
551 
552  if (iSideFlag==0)
553  {
554  b_neg= fbRef;
555  b_pos= fbRec;
556  }
557  else
558  {
559  b_neg= fbRec;
560  b_pos= fbRef;
561  }
562 
563  x= (b_pos-b_neg)/2.0;
564  y= (b_neg+b_pos)/2.0;
565 
566  for (int & iLayer : iFSel) iLayer = 9999;
567 
568  //For each layer, we determine the hit fiber which is closest to the track
569  std::list<int>::iterator intIter;
570  for (Int_t iLayer = 0; iLayer<ALFAPLATESCNT; iLayer++)
571  {
572  min_dist=0.24;
573 // gFib = 9999;
574 
575  // coverity bug 13956 fixed
576 // for (intIter=m_MapLayers[2*iLayer+iFiberSide].ListFibers.begin(); intIter!=m_MapLayers[2*iLayer+iFiberSide].ListFibers.end(); intIter++)
577 // {
578 // if (*intIter!=9999)
579 // {
580 // x_tmp = (y-m_fbMD[m_iRPot][iLayer*2+iSideFlag][*intIter])/m_faMD[m_iRPot][iLayer*2+iSideFlag][*intIter];
581 // y_tmp = m_faMD[m_iRPot][iLayer*2+iSideFlag][*intIter]*x+m_fbMD[m_iRPot][iLayer*2+iSideFlag][*intIter];
582 
583 // dist_x = TMath::Abs(x-x_tmp);
584 // dist_y = TMath::Abs(y-y_tmp);
585 
586 // dist_full = sqrt(dist_x*dist_x+dist_y*dist_y);
587 // fib_dist = sqrt(TMath::Power((dist_x+dist_y)/2.0,2)-TMath::Power(dist_full/2.0,2));
588 
589 // if (fib_dist <= min_dist)
590 // {
591 // min_dist = fib_dist;
592 // gFib = *intIter;
593 // iFSel[iLayer] = gFib;
594 // }
595 // }
596 // }
597 
598  const unsigned int thisSideLayer = iLayer*2+iSideFlag;
599  const unsigned int thisLayer = 2*iLayer+iFiberSide;
600  const std::list<int> & thisFiberContainer = m_MapLayers[thisLayer].ListFibers;
601  for (const auto & thisFiber:thisFiberContainer)
602  {
603  if (thisFiber != 9999)
604  {
605  x_tmp = (y-m_fbMD[m_iRPot][thisSideLayer][thisFiber])/m_faMD[m_iRPot][thisSideLayer][thisFiber];
606  y_tmp = m_faMD[m_iRPot][thisSideLayer][thisFiber]*x+m_fbMD[m_iRPot][thisSideLayer][thisFiber];
607 
608  dist_x = TMath::Abs(x-x_tmp);
609  dist_y = TMath::Abs(y-y_tmp);
610 
611  dist_full = sqrt(dist_x*dist_x+dist_y*dist_y);
612  fib_dist = sqrt(TMath::Power((dist_x+dist_y)/2.0,2)-TMath::Power(dist_full/2.0,2));
613 
614  if (fib_dist <= min_dist)
615  {
616  min_dist = fib_dist;
617  iFSel[iLayer] = thisFiber;
618  }
619  }
620  }
621 
622 
623 /*
624  std::list<int> listFibersTmp = m_MapLayers[2*iLayer+iFiberSide].ListFibers;
625  std::list<int>::const_iterator itBeg = listFibersTmp.begin();
626  std::list<int>::const_iterator itEnd = listFibersTmp.end();
627  for (; itBeg!=itEnd; ++itBeg)
628  {
629  if (*itBeg!=9999)
630  {
631  x_tmp = (y-m_fbMD[m_iRPot][iLayer*2+iSideFlag][*itBeg])/m_faMD[m_iRPot][iLayer*2+iSideFlag][*itBeg];
632  y_tmp = m_faMD[m_iRPot][iLayer*2+iSideFlag][*itBeg]*x+m_fbMD[m_iRPot][iLayer*2+iSideFlag][*itBeg];
633 
634  dist_x = TMath::Abs(x-x_tmp);
635  dist_y = TMath::Abs(y-y_tmp);
636 
637  dist_full = sqrt(dist_x*dist_x+dist_y*dist_y);
638  fib_dist = sqrt(TMath::Power((dist_x+dist_y)/2.0,2)-TMath::Power(dist_full/2.0,2));
639 
640  if (fib_dist <= min_dist)
641  {
642  min_dist = fib_dist;
643  gFib = *itBeg;
644 
645  iFSel[iLayer] = gFib;
646  }
647  }
648  }
649 */
650 
651  }
652 }
653 
654 /************************************************/
655 /* Finding all tracks */
656 /************************************************/
657 
658 void ALFA_MDMultiple::Reco_Track(std::vector<double> &b_p, std::vector<double> &b_n,
659  std::vector<double> &Ov_p, std::vector<double> &Ov_n,
660  std::vector<int> &Num_p, std::vector<int> &Num_n,
661  std::vector<int> (&FSel_n)[ALFAPLATESCNT], std::vector<int> (&FSel_p)[ALFAPLATESCNT],
662  std::vector<int> (&iTrackMatch)[2])
663 {
664  ATH_MSG_DEBUG("ALFA_MDMultiple::Reco_Track()");
665 
666 // Int_t FSel_pos[ALFAPLATESCNT];
667  Int_t FSel_neg[ALFAPLATESCNT];
668  Int_t FSel_pos_tmp[ALFAPLATESCNT];
669  Int_t Over_p[72000];
670  Int_t Over_n[72000];
671  Int_t cnt_step_U=0;
672  Int_t cnt_step_V=0;
673  Int_t NumU=0;
674  Int_t NumV=0;
675  Float_t b_ref_p;
676  Float_t b_ref_n;
677  Float_t OvU;
678  Float_t OvV;
679  Float_t b_pos;
680  Float_t b_neg;
681 
682  std::list<int>::iterator intIter;
683 
684 
685  //clear
686  for (Int_t i=0; i<ALFAPLATESCNT; i++)
687  {
688  FSel_n[i].clear();
689  FSel_p[i].clear();
690  }
691  b_n.clear();
692  b_p.clear();
693  Ov_n.clear();
694  Ov_p.clear();
695  Num_n.clear();
696  Num_p.clear();
697 
698  int iNumUFiberHits = 0;
699  int iNumVFiberHits = 0;
700 
701  std::vector<Int_t> Fiber_MB_tmp[ALFAPLATESCNT];
702  std::vector<Int_t> Fiber_MB_n[ALFAPLATESCNT];
703 
704  //fix coverity 13959 - following code replaced by next for loop
705 // std::list<int>::iterator it;
706 // for (UInt_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
707 // {
708 // Fiber_MB_n[iLayer].clear();
709 // for (it=m_MapLayers[2*iLayer+1].ListFibers.begin(); it!=m_MapLayers[2*iLayer+1].ListFibers.end(); it++)
711 // {
712 // Fiber_MB_n[iLayer].push_back(*it);
713 // }
714 // }
715 
716  for (UInt_t iLayer=0; iLayer!=ALFAPLATESCNT; ++iLayer)
717  {
718  Fiber_MB_n[iLayer].clear();
719  const unsigned int thisLayer=2*iLayer+1;
720  const std::list<int> & thisFiberContainer = m_MapLayers[thisLayer].ListFibers;
721  for (const auto & thisFiber:thisFiberContainer)
722  {
723 // std::cout << "thisFiber: " << thisFiber << std::endl;
724  Fiber_MB_n[iLayer].push_back(thisFiber);
725  }
726  }
727  do
728  {
729  b_ref_n=-127.0;
730  b_ref_p=-127.0;
731 
732 // First projection step on U side
733 // -------------------------------
734 // filling the array for U side with reference value
735  Proj_Store(0, Over_p, b_ref_n, 0);
736 // Proj_Store(1, Over_p, b_ref_n, 0); //just for test
737 // Proj_Store(1, Over_p, b_ref_n, 1); //just for test
738 
739 // Find first maxium
740  Find_Proj(Over_p, b_ref_n, b_pos, OvU, NumU);
741 
742  Finding_Fib(0, b_ref_n, b_pos, FSel_pos_tmp, 0);
743 // Finding_Fib(1, b_ref_n, b_pos, FSel_pos_tmp, 0); //just for test
744 // Finding_Fib(1, b_ref_n, b_pos, FSel_pos_tmp, 1); //just for test
745  for (int i=0; i<ALFAPLATESCNT; i++)
746  {
747  Fiber_MB_tmp[i].clear();
748  Fiber_MB_tmp[i].push_back(FSel_pos_tmp[i]);
749  }
750 
751 // // added ----------
752 // std::cout << "FSel_pos after 1st U proj: ";
753 // for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
754 // {
755 // std::cout << " " << FSel_pos[iLayer];
756 // }
757 // std::cout << std::endl;
758 
759  //Then reconstruction all tracks possible using the second side
760  for (UInt_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
761  {
762  m_MapLayers[2*iLayer+1].ListFibers.clear();
763 // m_MapLayers[2*iLayer].ListFibers.clear(); //just for test
764  for (unsigned int i=0; i<Fiber_MB_n[iLayer].size(); i++)
765  {
766  m_MapLayers[2*iLayer+1].ListFibers.push_back(Fiber_MB_n[iLayer][i]);
767 // m_MapLayers[2*iLayer].ListFibers.push_back(Fiber_MB_n[iLayer][i]); //just for test
768  }
769  }
770 
771 // std::cout << "NumU " << NumU << std::endl;
772 
773 // Then reconstruct all tracks possible using the second side
774  if (NumU>=m_iUVCut)
775  {
776  cnt_step_V=0;
777  do
778  {
779  // New Part to apply the multiplicity cut at each iteration
780  iNumUFiberHits=0;
781  iNumVFiberHits=0;
782  for (UInt_t iLayer=0;iLayer<ALFAPLATESCNT;iLayer++)
783  {
784  if ((Int_t)m_MapLayers[2*iLayer].ListFibers.size()<=m_iMultiplicityCut && !m_MapLayers[2*iLayer].ListFibers.empty()) iNumUFiberHits++;
785  if ((Int_t)m_MapLayers[2*iLayer+1].ListFibers.size()<=m_iMultiplicityCut && !m_MapLayers[2*iLayer+1].ListFibers.empty()) iNumVFiberHits++;
786 // if ((Int_t)m_MapLayers[2*iLayer+1].ListFibers.size()<=m_iMultiplicityCut && m_MapLayers[2*iLayer+1].ListFibers.size()>0) iNumUFiberHits++; //just for test
787 // if ((Int_t)m_MapLayers[2*iLayer].ListFibers.size()<=m_iMultiplicityCut && m_MapLayers[2*iLayer].ListFibers.size()>0) iNumVFiberHits++; //just for test
788  }
789 
790 // std::cout << "2nd multiplicity cut " << iNumUFiberHits << " " << iNumVFiberHits << std::endl;
791 
792  if (iNumUFiberHits>=m_iNumLayerCut && iNumVFiberHits>=m_iNumLayerCut)
793  {
794  //First projection on V side
795  //-------------------------------
796  //filling the array for V side with reference value
797  Proj_Store(1, Over_n, b_ref_p, 1);
798 // Proj_Store(0, Over_n, b_ref_p, 1); //just for test
799 // Proj_Store(0, Over_n, b_ref_p, 0); //just for test
800  Find_Proj(Over_n, b_ref_p, b_neg, OvV, NumV);
801 
802 // std::cout << "NumV " << NumV << std::endl;
803 
804  if (NumV>=m_iUVCut)
805  {
806  //Now make the second projection step
807  //-----------------------------------
808  //U side
809 // Proj_Store(0, Over_p, b_neg, 0);
810  // Proj_Store(1, Over_p, b_neg, 0); //just for test
811  Proj_Store(Fiber_MB_tmp, Over_p, b_neg, 0);
812 // Proj_Store(Fiber_MB_tmp, Over_p, b_neg, 1); //just for test
813  Find_Proj(Over_p, b_neg, b_pos, OvU, NumU);
814 
815  //V side
816  Proj_Store(1, Over_n, b_pos, 1);
817 // Proj_Store(0, Over_n, b_pos, 1); //just for test
818 // Proj_Store(0, Over_n, b_pos, 0); //just for test
819  Find_Proj(Over_n, b_pos, b_neg, OvV, NumV);
820 
821  //Third projection steps
822  //----------------------
823  //U side
824 // Proj_Store(0, Over_p, b_neg, 0);
825  // Proj_Store(1, Over_p, b_neg, 0); //just for test
826  Proj_Store(Fiber_MB_tmp, Over_p, b_neg, 0);
827 // Proj_Store(Fiber_MB_tmp, Over_p, b_neg, 1); //just for test
828  Find_Proj(Over_p, b_neg, b_pos, OvU, NumU);
829 
830  //V side
831  Proj_Store(1, Over_n, b_pos, 1);
832 // Proj_Store(0, Over_n, b_pos, 1); //just for test
833 // Proj_Store(0, Over_n, b_pos, 0); //just for test
834  Find_Proj(Over_n, b_pos, b_neg, OvV, NumV);
835 
836  // //We store the information in the vector
837  b_p.push_back(b_pos);
838  Ov_p.push_back(OvU);
839  Num_p.push_back(NumU);
840 
841  b_n.push_back(b_neg);
842  Ov_n.push_back(OvV);
843  Num_n.push_back(NumV);
844 
845  iTrackMatch[0].push_back(cnt_step_U);
846  iTrackMatch[1].push_back(cnt_step_V);
847 
848  //Once done we want to remove the hit belonging to the first track on side V
849  //We first find the corresponding fibers
850 // Finding_Fib(0,b_neg, b_pos, FSel_pos, 0);
851  Finding_Fib(1,b_pos, b_neg, FSel_neg, 1);
852 // Finding_Fib(1,b_neg, b_pos, FSel_pos, 0); //just for test
853 // Finding_Fib(0,b_pos, b_neg, FSel_neg, 1); //just for test
854 // Finding_Fib(1,b_neg, b_pos, FSel_pos, 1); //just for test
855 // Finding_Fib(0,b_pos, b_neg, FSel_neg, 0); //just for test
856 
857  for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
858  {
859  FSel_n[iLayer].push_back(FSel_neg[iLayer]);
860 // FSel_p[iLayer].push_back(FSel_pos[iLayer]);
861  FSel_p[iLayer].push_back(FSel_pos_tmp[iLayer]);
862  }
863 
864  //added -----------------------------------------------------
865 // std::cout << "FSel_n ";
866 // for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
867 // {
868 // std::cout << " " << FSel_neg[iLayer];
869 // }
870 // std::cout << std::endl;
871 // std::cout << "FSel_p ";
872 // for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
873 // {
874 // std::cout << " " << FSel_pos[iLayer];
875 // }
876 // std::cout << std::endl;
877 
878  //Removing fibers used for the first track for V Side
879  for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; ++iLayer)
880  {
881  // coverity bug 30038 fixed bellow
882 // std::list<int>::iterator itBeg = m_MapLayers[2*iLayer+1].ListFibers.begin();
883 // std::list<int>::iterator itEnd = m_MapLayers[2*iLayer+1].ListFibers.end();
884 // for (; itBeg != itEnd; itBeg++)
885 // {
886 // if (*itBeg == (int)FSel_neg[iLayer])
887 // {
888 // m_MapLayers[2*iLayer+1].ListFibers.erase(itBeg);
889 // break;
890 // }
891 // }
892 
893  const unsigned int thisLayer=2*iLayer+1;
894  const std::list<int> & thisFiberContainer = m_MapLayers[thisLayer].ListFibers;
895  for (const auto & thisFiber:thisFiberContainer)
896  {
897  if (thisFiber == (int)FSel_neg[iLayer])
898  {
899  auto it = std::find(begin(thisFiberContainer), end(thisFiberContainer), thisFiber);
900  m_MapLayers[2*iLayer+1].ListFibers.erase(it);
901  break;
902  }
903  }
904 
905 
906 // for (intIter=m_MapLayers[2*iLayer+1].ListFibers.begin(); intIter!=m_MapLayers[2*iLayer+1].ListFibers.end(); intIter++)
908 // {
910 // if (*intIter==(int)FSel_neg[iLayer])
911 // {
913 // m_MapLayers[2*iLayer+1].ListFibers.erase(intIter);
915 // break;
916 // }
917 // }
918  }
919  cnt_step_V++;
920  }
921  }
922  else NumV = 0;
923  }
924  while (NumV>=m_iUVCut);
925 
926 // When we cannot find tracks anymore for the V side, and that all combinations with the U side has been done, we start again with the U side
927 // But first we remove the fibers belonging to this track
928 
929 // std::cout << "cnt_step_V " << cnt_step_V << std::endl;
930 
931 // Int_t iNumErasedFibs=0;
932  if (cnt_step_V>0)
933  {
934  for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
935  {
936  std::list<int>::iterator itBeg = m_MapLayers[2*iLayer].ListFibers.begin();
937  std::list<int>::iterator itEnd = m_MapLayers[2*iLayer].ListFibers.end();
938  for (; itBeg != itEnd; ++itBeg)
939  {
940  if (*itBeg == (int)FSel_pos_tmp[iLayer])
941  {
942  m_MapLayers[2*iLayer].ListFibers.erase(itBeg);
943  break;
944  }
945  }
946 
947 
948 // for (intIter=m_MapLayers[2*iLayer].ListFibers.begin(); intIter!=m_MapLayers[2*iLayer].ListFibers.end(); intIter++)
950 // {
952 // if (*intIter==(int)FSel_pos_tmp[iLayer])
953 // {
955 // m_MapLayers[2*iLayer].ListFibers.erase(intIter);
958 // break;
959 // }
960 
961 // }
962  }
963  }
964  else
965  {
966  if (NumV>0)
967  {
968 // Finding_Fib(0, b_ref_n, b_pos, FSel_pos, 0);
969 // Finding_Fib(1, b_ref_n, b_pos, FSel_pos, 0); //just for test
970 
971  for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
972  {
973  std::list<int>::iterator itBeg = m_MapLayers[2*iLayer].ListFibers.begin();
974  std::list<int>::iterator itEnd = m_MapLayers[2*iLayer].ListFibers.end();
975  for (; itBeg != itEnd; ++itBeg)
976  {
977  if (*itBeg == (int)FSel_pos_tmp[iLayer])
978  {
979  m_MapLayers[2*iLayer].ListFibers.erase(itBeg);
980  break;
981  }
982  }
983 
984 
985 // for (intIter=m_MapLayers[2*iLayer].ListFibers.begin(); intIter!=m_MapLayers[2*iLayer].ListFibers.end(); intIter++)
987 // {
989 // if (*intIter==(int)FSel_pos_tmp[iLayer])
990 // {
991 // // *intIter = 9999;
992 // m_MapLayers[2*iLayer].ListFibers.erase(intIter);
995 // break;
996 // }
997 // }
998  }
999  }
1000  else break;
1001  }
1002  cnt_step_U++;
1003 // if (iNumErasedFibs==0) NumU=0;
1004  }
1005  }
1006  while (NumU>=m_iUVCut);
1007 }
1008 
1009 void ALFA_MDMultiple::GetData(Int_t (&iNumU)[MAXTRACKNUM], Int_t (&iNumV)[MAXTRACKNUM], Float_t (&fOvU)[MAXTRACKNUM], Float_t (&fOvV)[MAXTRACKNUM], Int_t (&iFibSel)[MAXTRACKNUM][ALFALAYERSCNT*ALFAPLATESCNT])
1010 {
1011  ATH_MSG_DEBUG("ALFA_MDMultiple::GetData()");
1012 
1013  Int_t iTrackNum;
1014  Int_t iSize;
1015  std::fill_n(&fOvU[0], sizeof(fOvU)/sizeof(Float_t), -9999.0);
1016  std::fill_n(&fOvV[0], sizeof(fOvV)/sizeof(Float_t), -9999.0);
1017  std::fill_n(&iNumU[0], sizeof(iNumU)/sizeof(Int_t), -9999);
1018  std::fill_n(&iNumV[0], sizeof(iNumV)/sizeof(Int_t), -9999);
1019  std::fill_n(&iFibSel[0][0], sizeof(iFibSel)/sizeof(Int_t), -9999);
1020 
1021  iTrackNum=0;
1022  iSize=0;
1023  for (auto & iLayer : m_iFibSel)
1024  {
1025  iSize = ((Int_t)iLayer->size() > iSize)? iLayer->size() : iSize;
1026  }
1027  iTrackNum = (iSize < MAXTRACKNUM)? iSize : MAXTRACKNUM;
1028  for (Int_t iTrack=0; iTrack<iTrackNum; iTrack++)
1029  {
1030  for (Int_t iLayer=0; iLayer<ALFALAYERSCNT*ALFAPLATESCNT; iLayer++)
1031  {
1032  iFibSel[iTrack][iLayer] = m_iFibSel[iLayer]->at(iTrack);
1033  }
1034  }
1035 
1036  iTrackNum=0;
1037  iSize=0;
1038  iSize = (m_fOvU->size() <= m_fOvV->size())? m_fOvU->size() : m_fOvV->size();
1039  iTrackNum = (iSize < MAXTRACKNUM)? iSize : MAXTRACKNUM;
1040  for (Int_t iTrack=0; iTrack<iTrackNum; iTrack++)
1041  {
1042  fOvU[iTrack] = m_fOvU->at(iTrack);
1043  fOvV[iTrack] = m_fOvV->at(iTrack);
1044  }
1045 
1046  iTrackNum=0;
1047  iSize=0;
1048  iSize = (m_iNU->size() <= m_iNV->size())? m_iNU->size() : m_iNV->size();
1049  iTrackNum = (iSize < MAXTRACKNUM)? iSize : MAXTRACKNUM;
1050  for (Int_t iTrack=0; iTrack<iTrackNum; iTrack++)
1051  {
1052  iNumU[iTrack] = m_iNU->at(iTrack);
1053  iNumV[iTrack] = m_iNV->at(iTrack);
1054  }
1055 }
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
ALFA_MDMultiple::GetData
void GetData(Int_t(&iNumU)[MAXTRACKNUM], Int_t(&iNumV)[MAXTRACKNUM], Float_t(&fOvU)[MAXTRACKNUM], Float_t(&fOvV)[MAXTRACKNUM], Int_t(&iFibSel)[MAXTRACKNUM][ALFALAYERSCNT *ALFAPLATESCNT])
Definition: ALFA_MDMultiple.cxx:1009
MAXTRACKNUM
#define MAXTRACKNUM
Definition: ALFA_MDGap.h:25
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
ALFA_MDMultiple::m_iMultiplicityCut
Int_t m_iMultiplicityCut
Definition: ALFA_MDMultiple.h:38
ALFA_MDMultiple::m_fOvV
std::vector< Float_t > * m_fOvV
Definition: ALFA_MDMultiple.h:60
ALFA_MDMultiple::m_iNumLayerCut
Int_t m_iNumLayerCut
Definition: ALFA_MDMultiple.h:39
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
ALFA_MDMultiple::m_iNV
std::vector< Int_t > * m_iNV
Definition: ALFA_MDMultiple.h:61
ALFA_MDMultiple::m_iFibSel
std::vector< Int_t > * m_iFibSel[ALFALAYERSCNT *ALFAPLATESCNT]
Definition: ALFA_MDMultiple.h:62
ALFA_MDMultiple::m_fbMD
Float_t m_fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Definition: ALFA_MDMultiple.h:44
ALFAFIBERSCNT
#define ALFAFIBERSCNT
Definition: ALFA_constants.h:10
_FIBERS
Definition: ALFA_LocRec/ALFA_UserObjects.h:30
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
skel.it
it
Definition: skel.GENtoEVGEN.py:396
RPOTSCNT
#define RPOTSCNT
Definition: ALFA_CLinkAlg.h:26
ALFA_MDMultiple::Proj_Store
void Proj_Store(Int_t iFiberSide, Int_t(&iOver)[72000], Float_t fbRef, Int_t iSideFlag)
Definition: ALFA_MDMultiple.cxx:367
ALFA_MDMultiple::m_fRecYPos
std::vector< Float_t > * m_fRecYPos
Definition: ALFA_MDMultiple.h:59
ALFA_MDMultiple::m_iUVCut
Int_t m_iUVCut
Definition: ALFA_MDMultiple.h:37
x
#define x
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
ALFA_MDMultiple::operator=
ALFA_MDMultiple & operator=(const ALFA_MDMultiple &obj)
Definition: ALFA_MDMultiple.cxx:90
ALFA_MDMultiple::ALFA_MDMultiple
ALFA_MDMultiple()
Definition: ALFA_MDMultiple.cxx:8
ALFA_MDMultiple::Reco_Track
void Reco_Track(std::vector< double > &b_p, std::vector< double > &b_n, std::vector< double > &Ov_p, std::vector< double > &Ov_n, std::vector< int > &Num_p, std::vector< int > &Num_n, std::vector< int >(&FSel_n)[ALFAPLATESCNT], std::vector< int >(&FSel_p)[ALFAPLATESCNT], std::vector< int >(&Track_match)[2])
Definition: ALFA_MDMultiple.cxx:658
ALFA_MDMultiple::Initialize
StatusCode Initialize(Int_t iRPot, Float_t faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT], Float_t fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT], Int_t iMultiplicityCut, Int_t iNumLayerCut, Int_t iUVCut, Float_t fOverlapCut)
Definition: ALFA_MDMultiple.cxx:157
ALFA_MDMultiple::Finalize
StatusCode Finalize(Float_t(&fRecXPos)[MAXTRACKNUM], Float_t(&fRecYPos)[MAXTRACKNUM])
Definition: ALFA_MDMultiple.cxx:344
ALFA_MDMultiple
Definition: ALFA_MDMultiple.h:28
lumiFormat.i
int i
Definition: lumiFormat.py:85
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ALFA_MDMultiple::m_iTrackMatch
std::vector< Int_t > * m_iTrackMatch[2]
Definition: ALFA_MDMultiple.h:63
AthMessaging
Class to provide easy MsgStream access and capabilities.
Definition: AthMessaging.h:55
_FIBERS::ListFibers
std::list< int > ListFibers
Definition: ALFA_LocRec/ALFA_UserObjects.h:31
ALFA_MDMultiple::Finding_Fib
void Finding_Fib(Int_t iFiberSide, Float_t fbRef, Float_t fbRec, Int_t(&iFSel)[ALFAPLATESCNT], Int_t iSideFlag)
Definition: ALFA_MDMultiple.cxx:540
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
ALFALAYERSCNT
#define ALFALAYERSCNT
Definition: ALFA_constants.h:8
ALFA_MDMultiple::m_iNumHitsLayer
Int_t m_iNumHitsLayer[ALFALAYERSCNT *ALFAPLATESCNT]
Definition: ALFA_MDMultiple.h:47
ALFA_MDMultiple::Execute
StatusCode Execute(const std::list< MDHIT > &ListMDHits)
Definition: ALFA_MDMultiple.cxx:184
ALFA_MDMultiple::Find_Proj
void Find_Proj(const Int_t iOver[72000], Float_t fbRef, Float_t &fb, Float_t &fOv, Int_t &fNum)
Definition: ALFA_MDMultiple.cxx:474
ALFA_MDMultiple::m_MapLayers
std::map< int, FIBERS > m_MapLayers
Definition: ALFA_MDMultiple.h:66
ALFA_MDMultiple.h
y
#define y
ALFA_MDMultiple::m_fOvU
std::vector< Float_t > * m_fOvU
Definition: ALFA_MDMultiple.h:60
ALFA_MDMultiple::m_fOverlapCut
Float_t m_fOverlapCut
Definition: ALFA_MDMultiple.h:40
ALFA_MDMultiple::m_iNU
std::vector< Int_t > * m_iNU
Definition: ALFA_MDMultiple.h:61
calibdata.copy
bool copy
Definition: calibdata.py:27
ALFA_MDMultiple::~ALFA_MDMultiple
~ALFA_MDMultiple()
Definition: ALFA_MDMultiple.cxx:140
python.PyAthena.obj
obj
Definition: PyAthena.py:132
ALFA_MDMultiple::m_faMD
Float_t m_faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
Definition: ALFA_MDMultiple.h:43
ALFA_MDMultiple::m_iRPot
Int_t m_iRPot
Definition: ALFA_MDMultiple.h:36
ALFAPLATESCNT
#define ALFAPLATESCNT
Definition: ALFA_constants.h:9
ALFA_MDMultiple::m_fRecXPos
std::vector< Float_t > * m_fRecXPos
Definition: ALFA_MDMultiple.h:59