19#define LAST_ITERATION kAllSecIter
20#define FIND_GAPED_TRACKS
22#ifndef TRACKS_FROM_TRIPLETS
48#define TRIP_PERFORMANCE
51#ifdef TRIP_PERFORMANCE
55#ifdef DOUB_PERFORMANCE
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_);
211 unsigned char& best_L,
215 unsigned char& curr_L,
222 unsigned int* nlevels = 0
236 const bool initParams =
true);
243 const bool initParams =
true);
271 unsigned char GetFStation(
unsigned char flag) {
return flag / 4; }
272 bool GetFUsed(
unsigned char flag) {
return (flag & 0x02) != 0; }
275 void SetFStation(
unsigned char& flag,
unsigned int iStation) { flag = iStation * 4 + (flag % 4); }
276 void SetFUsed(
unsigned char& flag) { flag |= 0x02; }
324#ifdef DOUB_PERFORMANCE
325 vector<THitI>& hitsl_2,
327 vector<THitI>& hitsm_2,
328 vector<bool>& lmDuplets);
344 vector<THitI>& hitsm_2,
347 const vector<bool>& mrDuplets,
351 vector<THitI>& hitsl_3,
352 vector<THitI>& hitsm_3,
353 vector<THitI>& hitsr_3,
379 vector<THitI>& hitsl_3,
380 vector<THitI>& hitsm_3,
381 vector<THitI>& hitsr_3,
382 int nIterations = 0);
391 vector<THitI>& hitsl_3,
392 vector<THitI>& hitsm_3,
393 vector<THitI>& hitsr_3,
395 unsigned int& nstaltriplets,
396 vector<L1Triplet>& vTriplets_part,
397 unsigned int* TripStartIndexH,
398 unsigned int* TripStopIndexH
407 unsigned int* TripStartIndexH,
408 unsigned int* TripStopIndexH,
417 unsigned int* portionStopIndex,
424 vector<bool>& lmDuplets,
428 vector<THitI>& hitsm_2);
435 unsigned int& nstaltriplets,
441 unsigned int* portionStopIndex,
443 vector<THitI>& hitsm_2,
445 const vector<bool>& mrDuplets,
448 vector<L1Triplet>* vTriplets_part,
449 unsigned int* TripStartIndexH,
450 unsigned int* TripStopIndexH);
464 friend class ParalleledDup;
465 friend class ParalleledTrip;
480#ifdef FIND_GAPED_TRACKS
494#ifdef TRACKS_FROM_TRIPLETS
571#ifdef TRIP_PERFORMANCE
575#ifdef DOUB_PERFORMANCE
vector< Double_t > W(vector< Double_t > dist, Double_t sig)
#define LAST_ITERATION
Debug features.
void StripsToCoor(const fscal &u, const fscal &v, fscal &x, fscal &y, const L1Station &sta) const
convert strip positions to coordinates
vector< L1StsHit > vStsHits
vector< L1Track > vTracks
--— Output data --—
L1HitPoint CreateHitPoint(const L1StsHit &hit, char ista)
full the hit point by hit information.
L1Algo(const L1Algo &)
--— Debug features --—
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)
L1Station vStations[MaxNStations] _fvecalignment
void MultiplyMS(fvec const C[5][5], fvec const V[15], fvec K[15])
void MultiplySS(fvec const C[15], fvec const V[15], fvec K[5][5])
THitI StsHitsStopIndex[MaxNStations+1]
void MultiplySR(fvec const C[15], fvec const r_in[5], fvec r_out[5])
vector< L1Strip > vStsStripsB
vector< L1HitPoint > vAllHitPoints
const float TRACK_CHI2_CUT
void SetFStation(unsigned char &flag, unsigned int iStation)
unsigned char GetFStation(unsigned char flag)
– Flags routines –
vector< unsigned char > vSFlagB
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.
void FilterFirst(L1TrackPar &track, fvec &x, fvec &y, L1Station &st)
THitI StsHitsUnusedStartIndex[MaxNStations+1]
bool GetFUsed(unsigned char flag)
const L1FieldRegion & GetVtxFieldRegion() const
vector< unsigned char > vSFlag
THitI StsHitsStartIndex[MaxNStations+1]
vector< THitI > vRecoHits
void operator=(const L1Algo &)
fscal BranchExtender(L1Branch &t)
Find additional hits for existing track return chi2.
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]
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.
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
fvec Pick_gather
parameters which are different for different iterations. Set in the begin of CAL1TrackFinder
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.
int isec
— data used during finding iterations
int TripStartIndex[MaxNStations - 2]
vector< L1StsHit > * vStsHitsUnused
vector< L1Strip > vStsStrips
vector< L1Triplet > vTriplets
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
int FIRSTCASTATION
================================= DATA PART =================================
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]
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]
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()
void GetHitCoor(const L1StsHit &_h, fscal &_x, fscal &_y, fscal &_z, const L1Station &sta)
--— Hit-point-strips conversion routines ---—
void Init(const fscal geo[])
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 =================================
void SetFUsed(unsigned char &flag)
vector< L1Material > fRadThick
2-dimensional grid of pointers.
contain strips positions and coordinates of hit