3 #include "StEStructFluctuations.h"
16 float EtaMin,
float EtaMax,
17 float PtMin,
float PtMax ) {
28 StEStructFluct::~StEStructFluct() {
34 void StEStructFluct::AddToBin(
int jBin,
35 double Nplus,
double Nminus,
36 double Ptplus,
double Ptminus,
37 double PtSqplus,
double PtSqminus ) {
43 double Nsum = Nplus + Nminus;
48 double Ndiff = Nplus - Nminus;
49 double Ptsum = Ptplus + Ptminus;
50 double Ptdiff = Ptplus - Ptminus;
51 double PtSqsum = PtSqplus + PtSqminus;
52 double sqs = sqrt(Nsum);
53 double sqp = sqrt(Nplus);
54 double sqm = sqrt(Nminus);
61 NSum[0][jBin] += Nplus;
62 NSum[1][jBin] += Nminus;
63 NSum[2][jBin] += Nplus*Nplus;
64 NSum[3][jBin] += Nplus*Nminus;
65 NSum[4][jBin] += Nminus*Nminus;
66 NSum[5][jBin] += Nplus*Nplus/Nsum;
67 NSum[6][jBin] += Nplus*Nminus/Nsum;
68 NSum[7][jBin] += Nminus*Nminus/Nsum;
69 NSum[8][jBin] += Nplus*Nplus/(Nsum*Nsum);
70 NSum[9][jBin] += Nplus*Nminus/(Nsum*Nsum);
71 NSum[10][jBin] += Nminus*Nminus/(Nsum*Nsum);
72 NSum[11][jBin] += Nplus/sqs;
73 NSum[12][jBin] += Nplus*sqs;
74 NSum[13][jBin] += Nminus/sqs;
75 NSum[14][jBin] += Nminus*sqs;
78 PSum[0][jBin] += PtSqsum;
79 PSum[1][jBin] += Ptplus;
80 PSum[2][jBin] += Ptminus;
81 PSum[3][jBin] += Nplus*Ptsum;
82 PSum[4][jBin] += Nminus*Ptsum;
83 PSum[5][jBin] += Ptsum*Ptsum;
84 PSum[6][jBin] += Nplus*Ptsum/Nsum;
85 PSum[7][jBin] += Nminus*Ptsum/Nsum;
86 PSum[8][jBin] += Ptsum*Ptsum/Nsum;
87 PSum[12][jBin] += r*Ptsum/Nsum;
88 PSum[13][jBin] += r*r/Nsum;
89 PSum[14][jBin] += Ptsum/sqs;
90 PSum[15][jBin] += Ptsum*sqs;
93 NDiff[0][jBin] += Nplus*Ndiff/sqs;
94 NDiff[1][jBin] += Nminus*Ndiff/sqs;
96 double r1 = Ptdiff*Ptdiff/Nsum;
97 double r2 = Ptdiff*Ndiff/Nsum;
98 double r3 = Ndiff*Ndiff/Nsum;
99 PDiff[0][jBin] += Nplus*Ptdiff;
100 PDiff[1][jBin] += Nminus*Ptdiff;
101 PDiff[2][jBin] += Ptdiff*Ptdiff;
102 PDiff[3][jBin] += Nplus*Ptdiff/Nsum;
103 PDiff[4][jBin] += Nminus*Ptdiff/Nsum;
104 PDiff[5][jBin] += Ptdiff*Ptdiff/Nsum;
105 PDiff[6][jBin] += Nplus*Ptdiff/(Nsum*Nsum);
106 PDiff[7][jBin] += Nminus*Ptdiff/(Nsum*Nsum);
107 PDiff[8][jBin] += Ptdiff*Ptdiff/(Nsum*Nsum);
108 PDiff[9][jBin] += Ptdiff/sqs;
109 PDiff[10][jBin] += Ndiff*Ptdiff/sqs;
110 PDiff[11][jBin] += r1*r1/Nsum;
111 PDiff[12][jBin] += r1*r2/Nsum;
112 PDiff[13][jBin] += r1*r3/Nsum;
113 PDiff[14][jBin] += r2*r3/Nsum;
114 PDiff[15][jBin] += r3*r3/Nsum;
117 TotEvents[5][jBin]++;
118 NSum[15][jBin] += 1.0/(Nsum-1.0);
119 PSum[9][jBin] += Nsum/(Nsum-1.0);
120 PSum[10][jBin] += Ptsum/(Nsum-1.0);
121 PSum[11][jBin] += Ptsum*Ptsum/(Nsum*(Nsum-1.0));
122 PSum[16][jBin] += Nsum;
123 PSum[17][jBin] += Ptsum;
124 PSum[18][jBin] += PtSqsum;
125 PSum[19][jBin] += PtSqsum/(Nsum*(Nsum-1.0));
126 PSum[20][jBin] += Ptsum/(Nsum*(Nsum-1.0));
130 TotEvents[2][jBin]++;
132 NPlus[0][jBin] += Nplus;
133 NPlus[1][jBin] += Nplus*Nplus;
134 NPlus[2][jBin] += sqp;
135 NPlus[3][jBin] += Nplus*sqp;
136 NPlus[4][jBin] += 1/Nplus;
138 r = Ptplus*Ptplus/Nplus;
139 PPlus[0][jBin] += PtSqplus;
140 PPlus[1][jBin] += Ptplus;
141 PPlus[2][jBin] += Ptplus*Nplus;
142 PPlus[3][jBin] += Ptplus/Nplus;
143 PPlus[4][jBin] += Ptplus*Ptplus;
145 PPlus[6][jBin] += r/Nplus;
146 PPlus[7][jBin] += r*Ptplus/Nplus;
147 PPlus[8][jBin] += r*r/Nplus;
148 PPlus[9][jBin] += Ptplus/sqp;
149 PPlus[10][jBin] += Ptplus*sqp;
153 TotEvents[3][jBin]++;
155 NMinus[0][jBin] += Nminus;
156 NMinus[1][jBin] += Nminus*Nminus;
157 NMinus[2][jBin] += sqm;
158 NMinus[3][jBin] += Nminus*sqm;
159 NMinus[4][jBin] += 1/Nminus;
161 r = Ptminus*Ptminus/Nminus;
162 PMinus[0][jBin] += PtSqminus;
163 PMinus[1][jBin] += Ptminus;
164 PMinus[2][jBin] += Ptminus*Nminus;
165 PMinus[3][jBin] += Ptminus/Nminus;
166 PMinus[4][jBin] += Ptminus*Ptminus;
167 PMinus[5][jBin] += r;
168 PMinus[6][jBin] += r/Nminus;
169 PMinus[7][jBin] += r*Ptminus/Nminus;
170 PMinus[8][jBin] += r*r/Nminus;
171 PMinus[9][jBin] += Ptminus/sqm;
172 PMinus[10][jBin] += Ptminus*sqm;
175 if ((Nplus > 0) || (Nminus > 0)) {
176 TotEvents[4][jBin]++;
178 NPlusMinus[0][jBin] += Nplus;
179 NPlusMinus[1][jBin] += Nminus;
180 NPlusMinus[2][jBin] += Nplus*Nminus;
181 NPlusMinus[3][jBin] += sqp;
182 NPlusMinus[4][jBin] += sqm;
183 NPlusMinus[5][jBin] += sqp*sqm;
184 NPlusMinus[6][jBin] += Nminus*sqp;
185 NPlusMinus[7][jBin] += Nplus*sqm;
187 PPlusMinus[0][jBin] += Ptplus;
188 PPlusMinus[1][jBin] += Ptminus;
189 PPlusMinus[4][jBin] += Nplus*Ptminus;
190 PPlusMinus[5][jBin] += Nminus*Ptplus;
191 PPlusMinus[14][jBin] += Ptplus*Ptminus;
193 PPlusMinus[2][jBin] += Ptplus/Nplus;
194 PPlusMinus[6][jBin] += Ptplus/sqp;
195 PPlusMinus[8][jBin] += Ptplus*Nminus/Nplus;
196 PPlusMinus[10][jBin] += Ptplus*sqm/sqp;
197 PPlusMinus[12][jBin] += Ptplus*Nminus/sqp;
200 PPlusMinus[3][jBin] += Ptminus/Nminus;
201 PPlusMinus[7][jBin] += Ptminus/sqm;
202 PPlusMinus[9][jBin] += Ptminus*Nplus/Nminus;
203 PPlusMinus[11][jBin] += Ptminus*sqp/sqm;
204 PPlusMinus[13][jBin] += Ptminus*Nplus/sqm;
206 if ((Nplus > 0) && (Nminus > 0)) {
207 PPlusMinus[15][jBin] += Ptplus*Ptminus/(Nplus*Nminus);
208 PPlusMinus[16][jBin] += Ptplus*Ptminus/(sqp*sqm);
212 void StEStructFluct::fillOccupancies(
double dPhi,
double dEta,
213 double nPlus,
double nMinus,
214 double pPlus,
double pMinus ) {
215 double ns = nPlus + nMinus;
216 double nd = nPlus - nMinus;
217 double ps = pPlus + pMinus;
218 double pd = pPlus - pMinus;
219 occNSum->Fill(dPhi,dEta,ns);
220 occNPlus->Fill(dPhi,dEta,nPlus);
221 occNMinus->Fill(dPhi,dEta,nMinus);
222 occNDiff->Fill(dPhi,dEta,nd);
223 occPSum->Fill(dPhi,dEta,ps);
224 occPPlus->Fill(dPhi,dEta,pPlus);
225 occPMinus->Fill(dPhi,dEta,pMinus);
226 occPDiff->Fill(dPhi,dEta,pd);
227 occPNSum->Fill(dPhi,dEta,ns*ps);
228 occPNPlus->Fill(dPhi,dEta,nPlus*pPlus);
229 occPNMinus->Fill(dPhi,dEta,nMinus*pMinus);
230 occPNDiff->Fill(dPhi,dEta,nd*pd);
232 void StEStructFluct::fillMults(
double nPlus,
double nMinus,
233 double pPlus,
double pMinus ) {
234 double ns = nPlus + nMinus;
235 double nd = nPlus - nMinus;
236 double ps = pPlus + pMinus;
237 double pd = pPlus - pMinus;
239 multNPlus->Fill(nPlus);
240 multNMinus->Fill(nMinus);
243 multPPlus->Fill(pPlus);
244 multPMinus->Fill(pMinus);
247 void StEStructFluct::fillEtaZ(
float z,
float eta,
248 int maxFitPoints,
int foundPoints,
int nFitPoints,
250 EtaZNTracks->Fill(z,eta);
251 EtaZNMaxPoints->Fill(z,eta,maxFitPoints);
252 EtaZNFoundPoints->Fill(z,eta,foundPoints);
253 EtaZNFitPoints->Fill(z,eta,nFitPoints);
254 InnerRow->Fill(z,eta,iF);
255 OuterRow->Fill(z,eta,iL);
257 void StEStructFluct::fillPtHist(
double Pt,
int sign ) {
266 void StEStructFluct::fillPhiHist(
double Phi,
int sign ) {
274 void StEStructFluct::fillEtaHist(
double Eta,
int sign ) {
288 void StEStructFluct::writeHistograms() {
293 for (
int jStat=0;jStat<6;jStat++) {
294 hTotEvents[jStat]->Write();
297 for (
int jStat=0;jStat<16;jStat++) {
298 hNSum[jStat]->Write();
300 for (
int jStat=0;jStat<2;jStat++) {
301 hNDiff[jStat]->Write();
303 for (
int jStat=0;jStat<5;jStat++) {
304 hNPlus[jStat]->Write();
305 hNMinus[jStat]->Write();
307 for (
int jStat=0;jStat<8;jStat++) {
308 hNPlusMinus[jStat]->Write();
310 for (
int jStat=0;jStat<21;jStat++) {
311 hPSum[jStat]->Write();
313 for (
int jStat=0;jStat<16;jStat++) {
314 hPDiff[jStat]->Write();
316 for (
int jStat=0;jStat<11;jStat++) {
317 hPPlus[jStat]->Write();
318 hPMinus[jStat]->Write();
320 for (
int jStat=0;jStat<17;jStat++) {
321 hPPlusMinus[jStat]->Write();
324 void StEStructFluct::fillHistograms() {
328 for (
int jStat=0;jStat<6;jStat++) {
329 for (
int jBin=0;jBin<mTotBins;jBin++) {
330 hTotEvents[jStat]->SetBinContent(jBin+1,TotEvents[jStat][jBin]);
334 for (
int jStat=0;jStat<16;jStat++) {
335 for (
int jBin=0;jBin<mTotBins;jBin++) {
336 hNSum[jStat]->SetBinContent(jBin+1,NSum[jStat][jBin]);
339 for (
int jStat=0;jStat<2;jStat++) {
340 for (
int jBin=0;jBin<mTotBins;jBin++) {
341 hNDiff[jStat]->SetBinContent(jBin+1,NDiff[jStat][jBin]);
344 for (
int jStat=0;jStat<5;jStat++) {
345 for (
int jBin=0;jBin<mTotBins;jBin++) {
346 hNPlus[jStat]->SetBinContent(jBin+1,NPlus[jStat][jBin]);
347 hNMinus[jStat]->SetBinContent(jBin+1,NMinus[jStat][jBin]);
350 for (
int jStat=0;jStat<8;jStat++) {
351 for (
int jBin=0;jBin<mTotBins;jBin++) {
352 hNPlusMinus[jStat]->SetBinContent(jBin+1,NPlusMinus[jStat][jBin]);
355 for (
int jStat=0;jStat<21;jStat++) {
356 for (
int jBin=0;jBin<mTotBins;jBin++) {
357 hPSum[jStat]->SetBinContent(jBin+1,PSum[jStat][jBin]);
360 for (
int jStat=0;jStat<16;jStat++) {
361 for (
int jBin=0;jBin<mTotBins;jBin++) {
362 hPDiff[jStat]->SetBinContent(jBin+1,PDiff[jStat][jBin]);
365 for (
int jStat=0;jStat<11;jStat++) {
366 for (
int jBin=0;jBin<mTotBins;jBin++) {
367 hPPlus[jStat]->SetBinContent(jBin+1,PPlus[jStat][jBin]);
368 hPMinus[jStat]->SetBinContent(jBin+1,PMinus[jStat][jBin]);
371 for (
int jStat=0;jStat<17;jStat++) {
372 for (
int jBin=0;jBin<mTotBins;jBin++) {
373 hPPlusMinus[jStat]->SetBinContent(jBin+1,PPlusMinus[jStat][jBin]);
377 void StEStructFluct::writeQAHistograms() {
390 EtaZNTracks->Write();
391 EtaZNFitPoints->Write();
392 EtaZNMaxPoints->Write();
393 EtaZNFoundPoints->Write();
414 void StEStructFluct::initArrays() {
418 sprintf( line,
"occNSum_%s", mKey );
419 occNSum =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
420 sprintf( line,
"occNPlus_%s", mKey );
421 occNPlus =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
422 sprintf( line,
"occNMinus_%s", mKey );
423 occNMinus =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
424 sprintf( line,
"occNDiff_%s", mKey );
425 occNDiff =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
426 sprintf( line,
"occPSum_%s", mKey );
427 occPSum =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
428 sprintf( line,
"occPPlus_%s", mKey );
429 occPPlus =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
430 sprintf( line,
"occPMinus_%s", mKey );
431 occPMinus =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
432 sprintf( line,
"occPDiff_%s", mKey );
433 occPDiff =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
434 sprintf( line,
"occPNSum_%s", mKey );
435 occPNSum =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
436 sprintf( line,
"occPNPlus_%s", mKey );
437 occPNPlus =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
438 sprintf( line,
"occPNMinus_%s", mKey );
439 occPNMinus =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
440 sprintf( line,
"occPNDiff_%s", mKey );
441 occPNDiff =
new TH2F(line,line,NPHIBINS,-3.1415926,3.1415926,NETABINS,mEtaMin,mEtaMax);
443 sprintf( line,
"EtaZNTracks_%s", mKey );
444 EtaZNTracks =
new TH2F(line,line,60,-30,30,50,mEtaMin,mEtaMax);
445 sprintf( line,
"EtaZNFitPoints_%s", mKey );
446 EtaZNFitPoints =
new TH2F(line,line,60,-30,30,50,mEtaMin,mEtaMax);
447 sprintf( line,
"EtaZNMaxPoints_%s", mKey );
448 EtaZNMaxPoints =
new TH2F(line,line,60,-30,30,50,mEtaMin,mEtaMax);
449 sprintf( line,
"EtaZNFoundPoints_%s", mKey );
450 EtaZNFoundPoints =
new TH2F(line,line,60,-30,30,50,mEtaMin,mEtaMax);
451 sprintf( line,
"InnerRow_%s", mKey );
452 InnerRow =
new TH2F(line,line,60,-30,30,50,mEtaMin,mEtaMax);
453 sprintf( line,
"OuterRow_%s", mKey );
454 OuterRow =
new TH2F(line,line,60,-30,30,50,mEtaMin,mEtaMax);
456 sprintf( line,
"multNSum_%s", mKey );
457 multNSum =
new TH1F(line,line,150,0,1500);
458 sprintf( line,
"multNPlus_%s", mKey );
459 multNPlus =
new TH1F(line,line,100,0,1000);
460 sprintf( line,
"multNMinus_%s", mKey );
461 multNMinus =
new TH1F(line,line,100,0,1000);
462 sprintf( line,
"multNDiff_%s", mKey );
463 multNDiff =
new TH1F(line,line,100,-200,200);
464 sprintf( line,
"multPSum_%s", mKey );
465 multPSum =
new TH1F(line,line,100,0,1000);
466 sprintf( line,
"multPPlus_%s", mKey );
467 multPPlus =
new TH1F(line,line,100,0,1000);
468 sprintf( line,
"multPMinus_%s", mKey );
469 multPMinus =
new TH1F(line,line,100,0,1000);
470 sprintf( line,
"multPDiff_%s", mKey );
471 multPDiff =
new TH1F(line,line,100,-200,200);
473 sprintf( line,
"ptAll_%s", mKey );
474 ptAll =
new TH1F(line,line,100,mPtMin,mPtMax);
475 sprintf( line,
"ptPlus_%s", mKey );
476 ptPlus =
new TH1F(line,line,100,mPtMin,mPtMax);
477 sprintf( line,
"ptMinus_%s", mKey );
478 ptMinus =
new TH1F(line,line,100,mPtMin,mPtMax);
479 sprintf( line,
"phiPlus_%s", mKey );
480 phiPlus =
new TH1F(line,line,100,-3.1415926,3.1415926);
481 sprintf( line,
"phiMinus_%s", mKey );
482 phiMinus =
new TH1F(line,line,100,-3.1415926,3.1415926);
483 sprintf( line,
"etaPlus_%s", mKey );
484 etaPlus =
new TH1F(line,line,100,mEtaMin,mEtaMax);
485 sprintf( line,
"etaMinus_%s", mKey );
486 etaMinus =
new TH1F(line,line,100,mEtaMin,mEtaMax);
488 printf(
"Allocating arrays to store info.\n");
489 for (
int jStat=0;jStat<6;jStat++) {
490 TotEvents[jStat] =
new double[mTotBins];
491 memset(TotEvents[jStat], 0,
sizeof(
double)*mTotBins );
494 for (
int jStat=0;jStat<16;jStat++) {
495 NSum[jStat] =
new double[mTotBins];
496 memset(NSum[jStat], 0,
sizeof(
double)*mTotBins );
498 for (
int jStat=0;jStat<2;jStat++) {
499 NDiff[jStat] =
new double[mTotBins];
500 memset(NDiff[jStat], 0,
sizeof(
double)*mTotBins );
502 for (
int jStat=0;jStat<5;jStat++) {
503 NPlus[jStat] =
new double[mTotBins];
504 memset(NPlus[jStat], 0,
sizeof(
double)*mTotBins );
505 NMinus[jStat] =
new double[mTotBins];
506 memset(NMinus[jStat], 0,
sizeof(
double)*mTotBins );
508 for (
int jStat=0;jStat<8;jStat++) {
509 NPlusMinus[jStat] =
new double[mTotBins];
510 memset(NPlusMinus[jStat], 0,
sizeof(
double)*mTotBins );
512 for (
int jStat=0;jStat<21;jStat++) {
513 PSum[jStat] =
new double[mTotBins];
514 memset(PSum[jStat], 0,
sizeof(
double)*mTotBins );
516 for (
int jStat=0;jStat<16;jStat++) {
517 PDiff[jStat] =
new double[mTotBins];
518 memset(PDiff[jStat], 0,
sizeof(
double)*mTotBins );
520 for (
int jStat=0;jStat<11;jStat++) {
521 PPlus[jStat] =
new double[mTotBins];
522 memset(PPlus[jStat], 0,
sizeof(
double)*mTotBins );
523 PMinus[jStat] =
new double[mTotBins];
524 memset(PMinus[jStat], 0,
sizeof(
double)*mTotBins );
526 for (
int jStat=0;jStat<17;jStat++) {
527 PPlusMinus[jStat] =
new double[mTotBins];
528 memset(PPlusMinus[jStat], 0,
sizeof(
double)*mTotBins );
533 void StEStructFluct::deleteArrays() {
535 printf(
"Deleting occupancy histograms.\n");
549 delete EtaZNFitPoints;
550 delete EtaZNMaxPoints;
551 delete EtaZNFoundPoints;
570 printf(
"freeing Arrays.\n");
571 for (
int jStat=0;jStat<6;jStat++) {
572 delete [] TotEvents[jStat];
575 for (
int jStat=0;jStat<16;jStat++) {
576 delete [] NSum[jStat];
578 for (
int jStat=0;jStat<2;jStat++) {
579 delete [] NDiff[jStat];
581 for (
int jStat=0;jStat<5;jStat++) {
582 delete [] NPlus[jStat];
583 delete [] NMinus[jStat];
585 for (
int jStat=0;jStat<8;jStat++) {
586 delete [] hNPlusMinus[jStat];
588 for (
int jStat=0;jStat<21;jStat++) {
589 delete [] PSum[jStat];
591 for (
int jStat=0;jStat<16;jStat++) {
592 delete [] PDiff[jStat];
594 for (
int jStat=0;jStat<11;jStat++) {
595 delete [] PPlus[jStat];
596 delete [] PMinus[jStat];
598 for (
int jStat=0;jStat<17;jStat++) {
599 delete [] PPlusMinus[jStat];
604 void StEStructFluct::initHistograms() {
607 printf(
"Allocating histograms for I/O for key %s\n", mKey);
608 sprintf( line,
"TotalEvents_%s", mKey);
609 hTotEvents[0] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
610 sprintf( line,
"TotalSumEvents_%s", mKey);
611 hTotEvents[1] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
612 sprintf( line,
"TotalPlusEvents_%s", mKey);
613 hTotEvents[2] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
614 sprintf( line,
"TotalMinusEvents_%s", mKey);
615 hTotEvents[3] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
616 sprintf( line,
"TotalPlusMinusEvents_%s", mKey);
617 hTotEvents[4] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
618 sprintf( line,
"TotalEventsForSig2Dyn_%s", mKey);
619 hTotEvents[5] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
621 for (
int jStat=0;jStat<16;jStat++) {
622 sprintf( line,
"NSum%s_%i", mKey, jStat );
623 hNSum[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
625 for (
int jStat=0;jStat<2;jStat++) {
626 sprintf( line,
"NDiff%s_%i", mKey, jStat );
627 hNDiff[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
629 for (
int jStat=0;jStat<5;jStat++) {
630 sprintf( line,
"NPlus%s_%i", mKey, jStat );
631 hNPlus[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
632 sprintf( line,
"NMinus%s_%i", mKey, jStat );
633 hNMinus[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
635 for (
int jStat=0;jStat<8;jStat++) {
636 sprintf( line,
"NPlusMinus%s_%i", mKey, jStat );
637 hNPlusMinus[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
639 for (
int jStat=0;jStat<21;jStat++) {
640 sprintf( line,
"PSum%s_%i", mKey, jStat );
641 hPSum[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
643 for (
int jStat=0;jStat<16;jStat++) {
644 sprintf( line,
"PDiff%s_%i", mKey, jStat );
645 hPDiff[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
647 for (
int jStat=0;jStat<11;jStat++) {
648 sprintf( line,
"PPlus%s_%i", mKey, jStat );
649 hPPlus[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
650 sprintf( line,
"PMinus%s_%i", mKey, jStat );
651 hPMinus[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
653 for (
int jStat=0;jStat<17;jStat++) {
654 sprintf( line,
"PPlusMinus%s_%i", mKey, jStat );
655 hPPlusMinus[jStat] =
new TH1D(line,line,mTotBins,0.5,mTotBins+0.5);
660 void StEStructFluct::deleteHistograms() {
662 printf(
"freeing h Array histograms.\n");
663 for (
int jStat=0;jStat<6;jStat++) {
664 delete hTotEvents[jStat];
667 for (
int jStat=0;jStat<16;jStat++) {
670 for (
int jStat=0;jStat<2;jStat++) {
671 delete hNDiff[jStat];
673 for (
int jStat=0;jStat<5;jStat++) {
674 delete hNPlus[jStat];
675 delete hNMinus[jStat];
677 for (
int jStat=0;jStat<8;jStat++) {
678 delete hNPlusMinus[jStat];
680 for (
int jStat=0;jStat<21;jStat++) {
683 for (
int jStat=0;jStat<16;jStat++) {
684 delete hPDiff[jStat];
686 for (
int jStat=0;jStat<11;jStat++) {
687 delete hPPlus[jStat];
688 delete hPMinus[jStat];
690 for (
int jStat=0;jStat<17;jStat++) {
691 delete hPPlusMinus[jStat];