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)
}
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;
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();
+ }
+
+
+}