]>
Commit | Line | Data |
---|---|---|
15b17c89 | 1 | void |
2 | res(Char_t i) | |
3 | { | |
4 | Double_t pitch = (i == 'I' ? 0.025 : 0.048); | |
5 | Double_t open = (i == 'I' ? 18.0 : 9.0 ) / 180 * TMath::Pi(); | |
6 | Double_t rmin = (i == 'I' ? 4.3 : 15.6 ); | |
7 | Double_t rmax = (i == 'I' ? 17.2 : 28.0 ); | |
8 | Double_t phimin = 0; | |
9 | Double_t phimax = 2 * TMath::Pi(); | |
10 | TF2* xres = new TF2("xres", "sqrt(pow(cos(x),2)*[0]+y*y*pow(sin(x),2)*[1])", | |
11 | phimin,phimax,rmin,rmax); | |
12 | TF2* yres = new TF2("yres", "sqrt(pow(sin(x),2)*[0]+y*y*pow(cos(x),2)*[1])", | |
13 | phimin,phimax,rmin,rmax); | |
14 | xres->SetParameters(pitch*pitch, open*open); | |
15 | yres->SetParameters(pitch*pitch, open*open); | |
16 | xres->GetHistogram()->SetXTitle("#phi [radians]"); | |
17 | xres->GetHistogram()->SetYTitle("r [cm]"); | |
18 | xres->GetHistogram()->SetZTitle("#delta x [cm]"); | |
19 | yres->GetHistogram()->SetXTitle("#phi [radians]"); | |
20 | yres->GetHistogram()->SetYTitle("r [cm]"); | |
21 | yres->GetHistogram()->SetZTitle("#delta y [cm]"); | |
22 | xres->SetLineColor(i == 'I' ? 2 : 6); | |
23 | yres->SetLineColor(i == 'I' ? 3 : 7); | |
24 | gStyle->SetOptTitle(0); | |
25 | gStyle->SetOptStat(0); | |
26 | xres->Draw("surf"); | |
27 | yres->Draw("same surf"); | |
28 | ||
29 | TLegend* l = new TLegend(.7,.8,.95,.95, i == 'I' ? "Inner" : "Outer"); | |
30 | l->SetBorderSize(0); | |
31 | l->AddEntry(xres, "#delta x", "l"); | |
32 | l->AddEntry(yres, "#delta y", "l"); | |
33 | l->Draw(); | |
34 | } | |
35 |