- if(layOK>=minNPoints){
- AliDebug(2,Form("---NPOINTS: %d; MAP: %d %d %d %d %d %d\n",layOK,nClusLay[0],nClusLay[1],nClusLay[2],nClusLay[3],nClusLay[4],nClusLay[5]));
- AliITStrackV2* tr2 = 0;
- tr2 = FitTrack(trs,primaryVertex);
- if(!tr2) continue;
- AliDebug(2,Form("---NPOINTS fit: %d\n",tr2->GetNumberOfClusters()));
-
- StoreTrack(tr2,event);
- ntrack++;
-
- }
-
- delete trs;
- }//end loop on clusters of innLay
- } //end loop on window sizes
- } //end loop on innLay
- }else{// Tracking inwards from the outer layers
- // loop on starting layer for track finding
- for(Int_t outLay=AliITSgeomTGeo::GetNLayers()-1; outLay>=fInnerStartLayer; outLay--) {
-
- if(ForceSkippingOfLayer(outLay)) continue;
- Int_t minNPoints=iMinNPoints-(AliITSgeomTGeo::GetNLayers()-1-outLay);
- for(Int_t i=0;i<outLay-1;i++)
- if(ForceSkippingOfLayer(i))
- minNPoints--;
- if(minNPoints<fMinNPoints) continue;
-
- // loop on phi and lambda window size
- for(Int_t nloop=0;nloop<fNloop;nloop++){
- Int_t nclOutLay=fCluLayer[outLay]->GetEntries();
- while(nclOutLay--){
- ResetForFinding();
- Bool_t useRP=SetFirstPoint(outLay,nclOutLay,primaryVertex);
- if(!useRP) continue;
- AliITStrackSA* trs = new AliITStrackSA();
-
- Int_t pflag=0;
- Int_t kk;
- for(kk=0;kk<AliITSgeomTGeo::GetNLayers();kk++) nClusLay[kk] = 0;
-
- kk=0;
- nClusLay[kk] = SearchClusters(outLay,fPhiWin[nloop],fLambdaWin[nloop],
- trs,primaryVertex[2],pflag);
- for(Int_t nextLay=outLay-1; nextLay>=0; nextLay--) {
- kk++;
- nClusLay[kk] = SearchClusters(nextLay,fPhiWin[nloop],fLambdaWin[nloop],
- trs,primaryVertex[2],pflag);
- if(nClusLay[kk]!=0){
- pflag=1;
- if(kk==1) {
- fPoint3[0]=fPointc[0];
- fPoint3[1]=fPointc[1];
- } else {
- UpdatePoints();
- }
- }
- }
-
- Int_t layOK=0;
- for(Int_t nnp=outLay; nnp>=0; nnp--){