3 // read ALICE INVARIANT YIELD data from file
7 cout << "================================" << endl;
9 cout << "read ALICE INVARIANT YIELD data from file" <<endl;
10 cout << "Number of bins: " << binsYieldAlice <<endl;
11 cout << "Filename: " << filenameYieldAlice <<endl;
13 cout << "================================" << endl;
16 ifstream fileYieldAlice;
17 fileYieldAlice.open(filenameYieldAlice);
20 while(!fileYieldAlice.eof()) {
21 if(i == binsYieldAlice) break;
22 fileYieldAlice >> centerPtYieldAlice[i] >> yieldAlice[i] >> statYieldAlice[i] >> systYieldAlice[i];
23 //systYieldAlice[i] = 0.15*yieldAlice[i]+1e-7; // sys error has to be provided, currently 10%
25 // the width of the pt bins, currently hardwired....
26 widthPtYieldAlice[i] = 0.05;
27 if (centerPtYieldAlice[i] > 1) widthPtYieldAlice[i] = 0.1;
28 if (centerPtYieldAlice[i] > 2) widthPtYieldAlice[i] = 0.2;
29 if (centerPtYieldAlice[i] > 4) widthPtYieldAlice[i] = 0.5;
30 if (centerPtYieldAlice[i] > 7) widthPtYieldAlice[i] = 1.0;
32 ptYieldAlice[i] = centerPtYieldAlice[i];
33 errPtYieldAlice[i] = widthPtYieldAlice[i] / 2.0;
34 lowPtYieldAlice[i] = centerPtYieldAlice[i] - errPtYieldAlice[i];
35 highPtYieldAlice[i] = centerPtYieldAlice[i] + errPtYieldAlice[i];
37 lowStatYieldAlice[i] = yieldAlice[i] - statYieldAlice[i];
38 highStatYieldAlice[i] = yieldAlice[i] + statYieldAlice[i];
39 relStatYieldAlice[i] = statYieldAlice[i] / yieldAlice[i];
40 lowSystYieldAlice[i] = yieldAlice[i] - systYieldAlice[i];
41 highSystYieldAlice[i] = yieldAlice[i] + systYieldAlice[i];
42 relSystYieldAlice[i] = systYieldAlice[i] / yieldAlice[i];
43 errYieldAlice[i] = systYieldAlice[i] + statYieldAlice[i];
44 lowErrYieldAlice[i] = yieldAlice[i] - errYieldAlice[i];
45 highErrYieldAlice[i] = yieldAlice[i] + errYieldAlice[i];
46 relErrYieldAlice[i] = errYieldAlice[i] / yieldAlice[i];
47 err2YieldAlice[i] = sqrt(systYieldAlice[i]*systYieldAlice[i] + statYieldAlice[i]*statYieldAlice[i]);
48 lowErr2YieldAlice[i] = yieldAlice[i] - err2YieldAlice[i];
49 highErr2YieldAlice[i] = yieldAlice[i] + errYieldAlice[i];
50 relErr2YieldAlice[i] = err2YieldAlice[i] / yieldAlice[i];
55 ptYield2PiPtAlice[i] = ptYieldAlice[i];
56 centerPtYield2PiPtAlice[i] = centerPtYieldAlice[i];
57 widthPtYield2PiPtAlice[i] = widthPtYieldAlice[i];
58 errPtYield2PiPtAlice[i] = errPtYieldAlice[i];
59 lowPtYield2PiPtAlice[i] = lowPtYieldAlice[i];
60 highPtYield2PiPtAlice[i] = highPtYieldAlice[i];
62 yield2PiPtAlice[i] = yieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
63 statYield2PiPtAlice[i] = statYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
64 lowStatYield2PiPtAlice[i] = lowStatYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
65 highStatYield2PiPtAlice[i] = highStatYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
66 relStatYield2PiPtAlice[i] = relStatYieldAlice[i];
67 systYield2PiPtAlice[i] = systYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
68 lowSystYield2PiPtAlice[i] = lowSystYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
69 highSystYield2PiPtAlice[i] = highSystYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
70 relSystYield2PiPtAlice[i] = relSystYieldAlice[i];
71 errYield2PiPtAlice[i] = errYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
72 lowErrYield2PiPtAlice[i] = lowErrYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
73 highErrYield2PiPtAlice[i] = highErrYieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
74 relErrYield2PiPtAlice[i] = relErrYieldAlice[i];
75 err2Yield2PiPtAlice[i] = err2YieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
76 lowErr2Yield2PiPtAlice[i] = lowErr2YieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
77 highErr2Yield2PiPtAlice[i] = highErr2YieldAlice[i]*centerPtYieldAlice[i]*2*M_PI;
78 relErr2Yield2PiPtAlice[i] = relErr2YieldAlice[i];
85 cout << "ptYieldAlice[" << i << "] = " << ptYieldAlice[i] <<endl;
86 cout << " centerPtYieldAlice[" << i << "] = " << centerPtYieldAlice[i] <<endl;
87 cout << " widthPtYieldAlice[" << i << "] = " << widthPtYieldAlice[i] <<endl;
88 cout << " errPtYieldAlice[" << i << "] = " << errPtYieldAlice[i] <<endl;
89 cout << " lowPtYieldAlice[" << i << "] = " << lowPtYieldAlice[i] <<endl;
90 cout << " highPtYieldAlice[" << i << "] = " << highPtYieldAlice[i] <<endl;
91 cout << "yieldAlice[" << i << "] = " << yieldAlice[i] <<endl;
92 cout << " statYieldAlice[" << i << "] = " << statYieldAlice[i] <<endl;
93 cout << " lowStatYieldAlice[" << i << "] = " << lowStatYieldAlice[i] <<endl;
94 cout << " highStatYieldAlice[" << i << "] = " << highStatYieldAlice[i] <<endl;
95 cout << " relStatYieldAlice[" << i << "] = " << relStatYieldAlice[i] <<endl;
96 cout << " systYieldAlice[" << i << "] = " << systYieldAlice[i] <<endl;
97 cout << " lowSystYieldAlice[" << i << "] = " << lowSystYieldAlice[i] <<endl;
98 cout << " highSystYieldAlice[" << i << "] = " << highSystYieldAlice[i] <<endl;
99 cout << " relSystYieldAlice[" << i << "] = " << relSystYieldAlice[i] <<endl;
100 cout << "errYieldAlice[" << i << "] = " << errYieldAlice[i] <<endl;
101 cout << " lowErrYieldAlice[" << i << "] = " << lowErrYieldAlice[i] <<endl;
102 cout << " highErrYieldAlice[" << i << "] = " << highErrYieldAlice[i] <<endl;
103 cout << " relErrYieldAlice[" << i << "] = " << relErrYieldAlice[i] <<endl;
104 cout << "err2YieldAlice[" << i << "] = " << err2YieldAlice[i] <<endl;
105 cout << " lowErr2YieldAlice[" << i << "] = " << lowErr2YieldAlice[i] <<endl;
106 cout << " highErr2YieldAlice[" << i << "] = " << highErr2YieldAlice[i] <<endl;
107 cout << " relErr2YieldAlice[" << i << "] = " << relErr2YieldAlice[i] <<endl;
110 ptYieldAliceFit[i] = ptYieldAlice[i];
111 YieldYieldAliceFit[i] = YieldYieldAlice[i]*ptYieldAlice[i];
112 errYieldYieldAliceFit[i] = errYieldYieldAlice[i];
113 widthPtYieldAliceFit[i] = widthPtYieldAlice[i];
114 errPtYieldAliceFit[i] = 0; //errPtYieldAlice[i];
115 lowPtYieldAliceFit[i] = lowPtYieldAlice[i];
116 highPtYieldAliceFit[i] = highPtYieldAlice[i];
120 } // while(!fileYieldAlice.eof())
121 fileYieldAlice.close();
122 //if (fileYieldAlice) { delete fileYieldAlice; }
125 cout << "================================" << endl;
127 cout << "Finished reading ALICE INVARIANT YIELD data" <<endl;
128 cout << "Number of bins read: " << i <<endl;
130 cout << "================================" << endl;