2 TCanvas* c1=
new TCanvas(
"c1");
8 c1->SetWindowSize(750,500);
11 gStyle->SetOptTitle(0);
12 gStyle->SetOptStat(0);
15 gSystem->Load(
"StEStructPoolSupport.so");
20 TH2F **ptdedp[nCent][8];
21 TH2F **ptdedpC[nCent][8];
22 TH2F **dedp[nCent][8];
23 TH2F **dedpC[nCent][8];
24 TH2F **ytyt[nCent][8];
25 TH2F **ytytC[nCent][8];
26 TH2F **ptetaeta[nCent][8];
27 TH2F **ptetaetaC[nCent][8];
28 TH2F **etaeta[nCent][8];
29 TH2F **etaetaC[nCent][8];
30 TH2F **ptphiphi[nCent][8];
31 TH2F **ptphiphiC[nCent][8];
32 TH2F **phiphi[nCent][8];
33 TH2F **phiphiC[nCent][8];
35 const char* oname[]={
"all",
"pi_pi",
"pi_K",
"pi_p",
"K_K",
"K_p",
"p_p",
"o_o"};
45 char *dir =
"/star/data01/pwg/estruct/prindle/Data/cucu200/2007ib/cuProdutionMinBias/data";
52 for (
int ic=0;ic<nCent;ic++) {
53 for (
int ipid=0;ipid<8;ipid++) {
54 sprintf(fileName,
"%s/Data%i%s.root",dir,ic,oname[ipid]);
55 tf[ic][ipid] =
new TFile(fileName);
57 ehelp[ic][ipid]->mapplyDEtaFix =
false;
58 ehelp[ic][ipid]->mPairNormalization =
false;
59 if ((0 ==ipid) || (1 == ipid) || (4 == ipid) || (6 == ipid) || (7 == ipid)) {
60 ehelp[ic][ipid]->mIdenticalPair =
true;
62 ehelp[ic][ipid]->mIdenticalPair =
false;
65 ptdedpC[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildPtCommon(
"DEtaDPhi",2,subtract);
66 ptetaetaC[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildPtCommon(
"EtaEta",2,subtract);
67 ptphiphiC[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildPtCommon(
"PhiPhi",2,subtract);
69 ptdedp[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildPtChargeTypes(
"DEtaDPhi",2,subtract);
70 ptetaeta[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildPtChargeTypes(
"EtaEta",2,subtract);
71 ptphiphi[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildPtChargeTypes(
"PhiPhi",2,subtract);
73 dedpC[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildCommon(
"DEtaDPhi",2);
74 ytytC[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildCommon(
"YtYt",3);
75 etaetaC[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildCommon(
"EtaEta",2);
76 phiphiC[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildCommon(
"PhiPhi",2);
78 dedp[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildChargeTypes(
"DEtaDPhi",2);
79 ytyt[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildChargeTypes(
"YtYt",3);
80 etaeta[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildChargeTypes(
"EtaEta",2);
81 phiphi[ic][ipid] = (TH2F**) ehelp[ic][ipid]->buildChargeTypes(
"PhiPhi",2);
92 for (
int ic=0;ic<nCent;ic++) {
96 ytyt[ic][ipid][icharge]->Draw(
"surf1");
103 for (
int ipid=1;ipid<7;ipid++) {
107 dedp[ic][ipid][icharge]->Draw(
"surf1");
111 const char* pidName[] = {
"all",
"pipi",
"piK",
"pip",
"KK",
"KP",
"pp",
"oo"};
112 const char* chargeName[] = {
"_LS_",
"_US_",
"_CD_",
"_CI_"};
113 const char* chargeType[] = {
"_PP_",
"_PM_",
"_MP_",
"_MM_"};
114 TFile *out =
new TFile(
"CuCu200GeV_histos.root",
"CREATE");
117 for (
int ipid=0;ipid<8;ipid++) {
118 for (
int icharge=0;icharge<4;icharge++) {
119 for (
int ic=0;ic<nCent;ic++) {
120 TString name(pidName[ipid]);
121 name +=
"_NDEtaDPhi"; name += chargeName[icharge]; name += ic;
122 dedp[ic][ipid][icharge]->SetName(name.Data());
123 dedp[ic][ipid][icharge]->SetTitle(name.Data());
124 dedp[ic][ipid][icharge]->Write();
125 TString name(pidName[ipid]);
126 name +=
"_PtDEtaDPhi"; name += chargeName[icharge]; name += ic;
127 ptdedp[ic][ipid][icharge]->SetName(name.Data());
128 ptdedp[ic][ipid][icharge]->SetTitle(name.Data());
129 ptdedp[ic][ipid][icharge]->Write();
130 TString name(pidName[ipid]);
131 name +=
"_YtYt"; name += chargeName[icharge]; name += ic;
132 ytyt[ic][ipid][icharge]->SetName(name.Data());
133 ytyt[ic][ipid][icharge]->SetTitle(name.Data());
134 ytyt[ic][ipid][icharge]->Write();
136 TString name(pidName[ipid]);
137 name +=
"_NDEtaDPhi"; name += chargeType[icharge]; name += ic;
138 dedpC[ic][ipid][icharge]->SetName(name.Data());
139 dedpC[ic][ipid][icharge]->SetTitle(name.Data());
140 dedpC[ic][ipid][icharge]->Write();
141 TString name(pidName[ipid]);
142 name +=
"_PtDEtaDPhi"; name += chargeType[icharge]; name += ic;
143 ptdedpC[ic][ipid][icharge]->SetName(name.Data());
144 ptdedpC[ic][ipid][icharge]->SetTitle(name.Data());
145 ptdedpC[ic][ipid][icharge]->Write();
146 TString name(pidName[ipid]);
147 name +=
"_YtYt"; name += chargeType[icharge]; name += ic;
148 ytytC[ic][ipid][icharge]->SetName(name.Data());
149 ytytC[ic][ipid][icharge]->SetTitle(name.Data());
150 ytytC[ic][ipid][icharge]->Write();
153 TString name(pidName[ipid]);
154 name +=
"_NEtaEta"; name += chargeName[icharge]; name += ic;
155 etaeta[ic][ipid][icharge]->SetName(name.Data());
156 etaeta[ic][ipid][icharge]->SetTitle(name.Data());
157 etaeta[ic][ipid][icharge]->Write();
158 TString name(pidName[ipid]);
159 name +=
"_PtEtaEta"; name += chargeName[icharge]; name += ic;
160 ptetaeta[ic][ipid][icharge]->SetName(name.Data());
161 ptetaeta[ic][ipid][icharge]->SetTitle(name.Data());
162 ptetaeta[ic][ipid][icharge]->Write();
164 TString name(pidName[ipid]);
165 name +=
"_NEtaEta"; name += chargeType[icharge]; name += ic;
166 etaetaC[ic][ipid][icharge]->SetName(name.Data());
167 etaetaC[ic][ipid][icharge]->SetTitle(name.Data());
168 etaetaC[ic][ipid][icharge]->Write();
169 TString name(pidName[ipid]);
170 name +=
"_PtEtaEta"; name += chargeType[icharge]; name += ic;
171 ptetaetaC[ic][ipid][icharge]->SetName(name.Data());
172 ptetaetaC[ic][ipid][icharge]->SetTitle(name.Data());
173 ptetaetaC[ic][ipid][icharge]->Write();
176 TString name(pidName[ipid]);
177 name +=
"_NPhiPhi"; name += chargeName[icharge]; name += ic;
178 phiphi[ic][ipid][icharge]->SetName(name.Data());
179 phiphi[ic][ipid][icharge]->SetTitle(name.Data());
180 phiphi[ic][ipid][icharge]->Write();
181 TString name(pidName[ipid]);
182 name +=
"_PtPhiPhi"; name += chargeName[icharge]; name += ic;
183 ptphiphi[ic][ipid][icharge]->SetName(name.Data());
184 ptphiphi[ic][ipid][icharge]->SetTitle(name.Data());
185 ptphiphi[ic][ipid][icharge]->Write();
187 TString name(pidName[ipid]);
188 name +=
"_NPhiPhi"; name += chargeType[icharge]; name += ic;
189 phiphiC[ic][ipid][icharge]->SetName(name.Data());
190 phiphiC[ic][ipid][icharge]->SetTitle(name.Data());
191 phiphiC[ic][ipid][icharge]->Write();
192 TString name(pidName[ipid]);
193 name +=
"_PtPhiPhi"; name += chargeType[icharge]; name += ic;
194 ptphiphiC[ic][ipid][icharge]->SetName(name.Data());
195 ptphiphiC[ic][ipid][icharge]->SetTitle(name.Data());
196 ptphiphiC[ic][ipid][icharge]->Write();
206 c1->SetWindowSize(350,350);
207 gStyle->SetOptTitle();
208 gStyle->SetTitleBorderSize(0)
211 const char* texPidName[]={
"all",
"#pi#pi",
"#piK",
"#piP",
"KK",
"KP",
"PP",
"noPID",};
212 const char* pidName[]={
"all",
"pipi",
"piK",
"piP",
"KK",
"KP",
"PP",
"noPID",};
213 const char* chargeName[] = {
"LS",
"US",
"CD",
"CI"};
214 const char* centName[] = {
"2-4",
"5-7",
"8-10",
"11-13",
"14-25"};
215 const char* centName[] = {
"0-5",
"5-10",
"10-20",
"20-30",
"30-40",
"40-50",
"50-60",
"60-70",
"70-80",
"80-90",
"90-100"};
216 const char* centName[] = {
"90-100" "80-90",
"70-80",
"60-70",
"50-60",
"40-50",
"30-40",
"20-30",
"10-20",
"5-10",
"0-5"};
217 const char* centName[] = {
"0-30",
"30-60",
"60-100"};
219 for (
int ipid=0;ipid<8;ipid++) {
220 for (
int icharge=0;icharge<4;icharge++) {
221 for (
int ic=0;ic<nCent;ic++) {
222 sprintf(label,
"N: %s, %s, multiplicity %s",texPidName[ipid],chargeName[icharge],centName[ic]);
223 dedp[ic][ipid][icharge]->SetTitle(label);
224 TAxis *x = dedp[ic][ipid][icharge]->GetXaxis();
225 TAxis *y = dedp[ic][ipid][icharge]->GetYaxis();
226 x->SetTitleSize(0.07);
228 x->SetTitleOffset(1.0);
229 x->SetNdivisions(505);
230 x->SetLabelSize(0.05);
231 x->SetTitle(
"#eta_{#Delta}");
232 y->SetTitleSize(0.07);
233 y->SetTitleOffset(1.0);
235 y->SetNdivisions(505);
236 y->SetLabelSize(0.05);
237 y->SetTitle(
"#phi_{#Delta}");
240 dedp[ic][ipid][icharge]->Draw(
"surf1");
241 sprintf(fileName,
"auto_N_%s-%s_%s.gif",pidName[ipid],chargeName[icharge],centName[ic]);
247 char textFileName[1024]
250 for (
int ipid=0;ipid<8;ipid++) {
251 for (
int icharge=0;icharge<4;icharge++) {
252 for (
int ic=0;ic<nCent;ic++) {
253 sprintf( textFileName,
"auto_N_%s-%s_%s.txt",pidName[ipid],chargeName[icharge],centName[ic]);
254 out = fopen(textFileName,
"w");
255 for (
int ix=1;ix<dedp[ic][ipid][icharge]->GetNbinsX();ix++) {
256 for (
int iy=1;iy<dedp[ic][ipid][icharge]->GetNbinsY();iy++) {
257 fprintf(out,
"%i %i %f\n",ix,iy,dedp[ic][ipid][icharge]->GetBinContent(ix,iy));