3 // read CMS NSD data from file
7 cout << "================================" << endl;
9 cout << "read CMS NSD data from file" <<endl;
10 cout << "Number of bins: " << binsCms <<endl;
11 cout << "Filename: " << filenameCms <<endl;
13 cout << "================================" << endl;
17 fileNsdCms.open(filenameCms);
20 while(!fileNsdCms.eof()) {
21 if(i == binsCms) break;
22 // textfile content: pt:NSD_yield:(stat + syst error added linerarly)
23 fileNsdCms >> centerPtCms[i] >> nsdCms[i] >> errNsdCms[i];
25 ptCms[i] = centerPtCms[i];
27 // the width of the pt bins, currently hardwired....
29 if (centerPtCms[i] > 1) widthPtCms[i] = 0.2;
31 errPtCms[i] = widthPtCms[i] / 2.0;
32 lowPtCms[i] = centerPtCms[i] - errPtCms[i];
33 highPtCms[i] = centerPtCms[i] + errPtCms[i];
36 lowStatNsdCms[i] = nsdCms[i] - statNsdCms[i];
37 highStatNsdCms[i] = nsdCms[i] + statNsdCms[i];
38 relStatNsdCms[i] = statNsdCms[i] / nsdCms[i];
39 lowSystNsdCms[i] = nsdCms[i] - systNsdCms[i];
40 highSystNsdCms[i] = nsdCms[i] + systNsdCms[i];
41 relSystNsdCms[i] = systNsdCms[i] / nsdCms[i];
43 lowErrNsdCms[i] = nsdCms[i] - errNsdCms[i];
44 highErrNsdCms[i] = nsdCms[i] + errNsdCms[i];
45 relErrNsdCms[i] = errNsdCms[i] / nsdCms[i];
46 err2NsdCms[i] = errNsdCms[i];
47 lowErr2NsdCms[i] = lowErrNsdCms[i];
48 highErr2NsdCms[i] = highErrNsdCms[i];
49 relErr2NsdCms[i] = relErrNsdCms[i];
51 cout << "ptCms[" << i << "] = " << ptCms[i] <<endl;
52 cout << " centerPtCms[" << i << "] = " << centerPtCms[i] <<endl;
53 cout << " widthPtCms[" << i << "] = " << widthPtCms[i] <<endl;
54 cout << " errPtCms[" << i << "] = " << errPtCms[i] <<endl;
55 cout << " lowPtCms[" << i << "] = " << lowPtCms[i] <<endl;
56 cout << " highPtCms[" << i << "] = " << highPtCms[i] <<endl;
57 cout << "nsdCms[" << i << "] = " << nsdCms[i] <<endl;
59 cout << " statNsdCms[" << i << "] = " << statNsdCms[i] <<endl;
60 cout << " lowStatNsdCms[" << i << "] = " << lowStatNsdCms[i] <<endl;
61 cout << " highStatNsdCms[" << i << "] = " << highStatNsdCms[i] <<endl;
62 cout << " relStatNsdCms[" << i << "] = " << relStatNsdCms[i] <<endl;
63 cout << " systNsdCms[" << i << "] = " << systNsdCms[i] <<endl;
64 cout << " lowSystNsdCms[" << i << "] = " << lowSystNsdCms[i] <<endl;
65 cout << " highSystNsdCms[" << i << "] = " << highSystNsdCms[i] <<endl;
66 cout << " relSystNsdCms[" << i << "] = " << relSystNsdCms[i] <<endl;
68 cout << "errNsdCms[" << i << "] = " << errNsdCms[i] <<endl;
69 cout << " lowErrNsdCms[" << i << "] = " << lowErrNsdCms[i] <<endl;
70 cout << " highErrNsdCms[" << i << "] = " << highErrNsdCms[i] <<endl;
71 cout << " relErrNsdCms[" << i << "] = " << relErrNsdCms[i] <<endl;
72 cout << "err2NsdCms[" << i << "] = " << err2NsdCms[i] <<endl;
73 cout << " lowErr2NsdCms[" << i << "] = " << lowErr2NsdCms[i] <<endl;
74 cout << " highErr2NsdCms[" << i << "] = " << highErr2NsdCms[i] <<endl;
75 cout << " relErr2NsdCms[" << i << "] = " << relErr2NsdCms[i] <<endl;
79 } // while(!fileNsdCms.eof())
81 //if (fileNsdCms) { delete fileNsdCms; }
84 cout << "================================" << endl;
86 cout << "Finished reading CMS NSD data" <<endl;
87 cout << "Number of bins read: " << i <<endl;
89 cout << "================================" << endl;