X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=TPC%2FAliTPCExBEffective.cxx;h=13b217bb0016354ffa4caaa959e926f910d1e81d;hb=09b7c66c44fa0408b63ce64b815019a0c98752b3;hp=016cdbe54254ef4b8eb312dfa6646052b7f5e3f7;hpb=602803b6ee66d3da71c3a1376bc3f415f5beb228;p=u%2Fmrichter%2FAliRoot.git diff --git a/TPC/AliTPCExBEffective.cxx b/TPC/AliTPCExBEffective.cxx index 016cdbe5425..13b217bb001 100644 --- a/TPC/AliTPCExBEffective.cxx +++ b/TPC/AliTPCExBEffective.cxx @@ -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; @@ -176,3 +182,24 @@ void AliTPCExBEffective::SetCoeficients(const TMatrixD *valA,const TMatrixD *val fPolynomValC = new TMatrixD(*valC); } + + + +void AliTPCExBEffective::Print(const Option_t* option) const { + // + // Print function to check the settings (e.g. the twist in the X direction) + // option=="a" prints the C0 and C1 coefficents for calibration purposes + // + + TString opt = option; opt.ToLower(); + printf("%s\t%s\n",GetName(),GetTitle()); + + if (opt.Contains("a")) { // Print all details + printf(" - T1: %1.4f, T2: %1.4f \n",fT1,fT2); + printf(" - C0: %1.4f, C1: %1.4f \n",fC0,fC1); + fPolynomValA->Print(); + fPolynomValC->Print(); + } + + +}