Hall-D Software  alpha
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fits_errors.C
Go to the documentation of this file.
1 const Int_t nfiles=8;
2 TCanvas *c[nfiles];
3 Int_t read_parms (Int_t j, TString filename, vector<double> &yparms, vector<double> &yparms_err, vector< vector< double > > & covMatrix ) {
4 
5  vector <TString> sdme;
6 
7  yparms.clear();
8  yparms_err.clear();
9  covMatrix.clear();
10 
11  TString infile = filename+".fit2"; // file with parameters
12 
13  cout << endl << "Opening parameters file: " << infile.Data() << endl;
14 
15  // now read and print fitted values
16  ifstream parameters;
17  parameters.open (infile.Data());
18  if (!parameters) {
19  cout << "ERROR: Failed to open data file= " << infile.Data() << endl;
20  return 1; // failed to open data file
21  }
22 
23  TString CanvasName = filename;
24  // cout << "j=" << j << " CanvasName=" << CanvasName << endl;
25  c[j] = new TCanvas(CanvasName,CanvasName,200,10,1000,700);
26 
27  TString line;
28  Int_t ndx=0;
29  while (line.ReadLine(parameters)){
30 
31  TObjArray *tokens = line.Tokenize("\t");
32  Int_t ntokens = tokens->GetEntries();
33 
34  // cout << " ntokens=" << ntokens << " line=" << line.Data() << endl;
35  Int_t jmax=ntokens/3;
36  for (Int_t j=0; j<jmax; j++){
37  sdme.push_back( (((TObjString*)tokens->At(3*j))->GetString()) );
38  yparms.push_back( (((TObjString*)tokens->At(3*j+1))->GetString()).Atof() );
39  yparms_err.push_back( (((TObjString*)tokens->At(3*j+2))->GetString()).Atof());
40  }
41  if (ntokens != 1) continue; // get entries with covariance matrix
42 
43  TObjArray *tokens2 = line.Tokenize(" ");
44  Int_t ntokens2 = tokens2->GetEntries();
45  // cout << " ntokens2=" << ntokens2 << " line=" << line << endl;
46  vector<double> temp;
47  temp.clear();
48  for (Int_t j=0; j<ntokens2; j++) {
49  temp.push_back( (((TObjString*)tokens2->At(j))->GetString()).Atof() );
50  }
51  // cout << " vector=" << setw(20) << temp[0] << setw(20) << temp[1] << setw(20) << temp[2] << setw(20) << temp[3] << setw(20) << temp[4] << setw(20) << temp[5] << setw(20) << temp[6] << setw(20) << temp[7] << endl;
52  covMatrix.push_back(temp);
53  ndx++;
54  } // end loop over lines
55 
56 
57  // Output parameters to canvas
58 
59  TString title = filename;
60  TLatex *t1 = new TLatex(0.2,0.85,title);
61  t1->SetNDC();
62  t1->SetTextSize(0.04);
63  t1->Draw();
64 
65  for (Int_t j=0; j<sdme.size()-2; j++) { // -2 to eliminate Sigma and P
66  //cout << sdme[j] << "=" << yparms[j] << " err=" << yparms_err[j] << endl;
67 
68  TString sdmename;
69  sdmename = sdme[j];
70  title.Form("%s = \t%.3f #pm %.3f\n",sdmename.Data(),yparms[j],yparms_err[j]);
71  // cout << "title=" << title << endl;
72  TLatex *t1 = new TLatex(0.2,0.75 - 0.05*j,title);
73  t1->SetNDC();
74  t1->SetTextSize(0.04);
75  t1->Draw();
76  }
77 
78 
79 
80  // cout << " parms.size()=" << parms.size() << endl;
81  /*for (jj=0; jj<parms.size()-2; jj++) {
82  yparms[jj] = parms[jj];
83  yparms_err[jj] = parms_err[jj];
84  }*/
85 
86 
87  parameters.close();
88 
89  return 0;
90 
91 }
92 
93 
95 {
96 // File: fits_errors.C
97  // Read text files with fitted parameters and covariance matrix and compute derived parameters.
98 //
99 
100  gStyle->SetPalette(1,0);
101  gStyle->SetOptStat(111111);
102  gStyle->SetOptFit(111111);
103  gStyle->SetPadRightMargin(0.15);
104  gStyle->SetPadLeftMargin(0.15);
105  gStyle->SetPadBottomMargin(0.15);
106 
107  vector <double> yparms;
108  vector <double> yparms_err;
109  vector< vector< double > > covMatrix;
110  vector <TString> filenames;
111 
112 
113  Float_t g1V00_re[nfiles];
114  Float_t g1V00_im[nfiles];
115  Float_t g1V11_re[nfiles];
116  Float_t g1V11_im[nfiles];
117  Float_t g1V10_re[nfiles];
118  Float_t g1V10_im[nfiles];
119  Float_t g1V1m1_re[nfiles];
120  Float_t g1V1m1_im[nfiles];
121  Float_t g1V00_re_err[nfiles];
122  Float_t g1V00_im_err[nfiles];
123  Float_t g1V11_re_err[nfiles];
124  Float_t g1V11_im_err[nfiles];
125  Float_t g1V10_re_err[nfiles];
126  Float_t g1V10_im_err[nfiles];
127  Float_t g1V1m1_re_err[nfiles];
128  Float_t g1V1m1_im_err[nfiles];
129 
130  Float_t xparms[nfiles]={1,2,3,4,5,6,7,8};
131  Float_t xparms_err[nfiles]={0.01,0.01,0.01,0.01,0.01,0.01,0.01,0.01};
132  Float_t g1V00_rho[nfiles];
133  Float_t g1V00_phi[nfiles];
134  Float_t g1V11_rho[nfiles];
135  Float_t g1V11_phi[nfiles];
136  Float_t g1V10_rho[nfiles];
137  Float_t g1V10_phi[nfiles];
138  Float_t g1V1m1_rho[nfiles];
139  Float_t g1V1m1_phi[nfiles];
140 
141  Float_t g1V00_rho_err[nfiles];
142  Float_t g1V00_phi_err[nfiles];
143  Float_t g1V11_rho_err[nfiles];
144  Float_t g1V11_phi_err[nfiles];
145  Float_t g1V10_rho_err[nfiles];
146  Float_t g1V10_phi_err[nfiles];
147  Float_t g1V1m1_rho_err[nfiles];
148  Float_t g1V1m1_phi_err[nfiles];
149 
150 
151  const Int_t nparms=8;
152 
153  TGraphErrors *gr_g1V00_re;
154  TGraphErrors *gr_g1V00_im;
155  TGraphErrors *gr_g1V11_re;
156  TGraphErrors *gr_g1V11_im;
157  TGraphErrors *gr_g1V10_re;
158  TGraphErrors *gr_g1V10_im;
159  TGraphErrors *gr_g1V1m1_re;
160  TGraphErrors *gr_g1V1m1_im;
161 
162  TGraphErrors *gr_g1V00_rho;
163  TGraphErrors *gr_g1V00_phi;
164  TGraphErrors *gr_g1V11_rho;
165  TGraphErrors *gr_g1V11_phi;
166  TGraphErrors *gr_g1V10_rho;
167  TGraphErrors *gr_g1V10_phi;
168  TGraphErrors *gr_g1V1m1_rho;
169  TGraphErrors *gr_g1V1m1_phi;
170 
171 
172 
173  filenames.push_back("twopi_primakoff_DSelect_sw1pw1000_NOTAG_W_1000000");
174  filenames.push_back("twopi_primakoff_DSelect_sw1pw1000_NOTAG_File_1000000");
175  filenames.push_back("twopi_primakoff_DSelect_sw1pw1000_TAG_W_1000000");
176  filenames.push_back("twopi_primakoff_DSelect_sw1pw1000_TAG_File_1000000");
177  filenames.push_back("twopi_primakoff_DSelect_sw1pw1000_TAG10_W_1000000");
178  filenames.push_back("twopi_primakoff_DSelect_sw1pw1000_TAG10_File_1000000");
179  filenames.push_back("twopi_primakoff_DSelect_sw1pw1000_TAG40_W_1000000");
180  filenames.push_back("twopi_primakoff_DSelect_sw1pw1000_TAG40_File_1000000");
181 
182  // filenames.push_back("fits_errors");
183 
184  for (j=0; j<filenames.size(); j++) {
185  read_parms(j, filenames[j], yparms, yparms_err, covMatrix);
186  cout << " yparms=" << yparms[0] << " " << yparms[1] << " " << yparms[2] << " " << yparms[3] << " " << yparms[4] << " " << yparms[5] << " " << yparms[6] << " " << yparms[7] << endl;
187  cout << " yparms_err=" << yparms_err[0] << " " << yparms_err[1] << " " << yparms_err[2] << " " << yparms_err[3] << " " << yparms_err[4] << " " << yparms_err[5] << " " << yparms_err[6] << " " << yparms_err[7] << endl;
188  g1V00_re[j] = yparms[0];
189  g1V00_im[j] = yparms[1];
190  g1V11_re[j] = yparms[2];
191  g1V11_im[j] = yparms[3];
192  g1V10_re[j] = yparms[4];
193  g1V10_im[j] = yparms[5];
194  g1V1m1_re[j] = yparms[6];
195  g1V1m1_im[j] = yparms[7];
196  g1V00_re_err[j] = yparms_err[0];
197  g1V00_im_err[j] = yparms_err[1];
198  g1V11_re_err[j] = yparms_err[2];
199  g1V11_im_err[j] = yparms_err[3];
200  g1V10_re_err[j] = yparms_err[4];
201  g1V10_im_err[j] = yparms_err[5];
202  g1V1m1_re_err[j] = yparms_err[6];
203  g1V1m1_im_err[j] = yparms_err[7];
204 
205 
206  g1V00_rho[j] = sqrt(yparms[0]*yparms[0]+yparms[1]*yparms[1]);
207  g1V00_phi[j] = atan2(yparms[1],yparms[0])*180./3.14159;
208  g1V11_rho[j] = sqrt(yparms[2]*yparms[2]+yparms[3]*yparms[3]);
209  g1V11_phi[j] = atan2(yparms[3],yparms[2])*180./3.14159;
210  g1V10_rho[j] = sqrt(yparms[4]*yparms[4]+yparms[5]*yparms[5]);
211  g1V10_phi[j] = atan2(yparms[5],yparms[4])*180./3.14159;
212  g1V1m1_rho[j] = sqrt(yparms[6]*yparms[6]+yparms[7]*yparms[7]);
213  g1V1m1_phi[j] = atan2(yparms[7],yparms[6])*180./3.14159;
214 
215  /*cout << " covMatrix.size()=" << covMatrix.size() << endl;
216  for (Int_t j=0; j<covMatrix.size(); j++) {
217  for (Int_t jj=0; jj<covMatrix.size(); jj++) {
218  // double corr = covMatrix[j][j]*covMatrix[jj][jj] != 0? covMatrix[j][jj]/sqrt(covMatrix[j][j]*covMatrix[jj][jj]) : 0;
219  cout << setw(20) << covMatrix[j][jj];
220  }
221  cout << endl;
222  }*/
223 
224  // See https://en.wikipedia.org/wiki/Propagation_of_uncertainty#cite_note-15
225 
226  double A = g1V00_re[j];
227  double B = g1V00_im[j];
228  double rho = sqrt (A*A + B*B);
229  double A_err = g1V00_re_err[j];
230  double B_err = g1V00_im_err[j];
231  double AB_corr = covMatrix[0][1];
232  g1V00_rho_err[j] = sqrt( (A*A)*(A_err*A_err) + (B*B)*(B_err*B_err) + 2*A*B*AB_corr )/rho;
233  double R = B==0? 0 : A/B;
234  double R_err = abs(R)*sqrt( (A_err/A)*(A_err/A) + (B_err/B)*(B_err/B) -2*AB_corr/(A*B)); // error on ratio
235  double phi_err = R_err*(180./3.14159)/(1+R*R); // error on ArcTan(R)
236  double phi = g1V00_phi[j];
237  g1V00_phi_err[j] = phi_err;
238  cout << endl << " g1V00";
239  cout << " rho=" << rho << " A=" << A << " B=" << B << " AB_corr=" << AB_corr << " R=" << R << " R_err=" << R_err << " phi=" << phi << " phi_err=" << phi_err << endl;
240  cout << " A_err/A=" << A_err/A << " B_err/B=" << B_err/B << " rho_err/rho=" << g1V00_rho_err[j]/rho << " R_err/R=" << R_err/R << " phi_err/phi=" << phi_err/phi << endl;
241 
242 
243 
244  A = g1V11_re[j];
245  B = g1V11_im[j];
246  rho = sqrt (A*A + B*B);
247  A_err = g1V11_re_err[j];
248  B_err = g1V11_im_err[j];
249  AB_corr = covMatrix[2][3];
250  g1V11_rho_err[j] = sqrt( (A*A)*(A_err*A_err) + (B*B)*(B_err*B_err) + 2*A*B*AB_corr )/rho;
251  R = B==0? 0 : A/B;
252  R_err = abs(R)*sqrt( (A_err/A)*(A_err/A) + (B_err/B)*(B_err/B) -2*AB_corr/(A*B)); // error on ratio
253  phi_err = R_err*(180./3.14159)/(1+R*R); // error on ArcTan(R)
254  phi = g1V11_phi[j];
255  g1V11_phi_err[j] = phi_err;
256  cout << endl << " g1V11";
257  cout << " rho=" << rho << " A=" << A << " B=" << B << " AB_corr=" << AB_corr << " R=" << R << " R_err=" << R_err << " phi=" << phi << " phi_err=" << phi_err << endl;
258  cout << " A_err/A=" << A_err/A << " B_err/B=" << B_err/B << " rho_err/rho=" << g1V00_rho_err[j]/rho << " R_err/R=" << R_err/R << " phi_err/phi=" << phi_err/phi << endl;
259 
260  A = g1V10_re[j];
261  B = g1V10_im[j];
262  rho = sqrt (A*A + B*B);
263  A_err = g1V10_re_err[j];
264  B_err = g1V10_im_err[j];
265  AB_corr = covMatrix[4][5];
266  g1V10_rho_err[j] = sqrt( (A*A)*(A_err*A_err) + (B*B)*(B_err*B_err) + 2*A*B*AB_corr )/rho;
267  R = B==0? 0 : A/B;
268  R_err = abs(R)*sqrt( (A_err/A)*(A_err/A) + (B_err/B)*(B_err/B) -2*AB_corr/(A*B)); // error on ratio
269  phi_err = R_err*(180./3.14159)/(1+R*R); // error on ArcTan(R)
270  phi = g1V10_phi[j];
271  g1V10_phi_err[j] = phi_err;
272  cout << endl << " g1V10";
273  cout << " rho=" << rho << " A=" << A << " B=" << B << " AB_corr=" << AB_corr << " R=" << R << " R_err=" << R_err << " phi=" << phi << " phi_err=" << phi_err << endl;
274  cout << " A_err/A=" << A_err/A << " B_err/B=" << B_err/B << " rho_err/rho=" << g1V00_rho_err[j]/rho << " R_err/R=" << R_err/R << " phi_err/phi=" << phi_err/phi << endl;
275 
276 
277  A = g1V1m1_re[j];
278  B = g1V1m1_im[j];
279  rho = sqrt (A*A + B*B);
280  A_err = g1V1m1_re_err[j];
281  B_err = g1V1m1_im_err[j];
282  AB_corr = covMatrix[6][7];
283  g1V1m1_rho_err[j] = sqrt( (A*A)*(A_err*A_err) + (B*B)*(B_err*B_err) + 2*A*B*AB_corr )/rho;
284  R = B==0? 0 : A/B;
285  R_err = abs(R)*sqrt( (A_err/A)*(A_err/A) + (B_err/B)*(B_err/B) -2*AB_corr/(A*B)); // error on ratio
286  phi_err = R_err*(180./3.14159)/(1+R*R); // error on ArcTan(R)
287  phi = g1V1m1_phi[j];
288  g1V1m1_phi_err[j] = phi_err;
289  cout << endl << " g1V1m1";
290  cout << " rho=" << rho << " A=" << A << " B=" << B << " AB_corr=" << AB_corr << " R=" << R << " R_err=" << R_err << " phi=" << phi << " phi_err=" << phi_err << endl;
291  cout << " A_err/A=" << A_err/A << " B_err/B=" << B_err/B << " rho_err/rho=" << g1V00_rho_err[j]/rho << " R_err/R=" << R_err/R << " phi_err/phi=" << phi_err/phi << endl;
292  }
293 
294  gr_g1V00_re = new TGraphErrors(nfiles,xparms,g1V00_re,xparms_err,g1V00_re_err);
295  gr_g1V00_im = new TGraphErrors(nfiles,xparms,g1V00_im,xparms_err,g1V00_im_err);
296  gr_g1V11_re = new TGraphErrors(nfiles,xparms,g1V11_re,xparms_err,g1V11_re_err);
297  gr_g1V11_im = new TGraphErrors(nfiles,xparms,g1V11_im,xparms_err,g1V11_im_err);
298  gr_g1V10_re = new TGraphErrors(nfiles,xparms,g1V10_re,xparms_err,g1V10_re_err);
299  gr_g1V10_im = new TGraphErrors(nfiles,xparms,g1V10_im,xparms_err,g1V10_im_err);
300  gr_g1V1m1_re = new TGraphErrors(nfiles,xparms,g1V1m1_re,xparms_err,g1V1m1_re_err);
301  gr_g1V1m1_im = new TGraphErrors(nfiles,xparms,g1V1m1_im,xparms_err,g1V1m1_im_err);
302 
303  gr_g1V00_rho = new TGraphErrors(nfiles,xparms,g1V00_rho,xparms_err,g1V00_rho_err);
304  gr_g1V00_phi = new TGraphErrors(nfiles,xparms,g1V00_phi,xparms_err,g1V00_phi_err);
305  gr_g1V11_rho = new TGraphErrors(nfiles,xparms,g1V11_rho,xparms_err,g1V11_rho_err);
306  gr_g1V11_phi = new TGraphErrors(nfiles,xparms,g1V11_phi,xparms_err,g1V11_phi_err);
307  gr_g1V10_rho = new TGraphErrors(nfiles,xparms,g1V10_rho,xparms_err,g1V10_rho_err);
308  gr_g1V10_phi = new TGraphErrors(nfiles,xparms,g1V10_phi,xparms_err,g1V10_phi_err);
309  gr_g1V1m1_rho = new TGraphErrors(nfiles,xparms,g1V1m1_rho,xparms_err,g1V1m1_rho_err);
310  gr_g1V1m1_phi = new TGraphErrors(nfiles,xparms,g1V1m1_phi,xparms_err,g1V1m1_phi_err);
311 
312 
313 
314 
315  c0 = new TCanvas("c0","c0",200,10,1000,700);
316  c0->Divide(3,3);
317  c0->cd(1);
318  gr_g1V00_re->SetTitle("g1V00_re");
319  gr_g1V00_re->GetXaxis()->SetTitleSize(0.05);
320  gr_g1V00_re->GetYaxis()->SetTitleSize(0.05);
321  gr_g1V00_re->GetXaxis()->SetTitle("Measurement");
322  gr_g1V00_re->SetMarkerStyle(20);
323  gr_g1V00_re->SetMarkerColor(4);
324  gr_g1V00_re->Draw("p");
325  gr_g1V00_re->Draw();
326 
327  c0->cd(2);
328  gr_g1V00_im->SetTitle("g1V00_im");
329  gr_g1V00_im->GetXaxis()->SetTitleSize(0.05);
330  gr_g1V00_im->GetYaxis()->SetTitleSize(0.05);
331  gr_g1V00_im->GetXaxis()->SetTitle("Measurement");
332  gr_g1V00_im->SetMarkerStyle(20);
333  gr_g1V00_im->SetMarkerColor(4);
334  gr_g1V00_im->Draw("p");
335  gr_g1V00_im->Draw();
336 
337  c0->cd(3);
338  gr_g1V11_re->SetTitle("g1V11_re");
339  gr_g1V11_re->GetXaxis()->SetTitleSize(0.05);
340  gr_g1V11_re->GetYaxis()->SetTitleSize(0.05);
341  gr_g1V11_re->GetXaxis()->SetTitle("Measurement");
342  gr_g1V11_re->SetMarkerStyle(20);
343  gr_g1V11_re->SetMarkerColor(4);
344  gr_g1V11_re->Draw("p");
345  gr_g1V11_re->Draw();
346 
347  c0->cd(4);
348  gr_g1V11_im->SetTitle("g1V11_im");
349  gr_g1V11_im->GetXaxis()->SetTitleSize(0.05);
350  gr_g1V11_im->GetYaxis()->SetTitleSize(0.05);
351  gr_g1V11_im->GetXaxis()->SetTitle("Measurement");
352  gr_g1V11_im->SetMarkerStyle(20);
353  gr_g1V11_im->SetMarkerColor(4);
354  gr_g1V11_im->Draw("p");
355  gr_g1V11_im->Draw();
356 
357 
358  c0->cd(5);
359  gr_g1V10_re->SetTitle("g1V10_re");
360  gr_g1V10_re->GetXaxis()->SetTitleSize(0.05);
361  gr_g1V10_re->GetYaxis()->SetTitleSize(0.05);
362  gr_g1V10_re->GetXaxis()->SetTitle("Measurement");
363  gr_g1V10_re->SetMarkerStyle(20);
364  gr_g1V10_re->SetMarkerColor(4);
365  gr_g1V10_re->Draw("p");
366  gr_g1V10_re->Draw();
367 
368  c0->cd(6);
369  gr_g1V10_im->SetTitle("g1V10_im");
370  gr_g1V10_im->GetXaxis()->SetTitleSize(0.05);
371  gr_g1V10_im->GetYaxis()->SetTitleSize(0.05);
372  gr_g1V10_im->GetXaxis()->SetTitle("Measurement");
373  gr_g1V10_im->SetMarkerStyle(20);
374  gr_g1V10_im->SetMarkerColor(4);
375  gr_g1V10_im->Draw("p");
376  gr_g1V10_im->Draw();
377 
378  c0->cd(7);
379  gr_g1V1m1_re->SetTitle("g1V1m1_re");
380  gr_g1V1m1_re->GetXaxis()->SetTitleSize(0.05);
381  gr_g1V1m1_re->GetYaxis()->SetTitleSize(0.05);
382  gr_g1V1m1_re->GetXaxis()->SetTitle("Measurement");
383  gr_g1V1m1_re->SetMarkerStyle(20);
384  gr_g1V1m1_re->SetMarkerColor(4);
385  gr_g1V1m1_re->Draw("p");
386  gr_g1V1m1_re->Draw();
387 
388  c0->cd(8);
389  gr_g1V1m1_im->SetTitle("g1V1m1_im");
390  gr_g1V1m1_im->GetXaxis()->SetTitleSize(0.05);
391  gr_g1V1m1_im->GetYaxis()->SetTitleSize(0.05);
392  gr_g1V1m1_im->GetXaxis()->SetTitle("Measurement");
393  gr_g1V1m1_im->SetMarkerStyle(20);
394  gr_g1V1m1_im->SetMarkerColor(4);
395  gr_g1V1m1_im->Draw("p");
396  gr_g1V1m1_im->Draw();
397 
398  c1 = new TCanvas("c1","c1",200,10,1000,700);
399  c1->Divide(3,3);
400  c1->cd(1);
401  gr_g1V00_rho->SetTitle("g1V00_rho");
402  gr_g1V00_rho->GetXaxis()->SetTitleSize(0.05);
403  gr_g1V00_rho->GetYaxis()->SetTitleSize(0.05);
404  gr_g1V00_rho->GetXaxis()->SetTitle("Measurement");
405  gr_g1V00_rho->SetMarkerStyle(20);
406  gr_g1V00_rho->SetMarkerColor(4);
407  gr_g1V00_rho->Draw("p");
408  gr_g1V00_rho->Draw();
409 
410  c1->cd(2);
411  gr_g1V00_phi->SetTitle("g1V00_phi");
412  gr_g1V00_phi->GetXaxis()->SetTitleSize(0.05);
413  gr_g1V00_phi->GetYaxis()->SetTitleSize(0.05);
414  gr_g1V00_phi->GetXaxis()->SetTitle("Measurement");
415  gr_g1V00_phi->SetMarkerStyle(20);
416  gr_g1V00_phi->SetMarkerColor(4);
417  gr_g1V00_phi->Draw("p");
418  gr_g1V00_phi->Draw();
419 
420  c1->cd(3);
421  gr_g1V11_rho->SetTitle("g1V11_rho");
422  gr_g1V11_rho->GetXaxis()->SetTitleSize(0.05);
423  gr_g1V11_rho->GetYaxis()->SetTitleSize(0.05);
424  gr_g1V11_rho->GetXaxis()->SetTitle("Measurement");
425  gr_g1V11_rho->SetMarkerStyle(20);
426  gr_g1V11_rho->SetMarkerColor(4);
427  gr_g1V11_rho->Draw("p");
428  gr_g1V11_rho->Draw();
429 
430  c1->cd(4);
431  gr_g1V11_phi->SetTitle("g1V11_phi");
432  gr_g1V11_phi->GetXaxis()->SetTitleSize(0.05);
433  gr_g1V11_phi->GetYaxis()->SetTitleSize(0.05);
434  gr_g1V11_phi->GetXaxis()->SetTitle("Measurement");
435  gr_g1V11_phi->SetMarkerStyle(20);
436  gr_g1V11_phi->SetMarkerColor(4);
437  gr_g1V11_phi->Draw("p");
438  gr_g1V11_phi->Draw();
439 
440  c1->cd(5);
441  gr_g1V10_rho->SetTitle("g1V10_rho");
442  gr_g1V10_rho->GetXaxis()->SetTitleSize(0.05);
443  gr_g1V10_rho->GetYaxis()->SetTitleSize(0.05);
444  gr_g1V10_rho->GetXaxis()->SetTitle("Measurement");
445  gr_g1V10_rho->SetMarkerStyle(20);
446  gr_g1V10_rho->SetMarkerColor(4);
447  gr_g1V10_rho->Draw("p");
448  gr_g1V10_rho->Draw();
449 
450  c1->cd(6);
451  gr_g1V10_phi->SetTitle("g1V10_phi");
452  gr_g1V10_phi->GetXaxis()->SetTitleSize(0.05);
453  gr_g1V10_phi->GetYaxis()->SetTitleSize(0.05);
454  gr_g1V10_phi->GetXaxis()->SetTitle("Measurement");
455  gr_g1V10_phi->SetMarkerStyle(20);
456  gr_g1V10_phi->SetMarkerColor(4);
457  gr_g1V10_phi->Draw("p");
458  gr_g1V10_phi->Draw();
459 
460  c1->cd(7);
461  gr_g1V1m1_rho->SetTitle("g1V1m1_rho");
462  gr_g1V1m1_rho->GetXaxis()->SetTitleSize(0.05);
463  gr_g1V1m1_rho->GetYaxis()->SetTitleSize(0.05);
464  gr_g1V1m1_rho->GetXaxis()->SetTitle("Measurement");
465  gr_g1V1m1_rho->SetMarkerStyle(20);
466  gr_g1V1m1_rho->SetMarkerColor(4);
467  gr_g1V1m1_rho->Draw("p");
468  gr_g1V1m1_rho->Draw();
469 
470  c1->cd(8);
471  gr_g1V1m1_phi->SetTitle("g1V1m1_phi");
472  gr_g1V1m1_phi->GetXaxis()->SetTitleSize(0.05);
473  gr_g1V1m1_phi->GetYaxis()->SetTitleSize(0.05);
474  gr_g1V1m1_phi->GetXaxis()->SetTitle("Measurement");
475  gr_g1V1m1_phi->SetMarkerStyle(20);
476  gr_g1V1m1_phi->SetMarkerColor(4);
477  gr_g1V1m1_phi->Draw("p");
478  gr_g1V1m1_phi->Draw();
479 
480 
481 
482  c[0]->SaveAs("fits_errors.pdf(");
483  for (j=1; j<nfiles; j++) {
484  c[j]->SaveAs("fits_errors.pdf");
485  }
486  c0->SaveAs("fits_errors.pdf");
487  c1->SaveAs("fits_errors.pdf)");
488 }
const Int_t nfiles
Double_t c0[2][NMODULES]
Definition: tw_corr.C:67
#define c
TString filename
TFile * infile
Definition: tw_corr.C:45
Double_t c1[2][NMODULES]
Definition: tw_corr.C:68
TLatex * t1
double sqrt(double)
Int_t read_parms(Int_t j, TString filename, Float_t *yparms, Float_t *yparms_err)
void fits_errors()
Definition: fits_errors.C:94
Int_t ndx
TH2F * temp
vector< string > filenames