]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderV2SSD.cxx
Updated DA from Brigitte. Steerable clock range for pedestal evaluation - default...
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2SSD.cxx
index 36f5ff955246d03ffc52c522d9a4bb021321dc89..dc9d463f3c96242c06a23c2f4f6b4bcb0d343c68 100644 (file)
@@ -804,18 +804,24 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
       seg->GetPadCxz(yn, yp, xt, zt);
       //cout<<yn<<" "<<yp<<" "<<xt<<" "<<zt<<endl;
       
-      if (TMath::Abs(xt)<hwSSD+0.01)
-      if (TMath::Abs(zt)<hlSSD+0.01*(neg[j].GetNd()+pos[i].GetNd())) {
-       negativepair[i*10+cnegative[i]] =j;  //index
-       positivepair[j*10+cpositive[j]] =i;
-       cnegative[i]++;  //counters
-       cpositive[j]++; 
-       fgPairs[i*nn+j]=100;
+      if (TMath::Abs(xt)<hwSSD)
+      if (TMath::Abs(zt)<hlSSD) {
+       Int_t in = i*10+cnegative[i];
+       Int_t ip = j*10+cpositive[j];
+       if ((in < 10*np) && (ip < 10*nn)) {
+         negativepair[in] =j;  //index
+         positivepair[ip] =i;
+         cnegative[i]++;  //counters
+         cpositive[j]++;       
+         fgPairs[i*nn+j]=100;
+       }
+       else
+         AliError(Form("Index out of range: ip=%d, in=%d",ip,in));
       }
     }
   }
 
-  //
+  /* //
   // try to recover points out of but close to the module boundaries 
   //
   for (Int_t i=0; i<np; i++) {
@@ -835,14 +841,21 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
        // tag 1Dcluster (eventually will produce low quality recpoint)
        if (cnegative[i]==0) pos[i].SetNd(100);  // not available pair
        if (cpositive[j]==0) neg[j].SetNd(100);  // not available pair
-       negativepair[i*10+cnegative[i]] =j;  //index
-       positivepair[j*10+cpositive[j]] =i;
-       cnegative[i]++;  //counters
-       cpositive[j]++; 
-       fgPairs[i*nn+j]=100;
+       Int_t in = i*10+cnegative[i];
+       Int_t ip = j*10+cpositive[j];
+       if ((in < 10*np) && (ip < 10*nn)) {
+         negativepair[in] =j;  //index
+         positivepair[ip] =i;
+         cnegative[i]++;  //counters
+         cpositive[j]++;       
+         fgPairs[i*nn+j]=100;
+       }
+       else
+         AliError(Form("Index out of range: ip=%d, in=%d",ip,in));
       }
     }
   }
+  */
 
   //
   Float_t lp[6];
@@ -1622,8 +1635,8 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
       Float_t xt, zt;
       seg->GetPadCxz(yn, yp, xt, zt);
       
-      if (TMath::Abs(xt)<hwSSD+0.01)
-      if (TMath::Abs(zt)<hlSSD+0.01*(neg[j].GetNd()+pos[i].GetNd())) {
+      if (TMath::Abs(xt)<hwSSD)
+      if (TMath::Abs(zt)<hlSSD) {
        xbest=xt; zbest=zt; 
 
         qbest=0.5*(pos[i].GetQ()+neg[j].GetQ());
@@ -1719,7 +1732,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
            //----------
            // bad Pstrip is crossing the Nside 1Dcluster -> create recpoint
            // 
-           if ( (TMath::Abs(xt)<hwSSD+0.01) && (TMath::Abs(zt)<hlSSD+0.01) ) {
+           if ( (TMath::Abs(xt)<hwSSD) && (TMath::Abs(zt)<hlSSD) ) {
              Double_t loc[3]={xt,0.,zt},trk[3]={0.,0.,0.};
              mT2L->MasterToLocal(loc,trk);
              lp[0]=trk[1];
@@ -1776,7 +1789,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
            //----------
            // bad Nstrip is crossing the Pside 1Dcluster -> create recpoint
            // 
-           if ( (TMath::Abs(xt)<hwSSD+0.01) && (TMath::Abs(zt)<hlSSD+0.01) ) {
+           if ( (TMath::Abs(xt)<hwSSD) && (TMath::Abs(zt)<hlSSD) ) {
              Double_t loc[3]={xt,0.,zt},trk[3]={0.,0.,0.};
              mT2L->MasterToLocal(loc,trk);
              lp[0]=trk[1];
@@ -1829,7 +1842,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
        else yP = yN - (7.6/1.9);
        seg->GetPadCxz(yP, yN, xt, zt); 
        
-       if ( (TMath::Abs(xt)<hwSSD+0.01) && (TMath::Abs(zt)<hlSSD+0.01) ) {
+       if ( (TMath::Abs(xt)<hwSSD) && (TMath::Abs(zt)<hlSSD) ) {
          Double_t loc[3]={xt,0.,zt},trk[3]={0.,0.,0.};
          mT2L->MasterToLocal(loc,trk);
          lp[0]=trk[1];
@@ -1878,7 +1891,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
        else yN = yP + (7.6/1.9);
        seg->GetPadCxz(yP, yN, xt, zt); 
        
-       if ( (TMath::Abs(xt)<hwSSD+0.01) && (TMath::Abs(zt)<hlSSD+0.01) ) {
+       if ( (TMath::Abs(xt)<hwSSD) && (TMath::Abs(zt)<hlSSD) ) {
          Double_t loc[3]={xt,0.,zt},trk[3]={0.,0.,0.};
          mT2L->MasterToLocal(loc,trk);
          lp[0]=trk[1];
@@ -1928,4 +1941,4 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
   delete [] cused2;
   delete [] positivepair;
 
-}
\ No newline at end of file
+}