AliRoot Core  edcc906 (edcc906)
AliTPCExBdraw.C
Go to the documentation of this file.
1 
15 void DrawPrim(Double_t theta,Float_t magf=5){
19 
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);
24 
25  fdrfi_rpi0->GetXaxis()->SetTitle("r (cm)");
26  fdrfi_rpi0->GetYaxis()->SetTitle("drd#phi (cm)");
27 
28  fdrfi_rpi0->SetLineColor(2);
29  fdrfi_rpi1->SetLineColor(3);
30  fdrfi_rpi2->SetLineColor(4);
31  fdrfi_rpi3->SetLineColor(5);
32  char leg0[1000];
33  char leg1[1000];
34  char leg2[1000];
35  char leg3[1000];
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);
50  fdrfi_rpi0->Draw();
51  fdrfi_rpi1->Draw("same");
52  fdrfi_rpi2->Draw("same");
53  fdrfi_rpi3->Draw("same");
54 
55  TLegend *legend = new TLegend(0.10,0.50,0.8,0.90, Form("ExB distortion along 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");
60  legend->Draw();
61 }
62 
63 
64 
65 void DrawLaser(Double_t fipi2,Float_t magf=5){
69 
70  TF2 *fdistout = new TF1("fdistout","[0]+[1]*(x-250)+[2]*(x-250)*(x-250)",90,250);
71 
72  TF1 *fdrfi_rpi0=new TF1("fdrfi_rpi0",Form("AliTPCExB::GetDrphi(x,%f*pi/2,250-20)",fipi2),20,250);
73  TF1 *fdrfi_rpi1=new TF1("fdrfi_rpi1",Form("AliTPCExB::GetDrphi(x,%f*pi/2,250-90)",fipi2),20,250);
74  TF1 *fdrfi_rpi2=new TF1("fdrfi_rpi2",Form("AliTPCExB::GetDrphi(x,%f*pi/2,250-160)",fipi2),20,250);
75  TF1 *fdrfi_rpi3=new TF1("fdrfi_rpi3",Form("AliTPCExB::GetDrphi(x,%f*pi/2,250-230)",fipi2),20,250);
76 
77  fdrfi_rpi0->GetXaxis()->SetTitle("r (cm)");
78  fdrfi_rpi0->GetYaxis()->SetTitle("drd#phi (cm)");
79 
80  fdrfi_rpi0->SetLineColor(2);
81  fdrfi_rpi1->SetLineColor(3);
82  fdrfi_rpi2->SetLineColor(4);
83  fdrfi_rpi3->SetLineColor(5);
84  char leg0[1000];
85  char leg1[1000];
86  char leg2[1000];
87  char leg3[1000];
88  Float_t conv= 1/(magf*0.299792458e-3);
89  fdrfi_rpi0->GetHistogram()->Fit("fdistout","same","",90,250);
90  sprintf(leg0,"laser 0 Track res: dy=%.2f mm d#phi=%.2f mrad dC = %.6f 1/GeV",
91  10*fdistout->GetParameter(0),1000*fdistout->GetParameter(1), conv*fdistout->GetParameter(2));
92  fdrfi_rpi1->GetHistogram()->Fit("fdistout","same","",90,250);
93  sprintf(leg1,"laser 1 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_rpi2->GetHistogram()->Fit("fdistout","same","",90,250);
96  sprintf(leg2,"laser 2 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_rpi3->GetHistogram()->Fit("fdistout","same","",90,250);
99  sprintf(leg3,"laser 3 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_rpi0->SetMaximum(fdrfi_rpi3->GetMaximum()*2.0);
102  fdrfi_rpi0->Draw();
103  fdrfi_rpi1->Draw("same");
104  fdrfi_rpi2->Draw("same");
105  fdrfi_rpi3->Draw("same");
106 
107  TLegend *legend = new TLegend(0.10,0.50,0.8,0.90, Form("ExB distortion along track (fi=%f*#pi/2))",fipi2));
108  legend->AddEntry(fdrfi_rpi0, leg0, "l");
109  legend->AddEntry(fdrfi_rpi1, leg1, "l");
110  legend->AddEntry(fdrfi_rpi2, leg2, "l");
111  legend->AddEntry(fdrfi_rpi3, leg3, "l");
112  legend->Draw();
113 }
114 
115 
116 
117 void DrawDpt(Float_t d1pt, Float_t ptmin, Float_t ptmax){
119 
120 }
void DrawPrim(Double_t theta, Float_t magf=5)
Definition: AliTPCExBdraw.C:15
void DrawLaser(Double_t fipi2, Float_t magf=5)
Definition: AliTPCExBdraw.C:65
void DrawDpt(Float_t d1pt, Float_t ptmin, Float_t ptmax)