ATLAS Offline Software
Loading...
Searching...
No Matches
ALFA_MDMultiple.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6#include <algorithm> // std::copy
7
9 AthMessaging("ALFA_MDMultiple")
10{
11 std::ranges::fill (m_iNumHitsLayer, 0.0);
12
13 m_fOverlapCut = 0.0;
16 m_iRPot = 0;
17 m_iUVCut = 0;
18}
19
20StatusCode 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)
21{
22 ATH_MSG_DEBUG("ALFA_MDMultiple::Initialize()");
23
24 m_iRPot = iRPot;
25 m_iUVCut = iUVCut;
26 m_iNumLayerCut = iNumLayerCut;
27 m_iMultiplicityCut = iMultiplicityCut;
28 m_fOverlapCut = fOverlapCut;
29
30 for (Int_t iPot=0; iPot<RPOTSCNT; iPot++)
31 {
32 for (Int_t iLayer=0; iLayer<ALFALAYERSCNT*ALFAPLATESCNT; iLayer++)
33 {
34 for (Int_t iFiber=0; iFiber<ALFAFIBERSCNT; iFiber++)
35 {
36 m_faMD[iPot][iLayer][iFiber] = faMD[iPot][iLayer][iFiber];
37 m_fbMD[iPot][iLayer][iFiber] = fbMD[iPot][iLayer][iFiber];
38 }
39 }
40 }
41
42// std::cout << "m_iMultiplicityCut, m_iUVCut = " << m_iMultiplicityCut << ", " << m_iUVCut << std::endl;
43
44 return StatusCode::SUCCESS;
45}
46
47StatusCode ALFA_MDMultiple::Execute(const std::list<MDHIT> &ListMDHits)
48{
49 ATH_MSG_DEBUG("ALFA_MDMultiple::Execute()");
50
51 LayerMap_t mapLayers;
52
53 std::list<MDHIT>::const_iterator iter;
54 for (iter=ListMDHits.begin(); iter!=ListMDHits.end(); ++iter)
55 {
56 if (m_iRPot == (*iter).iRPot)
57 {
58 mapLayers[(*iter).iPlate].ListFibers.push_back((*iter).iFiber);
59 }
60 }
61
62 // RECONSTRUCTION
63 std::vector<double> b_p, b_n;
64 std::vector<double> Ov_p, Ov_n;
65 std::vector<int> Num_p, Num_n;
66 std::vector<int> FSel_n[ALFAPLATESCNT], FSel_p[ALFAPLATESCNT];
67 std::vector<int> iTrackMatch[2];
68
69
70 //Checking that the multiplicity cut conditions are satisfied
71 //At least more than UV_cut layers have a multiplicity lower than multi_cut
72
73 {
74 Reco_Track(mapLayers, b_p, b_n, Ov_p, Ov_n, Num_p, Num_n, FSel_n, FSel_p, iTrackMatch);
75
76 //Now sorting the tracks using NumU+NumV criteria -------------------------------
77 Int_t iCntSort=0;
78 Int_t iMaxSum=0;
79 std::vector<Int_t> MaxTrackID;
80 Int_t iTmpMaxTrackID = -1;
81
82// std::cout << "b_p.size = " << b_p.size() << std::endl;
83 while (iCntSort<(Int_t)b_p.size())
84 {
85 iMaxSum=0;
86 for (Int_t i=0; i<(Int_t)b_p.size(); i++)
87 {
88 //Checking that the maximum was not already used
89 Bool_t MaxUsed=false;
90
91 for (int j : MaxTrackID)
92 {
93 if (i==j) {MaxUsed = true; break;}
94 }
95
96 if (((Num_p[i]+Num_n[i])>iMaxSum) && (!MaxUsed))
97 {
98 iMaxSum = Num_p[i]+Num_n[i];
99 iTmpMaxTrackID=i;
100 }
101 }
102 MaxTrackID.push_back(iTmpMaxTrackID);
103 iCntSort++;
104 }
105
106
107 for (int i : MaxTrackID)
108 {
109 m_fRecXPos.push_back((b_p[i]-b_n[i])/2.0);
110 m_fRecYPos.push_back((b_p[i]+b_n[i])/2.0);
111
112 m_fOvU.push_back(Ov_p[i]);
113 m_fOvV.push_back(Ov_n[i]);
114 m_iNU.push_back(Num_p[i]);
115 m_iNV.push_back(Num_n[i]);
116
117 m_iTrackMatch[0].push_back(iTrackMatch[0][i]);
118 m_iTrackMatch[1].push_back(iTrackMatch[1][i]);
119
120 for (Int_t iPlate=0; iPlate<ALFAPLATESCNT; iPlate++)
121 {
122 m_iFibSel[2*iPlate].push_back(FSel_p[iPlate][i]);
123 m_iFibSel[2*iPlate+1].push_back(FSel_n[iPlate][i]);
124 }
125 }
126 }
127
128
129 return StatusCode::SUCCESS;
130}
131
132StatusCode ALFA_MDMultiple::Finalize(Float_t (&fRecXPos)[MAXTRACKNUM], Float_t (&fRecYPos)[MAXTRACKNUM])
133{
134 ATH_MSG_DEBUG("ALFA_MDMultiple::Finalize()");
135
136 Int_t iTrackNum = std::min ({m_fRecXPos.size(), m_fRecYPos.size(), MAXTRACKNUM});
137 std::copy_n (m_fRecXPos.begin(), iTrackNum, fRecXPos);
138 std::copy_n (m_fRecYPos.begin(), iTrackNum, fRecYPos);
139 std::fill_n (fRecXPos+iTrackNum, MAXTRACKNUM-iTrackNum, -9999.0);
140 std::fill_n (fRecYPos+iTrackNum, MAXTRACKNUM-iTrackNum, -9999.0);
141
142 return StatusCode::SUCCESS;
143}
144
145/************************************************/
146/* Making projection and storing in an array */
147/************************************************/
149 Int_t iFiberSide, std::span<Int_t> iOver, Float_t fbRef, Int_t iSideFlag)
150{
151 ATH_MSG_DEBUG("ALFA_MDMultiple::Pro_Store()");
152
153 Float_t fSign;
154 Float_t fXInter, fYInter;
155 Float_t FibCen;
156
157 if (m_faMD[m_iRPot][iSideFlag][0]>0) fSign=1.0;
158 else fSign=-1.0;
159
160 for (int & iBin : iOver)
161 {
162 iBin=0;
163 }
164
165 for (UInt_t iLayer=0; iLayer!=ALFAPLATESCNT; ++iLayer)
166 {
167 const unsigned int thisSideLayer = iLayer*2+iSideFlag;
168 const unsigned int thisLayer = 2*iLayer+iFiberSide;
169 const std::list<int> & thisFiberContainer = mapLayers[thisLayer].ListFibers;
170 for (const auto & thisFiber:thisFiberContainer)
171 {
172 if (thisFiber!=9999)
173 {
174 //Depending on layer orientation, computing the projection of the hit fiber
175 fXInter= fSign*(fbRef-m_fbMD[m_iRPot][thisSideLayer][thisFiber])/(1+fSign*m_faMD[m_iRPot][thisSideLayer][thisFiber]);
176 fYInter= (fSign*m_faMD[m_iRPot][thisSideLayer][thisFiber]*fbRef+m_fbMD[m_iRPot][thisSideLayer][thisFiber])/(1+fSign*m_faMD[m_iRPot][thisSideLayer][thisFiber])-fbRef;
177 FibCen = (fYInter-fSign*fXInter)/sqrt(2.0);
178
179 //Filling the table with the hit fiber
180 for (Int_t iBin=0; iBin<480; iBin++)
181 {
182 iOver[(int)((FibCen-0.24)*1000)+iBin+36000]++;
183 }
184 }
185 }
186 }
187}
188
189/************************************************/
190/* Making projection and storing in an array */
191/************************************************/
192void ALFA_MDMultiple::Proj_Store(const std::vector<Int_t> (&FiberHit)[ALFAPLATESCNT], std::span<Int_t> iOver, Float_t fbRef, Int_t iSideFlag)
193{
194 ATH_MSG_DEBUG("ALFA_MDMultiple::Pro_Store()");
195
196 Float_t fSign;
197 Float_t fXInter, fYInter;
198 Float_t FibCen;
199
200 if (m_faMD[m_iRPot][iSideFlag][0]>0) fSign=1.0;
201 else fSign=-1.0;
202
203 for (int & iBin : iOver)
204 {
205 iBin=0;
206 }
207
208 int iHit = 9999;
209 for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
210 {
211 for (UInt_t j=0; j<FiberHit[iLayer].size(); j++)
212 {
213 iHit = FiberHit[iLayer][j];
214 if (iHit!=9999)
215 {
216 //Depending on layer orientation, computing the projection of the hit fiber
217 fXInter= fSign*(fbRef-m_fbMD[m_iRPot][iLayer*2+iSideFlag][iHit])/(1+fSign*m_faMD[m_iRPot][iLayer*2+iSideFlag][iHit]);
218 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;
219 FibCen = (fYInter-fSign*fXInter)/sqrt(2.0);
220
221 //Filling the table with the hit fiber
222 for (Int_t iBin=0; iBin<480; iBin++)
223 {
224 iOver[(int)((FibCen-0.24)*1000)+iBin+36000]++;
225 }
226 }
227 }
228 }
229}
230
231/************************************************/
232/* Identifying plateau in projection array */
233/************************************************/
234void ALFA_MDMultiple::Find_Proj(const std::span<const Int_t>& iOver, Float_t fbRef, Float_t &fb, Float_t &fOv, Int_t &iNum)
235{
236 ATH_MSG_DEBUG("ALFA_MDMultiple::Find_Proj()");
237
238 std::vector<int> iSizePlateau;
239 Int_t iNumFib=0;
240 Int_t p_tmp_min;
241// Int_t p_tmp_max;
242 Float_t p_min;
243 Float_t p_max;
244
245 //Determine the maximum number of overlapping fibers in both directions
246 for (Int_t i=0;i<72000;i++)
247 {
248 if (iOver[i]>iNumFib) iNumFib=iOver[i];
249 }
250
251 // Filling array for all values equal to the maximum
252 if (iNumFib>=m_iUVCut)
253 {
254 for (Int_t i=0;i<72000;i++)
255 {
256 if (iOver[i]==iNumFib)
257 {
258 iSizePlateau.push_back(i);
259 }
260 }
261
262// Finding first and last position where the maximum is found
263 p_min = -36.0 + double(iSizePlateau.front())*1e-3;
264 p_tmp_min = iSizePlateau.front();
265
266 p_max = -36.0 + double(iSizePlateau.back())*1e-3;
267// p_tmp_max = iSizePlateau.back();
268
269// Making sure that the plateau belongs to the same track
270 Int_t full_width = iSizePlateau.size();
271
272 for (Int_t i=0; i<full_width; i++)
273 {
274 if (iSizePlateau[full_width-i-1]-p_tmp_min < 500)
275 {
276// p_tmp_max = iSizePlateau[full_width-i-1];
277 p_max = -36.0 + double(iSizePlateau[full_width-i-1])*1e-3;
278
279 break;
280 }
281 }
282
283 if ((p_max-p_min)<m_fOverlapCut)
284 {
285// Storing the coordinate of the maximum
286 fb = fbRef+(p_min+p_max)/sqrt(2.0);
287 fOv = p_max-p_min;
288 }
289 }
290
291 iNum = iNumFib;
292}
293
294/************************************************/
295/************************************************/
296/* Identifying fibers on the track */
297/************************************************/
298/************************************************/
299
301 Int_t iFiberSide, Float_t fbRef, Float_t fbRec, Int_t (&iFSel)[10], Int_t iSideFlag)
302{
303 ATH_MSG_DEBUG("ALFA_MDMultiple::Finding_Fib()");
304
305 Float_t b_pos, b_neg;
306 Float_t x, y, x_tmp, y_tmp;
307 Float_t min_dist;
308 Float_t dist_x, dist_y;
309 Float_t dist_full;
310 Float_t fib_dist;
311
312 if (iSideFlag==0)
313 {
314 b_neg= fbRef;
315 b_pos= fbRec;
316 }
317 else
318 {
319 b_neg= fbRec;
320 b_pos= fbRef;
321 }
322
323 x= (b_pos-b_neg)/2.0;
324 y= (b_neg+b_pos)/2.0;
325
326 for (int & iLayer : iFSel) iLayer = 9999;
327
328 //For each layer, we determine the hit fiber which is closest to the track
329 std::list<int>::iterator intIter;
330 for (Int_t iLayer = 0; iLayer<ALFAPLATESCNT; iLayer++)
331 {
332 min_dist=0.24;
333
334 const unsigned int thisSideLayer = iLayer*2+iSideFlag;
335 const unsigned int thisLayer = 2*iLayer+iFiberSide;
336 const std::list<int> & thisFiberContainer = mapLayers[thisLayer].ListFibers;
337 for (const auto & thisFiber:thisFiberContainer)
338 {
339 if (thisFiber != 9999)
340 {
341 x_tmp = (y-m_fbMD[m_iRPot][thisSideLayer][thisFiber])/m_faMD[m_iRPot][thisSideLayer][thisFiber];
342 y_tmp = m_faMD[m_iRPot][thisSideLayer][thisFiber]*x+m_fbMD[m_iRPot][thisSideLayer][thisFiber];
343
344 dist_x = TMath::Abs(x-x_tmp);
345 dist_y = TMath::Abs(y-y_tmp);
346
347 dist_full = sqrt(dist_x*dist_x+dist_y*dist_y);
348 fib_dist = sqrt(TMath::Power((dist_x+dist_y)/2.0,2)-TMath::Power(dist_full/2.0,2));
349
350 if (fib_dist <= min_dist)
351 {
352 min_dist = fib_dist;
353 iFSel[iLayer] = thisFiber;
354 }
355 }
356 }
357
358 }
359}
360
361/************************************************/
362/* Finding all tracks */
363/************************************************/
364
366 std::vector<double> &b_p, std::vector<double> &b_n,
367 std::vector<double> &Ov_p, std::vector<double> &Ov_n,
368 std::vector<int> &Num_p, std::vector<int> &Num_n,
369 std::vector<int> (&FSel_n)[ALFAPLATESCNT], std::vector<int> (&FSel_p)[ALFAPLATESCNT],
370 std::vector<int> (&iTrackMatch)[2])
371{
372 ATH_MSG_DEBUG("ALFA_MDMultiple::Reco_Track()");
373
374 Int_t FSel_neg[ALFAPLATESCNT];
375 Int_t FSel_pos_tmp[ALFAPLATESCNT];
376 std::vector<Int_t> Over_p(72000);
377 std::vector<Int_t> Over_n(72000);
378 Int_t cnt_step_U=0;
379 Int_t cnt_step_V=0;
380 Int_t NumU=0;
381 Int_t NumV=0;
382 Float_t b_ref_p;
383 Float_t b_ref_n;
384 Float_t OvU;
385 Float_t OvV;
386 Float_t b_pos;
387 Float_t b_neg;
388
389 std::list<int>::iterator intIter;
390
391
392 //clear
393 for (Int_t i=0; i<ALFAPLATESCNT; i++)
394 {
395 FSel_n[i].clear();
396 FSel_p[i].clear();
397 }
398 b_n.clear();
399 b_p.clear();
400 Ov_n.clear();
401 Ov_p.clear();
402 Num_n.clear();
403 Num_p.clear();
404
405 int iNumUFiberHits = 0;
406 int iNumVFiberHits = 0;
407
408 std::vector<Int_t> Fiber_MB_tmp[ALFAPLATESCNT];
409 std::vector<Int_t> Fiber_MB_n[ALFAPLATESCNT];
410
411 for (UInt_t iLayer=0; iLayer!=ALFAPLATESCNT; ++iLayer)
412 {
413 Fiber_MB_n[iLayer].clear();
414 const unsigned int thisLayer=2*iLayer+1;
415 const std::list<int> & thisFiberContainer = mapLayers[thisLayer].ListFibers;
416 for (const auto & thisFiber:thisFiberContainer)
417 {
418// std::cout << "thisFiber: " << thisFiber << std::endl;
419 Fiber_MB_n[iLayer].push_back(thisFiber);
420 }
421 }
422 do
423 {
424 b_ref_n=-127.0;
425 b_ref_p=-127.0;
426
427// First projection step on U side
428// -------------------------------
429// filling the array for U side with reference value
430 Proj_Store(mapLayers, 0, Over_p, b_ref_n, 0);
431
432// Find first maxium
433 Find_Proj(Over_p, b_ref_n, b_pos, OvU, NumU);
434
435 Finding_Fib(mapLayers, 0, b_ref_n, b_pos, FSel_pos_tmp, 0);
436 for (int i=0; i<ALFAPLATESCNT; i++)
437 {
438 Fiber_MB_tmp[i].clear();
439 Fiber_MB_tmp[i].push_back(FSel_pos_tmp[i]);
440 }
441
442 //Then reconstruction all tracks possible using the second side
443 for (UInt_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
444 {
445 FIBERS& fibers = mapLayers[2*iLayer+1];
446 fibers.ListFibers.clear();
447 for (unsigned int i=0; i<Fiber_MB_n[iLayer].size(); i++)
448 {
449 fibers.ListFibers.push_back(Fiber_MB_n[iLayer][i]);
450 }
451 }
452
453// Then reconstruct all tracks possible using the second side
454 if (NumU>=m_iUVCut)
455 {
456 cnt_step_V=0;
457 do
458 {
459 // New Part to apply the multiplicity cut at each iteration
460 iNumUFiberHits=0;
461 iNumVFiberHits=0;
462 for (UInt_t iLayer=0;iLayer<ALFAPLATESCNT;iLayer++)
463 {
464 Int_t sz0 = mapLayers[2*iLayer].ListFibers.size();
465 if (sz0 > 0 && sz0<=m_iMultiplicityCut) iNumUFiberHits++;
466 Int_t sz1 = mapLayers[2*iLayer].ListFibers.size();
467 if (sz1 > 0 && sz1<=m_iMultiplicityCut) iNumVFiberHits++;
468 }
469
470 if (iNumUFiberHits>=m_iNumLayerCut && iNumVFiberHits>=m_iNumLayerCut)
471 {
472 //First projection on V side
473 //-------------------------------
474 //filling the array for V side with reference value
475 Proj_Store(mapLayers, 1, Over_n, b_ref_p, 1);
476 Find_Proj(Over_n, b_ref_p, b_neg, OvV, NumV);
477
478 if (NumV>=m_iUVCut)
479 {
480 //Now make the second projection step
481 //-----------------------------------
482 //U side
483 Proj_Store(Fiber_MB_tmp, Over_p, b_neg, 0);
484 Find_Proj(Over_p, b_neg, b_pos, OvU, NumU);
485
486 //V side
487 Proj_Store(mapLayers, 1, Over_n, b_pos, 1);
488 Find_Proj(Over_n, b_pos, b_neg, OvV, NumV);
489
490 //Third projection steps
491 //----------------------
492 //U side
493 Proj_Store(Fiber_MB_tmp, Over_p, b_neg, 0);
494 Find_Proj(Over_p, b_neg, b_pos, OvU, NumU);
495
496 //V side
497 Proj_Store(mapLayers, 1, Over_n, b_pos, 1);
498 Find_Proj(Over_n, b_pos, b_neg, OvV, NumV);
499
500 // //We store the information in the vector
501 b_p.push_back(b_pos);
502 Ov_p.push_back(OvU);
503 Num_p.push_back(NumU);
504
505 b_n.push_back(b_neg);
506 Ov_n.push_back(OvV);
507 Num_n.push_back(NumV);
508
509 iTrackMatch[0].push_back(cnt_step_U);
510 iTrackMatch[1].push_back(cnt_step_V);
511
512 //Once done we want to remove the hit belonging to the first track on side V
513 //We first find the corresponding fibers
514 Finding_Fib(mapLayers, 1,b_pos, b_neg, FSel_neg, 1);
515
516 for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
517 {
518 FSel_n[iLayer].push_back(FSel_neg[iLayer]);
519// FSel_p[iLayer].push_back(FSel_pos[iLayer]);
520 FSel_p[iLayer].push_back(FSel_pos_tmp[iLayer]);
521 }
522
523 //Removing fibers used for the first track for V Side
524 for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; ++iLayer)
525 {
526 const unsigned int thisLayer=2*iLayer+1;
527 const std::list<int> & thisFiberContainer = mapLayers[thisLayer].ListFibers;
528 for (const auto & thisFiber:thisFiberContainer)
529 {
530 if (thisFiber == (int)FSel_neg[iLayer])
531 {
532 auto it = std::find(begin(thisFiberContainer), end(thisFiberContainer), thisFiber);
533 mapLayers[2*iLayer+1].ListFibers.erase(it);
534 break;
535 }
536 }
537
538
539 }
540 cnt_step_V++;
541 }
542 }
543 else NumV = 0;
544 }
545 while (NumV>=m_iUVCut);
546
547// 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
548// But first we remove the fibers belonging to this track
549
550 if (cnt_step_V>0)
551 {
552 for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
553 {
554 FIBERS& fiber = mapLayers[2*iLayer];
555 std::list<int>::iterator itBeg = fiber.ListFibers.begin();
556 std::list<int>::iterator itEnd = fiber.ListFibers.end();
557 for (; itBeg != itEnd; ++itBeg)
558 {
559 if (*itBeg == (int)FSel_pos_tmp[iLayer])
560 {
561 fiber.ListFibers.erase(itBeg);
562 break;
563 }
564 }
565
566
567
568 }
569 }
570 else
571 {
572 if (NumV>0)
573 {
574 for (Int_t iLayer=0; iLayer<ALFAPLATESCNT; iLayer++)
575 {
576 FIBERS& fiber = mapLayers[2*iLayer];
577 std::list<int>::iterator itBeg = fiber.ListFibers.begin();
578 std::list<int>::iterator itEnd = fiber.ListFibers.end();
579 for (; itBeg != itEnd; ++itBeg)
580 {
581 if (*itBeg == (int)FSel_pos_tmp[iLayer])
582 {
583 fiber.ListFibers.erase(itBeg);
584 break;
585 }
586 }
587
588
589 }
590 }
591 else break;
592 }
593 cnt_step_U++;
594 }
595 }
596 while (NumU>=m_iUVCut);
597}
598
599void 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])
600{
601 ATH_MSG_DEBUG("ALFA_MDMultiple::GetData()");
602
603 for (Int_t iLayer=0; iLayer<ALFALAYERSCNT*ALFAPLATESCNT; iLayer++)
604 {
605 size_t iTrackNum = std::min ({m_iFibSel[iLayer].size(), MAXTRACKNUM});
606 for (size_t iTrack=0; iTrack<iTrackNum; iTrack++)
607 iFibSel[iTrack][iLayer] = m_iFibSel[iLayer].at(iTrack);
608 for (size_t iTrack=iTrackNum; iTrack<MAXTRACKNUM; iTrack++)
609 iFibSel[iTrack][iLayer] = -9999;
610 }
611
612 {
613 size_t iTrackNum = std::min ({m_fOvU.size(), m_fOvV.size(), MAXTRACKNUM});
614 std::copy_n (m_fOvU.begin(), iTrackNum, fOvU);
615 std::copy_n (m_fOvV.begin(), iTrackNum, fOvV);
616 std::fill_n (fOvU+iTrackNum, MAXTRACKNUM-iTrackNum, -9999.0);
617 std::fill_n (fOvV+iTrackNum, MAXTRACKNUM-iTrackNum, -9999.0);
618 }
619
620 {
621 size_t iTrackNum = std::min ({m_iNU.size(), m_iNV.size(), MAXTRACKNUM});
622 std::copy_n (m_iNU.begin(), iTrackNum, iNumU);
623 std::copy_n (m_iNV.begin(), iTrackNum, iNumV);
624 std::fill_n (iNumU+iTrackNum, MAXTRACKNUM-iTrackNum, -9999);
625 std::fill_n (iNumV+iTrackNum, MAXTRACKNUM-iTrackNum, -9999);
626 }
627}
#define RPOTSCNT
struct _FIBERS FIBERS
#define ALFALAYERSCNT
#define ALFAPLATESCNT
#define ALFAFIBERSCNT
#define ATH_MSG_DEBUG(x)
#define y
#define x
std::vector< Int_t > m_iFibSel[ALFALAYERSCNT *ALFAPLATESCNT]
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)
Float_t m_fbMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
StatusCode Execute(const std::list< MDHIT > &ListMDHits)
std::map< int, FIBERS > LayerMap_t
std::vector< Float_t > m_fRecXPos
std::vector< Int_t > m_iNV
Float_t m_faMD[RPOTSCNT][ALFALAYERSCNT *ALFAPLATESCNT][ALFAFIBERSCNT]
std::vector< Float_t > m_fRecYPos
StatusCode Finalize(Float_t(&fRecXPos)[MAXTRACKNUM], Float_t(&fRecYPos)[MAXTRACKNUM])
std::vector< Int_t > m_iTrackMatch[2]
void GetData(Int_t(&iNumU)[MAXTRACKNUM], Int_t(&iNumV)[MAXTRACKNUM], Float_t(&fOvU)[MAXTRACKNUM], Float_t(&fOvV)[MAXTRACKNUM], Int_t(&iFibSel)[MAXTRACKNUM][ALFALAYERSCNT *ALFAPLATESCNT])
void Proj_Store(LayerMap_t &mapLayers, Int_t iFiberSide, std::span< Int_t > iOver, Float_t fbRef, Int_t iSideFlag)
std::vector< Int_t > m_iNU
void Finding_Fib(LayerMap_t &mapLayers, Int_t iFiberSide, Float_t fbRef, Float_t fbRec, Int_t(&iFSel)[ALFAPLATESCNT], Int_t iSideFlag)
std::vector< Float_t > m_fOvU
void Find_Proj(const std::span< const Int_t > &iOver, Float_t fbRef, Float_t &fb, Float_t &fOv, Int_t &fNum)
void Reco_Track(LayerMap_t &mapLayers, 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])
static constexpr size_t MAXTRACKNUM
Int_t m_iNumHitsLayer[ALFALAYERSCNT *ALFAPLATESCNT]
std::vector< Float_t > m_fOvV
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
std::list< int > ListFibers