]>
Commit | Line | Data |
---|---|---|
16227f18 | 1 | /* |
2 | char *storage = "local://OCDBres" | |
3 | Int_t RunNumber=0; | |
4 | AliCDBManager::Instance()->SetDefaultStorage(storage); | |
5 | AliCDBManager::Instance()->SetRun(RunNumber) | |
6 | AliTPCExBFirst * exb = AliTPCcalibDB::Instance()->GetExB(); | |
7 | // | |
8 | // See example macro $ALICE_ROOT/TPC/macros/AliTPCExBdraw.C | |
9 | // | |
10 | .L $ALICE_ROOT/TPC/macros/AliTPCExBdraw.C | |
c89a7b12 | 11 | DrawPrim(0) |
12 | DrawLaser(0) | |
16227f18 | 13 | */ |
d3edc775 | 14 | |
16227f18 | 15 | |
c89a7b12 | 16 | void DrawPrim(Double_t theta,Float_t magf=5){ |
d3edc775 | 17 | // |
18 | // Draw "primary track distortion" | |
19 | // | |
20 | //Double_t theta=0.5; | |
c89a7b12 | 21 | |
d3edc775 | 22 | TF1 *fdrfi_rpi0=new TF1("fdrfi_rpi0",Form("AliTPCExB::GetDrphi(x,0*pi/2,%f*x)",theta),20,250); |
23 | TF1 *fdrfi_rpi1=new TF1("fdrfi_rpi1",Form("AliTPCExB::GetDrphi(x,1*pi/2,%f*x)",theta),20,250); | |
24 | TF1 *fdrfi_rpi2=new TF1("fdrfi_rpi2",Form("AliTPCExB::GetDrphi(x,2*pi/2,%f*x)",theta),20,250); | |
25 | TF1 *fdrfi_rpi3=new TF1("fdrfi_rpi3",Form("AliTPCExB::GetDrphi(x,3*pi/2,%f*x)",theta),20,250); | |
26 | ||
27 | fdrfi_rpi0->GetXaxis()->SetTitle("r (cm)"); | |
28 | fdrfi_rpi0->GetYaxis()->SetTitle("drd#phi (cm)"); | |
29 | ||
30 | fdrfi_rpi0->SetLineColor(2); | |
31 | fdrfi_rpi1->SetLineColor(3); | |
32 | fdrfi_rpi2->SetLineColor(4); | |
33 | fdrfi_rpi3->SetLineColor(5); | |
16227f18 | 34 | char leg0[1000]; |
35 | char leg1[1000]; | |
36 | char leg2[1000]; | |
37 | char leg3[1000]; | |
38 | Float_t conv= 1/(magf*0.299792458e-3); | |
39 | fdrfi_rpi0->GetHistogram()->Fit("pol2","same","",90,250); | |
40 | sprintf(leg0,"#phi=0*#pi/2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV", | |
41 | 10*pol2->GetParameter(0),1000*pol2->GetParameter(1), conv*pol2->GetParameter(2)); | |
42 | fdrfi_rpi1->GetHistogram()->Fit("pol2","same","",90,250); | |
43 | sprintf(leg1,"#phi=1*#pi/2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV", | |
44 | 10*pol2->GetParameter(0),1000*pol2->GetParameter(1),conv*pol2->GetParameter(2)); | |
45 | fdrfi_rpi2->GetHistogram()->Fit("pol2","same","",90,250); | |
46 | sprintf(leg2,"#phi=2*#pi/2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV", | |
47 | 10*pol2->GetParameter(0),1000*pol2->GetParameter(1),conv*pol2->GetParameter(2)); | |
48 | fdrfi_rpi3->GetHistogram()->Fit("pol2","same","",90,250); | |
49 | sprintf(leg3,"#phi=3*#pi/2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV", | |
50 | 10*pol2->GetParameter(0),1000*pol2->GetParameter(1),conv*pol2->GetParameter(2)); | |
51 | fdrfi_rpi0->SetMaximum(fdrfi_rpi0->GetMaximum()*2.0); | |
d3edc775 | 52 | fdrfi_rpi0->Draw(); |
53 | fdrfi_rpi1->Draw("same"); | |
54 | fdrfi_rpi2->Draw("same"); | |
55 | fdrfi_rpi3->Draw("same"); | |
56 | ||
c89a7b12 | 57 | TLegend *legend = new TLegend(0.10,0.50,0.8,0.90, Form("ExB distortion along track (tan(#theta)=%f)",theta)); |
16227f18 | 58 | legend->AddEntry(fdrfi_rpi0, leg0, "l"); |
59 | legend->AddEntry(fdrfi_rpi1, leg1, "l"); | |
60 | legend->AddEntry(fdrfi_rpi2, leg2, "l"); | |
61 | legend->AddEntry(fdrfi_rpi3, leg3, "l"); | |
d3edc775 | 62 | legend->Draw(); |
63 | } | |
c89a7b12 | 64 | |
65 | ||
66 | ||
67 | void DrawLaser(Double_t fipi2,Float_t magf=5){ | |
68 | // | |
69 | // Draw "primary track distortion" | |
70 | // | |
71 | //Double_t fipi2=0.5; | |
72 | ||
73 | TF2 *fdistout = new TF1("fdistout","[0]+[1]*(x-250)+[2]*(x-250)*(x-250)",90,250); | |
74 | ||
75 | TF1 *fdrfi_rpi0=new TF1("fdrfi_rpi0",Form("AliTPCExB::GetDrphi(x,%f*pi/2,250-20)",fipi2),20,250); | |
76 | TF1 *fdrfi_rpi1=new TF1("fdrfi_rpi1",Form("AliTPCExB::GetDrphi(x,%f*pi/2,250-90)",fipi2),20,250); | |
77 | TF1 *fdrfi_rpi2=new TF1("fdrfi_rpi2",Form("AliTPCExB::GetDrphi(x,%f*pi/2,250-160)",fipi2),20,250); | |
78 | TF1 *fdrfi_rpi3=new TF1("fdrfi_rpi3",Form("AliTPCExB::GetDrphi(x,%f*pi/2,250-230)",fipi2),20,250); | |
79 | ||
80 | fdrfi_rpi0->GetXaxis()->SetTitle("r (cm)"); | |
81 | fdrfi_rpi0->GetYaxis()->SetTitle("drd#phi (cm)"); | |
82 | ||
83 | fdrfi_rpi0->SetLineColor(2); | |
84 | fdrfi_rpi1->SetLineColor(3); | |
85 | fdrfi_rpi2->SetLineColor(4); | |
86 | fdrfi_rpi3->SetLineColor(5); | |
87 | char leg0[1000]; | |
88 | char leg1[1000]; | |
89 | char leg2[1000]; | |
90 | char leg3[1000]; | |
91 | Float_t conv= 1/(magf*0.299792458e-3); | |
92 | fdrfi_rpi0->GetHistogram()->Fit("fdistout","same","",90,250); | |
93 | sprintf(leg0,"laser 0 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV", | |
94 | 10*fdistout->GetParameter(0),1000*fdistout->GetParameter(1), conv*fdistout->GetParameter(2)); | |
95 | fdrfi_rpi1->GetHistogram()->Fit("fdistout","same","",90,250); | |
96 | sprintf(leg1,"laser 1 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV", | |
97 | 10*fdistout->GetParameter(0),1000*fdistout->GetParameter(1),conv*fdistout->GetParameter(2)); | |
98 | fdrfi_rpi2->GetHistogram()->Fit("fdistout","same","",90,250); | |
99 | sprintf(leg2,"laser 2 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV", | |
100 | 10*fdistout->GetParameter(0),1000*fdistout->GetParameter(1),conv*fdistout->GetParameter(2)); | |
101 | fdrfi_rpi3->GetHistogram()->Fit("fdistout","same","",90,250); | |
102 | sprintf(leg3,"laser 3 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV", | |
103 | 10*fdistout->GetParameter(0),1000*fdistout->GetParameter(1),conv*fdistout->GetParameter(2)); | |
104 | fdrfi_rpi0->SetMaximum(fdrfi_rpi3->GetMaximum()*2.0); | |
105 | fdrfi_rpi0->Draw(); | |
106 | fdrfi_rpi1->Draw("same"); | |
107 | fdrfi_rpi2->Draw("same"); | |
108 | fdrfi_rpi3->Draw("same"); | |
109 | ||
110 | TLegend *legend = new TLegend(0.10,0.50,0.8,0.90, Form("ExB distortion along track (fi=%f*#pi/2))",fipi2)); | |
111 | legend->AddEntry(fdrfi_rpi0, leg0, "l"); | |
112 | legend->AddEntry(fdrfi_rpi1, leg1, "l"); | |
113 | legend->AddEntry(fdrfi_rpi2, leg2, "l"); | |
114 | legend->AddEntry(fdrfi_rpi3, leg3, "l"); | |
115 | legend->Draw(); | |
116 | } | |
117 | ||
118 | ||
119 | ||
120 | void DrawDpt(Float_t d1pt, Float_t ptmin, Float_t ptmax){ | |
121 | // | |
122 | // | |
123 | // | |
124 | ||
125 | } |