2 char *storage = "local://OCDBres"
4 AliCDBManager::Instance()->SetDefaultStorage(storage);
5 AliCDBManager::Instance()->SetRun(RunNumber)
6 AliTPCExBFirst * exb = AliTPCcalibDB::Instance()->GetExB();
8 // See example macro $ALICE_ROOT/TPC/macros/AliTPCExBdraw.C
10 .L $ALICE_ROOT/TPC/macros/AliTPCExBdraw.C
15 void Draw(Double_t theta,Float_t magf=5){
17 // Draw "primary track distortion"
20 TF1 *fdrfi_rpi0=new TF1("fdrfi_rpi0",Form("AliTPCExB::GetDrphi(x,0*pi/2,%f*x)",theta),20,250);
21 TF1 *fdrfi_rpi1=new TF1("fdrfi_rpi1",Form("AliTPCExB::GetDrphi(x,1*pi/2,%f*x)",theta),20,250);
22 TF1 *fdrfi_rpi2=new TF1("fdrfi_rpi2",Form("AliTPCExB::GetDrphi(x,2*pi/2,%f*x)",theta),20,250);
23 TF1 *fdrfi_rpi3=new TF1("fdrfi_rpi3",Form("AliTPCExB::GetDrphi(x,3*pi/2,%f*x)",theta),20,250);
25 fdrfi_rpi0->GetXaxis()->SetTitle("r (cm)");
26 fdrfi_rpi0->GetYaxis()->SetTitle("drd#phi (cm)");
28 fdrfi_rpi0->SetLineColor(2);
29 fdrfi_rpi1->SetLineColor(3);
30 fdrfi_rpi2->SetLineColor(4);
31 fdrfi_rpi3->SetLineColor(5);
36 Float_t conv= 1/(magf*0.299792458e-3);
37 fdrfi_rpi0->GetHistogram()->Fit("pol2","same","",90,250);
38 sprintf(leg0,"#phi=0*#pi/2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV",
39 10*pol2->GetParameter(0),1000*pol2->GetParameter(1), conv*pol2->GetParameter(2));
40 fdrfi_rpi1->GetHistogram()->Fit("pol2","same","",90,250);
41 sprintf(leg1,"#phi=1*#pi/2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV",
42 10*pol2->GetParameter(0),1000*pol2->GetParameter(1),conv*pol2->GetParameter(2));
43 fdrfi_rpi2->GetHistogram()->Fit("pol2","same","",90,250);
44 sprintf(leg2,"#phi=2*#pi/2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV",
45 10*pol2->GetParameter(0),1000*pol2->GetParameter(1),conv*pol2->GetParameter(2));
46 fdrfi_rpi3->GetHistogram()->Fit("pol2","same","",90,250);
47 sprintf(leg3,"#phi=3*#pi/2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV",
48 10*pol2->GetParameter(0),1000*pol2->GetParameter(1),conv*pol2->GetParameter(2));
49 fdrfi_rpi0->SetMaximum(fdrfi_rpi0->GetMaximum()*2.0);
51 fdrfi_rpi1->Draw("same");
52 fdrfi_rpi2->Draw("same");
53 fdrfi_rpi3->Draw("same");
55 TLegend *legend = new TLegend(0.10,0.50,0.8,0.90, Form("ExB distortion alog track (tan(#theta)=%f)",theta));
56 legend->AddEntry(fdrfi_rpi0, leg0, "l");
57 legend->AddEntry(fdrfi_rpi1, leg1, "l");
58 legend->AddEntry(fdrfi_rpi2, leg2, "l");
59 legend->AddEntry(fdrfi_rpi3, leg3, "l");