2 Simple compiled macro for declaration of static distortion function
3 on top of the AliTPCDistortion class.
5 1. Use static function in the fitting procedure
6 2. Usage in TFormual, TF1, Tf2 ... for visualization.
7 3. Usage in tree->Draw() for visualization
8 4. Simple visualization of fit residuals in multidemension - using tree Draw functionality
13 gSystem->AddIncludePath("-I$ALICE_ROOT/TPC");
14 .L $ALICE_ROOT/TPC/CalibMacros/AliTPCDistortions.cxx+
15 .L $ALICE_ROOT/TPC/CalibMacros/AliTPCDistortionFun.C+
19 // Draw integrated distortion in local x
21 TF2 fdistIFCXvZX("fdistIFCXvZX","GetIFCDistortion(y,0,x,0)",-250,250,80,250);
22 fdistIFCXvZX.GetXaxis()->SetTitle("Z (cm)");
23 fdistIFCXvZX.GetYaxis()->SetTitle("local X (cm)");
24 fdistIFCXvZX->Draw("colz");
26 // Draw local distortion angle dx/dz in mrad
28 TF2 fangleIFCXvZX("fangleIFCXvZX","1000*(GetIFCDistortion(y,0,x,0)-GetIFCDistortion(y,0,x-1,0))*sign(x)",-250,250,85,120);
29 fangleIFCXvZX.SetNpx(200);
30 fangleIFCXvZX.SetNpy(200);
31 fangleIFCXvZX.GetXaxis()->SetTitle("Z (cm)");
32 fangleIFCXvZX.GetYaxis()->SetTitle("local X (cm)");
33 fangleIFCXvZX->Draw("colz");
38 #include "AliTPCDistortions.h"
41 Double_t GetIFCDistortion(Double_t lx, Double_t ly, Double_t lz, Int_t icoord, Double_t shift=1.){
43 static AliTPCDistortions transform;
44 Double_t xyzIn[3]={lx, ly, lz};
45 Double_t xyzOut[3]={lx, ly, lz};
46 transform.SetIFCShift(1);
48 if (lz<0) { dummyROC=36;}
49 transform.UndoIFCShiftDistortion(xyzIn,xyzOut,dummyROC);
51 if (icoord<3) result=xyzOut[icoord]-xyzIn[icoord];