BmnRoot 26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
L1Algo.h
Go to the documentation of this file.
1
2#ifndef L1Algo_h
3#define L1Algo_h 1
4
5// #define TBB // TODO: Doesn't work now. Renew
6
7/// Debug features
8// #define PULLS // triplets pulls
9// #define TRIP_PERFORMANCE // triplets efficiencies
10// #define DOUB_PERFORMANCE // doublets efficiencies
11// #define DRAW // event display
12// #define XXX // time debug
13// #define COUNTERS diff counters (hits, doublets, ... )
14
15// #define TRACKS_FROM_TRIPLETS
16// #define DO_NOT_SELECT_TRIPLETS
17// #define TRACKS_FROM_TRIPLETS_ITERATION kAllPrimIter
18
19#define LAST_ITERATION kAllSecIter
20#define FIND_GAPED_TRACKS // use triplets with gaps
21#define USE_RL_TABLE
22#ifndef TRACKS_FROM_TRIPLETS
23#define EXTEND_TRACKS
24#endif
25#define MERGE_CLONES
26#define AZ // 260223 - AZ modifications
27
28#include "L1Branch.h"
29#include "L1Field.h"
30#include "L1Grid.h"
31#include "L1HitPoint.h"
32#include "L1Portion.h"
33#include "L1Station.h"
34#include "L1Strip.h"
35#include "L1StsHit.h"
36#include "L1Track.h"
37#include "L1TrackPar.h"
38#include "L1Triplet.h"
39
40#include <iostream>
41#include <map>
42#include <vector>
43
44using std::map;
45using std::vector;
46
47#ifdef PULLS
48#define TRIP_PERFORMANCE
49class L1AlgoPulls;
50#endif
51#ifdef TRIP_PERFORMANCE
52template<int NHits>
54#endif
55#ifdef DOUB_PERFORMANCE
56template<int NHits>
58#endif
59
60class L1Algo
61{
62 public:
64 : NStations(0)
65 , // number of all detector stations
67 , // number of mvd stations
68 fRadThick()
69 , vStsStrips()
70 , // strips positions created from hits. Front strips
72 , // back strips
73 vStsZPos()
74 , // all possible z-positions of hits
75 vStsHits()
76 , // hits as a combination of front-, backstrips and z-position
77 vSFlag()
78 , // information of hits station & using hits in tracks(),
79 vSFlagB()
80 , isec(-1)
81 , // iteration
84 , RealIHit(0)
85 , // index in vStsHits indexed by index in vStsHitsUnusde
86 vTracks()
87 , // reconstructed tracks
88 vRecoHits()
89 , // packed hits of reconstructed tracks
90 CATime(0)
91 , // time of trackfinding
93 ,
94
98 ,
99
100 MaxDZ(0)
101 , Pick_gather(0)
102 , PickNeighbour(0)
103 , // (PickNeighbour < dp/dp_error) => triplets are neighbours
104 MaxInvMom(0)
105 , // max considered q/p for tracks
106 MaxSlope(0)
107 , targX(0)
108 , targY(0)
109 , targZ(0)
110 , // target coor
111 targB()
112 , // field in the target point
113 TargetXYInfo()
114 , // target constraint [cm]
115 vtxFieldRegion()
116 , // really doesn't used
117 vtxFieldValue()
118 , // field at teh vertex position.
119 vTriplets()
120 , // container for triplets got in finding
123 , // really doesn't used
124 fMomentumCutOff(0) // really doesn't used
125 {}
126
127 void Init(const fscal geo[]);
128#ifdef TBB2
129 void SetData(const vector<L1StsHit>& StsHits_,
130 const vector<L1Strip>& StsStrips_,
131 const vector<L1Strip>& StsStripsB_,
132 const vector<fscal>& StsZPos_,
133 const vector<unsigned char>& SFlag_,
134 const vector<unsigned char>& SFlagB_,
135 const THitI* StsHitsStartIndex_,
136 const THitI* StsHitsStopIndex_);
137 void PrintHits();
138#endif
139 /// The main procedure - find tracks.
140 void CATrackFinder();
141
142 /// Track fitting procedures
143 void KFTrackFitter_simple(); // version, which use procedured used during the reconstruction
144 void L1KFTrackFitter(bool extrapolateToTheEndOfSTS = false); // version from SIMD-KF benchmark
145
146 /// ----- Input data -----
147 // filled in CbmL1::ReadEvent();
148
149 enum
150 {
152 };
153 int NStations, // number of all detector stations
154 NMvdStations; // number of mvd stations
155 L1Station vStations[MaxNStations] _fvecalignment; // station info
156
157 vector<L1Material> fRadThick; // material for each station
158
159 vector<L1Strip> vStsStrips, // strips positions created from hits. Front strips
160 vStsStripsB; // back strips
161 vector<fscal> vStsZPos; // all possible z-positions of hits
162 vector<L1StsHit> vStsHits; // hits as a combination of front-, backstrips and z-position
163 L1Grid vGrid[MaxNStations]; // hits as a combination of front-, backstrips and z-position
164 vector<unsigned char> vSFlag, // information of hits station & using hits in tracks;
167 StsHitsStopIndex[MaxNStations + 1]; // station-bounders in vStsHits array
168
169 /// --- data used during finding iterations
170
171 int isec; // iteration
172 vector<L1StsHit>* vStsHitsUnused;
173 std::vector<L1HitPoint>* vStsHitPointsUnused;
174 THitI* RealIHit; // index in vStsHits indexed by index in vStsHitsUnused
176#ifdef AZ
177 vector<int> vStsHits2Unus; // AZ-230323
178 vector<L1HitPoint> vAllHitPoints; // AZ-240223
179#endif
180
181 /// ----- Output data -----
182 vector<L1Track> vTracks; // reconstructed tracks
183 vector<THitI> vRecoHits; // packed hits of reconstructed tracks
184
185 double CATime; // time of trackfinding
186
187 friend class CbmL1;
188
189 L1FieldValue GetvtxFieldValue() { return vtxFieldValue; }
190
191 private:
192 /// ================================= FUNCTIONAL PART =================================
193
194 const L1FieldValue& GetVtxFieldValue() const { return vtxFieldValue; }
195 const L1FieldRegion& GetVtxFieldRegion() const { return vtxFieldRegion; }
196 /// ----- Hit-point-strips conversion routines ------
197
198 void GetHitCoor(const L1StsHit& _h, fscal& _x, fscal& _y, fscal& _z, const L1Station& sta);
199 void StripsToCoor(const fscal& u,
200 const fscal& v,
201 fscal& x,
202 fscal& y,
203 const L1Station& sta) const; // convert strip positions to coordinates
204 void StripsToCoor(const fvec& u, const fvec& v, fvec& x, fvec& y, const L1Station& sta) const;
205 L1HitPoint CreateHitPoint(const L1StsHit& hit, char ista); // full the hit point by hit information.
206
207 /// ----- Subroutines used by L1Algo::CATrackFinder() ------
208
209 void CAFindTrack(int ista,
210 L1Branch& best_tr,
211 unsigned char& best_L,
212 fscal& best_chi2,
213 const L1Triplet* curr_trip,
214 L1Branch& curr_tr,
215 unsigned char& curr_L,
216 fscal& curr_chi2,
217 int& NCalls);
218
219 void CleanTriplets(bool isClean = 0
220#ifdef COUNTERS
221 ,
222 unsigned int* nlevels = 0
223#endif
224 ); // isClean = true - find neighbours only
225
226 /// Fit track
227 /// t - track with hits
228 /// T - track params
229 /// dir - 0 - forward, 1 - backward
230 /// qp0 - momentum for extrapolation
231 /// initialize - should be params ititialized. 1 - yes.
232 void BranchFitterFast(const L1Branch& t,
233 L1TrackPar& T,
234 const bool dir,
235 const fvec qp0 = 0.,
236 const bool initParams = true);
237
238 /// Fit track. more precise than FitterFast
239 void BranchFitter(const L1Branch& t,
240 L1TrackPar& T,
241 const bool dir,
242 const fvec qp0 = 0.,
243 const bool initParams = true);
244
245 /// Find additional hits for existing track
246 /// t - track with hits
247 /// T - track params
248 /// dir - 0 - forward, 1 - backward
249 /// qp0 - momentum for extrapolation
250 void FindMoreHits(L1Branch& t, L1TrackPar& T, const bool dir, const fvec qp0 = 0.0);
251
252 /// Find additional hits for existing track
253 /// return chi2
255
256 /// ----- Subroutines used by L1Algo::CAMergeClones() ------
257 void InvertCholetsky(fvec a[15]);
258 void MultiplySS(fvec const C[15], fvec const V[15], fvec K[5][5]);
259 void MultiplyMS(fvec const C[5][5], fvec const V[15], fvec K[15]);
260 void MultiplySR(fvec const C[15], fvec const r_in[5], fvec r_out[5]);
261 void FilterTracks(fvec const r[5],
262 fvec const C[15],
263 fvec const m[5],
264 fvec const V[15],
265 fvec R[5],
266 fvec W[15],
267 fvec* chi2);
268 void CAMergeClones();
269
270 /// -- Flags routines --
271 unsigned char GetFStation(unsigned char flag) { return flag / 4; }
272 bool GetFUsed(unsigned char flag) { return (flag & 0x02) != 0; }
273 // bool GetFUsedD ( unsigned char flag ){ return (flag&0x01)!=0; }
274
275 void SetFStation(unsigned char& flag, unsigned int iStation) { flag = iStation * 4 + (flag % 4); }
276 void SetFUsed(unsigned char& flag) { flag |= 0x02; }
277 // void SetFUsedD ( unsigned char &flag ){ flag |= 0x01; }
278 void SetFUnUsed(unsigned char& flag) { flag &= 0xFC; }
279 // void SetFUnUsedD ( unsigned char &flag ){ flag &= 0xFE; }
280
281 /// Prepare the portion of left hits data
282 void f10( // input
283 int start_lh,
284 int n1,
285 L1HitPoint* vStsHits_l,
286 // output
287 fvec* u_front,
288 fvec* u_back,
289 fvec* zPos,
290 THitI* hitsl_1,
291 fvec* du_front = 0,
292 fvec* du_back = 0 // AZ
293 );
294
295 /// Get the field approximation. Add the target to parameters estimation. Propagate to middle station.
296 void f11( // input
297 int istal,
298 int istam,
299 int n1_V,
300
301 fvec* u_front,
302 fvec* u_back,
303 fvec* zPos,
304 // output
305 L1TrackPar* T_1,
306 L1FieldRegion* fld_1,
307 fvec* du_front = 0,
308 fvec* du_back = 0 // AZ
309 );
310
311 /// Find the doublets. Reformat data in the portion of doublets.
312 void f20( // input
313 int n1,
314 L1Station& stam,
315 L1HitPoint* vStsHits_l,
316 L1HitPoint* vStsHits_m,
317 int NHits_m,
318 L1TrackPar* T_1,
319 THitI* hitsl_1,
320 // output
321 int& n2,
322 vector<THitI>& i1_2,
323 int& start_mhit,
324#ifdef DOUB_PERFORMANCE
325 vector<THitI>& hitsl_2,
326#endif // DOUB_PERFORMANCE
327 vector<THitI>& hitsm_2,
328 vector<bool>& lmDuplets);
329 /// Add the middle hits to parameters estimation. Propagate to right station.
330 /// Find the triplets (right hit). Reformat data in the portion of triplets.
331 void f30( // input
332 L1HitPoint* vStsHits_r,
333 L1Station& stam,
334 L1Station& star,
335
336 int istam,
337 int istar,
338 L1HitPoint* vStsHits_m,
339 L1TrackPar* T_1,
340 L1FieldRegion* fld_1,
341 THitI* hitsl_1,
342
343 int n2,
344 vector<THitI>& hitsm_2,
345 vector<THitI>& i1_2,
346
347 const vector<bool>& mrDuplets,
348 // output
349 int& n3,
351 vector<THitI>& hitsl_3,
352 vector<THitI>& hitsm_3,
353 vector<THitI>& hitsr_3,
354 nsL1::vector<fvec>::TSimd& u_front_3,
357 nsL1::vector<fvec>::TSimd* du_front_3 = 0,
358 nsL1::vector<fvec>::TSimd* du_back_3 = 0 // AZ
359 );
360
361 /// Add the right hits to parameters estimation.
362 void f31( // input
363 int n3_V,
364 L1Station& star,
365 nsL1::vector<fvec>::TSimd& u_front_3,
368 // output
370 nsL1::vector<fvec>::TSimd* du_front = 0,
371 nsL1::vector<fvec>::TSimd* du_back = 0 // AZ
372 );
373
374 /// Refit Triplets.
375 void f32( // input
376 int n3,
377 int istal,
379 vector<THitI>& hitsl_3,
380 vector<THitI>& hitsm_3,
381 vector<THitI>& hitsr_3,
382 int nIterations = 0);
383
384 /// Select triplets. Save them into vTriplets.
385 void f4( // input
386 int n3,
387 int istal,
388 int istam,
389 int istar,
391 vector<THitI>& hitsl_3,
392 vector<THitI>& hitsm_3,
393 vector<THitI>& hitsr_3,
394 // output
395 unsigned int& nstaltriplets,
396 vector<L1Triplet>& vTriplets_part,
397 unsigned int* TripStartIndexH,
398 unsigned int* TripStopIndexH
399 // #ifdef XXX
400 // ,unsigned int &stat_n_trip
401 // #endif
402 );
403
404 /// Find neighbours of triplets. Calculate level of triplets.
405 void f5( // input
406 // output
407 unsigned int* TripStartIndexH,
408 unsigned int* TripStopIndexH,
409 int* nlevel);
410
411 /// Find doublets on station
412 void DupletsStaPort( // input
413 int istal,
414 int istam,
415 unsigned int ip,
416 vector<int>& n_g1,
417 unsigned int* portionStopIndex,
418
419 // output
420 L1TrackPar* T_1,
421 L1FieldRegion* fld_1,
422 THitI* hitsl_1,
423
424 vector<bool>& lmDuplets,
425
426 int& n_2,
427 vector<THitI>& i1_2,
428 vector<THitI>& hitsm_2);
429
430 /// Find triplets on station
431 void TripletsStaPort( // input
432 int istal,
433 int istam,
434 int istar,
435 unsigned int& nstaltriplets,
436 L1TrackPar* T_1,
437 L1FieldRegion* fld_1,
438 THitI* hitsl_1,
439
440 int& n_2,
441 unsigned int* portionStopIndex,
442 vector<THitI>& i1_2,
443 vector<THitI>& hitsm_2,
444
445 const vector<bool>& mrDuplets,
446
447 // output
448 vector<L1Triplet>* vTriplets_part,
449 unsigned int* TripStartIndexH,
450 unsigned int* TripStopIndexH);
451
452 /// ------ Subroutines used by L1Algo::KFTrackFitter() ------
453
454 void GuessVec(L1TrackPar& t, fvec* xV, fvec* yV, fvec* zV, fvec* Sy, fvec* wV, int NHits, fvec* zCur = 0);
455 void FilterFirst(L1TrackPar& track, fvec& x, fvec& y, L1Station& st);
456
457#ifdef TBB
458 enum
459 {
460 nthreads = 3, // number of threads
461 nblocks = 1 // number of stations on one thread
462 };
463
464 friend class ParalleledDup;
465 friend class ParalleledTrip;
466#endif // TBB
467#ifdef TBB2
468 public:
469 int thrId;
470#endif // TBB2
471 private:
472 /// ================================= DATA PART =================================
473
474 /// ----- Different parameters of CATrackFinder -----
475
476 int FIRSTCASTATION; // first station used in CA
477
478 // fNFindIterations - set number of interation for trackfinding
479 // itetation of finding:
480#ifdef FIND_GAPED_TRACKS
481 enum
482 {
483 kFastPrimIter, // primary fast tracks
484 kAllPrimIter, // primary all tracks
485 kAllPrimJumpIter, // primary tracks with jumped triplets
486 kAllSecIter, // secondary all tracks
487 kAllPrimEIter, // primary all electron tracks
488 kAllSecEIter, // secondary all electron tracks
489
490 kFastPrimJumpIter, // primary fast tracks with jumped triplets
492 kAllSecJumpIter // secondary tracks with jumped triplets
493 };
494#ifdef TRACKS_FROM_TRIPLETS
495 enum
496 {
497 fNFindIterations = TRACKS_FROM_TRIPLETS_ITERATION + 1
498 }; // TODO investigate kAllPrimJumpIter & kAllSecJumpIter
499#else
500 enum
501 {
503 }; // TODO investigate kAllPrimJumpIter & kAllSecJumpIter
504#endif
505#else
506 enum
507 {
509 };
510 enum
511 {
512 kFastPrimIter = 0, // primary fast tracks
513 kAllPrimIter, // primary all tracks
514 kAllSecIter, // secondary all tracks
515 kFastPrimJumpIter, // disabled
516 kAllPrimJumpIter, // disabled
519 };
520#endif // FIND_GAPED_TRACKS
521
522 const float TRACK_CHI2_CUT; // = 10.0; // cut for tracks candidates. per one DoF
523 float TRIPLET_CHI2_CUT; // = 5.0; // cut for selecting triplets before collecting tracks.per one DoF
525
526 fvec MaxDZ; // correction in order to take into account overlaping and iff z. if sort by y then it is max diff
527 // between same station's modules (~0.4cm)
528
529 /// parameters which are different for different iterations. Set in the begin of CAL1TrackFinder
530 fvec Pick_gather; // coefficient for size of region for attaching additional hits to track
531 float PickNeighbour; // (PickNeighbour < dp/dp_error) => triplets are neighbours
532 fvec MaxInvMom; // max considered q/p for tracks
533 fvec MaxSlope; // max slope (tx\ty) in prim vertex
534 fvec targX, targY, targZ; // target coor
535 L1FieldValue targB _fvecalignment; // field in the target point
536 L1XYMeasurementInfo TargetXYInfo _fvecalignment; // target constraint [cm]
537
538 /// standard sizes of the arrays
539 enum
540 {
541 multiCoeff = 1, // central - 1, mbias -
542
543 coeff = 64 / 4,
544
545 Portion = 1024 / coeff, // portion of left hits
546
547 MaxPortionDoublets = 10000 / 5 * 64 / 2 / coeff /*/ multiCoeff*/ * 1,
548 MaxPortionTriplets = 10000 * 5 * 64 / 2 / coeff /*/ multiCoeff*/ * 1,
550
553 / MaxNStations // 200000, // standart size of big arrays // mas be 40000 for normal work in cbmroot!
554 };
555
556 L1FieldRegion vtxFieldRegion _fvecalignment; // really doesn't used
557 L1FieldValue vtxFieldValue _fvecalignment; // field at teh vertex position.
558
559 vector<L1Triplet> vTriplets; // container for triplets got in finding
562 - 2]; // containers for stations bounders in vTriplets. indices are from start to stop-1
563
564 int fTrackingLevel, fGhostSuppression; // really doesn't used
565 float fMomentumCutOff; // really doesn't used
566
567 /// ----- Debug features -----
568#ifdef PULLS
569 L1AlgoPulls* fL1Pulls;
570#endif
571#ifdef TRIP_PERFORMANCE
572 L1AlgoEfficiencyPerformance<3>* fL1Eff_triplets;
573 L1AlgoEfficiencyPerformance<3>* fL1Eff_triplets2;
574#endif
575#ifdef DOUB_PERFORMANCE
576 L1AlgoEfficiencyPerformance<2>* fL1Eff_doublets;
577#endif
578#ifdef DRAW
579 friend class L1AlgoDraw;
580#endif
581
582 private:
583 L1Algo(const L1Algo&);
584 void operator=(const L1Algo&);
586
587#endif
vector< Double_t > W(vector< Double_t > dist, Double_t sig)
Definition BmnMath.cxx:878
#define LAST_ITERATION
Debug features.
Definition L1Algo.h:19
unsigned int THitI
Definition L1StsHit.h:6
float fscal
Definition P4_F32vec4.h:232
__m128 v
Definition P4_F32vec4.h:1
#define _fvecalignment
Definition P4_F32vec4.h:236
__m128 m
Definition P4_F32vec4.h:27
F32vec4 fvec
Definition P4_F32vec4.h:231
float fMomentumCutOff
Definition L1Algo.h:565
void StripsToCoor(const fscal &u, const fscal &v, fscal &x, fscal &y, const L1Station &sta) const
convert strip positions to coordinates
Definition L1Algo.cxx:185
vector< L1StsHit > vStsHits
Definition L1Algo.h:162
vector< L1Track > vTracks
--— Output data --—
Definition L1Algo.h:182
L1HitPoint CreateHitPoint(const L1StsHit &hit, char ista)
full the hit point by hit information.
Definition L1Algo.cxx:209
void CAMergeClones()
THitI * RealIHit
Definition L1Algo.h:174
L1Algo(const L1Algo &)
--— Debug features --—
fvec targY
Definition L1Algo.h:534
void FilterTracks(fvec const r[5], fvec const C[15], fvec const m[5], fvec const V[15], fvec R[5], fvec W[15], fvec *chi2)
void f32(int n3, int istal, nsL1::vector< L1TrackPar >::TSimd &T_3, vector< THitI > &hitsl_3, vector< THitI > &hitsm_3, vector< THitI > &hitsr_3, int nIterations=0)
Refit Triplets.
void DupletsStaPort(int istal, int istam, unsigned int ip, vector< int > &n_g1, unsigned int *portionStopIndex, L1TrackPar *T_1, L1FieldRegion *fld_1, THitI *hitsl_1, vector< bool > &lmDuplets, int &n_2, vector< THitI > &i1_2, vector< THitI > &hitsm_2)
Find doublets on station.
void SetFUnUsed(unsigned char &flag)
Definition L1Algo.h:278
fvec targX
Definition L1Algo.h:534
L1Station vStations[MaxNStations] _fvecalignment
Definition L1Algo.h:155
@ kAllSecEIter
Definition L1Algo.h:488
@ kAllSecIter
Definition L1Algo.h:486
@ kFastPrimIter
Definition L1Algo.h:483
@ kAllSecJumpIter
Definition L1Algo.h:492
@ kAllPrimIter
Definition L1Algo.h:484
@ kFastPrimJumpIter
Definition L1Algo.h:490
@ kAllPrimEIter
Definition L1Algo.h:487
@ kAllPrimJumpIter
Definition L1Algo.h:485
@ kFastPrimIter2
Definition L1Algo.h:491
void MultiplyMS(fvec const C[5][5], fvec const V[15], fvec K[15])
int NStations
Definition L1Algo.h:153
void MultiplySS(fvec const C[15], fvec const V[15], fvec K[5][5])
THitI StsHitsStopIndex[MaxNStations+1]
Definition L1Algo.h:167
void MultiplySR(fvec const C[15], fvec const r_in[5], fvec r_out[5])
vector< fscal > vStsZPos
Definition L1Algo.h:161
double CATime
Definition L1Algo.h:185
vector< L1Strip > vStsStripsB
Definition L1Algo.h:160
vector< L1HitPoint > vAllHitPoints
Definition L1Algo.h:178
const float TRACK_CHI2_CUT
Definition L1Algo.h:522
void SetFStation(unsigned char &flag, unsigned int iStation)
Definition L1Algo.h:275
unsigned char GetFStation(unsigned char flag)
– Flags routines –
Definition L1Algo.h:271
vector< unsigned char > vSFlagB
Definition L1Algo.h:165
void CleanTriplets(bool isClean=0)
void TripletsStaPort(int istal, int istam, int istar, unsigned int &nstaltriplets, L1TrackPar *T_1, L1FieldRegion *fld_1, THitI *hitsl_1, int &n_2, unsigned int *portionStopIndex, vector< THitI > &i1_2, vector< THitI > &hitsm_2, const vector< bool > &mrDuplets, vector< L1Triplet > *vTriplets_part, unsigned int *TripStartIndexH, unsigned int *TripStopIndexH)
Find triplets on station.
float TRIPLET_CHI2_CUT
Definition L1Algo.h:523
void FilterFirst(L1TrackPar &track, fvec &x, fvec &y, L1Station &st)
THitI StsHitsUnusedStartIndex[MaxNStations+1]
Definition L1Algo.h:175
fvec MaxDZ
Definition L1Algo.h:526
bool GetFUsed(unsigned char flag)
Definition L1Algo.h:272
const L1FieldRegion & GetVtxFieldRegion() const
Definition L1Algo.h:195
vector< unsigned char > vSFlag
Definition L1Algo.h:164
THitI StsHitsStartIndex[MaxNStations+1]
Definition L1Algo.h:166
vector< THitI > vRecoHits
Definition L1Algo.h:183
fvec targZ
Definition L1Algo.h:534
void operator=(const L1Algo &)
float DOUBLET_CHI2_CUT
Definition L1Algo.h:524
fscal BranchExtender(L1Branch &t)
Find additional hits for existing track return chi2.
friend class CbmL1
Definition L1Algo.h:187
void GuessVec(L1TrackPar &t, fvec *xV, fvec *yV, fvec *zV, fvec *Sy, fvec *wV, int NHits, fvec *zCur=0)
---— Subroutines used by L1Algo::KFTrackFitter() ---—
int TripStopIndex[MaxNStations - 2]
Definition L1Algo.h:562
void f30(L1HitPoint *vStsHits_r, L1Station &stam, L1Station &star, int istam, int istar, L1HitPoint *vStsHits_m, L1TrackPar *T_1, L1FieldRegion *fld_1, THitI *hitsl_1, int n2, vector< THitI > &hitsm_2, vector< THitI > &i1_2, const vector< bool > &mrDuplets, int &n3, nsL1::vector< L1TrackPar >::TSimd &T_3, vector< THitI > &hitsl_3, vector< THitI > &hitsm_3, vector< THitI > &hitsr_3, nsL1::vector< fvec >::TSimd &u_front_3, nsL1::vector< fvec >::TSimd &u_back_3, nsL1::vector< fvec >::TSimd &z_Pos_3, nsL1::vector< fvec >::TSimd *du_front_3=0, nsL1::vector< fvec >::TSimd *du_back_3=0)
Add the middle hits to parameters estimation.
int fGhostSuppression
Definition L1Algo.h:564
int NMvdStations
Definition L1Algo.h:154
fvec MaxSlope
Definition L1Algo.h:533
void BranchFitterFast(const L1Branch &t, L1TrackPar &T, const bool dir, const fvec qp0=0., const bool initParams=true)
Fit track t - track with hits T - track params dir - 0 - forward, 1 - backward qp0 - momentum for ext...
void f31(int n3_V, L1Station &star, nsL1::vector< fvec >::TSimd &u_front_3, nsL1::vector< fvec >::TSimd &u_back_3, nsL1::vector< fvec >::TSimd &z_Pos_3, nsL1::vector< L1TrackPar >::TSimd &T_3, nsL1::vector< fvec >::TSimd *du_front=0, nsL1::vector< fvec >::TSimd *du_back=0)
Add the right hits to parameters estimation.
std::vector< L1HitPoint > * vStsHitPointsUnused
Definition L1Algo.h:173
fvec Pick_gather
parameters which are different for different iterations. Set in the begin of CAL1TrackFinder
Definition L1Algo.h:530
void f4(int n3, int istal, int istam, int istar, nsL1::vector< L1TrackPar >::TSimd &T_3, vector< THitI > &hitsl_3, vector< THitI > &hitsm_3, vector< THitI > &hitsr_3, unsigned int &nstaltriplets, vector< L1Triplet > &vTriplets_part, unsigned int *TripStartIndexH, unsigned int *TripStopIndexH)
Select triplets. Save them into vTriplets.
@ MaxArrSize
Definition L1Algo.h:551
@ multiCoeff
Definition L1Algo.h:541
@ MaxPortionDoublets
Definition L1Algo.h:547
@ coeff
Definition L1Algo.h:543
@ Portion
Definition L1Algo.h:545
@ MaxPortionTriplets
Definition L1Algo.h:548
@ MaxNPortion
Definition L1Algo.h:549
int isec
— data used during finding iterations
Definition L1Algo.h:171
int TripStartIndex[MaxNStations - 2]
Definition L1Algo.h:560
vector< L1StsHit > * vStsHitsUnused
Definition L1Algo.h:172
float PickNeighbour
Definition L1Algo.h:531
@ fNFindIterations
Definition L1Algo.h:502
vector< L1Strip > vStsStrips
Definition L1Algo.h:159
vector< L1Triplet > vTriplets
Definition L1Algo.h:559
fvec MaxInvMom
Definition L1Algo.h:532
void f11(int istal, int istam, int n1_V, fvec *u_front, fvec *u_back, fvec *zPos, L1TrackPar *T_1, L1FieldRegion *fld_1, fvec *du_front=0, fvec *du_back=0)
Get the field approximation. Add the target to parameters estimation. Propagate to middle station.
vector< int > vStsHits2Unus
Definition L1Algo.h:177
int FIRSTCASTATION
================================= DATA PART =================================
Definition L1Algo.h:476
void BranchFitter(const L1Branch &t, L1TrackPar &T, const bool dir, const fvec qp0=0., const bool initParams=true)
Fit track. more precise than FitterFast.
void CATrackFinder()
The main procedure - find tracks.
void CAFindTrack(int ista, L1Branch &best_tr, unsigned char &best_L, fscal &best_chi2, const L1Triplet *curr_trip, L1Branch &curr_tr, unsigned char &curr_L, fscal &curr_chi2, int &NCalls)
--— Subroutines used by L1Algo::CATrackFinder() ---—
THitI StsHitsUnusedStopIndex[MaxNStations+1]
Definition L1Algo.h:175
void FindMoreHits(L1Branch &t, L1TrackPar &T, const bool dir, const fvec qp0=0.0)
Find additional hits for existing track t - track with hits T - track params dir - 0 - forward,...
void L1KFTrackFitter(bool extrapolateToTheEndOfSTS=false)
void KFTrackFitter_simple()
Track fitting procedures.
L1Grid vGrid[MaxNStations]
Definition L1Algo.h:163
int fTrackingLevel
Definition L1Algo.h:564
void f20(int n1, L1Station &stam, L1HitPoint *vStsHits_l, L1HitPoint *vStsHits_m, int NHits_m, L1TrackPar *T_1, THitI *hitsl_1, int &n2, vector< THitI > &i1_2, int &start_mhit, vector< THitI > &hitsm_2, vector< bool > &lmDuplets)
Find the doublets. Reformat data in the portion of doublets.
void f5(unsigned int *TripStartIndexH, unsigned int *TripStopIndexH, int *nlevel)
Find neighbours of triplets. Calculate level of triplets.
void InvertCholetsky(fvec a[15])
--— Subroutines used by L1Algo::CAMergeClones() ---—
L1FieldValue GetvtxFieldValue()
Definition L1Algo.h:189
void GetHitCoor(const L1StsHit &_h, fscal &_x, fscal &_y, fscal &_z, const L1Station &sta)
--— Hit-point-strips conversion routines ---—
Definition L1Algo.cxx:173
@ MaxNStations
Definition L1Algo.h:151
void Init(const fscal geo[])
Definition L1Algo.cxx:3
void f10(int start_lh, int n1, L1HitPoint *vStsHits_l, fvec *u_front, fvec *u_back, fvec *zPos, THitI *hitsl_1, fvec *du_front=0, fvec *du_back=0)
Prepare the portion of left hits data.
const L1FieldValue & GetVtxFieldValue() const
================================= FUNCTIONAL PART =================================
Definition L1Algo.h:194
void SetFUsed(unsigned char &flag)
Definition L1Algo.h:276
vector< L1Material > fRadThick
Definition L1Algo.h:157
L1Algo()
Definition L1Algo.h:63
2-dimensional grid of pointers.
Definition L1Grid.h:49
contain strips positions and coordinates of hit
Definition L1HitPoint.h:9
std::vector< T > TSimd