]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderV2SSD.cxx
Using AliDebug (Massimo)
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2SSD.cxx
index 873d0b8cbaf4c34fa24d3fc83588aa93bafadc8b..329f8f898730baac792dd3ad9d0eab3def73af35 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "AliITSClusterFinderV2SSD.h"
 #include "AliITSRecPoint.h"
+#include "AliITSgeomTGeo.h"
 #include "AliITSDetTypeRec.h"
 #include "AliRawReader.h"
 #include "AliITSRawStreamSSD.h"
 ClassImp(AliITSClusterFinderV2SSD)
 
 
-AliITSClusterFinderV2SSD::AliITSClusterFinderV2SSD(AliITSDetTypeRec* dettyp):AliITSClusterFinderV2(dettyp){
+AliITSClusterFinderV2SSD::AliITSClusterFinderV2SSD(AliITSDetTypeRec* dettyp):AliITSClusterFinderV2(dettyp),
+fLastSSD1(AliITSgeomTGeo::GetModuleIndex(6,1,1)-1),
+fYpitchSSD(0.0095),
+fHwSSD(3.65),
+fHlSSD(2.00),
+fTanP(0.0275),
+fTanN(0.0075){
 
   //Default constructor
 
-  fLastSSD1=fDetTypeRec->GetITSgeom()->GetModuleIndex(6,1,1)-1;
-  fYpitchSSD=0.0095;
-  fHwSSD=3.65;
-  fHlSSD=2.00;
-  fTanP=0.0275;
-  fTanN=0.0075;
-
-
-
 }
  
 
@@ -64,6 +62,8 @@ void AliITSClusterFinderV2SSD::FindClustersSSD(TClonesArray *alldigits) {
   TObjArray *digits = new TObjArray;
   for (Int_t i=0;i<smaxall; i++){
     AliITSdigitSSD *d=(AliITSdigitSSD*)alldigits->UncheckedAt(i);
+    Float_t q=d->GetSignal()/4.29;// temp. fix (for PID purposed - normalis. to be checked)
+    d->SetSignal(Int_t(q));
     if (d->GetSignal()<3) continue;
     digits->AddLast(d);
   }
@@ -229,7 +229,7 @@ void AliITSClusterFinderV2SSD::FindClustersSSD(AliITSRawStream* input,
   while (kTRUE) {
     Bool_t next = input->Next();
 
-    if(input->GetSignal()<3 && next) continue;
+    if(input->GetSignal()<(3*4.29) && next) continue;
     // check if a new cluster starts
     Int_t strip = input->GetCoord2();
     Int_t flag = input->GetCoord1();
@@ -284,8 +284,8 @@ void AliITSClusterFinderV2SSD::FindClustersSSD(AliITSRawStream* input,
     }
 
     // add digit to current cluster
-    q += input->GetSignal();
-    y += strip * input->GetSignal();
+    q += input->GetSignal()/4.29;
+    y += strip * input->GetSignal()/4.29;
     nDigits++;
     prevStrip = strip;
     prevFlag = flag;
@@ -318,6 +318,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
   Int_t cused2[3000];
   for (Int_t i=0;i<3000;i++) {cnegative[i]=0; cused1[i]=0;}
   for (Int_t i=0;i<3000;i++) {cpositive[i]=0; cused2[i]=0;}
+  for (Int_t i=0;i<30000;i++) {negativepair[i]=0; positivepair[i]=0;}
   static Short_t pairs[1000][1000];
   memset(pairs,0,sizeof(Short_t)*1000000);
 //   Short_t ** pairs = new Short_t*[1000];
@@ -410,7 +411,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
       Int_t info[3] = {pos[ip].GetNd(),neg[j].GetNd(),fNlayer[fModule]};
       AliITSRecPoint * cl2;
       if(clusters){
-       cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+       cl2 = new (cl[ncl]) AliITSRecPoint(milab,lp,info);
        cl2->SetChargeRatio(ratio);     
        cl2->SetType(1);
        pairs[ip][j]=1;
@@ -423,7 +424,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
        
       }
       else{
-       cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);      
+       cl2 = new AliITSRecPoint(milab,lp,info);        
        cl2->SetChargeRatio(ratio);     
        cl2->SetType(1);
        pairs[ip][j]=1;
@@ -479,7 +480,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
 
          AliITSRecPoint * cl2;
          if(clusters){
-           cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+           cl2 = new (cl[ncl]) AliITSRecPoint(milab,lp,info);
            cl2->SetChargeRatio(ratio);         
            cl2->SetType(5);
            pairs[ip][in] = 5;
@@ -489,7 +490,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
            }       
          }
          else{
-           cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+           cl2 = new AliITSRecPoint(milab,lp,info);
            cl2->SetChargeRatio(ratio);         
            cl2->SetType(5);
            pairs[ip][in] = 5;
@@ -534,7 +535,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
          
          AliITSRecPoint * cl2;
          if(clusters){
-           cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+           cl2 = new (cl[ncl]) AliITSRecPoint(milab,lp,info);
            cl2->SetChargeRatio(ratio);         
            cl2->SetType(5);
            pairs[ip2][in] =5;
@@ -544,7 +545,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
            }
          }
          else{
-           cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+           cl2 = new AliITSRecPoint(milab,lp,info);
            cl2->SetChargeRatio(ratio);         
            cl2->SetType(5);
            pairs[ip2][in] =5;
@@ -606,7 +607,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
 
          AliITSRecPoint * cl2;
          if(clusters){
-           cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+           cl2 = new (cl[ncl]) AliITSRecPoint(milab,lp,info);
            cl2->SetChargeRatio(ratio);         
            cl2->SetType(7);
            pairs[ip][jn] =7;
@@ -617,7 +618,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
 
          }
          else{
-           cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+           cl2 = new AliITSRecPoint(milab,lp,info);
            cl2->SetChargeRatio(ratio);         
            cl2->SetType(7);
            pairs[ip][jn] =7;
@@ -659,7 +660,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
          Int_t info[3] = {pos[ip].GetNd(),neg[jn2].GetNd(),fNlayer[fModule]};
          AliITSRecPoint * cl2;
          if(clusters){
-           cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+           cl2 = new (cl[ncl]) AliITSRecPoint(milab,lp,info);
            cl2->SetChargeRatio(ratio);         
            pairs[ip][jn2]=7;
            cl2->SetType(7);
@@ -670,7 +671,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
            
          }
          else{
-           cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+           cl2 = new AliITSRecPoint(milab,lp,info);
            cl2->SetChargeRatio(ratio);         
            pairs[ip][jn2]=7;
            cl2->SetType(7);
@@ -760,7 +761,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
       Int_t info[3] = {pos[ip].GetNd(),neg[j].GetNd(),fNlayer[fModule]};
       AliITSRecPoint * cl2;
       if(clusters){
-       cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+       cl2 = new (cl[ncl]) AliITSRecPoint(milab,lp,info);
        cl2->SetChargeRatio(ratio);     
        cl2->SetType(10);
        pairs[ip][j]=10;
@@ -772,7 +773,7 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
        cused2[j]++;      
       }
       else{
-       cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+       cl2 = new AliITSRecPoint(milab,lp,info);
        cl2->SetChargeRatio(ratio);     
        cl2->SetType(10);
        pairs[ip][j]=10;
@@ -827,12 +828,12 @@ FindClustersSSD(Ali1Dcluster* neg, Int_t nn,
        Int_t info[3] = {pos[i].GetNd(),neg[j].GetNd(),fNlayer[fModule]};
        AliITSRecPoint * cl2;
        if(clusters){
-         cl2 = new (cl[ncl]) AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+         cl2 = new (cl[ncl]) AliITSRecPoint(milab,lp,info);
          cl2->SetChargeRatio(ratio);
          cl2->SetType(100+cpositive[j]+cnegative[i]);    
        }
        else{
-         cl2 = new AliITSRecPoint(fModule,fDetTypeRec->GetITSgeom(),milab,lp,info);
+         cl2 = new AliITSRecPoint(milab,lp,info);
          cl2->SetChargeRatio(ratio);
          cl2->SetType(100+cpositive[j]+cnegative[i]);
          fDetTypeRec->AddRecPoint(*cl2);