o add calculation of residuals in the track fit
[u/mrichter/AliRoot.git] / TPC / Upgrade / macros / createSCprecal.C
1 void createSCprecal(TString input, Int_t gas=1)
2 {
3   AliTPCSpaceCharge3D *spaceCharge = new AliTPCSpaceCharge3D;
4   spaceCharge->SetSCDataFileName(input.Data());
5   
6   const Int_t nOmegaTau = 5;
7   Double_t omegaTau[nOmegaTau] = {0.34, 0.32, 0.43, 1.77, 1.84};
8   Double_t T1[nOmegaTau]       = {1.00, 1.00, 0.99, 0.41, 0.41};
9   Double_t T2[nOmegaTau]       = {1.01, 0.99, 1.03, 0.70, 0.70};
10   
11   TString tGas[nOmegaTau] = {"NeCO2","NeCO2_2","ArCO2","NeCF4","NeCF4_2"}; // CF4 is the same as CO2 here, but different omegaTau
12   TString sGas[nOmegaTau] = {"Ne-CO_{2} (90-10)","Ne-CO_{2}-N_{2} (90-10-5)","Ar-CO_{2} (90-10)","Ne-CF_{4} (90-10)","Ne-CF_{4} (80-20)"};
13
14   spaceCharge->SetOmegaTauT1T2(omegaTau[gas], T1[gas] , T2[gas]);
15   spaceCharge->InitSpaceCharge3DDistortion();
16
17   TString outName=input;
18   outName.ReplaceAll(".root","_precal.root");
19
20   TFile fout(outName,"recreate");
21   spaceCharge->Write("map");
22   fout.Write();
23   fout.Close();
24
25   delete spaceCharge;
26 }