1 void combineHistograms9(
const char *dirName,
const char **inNames,
const char *outName,
int nCent) {
15 gROOT->LoadMacro(
"load2ptLibs.C");
17 gSystem->Load(
"StEStructPoolSupport.so");
38 const char* binName[]={
"all",
"soft",
"hard",
"below4",
"below3",
"below2",
"below1",
"above1",
"above2",
"above3",
"above4",
"one",
"onetwo",
"onethree",
"two",
"twothree",
"three"};
39 const char* chargeName[] = {
"_LS_",
"_US_",
"_CD_",
"_CI_"};
40 const char* chargeType[] = {
"_PP_",
"_PM_",
"_MP_",
"_MM_"};
41 char outFileName[1024];
42 sprintf(outFileName,
"%s/%s.root",dirName,outName);
43 TFile *out =
new TFile(outFileName,
"RECREATE");
45 char inFileName[1024];
48 for (
int ic=0;ic<nCent;ic++) {
49 printf(
"Centrality %2i: d2N/dEdP pHat_{A+} pHat_{A-} pHat_{B+} pHat_{B-}\n",ic);
50 for (
int ibin=0;ibin<17;ibin++) {
51 sprintf(inFileName,
"%s/%s%s.root",dirName,inNames[ic],binName[ibin]);
52 tf =
new TFile(inFileName);
55 ehelp->msilent =
true;
56 ehelp->mapplyDEtaFix =
false;
57 ehelp->mPairNormalization =
true;
58 ehelp->mIdenticalPair =
true;
62 ptsedpC = ehelp->buildPtCommon(
"SEtaDPhi",2,subtract);
63 ptdedpC = ehelp->buildPtCommon(
"DEtaDPhi",2,subtract);
64 ptetaetaC = ehelp->buildPtCommon(
"EtaEta",2,subtract);
65 ptphiphiC = ehelp->buildPtCommon(
"PhiPhi",2,subtract);
67 ptsedp = ehelp->buildPtChargeTypes(
"SEtaDPhi",2,subtract);
68 ptdedp = ehelp->buildPtChargeTypes(
"DEtaDPhi",2,subtract);
69 ptetaeta = ehelp->buildPtChargeTypes(
"EtaEta",2,subtract);
70 ptphiphi = ehelp->buildPtChargeTypes(
"PhiPhi",2,subtract);
72 sedpC = ehelp->buildCommon(
"SEtaDPhi",2);
73 dedpC = ehelp->buildCommon(
"DEtaDPhi",2);
74 etaetaC = ehelp->buildCommon(
"EtaEta",2);
75 phiphiC = ehelp->buildCommon(
"PhiPhi",2);
77 sedp = ehelp->buildChargeTypes(
"SEtaDPhi",2);
78 dedp = ehelp->buildChargeTypes(
"DEtaDPhi",2);
79 etaeta = ehelp->buildChargeTypes(
"EtaEta",2);
80 phiphi = ehelp->buildChargeTypes(
"PhiPhi",2);
83 for (
int icharge=0;icharge<4;icharge++) {
84 TString name(binName[ibin]);
85 name +=
"_NDEtaDPhi"; name += chargeName[icharge]; name += ic;
87 dedp[icharge]->SetName(name.Data());
88 dedp[icharge]->SetTitle(name.Data());
89 dedp[icharge]->Write();
91 TString name(binName[ibin]);
92 name +=
"_NSEtaDPhi"; name += chargeName[icharge]; name += ic;
94 sedp[icharge]->SetName(name.Data());
95 sedp[icharge]->SetTitle(name.Data());
96 sedp[icharge]->Write();
98 TString name(binName[ibin]);
99 name +=
"_PtDEtaDPhi"; name += chargeName[icharge]; name += ic;
101 ptdedp[icharge]->SetName(name.Data());
102 ptdedp[icharge]->SetTitle(name.Data());
103 ptdedp[icharge]->Write();
105 TString name(binName[ibin]);
106 name +=
"_PtSEtaDPhi"; name += chargeName[icharge]; name += ic;
108 ptsedp[icharge]->SetName(name.Data());
109 ptsedp[icharge]->SetTitle(name.Data());
110 ptsedp[icharge]->Write();
113 TString name(binName[ibin]);
114 name +=
"_NDEtaDPhi"; name += chargeType[icharge]; name += ic;
116 dedpC[icharge]->SetName(name.Data());
117 dedpC[icharge]->SetTitle(name.Data());
118 dedpC[icharge]->Write();
120 TString name(binName[ibin]);
121 name +=
"_NSEtaDPhi"; name += chargeType[icharge]; name += ic;
123 sedpC[icharge]->SetName(name.Data());
124 sedpC[icharge]->SetTitle(name.Data());
125 sedpC[icharge]->Write();
127 TString name(binName[ibin]);
128 name +=
"_PtDEtaDPhi"; name += chargeType[icharge]; name += ic;
130 ptdedpC[icharge]->SetName(name.Data());
131 ptdedpC[icharge]->SetTitle(name.Data());
132 ptdedpC[icharge]->Write();
134 TString name(binName[ibin]);
135 name +=
"_PtSEtaDPhi"; name += chargeType[icharge]; name += ic;
137 ptsedpC[icharge]->SetName(name.Data());
138 ptsedpC[icharge]->SetTitle(name.Data());
139 ptsedpC[icharge]->Write();
143 TString name(binName[ibin]);
144 name +=
"_NEtaEta"; name += chargeName[icharge]; name += ic;
146 etaeta[icharge]->SetName(name.Data());
147 etaeta[icharge]->SetTitle(name.Data());
148 etaeta[icharge]->Write();
150 TString name(binName[ibin]);
151 name +=
"_PtEtaEta"; name += chargeName[icharge]; name += ic;
153 ptetaeta[icharge]->SetName(name.Data());
154 ptetaeta[icharge]->SetTitle(name.Data());
155 ptetaeta[icharge]->Write();
158 TString name(binName[ibin]);
159 name +=
"_NEtaEta"; name += chargeType[icharge]; name += ic;
161 etaetaC[icharge]->SetName(name.Data());
162 etaetaC[icharge]->SetTitle(name.Data());
163 etaetaC[icharge]->Write();
165 TString name(binName[ibin]);
166 name +=
"_PtEtaEta"; name += chargeType[icharge]; name += ic;
168 ptetaetaC[icharge]->SetName(name.Data());
169 ptetaetaC[icharge]->SetTitle(name.Data());
170 ptetaetaC[icharge]->Write();
174 TString name(binName[ibin]);
175 name +=
"_NPhiPhi"; name += chargeName[icharge]; name += ic;
177 phiphi[icharge]->SetName(name.Data());
178 phiphi[icharge]->SetTitle(name.Data());
179 phiphi[icharge]->Write();
181 TString name(binName[ibin]);
182 name +=
"_PtPhiPhi"; name += chargeName[icharge]; name += ic;
184 ptphiphi[icharge]->SetName(name.Data());
185 ptphiphi[icharge]->SetTitle(name.Data());
186 ptphiphi[icharge]->Write();
189 TString name(binName[ibin]);
190 name +=
"_NPhiPhi"; name += chargeType[icharge]; name += ic;
192 phiphiC[icharge]->SetName(name.Data());
193 phiphiC[icharge]->SetTitle(name.Data());
194 phiphiC[icharge]->Write();
196 TString name(binName[ibin]);
197 name +=
"_PtPhiPhi"; name += chargeType[icharge]; name += ic;
199 ptphiphiC[icharge]->SetName(name.Data());
200 ptphiphiC[icharge]->SetTitle(name.Data());
201 ptphiphiC[icharge]->Write();
205 double scale = ehelp->getCIdNdEtadPhi();
206 double *ptHat = ehelp->getptHat();
207 printf(
" bin %8s %7.3f %7.3f %7.3f %7.3f %7.3f\n",binName[ibin],scale,ptHat[0],ptHat[1],ptHat[2],ptHat[3]);