]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderV2SSD.cxx
hopefully the last refinements for correct type conversion in calibration
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderV2SSD.cxx
index beb343d68bffcdd9dfc94b45481f49bc3ea1b2a6..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;
@@ -411,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;
@@ -424,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;
@@ -480,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;
@@ -490,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;
@@ -535,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;
@@ -545,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;
@@ -607,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;
@@ -618,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;
@@ -660,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);
@@ -671,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);
@@ -761,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;
@@ -773,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;
@@ -828,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);