7 double nEvents[100], nTmp;
8 double n[100][4][2], pHat[100][4][2];
9 char *types[] = {
"all",
"soft",
"neck",
"hard"};
12 for (
int ic=0;ic<100;ic++) {
14 for (
int it=0;it<4;it++) {
21 for (
int ic=0;ic<100;ic++) {
22 for (
int it=0;it<4;it++) {
23 sprintf(buffer,
"Data%i%s.root",ic,types[it]);
24 fNew = f->Open(buffer);
30 sprintf(nEvName,
"NEventsSib_zBuf_%i",iz);
31 while (tmp = (TH1D *) gDirectory->Get(nEvName)) {
33 nEvents[ic] += tmp->Integral();
35 sprintf(nHistName,
"meanPtPA_zBuf_%i",iz);
36 tmp = (TH1D *) gDirectory->Get(nHistName);
37 nTmp = 0.5*tmp->Integral();
38 pHat[ic][it][0] += nTmp*tmp->GetMean();
40 sprintf(nHistName,
"meanPtMA_zBuf_%i",iz);
41 tmp = (TH1D *) gDirectory->Get(nHistName);
42 nTmp = 0.5*tmp->Integral();
43 pHat[ic][it][1] += nTmp*tmp->GetMean();
46 sprintf(nEvName,
"NEventsSib_zBuf_%i",iz);
57 printf(
" Following information is for each centrality bin \n\n");
58 printf(
"Centrality :");
59 for (
int ic=0;ic<nc;ic++) {
63 printf(
" numEvents :");
64 for (
int ic=0;ic<nc;ic++) {
65 printf(
"%11.0f",nEvents[ic]);
71 for (
int it=0;it<4;it++) {
72 printf(
"%10s+%10s-",types[it],types[it]);
75 for (
int ic=0;ic<nc;ic++) {
77 printf(
" NTracks %i :",ic);
81 for (
int it=0;it<4;it++) {
82 printf(
"%11i%11i",n[ic][it][0],n[ic][it][1]);
87 for (
int ic=0;ic<nc;ic++) {
89 printf(
" dN/dEta %i :",ic);
93 for (
int it=0;it<4;it++) {
94 printf(
"%11.2f%11.2f",n[ic][it][0]/nEvents[ic],n[ic][it][1]/nEvents[ic]);
99 for (
int ic=0;ic<nc;ic++) {
101 printf(
" pHat %i :",ic);
106 for (
int it=0;it<4;it++) {
107 if (n[ic][it][0] > 0) {
108 pHatp = pHat[ic][it][0] / n[ic][it][0];
112 if (n[ic][it][1] > 0) {
113 pHatm = pHat[ic][it][1] / n[ic][it][1];
117 printf(
"%11.3f%11.3f",pHatp,pHatm);
125 char *sums[] = {
"Sum0_4"};
128 for (
int ic=0;ic<nSums;ic++) {
130 for (
int it=0;it<4;it++) {
137 for (
int ic=0;ic<nSums;ic++) {
138 for (
int it=0;it<4;it++) {
139 sprintf(buffer,
"%s%s.root",sums[ic],types[it]);
140 fNew = f->Open(buffer);
145 sprintf(nEvName,
"NEventsSib_zBuf_%i",iz);
146 while (tmp = (TH1D *) gDirectory->Get(nEvName)) {
148 nEvents[ic] += tmp->Integral();
150 sprintf(nHistName,
"meanPtPA_zBuf_%i",iz);
151 tmp = (TH1D *) gDirectory->Get(nHistName);
152 nTmp = 0.5*tmp->Integral();
153 pHat[ic][it][0] += nTmp*tmp->GetMean();
154 n[ic][it][0] += nTmp;
155 sprintf(nHistName,
"meanPtMA_zBuf_%i",iz);
156 tmp = (TH1D *) gDirectory->Get(nHistName);
157 nTmp = 0.5*tmp->Integral();
158 pHat[ic][it][1] += nTmp*tmp->GetMean();
159 n[ic][it][1] += nTmp;
161 sprintf(nEvName,
"NEventsSib_zBuf_%i",iz);
170 printf(
" Following information is for combined centrality bins \n\n");
171 printf(
"Summed bin :");
172 for (
int ic=0;ic<nSums;ic++) {
176 printf(
" numEvents :");
177 for (
int ic=0;ic<nSums;ic++) {
178 printf(
"%11.0f",nEvents[ic]);
184 for (
int it=0;it<4;it++) {
185 printf(
"%10s+%10s-",types[it],types[it]);
188 for (
int ic=0;ic<nSums;ic++) {
190 printf(
" NTracks %i :",ic);
194 for (
int it=0;it<4;it++) {
195 printf(
"%11i%11i",n[ic][it][0],n[ic][it][1]);
200 for (
int ic=0;ic<nSums;ic++) {
202 printf(
" dN/dEta %i :",ic);
206 for (
int it=0;it<4;it++) {
207 printf(
"%11.2f%11.2f",n[ic][it][0]/nEvents[ic],n[ic][it][1]/nEvents[ic]);
212 for (
int ic=0;ic<nSums;ic++) {
214 printf(
" pHat %i :",ic);
219 for (
int it=0;it<4;it++) {
220 if (n[ic][it][0] > 0) {
221 pHatp = pHat[ic][it][0] / n[ic][it][0];
225 if (n[ic][it][1] > 0) {
226 pHatm = pHat[ic][it][1] / n[ic][it][1];
230 printf(
"%11.3f%11.3f",pHatp,pHatm);