29 float calc_min(
float b1,
float b2)
36 TCanvas *c1 =
new TCanvas(
"c1",
"ps",200,10,700,500);
37 TStyle *plain =
new TStyle(
"Plain",
"Plain Style (no colors/fill areas)");
38 plain->SetTitleOffset(1.25);
39 plain->SetCanvasBorderMode(0);
40 plain->SetPadBorderMode(0);
41 plain->SetPadColor(0);
42 plain->SetCanvasColor(0);
43 plain->SetTitleColor(0);
44 plain->SetStatColor(0);
46 plain->SetOptStat(0000000);
47 plain->SetOptFit(00000000);
49 TH2F *hr =
new TH2F(
"hr",
"",10,-0.5,0.5,10,0.0,0.1);
50 hr->SetTitle(
"#sigma_{res} vs. #Delta Argon");
51 hr->GetYaxis()->SetTitleOffset(1.2);
52 hr->GetYaxis()->SetTitle(
"#sigma_{res}");
53 hr->GetXaxis()->SetTitleOffset(1.2);
54 hr->GetXaxis()->SetTitle(
"#Delta Argon");
59 FILE *file1=fopen (
"res.log",
"r");
64 float resx[nhits],resy[nhits],resrad[nhits],resphi[nhits], t0[nhits], gas[nhits];
66 float gas_temp, t0_temp, T, c2,rad, err, resphi_temp, resrad_temp;
72 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0_temp,&gas_temp,&T,&resx,&c2);
73 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0_temp,&gas_temp,&T,&resy,&c2);
74 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0_temp,&gas_temp,&T,&resrad_temp,&c2);
75 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0_temp,&gas_temp,&T,&resphi_temp,&c2);
76 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0_temp,&gas_temp,&T,&rad,&err);
77 datab1 = fscanf(file1,
"%f %f %f %f",&t0_temp,&gas_temp,&T,&rad);
78 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0_temp,&gas_temp,&T,&rad,&err);
79 datab1 = fscanf(file1,
"%f %f %f %f",&t0_temp,&gas_temp,&T,&rad);
80 datab1 = fscanf(file1,
"%f %f %f %f %f",&t0_temp,&gas_temp,&T,&rad,&err);
81 datab1 = fscanf(file1,
"%f %f %f %f",&t0_temp,&gas_temp,&T,&rad);
88 resphi[ihits]=resphi_temp;
89 resrad[ihits]=resrad_temp;
90 cout<<ihits<<
" t0["<<ihits<<
"] = "<<t0_temp<<
" gas["<<ihits<<
"] = "<<gas_temp<<
" resphi["<<ihits<<
"] = "<<resphi_temp<<
" resrad["<<ihits<<
"] = "<<resrad_temp<<endl;
95 TF1 *g=
new TF1(
"g",
"[0]+[1]*x^2",0,0.6);
96 g->SetParameters(0.01,0.001);
97 g->SetLineColor(kRed);
99 TGraph *gerad =
new TGraph(ihits,gas,resphi);
100 gerad->SetMarkerStyle(22);
101 gerad->SetMarkerColor(kRed);
102 gerad->SetMarkerSize(1);
108 TGraph *gerad1 =
new TGraph(ihits,gas,resrad);
109 gerad1->SetMarkerStyle(23);
110 gerad1->SetMarkerColor(kGreen);
111 gerad1->SetMarkerSize(1);
119 leg =
new TLegend(0.66,0.82,0.92,0.96);
120 leg->SetTextSize(0.05);
121 leg->AddEntry(gerad,
"#sigma_{res,#phi}",
"P");
122 leg->AddEntry(gerad1,
"#sigma_{res,r}",
"P");
127 leg->SetFillColor(0);