]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSClusterFinderSDD.cxx
- AliITSInitGeometry.cxx (updated): fgkOldSSDcone changed from kTRUE to
[u/mrichter/AliRoot.git] / ITS / AliITSClusterFinderSDD.cxx
index de10ca30076d00db33114c88a6512b61ac870d7b..6f24cf540df756dbabfa8126442b4ba2f3cd2d1e 100644 (file)
@@ -108,7 +108,6 @@ void AliITSClusterFinderSDD::Find1DClusters(){
     Int_t dummy          = 0;
     Double_t fTimeStep    = GetSeg()->Dpx(dummy);
     Double_t fSddLength   = GetSeg()->Dx();
-    Double_t anodePitch   = GetSeg()->Dpz(dummy);
     AliITSCalibrationSDD* cal = (AliITSCalibrationSDD*)GetResp(fModule);
     AliITSresponseSDD* res  = (AliITSresponseSDD*)((AliITSCalibrationSDD*)GetResp(fModule))->GetResponse();
     const char *option=res->ZeroSuppOption();
@@ -223,9 +222,8 @@ void AliITSClusterFinderSDD::Find1DClusters(){
                             //ns
                         } // end if
                     } // end for its
-
-                    Double_t clusteranodePath = (clusterAnode - fNofAnodes/2)*
-                                                 anodePitch;
+                   Float_t theAnode=clusterAnode+j*fNofAnodes;
+                    Double_t clusteranodePath = GetSeg()->GetLocalZFromAnode(theAnode);
                    Double_t clusterDriftPath = (Double_t)cal->GetDriftPath(clusterTime,clusteranodePath);
                     clusterDriftPath = fSddLength-clusterDriftPath;
                     if(clusterCharge <= 0.) break;
@@ -261,7 +259,6 @@ void AliITSClusterFinderSDD::Find1DClustersE(){
     Int_t dummy=0;
     Double_t fTimeStep = GetSeg()->Dpx( dummy );
     Double_t fSddLength = GetSeg()->Dx();
-    Double_t anodePitch = GetSeg()->Dpz( dummy );
     AliITSCalibrationSDD* cal = (AliITSCalibrationSDD*)GetResp(fModule);
     Map()->ClearMap();
     Map()->SetThresholdArr( fCutAmplitude );
@@ -326,8 +323,8 @@ void AliITSClusterFinderSDD::Find1DClustersE(){
                             time /= (charge/fTimeStep);   // ns
                                 // time = lmax*fTimeStep;   // ns
                             if( time > fTimeCorr ) time -= fTimeCorr;   // ns
-                            Double_t anodePath =(anode-fNofAnodes/2)*anodePitch;
-                            
+                           Float_t theAnode=anode+j*fNofAnodes;
+                            Double_t anodePath =GetSeg()->GetLocalZFromAnode(theAnode);
                            Double_t driftPath = (Double_t)cal->GetDriftPath(time,anode);
                             driftPath = fSddLength-driftPath;
                             AliITSRawClusterSDD clust(j+1,anode,time,charge,
@@ -839,11 +836,14 @@ void AliITSClusterFinderSDD::ResolveClusters(){
                 }
                 clusterI.SetPeakPos( peakpos ); 
                Float_t dp = cal->GetDriftPath(newiTimef,newAnodef);
-               Double_t driftPath = fSddLength - (Double_t)dp;
-                Double_t sign = ( wing == 1 ) ? -1. : 1.;
-               Double_t xcoord = driftPath*sign * 0.0001;
-               Double_t zcoord = anodePath * 0.0001;
-               CorrectPosition(zcoord,xcoord);
+               Float_t driftPath = fSddLength - (Double_t)dp;
+                Float_t sign = ( wing == 1 ) ? -1. : 1.;
+               Float_t xcoord = driftPath*sign * 0.0001;
+               Float_t zcoord = anodePath * 0.0001;
+               Float_t corrx=0, corrz=0;
+               cal->GetCorrections(zcoord,xcoord,corrz,corrx,GetSeg());
+               xcoord+=corrx;
+               zcoord+=corrz;
                 clusterI.SetX( xcoord );        
                 clusterI.SetZ( zcoord );
                 clusterI.SetAnode( newAnodef );
@@ -1037,27 +1037,4 @@ void AliITSClusterFinderSDD::PrintStatus() const{
     cout << "**************************************************" << endl;
 }
 
-//_________________________________________________________________________
-void AliITSClusterFinderSDD::CorrectPosition(Double_t &z, Double_t&y){
-  //correction of coordinates using the maps stored in the DB
-
-  AliITSCalibrationSDD* cal = (AliITSCalibrationSDD*)GetResp(fModule);
-  static const Int_t nbint = cal->GetMapTimeNBin();
-  static const Int_t nbina = cal->Chips()*cal->Channels();
-  Float_t stepa = (GetSeg()->Dpz(0))/10000.; //anode pitch in cm
-  Float_t stept = (GetSeg()->Dx()/cal->GetMapTimeNBin()/2.)/10.;
 
-  Int_t bint = TMath::Abs((Int_t)(y/stept));
-  if(y>=0) bint+=(Int_t)(nbint/2.);
-  if(bint>nbint) AliError("Wrong bin number!");
-
-  Int_t bina = TMath::Abs((Int_t)(z/stepa));
-  if(z>=0) bina+=(Int_t)(nbina/2.);
-  if(bina>nbina) AliError("Wrong bin number!");
-
-  Double_t devz = (Double_t)cal->GetMapACell(bina,bint)/10000.;
-  Double_t devx = (Double_t)cal->GetMapTCell(bina,bint)/10000.;
-  z+=devz;
-  y+=devx;
-
-}