]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding violation +
authormarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 Jun 2010 16:51:35 +0000 (16:51 +0000)
committermarian <marian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 9 Jun 2010 16:51:35 +0000 (16:51 +0000)
second oreder corrections in trasformation

(Marian, Stefan)

TPC/AliTPCExBEffective.cxx
TPC/AliTPCExBEffective.h

index 444e36eed186b36d19626e42405137a04b79b910..13b217bb0016354ffa4caaa959e926f910d1e81d 100644 (file)
@@ -127,10 +127,16 @@ void AliTPCExBEffective::GetCorrection(const Float_t x[],const Short_t roc,Float
 
   Double_t dr    =   fC0 * erez + fC1 * erphiez;
   Double_t drphi =  -fC1 * erez + fC0 * erphiez;
-  //
-  dx[0]= TMath::Cos(phi)*dr-TMath::Sin(phi)*drphi;
-  dx[1]= TMath::Sin(phi)*dr+TMath::Cos(phi)*drphi;
-  dx[2]= 0;
+  
+  // Calculate distorted position
+  if ( r > 0.0 ) {
+    r   =  r   + dr;
+    phi =  phi + drphi/r;
+  }
+  // Calculate correction in cartesian coordinates
+  dx[0] = r * TMath::Cos(phi) - x[0];
+  dx[1] = r * TMath::Sin(phi) - x[1];
+  dx[2] = 0.; // z distortion not implemented (1st order distortions)
 
 }
 
@@ -138,7 +144,7 @@ void AliTPCExBEffective::GetCorrection(const Float_t x[],const Short_t roc,Float
 
 Double_t AliTPCExBEffective::GetSum(const TMatrixD& mpol, const TMatrixD&mcoef, Double_t r, Double_t drift, Double_t phi, Int_t coord) const {
   //
-  //
+  // Summation of the polynomials
   //
   Int_t npols=mpol.GetNrows();
   Double_t sum=0;
index 3bef183cbf78627f8a2a810bc11330d94db4bd39..f9cee605cffe708ac027e295627437876034c40e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITPCEXBEFECTIVE_H
-#define ALITPCEXBEFECTIVE_H
+#ifndef ALITPCEXBEFFECTIVE_H
+#define ALITPCEXBEFFECTIVE_H
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
@@ -35,13 +35,15 @@ public:
 
 public:
   virtual void GetCorrection(const Float_t x[],const Short_t roc,Float_t dx[]);
-  Double_t fC0;                // wt - matrix elements   
-  Double_t fC1;                //
+
+private:
+  Double_t fC0;                // coefficient C0 (compare Jim Thomas's notes for definitions)
+  Double_t fC1;                // coefficient C1 (compare Jim Thomas's notes for definitions)
   TMatrixD *fPolynomA;         // correction polynoms A
   TMatrixD *fPolynomC;         // correction polynoms C
   TMatrixD *fPolynomValA;      // correction polynoms coefficient A
   TMatrixD *fPolynomValC;      //  correction polynoms coefficient C
-private:
+
   AliTPCExBEffective(const AliTPCExBEffective&);
   AliTPCExBEffective &operator=(const AliTPCExBEffective&);
   ClassDef(AliTPCExBEffective,1);