28 #include "StEStruct2ptCorrelations.h"
36 #include "StEStructPool/EventMaker/StEStructEvent.h"
37 #include "StEStructPool/EventMaker/StEStructTrack.h"
38 #include "StEStructPool/Correlations/StEStructMaxB.h"
39 #include "StEStructPool/Correlations/StEStructBuffer.h"
42 #include "StEStructCutBin.h"
46 #include "StMessMgr.h"
54 StEStruct2ptCorrelations::StEStruct2ptCorrelations(
int mode) {
63 StEStruct2ptCorrelations::StEStruct2ptCorrelations(
StEStructPairCuts* pcuts,
int mode) {
71 void StEStruct2ptCorrelations::initInternalData(){
78 mqaoutFileName = NULL;
81 mskipPairCuts =
false;
82 mdoPairCutHistograms =
false;
83 mdoPairDensityHistograms =
false;
84 mskipEtaDeltaWeight =
false;
85 mdoInvariantMassHistograms =
false;
86 mdoFillEtaEta =
false;
87 mdoFillSumHistograms =
false;
88 mdontFillMeanPt =
false;
89 mdontFillYtYt =
false;
95 mHistosWritten =
false;
96 mlocalQAHists =
false;
102 kNumBuffers = int( (kZBuffMax-kZBuffMin)/kBuffWidth );
104 mZBufferCutBinning = 0;
110 StEStruct2ptCorrelations::~StEStruct2ptCorrelations(){ cleanUp(); };
113 void StEStruct2ptCorrelations::init() {
115 cout <<
"Initializing with analysis mode " << manalysisMode << endl;
116 cout <<
"Use Z Buffer cut binning = " << mZBufferCutBinning << endl;
122 const char* _tmpName[]={
"Sibpp",
"Sibpm",
"Sibmp",
"Sibmm",
"Mixpp",
"Mixpm",
"Mixmp",
"Mixmm"};
123 const char* _tmpTitle[]={
"Sibling : +.+",
"Sibling : +.-",
"Sibling : -.+",
"Sibling : -.-",
124 "Mixed : +.+",
"Mixed : +.-",
"Mixed : -.+",
"Mixed : -.-"};
126 for(
int i=0;i<8;i++){
127 bName[i]=
new char[6];
128 strcpy(bName[i],_tmpName[i]);
129 bTitle[i]=
new char[20];
130 strcpy(bTitle[i],_tmpTitle[i]);
133 if (manalysisMode & 0x1) {
136 if (manalysisMode & 0x2) {
137 mdoPairCutHistograms=
true;
139 if (manalysisMode & 0x4) {
140 mdoPairDensityHistograms=
true;
142 if (manalysisMode & 0x8) {
143 mskipEtaDeltaWeight =
true;
145 if (manalysisMode & 0x10) {
146 mdoInvariantMassHistograms =
true;
148 if (manalysisMode & 0x20) {
149 mdoFillEtaEta =
true;
151 if (manalysisMode & 0x40) {
152 mdoFillSumHistograms =
true;
154 if (manalysisMode & 0x80) {
155 mdontFillMeanPt =
true;
157 if (manalysisMode & 0x100) {
158 mdontFillYtYt =
true;
160 if (manalysisMode & 0x200) {
163 if (manalysisMode & 0x400) {
167 cout <<
" Skip Pair Cuts = " << mskipPairCuts << endl;
168 cout <<
" Do Pair Cut Hists = " << mdoPairCutHistograms << endl;
169 cout <<
" Do Pair Density Hists = " << mdoPairDensityHistograms << endl;
170 cout <<
" Skip EtaDelta weights = " << mskipEtaDeltaWeight << endl;
171 cout <<
" Do Invariant mass histograms = " << mdoInvariantMassHistograms << endl;
172 cout <<
" Fill EtaEta (and PhiPhi) = " << mdoFillEtaEta << endl;
173 cout <<
" Fill Sum Histograms (SYt, SEta) = " << mdoFillSumHistograms << endl;
174 cout <<
" Don't fill mean pt histograms = " << mdontFillMeanPt << endl;
175 cout <<
" Don't fill YtYt histograms = " << mdontFillYtYt << endl;
176 cout <<
" Fill QInv histograms = " << mFillQInv << endl;
177 cout <<
" Fill AS,SS (eta,eta) histograms = " << mFillASSS << endl;
178 if (mdoPairCutHistograms) {
179 cout <<
" >>>>> You have tried to turn on Pair Cut Histograms. Those have not been re-implemented yet. " << endl;
180 cout <<
" >>>>> If you really want them we should do something about it. " << endl;
181 mdoPairCutHistograms =
false;
184 for(
int i=0;i<8;i++)numPairs[i]=numPairsProcessed[i]=mpossiblePairs[i]=0;
190 TH1::AddDirectory(kFALSE);
196 if (mZBufferCutBinning) {
197 nZBins = kNumBuffers;
199 mHNEventsSib =
new TH1D*[nZBins];
200 mHNEventsMix =
new TH1D*[nZBins];
201 mHNEventsPosSib =
new TH1D*[nZBins];
202 mHNEventsPosMix =
new TH1D*[nZBins];
203 mHNEventsNegSib =
new TH1D*[nZBins];
204 mHNEventsNegMix =
new TH1D*[nZBins];
205 for (
int iz=0;iz<nZBins;iz++) {
206 sprintf(name,
"NEventsSib_zBuf_%i",iz);
207 mHNEventsSib[iz]=
new TH1D(name,name,1000,0.,2000.);
208 sprintf(name,
"NEventsMix_zBuf_%i",iz);
209 mHNEventsMix[iz]=
new TH1D(name,name,1000,0.,2000.);
210 sprintf(name,
"NEventsPosSib_zBuf_%i",iz);
211 mHNEventsPosSib[iz]=
new TH1D(name,name,1000,0.,2000.);
212 sprintf(name,
"NEventsPosMix_zBuf_%i",iz);
213 mHNEventsPosMix[iz]=
new TH1D(name,name,1000,0.,2000.);
214 sprintf(name,
"NEventsNegSib_zBuf_%i",iz);
215 mHNEventsNegSib[iz]=
new TH1D(name,name,1000,0.,2000.);
216 sprintf(name,
"NEventsNegMix_zBuf_%i",iz);
217 mHNEventsNegMix[iz]=
new TH1D(name,name,1000,0.,2000.);
221 if (mReader->mTCuts) {
222 cb->setMaxDEta(mReader->mTCuts->maxVal(
"Eta")-mReader->mTCuts->minVal(
"Eta"));
224 int ncutbins = cb->getNumBins();
225 int nQAbins = cb->getNumQABins();
229 if (mdoInvariantMassHistograms) {
230 cb->setCutBinHistMode(1);
231 cb->initCutBinHists();
233 cb->setCutBinHistMode(0);
238 mlocalQAHists =
true;
239 cout<<
"creating QA hists"<<endl;
241 mQAHists->initTrackHistograms(nQAbins,analysisIndex());
243 cout<<
"init QA Hists"<<endl;
244 mQAHists->initTrackHistograms(nQAbins);
248 mHptAll =
new TH1D(
"ptAll",
"ptAll",500,0,10.);
255 int numParentBins=cb->getNumParentBins();
257 if (mZBufferCutBinning) {
261 mHMeanPtTot =
new TH1D*[numParentBins*nzb];
262 mHMeanPtP =
new TH1D*[numParentBins*nzb];
263 mHMeanPtM =
new TH1D*[numParentBins*nzb];
264 mHMeanYtTot =
new TH1D*[numParentBins*nzb];
265 mHMeanYtP =
new TH1D*[numParentBins*nzb];
266 mHMeanYtM =
new TH1D*[numParentBins*nzb];
267 mHEtaTot =
new TH1D*[numParentBins*nzb];
268 mHEtaP =
new TH1D*[numParentBins*nzb];
269 mHEtaM =
new TH1D*[numParentBins*nzb];
272 if (mReader->mTCuts) {
273 b->setEtaRange(mReader->mTCuts->minVal(
"Eta"),mReader->mTCuts->maxVal(
"Eta"));
275 for(
int p=0;p<numParentBins;p++){
276 for (
int z=0;z<nzb;z++) {
278 hname =
"meanPtTot_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
279 mHMeanPtTot[pz] =
new TH1D(hname.Data(),hname.Data(),200,b->ptMin(),b->ptMax());
280 hname =
"meanPtP_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
281 mHMeanPtP[pz] =
new TH1D(hname.Data(),hname.Data(),200,b->ptMin(),b->ptMax());
282 hname =
"meanPtM_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
283 mHMeanPtM[pz] =
new TH1D(hname.Data(),hname.Data(),200,b->ptMin(),b->ptMax());
284 hname =
"meanYtTot_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
285 mHMeanYtTot[pz] =
new TH1D(hname.Data(),hname.Data(),200,b->ytMin(),b->ytMax());
286 hname =
"meanYtP_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
287 mHMeanYtP[pz] =
new TH1D(hname.Data(),hname.Data(),200,b->ytMin(),b->ytMax());
288 hname =
"meanYtM_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
289 mHMeanYtM[pz] =
new TH1D(hname.Data(),hname.Data(),200,b->ytMin(),b->ytMax());
290 hname =
"etaTot_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
291 mHEtaTot[pz] =
new TH1D(hname.Data(),hname.Data(),100,b->etaMin(),b->etaMax());
292 hname =
"etaP_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
293 mHEtaP[pz] =
new TH1D(hname.Data(),hname.Data(),100,b->etaMin(),b->etaMax());
294 hname =
"etaM_parentBin"; hname += p; hname +=
"_zBuf_"; hname += z;
295 mHEtaM[pz] =
new TH1D(hname.Data(),hname.Data(),100,b->etaMin(),b->etaMax());
298 hname =
"ptTot_toward";
299 mHPtTot[0] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
300 hname =
"ptP_toward";
301 mHPtP[0] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
302 hname =
"ptM_toward";
303 mHPtM[0] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
304 hname =
"ptTot_transverse";
305 mHPtTot[1] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
306 hname =
"ptP_transverse";
307 mHPtP[1] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
308 hname =
"ptM_transverse";
309 mHPtM[1] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
310 hname =
"ptTot_away";
311 mHPtTot[2] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
313 mHPtP[2] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
314 hname =
"ptM_awayAway";
315 mHPtM[2] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
316 hname =
"ptTot_awayAway";
317 mHPtTot[3] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
318 hname =
"ptP_awayAway";
319 mHPtP[3] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
321 mHPtM[3] =
new TH2D(hname.Data(),hname.Data(),200,0,10,20,0,5);
322 hname =
"ytTot_toward";
323 mHYtTot[0] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
324 hname =
"ytP_toward";
325 mHYtP[0] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
326 hname =
"ytM_toward";
327 mHYtM[0] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
328 hname =
"ytTot_transverse";
329 mHYtTot[1] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
330 hname =
"ytP_transverse";
331 mHYtP[1] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
332 hname =
"ytM_transverse";
333 mHYtM[1] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
334 hname =
"ytTot_away";
335 mHYtTot[2] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
337 mHYtP[2] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
339 mHYtM[2] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
340 hname =
"ytTot_awayAway";
341 mHYtTot[3] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
342 hname =
"ytP_awayAway";
343 mHYtP[3] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
344 hname =
"ytM_awayAway";
345 mHYtM[3] =
new TH2D(hname.Data(),hname.Data(),25,1,4.5,25,1,4.5);
346 mHPhiAssocTot =
new TH2D(
"phiAssocTot",
"phiAssocTot",90,0,3.1415926,16,1,4.5);
347 mHPhiAssocP =
new TH2D(
"phiAssocP",
"phiAssocP",90,0,3.1415926,16,1,4.5);
348 mHPhiAssocM =
new TH2D(
"phiAssocM",
"phiAssocM",90,0,3.1415926,16,1,4.5);
349 mHPhiAssocPtTot =
new TH2D(
"phiAssocPtTot",
"phiAssocPtTot",90,0,3.1415926,40,0,5);
350 mHPhiAssocPtP =
new TH2D(
"phiAssocPtP",
"phiAssocPtP",90,0,3.1415926,40,0,5);
351 mHPhiAssocPtM =
new TH2D(
"phiAssocPtM",
"phiAssocPtM",90,0,3.1415926,40,0,5);
352 mHPtTrigTot =
new TH1D(
"PtTrigTot",
"PtTrigTot",40,0,5);
353 mHPtTrigP =
new TH1D(
"PtTrigP",
"PtTrigP",40,0,5);
354 mHPtTrigM =
new TH1D(
"PtTrigM",
"PtTrigM",40,0,5);
355 mHYtTrigTot =
new TH1D(
"YtTrigTot",
"YtTrigTot",25,1,4.5);
356 mHYtTrigP =
new TH1D(
"YtTrigP",
"YtTrigP",25,1,4.5);
357 mHYtTrigM =
new TH1D(
"YtTrigM",
"YtTrigM",25,1,4.5);
361 mHMixZdN =
new TH2D(
"Mixed_Z_dN",
"Event Mixing: average-Z vs delta-N",50,-25,25, 50,-25,25);
362 mHMixZN =
new TH2D(
"Mixed_Z_N",
"Event Mixing: average-Z vs average-N",50,-25,25, 50,0,1500);
363 mHMixZdC =
new TH2D(
"Mixed_Z_dC",
"Event Mixing: average-Z vs delta-C",50,-25,25, 50,-100,100);
364 mHMixZC =
new TH2D(
"Mixed_Z_C",
"Event Mixing: average-Z vs average-C",50,-25,25,50,0,10000);
365 mHMixZdZ =
new TH2D(
"Mixed_Z_dZ",
"Event Mixing: average-Z vs delta-Z",50,-25,25,50,-5,5);
366 mHMixdZdN =
new TH2D(
"Mixed_dZ_dN",
"Event Mixing: delta-Z vs delta-N",50,-5,5, 50,-25,25);
367 mHMixdZN =
new TH2D(
"Mixed_dZ_N",
"Event Mixing: delta-Z vs average-N",50,-5,5, 50,0,1500);
368 mHMixdZdC =
new TH2D(
"Mixed_dZ_dC",
"Event Mixing: delta-Z vs delta-C",50,-5,5, 50,-100,100);
369 mHMixdZC =
new TH2D(
"Mixed_dZ_C",
"Event Mixing: delta-Z vs average-C",50,-5,5,50,0,10000);
370 mHMixNdC =
new TH2D(
"Mixed_N_dC",
"Event Mixing: average-N vs delta-C",50,0,1500, 50,-100,100);
371 mHMixNC =
new TH2D(
"Mixed_N_C",
"Event Mixing: average-N vs average-C",50,0,1500,50,0,10000);
372 mHMixNdN =
new TH2D(
"Mixed_N_dN",
"Event Mixing: average-N vs delta-N",50,0,1500,50,-25,25);
373 mHMixdNdC =
new TH2D(
"Mixed_dN_dC",
"Event Mixing: delta-N vs delta-C",50,-50,50, 50,-100,100);
374 mHMixdNC =
new TH2D(
"Mixed_dN_C",
"Event Mixing: delta-N vs average-C",50,-50,50,50,0,10000);
375 mHMixCdC =
new TH2D(
"Mixed_C_dC",
"Event Mixing: average-C vs delta-C",50,0,10000,50,-100,100);
376 mHcb =
new TH2D(
"hcb",
"Cutbin usage",ncutbins,-0.5,ncutbins - 0.5,8,-0.5,7.5);
377 TH1::AddDirectory(kTRUE);
383 void StEStruct2ptCorrelations::finish(){
386 cout<<
" NO OUTPUTFILE TO WRITE TO ..... giving up ...."<<endl;
391 cout<<
" WARNING: init=false"<<endl;
392 cout<<
"No events were processed, either there was a problem reading input files or cuts are too restrictive"<<endl;
402 if (mHistosWritten) {
405 TH1::AddDirectory(kFALSE);
408 TH1::AddDirectory(kTRUE);
409 TFile * tf=
new TFile(moutFileName,
"RECREATE");
415 mHistosWritten =
true;
419 void StEStruct2ptCorrelations::cleanUp(){
425 if (mZBufferCutBinning) {
426 nZBins = kNumBuffers;
428 for (
int iz=0;iz<nZBins;iz++) {
429 delete mHNEventsSib[iz];
430 delete mHNEventsMix[iz];
431 delete mHNEventsPosSib[iz];
432 delete mHNEventsPosMix[iz];
433 delete mHNEventsNegSib[iz];
434 delete mHNEventsNegMix[iz];
436 delete [] mHNEventsSib;
437 delete [] mHNEventsMix;
438 delete [] mHNEventsPosSib;
439 delete [] mHNEventsPosMix;
440 delete [] mHNEventsNegSib;
441 delete [] mHNEventsNegMix;
449 void StEStruct2ptCorrelations::setZBuffLimits(
StEStructCuts* ecut) {
451 kZBuffMin = ecut->minVal(
"primaryVertexZ");
452 kZBuffMax = ecut->maxVal(
"primaryVertexZ");
453 kNumBuffers = int( (kZBuffMax-kZBuffMin)/kBuffWidth );
455 if(kZBuffMin==kZBuffMax){
459 kBuffWidth= (kZBuffMax - kZBuffMin) / kNumBuffers;
462 cout<<
"Setting ZBuffers: Max="<<kZBuffMax<<
" Min="<<kZBuffMin<<
" NumBuff="<<kNumBuffers<<endl;
463 if(kNumBuffers<=_MAX_ZVBINS_)
return;
465 kNumBuffers=_MAX_ZVBINS_;
466 kBuffWidth= (kZBuffMax - kZBuffMin) / kNumBuffers;
468 gMessMgr->Warning()<<
" Zvertex Width ="<<kBuffWidth<<
" gt 6.5 cm"<<endm;
472 void StEStruct2ptCorrelations::writeDiagnostics(){
479 for(
int i=0;i<kNumBuffers;i++){
480 nIn += mbuffer[i].numEventsIn();
481 nOut += mbuffer[i].numEventsDeleted();
483 cout<<
" Analysis["<<analysisIndex()<<
"] recieved "<<nIn<<
" useful events, deleted "<<nOut<<
" of them"<<endl;
498 if(mInit ==
false) init();
500 if(2>event->Ntrack()){
511 if (mZBufferCutBinning) {
513 iZBin = bufferIndex();
515 mHNEventsSib[iZBin]->Fill(event->Ntrack());
516 mHNEventsPosSib[iZBin]->Fill(event->Npos());
517 mHNEventsNegSib[iZBin]->Fill(event->Nneg());
528 float Mass[] = {0.1396, 0.1396, 0.497, 0.9383};
532 StEStructTrackIterator iTotTrigger = 0;
533 double pTotTrigger = 0;
534 double yTotTrigger = 0;
535 double phiTotTrigger = 0;
537 StEStructTrackCollection *tc;
538 for(
int ich=0;ich<2;ich++){
540 tc=mCurrentEvent->TrackCollectionP();
542 tc=mCurrentEvent->TrackCollectionM();
550 StEStructTrackIterator iTrigger = 0;
553 double phiTrigger = 0;
554 for(StEStructTrackIterator iter = tc->begin(); iter != tc->end(); iter++) {
555 if ((*iter)->Pt()>pTrigger) {
556 pTrigger = (*iter)->Pt();
557 yTrigger = (*iter)->Yt();
558 phiTrigger = (*iter)->Phi();
561 if ((*iter)->Pt()>pTotTrigger) {
562 pTotTrigger = (*iter)->Pt();
563 yTotTrigger = (*iter)->Yt();
564 phiTotTrigger = (*iter)->Phi();
574 double pi = acos(-1);
575 for(StEStructTrackIterator iter = tc->begin(); iter != tc->end(); iter++) {
576 double phi = (*iter)->Phi();
577 double dphi = phi - phiTrigger;
578 double pt = (*iter)->Pt();
579 double yt = (*iter)->Yt();
582 }
else if (dphi>pi) {
586 if (iter == iTrigger) {
588 mHPtTrigP->Fill(pTrigger);
589 mHYtTrigP->Fill(yTrigger);
591 mHPtTrigM->Fill(pTrigger);
592 mHYtTrigM->Fill(yTrigger);
596 mHPhiAssocP->Fill(dphi,yTrigger);
597 mHPhiAssocPtP->Fill(dphi,pTrigger);
599 mHPtP[0]->Fill(pt,pTrigger);
600 mHYtP[0]->Fill(yt,yTrigger);
601 }
else if (dphi<2*pi/3) {
602 mHPtP[1]->Fill(pt,pTrigger);
603 mHYtP[1]->Fill(yt,yTrigger);
604 }
else if (dphi<5*pi/6) {
605 mHPtP[2]->Fill(pt,pTrigger);
606 mHYtP[2]->Fill(yt,yTrigger);
608 mHPtP[3]->Fill(pt,pTrigger);
609 mHYtP[3]->Fill(yt,yTrigger);
612 mHPhiAssocM->Fill(dphi,yTrigger);
613 mHPhiAssocPtM->Fill(dphi,pTrigger);
615 mHPtM[0]->Fill(pt,pTrigger);
616 mHYtM[0]->Fill(yt,yTrigger);
617 }
else if (dphi<2*pi/3) {
618 mHPtM[1]->Fill(pt,pTrigger);
619 mHYtM[1]->Fill(yt,yTrigger);
620 }
else if (dphi<5*pi/6) {
621 mHPtM[2]->Fill(pt,pTrigger);
622 mHYtM[2]->Fill(yt,yTrigger);
624 mHPtM[3]->Fill(pt,pTrigger);
625 mHYtM[3]->Fill(yt,yTrigger);
631 for(StEStructTrackIterator iter = tc->begin(); iter != tc->end(); iter++) {
632 int parentClass = cb->getParentBin(mPairCuts,(*iter));
633 int ipb = parentClass*nZBin + iZBin;
634 mHMeanPtTot[ipb]->Fill((*iter)->Pt());
635 mHMeanYtTot[ipb]->Fill((*iter)->Yt());
636 mHEtaTot[ipb]->Fill((*iter)->Eta());
638 mHMeanPtP[ipb]->Fill((*iter)->Pt());
639 mHMeanYtP[ipb]->Fill((*iter)->Yt());
640 mHEtaP[ipb]->Fill((*iter)->Eta());
642 mHMeanPtM[ipb]->Fill((*iter)->Pt());
643 mHMeanYtM[ipb]->Fill((*iter)->Yt());
644 mHEtaM[ipb]->Fill((*iter)->Eta());
646 mQAHists->fillTrackHistograms(*iter,parentClass);
656 if (cb->getMode() == 5) {
658 (*iter)->SetMassAssignment(Mass[parentClass]);
662 (*iter)->SetMassAssignment(0);
668 (*iter)->SetMassAssignment(0);
674 for (
int ich=0;ich<2;ich++) {
676 tc=mCurrentEvent->TrackCollectionP();
678 tc=mCurrentEvent->TrackCollectionM();
680 if (pTotTrigger>5.0) {
683 if (yTotTrigger>4.5) {
686 double pi = acos(-1);
687 for (StEStructTrackIterator iter = tc->begin(); iter != tc->end(); iter++) {
688 double phi = (*iter)->Phi();
689 double dphi = phi - phiTotTrigger;
690 double pt = (*iter)->Pt();
691 double yt = (*iter)->Yt();
694 }
else if (dphi>pi) {
699 if (iter == iTotTrigger) {
700 mHPtTrigTot->Fill(pTotTrigger);
701 mHYtTrigTot->Fill(yTotTrigger);
703 mHPhiAssocTot->Fill(dphi,yTotTrigger);
704 mHPhiAssocPtTot->Fill(dphi,pTotTrigger);
706 mHPtTot[0]->Fill(pt,pTotTrigger);
707 mHYtTot[0]->Fill(yt,yTotTrigger);
708 }
else if (dphi<2*pi/3) {
709 mHPtTot[1]->Fill(pt,pTotTrigger);
710 mHYtTot[1]->Fill(yt,yTotTrigger);
711 }
else if (dphi<5*pi/6) {
712 mHPtTot[2]->Fill(pt,pTotTrigger);
713 mHYtTot[2]->Fill(yt,yTotTrigger);
715 mHPtTot[3]->Fill(pt,pTotTrigger);
716 mHYtTot[3]->Fill(yt,yTotTrigger);
724 mPairCuts->SetBField( mCurrentEvent->BField() );
725 return makeSiblingAndMixedPairs();
730 int StEStruct2ptCorrelations::bufferIndex(){
731 if(!mCurrentEvent || kBuffWidth==0.)
return -1;
734 return (
int) floor((mCurrentEvent->VertexZ()-kZBuffMin)/kBuffWidth);
738 void StEStruct2ptCorrelations::moveEvents(){
740 if(!mCurrentEvent)
return;
741 if (mCurrentEvent->VertexZ() > kZBuffMax) {
746 mOneZBuffer->addEvent(mCurrentEvent);
750 if(i<0 || i>kNumBuffers-1)
return;
751 mbuffer[i].addEvent(mCurrentEvent);
758 bool StEStruct2ptCorrelations::makeSiblingAndMixedPairs() {
760 if(!mCurrentEvent)
return false;
761 if (mCurrentEvent->VertexZ() > kZBuffMax) {
767 if(i<0 || i>kNumBuffers-1)
return false;
774 mInterestingPair = 0;
775 makePairs(mCurrentEvent,mCurrentEvent,0);
776 makePairs(mCurrentEvent,mCurrentEvent,1);
777 makePairs(mCurrentEvent,mCurrentEvent,2);
778 makePairs(mCurrentEvent,mCurrentEvent,3);
781 mOneZBuffer->resetCounter();
783 mbuffer[i].resetCounter();
785 int mult = mCurrentEvent->Ntrack();
790 mMixingEvent = mOneZBuffer->nextEvent(mult,mCurrentEvent->VertexZ(),mCurrentEvent->ZDCCoincidence());
792 mMixingEvent = mbuffer[i].nextEvent(mult);
794 if (!mMixingEvent)
break;
798 if (mCurrentEvent->BField()*mMixingEvent->BField() < 0) {
803 if (mZBufferCutBinning) {
804 iZBin = bufferIndex();
806 mHNEventsMix[iZBin]->Fill(mMixingEvent->Ntrack());
807 mHNEventsPosMix[iZBin]->Fill(mMixingEvent->Npos());
808 mHNEventsNegMix[iZBin]->Fill(mMixingEvent->Nneg());
809 float deltaZ = mCurrentEvent->VertexZ() - mMixingEvent->VertexZ();
810 float aveZ = (mCurrentEvent->VertexZ() + mMixingEvent->VertexZ())/2;
811 float deltaN = mCurrentEvent->Ntrack() - mMixingEvent->Ntrack();
812 float aveN = (mCurrentEvent->Ntrack() + mMixingEvent->Ntrack()) / 2;
813 float deltaC = mCurrentEvent->ZDCCoincidence() - mMixingEvent->ZDCCoincidence();
814 float aveC = (mCurrentEvent->ZDCCoincidence() + mMixingEvent->ZDCCoincidence())/2;
815 mHMixZdN->Fill(aveZ,deltaN);
816 mHMixZN->Fill(aveZ,aveN);
817 mHMixZdC->Fill(aveZ,deltaC);
818 mHMixZC->Fill(aveZ,aveC);
819 mHMixZdZ->Fill(aveZ,deltaZ);
820 mHMixdZdN->Fill(deltaZ,deltaN);
821 mHMixdZN->Fill(deltaZ,aveN);
822 mHMixdZdC->Fill(deltaZ,deltaC);
823 mHMixdZC->Fill(deltaZ,aveC);
824 mHMixNdC->Fill(aveN,deltaC);
825 mHMixNC->Fill(aveN,aveC);
826 mHMixNdN->Fill(aveN,deltaN);
827 mHMixdNdC->Fill(deltaN,deltaC);
828 mHMixdNC->Fill(deltaN,aveC);
829 mHMixCdC->Fill(aveC,deltaC);
831 makePairs(mCurrentEvent,mMixingEvent,4);
832 makePairs(mCurrentEvent,mMixingEvent,5);
833 makePairs(mCurrentEvent,mMixingEvent,6);
834 makePairs(mMixingEvent,mCurrentEvent,5);
835 makePairs(mMixingEvent,mCurrentEvent,6);
836 makePairs(mCurrentEvent,mMixingEvent,7);
868 double pi = acos(-1);
871 StEStructTrackCollection* t1;
872 StEStructTrackCollection* t2;
881 if (!mdontFillYtYt) {
886 dphiBins** jtdetadphi = mJtDEtaDPhi[j];
890 if (!mdontFillMeanPt) {
891 prjtdetadphi = mPrJtDEtaDPhi[j];
892 pajtdetadphi = mPaJtDEtaDPhi[j];
893 pbjtdetadphi = mPbJtDEtaDPhi[j];
918 etaetaSS = mEtaEtaSS[j];
919 etaetaAS = mEtaEtaAS[j];
922 nphiphi = mNPhiPhi[j];
923 if (!mdontFillMeanPt) {
924 pretaeta = mPrEtaEta[j];
925 paetaeta = mPaEtaEta[j];
926 pbetaeta = mPbEtaEta[j];
928 pretaetaSS = mPrEtaEtaSS[j];
929 paetaetaSS = mPaEtaEtaSS[j];
930 pbetaetaSS = mPbEtaEtaSS[j];
931 pretaetaAS = mPrEtaEtaAS[j];
932 paetaetaAS = mPaEtaEtaAS[j];
933 pbetaetaAS = mPbEtaEtaAS[j];
935 prphiphi = mPrPhiPhi[j];
936 paphiphi = mPaPhiPhi[j];
937 pbphiphi = mPbPhiPhi[j];
948 if (mdoFillSumHistograms) {
949 atytyt = mAtSYtDYt[j];
950 atnytyt = mAtNSYtDYt[j];
951 jtsetadphi = mJtSEtaDPhi[j];
952 jtnsetadphi = mJtNSEtaDPhi[j];
953 if (!mdontFillMeanPt) {
954 prjtsetadphi = mPrJtSEtaDPhi[j];
955 pajtsetadphi = mPaJtSEtaDPhi[j];
956 pbjtsetadphi = mPbJtSEtaDPhi[j];
993 dptBins** enttd = mTPCEntTdpt[j];
994 dptBins** midtd = mTPCMidTdpt[j];
995 dptBins** exittd = mTPCExitTdpt[j];
1001 t1=e1->TrackCollectionP();
1002 t2=e2->TrackCollectionP();
1003 mPair.setPairType(0);
1004 mpossiblePairs[j]+=(int)floor(0.5*(t1->getEntries()*(t2->getEntries()-1)));
1010 t1=e1->TrackCollectionP();
1011 t2=e2->TrackCollectionM();
1012 mPair.setPairType(1);
1013 mpossiblePairs[j]+=(int)(t1->getEntries()*t2->getEntries());
1018 t1=e1->TrackCollectionM();
1019 t2=e2->TrackCollectionP();
1020 mPair.setPairType(1);
1021 mpossiblePairs[j]+=(int)(t1->getEntries()*t2->getEntries());
1026 t1=e1->TrackCollectionM();
1027 t2=e2->TrackCollectionM();
1028 mPair.setPairType(0);
1029 mpossiblePairs[j]+=(int)floor(0.5*(t1->getEntries()*(t2->getEntries()-1)));
1034 t1=e1->TrackCollectionP();
1035 t2=e2->TrackCollectionP();
1036 mPair.setPairType(2);
1037 mpossiblePairs[j]+=(int)(t1->getEntries()*t2->getEntries());
1042 t1=e1->TrackCollectionP();
1043 t2=e2->TrackCollectionM();
1044 mPair.setPairType(3);
1045 mpossiblePairs[j]+=(int)(t1->getEntries()*t2->getEntries());
1050 t1=e1->TrackCollectionM();
1051 t2=e2->TrackCollectionP();
1052 mPair.setPairType(3);
1053 mpossiblePairs[j]+=(int)(t1->getEntries()*t2->getEntries());
1058 t1=e1->TrackCollectionM();
1059 t2=e2->TrackCollectionM();
1060 mPair.setPairType(2);
1061 mpossiblePairs[j]+=(int)(t1->getEntries()*t2->getEntries());
1072 mPair.SetZoffset(e2->VertexZ() - e1->VertexZ());
1074 StEStructTrackIterator Iter1;
1075 StEStructTrackIterator Iter2;
1077 int iyt1,iyt2,idyt,isyt;
1079 int ieta1,ieta2,ideta,iseta;
1080 int iphi1,iphi2,idphi;
1081 int isavgt, isavgz, isentt, isentz;
1082 int ismidt, ismidz, isexitt, isexitz, iqual;
1085 if(mtimer)mtimer->start();
1089 if (mZBufferCutBinning) {
1090 nZBin = kNumBuffers;
1091 iZBin = bufferIndex();
1096 float mass1 = 0, mass2 = 0;
1099 for(Iter1=t1->begin();Iter1!=t1->end();++Iter1){
1102 mPair.SetTrack1(*Iter1);
1108 Iter2 = t2->begin();
1112 if (j == 0 || j==3) {
1113 mHptAll->Fill(mPair.Track1()->Pt());
1116 for(; Iter2!=t2->end(); ++Iter2){
1128 mPair.SetTrack2(*Iter2);
1129 if( mskipPairCuts || (mPair.cutPair(mdoPairCutHistograms)==0) ){
1130 numPairsProcessed[j]++;
1133 if (!cb->ignorePair(&mPair) && ((jcb=cb->getCutBin(&mPair,j)) >= 0)) {
1134 int ncutbins=cb->getNumBins();
1137 cout <<
"ERROR, got cutbin " << jcb <<
" of " << ncutbins <<
" possible." << endl;
1140 icb = jcb*nZBin + iZBin;
1151 pt1 = mPair.Track1()->Pt();
1152 pt2 = mPair.Track2()->Pt();
1154 iyt1 = b->iyt(mPair.Track1()->Yt(mass1));
1156 ieta1 = b->ieta(mPair.Track1()->Eta(mass1));
1157 iphi1 = b->iphi(mPair.Track1()->Phi());
1158 iyt2 = b->iyt(mPair.Track2()->Yt(mass2));
1160 ieta2 = b->ieta(mPair.Track2()->Eta(mass2));
1161 iphi2 = b->iphi(mPair.Track2()->Phi());
1168 if( !mskipEtaDeltaWeight ) {
1169 ytwgt = b->getDEtaWeight(mPair.DeltaEta());
1178 int symmetrizeXX = cb->symmetrizeXX(&mPair);
1179 int switchXX = cb->switchXX(&mPair);
1181 if (!mdontFillYtYt) {
1182 ytyt[icb][iyt2].yt[iyt1]+=ytwgt;
1183 nytyt[icb][iyt2].yt[iyt1]+=1;
1186 if (mdoFillEtaEta) {
1187 bool SS = fabs(mPair.DeltaPhi()) < pi/4 || fabs(fabs(mPair.DeltaPhi())-2*pi) < pi/4;
1188 bool AS = fabs(fabs(mPair.DeltaPhi())-pi) < pi/4;
1189 etaeta[icb][ieta2].eta[ieta1]+=1;
1190 phiphi[icb][iphi2].phi[iphi1]+=nwgt;
1191 nphiphi[icb][iphi2].phi[iphi1]+=1;
1194 etaetaSS[icb][ieta2].eta[ieta1]+=1;
1196 etaetaAS[icb][ieta2].eta[ieta1]+=1;
1199 if (!mdontFillMeanPt) {
1200 pretaeta[icb][ieta2].eta[ieta1]+=pwgt/nwgt;
1201 paetaeta[icb][ieta2].eta[ieta1]+=sptb/nwgt;
1202 pbetaeta[icb][ieta2].eta[ieta1]+=spta/nwgt;
1203 prphiphi[icb][iphi2].phi[iphi1]+=pwgt;
1204 paphiphi[icb][iphi2].phi[iphi1]+=sptb;
1205 pbphiphi[icb][iphi2].phi[iphi1]+=spta;
1208 pretaetaSS[icb][ieta2].eta[ieta1]+=pwgt/nwgt;
1209 paetaetaSS[icb][ieta2].eta[ieta1]+=sptb/nwgt;
1210 pbetaetaSS[icb][ieta2].eta[ieta1]+=spta/nwgt;
1212 pretaetaAS[icb][ieta2].eta[ieta1]+=pwgt/nwgt;
1213 paetaetaAS[icb][ieta2].eta[ieta1]+=sptb/nwgt;
1214 pbetaetaAS[icb][ieta2].eta[ieta1]+=spta/nwgt;
1220 if (!mdontFillYtYt) {
1221 ytyt[icb][iyt1].yt[iyt2]+=ytwgt;
1222 nytyt[icb][iyt1].yt[iyt2]+=1;
1225 if (mdoFillEtaEta) {
1226 bool SS = fabs(mPair.DeltaPhi()) < pi/4 || fabs(fabs(mPair.DeltaPhi())-2*pi) < pi/4;
1227 bool AS = fabs(fabs(mPair.DeltaPhi())-pi) < pi/4;
1228 etaeta[icb][ieta1].eta[ieta2]+=1;
1229 phiphi[icb][iphi1].phi[iphi2]+=nwgt;
1230 nphiphi[icb][iphi1].phi[iphi2]+=1;
1233 etaetaSS[icb][ieta1].eta[ieta2]+=1;
1235 etaetaAS[icb][ieta1].eta[ieta2]+=1;
1238 if (!mdontFillMeanPt) {
1239 pretaeta[icb][ieta1].eta[ieta2]+=pwgt/nwgt;
1240 paetaeta[icb][ieta1].eta[ieta2]+=spta/nwgt;
1241 pbetaeta[icb][ieta1].eta[ieta2]+=sptb/nwgt;
1242 prphiphi[icb][iphi1].phi[iphi2]+=pwgt;
1243 paphiphi[icb][iphi1].phi[iphi2]+=spta;
1244 pbphiphi[icb][iphi1].phi[iphi2]+=sptb;
1247 pretaetaSS[icb][ieta1].eta[ieta2]+=pwgt/nwgt;
1248 paetaetaSS[icb][ieta1].eta[ieta2]+=sptb/nwgt;
1249 pbetaetaSS[icb][ieta1].eta[ieta2]+=spta/nwgt;
1251 pretaetaAS[icb][ieta1].eta[ieta2]+=pwgt/nwgt;
1252 paetaetaAS[icb][ieta1].eta[ieta2]+=sptb/nwgt;
1253 pbetaetaAS[icb][ieta1].eta[ieta2]+=spta/nwgt;
1259 if (!mdontFillYtYt) {
1260 ytyt[icb][iyt2].yt[iyt1]+=ytwgt;
1261 nytyt[icb][iyt2].yt[iyt1]+=1;
1265 if (mdoFillEtaEta) {
1266 bool SS = fabs(mPair.DeltaPhi()) < pi/4 || fabs(fabs(mPair.DeltaPhi())-2*pi) < pi/4;
1267 bool AS = fabs(fabs(mPair.DeltaPhi())-pi) < pi/4;
1268 etaeta[icb][ieta2].eta[ieta1]+=1;
1269 phiphi[icb][iphi2].phi[iphi1]+=nwgt;
1270 nphiphi[icb][iphi2].phi[iphi1]+=1;
1273 etaetaSS[icb][ieta2].eta[ieta1]+=1;
1275 etaetaAS[icb][ieta2].eta[ieta1]+=1;
1278 if (!mdontFillMeanPt) {
1279 pretaeta[icb][ieta2].eta[ieta1]+=pwgt/nwgt;
1280 paetaeta[icb][ieta2].eta[ieta1]+=spta/nwgt;
1281 pbetaeta[icb][ieta2].eta[ieta1]+=sptb/nwgt;
1282 prphiphi[icb][iphi2].phi[iphi1]+=pwgt;
1283 paphiphi[icb][iphi2].phi[iphi1]+=spta;
1284 pbphiphi[icb][iphi2].phi[iphi1]+=sptb;
1287 pretaetaSS[icb][ieta2].eta[ieta1]+=pwgt/nwgt;
1288 paetaetaSS[icb][ieta2].eta[ieta1]+=sptb/nwgt;
1289 pbetaetaSS[icb][ieta2].eta[ieta1]+=spta/nwgt;
1291 pretaetaAS[icb][ieta2].eta[ieta1]+=pwgt/nwgt;
1292 paetaetaAS[icb][ieta2].eta[ieta1]+=sptb/nwgt;
1293 pbetaetaAS[icb][ieta2].eta[ieta1]+=spta/nwgt;
1302 ideta = b->ideta(mPair.DeltaEta(mass1,mass2));
1303 idphi = b->idphi(mPair.DeltaPhi());
1305 jtdetadphi[icb][ideta].dphi[idphi] +=nwgt;
1306 if (!mdontFillMeanPt) {
1307 prjtdetadphi[icb][ideta].dphi[idphi] += pwgt;
1309 pajtdetadphi[icb][ideta].dphi[idphi] += sptb;
1310 pbjtdetadphi[icb][ideta].dphi[idphi] += spta;
1312 pajtdetadphi[icb][ideta].dphi[idphi] += spta;
1313 pbjtdetadphi[icb][ideta].dphi[idphi] += sptb;
1320 if (mdoFillSumHistograms) {
1321 idyt = b->idyt(mPair.DeltaYt(mass1,mass2));
1322 isyt = b->isyt(mPair.SigmaYt(mass1,mass2));
1323 iseta= b->iseta(mPair.SigmaEta(mass1,mass2));
1325 atytyt[icb][isyt].dyt[idyt] +=ytwgt;
1326 atnytyt[icb][isyt].dyt[idyt] +=1;
1328 jtsetadphi[icb][iseta].dphi[idphi]+=nwgt;
1329 jtnsetadphi[icb][iseta].dphi[idphi]+=1;
1330 if (!mdontFillMeanPt) {
1331 prjtsetadphi[icb][iseta].dphi[idphi] += pwgt;
1333 pajtsetadphi[icb][iseta].dphi[idphi] += sptb;
1334 pbjtsetadphi[icb][iseta].dphi[idphi] += spta;
1336 pajtsetadphi[icb][iseta].dphi[idphi] += spta;
1337 pbjtsetadphi[icb][iseta].dphi[idphi] += sptb;
1344 qinv[icb].q[b->iq(mPair.qInv())]+=nwgt;
1345 nqinv[icb].q[b->iq(mPair.qInv())]+=1;
1351 int jden = cb->getPairDensityBin(jcb);
1354 ipcb = jden*nZBin + iZBin;
1356 if (mdoPairDensityHistograms && ipcb >= 0) {
1357 avgtsep[ipcb].sep[isavgt=b->isep(mPair.NominalTpcAvgXYSeparation())]+=nwgt;
1358 avgzsep[ipcb].sep[isavgz=b->isep(mPair.NominalTpcAvgZSeparation())]+=nwgt;
1359 float entXYSep = mPair.NominalTpcXYEntranceSeparation();
1360 enttsep[ipcb].sep[isentt=b->isep(entXYSep)]+=nwgt;
1361 entzsep[ipcb].sep[isentz=b->isep(mPair.NominalTpcZEntranceSeparation())]+=nwgt;
1362 float midXYSep = mPair.MidTpcXYSeparation();
1363 float midZSep = mPair.MidTpcZSeparation();
1364 midtsep[ipcb].sep[ismidt=b->isep(midXYSep)]+=nwgt;
1365 midzsep[ipcb].sep[ismidz=b->isep(midZSep)]+=nwgt;
1366 float exitXYSep = mPair.NominalTpcXYExitSeparation();
1367 exittsep[ipcb].sep[isexitt=b->isep(exitXYSep)]+=nwgt;
1368 exitzsep[ipcb].sep[isexitz=b->isep(mPair.NominalTpcZExitSeparation())]+=nwgt;
1369 float qual = mPair.quality();
1370 pairqual[ipcb].sep[iqual=b->iqual(qual)]+=nwgt;
1372 avgtz[ipcb][isavgt].sep[isavgz]+=nwgt;
1373 enttz[ipcb][isentt].sep[isentz]+=nwgt;
1374 midtz[ipcb][ismidt].sep[ismidz]+=nwgt;
1375 exittz[ipcb][isexitt].sep[isexitz]+=nwgt;
1376 entqz[ipcb][iqual].sep[isentz]+=nwgt;
1377 midqz[ipcb][iqual].sep[ismidz]+=nwgt;
1378 entqt[ipcb][iqual].sep[isentt]+=nwgt;
1379 midqt[ipcb][iqual].sep[ismidt]+=nwgt;
1380 entqzt[ipcb][isentz].sep[isentt]+=qual;
1381 midqzt[ipcb][ismidz].sep[ismidt]+=qual;
1387 if (mPair.Track1()->Phi() - mPair.Track2()->Phi() >= 0) {
1388 delpt = mPair.Track1()->Pt() - mPair.Track2()->Pt();
1389 q1 = mPair.mTrack1->Charge();
1391 delpt = mPair.Track2()->Pt() - mPair.Track1()->Pt();
1392 q1 = mPair.mTrack2->Charge();
1394 idelpt = b->idpt(delpt);
1395 enttd[ipcb][isentt].dpt[idelpt]+=nwgt;
1396 midtd[ipcb][ismidt].dpt[idelpt]+=nwgt;
1397 exittd[ipcb][isexitt].dpt[idelpt]+=nwgt;
1398 if (1 == j || 2 == j || 5 == j || 6 == j) {
1400 midtp[ipcb].sep[ismidt]+=nwgt;
1401 midzp[ipcb].sep[ismidz]+=nwgt;
1403 midtn[ipcb].sep[ismidt]+=nwgt;
1404 midzn[ipcb].sep[ismidz]+=nwgt;
1408 midtp[ipcb].sep[ismidt]+=nwgt;
1409 midzp[ipcb].sep[ismidz]+=nwgt;
1411 midtn[ipcb].sep[ismidt]+=nwgt;
1412 midzn[ipcb].sep[ismidz]+=nwgt;
1415 pairqual[ipcb].sep[ismidz]+=nwgt;
1422 float sinEnt = (ent1.x()*ent2.y() - ent1.y()*ent2.x());
1425 float sinExit = (exit1.x()*exit2.y() - exit1.y()*exit2.x());
1426 if (sinEnt*sinExit < 0) {
1427 midtzc[ipcb][ismidt].sep[ismidz]+=nwgt;
1429 midtznc[ipcb][ismidt].sep[ismidz]+=nwgt;
1437 if(mtimer)mtimer->stop();
1442 void StEStruct2ptCorrelations::debug_CheckHistograms() {
1449 int numCutBins=StEStructCutBin::Instance()->getNumBins();
1451 if (mZBufferCutBinning) {
1454 for (
int i=0;i<8;i++) {
1455 dphiBins** jtdetadphi = mJtDEtaDPhi[i];
1456 int totDEtaDPhi = 0;
1458 for(
int y=0;y<numCutBins;y++){
1459 for (
int z=0;z<nzb;z++) {
1461 for(
int k=0;k<b->detaBins();k++){
1462 for(
int j=0;j<b->dphiBins();j++){
1463 totDEtaDPhi += jtdetadphi[yz][k].dphi[j];
1467 totCB += mHcb->GetBinContent(y+1,i+1);
1469 cout <<
"Integral of jtdetadphi = " << totDEtaDPhi <<
", for i = " << i <<
". Compare to hcb = " << totCB << endl;
1478 void StEStruct2ptCorrelations::fillHistograms() {
1482 int numCutBins=StEStructCutBin::Instance()->getNumBins();
1483 int nden=StEStructCutBin::Instance()->getNumPairDensityBins();
1485 if (mZBufferCutBinning) {
1489 TH1::AddDirectory(kFALSE);
1493 mHEtaPhi->SetBinContent(1,1,1);
1495 for(
int i=0; i<8; i++){
1497 phiBins** nphiphi = mNPhiPhi[i];
1507 if (!mdontFillYtYt) {
1512 dphiBins** jtdetadphi = mJtDEtaDPhi[i];
1516 if (!mdontFillMeanPt) {
1517 prjtdetadphi = mPrJtDEtaDPhi[i];
1518 pajtdetadphi = mPaJtDEtaDPhi[i];
1519 pbjtdetadphi = mPbJtDEtaDPhi[i];
1540 if (mdoFillEtaEta) {
1541 etaeta = mEtaEta[i];
1542 phiphi = mPhiPhi[i];
1544 etaetaSS = mEtaEtaSS[i];
1545 etaetaAS = mEtaEtaAS[i];
1547 if (!mdontFillMeanPt) {
1548 pretaeta = mPrEtaEta[i];
1549 prphiphi = mPrPhiPhi[i];
1550 paetaeta = mPaEtaEta[i];
1551 paphiphi = mPaPhiPhi[i];
1552 pbetaeta = mPbEtaEta[i];
1553 pbphiphi = mPbPhiPhi[i];
1556 pretaetaSS = mPrEtaEtaSS[i];
1557 paetaetaSS = mPaEtaEtaSS[i];
1558 pbetaetaSS = mPbEtaEtaSS[i];
1559 pretaetaAS = mPrEtaEtaAS[i];
1560 paetaetaAS = mPaEtaEtaAS[i];
1561 pbetaetaAS = mPbEtaEtaAS[i];
1573 if (mdoFillSumHistograms) {
1574 atytyt = mAtSYtDYt[i];
1575 atnytyt = mAtNSYtDYt[i];
1576 jtsetadphi = mJtSEtaDPhi[i];
1577 jtnsetadphi = mJtNSEtaDPhi[i];
1578 if (!mdontFillMeanPt) {
1579 prjtsetadphi = mPrJtSEtaDPhi[i];
1580 pajtsetadphi = mPaJtSEtaDPhi[i];
1581 pbjtsetadphi = mPbJtSEtaDPhi[i];
1586 for(
int y=0;y<numCutBins;y++){
1587 for (
int z=0;z<nzb;z++) {
1590 if (!mdontFillYtYt) {
1591 createHist2D(mHYtYt,
"YtYt",i,y,z,yz,b->ytBins(),b->ytMin(),b->ytMax(),b->ytBins(),b->ytMin(),b->ytMax());
1592 createHist2D(mHNYtYt,
"NYtYt",i,y,z,yz,b->ytBins(),b->ytMin(),b->ytMax(),b->ytBins(),b->ytMin(),b->ytMax());
1593 for(
int k=0;k<b->ytBins();k++){
1594 for(
int j=0;j<b->ytBins();j++){
1595 mHYtYt[i][yz]->Fill(b->ytVal(k),b->ytVal(j),ytyt[yz][k].yt[j]);
1596 mHNYtYt[i][yz]->Fill(b->ytVal(k),b->ytVal(j),nytyt[yz][k].yt[j]);
1600 delete [] nytyt[yz];
1603 createHist2D(mHJtDEtaDPhi,
"DEtaDPhiArr",i,y,z,yz,b->detaBins(),0.5,b->detaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1604 for(
int k=0;k<b->detaBins();k++){
1605 for(
int j=0;j<b->dphiBins();j++){
1608 mHJtDEtaDPhi[i][yz]->SetBinContent(k+1,j+1,jtdetadphi[yz][k].dphi[j]);
1611 delete [] jtdetadphi[yz];
1612 if (!mdontFillMeanPt) {
1613 createHist2D(mHPrJtDEtaDPhi,
"PrDEtaDPhiArr",i,y,z,yz,b->detaBins(),0.5,b->detaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1614 createHist2D(mHPaJtDEtaDPhi,
"PaDEtaDPhiArr",i,y,z,yz,b->detaBins(),0.5,b->detaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1615 createHist2D(mHPbJtDEtaDPhi,
"PbDEtaDPhiArr",i,y,z,yz,b->detaBins(),0.5,b->detaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1616 for(
int k=0;k<b->detaBins();k++){
1617 for(
int j=0;j<b->dphiBins();j++){
1620 mHPrJtDEtaDPhi[i][yz]->SetBinContent(k+1,j+1,prjtdetadphi[yz][k].dphi[j]);
1621 mHPaJtDEtaDPhi[i][yz]->SetBinContent(k+1,j+1,pajtdetadphi[yz][k].dphi[j]);
1622 mHPbJtDEtaDPhi[i][yz]->SetBinContent(k+1,j+1,pbjtdetadphi[yz][k].dphi[j]);
1625 delete [] prjtdetadphi[yz];
1626 delete [] pajtdetadphi[yz];
1627 delete [] pbjtdetadphi[yz];
1630 if (mdoFillEtaEta) {
1631 createHist2D(mHPhiPhi,
"PhiPhi",i,y,z,yz,b->phiBins(),b->phiMin(),b->phiMax(),b->phiBins(),b->phiMin(),b->phiMax());
1632 createHist2D(mHNPhiPhi,
"NPhiPhi",i,y,z,yz,b->phiBins(),b->phiMin(),b->phiMax(),b->phiBins(),b->phiMin(),b->phiMax());
1633 for(
int k=0;k<b->phiBins();k++){
1634 for(
int j=0;j<b->phiBins();j++){
1635 mHPhiPhi[i][yz]->Fill(xv=b->phiVal(k),yv=b->phiVal(j),phiphi[yz][k].phi[j]);
1636 mHNPhiPhi[i][yz]->Fill(xv,yv,nphiphi[yz][k].phi[j]);
1639 delete [] phiphi[yz];
1640 delete [] nphiphi[yz];
1641 if (!mdontFillMeanPt) {
1642 createHist2D(mHPrPhiPhi,
"PrPhiPhi",i,y,z,yz,b->phiBins(),b->phiMin(),b->phiMax(),b->phiBins(),b->phiMin(),b->phiMax());
1643 createHist2D(mHPaPhiPhi,
"PaPhiPhi",i,y,z,yz,b->phiBins(),b->phiMin(),b->phiMax(),b->phiBins(),b->phiMin(),b->phiMax());
1644 createHist2D(mHPbPhiPhi,
"PbPhiPhi",i,y,z,yz,b->phiBins(),b->phiMin(),b->phiMax(),b->phiBins(),b->phiMin(),b->phiMax());
1645 for(
int k=0;k<b->phiBins();k++){
1646 for(
int j=0;j<b->phiBins();j++){
1647 mHPrPhiPhi[i][yz]->Fill(xv=b->phiVal(k),yv=b->phiVal(j),prphiphi[yz][k].phi[j]);
1648 mHPaPhiPhi[i][yz]->Fill(xv,yv,paphiphi[yz][k].phi[j]);
1649 mHPbPhiPhi[i][yz]->Fill(xv,yv,pbphiphi[yz][k].phi[j]);
1652 delete [] prphiphi[yz];
1653 delete [] paphiphi[yz];
1654 delete [] pbphiphi[yz];
1657 createHist2D(mHEtaEta,
"EtaEta",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1658 for(
int k=0;k<b->etaBins();k++){
1659 for(
int j=0;j<b->etaBins();j++){
1660 mHEtaEta[i][yz]->Fill(xv=b->etaVal(k),yv=b->etaVal(j),etaeta[yz][k].eta[j]);
1663 delete [] etaeta[yz];
1664 if (!mdontFillMeanPt) {
1665 createHist2D(mHPrEtaEta,
"PrEtaEta",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1666 createHist2D(mHPaEtaEta,
"PaEtaEta",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1667 createHist2D(mHPbEtaEta,
"PbEtaEta",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1668 for(
int k=0;k<b->etaBins();k++){
1669 for(
int j=0;j<b->etaBins();j++){
1670 mHPrEtaEta[i][yz]->Fill(xv=b->etaVal(k),yv=b->etaVal(j),pretaeta[yz][k].eta[j]);
1671 mHPaEtaEta[i][yz]->Fill(xv,yv,paetaeta[yz][k].eta[j]);
1672 mHPbEtaEta[i][yz]->Fill(xv,yv,pbetaeta[yz][k].eta[j]);
1675 delete [] pretaeta[yz];
1676 delete [] paetaeta[yz];
1677 delete [] pbetaeta[yz];
1681 createHist2D(mHEtaEtaSS,
"EtaEtaSS",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1682 for(
int k=0;k<b->etaBins();k++){
1683 for(
int j=0;j<b->etaBins();j++){
1684 mHEtaEtaSS[i][yz]->Fill(xv=b->etaVal(k),yv=b->etaVal(j),etaetaSS[yz][k].eta[j]);
1687 delete [] etaetaSS[yz];
1688 if (!mdontFillMeanPt) {
1689 createHist2D(mHPrEtaEtaSS,
"PrEtaEtaSS",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1690 createHist2D(mHPaEtaEtaSS,
"PaEtaEtaSS",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1691 createHist2D(mHPbEtaEtaSS,
"PbEtaEtaSS",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1692 for(
int k=0;k<b->etaBins();k++){
1693 for(
int j=0;j<b->etaBins();j++){
1694 mHPrEtaEtaSS[i][yz]->Fill(xv=b->etaVal(k),yv=b->etaVal(j),pretaetaSS[yz][k].eta[j]);
1695 mHPaEtaEtaSS[i][yz]->Fill(xv,yv,paetaetaSS[yz][k].eta[j]);
1696 mHPbEtaEtaSS[i][yz]->Fill(xv,yv,pbetaetaSS[yz][k].eta[j]);
1699 delete [] pretaetaSS[yz];
1700 delete [] paetaetaSS[yz];
1701 delete [] pbetaetaSS[yz];
1703 createHist2D(mHEtaEtaAS,
"EtaEtaAS",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1704 for(
int k=0;k<b->etaBins();k++){
1705 for(
int j=0;j<b->etaBins();j++){
1706 mHEtaEtaAS[i][yz]->Fill(xv=b->etaVal(k),yv=b->etaVal(j),etaetaAS[yz][k].eta[j]);
1709 delete [] etaetaAS[yz];
1710 if (!mdontFillMeanPt) {
1711 createHist2D(mHPrEtaEtaAS,
"PrEtaEtaAS",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1712 createHist2D(mHPaEtaEtaAS,
"PaEtaEtaAS",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1713 createHist2D(mHPbEtaEtaAS,
"PbEtaEtaAS",i,y,z,yz,b->etaBins(),b->etaMin(),b->etaMax(),b->etaBins(),b->etaMin(),b->etaMax());
1714 for(
int k=0;k<b->etaBins();k++){
1715 for(
int j=0;j<b->etaBins();j++){
1716 mHPrEtaEtaAS[i][yz]->Fill(xv=b->etaVal(k),yv=b->etaVal(j),pretaetaAS[yz][k].eta[j]);
1717 mHPaEtaEtaAS[i][yz]->Fill(xv,yv,paetaetaAS[yz][k].eta[j]);
1718 mHPbEtaEtaAS[i][yz]->Fill(xv,yv,pbetaetaAS[yz][k].eta[j]);
1721 delete [] pretaetaAS[yz];
1722 delete [] paetaetaAS[yz];
1723 delete [] pbetaetaAS[yz];
1728 if (mdoFillSumHistograms) {
1729 createHist2D(mHAtSYtDYt,
"SYtDYt",i,y,z,yz,b->sytBins(),b->sytMin(),b->sytMax(),b->dytBins(),b->dytMin(),b->dytMax());
1730 createHist2D(mHAtNSYtDYt,
"NSYtDYt",i,y,z,yz,b->sytBins(),b->sytMin(),b->sytMax(),b->dytBins(),b->dytMin(),b->dytMax());
1731 for(
int k=0;k<b->sytBins();k++){
1732 for(
int j=0;j<b->dytBins();j++){
1733 mHAtSYtDYt[i][yz]->Fill(b->sytVal(k),b->dytVal(j),atytyt[yz][k].dyt[j]);
1734 mHAtNSYtDYt[i][yz]->Fill(b->sytVal(k),b->dytVal(j),atnytyt[yz][k].dyt[j]);
1737 delete [] atytyt[yz];
1738 delete [] atnytyt[yz];
1740 createHist2D(mHJtSEtaDPhi,
"SEtaDPhiArr",i,y,z,yz,b->setaBins(),0.5,b->setaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1741 createHist2D(mHJtNSEtaDPhi,
"NSEtaDPhiArr",i,y,z,yz,b->setaBins(),0.5,b->setaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1742 for(
int k=0;k<b->setaBins();k++) {
1743 for(
int j=0;j<b->dphiBins();j++) {
1744 mHJtSEtaDPhi[i][yz]->SetBinContent(k+1,j+1,jtsetadphi[yz][k].dphi[j]);
1745 mHJtNSEtaDPhi[i][yz]->SetBinContent(k+1,j+1,jtnsetadphi[yz][k].dphi[j]);
1748 delete [] jtsetadphi[yz];
1749 delete [] jtnsetadphi[yz];
1750 if (!mdontFillMeanPt) {
1751 createHist2D(mHPrJtSEtaDPhi,
"PrSEtaDPhiArr",i,y,z,yz,b->setaBins(),0.5,b->setaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1752 createHist2D(mHPaJtSEtaDPhi,
"PaSEtaDPhiArr",i,y,z,yz,b->setaBins(),0.5,b->setaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1753 createHist2D(mHPbJtSEtaDPhi,
"PbSEtaDPhiArr",i,y,z,yz,b->setaBins(),0.5,b->setaBins()+0.5,b->dphiBins(),0.5,b->dphiBins()+0.5);
1754 for(
int k=0;k<b->setaBins();k++) {
1755 for(
int j=0;j<b->dphiBins();j++) {
1756 mHPrJtSEtaDPhi[i][yz]->SetBinContent(k+1,j+1,prjtsetadphi[yz][k].dphi[j]);
1757 mHPaJtSEtaDPhi[i][yz]->SetBinContent(k+1,j+1,pajtsetadphi[yz][k].dphi[j]);
1758 mHPbJtSEtaDPhi[i][yz]->SetBinContent(k+1,j+1,pbjtsetadphi[yz][k].dphi[j]);
1761 delete [] prjtsetadphi[yz];
1762 delete [] pbjtsetadphi[yz];
1763 delete [] pajtsetadphi[yz];
1768 createHist1D(mHQinv,
"Qinv",i,y,z,yz,b->qBins(),b->qMin(),b->qMax());
1769 createHist1D(mHNQinv,
"NQinv",i,y,z,yz,b->qBins(),b->qMin(),b->qMax());
1770 for(
int k=0;k<b->qBins();k++){
1771 mHQinv[i][yz]->Fill(b->qVal(k),qinv[yz].q[k]);
1772 mHNQinv[i][yz]->Fill(b->qVal(k),nqinv[yz].q[k]);
1781 if(mdoPairDensityHistograms) {
1782 for(
int i=0; i<8; i++){
1808 dptBins** enttd = mTPCEntTdpt[i];
1809 dptBins** midtd = mTPCMidTdpt[i];
1810 dptBins** exittd = mTPCExitTdpt[i];
1812 for(
int y=0;y<nden;y++){
1813 for (
int z=0;z<nzb;z++) {
1816 createHist1D(mHTPCAvgTSep,
"TPCAvgTSep",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1817 createHist1D(mHTPCAvgZSep,
"TPCAvgZSep",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1818 createHist1D(mHTPCEntTSep,
"TPCEntTSep",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1819 createHist1D(mHTPCEntZSep,
"TPCEntZSep",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1820 createHist1D(mHTPCMidTSep,
"TPCMidTSep",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1821 createHist1D(mHTPCMidZSep,
"TPCMidZSep",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1822 createHist1D(mHTPCExitTSep,
"TPCExitTSep",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1823 createHist1D(mHTPCExitZSep,
"TPCExitZSep",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1824 createHist1D(mHTPCMidTdptP,
"TPCMidTdptP",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1825 createHist1D(mHTPCMidTdptN,
"TPCMidTdptN",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1826 createHist1D(mHTPCMidZdptP,
"TPCMidZdptP",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1827 createHist1D(mHTPCMidZdptN,
"TPCMidZdptN",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1828 createHist1D(mHTPCQuality,
"TPCQuality",i,y,z,yz,b->TPCQualityBins(),b->TPCQualityMin(),b->TPCQualityMax());
1829 for(
int k=0;k<b->TPCSepBins();k++) {
1830 mHTPCAvgTSep[i][yz]->Fill(xv=b->sepVal(k),avgtsep[yz].sep[k]);
1831 mHTPCAvgZSep[i][yz]->Fill(xv,avgzsep[yz].sep[k]);
1832 mHTPCEntTSep[i][yz]->Fill(xv,enttsep[yz].sep[k]);
1833 mHTPCEntZSep[i][yz]->Fill(xv,entzsep[yz].sep[k]);
1834 mHTPCMidTSep[i][yz]->Fill(xv,midtsep[yz].sep[k]);
1835 mHTPCMidZSep[i][yz]->Fill(xv,midzsep[yz].sep[k]);
1836 mHTPCExitTSep[i][yz]->Fill(xv,exittsep[yz].sep[k]);
1837 mHTPCExitZSep[i][yz]->Fill(xv,exitzsep[yz].sep[k]);
1838 mHTPCMidTdptP[i][yz]->Fill(xv,midtp[yz].sep[k]);
1839 mHTPCMidTdptN[i][yz]->Fill(xv,midtn[yz].sep[k]);
1840 mHTPCMidZdptP[i][yz]->Fill(xv,midzp[yz].sep[k]);
1841 mHTPCMidZdptN[i][yz]->Fill(xv,midzn[yz].sep[k]);
1843 createHist1D(mHTPCQuality,
"TPCQuality",i,y,z,yz,b->TPCQualityBins(),b->TPCQualityMin(),b->TPCQualityMax());
1844 for(
int k=0;k<b->TPCQualityBins();k++) {
1845 mHTPCQuality[i][yz]->Fill(b->qualityVal(k),pairqual[yz].sep[k]);
1863 createHist2D(mHTPCAvgTZ,
"TPCAvgTZ", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1864 createHist2D(mHTPCEntTZ,
"TPCEntTZ", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1865 createHist2D(mHTPCMidTZ,
"TPCMidTZ", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1866 createHist2D(mHTPCMidTZC,
"TPCMidTZC", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1867 createHist2D(mHTPCMidTZNC,
"TPCMidTZNC", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1868 createHist2D(mHTPCExitTZ,
"TPCExitTZ",i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1869 for(
int k=0;k<b->TPCSepBins();k++) {
1870 for(
int j=0;j<b->TPCSepBins();j++) {
1871 mHTPCAvgTZ[i][yz]->Fill(xv=b->sepVal(k),yv=b->sepVal(j),avgtz[yz][k].sep[j]);
1872 mHTPCEntTZ[i][yz]->Fill(xv,yv,enttz[yz][k].sep[j]);
1873 mHTPCMidTZ[i][yz]->Fill(xv,yv,midtz[yz][k].sep[j]);
1874 mHTPCMidTZC[i][yz]->Fill(xv,yv,midtzc[yz][k].sep[j]);
1875 mHTPCMidTZNC[i][yz]->Fill(xv,yv,midtznc[yz][k].sep[j]);
1876 mHTPCExitTZ[i][yz]->Fill(xv,yv,exittz[yz][k].sep[j]);
1879 delete [] avgtz[yz];
1880 delete [] enttz[yz];
1881 delete [] midtz[yz];
1882 delete [] midtzc[yz];
1883 delete [] midtznc[yz];
1884 delete [] exittz[yz];
1886 createHist2D(mHTPCEntQZ,
"TPCEntQZ", i,y,z,yz,b->TPCQualityBins(),b->TPCQualityMin(),b->TPCQualityMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1887 createHist2D(mHTPCMidQZ,
"TPCMidQZ", i,y,z,yz,b->TPCQualityBins(),b->TPCQualityMin(),b->TPCQualityMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1888 createHist2D(mHTPCEntQT,
"TPCEntQT", i,y,z,yz,b->TPCQualityBins(),b->TPCQualityMin(),b->TPCQualityMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1889 createHist2D(mHTPCMidQT,
"TPCMidQT", i,y,z,yz,b->TPCQualityBins(),b->TPCQualityMin(),b->TPCQualityMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1890 createHist2D(mHTPCEntQZT,
"TPCEntQZT", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1891 createHist2D(mHTPCMidQZT,
"TPCMidQZT", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax());
1892 for(
int k=0;k<b->TPCQualityBins();k++) {
1893 for(
int j=0;j<b->TPCSepBins();j++) {
1894 mHTPCEntQZ[i][yz]->Fill(xv=b->qualityVal(k),yv=b->sepVal(j),entqz[yz][k].sep[j]);
1895 mHTPCMidQZ[i][yz]->Fill(xv,yv,midqz[yz][k].sep[j]);
1896 mHTPCEntQT[i][yz]->Fill(xv,yv,entqt[yz][k].sep[j]);
1897 mHTPCMidQT[i][yz]->Fill(xv,yv,midqt[yz][k].sep[j]);
1898 mHTPCEntQZT[i][yz]->Fill(xv=b->sepVal(k),yv,entqzt[yz][k].sep[j]);
1899 mHTPCMidQZT[i][yz]->Fill(xv,yv,midqzt[yz][k].sep[j]);
1902 delete [] entqz[yz];
1903 delete [] midqz[yz];
1904 delete [] entqt[yz];
1905 delete [] midqt[yz];
1906 delete [] entqzt[yz];
1907 delete [] midqzt[yz];
1909 createHist2D(mHTPCEntTdpt,
"TPCEntTdpt", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->dptBins(),b->dptMin(),b->dptMax());
1910 createHist2D(mHTPCMidTdpt,
"TPCMidTdpt", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->dptBins(),b->dptMin(),b->dptMax());
1911 createHist2D(mHTPCExitTdpt,
"TPCExitTdpt", i,y,z,yz,b->TPCSepBins(),b->TPCSepMin(),b->TPCSepMax(),b->dptBins(),b->dptMin(),b->dptMax());
1912 for(
int k=0;k<b->TPCSepBins();k++) {
1913 for(
int j=0;j<b->dptBins();j++) {
1914 mHTPCEntTdpt[i][yz]->Fill(xv=b->sepVal(k),yv=b->dptVal(j),enttd[yz][k].dpt[j]);
1915 mHTPCMidTdpt[i][yz]->Fill(xv,yv,midtd[yz][k].dpt[j]);
1916 mHTPCExitTdpt[i][yz]->Fill(xv,yv,exittd[yz][k].dpt[j]);
1919 delete [] enttd[yz];
1920 delete [] midtd[yz];
1921 delete [] exittd[yz];
1930 void StEStruct2ptCorrelations::writeHistograms() {
1932 int numCutBins=StEStructCutBin::Instance()->getNumBins();
1933 int nden=StEStructCutBin::Instance()->getNumPairDensityBins();
1934 int numParentBins=StEStructCutBin::Instance()->getNumParentBins();
1936 if (mZBufferCutBinning) {
1937 numCutBins *= kNumBuffers;
1938 nden *= kNumBuffers;
1939 numParentBins *= kNumBuffers;
1940 nZBins = kNumBuffers;
1943 for (
int j=0;j<nZBins;j++) {
1944 mHNEventsSib[j]->Write();
1945 mHNEventsMix[j]->Write();
1946 mHNEventsPosSib[j]->Write();
1947 mHNEventsPosMix[j]->Write();
1948 mHNEventsNegSib[j]->Write();
1949 mHNEventsNegMix[j]->Write();
1969 for(
int j=0;j<numParentBins;j++){
1970 mHMeanPtTot[j]->Write();
1971 mHMeanPtP[j]->Write();
1972 mHMeanPtM[j]->Write();
1973 mHMeanYtTot[j]->Write();
1974 mHMeanYtP[j]->Write();
1975 mHMeanYtM[j]->Write();
1976 mHEtaTot[j]->Write();
1980 mHPtTot[0]->Write();
1983 mHPtTot[1]->Write();
1986 mHPtTot[2]->Write();
1989 mHPtTot[3]->Write();
1992 mHYtTot[0]->Write();
1995 mHYtTot[1]->Write();
1998 mHYtTot[2]->Write();
2001 mHYtTot[3]->Write();
2004 mHPhiAssocTot->Write();
2005 mHPhiAssocP->Write();
2006 mHPhiAssocM->Write();
2007 mHPhiAssocPtTot->Write();
2008 mHPhiAssocPtP->Write();
2009 mHPhiAssocPtM->Write();
2010 mHPtTrigTot->Write();
2013 mHYtTrigTot->Write();
2016 for(
int i=0;i<8;i++){
2017 for(
int j=0;j<numCutBins;j++){
2018 if (!mdontFillYtYt) {
2019 mHYtYt[i][j]->Write();
2020 mHNYtYt[i][j]->Write();
2023 mHJtDEtaDPhi[i][j]->Write();
2024 if (!mdontFillMeanPt) {
2025 mHPrJtDEtaDPhi[i][j]->Write();
2026 mHPaJtDEtaDPhi[i][j]->Write();
2027 mHPbJtDEtaDPhi[i][j]->Write();
2030 if (mdoFillEtaEta) {
2031 mHPhiPhi[i][j]->Write();
2032 mHNPhiPhi[i][j]->Write();
2033 mHEtaEta[i][j]->Write();
2035 mHEtaEtaSS[i][j]->Write();
2036 mHEtaEtaAS[i][j]->Write();
2038 if (!mdontFillMeanPt) {
2039 mHPrPhiPhi[i][j]->Write();
2040 mHPrEtaEta[i][j]->Write();
2041 mHPaPhiPhi[i][j]->Write();
2042 mHPaEtaEta[i][j]->Write();
2043 mHPbPhiPhi[i][j]->Write();
2044 mHPbEtaEta[i][j]->Write();
2046 mHPrEtaEtaSS[i][j]->Write();
2047 mHPaEtaEtaSS[i][j]->Write();
2048 mHPbEtaEtaSS[i][j]->Write();
2049 mHPrEtaEtaAS[i][j]->Write();
2050 mHPaEtaEtaAS[i][j]->Write();
2051 mHPbEtaEtaAS[i][j]->Write();
2056 if (mdoFillSumHistograms) {
2057 mHAtSYtDYt[i][j]->Write();
2058 mHAtNSYtDYt[i][j]->Write();
2059 mHJtSEtaDPhi[i][j]->Write();
2060 mHJtNSEtaDPhi[i][j]->Write();
2061 if (!mdontFillMeanPt) {
2062 mHPrJtSEtaDPhi[i][j]->Write();
2063 mHPaJtSEtaDPhi[i][j]->Write();
2064 mHPbJtSEtaDPhi[i][j]->Write();
2069 mHQinv[i][j]->Write();
2070 mHNQinv[i][j]->Write();
2074 if(mdoPairDensityHistograms) {
2075 for (
int j=0;j<nden;j++) {
2076 mHTPCAvgTSep[i][j]->Write();
2077 mHTPCAvgZSep[i][j]->Write();
2078 mHTPCEntTSep[i][j]->Write();
2079 mHTPCEntZSep[i][j]->Write();
2080 mHTPCMidTSep[i][j]->Write();
2081 mHTPCMidZSep[i][j]->Write();
2082 mHTPCExitTSep[i][j]->Write();
2083 mHTPCExitZSep[i][j]->Write();
2085 mHTPCMidTdptP[i][j]->Write();
2086 mHTPCMidTdptN[i][j]->Write();
2087 mHTPCMidZdptP[i][j]->Write();
2088 mHTPCMidZdptN[i][j]->Write();
2090 mHTPCQuality[i][j]->Write();
2092 mHTPCAvgTZ[i][j]->Write();
2093 mHTPCEntTZ[i][j]->Write();
2094 mHTPCMidTZ[i][j]->Write();
2095 mHTPCMidTZC[i][j]->Write();
2096 mHTPCMidTZNC[i][j]->Write();
2097 mHTPCExitTZ[i][j]->Write();
2098 mHTPCEntQZ[i][j]->Write();
2099 mHTPCMidQZ[i][j]->Write();
2100 mHTPCEntQT[i][j]->Write();
2101 mHTPCMidQT[i][j]->Write();
2102 mHTPCEntQZT[i][j]->Write();
2103 mHTPCMidQZT[i][j]->Write();
2104 mHTPCEntTdpt[i][j]->Write();
2105 mHTPCMidTdpt[i][j]->Write();
2106 mHTPCExitTdpt[i][j]->Write();
2113 void StEStruct2ptCorrelations::writeQAHists(TFile *qtf) {
2115 if(!mlocalQAHists)
return;
2118 cout<<
" NO QA OUTPUT TFile TO WRITE TO ... giving up ..."<<endl;
2122 mQAHists->writeTrackHistograms(qtf);
2128 void StEStruct2ptCorrelations::initArrays(){
2130 int numCutBins=StEStructCutBin::Instance()->getNumBins();
2131 int nden=StEStructCutBin::Instance()->getNumPairDensityBins();
2132 if (mZBufferCutBinning) {
2133 numCutBins *= kNumBuffers;
2134 nden *= kNumBuffers;
2137 for(
int i=0;i<8;i++){
2139 if (!mdontFillYtYt) {
2140 mYtYt[i]=
new ytBins*[numCutBins];
2141 mNYtYt[i]=
new ytBins*[numCutBins];
2144 mJtDEtaDPhi[i] =
new dphiBins*[numCutBins];
2145 if (!mdontFillMeanPt) {
2146 mPaJtDEtaDPhi[i]=
new dphiBins*[numCutBins];
2147 mPbJtDEtaDPhi[i]=
new dphiBins*[numCutBins];
2148 mPrJtDEtaDPhi[i]=
new dphiBins*[numCutBins];
2151 if (mdoFillEtaEta) {
2152 mEtaEta[i]=
new etaBins*[numCutBins];
2153 mPhiPhi[i]=
new phiBins*[numCutBins];
2154 mNPhiPhi[i]=
new phiBins*[numCutBins];
2156 mEtaEtaSS[i]=
new etaBins*[numCutBins];
2157 mEtaEtaAS[i]=
new etaBins*[numCutBins];
2159 if (!mdontFillMeanPt) {
2160 mPrEtaEta[i]=
new etaBins*[numCutBins];
2161 mPaEtaEta[i]=
new etaBins*[numCutBins];
2162 mPbEtaEta[i]=
new etaBins*[numCutBins];
2163 mPrPhiPhi[i]=
new phiBins*[numCutBins];
2164 mPaPhiPhi[i]=
new phiBins*[numCutBins];
2165 mPbPhiPhi[i]=
new phiBins*[numCutBins];
2167 mPrEtaEtaSS[i]=
new etaBins*[numCutBins];
2168 mPaEtaEtaSS[i]=
new etaBins*[numCutBins];
2169 mPbEtaEtaSS[i]=
new etaBins*[numCutBins];
2170 mPrEtaEtaAS[i]=
new etaBins*[numCutBins];
2171 mPaEtaEtaAS[i]=
new etaBins*[numCutBins];
2172 mPbEtaEtaAS[i]=
new etaBins*[numCutBins];
2177 if (mdoFillSumHistograms) {
2178 mAtSYtDYt[i]=
new dytBins*[numCutBins];
2179 mAtNSYtDYt[i]=
new dytBins*[numCutBins];
2180 mJtSEtaDPhi[i]=
new dphiBins*[numCutBins];
2181 mJtNSEtaDPhi[i]=
new dphiBins*[numCutBins];
2182 if (!mdontFillMeanPt) {
2183 mPaJtSEtaDPhi[i]=
new dphiBins*[numCutBins];
2184 mPbJtSEtaDPhi[i]=
new dphiBins*[numCutBins];
2185 mPrJtSEtaDPhi[i]=
new dphiBins*[numCutBins];
2196 mQinv[i]=
new qBins[numCutBins];
2197 mNQinv[i]=
new qBins[numCutBins];
2198 memset(mQinv[i],0,numCutBins*
sizeof(
qBins));
2199 memset(mNQinv[i],0,numCutBins*
sizeof(
qBins));
2202 if(mdoPairDensityHistograms) {
2215 memset(mTPCAvgTSep[i], 0,nden*
sizeof(
TPCSepBins));
2216 memset(mTPCAvgZSep[i], 0,nden*
sizeof(
TPCSepBins));
2217 memset(mTPCEntTSep[i], 0,nden*
sizeof(
TPCSepBins));
2218 memset(mTPCEntZSep[i], 0,nden*
sizeof(
TPCSepBins));
2219 memset(mTPCMidTSep[i], 0,nden*
sizeof(
TPCSepBins));
2220 memset(mTPCMidZSep[i], 0,nden*
sizeof(
TPCSepBins));
2221 memset(mTPCExitTSep[i], 0,nden*
sizeof(
TPCSepBins));
2222 memset(mTPCExitZSep[i], 0,nden*
sizeof(
TPCSepBins));
2223 memset(mTPCMidTdptP[i],0,nden*
sizeof(
TPCSepBins));
2224 memset(mTPCMidTdptN[i],0,nden*
sizeof(
TPCSepBins));
2225 memset(mTPCMidZdptP[i],0,nden*
sizeof(
TPCSepBins));
2226 memset(mTPCMidZdptN[i],0,nden*
sizeof(
TPCSepBins));
2228 memset(mTPCQuality[i], 0,nden*
sizeof(
TPCSepBins));
2242 mTPCEntTdpt[i]=
new dptBins*[nden];
2243 mTPCMidTdpt[i]=
new dptBins*[nden];
2244 mTPCExitTdpt[i]=
new dptBins*[nden];
2248 for(
int j=0;j<numCutBins;j++){
2249 if (!mdontFillYtYt) {
2250 mYtYt[i][j]=
new ytBins[ESTRUCT_YT_BINS];
2251 memset(mYtYt[i][j],0,ESTRUCT_YT_BINS*
sizeof(
ytBins));
2252 mNYtYt[i][j]=
new ytBins[ESTRUCT_YT_BINS];
2253 memset(mNYtYt[i][j],0,ESTRUCT_YT_BINS*
sizeof(
ytBins));
2256 mJtDEtaDPhi[i][j]=
new dphiBins[ESTRUCT_DETA_BINS];
2257 memset(mJtDEtaDPhi[i][j],0,ESTRUCT_DETA_BINS*
sizeof(
dphiBins));
2258 if (!mdontFillMeanPt) {
2259 mPaJtDEtaDPhi[i][j]=
new dphiBins[ESTRUCT_DETA_BINS];
2260 memset(mPaJtDEtaDPhi[i][j],0,ESTRUCT_DETA_BINS*
sizeof(
dphiBins));
2261 mPbJtDEtaDPhi[i][j]=
new dphiBins[ESTRUCT_DETA_BINS];
2262 memset(mPbJtDEtaDPhi[i][j],0,ESTRUCT_DETA_BINS*
sizeof(
dphiBins));
2263 mPrJtDEtaDPhi[i][j]=
new dphiBins[ESTRUCT_DETA_BINS];
2264 memset(mPrJtDEtaDPhi[i][j],0,ESTRUCT_DETA_BINS*
sizeof(
dphiBins));
2267 if (mdoFillEtaEta) {
2268 mEtaEta[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2269 memset(mEtaEta[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2270 mPhiPhi[i][j]=
new phiBins[ESTRUCT_PHI_BINS];
2271 memset(mPhiPhi[i][j],0,ESTRUCT_PHI_BINS*
sizeof(
phiBins));
2272 mNPhiPhi[i][j]=
new phiBins[ESTRUCT_PHI_BINS];
2273 memset(mNPhiPhi[i][j],0,ESTRUCT_PHI_BINS*
sizeof(
phiBins));
2275 mEtaEtaSS[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2276 memset(mEtaEtaSS[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2277 mEtaEtaAS[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2278 memset(mEtaEtaAS[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2280 if (!mdontFillMeanPt) {
2281 mPrEtaEta[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2282 memset(mPrEtaEta[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2283 mPaEtaEta[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2284 memset(mPaEtaEta[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2285 mPbEtaEta[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2286 memset(mPbEtaEta[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2287 mPrPhiPhi[i][j]=
new phiBins[ESTRUCT_PHI_BINS];
2288 memset(mPrPhiPhi[i][j],0,ESTRUCT_PHI_BINS*
sizeof(
phiBins));
2289 mPaPhiPhi[i][j]=
new phiBins[ESTRUCT_PHI_BINS];
2290 memset(mPaPhiPhi[i][j],0,ESTRUCT_PHI_BINS*
sizeof(
phiBins));
2291 mPbPhiPhi[i][j]=
new phiBins[ESTRUCT_PHI_BINS];
2292 memset(mPbPhiPhi[i][j],0,ESTRUCT_PHI_BINS*
sizeof(
phiBins));
2294 mPrEtaEtaSS[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2295 memset(mPrEtaEtaSS[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2296 mPaEtaEtaSS[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2297 memset(mPaEtaEtaSS[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2298 mPbEtaEtaSS[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2299 memset(mPbEtaEtaSS[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2300 mPrEtaEtaAS[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2301 memset(mPrEtaEtaAS[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2302 mPaEtaEtaAS[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2303 memset(mPaEtaEtaAS[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2304 mPbEtaEtaAS[i][j]=
new etaBins[ESTRUCT_ETA_BINS];
2305 memset(mPbEtaEtaAS[i][j],0,ESTRUCT_ETA_BINS*
sizeof(
etaBins));
2310 if (mdoFillSumHistograms) {
2311 mAtSYtDYt[i][j]=
new dytBins[ESTRUCT_SYT_BINS];
2312 memset(mAtSYtDYt[i][j],0,ESTRUCT_SYT_BINS*
sizeof(
dytBins));
2313 mAtNSYtDYt[i][j]=
new dytBins[ESTRUCT_SYT_BINS];
2314 memset(mAtNSYtDYt[i][j],0,ESTRUCT_SYT_BINS*
sizeof(
dytBins));
2315 mJtSEtaDPhi[i][j]=
new dphiBins[ESTRUCT_SETA_BINS];
2316 memset(mJtSEtaDPhi[i][j],0,ESTRUCT_SETA_BINS*
sizeof(
dphiBins));
2317 mJtNSEtaDPhi[i][j]=
new dphiBins[ESTRUCT_SETA_BINS];
2318 memset(mJtNSEtaDPhi[i][j],0,ESTRUCT_SETA_BINS*
sizeof(
dphiBins));
2319 if (!mdontFillMeanPt) {
2320 mPrJtSEtaDPhi[i][j]=
new dphiBins[ESTRUCT_SETA_BINS];
2321 memset(mPrJtSEtaDPhi[i][j],0,ESTRUCT_SETA_BINS*
sizeof(
dphiBins));
2322 mPaJtSEtaDPhi[i][j]=
new dphiBins[ESTRUCT_SETA_BINS];
2323 memset(mPaJtSEtaDPhi[i][j],0,ESTRUCT_SETA_BINS*
sizeof(
dphiBins));
2324 mPbJtSEtaDPhi[i][j]=
new dphiBins[ESTRUCT_SETA_BINS];
2325 memset(mPbJtSEtaDPhi[i][j],0,ESTRUCT_SETA_BINS*
sizeof(
dphiBins));
2330 if(mdoPairDensityHistograms) {
2331 for(
int j=0;j<nden;j++){
2332 mTPCAvgTZ[i][j]=
new TPCSepBins[ESTRUCT_TPCSEP_BINS];
2333 memset(mTPCAvgTZ[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2334 mTPCEntTZ[i][j]=
new TPCSepBins[ESTRUCT_TPCSEP_BINS];
2335 memset(mTPCEntTZ[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2336 mTPCMidTZ[i][j]=
new TPCSepBins[ESTRUCT_TPCSEP_BINS];
2337 memset(mTPCMidTZ[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2338 mTPCMidTZC[i][j]=
new TPCSepBins[ESTRUCT_TPCSEP_BINS];
2339 memset(mTPCMidTZC[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2340 mTPCMidTZNC[i][j]=
new TPCSepBins[ESTRUCT_TPCSEP_BINS];
2341 memset(mTPCMidTZNC[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2342 mTPCExitTZ[i][j]=
new TPCSepBins[ESTRUCT_TPCSEP_BINS];
2343 memset(mTPCExitTZ[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2344 mTPCEntQZ[i][j]=
new TPCSepBins[ESTRUCT_TPCQUALITY_BINS];
2345 memset(mTPCEntQZ[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2346 mTPCMidQZ[i][j]=
new TPCSepBins[ESTRUCT_TPCQUALITY_BINS];
2347 memset(mTPCMidQZ[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2348 mTPCEntQT[i][j]=
new TPCSepBins[ESTRUCT_TPCQUALITY_BINS];
2349 memset(mTPCEntQT[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2350 mTPCMidQT[i][j]=
new TPCSepBins[ESTRUCT_TPCQUALITY_BINS];
2351 memset(mTPCMidQT[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2352 mTPCEntQZT[i][j]=
new TPCSepBins[ESTRUCT_TPCQUALITY_BINS];
2353 memset(mTPCEntQZT[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2354 mTPCMidQZT[i][j]=
new TPCSepBins[ESTRUCT_TPCQUALITY_BINS];
2355 memset(mTPCMidQZT[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
TPCSepBins));
2357 mTPCEntTdpt[i][j]=
new dptBins[ESTRUCT_TPCSEP_BINS];
2358 memset(mTPCEntTdpt[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
dptBins));
2359 mTPCMidTdpt[i][j]=
new dptBins[ESTRUCT_TPCSEP_BINS];
2360 memset(mTPCMidTdpt[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
dptBins));
2361 mTPCExitTdpt[i][j]=
new dptBins[ESTRUCT_TPCSEP_BINS];
2362 memset(mTPCExitTdpt[i][j],0,ESTRUCT_TPCSEP_BINS*
sizeof(
dptBins));
2370 void StEStruct2ptCorrelations::deleteArrays(){
2372 int numCutBins=StEStructCutBin::Instance()->getNumBins();
2373 int nden=StEStructCutBin::Instance()->getNumPairDensityBins();
2374 if (mZBufferCutBinning) {
2375 numCutBins *= kNumBuffers;
2376 nden *= kNumBuffers;
2379 for(
int i=0;i<8;i++){
2380 for(
int j=0;j<numCutBins;j++){
2382 if (!mdontFillYtYt) {
2383 delete [] mYtYt[i][j];
2384 delete [] mNYtYt[i][j];
2387 delete [] mJtDEtaDPhi[i][j];
2388 if (!mdontFillMeanPt) {
2389 delete [] mPrJtDEtaDPhi[i][j];
2390 delete [] mPaJtDEtaDPhi[i][j];
2391 delete [] mPbJtDEtaDPhi[i][j];
2394 if (mdoFillEtaEta) {
2395 delete [] mEtaEta[i][j];
2396 delete [] mPhiPhi[i][j];
2397 delete [] mNPhiPhi[i][j];
2399 delete [] mEtaEtaSS[i][j];
2400 delete [] mEtaEtaAS[i][j];
2402 if (!mdontFillMeanPt) {
2403 delete [] mPrEtaEta[i][j];
2404 delete [] mPrPhiPhi[i][j];
2405 delete [] mPaEtaEta[i][j];
2406 delete [] mPaPhiPhi[i][j];
2407 delete [] mPbEtaEta[i][j];
2408 delete [] mPbPhiPhi[i][j];
2410 delete [] mPrEtaEtaSS[i][j];
2411 delete [] mPaEtaEtaSS[i][j];
2412 delete [] mPbEtaEtaSS[i][j];
2413 delete [] mPrEtaEtaAS[i][j];
2414 delete [] mPaEtaEtaAS[i][j];
2415 delete [] mPbEtaEtaAS[i][j];
2420 if (mdoFillSumHistograms) {
2421 delete [] mAtSYtDYt[i][j];
2422 delete [] mJtSEtaDPhi[i][j];
2423 delete [] mJtNSEtaDPhi[i][j];
2424 if (!mdontFillMeanPt) {
2425 delete [] mPrJtSEtaDPhi[i][j];
2426 delete [] mPaJtSEtaDPhi[i][j];
2427 delete [] mPbJtSEtaDPhi[i][j];
2433 if(mdoPairDensityHistograms) {
2434 for(
int j=0;j<nden;j++){
2435 delete [] mTPCAvgTZ[i][j];
2436 delete [] mTPCEntTZ[i][j];
2437 delete [] mTPCMidTZ[i][j];
2438 delete [] mTPCMidTZC[i][j];
2439 delete [] mTPCMidTZNC[i][j];
2440 delete [] mTPCExitTZ[i][j];
2441 delete [] mTPCEntQZ[i][j];
2442 delete [] mTPCMidQZ[i][j];
2443 delete [] mTPCEntQT[i][j];
2444 delete [] mTPCMidQT[i][j];
2445 delete [] mTPCEntQZT[i][j];
2446 delete [] mTPCMidQZT[i][j];
2447 delete [] mTPCEntTdpt[i][j];
2448 delete [] mTPCMidTdpt[i][j];
2449 delete [] mTPCExitTdpt[i][j];
2453 if (!mdontFillYtYt) {
2455 delete [] mNYtYt[i];
2458 delete [] mJtDEtaDPhi[i];
2459 if (!mdontFillMeanPt) {
2460 delete [] mPrJtDEtaDPhi[i];
2461 delete [] mPaJtDEtaDPhi[i];
2462 delete [] mPbJtDEtaDPhi[i];
2465 if (mdoFillEtaEta) {
2466 delete [] mEtaEta[i];
2467 delete [] mPhiPhi[i];
2468 delete [] mNPhiPhi[i];
2470 delete [] mEtaEtaSS[i];
2471 delete [] mEtaEtaAS[i];
2473 if (!mdontFillMeanPt) {
2474 delete [] mPrEtaEta[i];
2475 delete [] mPrPhiPhi[i];
2476 delete [] mPaEtaEta[i];
2477 delete [] mPaPhiPhi[i];
2478 delete [] mPbEtaEta[i];
2479 delete [] mPbPhiPhi[i];
2481 delete [] mPrEtaEtaSS[i];
2482 delete [] mPaEtaEtaSS[i];
2483 delete [] mPbEtaEtaSS[i];
2484 delete [] mPrEtaEtaAS[i];
2485 delete [] mPaEtaEtaAS[i];
2486 delete [] mPbEtaEtaAS[i];
2491 if (mdoFillSumHistograms) {
2492 delete [] mAtSYtDYt[i];
2493 delete [] mJtSEtaDPhi[i];
2494 delete [] mJtNSEtaDPhi[i];
2495 if (!mdontFillMeanPt) {
2496 delete [] mPrJtSEtaDPhi[i];
2497 delete [] mPaJtSEtaDPhi[i];
2498 delete [] mPbJtSEtaDPhi[i];
2504 delete [] mNQinv[i];
2507 if(mdoPairDensityHistograms) {
2508 delete [] mTPCAvgTSep[i];
2509 delete [] mTPCAvgZSep[i];
2510 delete [] mTPCEntTSep[i];
2511 delete [] mTPCEntZSep[i];
2512 delete [] mTPCMidTSep[i];
2513 delete [] mTPCMidZSep[i];
2514 delete [] mTPCExitTSep[i];
2515 delete [] mTPCExitZSep[i];
2516 delete [] mTPCMidTdptP[i];
2517 delete [] mTPCMidTdptN[i];
2518 delete [] mTPCMidZdptP[i];
2519 delete [] mTPCMidZdptN[i];
2520 delete [] mTPCQuality[i];
2521 delete [] mTPCAvgTZ[i];
2522 delete [] mTPCEntTZ[i];
2523 delete [] mTPCMidTZ[i];
2524 delete [] mTPCMidTZC[i];
2525 delete [] mTPCMidTZNC[i];
2526 delete [] mTPCExitTZ[i];
2527 delete [] mTPCEntQZ[i];
2528 delete [] mTPCMidQZ[i];
2529 delete [] mTPCEntQT[i];
2530 delete [] mTPCMidQT[i];
2531 delete [] mTPCEntQZT[i];
2532 delete [] mTPCMidQZT[i];
2533 delete [] mTPCEntTdpt[i];
2534 delete [] mTPCMidTdpt[i];
2535 delete [] mTPCExitTdpt[i];
2543 void StEStruct2ptCorrelations::initHistograms(){
2545 int numCutBins=StEStructCutBin::Instance()->getNumBins();
2546 int nden=StEStructCutBin::Instance()->getNumPairDensityBins();
2547 int numParentBins=StEStructCutBin::Instance()->getNumParentBins();
2548 if (mZBufferCutBinning) {
2549 numCutBins *= kNumBuffers;
2550 nden *= kNumBuffers;
2551 numParentBins *= kNumBuffers;
2556 mHEtaPhi =
new TH2D(
"EtaPhiRange",
"EtaPhiRange",1,b->etaMin(),b->etaMax(),1,b->phiMin(),b->phiMax());
2558 for(
int i=0; i<8; i++){
2560 if (!mdontFillYtYt) {
2561 mHYtYt[i]=
new TH2D*[numCutBins];
2562 mHNYtYt[i]=
new TH2D*[numCutBins];
2565 mHJtDEtaDPhi[i]=
new TH2D*[numCutBins];
2566 if (!mdontFillMeanPt) {
2567 mHPrJtDEtaDPhi[i]=
new TH2D*[numCutBins];
2568 mHPaJtDEtaDPhi[i]=
new TH2D*[numCutBins];
2569 mHPbJtDEtaDPhi[i]=
new TH2D*[numCutBins];
2572 if (mdoFillEtaEta) {
2573 mHEtaEta[i]=
new TH2D*[numCutBins];
2574 mHPhiPhi[i]=
new TH2D*[numCutBins];
2575 mHNPhiPhi[i]=
new TH2D*[numCutBins];
2577 mHEtaEtaSS[i]=
new TH2D*[numCutBins];
2578 mHEtaEtaAS[i]=
new TH2D*[numCutBins];
2580 if (!mdontFillMeanPt) {
2581 mHPrEtaEta[i]=
new TH2D*[numCutBins];
2582 mHPrPhiPhi[i]=
new TH2D*[numCutBins];
2583 mHPaEtaEta[i]=
new TH2D*[numCutBins];
2584 mHPaPhiPhi[i]=
new TH2D*[numCutBins];
2585 mHPbEtaEta[i]=
new TH2D*[numCutBins];
2586 mHPbPhiPhi[i]=
new TH2D*[numCutBins];
2588 mHPrEtaEtaSS[i]=
new TH2D*[numCutBins];
2589 mHPaEtaEtaSS[i]=
new TH2D*[numCutBins];
2590 mHPbEtaEtaSS[i]=
new TH2D*[numCutBins];
2591 mHPrEtaEtaAS[i]=
new TH2D*[numCutBins];
2592 mHPaEtaEtaAS[i]=
new TH2D*[numCutBins];
2593 mHPbEtaEtaAS[i]=
new TH2D*[numCutBins];
2598 if (mdoFillSumHistograms) {
2599 mHAtSYtDYt[i]=
new TH2D*[numCutBins];
2600 mHAtNSYtDYt[i]=
new TH2D*[numCutBins];
2601 mHJtSEtaDPhi[i]=
new TH2D*[numCutBins];
2602 mHJtNSEtaDPhi[i]=
new TH2D*[numCutBins];
2603 if (!mdontFillMeanPt) {
2604 mHPrJtSEtaDPhi[i]=
new TH2D*[numCutBins];
2605 mHPaJtSEtaDPhi[i]=
new TH2D*[numCutBins];
2606 mHPbJtSEtaDPhi[i]=
new TH2D*[numCutBins];
2611 mHQinv[i]=
new TH1D*[numCutBins];
2612 mHNQinv[i]=
new TH1D*[numCutBins];
2615 if(mdoPairDensityHistograms) {
2616 mHTPCAvgTSep[i]=
new TH1D*[nden];
2617 mHTPCAvgZSep[i]=
new TH1D*[nden];
2618 mHTPCEntTSep[i]=
new TH1D*[nden];
2619 mHTPCEntZSep[i]=
new TH1D*[nden];
2620 mHTPCMidTSep[i]=
new TH1D*[nden];
2621 mHTPCMidZSep[i]=
new TH1D*[nden];
2622 mHTPCExitTSep[i]=
new TH1D*[nden];
2623 mHTPCExitZSep[i]=
new TH1D*[nden];
2624 mHTPCMidTdptP[i]=
new TH1D*[nden];
2625 mHTPCMidTdptN[i]=
new TH1D*[nden];
2626 mHTPCMidZdptP[i]=
new TH1D*[nden];
2627 mHTPCMidZdptN[i]=
new TH1D*[nden];
2628 mHTPCQuality[i]=
new TH1D*[nden];
2629 mHTPCAvgTZ[i]=
new TH2D*[nden];
2630 mHTPCEntTZ[i]=
new TH2D*[nden];
2631 mHTPCMidTZ[i]=
new TH2D*[nden];
2632 mHTPCMidTZC[i]=
new TH2D*[nden];
2633 mHTPCMidTZNC[i]=
new TH2D*[nden];
2634 mHTPCExitTZ[i]=
new TH2D*[nden];
2635 mHTPCEntQZ[i]=
new TH2D*[nden];
2636 mHTPCMidQZ[i]=
new TH2D*[nden];
2637 mHTPCEntQT[i]=
new TH2D*[nden];
2638 mHTPCMidQT[i]=
new TH2D*[nden];
2639 mHTPCEntQZT[i]=
new TH2D*[nden];
2640 mHTPCMidQZT[i]=
new TH2D*[nden];
2641 mHTPCEntTdpt[i]=
new TH2D*[nden];
2642 mHTPCMidTdpt[i]=
new TH2D*[nden];
2643 mHTPCExitTdpt[i]=
new TH2D*[nden];
2650 void StEStruct2ptCorrelations::deleteHistograms(){
2652 int numCutBins=StEStructCutBin::Instance()->getNumBins();
2653 int nden=StEStructCutBin::Instance()->getNumPairDensityBins();
2654 int numParentBins=StEStructCutBin::Instance()->getNumParentBins();
2655 if (mZBufferCutBinning) {
2656 numCutBins *= kNumBuffers;
2657 nden *= kNumBuffers;
2658 numParentBins *= kNumBuffers;
2662 for(
int j=0;j<numParentBins;j++){
2663 delete mHMeanPtTot[j];
2664 delete mHMeanPtP[j];
2665 delete mHMeanPtM[j];
2666 delete mHMeanYtTot[j];
2667 delete mHMeanYtP[j];
2668 delete mHMeanYtM[j];
2697 delete mHPhiAssocTot;
2700 delete mHPhiAssocPtTot;
2701 delete mHPhiAssocPtP;
2702 delete mHPhiAssocPtM;
2709 for(
int i=0;i<8;i++){
2710 for(
int j=0;j<numCutBins;j++){
2711 if (!mdontFillYtYt) {
2712 delete mHYtYt[i][j];
2713 delete mHNYtYt[i][j];
2716 delete mHJtDEtaDPhi[i][j];
2717 if (!mdontFillMeanPt) {
2718 delete mHPrJtDEtaDPhi[i][j];
2719 delete mHPaJtDEtaDPhi[i][j];
2720 delete mHPbJtDEtaDPhi[i][j];
2723 if (mdoFillEtaEta) {
2724 delete mHEtaEta[i][j];
2725 delete mHPhiPhi[i][j];
2726 delete mHNPhiPhi[i][j];
2728 delete mHEtaEtaSS[i][j];
2729 delete mHEtaEtaAS[i][j];
2731 if (!mdontFillMeanPt) {
2732 delete mHPrEtaEta[i][j];
2733 delete mHPrPhiPhi[i][j];
2734 delete mHPaEtaEta[i][j];
2735 delete mHPaPhiPhi[i][j];
2736 delete mHPbEtaEta[i][j];
2737 delete mHPbPhiPhi[i][j];
2739 delete mHPrEtaEtaSS[i][j];
2740 delete mHPaEtaEtaSS[i][j];
2741 delete mHPbEtaEtaSS[i][j];
2742 delete mHPrEtaEtaAS[i][j];
2743 delete mHPaEtaEtaAS[i][j];
2744 delete mHPbEtaEtaAS[i][j];
2749 if (mdoFillSumHistograms) {
2750 delete mHAtSYtDYt[i][j];
2751 delete mHAtNSYtDYt[i][j];
2752 delete mHJtSEtaDPhi[i][j];
2753 delete mHJtNSEtaDPhi[i][j];
2754 if (!mdontFillMeanPt) {
2755 delete mHPrJtSEtaDPhi[i][j];
2756 delete mHPaJtSEtaDPhi[i][j];
2757 delete mHPbJtSEtaDPhi[i][j];
2762 delete mHQinv[i][j];
2763 delete mHNQinv[i][j];
2766 if(mdoPairDensityHistograms) {
2767 for(
int j=0;j<nden;j++){
2768 delete mHTPCAvgTSep[i][j];
2769 delete mHTPCAvgZSep[i][j];
2770 delete mHTPCEntTSep[i][j];
2771 delete mHTPCEntZSep[i][j];
2772 delete mHTPCMidTSep[i][j];
2773 delete mHTPCMidZSep[i][j];
2774 delete mHTPCExitTSep[i][j];
2775 delete mHTPCExitZSep[i][j];
2776 delete mHTPCMidTdptP[i][j];
2777 delete mHTPCMidTdptN[i][j];
2778 delete mHTPCMidZdptP[i][j];
2779 delete mHTPCMidZdptN[i][j];
2780 delete mHTPCQuality[i][j];
2781 delete mHTPCAvgTZ[i][j];
2782 delete mHTPCEntTZ[i][j];
2783 delete mHTPCMidTZ[i][j];
2784 delete mHTPCMidTZC[i][j];
2785 delete mHTPCMidTZNC[i][j];
2786 delete mHTPCExitTZ[i][j];
2787 delete mHTPCEntQZ[i][j];
2788 delete mHTPCMidQZ[i][j];
2789 delete mHTPCEntQT[i][j];
2790 delete mHTPCMidQT[i][j];
2791 delete mHTPCEntQZT[i][j];
2792 delete mHTPCMidQZT[i][j];
2793 delete mHTPCEntTdpt[i][j];
2794 delete mHTPCMidTdpt[i][j];
2795 delete mHTPCExitTdpt[i][j];
2800 if (!mdontFillYtYt) {
2801 delete [] mHYtYt[i];
2802 delete [] mHNYtYt[i];
2805 delete [] mHJtDEtaDPhi[i];
2806 if (!mdontFillMeanPt) {
2807 delete [] mHPrJtDEtaDPhi[i];
2808 delete [] mHPaJtDEtaDPhi[i];
2809 delete [] mHPbJtDEtaDPhi[i];
2812 if (mdoFillEtaEta) {
2813 delete [] mHEtaEta[i];
2814 delete [] mHPhiPhi[i];
2815 delete [] mHNPhiPhi[i];
2817 delete [] mHEtaEtaSS[i];
2818 delete [] mHEtaEtaAS[i];
2820 if (!mdontFillMeanPt) {
2821 delete [] mHPrEtaEta[i];
2822 delete [] mHPrPhiPhi[i];
2823 delete [] mHPaEtaEta[i];
2824 delete [] mHPaPhiPhi[i];
2825 delete [] mHPbEtaEta[i];
2826 delete [] mHPbPhiPhi[i];
2828 delete [] mHPrEtaEtaSS[i];
2829 delete [] mHPaEtaEtaSS[i];
2830 delete [] mHPbEtaEtaSS[i];
2831 delete [] mHPrEtaEtaAS[i];
2832 delete [] mHPaEtaEtaAS[i];
2833 delete [] mHPbEtaEtaAS[i];
2838 if (mdoFillSumHistograms) {
2839 delete [] mHAtSYtDYt[i];
2840 delete [] mHAtNSYtDYt[i];
2841 delete [] mHJtSEtaDPhi[i];
2842 delete [] mHJtNSEtaDPhi[i];
2843 if (!mdontFillMeanPt) {
2844 delete [] mHPrJtSEtaDPhi[i];
2845 delete [] mHPaJtSEtaDPhi[i];
2846 delete [] mHPbJtSEtaDPhi[i];
2851 delete [] mHQinv[i];
2852 delete [] mHNQinv[i];
2855 if(mdoPairDensityHistograms) {
2856 delete [] mHTPCAvgTSep[i];
2857 delete [] mHTPCAvgZSep[i];
2858 delete [] mHTPCEntTSep[i];
2859 delete [] mHTPCEntZSep[i];
2860 delete [] mHTPCMidTSep[i];
2861 delete [] mHTPCMidZSep[i];
2862 delete [] mHTPCExitTSep[i];
2863 delete [] mHTPCExitZSep[i];
2864 delete [] mHTPCMidTdptP[i];
2865 delete [] mHTPCMidTdptN[i];
2866 delete [] mHTPCMidZdptP[i];
2867 delete [] mHTPCMidZdptN[i];
2868 delete [] mHTPCQuality[i];
2869 delete [] mHTPCAvgTZ[i];
2870 delete [] mHTPCEntTZ[i];
2871 delete [] mHTPCMidTZ[i];
2872 delete [] mHTPCMidTZC[i];
2873 delete [] mHTPCMidTZNC[i];
2874 delete [] mHTPCExitTZ[i];
2875 delete [] mHTPCEntQZ[i];
2876 delete [] mHTPCMidQZ[i];
2877 delete [] mHTPCEntQT[i];
2878 delete [] mHTPCMidQT[i];
2879 delete [] mHTPCEntQZT[i];
2880 delete [] mHTPCMidQZT[i];
2881 delete [] mHTPCEntTdpt[i];
2882 delete [] mHTPCMidTdpt[i];
2883 delete [] mHTPCExitTdpt[i];
2891 void StEStruct2ptCorrelations::createHist2D(TH2D*** h,
const char* name,
int iknd,
int icut,
int zcut,
int ncut,
int nx,
float xmin,
float xmax,
int ny,
float ymin,
float ymax ){
2893 TString hname(bName[iknd]);
2895 hname +=
"_cutBin_";
2899 TString htitle(bTitle[iknd]);
2901 h[iknd][ncut]=
new TH2D(hname.Data(),htitle.Data(),nx,xmin,xmax,ny,ymin,ymax);
2905 void StEStruct2ptCorrelations::createHist1D(TH1D*** h,
const char* name,
int iknd,
int icut,
int zcut,
int ncut,
int nx,
float xmin,
float xmax){
2907 TString hname(bName[iknd]);
2909 hname +=
"_cutBin_";
2913 TString htitle(bTitle[iknd]);
2915 h[iknd][ncut]=
new TH1D(hname.Data(),htitle.Data(),nx,xmin,xmax);
2919 void StEStruct2ptCorrelations::createHist1D(TH1F*** h,
const char* name,
int iknd,
int icut,
int zcut,
int ncut,
int nx,
float xmin,
float xmax){
2921 TString hname(bName[iknd]);
2923 hname +=
"_cutBin_";
2927 TString htitle(bTitle[iknd]);
2929 h[iknd][ncut]=
new TH1F(hname.Data(),htitle.Data(),nx,xmin,xmax);