7 double nEvents[100], nTmp;
8 double n[100][5][2], pHat[100][5][2];
9 char *types[] = {
"all",
"pi_pi",
"K_K",
"p_p",
"o_o"};
10 char *parts[] = {
"all",
"pi",
"K",
"p",
"o"};
13 for (
int ic=0;ic<100;ic++) {
15 for (
int it=0;it<5;it++) {
22 for (
int ic=0;ic<100;ic++) {
23 for (
int it=0;it<5;it++) {
24 sprintf(buffer,
"Data%i%s.root",ic,types[it]);
25 fNew = f->Open(buffer);
31 sprintf(nEvName,
"NEventsSib_zBuf_%i",iz);
32 while (tmp = (TH1D *) gDirectory->Get(nEvName)) {
34 nEvents[ic] += tmp->Integral();
36 sprintf(nHistName,
"meanPtPA_zBuf_%i",iz);
37 tmp = (TH1D *) gDirectory->Get(nHistName);
38 nTmp = 0.5*tmp->Integral();
39 pHat[ic][it][0] += nTmp*tmp->GetMean();
41 sprintf(nHistName,
"meanPtMA_zBuf_%i",iz);
42 tmp = (TH1D *) gDirectory->Get(nHistName);
43 nTmp = 0.5*tmp->Integral();
44 pHat[ic][it][1] += nTmp*tmp->GetMean();
47 sprintf(nEvName,
"NEventsSib_zBuf_%i",iz);
58 printf(
" Following information is for each centrality bin \n\n");
59 printf(
"Centrality :");
60 for (
int ic=0;ic<nc;ic++) {
64 printf(
" numEvents :");
65 for (
int ic=0;ic<nc;ic++) {
66 printf(
"%11.0f",nEvents[ic]);
72 for (
int it=0;it<5;it++) {
73 printf(
"%10s+%10s-",parts[it],parts[it]);
76 for (
int ic=0;ic<nc;ic++) {
78 printf(
" NTracks %i :",ic);
82 for (
int it=0;it<5;it++) {
83 printf(
"%11i%11i",n[ic][it][0],n[ic][it][1]);
88 for (
int ic=0;ic<nc;ic++) {
90 printf(
" dN/dEta %i :",ic);
94 for (
int it=0;it<5;it++) {
95 printf(
"%11.2f%11.2f",n[ic][it][0]/nEvents[ic],n[ic][it][1]/nEvents[ic]);
100 for (
int ic=0;ic<nc;ic++) {
102 printf(
" pHat %i :",ic);
107 for (
int it=0;it<5;it++) {
108 if (n[ic][it][0] > 0) {
109 pHatp = pHat[ic][it][0] / n[ic][it][0];
113 if (n[ic][it][1] > 0) {
114 pHatm = pHat[ic][it][1] / n[ic][it][1];
118 printf(
"%11.3f%11.3f",pHatp,pHatm);
126 char *sums[] = {
"Sum0_2",
"Sum3_6"};
129 for (
int ic=0;ic<nSums;ic++) {
131 for (
int it=0;it<5;it++) {
138 for (
int ic=0;ic<nSums;ic++) {
139 for (
int it=0;it<5;it++) {
140 sprintf(buffer,
"%s%s.root",sums[ic],types[it]);
141 fNew = f->Open(buffer);
146 sprintf(nEvName,
"NEventsSib_zBuf_%i",iz);
147 while (tmp = (TH1D *) gDirectory->Get(nEvName)) {
149 nEvents[ic] += tmp->Integral();
151 sprintf(nHistName,
"meanPtPA_zBuf_%i",iz);
152 tmp = (TH1D *) gDirectory->Get(nHistName);
153 nTmp = 0.5*tmp->Integral();
154 pHat[ic][it][0] += nTmp*tmp->GetMean();
155 n[ic][it][0] += nTmp;
156 sprintf(nHistName,
"meanPtMA_zBuf_%i",iz);
157 tmp = (TH1D *) gDirectory->Get(nHistName);
158 nTmp = 0.5*tmp->Integral();
159 pHat[ic][it][1] += nTmp*tmp->GetMean();
160 n[ic][it][1] += nTmp;
162 sprintf(nEvName,
"NEventsSib_zBuf_%i",iz);
171 printf(
" Following information is for combined centrality bins \n\n");
172 printf(
"Summed bin :");
173 for (
int ic=0;ic<nSums;ic++) {
177 printf(
" numEvents :");
178 for (
int ic=0;ic<nSums;ic++) {
179 printf(
"%11.0f",nEvents[ic]);
185 for (
int it=0;it<5;it++) {
186 printf(
"%10s+%10s-",parts[it],parts[it]);
189 for (
int ic=0;ic<nSums;ic++) {
191 printf(
" NTracks %i :",ic);
195 for (
int it=0;it<5;it++) {
196 printf(
"%11i%11i",n[ic][it][0],n[ic][it][1]);
201 for (
int ic=0;ic<nSums;ic++) {
203 printf(
" dN/dEta %i :",ic);
207 for (
int it=0;it<5;it++) {
208 printf(
"%11.2f%11.2f",n[ic][it][0]/nEvents[ic],n[ic][it][1]/nEvents[ic]);
213 for (
int ic=0;ic<nSums;ic++) {
215 printf(
" pHat %i :",ic);
220 for (
int it=0;it<5;it++) {
221 if (n[ic][it][0] > 0) {
222 pHatp = pHat[ic][it][0] / n[ic][it][0];
226 if (n[ic][it][1] > 0) {
227 pHatm = pHat[ic][it][1] / n[ic][it][1];
231 printf(
"%11.3f%11.3f",pHatp,pHatm);