]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderSSD.cxx
Removed all functions responsible for multiple cathode handling.
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderSSD.cxx
index 8c9cedbb1d289c27427b5795c555f2e8ba8478b5..682a921ee96f4bda7bf985c101584884062de58b 100644 (file)
@@ -33,6 +33,7 @@ Automatic combination routines improved (traps)
 */
 
 #include <iostream.h>
+#include <TArrayI.h>
 
 
 #include "AliRun.h"
@@ -60,13 +61,12 @@ ClassImp(AliITSClusterFinderSSD)
 //                                     
 
 
-AliITSClusterFinderSSD::AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits, TClonesArray *recp)   
+AliITSClusterFinderSSD::AliITSClusterFinderSSD(AliITSsegmentation *seg, TClonesArray *digits)   
 {
 //Standard constructor
 
     fSegmentation=seg;
     fDigits=digits;
-    fRecPoints=recp;
     
     fMap = new AliITSMapA1(fSegmentation,fDigits);  
   
@@ -194,11 +194,11 @@ void AliITSClusterFinderSSD::FindNeighbouringDigits()
    Int_t currentstripNo;
    Int_t *dbuffer = new Int_t [300];   //buffer for strip numbers
    Int_t dnumber;    //curent number of digits in buffer
-   TArrayI &lDigitsIndexP = *fDigitsIndexP;
-   TArrayI &lDigitsIndexN = *fDigitsIndexN;
-   TObjArray &lDigits=*fDigits;
-   TClonesArray &lClusterP = *fClusterP;
-   TClonesArray &lClusterN = *fClusterN;
+   TArrayI      &lDigitsIndexP = *fDigitsIndexP;
+   TArrayI      &lDigitsIndexN = *fDigitsIndexN;
+   TObjArray    &lDigits       = *(Digits());
+   TClonesArray &lClusterP     = *fClusterP;
+   TClonesArray &lClusterN     = *fClusterN;
   
    //process P side 
    dnumber = 1;
@@ -213,12 +213,12 @@ void AliITSClusterFinderSSD::FindNeighbouringDigits()
            ==  (currentstripNo-1) ) dbuffer[dnumber++]=lDigitsIndexP[i];
      else  { 
        //create a new one side cluster
-       new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,fDigits,fgkSIDEP); 
+       new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,Digits(),fgkSIDEP); 
        dbuffer[0]=lDigitsIndexP[i];
        dnumber = 1;
      }
    } // end loop over fNDigitsP
-   new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,fDigits,fgkSIDEP);
+   new(lClusterP[fNClusterP++]) AliITSclusterSSD(dnumber,dbuffer,Digits(),fgkSIDEP);
 
 
    //process N side 
@@ -232,12 +232,12 @@ void AliITSClusterFinderSSD::FindNeighbouringDigits()
      if ( (((AliITSdigitSSD*)lDigits[lDigitsIndexN[i-1]])->GetStripNumber()) 
            == (currentstripNo-1) ) dbuffer[dnumber++]=lDigitsIndexN[i];
      else {
-       new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,fDigits,fgkSIDEN);
+       new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,Digits(),fgkSIDEN);
        dbuffer[0]=lDigitsIndexN[i];
        dnumber = 1;
      }
    } // end loop over fNDigitsN
-   new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,fDigits,fgkSIDEN);
+   new(lClusterN[fNClusterN++]) AliITSclusterSSD(dnumber,dbuffer,Digits(),fgkSIDEN);
    delete [] dbuffer; 
  
  } // end condition on  NDigits 
@@ -337,7 +337,7 @@ void AliITSClusterFinderSSD::SplitCluster(TArrayI *list, Int_t nsplits, Int_t in
      curentcluster =((AliITSclusterSSD*)((*fClusterP)[index])) ;
      for (i = nsplits; i>0 ;i--) {  
          NN=curentcluster->SplitCluster((*list)[(i-1)],tmpdigits);
-         new ((*fClusterP)[fNClusterP]) AliITSclusterSSD(NN,tmpdigits,fDigits,side);
+         new ((*fClusterP)[fNClusterP]) AliITSclusterSSD(NN,tmpdigits,Digits(),side);
         ( (AliITSclusterSSD*)((*fClusterP)[fNClusterP]) )->
                                                       SetLeftNeighbour(kTRUE);
          //if left cluster had neighbour on the right before split 
@@ -352,7 +352,7 @@ void AliITSClusterFinderSSD::SplitCluster(TArrayI *list, Int_t nsplits, Int_t in
      curentcluster =((AliITSclusterSSD*)((*fClusterN)[index]));
      for (i = nsplits; i>0 ;i--) {  
          NN=curentcluster->SplitCluster((*list)[(i-1)],tmpdigits);
-        new ((*fClusterN)[fNClusterN]) AliITSclusterSSD(NN,tmpdigits,fDigits,side);
+        new ((*fClusterN)[fNClusterN]) AliITSclusterSSD(NN,tmpdigits,Digits(),side);
         ((AliITSclusterSSD*)((*fClusterN)[fNClusterN]))->
                                                     SetRightNeighbour(kTRUE);
         if (curentcluster->GetRightNeighbour())
@@ -383,8 +383,8 @@ Int_t AliITSClusterFinderSSD::SortDigitsP(Int_t start, Int_t end)
     }
   else
    { 
-    left =  ((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndexP)[start]]))->GetStripNumber();
-    right= ((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndexP)[end]]))->GetStripNumber();  
+    left =  ((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexP)[start]]))->GetStripNumber();
+    right= ((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexP)[end]]))->GetStripNumber();  
     if( left > right )
      {
        Int_t tmp = (*fDigitsIndexP)[start];
@@ -413,8 +413,8 @@ Int_t AliITSClusterFinderSSD::SortDigitsN(Int_t start, Int_t end)
     }
   else 
    {
-    left =((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndexN)[start]]))->GetStripNumber(); 
-    right=((AliITSdigitSSD*)((*fDigits)[(*fDigitsIndexN)[end]]))->GetStripNumber();
+    left =((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexN)[start]]))->GetStripNumber(); 
+    right=((AliITSdigitSSD*)((*(Digits()))[(*fDigitsIndexN)[end]]))->GetStripNumber();
     if ( left > right )
       {
         Int_t tmp = (*fDigitsIndexN)[start];
@@ -446,7 +446,7 @@ void AliITSClusterFinderSSD::FillDigitsIndex()
  AliITSdigitSSD *dig; 
  
  for ( i = 0 ; i< N; i++ ) {
-      dig=(AliITSdigitSSD*)fDigits->UncheckedAt(i);
+      dig = (AliITSdigitSSD*)GetDigit(i);
       if(dig->IsSideP()) { 
            bit=1;
            tmp=dig->GetStripNumber();
@@ -1497,6 +1497,7 @@ CreateNewRecPoint(Float_t P, Float_t dP, Float_t N, Float_t dN,
 {
 // create the recpoints
 
+
   const Float_t kdEdXtoQ = 2.778e+8;
   const Float_t kconv = 1.0e-4; 
   const Float_t kRMSx = 20.0*kconv; // microns->cm ITS TDR Table 1.3
@@ -1539,7 +1540,7 @@ CreateNewRecPoint(Float_t P, Float_t dP, Float_t N, Float_t dN,
      fSegmentation->GetPadIxz(P,N,stripP,stripN);
      digP = (AliITSdigitSSD*)fMap->GetHit(1,stripP);
      digN = (AliITSdigitSSD*)fMap->GetHit(0,stripN);
-     printf("SSD: digP digN %p %p\n",digP,digN);
+     //printf("SSD: digP digN %p %p\n",digP,digN);
      if(digP) sigP = digP->fSignal;
      else sigP=0;
      if(digN) sigN = digN->fSignal;
@@ -1842,6 +1843,8 @@ void AliITSClusterFinderSSD::ReconstructNotConsumedClusters()
 {
 // reconstruct remaining non-crossing clusters
 
+  //printf("ReconstructNotConsumedClusters !!!\n");
+
   Int_t i;
   AliITSclusterSSD *cluster;
   Float_t pos;
@@ -1880,6 +1883,7 @@ void AliITSClusterFinderSSD::ReconstructNotConsumedClusters()
               GetCrossing (x2,z2);
              fSegmentation->GetPadIxz((x1+x2)/2,(z1+z2)/2,stripP,stripN);
              dig = (AliITSdigitSSD*)fMap->GetHit(1,stripP);
+             //printf("dig %p\n",dig);
              if (!dig) printf("SSD: check the digit!  dig %p\n",dig);
              if(!dig) continue;
              AliITSRawClusterSSD cnew;
@@ -1899,6 +1903,7 @@ void AliITSClusterFinderSSD::ReconstructNotConsumedClusters()
              */
              cnew.fQErr=sigerr;
              //cnew.fProbability=0.75; 
+             //printf("AddCluster: %p nstripsP %d\n",&cnew,nstripsP);
              fITS->AddCluster(2,&cnew);
              // add the rec point info
              AliITSRecPoint rnew;