bugs fixed: last cluster in the row was sometimes not available on
authorsgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Jan 2009 17:08:00 +0000 (17:08 +0000)
committersgorbuno <sgorbuno@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 19 Jan 2009 17:08:00 +0000 (17:08 +0000)
the track prolongation stage; one unused element in the cov. matrix was
not initialised.

HLT/TPCLib/tracking-ca/AliHLTTPCCATracker.cxx
HLT/TPCLib/tracking-ca/AliHLTTPCCATrackletConstructor.cxx
HLT/TPCLib/tracking-ca/AliHLTTPCCATrackletSelector.cxx

index c99595a..df266f7 100644 (file)
@@ -344,10 +344,10 @@ GPUd() void AliHLTTPCCATracker::ReadEvent( Int_t *RowFirstHit, Int_t *RowNHits,
     for( Int_t i=0; i<n2; i++ ){
       Int_t v = c[i];
       if( v>=256 ){
-       cout<<" ERROR!!! "<<v<<endl;
+       //cout<<" ERROR!!! "<<v<<endl;
        v = 255;
       }else if( v<0 ){
-       cout<<" ERROR!!! "<<v<<endl;
+       //cout<<" ERROR!!! "<<v<<endl;
        v = 0;
       }              
       cnew[i] = (UChar_t ) v;
@@ -355,10 +355,10 @@ GPUd() void AliHLTTPCCATracker::ReadEvent( Int_t *RowFirstHit, Int_t *RowNHits,
     for( UInt_t i=n2; i<grid.N()+3; i++ ){
       Int_t v = c[i] - grid.Content2();
       if( v>=256 ){
-       cout<<" ERROR 1 !!! "<<v<<endl;
+       //cout<<" ERROR 1 !!! "<<v<<endl;
        v = 255;
       }else if( v<0 ){
-       cout<<" ERROR 1 !!! "<<v<<endl;
+       //cout<<" ERROR 1 !!! "<<v<<endl;
        v = 0;
       }
       cnew[i] = (UChar_t) v;     
@@ -429,7 +429,7 @@ GPUd() void AliHLTTPCCATracker::ReadEvent( Int_t *RowFirstHit, Int_t *RowNHits,
       for( Int_t i=0; i<n; i++ ){
        p1[i] = c[i];
       }     
-      UShort_t a = c[n-1];
+      UShort_t a = c[n];
       Int_t nn = n+grid.Ny()+2;
       for( Int_t i=n; i<nn; i++ ) p1[i] = a;
 
@@ -551,11 +551,11 @@ GPUh() void AliHLTTPCCATracker::Reconstruct()
     //cudaMemcpy(cpuTrackerCopy.fTrackHits+1, gpuTrackerCopy.fTrackHits+1, size, cudaMemcpyDeviceToHost);
     //cout<<"Track hits size = "<<size<<endl;
     //cpuTrackerCopy.WriteOutput();
-    nStartHits = *fStartHits;
-    //cout<<"N tracklets constructed = "<<nStartHits<<endl;
-       
-    //cout<<"Selected NTracks = "<<*fNTracks<<endl;
-    WriteOutput();      
+    Int_t nTracklets = *fStartHits;
+
+    cout<<"Slice "<<Param().ISlice()<<": N start hits/tracklets/tracks = "<<nStartHits<<" "<<nTracklets<<" "<<*fNTracks<<endl;
+   WriteOutput();      
   }
 
 #endif
index 06a7f68..cdba9c5 100644 (file)
@@ -98,18 +98,26 @@ GPUd() void AliHLTTPCCATrackletConstructor::Step1
   tParam.Chi2() = 0;
   tParam.NDF() = -3;      
   
-  tParam.Cov()[1] = 0;
-  tParam.Cov()[4] = 0;
-  tParam.Cov()[8] = 0;
-  tParam.Cov()[13] = 0;
+  tParam.Cov()[0] = 1; 
+
+  tParam.Cov()[1] = 0; 
+  tParam.Cov()[2] = 1; 
+
+  tParam.Cov()[3] = 0; 
+  tParam.Cov()[4] = 0; 
+  tParam.Cov()[5] = 1.; 
+
+  tParam.Cov()[6] = 0; 
+  tParam.Cov()[7] = 0; 
+  tParam.Cov()[8] = 0; 
+  tParam.Cov()[9] = 1;
   
-  tParam.Cov()[3] = 0;
-  tParam.Cov()[5] = 1.;
-  tParam.Cov()[7] = 0;
-  tParam.Cov()[9] = 1.;
   tParam.Cov()[10] = 0;
+  tParam.Cov()[11] = 0;
   tParam.Cov()[12] = 0;
+  tParam.Cov()[13] = 0;
   tParam.Cov()[14] = 1.;
+
   r.fLastRow = r.fFirstRow;
 }
 
index 2794486..ed7984a 100644 (file)
@@ -56,12 +56,16 @@ GPUd() void AliHLTTPCCATrackletSelector::Thread
        Int_t *hitstore = t + 5+ sizeof(AliHLTTPCCATrackParam)/4 ;    
        Int_t w = (tNHits<<16)+itr;     
        Int_t nRows = tracker.Param().NRows();
-       for( Int_t irow=0; irow<nRows; irow++ ){
+       Int_t gap = 0;
+       for( Int_t irow=0; irow<nRows; irow++ ){
          Int_t ih = hitstore[irow];
          if( ih<0 ) continue;
          AliHLTTPCCARow &row = tracker.Rows()[irow];
          Int_t ihTot = row.FirstHit()+ih;      
-         if( tracker.HitIsUsed()[ihTot] > w ) continue;
+         if( tracker.HitIsUsed()[ihTot] > w ){
+            if( ++gap>6){ tout.NHits()=0; break; }
+            continue;
+          }
          Int_t th = AliHLTTPCCATracker::IRowIHit2ID(irow,ih);
          trackHits[tout.NHits()] = th;
          tout.NHits()++;