18 #include "StFlowAnalysisMaker.h"
19 #include "StFlowMaker/StFlowMaker.h"
20 #include "StFlowMaker/StFlowEvent.h"
21 #include "StFlowMaker/StFlowConstants.h"
22 #include "StFlowMaker/StFlowSelection.h"
23 #include "StFlowMaker/StFlowCutEvent.h"
25 #include "PhysicalConstants.h"
26 #include "SystemOfUnits.h"
34 #include "TProfile2D.h"
35 #include "TOrdCollection.h"
36 #include "StMessMgr.h"
40 #define PR(x) cout << "##### FlowAnalysis: " << (#x) << " = " << (x) << endl;
50 SetPtRange_for_vEta(0., 0.);
51 SetEtaRange_for_vPt(0., 0.);
56 StMaker(name), MakerName(name) {
59 SetPtRange_for_vEta(0., 0.);
60 SetEtaRange_for_vPt(0., 0.);
65 StFlowAnalysisMaker::~StFlowAnalysisMaker() {
76 if (pFlowMaker) pFlowEvent = pFlowMaker->FlowEventPointer();
77 if (pFlowEvent && pFlowSelect->Select(pFlowEvent)) {
78 if (FillFromFlowEvent()) {
79 FillEventHistograms();
80 FillParticleHistograms();
82 gMessMgr->Info(
"##### FlowAnalysis: Event psi = 0");
85 gMessMgr->Info(
"##### FlowAnalysis: FlowEvent pointer null");
89 if (Debug()) StMaker::PrintInfo();
96 Int_t StFlowAnalysisMaker::Init() {
101 Bool_t reCentCalc = pFlowMaker->ReCentCalc();
103 float ptMaxPart = Flow::ptMaxPart;
104 if (pFlowSelect->PtMaxPart()) {
105 ptMaxPart = pFlowSelect->PtMaxPart();
107 int nPtBinsPart = Flow::nPtBinsPart;
108 if (pFlowSelect->PtBinsPart()) {
109 nPtBinsPart = pFlowSelect->PtBinsPart();
111 xLabel =
"Pseudorapidity";
112 if (strlen(pFlowSelect->PidPart()) != 0) { xLabel =
"Rapidity"; }
114 const float triggerMin = -0.5;
115 const float triggerMax = 10.5;
116 const float chargeMin = -2.5;
117 const float chargeMax = 2.5;
118 const float dcaMin = 0.;
119 const float dcaMax = 0.3;
120 const float glDcaMax = 3.6;
121 const float chi2Min = 0.;
122 const float chi2Max = 5.;
123 const float fitPtsMinTpc = -0.5;
124 const float fitPtsMaxTpc = 60.5;
125 const float maxPtsMinTpc = -0.5;
126 const float maxPtsMaxTpc = 60.5;
127 const float fitPtsMinFtpc = -0.5;
128 const float fitPtsMaxFtpc = 12.5;
129 const float maxPtsMinFtpc = -0.5;
130 const float maxPtsMaxFtpc = 12.5;
131 const float fitOverMaxMin = 0.;
132 const float fitOverMaxMax = 1.2;
133 const float origMultMin = 0.;
134 const float origMultMax = 3000.;
135 const float MultEtaMin = 0.;
136 const float MultEtaMax = 1000.;
137 const float totalMultMin = 0.;
138 const float totalMultMax = 2000.;
139 const float corrMultMin = 0.;
140 const float corrMultMax = 2000.;
141 const float multOverOrigMin = 0.;
142 const float multOverOrigMax = 1.;
143 const float vertexZMin =-100.5;
144 const float vertexZMax = 100.5;
145 const float vertexXYMin = -1.;
146 const float vertexXYMax = 1.;
147 const float QXYMin = -0.5;
148 const float QXYMax = 0.5;
149 const float etaSymZMin = -1.15;
150 const float etaSymZMax = 1.15;
151 const float etaSymMin = -6.;
152 const float etaSymMax = 6.;
153 const float phiMin = 0.;
154 const float phiMax = twopi;
155 const float psiMin = 0.;
156 const float psiMax = twopi;
157 const float multMin = 0.;
158 const float multMax = 2000.;
159 const float qMin = 0.;
160 const float pidMin = -10.;
161 const float pidMax = 10.;
162 const float centMin = -0.5;
163 const float centMax = 9.5;
164 const float pMin = -2.5;
165 const float pMax = 1.5;
166 const float dEdxMax = 0.00004;
167 const float qMax = 3.5;
169 enum { nTriggerBins = 11,
174 nFitPtsBinsFtpc = 13,
176 nMaxPtsBinsFtpc = 13,
177 nFitOverMaxBins = 40,
181 nMultOverOrigBins = 50,
198 mHistTrigger =
new TH1F(
"Flow_Trigger",
"Flow_Trigger",
199 nTriggerBins, triggerMin, triggerMax);
200 mHistTrigger->SetXTitle(
"Trig: 0 mb+cen, 1 mb, 2 central, 3 laser, 10 other");
201 mHistTrigger->SetYTitle(
"Counts");
205 mHistChargeFtpc =
new TH1F(
"Flow_Charge_Ftpc",
"Flow_Charge_Ftpc",
206 nChargeBins, chargeMin, chargeMax);
207 mHistChargeFtpc->SetXTitle(
"Charge");
208 mHistChargeFtpc->SetYTitle(
"Counts");
212 mHistDcaTpc =
new TH1F(
"Flow_Dca_Tpc",
"Flow_Dca_Tpc",
213 nDcaBins, dcaMin, dcaMax);
214 mHistDcaTpc->SetXTitle(
"Track dca to Vertex (cm)");
215 mHistDcaTpc->SetYTitle(
"Counts");
218 mHistDcaFtpc =
new TH1F(
"Flow_Dca_Ftpc",
"Flow_Dca_Ftpc",
219 nDcaBins, dcaMin, dcaMax);
220 mHistDcaFtpc->SetXTitle(
"Track dca to Vertex (cm)");
221 mHistDcaFtpc->SetYTitle(
"Counts");
226 mHistDcaGlobalTpc =
new TH1F(
"Flow_DcaGlobal_Tpc",
"Flow_DcaGlobal_Tpc",
227 nDcaBins, dcaMin, glDcaMax);
228 mHistDcaGlobalTpc->SetXTitle(
"Global Track dca (cm)");
229 mHistDcaGlobalTpc->SetYTitle(
"Counts");
232 mHistDcaGlobalFtpc =
new TH1F(
"Flow_DcaGlobal_Ftpc",
"Flow_DcaGlobal_Ftpc",
233 nDcaBins, dcaMin, glDcaMax);
234 mHistDcaGlobalFtpc->SetXTitle(
"Global Track dca (cm)");
235 mHistDcaGlobalFtpc->SetYTitle(
"Counts");
240 mHistChi2Tpc =
new TH1F(
"Flow_Chi2_Tpc",
"Flow_Chi2_Tpc",
241 nChi2Bins, chi2Min, chi2Max);
242 mHistChi2Tpc->SetXTitle(
"Chi square per df");
243 mHistChi2Tpc->SetYTitle(
"Counts");
246 mHistChi2Ftpc =
new TH1F(
"Flow_Chi2_Ftpc",
"Flow_Chi2_Ftpc",
247 nChi2Bins, chi2Min, chi2Max);
248 mHistChi2Ftpc->SetXTitle(
"Chi square per df");
249 mHistChi2Ftpc->SetYTitle(
"Counts");
254 mHistFitPtsTpc =
new TH1F(
"Flow_FitPts_Tpc",
"Flow_FitPts_Tpc",
255 nFitPtsBinsTpc, fitPtsMinTpc, fitPtsMaxTpc);
256 mHistFitPtsTpc->SetXTitle(
"Fit Points");
257 mHistFitPtsTpc->SetYTitle(
"Counts");
260 mHistFitPtsFtpc =
new TH1F(
"Flow_FitPts_Ftpc",
"Flow_FitPts_Ftpc",
261 nFitPtsBinsFtpc, fitPtsMinFtpc, fitPtsMaxFtpc);
262 mHistFitPtsFtpc->SetXTitle(
"Fit Points");
263 mHistFitPtsFtpc->SetYTitle(
"Counts");
268 mHistMaxPtsTpc =
new TH1F(
"Flow_MaxPts_Tpc ",
"Flow_MaxPts_Tpc ",
269 nMaxPtsBinsTpc , maxPtsMinTpc , maxPtsMaxTpc );
270 mHistMaxPtsTpc ->SetXTitle(
"Max Points");
271 mHistMaxPtsTpc ->SetYTitle(
"Counts");
274 mHistMaxPtsFtpc =
new TH1F(
"Flow_MaxPts_Ftpc",
"Flow_MaxPts_Ftpc",
275 nMaxPtsBinsFtpc, maxPtsMinFtpc, maxPtsMaxFtpc);
276 mHistMaxPtsFtpc->SetXTitle(
"Max Points");
277 mHistMaxPtsFtpc->SetYTitle(
"Counts");
282 mHistFitOverMaxTpc =
new TH1F(
"Flow_FitOverMax_Tpc",
"Flow_FitOverMax_Tpc",
283 nFitOverMaxBins, fitOverMaxMin, fitOverMaxMax);
284 mHistFitOverMaxTpc->SetXTitle(
"Fit Points / Max Points");
285 mHistFitOverMaxTpc->SetYTitle(
"Counts");
288 mHistFitOverMaxFtpc =
new TH1F(
"Flow_FitOverMax_Ftpc",
"Flow_FitOverMax_Ftpc",
289 nFitOverMaxBins, fitOverMaxMin, fitOverMaxMax);
290 mHistFitOverMaxFtpc->SetXTitle(
"Fit Points / Max Points");
291 mHistFitOverMaxFtpc->SetYTitle(
"Counts");
295 mHistOrigMult =
new TH1F(
"Flow_OrigMult",
"Flow_OrigMult",
296 nOrigMultBins, origMultMin, origMultMax);
297 mHistOrigMult->SetXTitle(
"Original Mult");
298 mHistOrigMult->SetYTitle(
"Counts");
301 mHistMultEta =
new TH1F(
"Flow_MultEta",
"Flow_MultEta",
302 nMultEtaBins, MultEtaMin, MultEtaMax);
303 mHistMultEta->SetXTitle(
"Mult for Centrality");
304 mHistMultEta->SetYTitle(
"Counts");
307 mHistMult =
new TH1F(
"Flow_Mult",
"Flow_Mult",
308 nTotalMultBins, totalMultMin, totalMultMax);
309 mHistMult->SetXTitle(
"Mult");
310 mHistMult->SetYTitle(
"Counts");
313 mHistMultOverOrig =
new TH1F(
"Flow_MultOverOrig",
"Flow_MultOverOrig",
314 nMultOverOrigBins, multOverOrigMin, multOverOrigMax);
315 mHistMultOverOrig->SetXTitle(
"Mult / Orig. Mult");
316 mHistMultOverOrig->SetYTitle(
"Counts");
319 mHistMultPart =
new TH1F(
"Flow_MultPart",
"Flow_MultPart",
320 nMultPartBins, corrMultMin, corrMultMax);
321 mHistMultPart->SetXTitle(
"Mult of Correlated Particles");
322 mHistMultPart->SetYTitle(
"Counts");
325 mHistVertexZ =
new TH1F(
"Flow_VertexZ",
"Flow_VertexZ",
326 nVertexZBins, vertexZMin, vertexZMax);
327 mHistVertexZ->SetXTitle(
"Vertex Z (cm)");
328 mHistVertexZ->SetYTitle(
"Counts");
331 mHistVertexXY2D =
new TH2F(
"Flow_VertexXY2D",
"Flow_VertexXY2D",
332 nVertexXYBins, vertexXYMin, vertexXYMax,
333 nVertexXYBins, vertexXYMin, vertexXYMax);
334 mHistVertexXY2D->SetXTitle(
"Vertex X (cm)");
335 mHistVertexXY2D->SetYTitle(
"Vertex Y (cm)");
338 mHistEtaSymVerZ2DTpc =
new TH2F(
"Flow_EtaSymVerZ2D_Tpc",
"Flow_EtaSymVerZ2D_Tpc",
339 nVertexZBins, vertexZMin, vertexZMax, nEtaSymBins, etaSymZMin, etaSymZMax);
340 mHistEtaSymVerZ2DTpc->SetXTitle(
"Vertex Z (cm)");
341 mHistEtaSymVerZ2DTpc->SetYTitle(
"Eta Symmetry");
344 mHistEtaSymVerZ2DFtpc =
new TH2F(
"Flow_EtaSymVerZ2D_Ftpc",
"Flow_EtaSymVerZ2D_Ftpc",
345 nVertexZBins, vertexZMin, vertexZMax, nEtaSymBins, etaSymZMin, etaSymZMax);
346 mHistEtaSymVerZ2DFtpc->SetXTitle(
"Vertex Z (cm)");
347 mHistEtaSymVerZ2DFtpc->SetYTitle(
"Eta Symmetry");
350 mHistEtaSymTpc =
new TH1F(
"Flow_EtaSym_Tpc",
"Flow_EtaSym_Tpc",
351 nEtaSymBins, etaSymMin, etaSymMax);
352 mHistEtaSymTpc->SetXTitle(
"Eta Symmetry Ratio TPC");
353 mHistEtaSymTpc->SetYTitle(
"Counts");
356 mHistEtaSymFtpc =
new TH1F(
"Flow_EtaSym_Ftpc",
"Flow_EtaSym_Ftpc",
357 nEtaSymBins, etaSymMin, etaSymMax);
358 mHistEtaSymFtpc->SetXTitle(
"Eta Symmetry Ratio FTPC");
359 mHistEtaSymFtpc->SetYTitle(
"Counts");
362 mHistEtaPtPhi3D =
new TH3F(
"Flow_EtaPtPhi3D",
"Flow_EtaPtPhi3D",
363 mNEtaBins, mEtaMin, mEtaMax, Flow::nPtBins, Flow::ptMin,
364 Flow::ptMax, nPhi3DBins, phiMin, phiMax);
365 mHistEtaPtPhi3D->SetXTitle(
"Eta");
366 mHistEtaPtPhi3D->SetYTitle(
"Pt (GeV/c)");
367 mHistEtaPtPhi3D->SetZTitle(
"Phi (rad)");
370 mHistYieldAll2D =
new TH2D(
"Flow_YieldAll2D",
"Flow_YieldAll2D",
371 mNEtaBins, mEtaMin, mEtaMax, Flow::nPtBins, Flow::ptMin,
373 mHistYieldAll2D->Sumw2();
374 mHistYieldAll2D->SetXTitle(
"Pseudorapidty");
375 mHistYieldAll2D->SetYTitle(
"Pt (GeV/c)");
378 mHistYieldPart2D =
new TH2D(
"Flow_YieldPart2D",
"Flow_YieldPart2D",
379 mNEtaBins, mEtaMin, mEtaMax, nPtBinsPart, Flow::ptMin,
381 mHistYieldPart2D->Sumw2();
382 mHistYieldPart2D->SetXTitle((
char*)xLabel.Data());
383 mHistYieldPart2D->SetYTitle(
"Pt (GeV/c)");
386 mHistBinEta =
new TProfile(
"Flow_Bin_Eta",
"Flow_Bin_Eta",
387 mNEtaBins, mEtaMin, mEtaMax, mEtaMin, mEtaMax,
"");
388 mHistBinEta->SetXTitle((
char*)xLabel.Data());
389 mHistBinEta->SetYTitle(
"<Eta>");
392 mHistBinPt =
new TProfile(
"Flow_Bin_Pt",
"Flow_Bin_Pt",
393 nPtBinsPart, Flow::ptMin, ptMaxPart, Flow::ptMin, ptMaxPart,
"");
394 mHistBinPt->SetXTitle(
"Pt (GeV/c)");
395 mHistBinPt->SetYTitle(
"<Pt> (GeV/c)");
398 mHistPidPiPlus =
new TH1F(
"Flow_PidPiPlus",
"Flow_PidPiPlus",
399 nPidBins, pidMin, pidMax);
400 mHistPidPiPlus->SetXTitle(
"(PID - Mean) / Resolution");
401 mHistPidPiPlus->SetYTitle(
"Counts");
404 mHistPidPiMinus =
new TH1F(
"Flow_PidPiMinus",
"Flow_PidPiMinus",
405 nPidBins, pidMin, pidMax);
406 mHistPidPiMinus->SetXTitle(
"(PID - Mean) / Resolution");
407 mHistPidPiMinus->SetYTitle(
"Counts");
410 mHistPidProton =
new TH1F(
"Flow_PidProton",
"Flow_PidProton",
411 nPidBins, pidMin, pidMax);
412 mHistPidProton->SetXTitle(
"(PID - Mean) / Resolution");
413 mHistPidProton->SetYTitle(
"Counts");
416 mHistPidAntiProton =
new TH1F(
"Flow_PidAntiProton",
"Flow_PidAntiProton",
417 nPidBins, pidMin, pidMax);
418 mHistPidAntiProton->SetXTitle(
"(PID - Mean) / Resolution");
419 mHistPidAntiProton->SetYTitle(
"Counts");
422 mHistPidKplus =
new TH1F(
"Flow_PidKplus",
"Flow_PidKplus",
423 nPidBins, pidMin, pidMax);
424 mHistPidKplus->SetXTitle(
"(PID - Mean) / Resolution");
425 mHistPidKplus->SetYTitle(
"Counts");
428 mHistPidKminus =
new TH1F(
"Flow_PidKminus",
"Flow_PidKminus",
429 nPidBins, pidMin, pidMax);
430 mHistPidKminus->SetXTitle(
"(PID - Mean) / Resolution");
431 mHistPidKminus->SetYTitle(
"Counts");
434 mHistPidDeuteron =
new TH1F(
"Flow_PidDeuteron",
"Flow_PidDeuteron",
435 nPidBins, pidMin, pidMax);
436 mHistPidDeuteron->SetXTitle(
"(PID - Mean) / Resolution");
437 mHistPidDeuteron->SetYTitle(
"Counts");
440 mHistPidAntiDeuteron =
new TH1F(
"Flow_PidAntiDeuteron",
441 "Flow_PidAntiDeuteron",
442 nPidBins, pidMin, pidMax);
443 mHistPidAntiDeuteron->SetXTitle(
"(PID - Mean) / Resolution");
444 mHistPidAntiDeuteron->SetYTitle(
"Counts");
447 mHistPidElectron =
new TH1F(
"Flow_PidElectron",
"Flow_PidElectron",
448 nPidBins, pidMin, pidMax);
449 mHistPidElectron->SetXTitle(
"(PID - Mean) / Resolution");
450 mHistPidElectron->SetYTitle(
"Counts");
453 mHistPidPositron =
new TH1F(
"Flow_PidPositron",
"Flow_PidPositron",
454 nPidBins, pidMin, pidMax);
455 mHistPidPositron->SetXTitle(
"(PID - Mean) / Resolution");
456 mHistPidPositron->SetYTitle(
"Counts");
459 mHistPidPiPlusPart =
new TH1F(
"Flow_PidPiPlusPart",
460 "Flow_PidPiPlusPart",
461 nPidBins, pidMin, pidMax);
462 mHistPidPiPlusPart->SetXTitle(
"(PID - Mean) / Resolution");
463 mHistPidPiPlusPart->SetYTitle(
"Counts");
466 mHistPidPiMinusPart =
new TH1F(
"Flow_PidPiMinusPart",
467 "Flow_PidPiMinusPart",
468 nPidBins, pidMin, pidMax);
469 mHistPidPiMinusPart->SetXTitle(
"(PID - Mean) / Resolution");
470 mHistPidPiMinusPart->SetYTitle(
"Counts");
473 mHistPidProtonPart =
new TH1F(
"Flow_PidProtonPart",
474 "Flow_PidProtonPart",
475 nPidBins, pidMin, pidMax);
476 mHistPidProtonPart->SetXTitle(
"(PID - Mean) / Resolution");
477 mHistPidProtonPart->SetYTitle(
"Counts");
480 mHistPidAntiProtonPart =
new TH1F(
"Flow_PidAntiProtonPart",
481 "Flow_PidAntiProtonPart",
482 nPidBins, pidMin, pidMax);
483 mHistPidAntiProtonPart->SetXTitle(
"(PID - Mean) / Resolution");
484 mHistPidAntiProtonPart->SetYTitle(
"Counts");
487 mHistPidKplusPart =
new TH1F(
"Flow_PidKplusPart",
489 nPidBins, pidMin, pidMax);
490 mHistPidKplusPart->SetXTitle(
"(PID - Mean) / Resolution");
491 mHistPidKplusPart->SetYTitle(
"Counts");
494 mHistPidKminusPart =
new TH1F(
"Flow_PidKminusPart",
495 "Flow_PidKminusPart",
496 nPidBins, pidMin, pidMax);
497 mHistPidKminusPart->SetXTitle(
"(PID - Mean) / Resolution");
498 mHistPidKminusPart->SetYTitle(
"Counts");
501 mHistPidDeuteronPart =
new TH1F(
"Flow_PidDeuteronPart",
502 "Flow_PidDeuteronPart",
503 nPidBins, pidMin, pidMax);
504 mHistPidDeuteronPart->SetXTitle(
"(PID - Mean) / Resolution");
505 mHistPidDeuteronPart->SetYTitle(
"Counts");
508 mHistPidAntiDeuteronPart =
new TH1F(
"Flow_PidAntiDeuteronPart",
509 "Flow_PidAntiDeuteronPart",
510 nPidBins, pidMin, pidMax);
511 mHistPidAntiDeuteronPart->SetXTitle(
"(PID - Mean) / Resolution");
512 mHistPidAntiDeuteronPart->SetYTitle(
"Counts");
515 mHistPidElectronPart =
new TH1F(
"Flow_PidElectronPart",
516 "Flow_PidElectronPart",
517 nPidBins, pidMin, pidMax);
518 mHistPidElectronPart->SetXTitle(
"(PID - Mean) / Resolution");
519 mHistPidElectronPart->SetYTitle(
"Counts");
522 mHistPidPositronPart =
new TH1F(
"Flow_PidPositronPart",
523 "Flow_PidPositronPart",
524 nPidBins, pidMin, pidMax);
525 mHistPidPositronPart->SetXTitle(
"(PID - Mean) / Resolution");
526 mHistPidPositronPart->SetYTitle(
"Counts");
529 mHistPidMult =
new TProfile(
"Flow_PidMult",
"Flow_PidMult",
530 13, 0.5, 13.5, 0., 10000.,
"");
531 mHistPidMult->SetXTitle(
"all, h+, h-, pi+, pi-, pr+, pr-, K+, K-, d+, d-, e-, e+");
532 mHistPidMult->SetYTitle(
"Multiplicity");
535 mHistCent =
new TH1F(
"Flow_Cent",
"Flow_Cent",
536 nCentBins, centMin, centMax);
537 mHistCent->SetXTitle(
"Centrality Bin");
538 mHistCent->SetYTitle(
"Counts");
541 mHistCTBvsZDC2D =
new TH2F(
"Flow_CTBvsZDC2D",
"Flow_CTBvsZDC2D",
544 mHistCTBvsZDC2D->SetXTitle(
"ZDC sum");
545 mHistCTBvsZDC2D->SetYTitle(
"CTB sum");
548 mHistMeanDedxPos2D =
new TH2F(
"Flow_MeanDedxPos2D",
549 "Flow_MeanDedxPos2D",
550 nMomenBins, pMin, pMax,
551 nDedxBins, 0, dEdxMax);
552 mHistMeanDedxPos2D->SetXTitle(
"log(momentum) (GeV/c)");
553 mHistMeanDedxPos2D->SetYTitle(
"mean dEdx");
556 mHistMeanDedxNeg2D =
new TH2F(
"Flow_MeanDedxNeg2D",
557 "Flow_MeanDedxNeg2D",
558 nMomenBins, pMin, pMax,
559 nDedxBins, 0, dEdxMax);
560 mHistMeanDedxNeg2D->SetXTitle(
"log(momentum) (GeV/c)");
561 mHistMeanDedxNeg2D->SetYTitle(
"mean dEdx");
564 mHistMeanDedxPiPlus2D =
new TH2F(
"Flow_MeanDedxPiPlus2D",
565 "Flow_MeanDedxPiPlus2D",
566 nMomenBins, pMin, pMax,
567 nDedxBins, 0, dEdxMax);
568 mHistMeanDedxPiPlus2D->SetXTitle(
"log(momentum) (GeV/c)");
569 mHistMeanDedxPiPlus2D->SetYTitle(
"mean dEdx");
572 mHistMeanDedxPiMinus2D =
new TH2F(
"Flow_MeanDedxPiMinus2D",
573 "Flow_MeanDedxPiMinus2D",
574 nMomenBins, pMin, pMax,
575 nDedxBins, 0, dEdxMax);
576 mHistMeanDedxPiMinus2D->SetXTitle(
"log(momentum) (GeV/c)");
577 mHistMeanDedxPiMinus2D->SetYTitle(
"mean dEdx");
580 mHistMeanDedxProton2D =
new TH2F(
"Flow_MeanDedxProton2D",
581 "Flow_MeanDedxProton2D",
582 nMomenBins, pMin, pMax,
583 nDedxBins, 0, dEdxMax);
584 mHistMeanDedxProton2D->SetXTitle(
"log(momentum) (GeV/c)");
585 mHistMeanDedxProton2D->SetYTitle(
"mean dEdx");
588 mHistMeanDedxPbar2D =
new TH2F(
"Flow_MeanDedxPbar2D",
589 "Flow_MeanDedxPbar2D",
590 nMomenBins, pMin, pMax,
591 nDedxBins, 0, dEdxMax);
592 mHistMeanDedxPbar2D->SetXTitle(
"log(momentum) (GeV/c)");
593 mHistMeanDedxPbar2D->SetYTitle(
"mean dEdx");
596 mHistMeanDedxKplus2D =
new TH2F(
"Flow_MeanDedxKplus2D",
597 "Flow_MeanDedxKplus2D",
598 nMomenBins, pMin, pMax,
599 nDedxBins, 0, dEdxMax);
600 mHistMeanDedxKplus2D->SetXTitle(
"log(momentum) (GeV/c)");
601 mHistMeanDedxKplus2D->SetYTitle(
"mean dEdx");
604 mHistMeanDedxKminus2D =
new TH2F(
"Flow_MeanDedxKminus2D",
605 "Flow_MeanDedxKminus2D",
606 nMomenBins, pMin, pMax,
607 nDedxBins, 0, dEdxMax);
608 mHistMeanDedxKminus2D->SetXTitle(
"log(momentum) (GeV/c)");
609 mHistMeanDedxKminus2D->SetYTitle(
"mean dEdx");
612 mHistMeanDedxDeuteron2D =
new TH2F(
"Flow_MeanDedxDeuteron2D",
613 "Flow_MeanDedxDeuteron2D",
614 nMomenBins, pMin, pMax,
615 nDedxBins, 0, dEdxMax);
616 mHistMeanDedxDeuteron2D->SetXTitle(
"log(momentum) (GeV/c)");
617 mHistMeanDedxDeuteron2D->SetYTitle(
"mean dEdx");
620 mHistMeanDedxAntiDeuteron2D =
new TH2F(
"Flow_MeanDedxAntiDeuteron2D",
621 "Flow_MeanDedxAntiDeuteron2D",
622 nMomenBins, pMin, pMax,
623 nDedxBins, 0, dEdxMax);
624 mHistMeanDedxAntiDeuteron2D->SetXTitle(
"log(momentum) (GeV/c)");
625 mHistMeanDedxAntiDeuteron2D->SetYTitle(
"mean dEdx");
628 mHistMeanDedxElectron2D =
new TH2F(
"Flow_MeanDedxElectron2D",
629 "Flow_MeanDedxElectron2D",
630 nMomenBins, pMin, pMax,
631 nDedxBins, 0, dEdxMax);
632 mHistMeanDedxElectron2D->SetXTitle(
"log(momentum) (GeV/c)");
633 mHistMeanDedxElectron2D->SetYTitle(
"mean dEdx");
636 mHistMeanDedxPositron2D =
new TH2F(
"Flow_MeanDedxPositron2D",
637 "Flow_MeanDedxPositron2D",
638 nMomenBins, pMin, pMax,
639 nDedxBins, 0, dEdxMax);
640 mHistMeanDedxPositron2D->SetXTitle(
"log(momentum) (GeV/c)");
641 mHistMeanDedxPositron2D->SetYTitle(
"mean dEdx");
644 mZDC_SMD_west_vert =
new TH1F(
"Flow_ZDC_SMD_west_vert",
"Flow_ZDC_SMD_west_vert",7,0.5,7.5);
645 mZDC_SMD_east_vert =
new TH1F(
"Flow_ZDC_SMD_east_vert",
"Flow_ZDC_SMD_east_vert",7,0.5,7.5);
646 mZDC_SMD_west_hori =
new TH1F(
"Flow_ZDC_SMD_west_hori",
"Flow_ZDC_SMD_west_hori",8,0.5,8.5);
647 mZDC_SMD_east_hori =
new TH1F(
"Flow_ZDC_SMD_east_hori",
"Flow_ZDC_SMD_east_hori",8,0.5,8.5);
648 mHistZDCSMDPsiWgtEast =
new TH1D(
"Flow_ZDCSMDPsiWgtEast",
"Flow_ZDCSMDPsiWgtEast",
649 Flow::zdcsmd_nPsiBins,-twopi/2.,twopi/2.);
650 mHistZDCSMDPsiWgtWest =
new TH1D(
"Flow_ZDCSMDPsiWgtWest",
"Flow_ZDCSMDPsiWgtWest",
651 Flow::zdcsmd_nPsiBins,-twopi/2.,twopi/2.);
652 mHistZDCSMDPsiWgtTest =
new TH1D(
"Flow_ZDCSMDPsiWgtTest",
"Flow_ZDCSMDPsiWgtTest",
653 Flow::zdcsmd_nPsiBins,0.,twopi);
654 mHistZDCSMDPsiWgtFull =
new TH1D(
"Flow_ZDCSMDPsiWgtFull",
"Flow_ZDCSMDPsiWgtFull",
655 Flow::zdcsmd_nPsiBins,0.,twopi);
656 mHistZDCSMDPsiCorTest =
new TH1D(
"Flow_ZDCSMDPsiCorTest",
"Flow_ZDCSMDPsiCorTest",
657 Flow::zdcsmd_nPsiBins,-twopi/2.,twopi/2.);
658 mHistZDCSMDPsiCorFull =
new TH1D(
"Flow_ZDCSMDPsiCorFull",
"Flow_ZDCSMDPsiWgtFull",
659 Flow::zdcsmd_nPsiBins,-twopi/2.,twopi/2.);
661 for (
int i = 0; i < Flow::nSels * Flow::nSubs; i++) {
664 for (
int j = 0; j < Flow::nHars; j++) {
665 float order = (float)(j + 1);
668 histTitle =
new TString(
"Flow_Psi_Subs");
670 histTitle->Append(
"_Har");
672 histSub[i].histSubHar[j].mHistPsiSubs =
new TH1F(histTitle->Data(),
673 histTitle->Data(), nPsiBins, psiMin, (psiMax / order));
674 histSub[i].histSubHar[j].mHistPsiSubs->Sumw2();
675 histSub[i].histSubHar[j].mHistPsiSubs->SetXTitle
676 (
"Event Plane Angle (rad)");
677 histSub[i].histSubHar[j].mHistPsiSubs->SetYTitle(
"Counts");
682 for (
int k = 0; k < Flow::nSels; k++) {
687 histTitle =
new TString(
"Flow_Cos_Sel");
689 histFull[k].mHistCos =
new TProfile(histTitle->Data(), histTitle->Data(),
690 Flow::nHars, 0.5, (float)(Flow::nHars) + 0.5, -1., 1.,
"");
691 histFull[k].mHistCos->SetXTitle(
"Harmonic");
692 histFull[k].mHistCos->SetYTitle(
"<cos(n*delta_Psi)>");
696 histTitle =
new TString(
"Flow_Res_Sel");
698 histFull[k].mHistRes =
new TH1F(histTitle->Data(), histTitle->Data(),
699 Flow::nHars, 0.5, (float)(Flow::nHars) + 0.5);
700 histFull[k].mHistRes->SetXTitle(
"Harmonic");
701 histFull[k].mHistRes->SetYTitle(
"Resolution");
705 histTitle =
new TString(
"Flow_vObs_Sel");
707 histFull[k].mHist_vObs =
new TProfile(histTitle->Data(), histTitle->Data(),
708 Flow::nHars, 0.5, (float)(Flow::nHars) + 0.5, -1000., 1000.,
"");
709 histFull[k].mHist_vObs->SetXTitle(
"Harmonic");
710 histFull[k].mHist_vObs->SetYTitle(
"vObs (%)");
714 for (
int j = 0; j < Flow::nHars; j++) {
715 float order = (float)(j+1);
718 histTitle =
new TString(
"Flow_Mul_Sel");
720 histTitle->Append(
"_Har");
722 histFull[k].histFullHar[j].mHistMult =
new TH1F(histTitle->Data(),
723 histTitle->Data(), nMultBins, multMin, multMax);
724 histFull[k].histFullHar[j].mHistMult->SetXTitle(
"Multiplicity");
725 histFull[k].histFullHar[j].mHistMult->SetYTitle(
"Counts");
729 histTitle =
new TString(
"Flow_Psi_Sel");
731 histTitle->Append(
"_Har");
733 histFull[k].histFullHar[j].mHistPsi =
new TH1F(histTitle->Data(),
734 histTitle->Data(), nPsiBins, psiMin, psiMax / order);
735 histFull[k].histFullHar[j].mHistPsi->Sumw2();
736 histFull[k].histFullHar[j].mHistPsi->SetXTitle
737 (
"Event Plane Angle (rad)");
738 histFull[k].histFullHar[j].mHistPsi->SetYTitle(
"Counts");
742 histTitle =
new TString(
"Flow_PhiLab_Sel");
744 histTitle->Append(
"_Har");
746 histFull[k].histFullHar[j].mHistPhiLab =
new TH1F(histTitle->Data(),
747 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
748 histFull[k].histFullHar[j].mHistPhiLab->SetXTitle(
"Particle Lab Angle (rad)");
749 histFull[k].histFullHar[j].mHistPhiLab->SetYTitle(
"Counts");
750 histFull[k].histFullHar[j].mHistPhiLab->Sumw2();
754 histTitle =
new TString(
"FlowReCentX_Sel");
756 *histTitle +=
"_Har";
758 histFull[k].histFullHar[j].mHistReCentX =
new TProfile(histTitle->Data(),
759 histTitle->Data(), 3, 0.5, 3.5);
760 histFull[k].histFullHar[j].mHistReCentX->SetXTitle(
"FTPCE, FTPCW, TPCE, TPCW");
761 histFull[k].histFullHar[j].mHistReCentX->SetYTitle(
"<cos n #phi>");
764 histTitle =
new TString(
"FlowReCentY_Sel");
766 *histTitle +=
"_Har";
768 histFull[k].histFullHar[j].mHistReCentY =
new TProfile(histTitle->Data(),
769 histTitle->Data(), 3, 0.5, 3.5);
770 histFull[k].histFullHar[j].mHistReCentY->SetXTitle(
"FTPCE, FTPCW, TPCE, TPCW");
771 histFull[k].histFullHar[j].mHistReCentY->SetYTitle(
"<sin n #phi>");
775 histTitle =
new TString(
"FlowQreCent_Sel");
777 *histTitle +=
"_Har";
779 histFull[k].histFullHar[j].mHistQreCent =
new TProfile(histTitle->Data(),
780 histTitle->Data(), 2, 0.5, 2.5);
781 histFull[k].histFullHar[j].mHistQreCent->SetXTitle(
"X, Y");
782 histFull[k].histFullHar[j].mHistQreCent->SetYTitle(
"<Q_{n}/M>");
785 histTitle =
new TString(
"Flow_QXY2D_Sel");
787 histTitle->Append(
"_Har");
789 histFull[k].histFullHar[j].mHistQXY2D =
new TH2D(histTitle->Data(), histTitle->Data(),
790 nQXYBins, QXYMin, QXYMax, nQXYBins, QXYMin, QXYMax);
791 histFull[k].histFullHar[j].mHistQXY2D->SetXTitle(
"Q_X/M");
792 histFull[k].histFullHar[j].mHistQXY2D->SetYTitle(
"Q_Y/M");
796 histTitle =
new TString(
"Flow_QFTPCSubXY2D_Sel");
798 histTitle->Append(
"_Har");
800 histFull[k].histFullHar[j].mHistQFTPCSubXY2D =
new TH2D(histTitle->Data(), histTitle->Data(),
801 nQXYBins, QXYMin*2., QXYMax*2., nQXYBins, QXYMin*2., QXYMax*2.);
802 histFull[k].histFullHar[j].mHistQFTPCSubXY2D->SetXTitle(
"QSub_X/M");
803 histFull[k].histFullHar[j].mHistQFTPCSubXY2D->SetYTitle(
"QSub_Y/M");
807 histTitle =
new TString(
"Flow_QTPCSubXY2D_Sel");
809 histTitle->Append(
"_Har");
811 histFull[k].histFullHar[j].mHistQTPCSubXY2D =
new TH2D(histTitle->Data(), histTitle->Data(),
812 nQXYBins, QXYMin*2., QXYMax*2., nQXYBins, QXYMin*2., QXYMax*2.);
813 histFull[k].histFullHar[j].mHistQTPCSubXY2D->SetXTitle(
"QSub_X/M");
814 histFull[k].histFullHar[j].mHistQTPCSubXY2D->SetYTitle(
"QSub_Y/M");
818 histTitle =
new TString(
"Flow_Psi_Diff_Sel");
820 histTitle->Append(
"_Har");
828 histFull[k].histFullHar[j].mHistPsi_Diff =
new TH1F(histTitle->Data(),
829 histTitle->Data(), nPsiBins, -psiMax/my_order/2., psiMax/my_order/2.);
831 histFull[k].histFullHar[j].mHistPsi_Diff =
new TH1F(histTitle->Data(),
832 histTitle->Data(), nPsiBins, -psiMax/2., psiMax/2.);
837 histFull[k].histFullHar[j].mHistPsi_Diff->SetXTitle
838 (
"#Psi_{1,Sel1} - #Psi_{1,Sel2}(rad)");
840 histFull[k].histFullHar[j].mHistPsi_Diff->SetXTitle
841 (
"#Psi_{2,Sel1} - #Psi_{2,Sel2}(rad)");
845 histFull[k].histFullHar[j].mHistPsi_Diff->SetXTitle
846 (
"#Psi_{1,Sel1} - #Psi_{2,Sel2}(rad)");
848 histFull[k].histFullHar[j].mHistPsi_Diff->SetXTitle
849 (
"#Psi_{1,Sel1} - #Psi_{2,Sel1}(rad)");
853 histFull[k].histFullHar[j].mHistPsi_Diff->SetYTitle(
"Counts");
857 histTitle =
new TString(
"Flow_Psi_Sub_Corr_Sel");
859 histTitle->Append(
"_Har");
861 histFull[k].histFullHar[j].mHistPsiSubCorr =
new TH1F(histTitle->Data(),
862 histTitle->Data(), nPsiBins, psiMin, psiMax / order);
863 histFull[k].histFullHar[j].mHistPsiSubCorr->Sumw2();
864 histFull[k].histFullHar[j].mHistPsiSubCorr->SetXTitle
865 (
"Sub-Event Correlation (rad)");
866 histFull[k].histFullHar[j].mHistPsiSubCorr->SetYTitle(
"Counts");
870 histTitle =
new TString(
"Flow_Psi_Sub_Corr_Diff_Sel");
872 histTitle->Append(
"_Har");
874 histFull[k].histFullHar[j].mHistPsiSubCorrDiff =
new
875 TH1F(histTitle->Data(), histTitle->Data(), nPsiBins, psiMin,
876 psiMax / (order+1.));
877 histFull[k].histFullHar[j].mHistPsiSubCorrDiff->Sumw2();
878 histFull[k].histFullHar[j].mHistPsiSubCorrDiff->SetXTitle
879 (
"Sub-Event Correlation (rad)");
880 histFull[k].histFullHar[j].mHistPsiSubCorrDiff->SetYTitle(
"Counts");
884 histTitle =
new TString(
"Flow_q_Sel");
886 histTitle->Append(
"_Har");
888 histFull[k].histFullHar[j].mHist_q =
new TH1F(histTitle->Data(),
889 histTitle->Data(), n_qBins, qMin, qMax);
890 histFull[k].histFullHar[j].mHist_q->Sumw2();
891 histFull[k].histFullHar[j].mHist_q->SetXTitle(
"q = |Q|/sqrt(Mult)");
892 histFull[k].histFullHar[j].mHist_q->SetYTitle(
"Counts");
896 histTitle =
new TString(
"Flow_Phi_Corr_Sel");
898 histTitle->Append(
"_Har");
900 histFull[k].histFullHar[j].mHistPhiCorr =
new TH1F(histTitle->Data(),
901 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax / order);
902 histFull[k].histFullHar[j].mHistPhiCorr->Sumw2();
903 histFull[k].histFullHar[j].mHistPhiCorr->
904 SetXTitle(
"Particle-Plane Correlation (rad)");
905 histFull[k].histFullHar[j].mHistPhiCorr->SetYTitle(
"Counts");
909 histTitle =
new TString(
"Flow_Yield2D_Sel");
911 histTitle->Append(
"_Har");
913 histFull[k].histFullHar[j].mHistYield2D =
new TH2D(histTitle->Data(),
914 histTitle->Data(), mNEtaBins, mEtaMin, mEtaMax,
915 Flow::nPtBins, Flow::ptMin, Flow::ptMax);
916 histFull[k].histFullHar[j].mHistYield2D->Sumw2();
917 histFull[k].histFullHar[j].mHistYield2D->SetXTitle(
"Pseudorapidty");
918 histFull[k].histFullHar[j].mHistYield2D->SetYTitle(
"Pt (GeV/c)");
922 histTitle =
new TString(
"Flow_vObs2D_Sel");
924 histTitle->Append(
"_Har");
926 histFull[k].histFullHar[j].mHist_vObs2D =
new TProfile2D(histTitle->Data(),
927 histTitle->Data(), mNEtaBins, mEtaMin, mEtaMax, nPtBinsPart,
928 Flow::ptMin, ptMaxPart, -1000., 1000.,
"");
929 histFull[k].histFullHar[j].mHist_vObs2D->SetXTitle((
char*)xLabel.Data());
930 histFull[k].histFullHar[j].mHist_vObs2D->SetYTitle(
"Pt (GeV/c)");
934 histTitle =
new TString(
"Flow_vObsEta_Sel");
936 histTitle->Append(
"_Har");
938 histFull[k].histFullHar[j].mHist_vObsEta =
new TProfile(histTitle->Data(),
939 histTitle->Data(), mNEtaBins, mEtaMin, mEtaMax, -1000., 1000.,
"");
940 histFull[k].histFullHar[j].mHist_vObsEta->SetXTitle((
char*)xLabel.Data());
941 histFull[k].histFullHar[j].mHist_vObsEta->SetYTitle(
"v (%)");
944 histTitle =
new TString(
"Flow_vObsPt_Sel");
946 histTitle->Append(
"_Har");
948 histFull[k].histFullHar[j].mHist_vObsPt =
new TProfile(histTitle->Data(),
949 histTitle->Data(), nPtBinsPart, Flow::ptMin, ptMaxPart, -1000., 1000.,
"");
950 histFull[k].histFullHar[j].mHist_vObsPt->SetXTitle(
"Pt (GeV/c)");
951 histFull[k].histFullHar[j].mHist_vObsPt->SetYTitle(
"v (%)");
956 for (
int j = 0; j < 2; j++) {
960 histTitle =
new TString(
"Flow_Phi_FarEast_Sel");
962 histTitle->Append(
"_Har");
964 histFull[k].histTwoHar[j].mHistPhiFarEast =
new TH1D(histTitle->Data(),
965 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
966 histFull[k].histTwoHar[j].mHistPhiFarEast->SetXTitle
967 (
"Azimuthal Angles (rad)");
968 histFull[k].histTwoHar[j].mHistPhiFarEast->SetYTitle(
"Counts");
972 histTitle =
new TString(
"Flow_Phi_East_Sel");
974 histTitle->Append(
"_Har");
976 histFull[k].histTwoHar[j].mHistPhiEast =
new TH1D(histTitle->Data(),
977 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
978 histFull[k].histTwoHar[j].mHistPhiEast->SetXTitle
979 (
"Azimuthal Angles (rad)");
980 histFull[k].histTwoHar[j].mHistPhiEast->SetYTitle(
"Counts");
984 histTitle =
new TString(
"Flow_Phi_West_Sel");
986 histTitle->Append(
"_Har");
988 histFull[k].histTwoHar[j].mHistPhiWest =
new TH1D(histTitle->Data(),
989 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
990 histFull[k].histTwoHar[j].mHistPhiWest->SetXTitle
991 (
"Azimuthal Angles (rad)");
992 histFull[k].histTwoHar[j].mHistPhiWest->SetYTitle(
"Counts");
996 histTitle =
new TString(
"Flow_Phi_FarWest_Sel");
998 histTitle->Append(
"_Har");
1000 histFull[k].histTwoHar[j].mHistPhiFarWest =
new TH1D(histTitle->Data(),
1001 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1002 histFull[k].histTwoHar[j].mHistPhiFarWest->SetXTitle
1003 (
"Azimuthal Angles (rad)");
1004 histFull[k].histTwoHar[j].mHistPhiFarWest->SetYTitle(
"Counts");
1008 histTitle =
new TString(
"Flow_Phi_FtpcFarEast_Sel");
1010 histTitle->Append(
"_Har");
1012 histFull[k].histTwoHar[j].mHistPhiFtpcFarEast =
new TH1D(histTitle->Data(),
1013 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1014 histFull[k].histTwoHar[j].mHistPhiFtpcFarEast->SetXTitle
1015 (
"Azimuthal Angles (rad)");
1016 histFull[k].histTwoHar[j].mHistPhiFtpcFarEast->SetYTitle(
"Counts");
1020 histTitle =
new TString(
"Flow_Phi_FtpcEast_Sel");
1022 histTitle->Append(
"_Har");
1024 histFull[k].histTwoHar[j].mHistPhiFtpcEast =
new TH1D(histTitle->Data(),
1025 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1026 histFull[k].histTwoHar[j].mHistPhiFtpcEast->SetXTitle
1027 (
"Azimuthal Angles (rad)");
1028 histFull[k].histTwoHar[j].mHistPhiFtpcEast->SetYTitle(
"Counts");
1032 histTitle =
new TString(
"Flow_Phi_FtpcWest_Sel");
1034 histTitle->Append(
"_Har");
1036 histFull[k].histTwoHar[j].mHistPhiFtpcWest =
new TH1D(histTitle->Data(),
1037 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1038 histFull[k].histTwoHar[j].mHistPhiFtpcWest->SetXTitle
1039 (
"Azimuthal Angles (rad)");
1040 histFull[k].histTwoHar[j].mHistPhiFtpcWest->SetYTitle(
"Counts");
1044 histTitle =
new TString(
"Flow_Phi_FtpcFarWest_Sel");
1046 histTitle->Append(
"_Har");
1048 histFull[k].histTwoHar[j].mHistPhiFtpcFarWest =
new TH1D(histTitle->Data(),
1049 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1050 histFull[k].histTwoHar[j].mHistPhiFtpcFarWest->SetXTitle
1051 (
"Azimuthal Angles (rad)");
1052 histFull[k].histTwoHar[j].mHistPhiFtpcFarWest->SetYTitle(
"Counts");
1057 histTitle =
new TString(
"Flow_Phi_Weight_FarEast_Sel");
1059 histTitle->Append(
"_Har");
1061 histFull[k].histTwoHar[j].mHistPhiWgtFarEast =
new TH1D(histTitle->Data(),
1062 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1063 histFull[k].histTwoHar[j].mHistPhiWgtFarEast->Sumw2();
1064 histFull[k].histTwoHar[j].mHistPhiWgtFarEast->SetXTitle
1065 (
"Azimuthal Angles (rad)");
1066 histFull[k].histTwoHar[j].mHistPhiWgtFarEast->SetYTitle(
"PhiWgt");
1070 histTitle =
new TString(
"Flow_Phi_Weight_East_Sel");
1072 histTitle->Append(
"_Har");
1074 histFull[k].histTwoHar[j].mHistPhiWgtEast =
new TH1D(histTitle->Data(),
1075 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1076 histFull[k].histTwoHar[j].mHistPhiWgtEast->Sumw2();
1077 histFull[k].histTwoHar[j].mHistPhiWgtEast->SetXTitle
1078 (
"Azimuthal Angles (rad)");
1079 histFull[k].histTwoHar[j].mHistPhiWgtEast->SetYTitle(
"PhiWgt");
1083 histTitle =
new TString(
"Flow_Phi_Weight_West_Sel");
1085 histTitle->Append(
"_Har");
1087 histFull[k].histTwoHar[j].mHistPhiWgtWest =
new TH1D(histTitle->Data(),
1088 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1089 histFull[k].histTwoHar[j].mHistPhiWgtWest->Sumw2();
1090 histFull[k].histTwoHar[j].mHistPhiWgtWest->SetXTitle
1091 (
"Azimuthal Angles (rad)");
1092 histFull[k].histTwoHar[j].mHistPhiWgtWest->SetYTitle(
"PhiWgt");
1096 histTitle =
new TString(
"Flow_Phi_Weight_FarWest_Sel");
1098 histTitle->Append(
"_Har");
1100 histFull[k].histTwoHar[j].mHistPhiWgtFarWest =
new TH1D(histTitle->Data(),
1101 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1102 histFull[k].histTwoHar[j].mHistPhiWgtFarWest->Sumw2();
1103 histFull[k].histTwoHar[j].mHistPhiWgtFarWest->SetXTitle
1104 (
"Azimuthal Angles (rad)");
1105 histFull[k].histTwoHar[j].mHistPhiWgtFarWest->SetYTitle(
"PhiWgt");
1109 histTitle =
new TString(
"Flow_Phi_Weight_FtpcFarEast_Sel");
1111 histTitle->Append(
"_Har");
1113 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarEast =
new TH1D(histTitle->Data(),
1114 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1115 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarEast->Sumw2();
1116 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarEast->SetXTitle
1117 (
"Azimuthal Angles (rad)");
1118 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarEast->SetYTitle(
"PhiWgt");
1122 histTitle =
new TString(
"Flow_Phi_Weight_FtpcEast_Sel");
1124 histTitle->Append(
"_Har");
1126 histFull[k].histTwoHar[j].mHistPhiWgtFtpcEast =
new TH1D(histTitle->Data(),
1127 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1128 histFull[k].histTwoHar[j].mHistPhiWgtFtpcEast->Sumw2();
1129 histFull[k].histTwoHar[j].mHistPhiWgtFtpcEast->SetXTitle
1130 (
"Azimuthal Angles (rad)");
1131 histFull[k].histTwoHar[j].mHistPhiWgtFtpcEast->SetYTitle(
"PhiWgt");
1135 histTitle =
new TString(
"Flow_Phi_Weight_FtpcWest_Sel");
1137 histTitle->Append(
"_Har");
1139 histFull[k].histTwoHar[j].mHistPhiWgtFtpcWest =
new TH1D(histTitle->Data(),
1140 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1141 histFull[k].histTwoHar[j].mHistPhiWgtFtpcWest->Sumw2();
1142 histFull[k].histTwoHar[j].mHistPhiWgtFtpcWest->SetXTitle
1143 (
"Azimuthal Angles (rad)");
1144 histFull[k].histTwoHar[j].mHistPhiWgtFtpcWest->SetYTitle(
"PhiWgt");
1148 histTitle =
new TString(
"Flow_Phi_Weight_FtpcFarWest_Sel");
1150 histTitle->Append(
"_Har");
1152 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarWest =
new TH1D(histTitle->Data(),
1153 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1154 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarWest->Sumw2();
1155 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarWest->SetXTitle
1156 (
"Azimuthal Angles (rad)");
1157 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarWest->SetYTitle(
"PhiWgt");
1163 histTitle =
new TString(
"Flow_Phi_Flat_FarEast_Sel");
1165 histTitle->Append(
"_Har");
1167 histFull[k].histTwoHar[j].mHistPhiFlatFarEast =
new TH1D(histTitle->Data(),
1168 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1169 histFull[k].histTwoHar[j].mHistPhiFlatFarEast->SetXTitle
1170 (
"Azimuthal Angles (rad)");
1171 histFull[k].histTwoHar[j].mHistPhiFlatFarEast->SetYTitle(
"Counts");
1175 histTitle =
new TString(
"Flow_Phi_Flat_East_Sel");
1177 histTitle->Append(
"_Har");
1179 histFull[k].histTwoHar[j].mHistPhiFlatEast =
new TH1D(histTitle->Data(),
1180 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1181 histFull[k].histTwoHar[j].mHistPhiFlatEast->SetXTitle
1182 (
"Azimuthal Angles (rad)");
1183 histFull[k].histTwoHar[j].mHistPhiFlatEast->SetYTitle(
"Counts");
1187 histTitle =
new TString(
"Flow_Phi_Flat_West_Sel");
1189 histTitle->Append(
"_Har");
1191 histFull[k].histTwoHar[j].mHistPhiFlatWest =
new TH1D(histTitle->Data(),
1192 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1193 histFull[k].histTwoHar[j].mHistPhiFlatWest->SetXTitle
1194 (
"Azimuthal Angles (rad)");
1195 histFull[k].histTwoHar[j].mHistPhiFlatWest->SetYTitle(
"Counts");
1199 histTitle =
new TString(
"Flow_Phi_Flat_FarWest_Sel");
1201 histTitle->Append(
"_Har");
1203 histFull[k].histTwoHar[j].mHistPhiFlatFarWest =
new TH1D(histTitle->Data(),
1204 histTitle->Data(), Flow::nPhiBins, phiMin, phiMax);
1205 histFull[k].histTwoHar[j].mHistPhiFlatFarWest->SetXTitle
1206 (
"Azimuthal Angles (rad)");
1207 histFull[k].histTwoHar[j].mHistPhiFlatFarWest->SetYTitle(
"Counts");
1211 histTitle =
new TString(
"Flow_Phi_Flat_FtpcFarEast_Sel");
1213 histTitle->Append(
"_Har");
1215 histFull[k].histTwoHar[j].mHistPhiFlatFtpcFarEast =
new TH1D(histTitle->Data(),
1216 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1217 histFull[k].histTwoHar[j].mHistPhiFlatFtpcFarEast->SetXTitle
1218 (
"Azimuthal Angles (rad)");
1219 histFull[k].histTwoHar[j].mHistPhiFlatFtpcFarEast->SetYTitle(
"Counts");
1223 histTitle =
new TString(
"Flow_Phi_Flat_FtpcEast_Sel");
1225 histTitle->Append(
"_Har");
1227 histFull[k].histTwoHar[j].mHistPhiFlatFtpcEast =
new TH1D(histTitle->Data(),
1228 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1229 histFull[k].histTwoHar[j].mHistPhiFlatFtpcEast->SetXTitle
1230 (
"Azimuthal Angles (rad)");
1231 histFull[k].histTwoHar[j].mHistPhiFlatFtpcEast->SetYTitle(
"Counts");
1235 histTitle =
new TString(
"Flow_Phi_Flat_FtpcWest_Sel");
1237 histTitle->Append(
"_Har");
1239 histFull[k].histTwoHar[j].mHistPhiFlatFtpcWest =
new TH1D(histTitle->Data(),
1240 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1241 histFull[k].histTwoHar[j].mHistPhiFlatFtpcWest->SetXTitle
1242 (
"Azimuthal Angles (rad)");
1243 histFull[k].histTwoHar[j].mHistPhiFlatFtpcWest->SetYTitle(
"Counts");
1247 histTitle =
new TString(
"Flow_Phi_Flat_FtpcFarWest_Sel");
1249 histTitle->Append(
"_Har");
1251 histFull[k].histTwoHar[j].mHistPhiFlatFtpcFarWest =
new TH1D(histTitle->Data(),
1252 histTitle->Data(), Flow::nPhiBinsFtpc, phiMin, phiMax);
1253 histFull[k].histTwoHar[j].mHistPhiFlatFtpcFarWest->SetXTitle
1254 (
"Azimuthal Angles (rad)");
1255 histFull[k].histTwoHar[j].mHistPhiFlatFtpcFarWest->SetYTitle(
"Counts");
1262 TFile fileReCent(
"flow.reCentAna.root",
"R");
1264 gMessMgr->Info(
"##### FlowAnalysis: Calc reCent Pars");
1265 mCalcReCentPars = kTRUE;
1267 mCalcReCentPars = kFALSE;
1270 gMessMgr->SetLimit(
"##### FlowAnalysis", 2);
1271 gMessMgr->Info(
"##### FlowAnalysis: $Id: StFlowAnalysisMaker.cxx,v 1.103 2011/07/25 15:54:42 posk Exp $");
1273 return StMaker::Init();
1278 Bool_t StFlowAnalysisMaker::FillFromFlowEvent() {
1283 for (
int k = 0; k < Flow::nSels; k++) {
1284 pFlowSelect->SetSelection(k);
1285 for (
int j = 0; j < Flow::nHars; j++) {
1286 pFlowSelect->SetHarmonic(j);
1287 for (
int n = 0; n < Flow::nSubs; n++) {
1288 pFlowSelect->SetSubevent(n);
1289 int i = Flow::nSels*k + n;
1291 mQSub[i][j] = pFlowEvent->Q(pFlowSelect);
1292 mPsiSub[i][j] = pFlowEvent->Psi(pFlowSelect);
1293 mMultSub[i][j] = pFlowEvent->Mult(pFlowSelect);
1294 if (mMultSub[i][j] < 3.) kRETURN = kFALSE;
1295 if (mQSub[i][j].Mod()==0.) kRETURN = kFALSE;
1298 pFlowSelect->SetSubevent(-1);
1300 mQ[k][j] = pFlowEvent->Q(pFlowSelect);
1301 mPsi[k][j] = pFlowEvent->Psi(pFlowSelect);
1302 m_q[k][j] = pFlowEvent->q(pFlowSelect);
1303 mMult[k][j] = pFlowEvent->Mult(pFlowSelect);
1304 if (mQ[k][j].Mod()==0.) kRETURN = kFALSE;
1307 mZDCSMD_e_PsiWgt = pFlowEvent->ZDCSMD_PsiWgtEast();
1308 mZDCSMD_w_PsiWgt = pFlowEvent->ZDCSMD_PsiWgtWest();
1309 mZDCSMD_f_PsiWgt = (pFlowEvent->UseZDCSMD()) ? pFlowEvent->ZDCSMD_PsiWgtFull():1.;
1310 mFlowWeight = (pFlowEvent->UseZDCSMD()) ? mZDCSMD_e_PsiWgt*mZDCSMD_w_PsiWgt*mZDCSMD_f_PsiWgt:1.;
1317 void StFlowAnalysisMaker::FillEventHistograms() {
1321 unsigned int triggers = StFlowCutEvent::TriggersFound();
1322 mHistTrigger->Fill(triggers);
1325 int origMult = pFlowEvent->OrigMult();
1326 mHistOrigMult ->Fill((
float)origMult);
1327 mHistMultEta ->Fill((
float)pFlowEvent->MultEta());
1328 int cent = pFlowEvent->Centrality();
1329 mHistCent ->Fill((
float)cent);
1330 int totalMult = pFlowEvent->TrackCollection()->size();
1331 mHistMult ->Fill((
float)totalMult);
1332 UInt_t partMult = pFlowEvent->MultPart(pFlowSelect);
1333 mHistMultPart ->Fill((
float)partMult);
1334 if (origMult) mHistMultOverOrig->Fill((
float)totalMult / (
float)origMult);
1337 mHistVertexZ ->Fill(vertex.z());
1338 mHistVertexXY2D->Fill(vertex.x(), vertex.y());
1340 mHistCTBvsZDC2D->Fill(pFlowEvent->ZDCe() + pFlowEvent->ZDCw(), pFlowEvent->CTB());
1343 for(
int strip=1; strip<9; strip++) {
1344 mZDC_SMD_west_hori->Fill(strip,pFlowEvent->ZDCSMD(1,1,strip));
1345 mZDC_SMD_east_hori->Fill(strip,pFlowEvent->ZDCSMD(0,1,strip));
1346 if(strip==8)
continue;
1347 mZDC_SMD_west_vert->Fill(strip,pFlowEvent->ZDCSMD(1,0,strip));
1348 mZDC_SMD_east_vert->Fill(strip,pFlowEvent->ZDCSMD(0,0,strip));
1350 mHistZDCSMDPsiWgtEast->Fill(pFlowEvent->ZDCSMD_PsiEst());
1351 mHistZDCSMDPsiWgtWest->Fill(pFlowEvent->ZDCSMD_PsiWst());
1352 mHistZDCSMDPsiWgtTest->Fill(mPsi[0][0]);
1353 mHistZDCSMDPsiWgtFull->Fill(mPsi[0][0],mFlowWeight/mZDCSMD_f_PsiWgt);
1354 mHistZDCSMDPsiCorTest->Fill(pFlowEvent->ZDCSMD_PsiCorr());
1355 mHistZDCSMDPsiCorFull->Fill(pFlowEvent->ZDCSMD_PsiCorr(),mFlowWeight/mZDCSMD_f_PsiWgt);
1358 for (
int k = 0; k < Flow::nSels; k++) {
1359 for (
int j = 0; j < Flow::nHars; j++) {
1360 for (
int n = 0; n < Flow::nSubs; n++) {
1361 int i = Flow::nSels*k + n;
1362 if(mPsiSub[i][j]) { histSub[i].histSubHar[j].mHistPsiSubs->Fill(mPsiSub[i][j]); }
1363 if (mQSub[i][j].Mod() && mMultSub[i][j]) {
1365 double QSubx = mQSub[i][j].X() / (double)mMultSub[i][j];
1366 double QSuby = mQSub[i][j].Y() / (double)mMultSub[i][j];
1367 histFull[n].histFullHar[j].mHistQFTPCSubXY2D->Fill(QSubx,QSuby);
1369 double QSubx = mQSub[i][j].X() / (double)mMultSub[i][j];
1370 double QSuby = mQSub[i][j].Y() / (double)mMultSub[i][j];
1371 histFull[n].histFullHar[j].mHistQTPCSubXY2D->Fill(QSubx,QSuby);
1379 for (
int k = 0; k < Flow::nSels; k++) {
1380 pFlowSelect->SetSelection(k);
1381 for (
int j = 0; j < Flow::nHars; j++) {
1382 pFlowSelect->SetHarmonic(j);
1383 float order = (float)(j+1);
1386 histFull[k].histFullHar[j].mHistPsi->Fill(mPsi[k][j]);
1389 if (mQ[k][j].Mod() && mMult[k][j]) {
1390 double Qx = mQ[k][j].X() / (double)mMult[k][j];
1391 double Qy = mQ[k][j].Y() / (double)mMult[k][j];
1392 histFull[k].histFullHar[j].mHistQXY2D->Fill(Qx,Qy);
1394 if (mPsi[0][j] && mPsi[1][j]) {
1395 if (k < 2 && j < 2) {
1397 float psi1 = mPsi[0][j];
1398 float psi2 = mPsi[1][j];
1399 float diff = psi1 - psi2;
1400 if (diff < -twopi/2./(j+1)) {
1401 diff += twopi/(j+1);
1402 }
else if (diff > +twopi/2./(j+1)) {
1403 diff -= twopi/(j+1);
1405 histFull[k].histFullHar[j].mHistPsi_Diff->Fill(diff);
1406 }
else if (k == 1) {
1412 }
else if (j == 1) {
1416 float diff = psi1 - psi2;
1417 diff = (TMath::Abs(diff) > twopi/2.) ? ((diff > 0.) ? -(twopi - diff) :
1418 -(diff + twopi)) : diff;
1419 histFull[k].histFullHar[j].mHistPsi_Diff->Fill(diff);
1424 if (mPsiSub[Flow::nSels*k][j] != 0. && mPsiSub[Flow::nSels*k+1][j] != 0.) {
1426 if(pFlowEvent->UseZDCSMD()) {
1427 psiSubCorr = pFlowEvent->ZDCSMD_PsiCorr();
1429 else if (mV1Ep1Ep2 == kFALSE || order != 1) {
1430 psiSubCorr = mPsiSub[Flow::nSels*k][j] - mPsiSub[Flow::nSels*k+1][j];
1433 psiSubCorr = mPsiSub[Flow::nSels*k][0] + mPsiSub[Flow::nSels*k+1][0] - 2.*mPsi[k][1];
1435 histFull[k].mHistCos->Fill(order, (
float)cos(order * psiSubCorr),mFlowWeight/mZDCSMD_f_PsiWgt);
1436 if (psiSubCorr < 0.) psiSubCorr += twopi / order;
1437 if (psiSubCorr > twopi / order) psiSubCorr -= twopi / order;
1438 histFull[k].histFullHar[j].mHistPsiSubCorr->Fill(psiSubCorr,mFlowWeight/mZDCSMD_f_PsiWgt);
1441 if (j < Flow::nHars - 1) {
1443 float psiSubCorrDiff;
1451 psiSubCorrDiff = fmod((
double)mPsiSub[Flow::nSels*k][j1-1],
1452 twopi/(
double)j2) - fmod((
double)mPsiSub[Flow::nSels*k+1][j2-1],
1454 if (psiSubCorrDiff < 0.) psiSubCorrDiff += twopi/(float)j2;
1455 if (psiSubCorrDiff) { histFull[k].histFullHar[j].mHistPsiSubCorrDiff->Fill(psiSubCorrDiff); }
1456 psiSubCorrDiff = fmod((
double)mPsiSub[Flow::nSels*k][j2-1],
1457 twopi/(
double)j2) - fmod((
double)mPsiSub[Flow::nSels*k+1][j1-1],
1459 if (psiSubCorrDiff < 0.) psiSubCorrDiff += twopi/(float)j2;
1460 if (psiSubCorrDiff) { histFull[k].histFullHar[j].mHistPsiSubCorrDiff->Fill(psiSubCorrDiff); }
1463 histFull[k].histFullHar[j].mHistMult->Fill((
float)mMult[k][j]);
1464 if (m_q[k][j]) { histFull[k].histFullHar[j].mHist_q->Fill(m_q[k][j]); }
1466 if (mCalcReCentPars) {
1469 qReCent = pFlowEvent->ReCentEPPar(pFlowSelect,
"FTPCE");
1470 if (qReCent.X()) histFull[k].histFullHar[j].mHistReCentX->Fill(1., qReCent.X());
1471 if (qReCent.Y()) histFull[k].histFullHar[j].mHistReCentY->Fill(1., qReCent.Y());
1472 qReCent = pFlowEvent->ReCentEPPar(pFlowSelect,
"FTPCW");
1473 if (qReCent.X()) histFull[k].histFullHar[j].mHistReCentX->Fill(2., qReCent.X());
1474 if (qReCent.Y()) histFull[k].histFullHar[j].mHistReCentY->Fill(2., qReCent.Y());
1475 qReCent = pFlowEvent->ReCentEPPar(pFlowSelect,
"TPCE");
1476 if (qReCent.X()) histFull[k].histFullHar[j].mHistReCentX->Fill(3., qReCent.X());
1477 if (qReCent.Y()) histFull[k].histFullHar[j].mHistReCentY->Fill(3., qReCent.Y());
1478 qReCent = pFlowEvent->ReCentEPPar(pFlowSelect,
"TPCW");
1479 if (qReCent.X()) histFull[k].histFullHar[j].mHistReCentX->Fill(4., qReCent.X());
1480 if (qReCent.Y()) histFull[k].histFullHar[j].mHistReCentY->Fill(4., qReCent.Y());
1488 void StFlowAnalysisMaker::FillParticleHistograms() {
1491 float etaSymPosTpcN = 0.;
1492 float etaSymNegTpcN = 0.;
1493 float etaSymPosFtpcN = 0.;
1494 float etaSymNegFtpcN = 0.;
1498 float piMinusN = 0.;
1503 float deuteronN = 0.;
1505 float electronN = 0.;
1506 float positronN = 0.;
1509 StFlowTrackCollection* pFlowTracks = pFlowEvent->TrackCollection();
1510 StFlowTrackIterator itr;
1512 for (itr = pFlowTracks->begin(); itr != pFlowTracks->end(); itr++) {
1515 float phi = pFlowTrack->Phi();
1516 if (phi < 0.) phi += twopi;
1517 float eta = pFlowTrack->Eta();
1518 float zFirstPoint = 0.;
1519 float zLastPoint = 0.;
1520 if (pFlowEvent->FirstLastPoints()) {
1521 zFirstPoint = pFlowTrack->ZFirstPoint();
1522 zLastPoint = pFlowTrack->ZLastPoint();
1524 float pt = pFlowTrack->Pt();
1525 int charge = pFlowTrack->Charge();
1526 float dca = pFlowTrack->Dca();
1527 float dcaGlobal = pFlowTrack->DcaGlobal();
1528 float chi2 = pFlowTrack->Chi2();
1529 int fitPts = pFlowTrack->FitPts();
1530 int maxPts = pFlowTrack->MaxPts();
1532 strcpy(pid, pFlowTrack->Pid());
1533 float totalp = pFlowTrack->P();
1534 float logp = ::log(totalp);
1535 float dEdx = pFlowTrack->Dedx();
1541 if (map.trackFtpcEast() || map.trackFtpcWest()) {
1542 mHistChargeFtpc ->Fill((
float)charge);
1543 mHistDcaFtpc ->Fill(dca);
1544 mHistDcaGlobalFtpc->Fill(dcaGlobal);
1545 mHistChi2Ftpc ->Fill(chi2);
1546 mHistFitPtsFtpc ->Fill((
float)fitPts);
1547 mHistMaxPtsFtpc ->Fill((
float)maxPts);
1548 if (maxPts) mHistFitOverMaxFtpc->Fill((
float)fitPts/(
float)maxPts);
1554 if (strcmp(pid,
"pi+") == 0) piPlusN++;
1555 if (strcmp(pid,
"pi-") == 0) piMinusN++;
1556 if (strcmp(pid,
"pr+") == 0) protonN++;
1557 if (strcmp(pid,
"pr-") == 0) pbarN++;
1558 if (strcmp(pid,
"k+") == 0) kPlusN++;
1559 if (strcmp(pid,
"k-") == 0) kMinusN++;
1560 if (strcmp(pid,
"d+") == 0) deuteronN++;
1561 if (strcmp(pid,
"d-") == 0) dbarN++;
1562 if (strcmp(pid,
"e-") == 0) electronN++;
1563 if (strcmp(pid,
"e+") == 0) positronN++;
1565 mHistDcaTpc ->Fill(dca);
1566 mHistDcaGlobalTpc->Fill(dcaGlobal);
1567 mHistChi2Tpc ->Fill(chi2);
1568 mHistFitPtsTpc ->Fill((
float)fitPts);
1569 mHistMaxPtsTpc ->Fill((
float)maxPts);
1570 if (maxPts) mHistFitOverMaxTpc->Fill((
float)fitPts/(
float)maxPts);
1574 mHistMeanDedxPos2D->Fill(logp, dEdx);
1575 float piPlus = pFlowTrack->PidPiPlus();
1576 mHistPidPiPlus->Fill(piPlus);
1577 if (strcmp(pid,
"pi+") == 0) {
1578 mHistMeanDedxPiPlus2D->Fill(logp, dEdx);
1579 mHistPidPiPlusPart->Fill(piPlus);
1581 float kplus = pFlowTrack->PidKaonPlus();
1582 mHistPidKplus->Fill(kplus);
1583 if (strcmp(pid,
"k+") == 0) {
1584 mHistMeanDedxKplus2D->Fill(logp, dEdx);
1585 mHistPidKplusPart->Fill(kplus);
1587 float proton = pFlowTrack->PidProton();
1588 mHistPidProton->Fill(proton);
1589 if (strcmp(pid,
"pr+") == 0) {
1590 mHistMeanDedxProton2D->Fill(logp, dEdx);
1591 mHistPidProtonPart->Fill(proton);
1593 float deuteron = pFlowTrack->PidDeuteron();
1594 mHistPidDeuteron->Fill(deuteron);
1595 if (strcmp(pid,
"d+") == 0) {
1596 mHistMeanDedxDeuteron2D->Fill(logp, dEdx);
1597 mHistPidDeuteronPart->Fill(deuteron);
1599 float positron = pFlowTrack->PidPositron();
1600 mHistPidPositron->Fill(positron);
1601 if (strcmp(pid,
"e+") == 0) {
1602 mHistMeanDedxPositron2D->Fill(logp, dEdx);
1603 mHistPidPositronPart->Fill(positron);
1605 }
else if (charge == -1) {
1607 mHistMeanDedxNeg2D->Fill(logp, dEdx);
1608 float piMinus = pFlowTrack->PidPiMinus();
1609 mHistPidPiMinus->Fill(piMinus);
1610 if (strcmp(pid,
"pi-") == 0) {
1611 mHistMeanDedxPiMinus2D->Fill(logp, dEdx);
1612 mHistPidPiMinusPart->Fill(piMinus);
1614 float kminus = pFlowTrack->PidKaonMinus();
1615 mHistPidKminus->Fill(kminus);
1616 if (strcmp(pid,
"k-") == 0) {
1617 mHistMeanDedxKminus2D->Fill(logp, dEdx);
1618 mHistPidKminusPart->Fill(kminus);
1620 float antiproton = pFlowTrack->PidAntiProton();
1621 mHistPidAntiProton->Fill(antiproton);
1622 if (strcmp(pid,
"pr-") == 0) {
1623 mHistMeanDedxPbar2D->Fill(logp, dEdx);
1624 mHistPidAntiProtonPart->Fill(antiproton);
1626 float antideuteron = pFlowTrack->PidAntiDeuteron();
1627 mHistPidAntiDeuteron->Fill(antideuteron);
1628 if (strcmp(pid,
"d-") == 0) {
1629 mHistMeanDedxAntiDeuteron2D->Fill(logp, dEdx);
1630 mHistPidAntiDeuteronPart->Fill(antideuteron);
1632 float electron = pFlowTrack->PidElectron();
1633 mHistPidElectron->Fill(electron);
1634 if (strcmp(pid,
"e-") == 0) {
1635 mHistMeanDedxElectron2D->Fill(logp, dEdx);
1636 mHistPidElectronPart->Fill(electron);
1642 mHistEtaPtPhi3D->Fill(eta, pt, phi);
1643 mHistYieldAll2D->Fill(eta, pt);
1644 if (pFlowSelect->SelectPart(pFlowTrack)) {
1645 if (strlen(pFlowSelect->PidPart()) != 0) {
1646 float rapidity = pFlowTrack->Y();
1647 mHistBinEta->Fill(rapidity, rapidity);
1648 mHistYieldPart2D->Fill(rapidity, pt);
1650 mHistBinEta->Fill(eta, eta);
1651 mHistYieldPart2D->Fill(eta, pt);
1653 mHistBinPt->Fill(pt, pt);
1658 if (map.hasHitInDetector(kTpcId)) {
1659 (eta > 0.) ? etaSymPosTpcN++ : etaSymNegTpcN++;
1662 else if (map.trackFtpcEast() || map.trackFtpcWest()) {
1663 (eta > 0.) ? etaSymPosFtpcN++ : etaSymNegFtpcN++;
1669 for (
int k = 0; k < Flow::nSels; k++) {
1670 pFlowSelect->SetSelection(k);
1671 for (
int j = 0; j < Flow::nHars; j++) {
1672 bool oddHar = (j+1) % 2;
1673 pFlowSelect->SetHarmonic(j);
1674 double order = (double)(j+1);
1675 double orderEP = order;
1676 float psi_i = 0., psi_2 = 0.;
1677 if (pFlowEvent->EtaSubs()) {
1678 int i = Flow::nSels*k;
1679 psi_i = (eta > 0.) ? mPsiSub[i+1][j] : mPsiSub[i][j];
1680 }
else if (pFlowEvent->RanSubs()) {
1681 int i = Flow::nSels*k;
1682 if (pFlowTrack->Select(j,k,0)) {
1683 psi_i = mPsiSub[i+1][j];
1684 }
else if (pFlowTrack->Select(j,k,1)) {
1685 psi_i = mPsiSub[i][j];
1687 int r = (eta > 0.) ? 1 : 0;
1688 psi_i = mPsiSub[i+r][j];
1690 }
else if (order > 3. && !oddHar) {
1692 if (psi_i > twopi/order) psi_i -= twopi/order;
1693 if (psi_i > twopi/order) psi_i -= twopi/order;
1698 if (pFlowSelect->Select(pFlowTrack)) {
1700 histFull[k].histFullHar[j].mHistYield2D->Fill(eta, pt);
1703 double phiWgt = pFlowEvent->PhiWeight(k, j, pFlowTrack);
1704 TVector2 reCent = pFlowEvent->ReCentEP(k, j, pFlowTrack);
1706 if (pFlowMaker->PhiWgtCalc() && j < 2) {
1710 Bool_t kTpcFarEast = kFALSE;
1711 Bool_t kTpcEast = kFALSE;
1712 Bool_t kTpcWest = kFALSE;
1713 Bool_t kTpcFarWest = kFALSE;
1714 Bool_t kFtpcFarEast = kFALSE;
1715 Bool_t kFtpcEast = kFALSE;
1716 Bool_t kFtpcWest = kFALSE;
1717 Bool_t kFtpcFarWest = kFALSE;
1718 if (map.hasHitInDetector(kTpcId) || (map.data(0) == 0 && map.data(1) == 0)) {
1722 if (pFlowEvent->FirstLastPoints()) {
1723 if (zFirstPoint > 0. && zLastPoint > 0.) {
1724 kTpcFarWest = kTRUE;
1725 }
else if (zFirstPoint > 0. && zLastPoint < 0.) {
1727 }
else if (zFirstPoint < 0. && zLastPoint > 0.) {
1730 kTpcFarEast = kTRUE;
1733 Float_t vertexZ = pFlowEvent->VertexPos().z();
1734 if (eta > 0. && vertexZ > 0.) {
1735 kTpcFarWest = kTRUE;
1736 }
else if (eta > 0. && vertexZ < 0.) {
1738 }
else if (eta < 0. && vertexZ > 0.) {
1741 kTpcFarEast = kTRUE;
1744 }
else if (map.trackFtpcEast()) {
1745 detId = kFtpcEastId;
1746 Float_t vertexZ = pFlowEvent->VertexPos().z();
1750 kFtpcFarEast = kTRUE;
1752 }
else if (map.trackFtpcWest()) {
1753 detId = kFtpcWestId;
1754 Float_t vertexZ = pFlowEvent->VertexPos().z();
1756 kFtpcFarWest = kTRUE;
1766 if (pFlowEvent->PtWgt()) {
1767 wt *= (pt < pFlowEvent->PtWgtSaturation()) ? pt :
1768 pFlowEvent->PtWgtSaturation();
1770 float etaAbs = fabs(eta);
1772 if (pFlowEvent->EtaWgt() && j==0 && etaAbs > 1.) { wt *= etaAbs; }
1776 histFull[k].histTwoHar[j].mHistPhiFtpcFarEast->Fill(phi,wt);
1777 }
else if (kFtpcEast) {
1778 histFull[k].histTwoHar[j].mHistPhiFtpcEast->Fill(phi,wt);
1779 }
else if (kFtpcWest) {
1780 histFull[k].histTwoHar[j].mHistPhiFtpcWest->Fill(phi,wt);
1781 }
else if (kFtpcFarWest) {
1782 histFull[k].histTwoHar[j].mHistPhiFtpcFarWest->Fill(phi,wt);
1783 }
else if (kTpcFarEast){
1784 histFull[k].histTwoHar[j].mHistPhiFarEast->Fill(phi,wt);
1785 }
else if (kTpcEast){
1786 histFull[k].histTwoHar[j].mHistPhiEast->Fill(phi,wt);
1787 }
else if (kTpcWest){
1788 histFull[k].histTwoHar[j].mHistPhiWest->Fill(phi,wt);
1789 }
else if (kTpcFarWest){
1790 histFull[k].histTwoHar[j].mHistPhiFarWest->Fill(phi,wt);
1794 if (pFlowEvent->FirstLastPoints() && !pFlowEvent->FirstLastPhiWgt()) {
1795 kTpcFarEast = kFALSE;
1798 kTpcFarWest = kFALSE;
1799 Float_t vertexZ = pFlowEvent->VertexPos().z();
1800 if (eta > 0. && vertexZ > 0.) {
1801 kTpcFarWest = kTRUE;
1802 }
else if (eta > 0. && vertexZ < 0.) {
1804 }
else if (eta < 0. && vertexZ > 0.) {
1807 kTpcFarEast = kTRUE;
1812 if (j==0 && eta < 0.) phiWgt /= -1.;
1815 histFull[k].histTwoHar[j].mHistPhiFlatFtpcFarEast->Fill(phi, phiWgt);
1816 }
else if (kFtpcEast) {
1817 histFull[k].histTwoHar[j].mHistPhiFlatFtpcEast->Fill(phi, phiWgt);
1818 }
else if (kFtpcWest) {
1819 histFull[k].histTwoHar[j].mHistPhiFlatFtpcWest->Fill(phi, phiWgt);
1820 }
else if (kFtpcFarWest) {
1821 histFull[k].histTwoHar[j].mHistPhiFlatFtpcFarWest->Fill(phi, phiWgt);
1822 }
else if (kTpcFarEast) {
1823 histFull[k].histTwoHar[j].mHistPhiFlatFarEast->Fill(phi, phiWgt);
1824 }
else if (kTpcEast) {
1825 histFull[k].histTwoHar[j].mHistPhiFlatEast->Fill(phi, phiWgt);
1826 }
else if (kTpcWest) {
1827 histFull[k].histTwoHar[j].mHistPhiFlatWest->Fill(phi, phiWgt);
1828 }
else if (kTpcFarWest) {
1829 histFull[k].histTwoHar[j].mHistPhiFlatFarWest->Fill(phi, phiWgt);
1831 if (j==0 && eta < 0.) phiWgt *= -1.;
1835 if (!pFlowEvent->EtaSubs() && !pFlowEvent->RanSubs()) {
1837 if (order > 3. && !oddHar) {
1840 double Qx = phiWgt * cos(orderEP * phi) - reCent.X();
1841 double Qy = phiWgt * sin(orderEP * phi) - reCent.Y();
1843 TVector2 mQ_i = mQ[k][j] - Q_i;
1844 psi_i = mQ_i.Phi() / orderEP;
1845 if (psi_i < 0.) psi_i += twopi / orderEP;
1850 if (mV1Ep1Ep2 == kTRUE && order == 1) {
1852 usedForPsi2.SetHarmonic(1);
1853 usedForPsi2.SetSubevent(-1);
1854 if (usedForPsi2.Select(pFlowTrack)) {
1856 double phiWgt = pFlowEvent->PhiWeight(k, 1, pFlowTrack);
1857 TVector2 reCent = pFlowEvent->ReCentEP(k, 1, pFlowTrack);
1858 double Qx = phiWgt * cos(2 * phi) - reCent.X();
1859 double Qy = phiWgt * sin(2 * phi) - reCent.Y();
1861 TVector2 mQ_i = mQ[k][1] - Q_i;
1862 psi_2 = mQ_i.Phi() / 2.;
1863 if (psi_2 < 0.) psi_2 += twopi / 2.;
1871 mult = (double)(pFlowEvent->Mult(pFlowSelect));
1873 histFull[k].histFullHar[j].mHistQreCent->Fill(1., mQ[k][j].X()/mult);
1874 histFull[k].histFullHar[j].mHistQreCent->Fill(2., mQ[k][j].Y()/mult);
1878 if (pFlowSelect->SelectPart(pFlowTrack)) {
1880 if (pFlowEvent->UseZDCSMD()) {
1881 v = cos(order *(phi-mQ[k][1].Phi()))/perCent;
1883 else if (mV1Ep1Ep2 == kFALSE || order != 1) {
1884 v = cos(order * (phi - psi_i))/perCent;
1887 v = cos(phi + psi_i - 2.*psi_2)/perCent;
1890 if (eta < 0 && j==0) vFlip *= -1;
1891 if (strlen(pFlowSelect->PidPart()) != 0) {
1892 float rapidity = pFlowTrack->Y();
1893 histFull[k].histFullHar[j].mHist_vObs2D->Fill(rapidity, pt, v,mFlowWeight);
1895 if (mPtRange_for_vEta[1] > mPtRange_for_vEta[0]) {
1896 if (pt < mPtRange_for_vEta[1] && pt >= mPtRange_for_vEta[0]) {
1898 histFull[k].histFullHar[j].mHist_vObsEta->Fill(rapidity, v,mFlowWeight);
1902 histFull[k].histFullHar[j].mHist_vObsEta->Fill(rapidity, v, mFlowWeight);
1906 histFull[k].histFullHar[j].mHist_vObs2D->Fill(eta, pt, v,mFlowWeight);
1908 if (mPtRange_for_vEta[1] > mPtRange_for_vEta[0]) {
1909 if (pt < mPtRange_for_vEta[1] && pt >= mPtRange_for_vEta[0]) {
1911 histFull[k].histFullHar[j].mHist_vObsEta->Fill(eta, v, mFlowWeight);
1915 histFull[k].histFullHar[j].mHist_vObsEta->Fill(eta, v, mFlowWeight);
1919 if (mEtaRange_for_vPt[1] > mEtaRange_for_vPt[0]) {
1920 if (TMath::Abs(eta) < mEtaRange_for_vPt[1] && TMath::Abs(eta) >= mEtaRange_for_vPt[0]) {
1922 histFull[k].histFullHar[j].mHist_vObsPt->Fill(pt, vFlip, mFlowWeight);
1926 histFull[k].histFullHar[j].mHist_vObsPt->Fill(pt, vFlip,mFlowWeight);
1930 Bool_t etaPtNoCut = kTRUE;
1931 if (mPtRange_for_vEta[1] > mPtRange_for_vEta[0] &&
1932 (pt < mPtRange_for_vEta[0] || pt >= mPtRange_for_vEta[1])) {
1933 etaPtNoCut = kFALSE;
1935 if (mEtaRange_for_vPt[1] > mEtaRange_for_vPt[0] &&
1936 (TMath::Abs(eta) < mEtaRange_for_vPt[0] ||
1937 TMath::Abs(eta) >= mEtaRange_for_vPt[1])) {
1938 etaPtNoCut = kFALSE;
1940 if (etaPtNoCut) histFull[k].mHist_vObs->Fill(order, vFlip,mFlowWeight);
1944 histFull[k].histFullHar[j].mHistPhiLab->Fill(phi);
1945 histFull[k].histFullHar[j].mHistPhiLab->Fill(phi);
1947 if (eta < 0 && j==0) {
1949 if (phi_i > twopi) phi_i -= twopi;
1951 float dPhi = phi_i - psi_i;
1952 if (dPhi < 0.) dPhi += twopi;
1953 histFull[k].histFullHar[j].mHistPhiCorr->
1954 Fill(fmod((
double)dPhi, twopi / order));
1962 float etaSymTpc = (etaSymPosTpcN - etaSymNegTpcN) / (etaSymPosTpcN + etaSymNegTpcN);
1963 float etaSymFtpc = (etaSymPosFtpcN - etaSymNegFtpcN) / (etaSymPosFtpcN + etaSymNegFtpcN);
1966 Float_t vertexZ = vertex.z();
1967 mHistEtaSymVerZ2DTpc ->Fill(vertexZ , etaSymTpc);
1968 mHistEtaSymVerZ2DFtpc->Fill(vertexZ , etaSymFtpc);
1971 float etaSymZInterceptTpc = 0.00023;
1972 float etaSymZSlopeTpc = -0.00394;
1973 etaSymTpc -= (etaSymZInterceptTpc + etaSymZSlopeTpc * vertexZ);
1974 etaSymTpc *= ::sqrt((etaSymPosTpcN + etaSymNegTpcN));
1975 mHistEtaSymTpc->Fill(etaSymTpc);
1978 float etaSymZInterceptFtpc = -0.0077;
1979 float etaSymZSlopeFtpc = 0.0020;
1980 etaSymFtpc -= (etaSymZInterceptFtpc + etaSymZSlopeFtpc * vertexZ);
1981 etaSymFtpc *= ::sqrt((etaSymPosFtpcN + etaSymNegFtpcN));
1982 mHistEtaSymFtpc->Fill(etaSymFtpc);
1985 float totalMult = (float)pFlowEvent->TrackCollection()->size();
1986 mHistPidMult->Fill(1., totalMult);
1987 mHistPidMult->Fill(2., hPlusN);
1988 mHistPidMult->Fill(3., hMinusN);
1989 mHistPidMult->Fill(4., piPlusN);
1990 mHistPidMult->Fill(5., piMinusN);
1991 mHistPidMult->Fill(6., protonN);
1992 mHistPidMult->Fill(7., pbarN);
1993 mHistPidMult->Fill(8., kPlusN);
1994 mHistPidMult->Fill(9., kMinusN);
1995 mHistPidMult->Fill(10., deuteronN);
1996 mHistPidMult->Fill(11., dbarN);
1997 mHistPidMult->Fill(12., electronN);
1998 mHistPidMult->Fill(13., positronN);
2004 static Double_t resEventPlane(
double chi) {
2007 double con = 0.626657;
2008 double arg = chi * chi / 4.;
2010 Double_t res = con * chi * exp(-arg) * (TMath::BesselI0(arg) +
2011 TMath::BesselI1(arg));
2018 static Double_t resEventPlaneK2(
double chi) {
2022 double con = 0.626657;
2023 double arg = chi * chi / 4.;
2025 double besselOneHalf = ::sqrt(arg/halfpi) * sinh(arg)/arg;
2026 double besselThreeHalfs = ::sqrt(arg/halfpi) * (cosh(arg)/arg - sinh(arg)/(arg*arg));
2027 Double_t res = con * chi * exp(-arg) * (besselOneHalf + besselThreeHalfs);
2034 static Double_t resEventPlaneK3(
double chi) {
2038 double con = 0.626657;
2039 double arg = chi * chi / 4.;
2041 Double_t res = con * chi * exp(-arg) * (TMath::BesselI1(arg) +
2042 TMath::BesselI(2, arg));
2049 static Double_t resEventPlaneK4(
double chi) {
2053 double con = 0.626657;
2054 double arg = chi * chi / 4.;
2056 double besselOneHalf = ::sqrt(arg/halfpi) * sinh(arg)/arg;
2057 double besselThreeHalfs = ::sqrt(arg/halfpi) * (cosh(arg)/arg - sinh(arg)/(arg*arg));
2058 double besselFiveHalfs = besselOneHalf - 3*besselThreeHalfs/arg;
2060 Double_t res = con * chi * exp(-arg) * (besselThreeHalfs + besselFiveHalfs);
2067 Double_t chi(
double res) {
2073 for (
int i = 0; i < 20; i++) {
2074 while(resEventPlane(chi) < res) {chi += delta;}
2076 while(resEventPlane(chi) > res) {chi -= delta;}
2089 cout << endl <<
"##### Analysis Maker:" << endl;
2093 TOrdCollection* phiWgtHistNames =
new TOrdCollection(Flow::nSels*Flow::nHars+3);
2096 TOrdCollection* savedHistReCentNames =
new TOrdCollection(Flow::nSels * Flow::nHars * 2);
2097 if (mCalcReCentPars) {
2098 Float_t reCentX, reCentY;
2099 cout <<
"ReCentered Q vector per particle:" << endl;
2100 for (
int k = 0; k < Flow::nSels; k++) {
2101 for (
int j = 0; j < Flow::nHars; j++) {
2102 savedHistReCentNames->AddLast(histFull[k].histFullHar[j].mHistReCentX);
2103 savedHistReCentNames->AddLast(histFull[k].histFullHar[j].mHistReCentY);
2104 reCentX = histFull[k].histFullHar[j].mHistQreCent->GetBinContent(1);
2105 reCentY = histFull[k].histFullHar[j].mHistQreCent->GetBinContent(2);
2106 cout << setprecision(3) <<
"Sel = " << k+1 <<
", Har = " << j+1 <<
" : reCentedQ_x = "
2107 << reCentX <<
",\t reCentedQ_y = " << reCentY << endl;
2114 double cosPair[Flow::nSels][Flow::nHars];
2115 double cosPairErr[Flow::nSels][Flow::nHars];
2119 for (
int k = 0; k < Flow::nSels; k++) {
2121 histTitle =
new TString(
"Flow_v_Sel");
2123 histFull[k].mHist_v =
2124 histFull[k].mHist_vObs->ProjectionX(histTitle->Data());
2125 histFull[k].mHist_v->SetTitle(histTitle->Data());
2126 histFull[k].mHist_v->SetXTitle(
"Harmonic");
2127 histFull[k].mHist_v->SetYTitle(
"v (%)");
2129 AddHist(histFull[k].mHist_v);
2131 for (
int j = 0; j < Flow::nHars; j++) {
2132 double order = (double)(j+1);
2133 cosPair[k][j] = histFull[k].mHistCos->GetBinContent(j+1);
2134 cosPairErr[k][j] = histFull[k].mHistCos->GetBinError(j+1);
2136 if (pFlowEvent->UseZDCSMD()) {
2137 double ZDCSMD_deltaResSub = 0.005,ZDCSMD_mResDelta=0.;
2138 double ZDCSMD_resSub = (histFull[k].mHistCos->GetBinContent(1)>0.) ?
2139 ::sqrt(histFull[k].mHistCos->GetBinContent(1)) : 0.;
2140 double ZDCSMD_resSubErr = (histFull[k].mHistCos->GetBinContent(1)>0.) ?
2141 histFull[k].mHistCos->GetBinError(1)/(2.*ZDCSMD_resSub) : 0.;
2142 double ZDCSMD_chiSub = chi(ZDCSMD_resSub);
2143 double ZDCSMD_chiSubDelta = chi((ZDCSMD_resSub+ZDCSMD_deltaResSub));
2145 mRes[k][j] = resEventPlane(::sqrt(2.) * ZDCSMD_chiSub);
2146 ZDCSMD_mResDelta = resEventPlane(::sqrt(2.) * ZDCSMD_chiSubDelta);
2149 mRes[k][j] = resEventPlaneK2(::sqrt(2.) * ZDCSMD_chiSub);
2150 ZDCSMD_mResDelta = resEventPlaneK2(::sqrt(2.) * ZDCSMD_chiSubDelta);
2153 mRes[k][j] = resEventPlaneK3(::sqrt(2.) * ZDCSMD_chiSub);
2154 ZDCSMD_mResDelta = resEventPlaneK3(::sqrt(2.) * ZDCSMD_chiSubDelta);
2157 mRes[k][j] = resEventPlaneK4(::sqrt(2.) * ZDCSMD_chiSub);
2158 ZDCSMD_mResDelta = resEventPlaneK4(::sqrt(2.) * ZDCSMD_chiSubDelta);
2160 mResErr[k][j] = ZDCSMD_resSubErr * fabs ((
double)mRes[k][j]
2161 - ZDCSMD_mResDelta) / ZDCSMD_deltaResSub;
2165 if (cosPair[k][j] > 0.) {
2166 double resSub, resSubErr;
2167 double res2, res2error;
2168 if (mV1Ep1Ep2 == kTRUE && order == 1) {
2170 if (histFull[k].mHistCos->GetBinContent(2) > 0.) {
2171 if (histFull[k].mHistCos->GetBinContent(2) > 0.92) {
2175 double deltaRes2Sub = 0.005;
2176 double res2Sub = ::sqrt(histFull[k].mHistCos->GetBinContent(2));
2177 double res2SubErr = histFull[k].mHistCos->GetBinError(2) / (2. * res2Sub);
2178 double chiSub2 = chi(res2Sub);
2179 double chiSub2Delta = chi(res2Sub + deltaRes2Sub);
2180 res2 = resEventPlane(::sqrt(2.) * chiSub2);
2181 double mRes2Delta = resEventPlane(::sqrt(2.) * chiSub2Delta);
2182 res2error = res2SubErr * fabs((
double)res2 - mRes2Delta)
2190 mRes[k][j] = ::sqrt(cosPair[k][0]*res2);
2191 mResErr[k][j] = 1./(2.*mRes[k][j])*::sqrt(res2*res2*cosPairErr[k][0]*cosPairErr[k][0]
2192 + cosPair[k][0]*cosPair[k][0]*res2error*res2error);
2193 if (!pFlowEvent->EtaSubs()) {
2196 mRes[k][j] *= ::sqrt(2.);
2197 mResErr[k][j] *= ::sqrt(2.);
2199 }
else if (pFlowEvent->EtaSubs() || pFlowEvent->RanSubs()) {
2200 resSub = ::sqrt(cosPair[k][j]);
2201 resSubErr = cosPairErr[k][j] / (2. * resSub);
2202 mRes[k][j] = resSub;
2203 mResErr[k][j] = resSubErr;
2204 }
else if (order==4. || order==6.|| order==8.) {
2205 double deltaResSub = 0.005;
2206 double resSub = ::sqrt(cosPair[k][1]);
2207 double resSubErr = cosPairErr[k][1] / (2. * resSub);
2208 double chiSub = chi(resSub);
2209 double chiSubDelta = chi(resSub + deltaResSub);
2212 mRes[k][j] = resEventPlaneK2(::sqrt(2.) * chiSub);
2213 mResDelta = resEventPlaneK2(::sqrt(2.) * chiSubDelta);
2214 }
else if (order==6.) {
2215 mRes[k][j] = resEventPlaneK3(::sqrt(2.) * chiSub);
2216 mResDelta = resEventPlaneK3(::sqrt(2.) * chiSubDelta);
2218 mRes[k][j] = resEventPlaneK4(::sqrt(2.) * chiSub);
2219 mResDelta = resEventPlaneK4(::sqrt(2.) * chiSubDelta);
2221 mResErr[k][j] = resSubErr * fabs((
double)mRes[k][j] - mResDelta) / deltaResSub;
2223 if (cosPair[k][j] > 0.92) {
2225 mResErr[k][j] = 0.007;
2227 double deltaResSub = 0.005;
2228 double resSub = ::sqrt(cosPair[k][j]);
2229 double resSubErr = cosPairErr[k][j] / (2. * resSub);
2230 double chiSub = chi(resSub);
2231 double chiSubDelta = chi(resSub + deltaResSub);
2232 mRes[k][j] = resEventPlane(::sqrt(2.) * chiSub);
2233 double mResDelta = resEventPlane(::sqrt(2.) * chiSubDelta);
2234 mResErr[k][j] = resSubErr * fabs((
double)mRes[k][j] - mResDelta)
2243 histFull[k].mHistRes->SetBinContent(j+1, mRes[k][j]);
2244 histFull[k].mHistRes->SetBinError(j+1, mResErr[k][j]);
2247 histTitle =
new TString(
"Flow_v2D_Sel");
2249 histTitle->Append(
"_Har");
2251 histFull[k].histFullHar[j].mHist_v2D =
2252 histFull[k].histFullHar[j].mHist_vObs2D->ProjectionXY(histTitle->Data());
2253 histFull[k].histFullHar[j].mHist_v2D->SetTitle(histTitle->Data());
2254 histFull[k].histFullHar[j].mHist_v2D->SetXTitle((
char*)xLabel.Data());
2255 histFull[k].histFullHar[j].mHist_v2D->SetYTitle(
"Pt (GeV/c)");
2256 histFull[k].histFullHar[j].mHist_v2D->SetZTitle(
"v (%)");
2258 AddHist(histFull[k].histFullHar[j].mHist_v2D);
2261 histTitle =
new TString(
"Flow_vEta_Sel");
2263 histTitle->Append(
"_Har");
2265 histFull[k].histFullHar[j].mHist_vEta =
2266 histFull[k].histFullHar[j].mHist_vObsEta->ProjectionX(histTitle->Data());
2267 histFull[k].histFullHar[j].mHist_vEta->SetTitle(histTitle->Data());
2268 histFull[k].histFullHar[j].mHist_vEta->SetXTitle((
char*)xLabel.Data());
2269 histFull[k].histFullHar[j].mHist_vEta->SetYTitle(
"v (%)");
2271 AddHist(histFull[k].histFullHar[j].mHist_vEta);
2273 TString* histTitle =
new TString(
"Flow_vPt_Sel");
2275 histTitle->Append(
"_Har");
2277 histFull[k].histFullHar[j].mHist_vPt =
2278 histFull[k].histFullHar[j].mHist_vObsPt->ProjectionX(histTitle->Data());
2279 histFull[k].histFullHar[j].mHist_vPt->SetTitle(histTitle->Data());
2280 histFull[k].histFullHar[j].mHist_vPt->SetXTitle(
"Pt (GeV/c)");
2281 histFull[k].histFullHar[j].mHist_vPt->SetYTitle(
"v (%)");
2283 AddHist(histFull[k].histFullHar[j].mHist_vPt);
2287 cout << endl <<
"##### Resolution of the " << j+1 <<
"th harmonic = " <<
2288 mRes[k][j] <<
" +/- " << mResErr[k][j] << endl;
2290 histFull[k].histFullHar[j].mHist_v2D-> Scale(1. / mRes[k][j]);
2291 histFull[k].histFullHar[j].mHist_vEta->Scale(1. / mRes[k][j]);
2292 histFull[k].histFullHar[j].mHist_vPt ->Scale(1. / mRes[k][j]);
2293 content = histFull[k].mHist_v->GetBinContent(j+1);
2294 content /= mRes[k][j];
2295 histFull[k].mHist_v->SetBinContent(j+1, content);
2297 error = histFull[k].mHist_v->GetBinError(j+1);
2298 error /= mRes[k][j];
2299 totalError = fabs(content) * ::sqrt((error/content)*(error/content) +
2300 (mResErr[k][j]/mRes[k][j])*(mResErr[k][j]/mRes[k][j]));
2301 histFull[k].mHist_v->SetBinError(j+1, totalError);
2304 TF1* funcCosSin =
new TF1(
"funcCosSin",
2305 "[3]*(1.+[0]*2./100.*cos([2]*x)+[1]*2./100.*sin([2]*x))", 0., twopi);
2307 funcCosSin->SetParameters(0, 0, j+1);
2308 funcCosSin->SetParLimits(2, 1, 1);
2309 histFull[k].histFullHar[j].mHistPhiLab->Fit(
"funcCosSin",
"Q,N");
2310 Double_t cosParLab = funcCosSin->GetParameter(0);
2311 Double_t sinParLab = funcCosSin->GetParameter(1);
2312 histFull[k].histFullHar[j].mHistPsi->Fit(
"funcCosSin",
"Q,N");
2313 Double_t cosParEP = funcCosSin->GetParameter(0);
2314 Double_t sinParEP = funcCosSin->GetParameter(1);
2315 cout <<
"100*cosLab = " << cosParLab <<
", 100*sinLab = " << sinParLab << endl;
2316 cout <<
"100*cosEP = " << cosParEP <<
", 100*sinEP = " << sinParEP << endl;
2318 float nonflat = (cosParEP*cosParLab + sinParEP*sinParLab)/mRes[k][j]/100.;
2319 cout <<
"nonflat = " << nonflat << endl;
2321 cout <<
"##### v" << j+1 <<
"= (" << content <<
" +/- " << error <<
")%" << endl;
2322 cout <<
"##### v" << j+1 <<
"= (" << content - nonflat <<
" (with nonflat corr.) +/- "
2323 << totalError <<
" (with syst.) )%" << endl;
2324 histFull[k].mHist_v->SetBinContent(j+1, content - nonflat);
2328 cout <<
"##### Resolution of the " << j+1 <<
"th harmonic was zero."
2330 histFull[k].histFullHar[j].mHist_v2D-> Reset();
2331 histFull[k].histFullHar[j].mHist_vEta->Reset();
2332 histFull[k].histFullHar[j].mHist_vPt ->Reset();
2333 histFull[k].mHist_v->SetBinContent(j+1, 0.);
2334 histFull[k].mHist_v->SetBinError(j+1, 0.);
2338 if (pFlowMaker->PhiWgtCalc()) {
2340 double meanFarEast = histFull[k].histTwoHar[j].mHistPhiFarEast->Integral()
2341 / (double)Flow::nPhiBins;
2342 double meanEast = histFull[k].histTwoHar[j].mHistPhiEast->Integral()
2343 / (double)Flow::nPhiBins;
2344 double meanWest = histFull[k].histTwoHar[j].mHistPhiWest->Integral()
2345 / (double)Flow::nPhiBins;
2346 double meanFarWest = histFull[k].histTwoHar[j].mHistPhiFarWest->Integral()
2347 / (double)Flow::nPhiBins;
2348 double meanFtpcFarEast = histFull[k].histTwoHar[j].mHistPhiFtpcFarEast->Integral()
2349 / (double)Flow::nPhiBinsFtpc;
2350 double meanFtpcEast = histFull[k].histTwoHar[j].mHistPhiFtpcEast->Integral()
2351 / (double)Flow::nPhiBinsFtpc;
2352 double meanFtpcWest = histFull[k].histTwoHar[j].mHistPhiFtpcWest->Integral()
2353 / (double)Flow::nPhiBinsFtpc;
2354 double meanFtpcFarWest = histFull[k].histTwoHar[j].mHistPhiFtpcFarWest->Integral()
2355 / (double)Flow::nPhiBinsFtpc;
2358 for (
int i = 0; i < Flow::nPhiBins; i++) {
2359 histFull[k].histTwoHar[j].mHistPhiWgtFarEast->SetBinContent(i+1,meanFarEast);
2360 histFull[k].histTwoHar[j].mHistPhiWgtFarEast->SetBinError(i+1, 0.);
2361 histFull[k].histTwoHar[j].mHistPhiWgtEast ->SetBinContent(i+1, meanEast);
2362 histFull[k].histTwoHar[j].mHistPhiWgtEast ->SetBinError(i+1, 0.);
2363 histFull[k].histTwoHar[j].mHistPhiWgtWest ->SetBinContent(i+1, meanWest);
2364 histFull[k].histTwoHar[j].mHistPhiWgtWest ->SetBinError(i+1, 0.);
2365 histFull[k].histTwoHar[j].mHistPhiWgtFarWest->SetBinContent(i+1,meanFarWest);
2366 histFull[k].histTwoHar[j].mHistPhiWgtFarWest->SetBinError(i+1, 0.);
2370 for (
int i = 0; i < Flow::nPhiBinsFtpc; i++) {
2371 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarEast->SetBinContent(i+1,meanFtpcFarEast);
2372 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarEast->SetBinError(i+1, 0.);
2373 histFull[k].histTwoHar[j].mHistPhiWgtFtpcEast ->SetBinContent(i+1,meanFtpcEast);
2374 histFull[k].histTwoHar[j].mHistPhiWgtFtpcEast ->SetBinError(i+1, 0.);
2375 histFull[k].histTwoHar[j].mHistPhiWgtFtpcWest ->SetBinContent(i+1,meanFtpcWest);
2376 histFull[k].histTwoHar[j].mHistPhiWgtFtpcWest ->SetBinError(i+1, 0.);
2377 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarWest->SetBinContent(i+1,meanFtpcFarWest);
2378 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarWest->SetBinError(i+1, 0.);
2382 histFull[k].histTwoHar[j].mHistPhiWgtFarEast->
2383 Divide(histFull[k].histTwoHar[j].mHistPhiFarEast);
2384 phiWgtHistNames->AddLast(histFull[k].histTwoHar[j].mHistPhiWgtFarEast);
2385 histFull[k].histTwoHar[j].mHistPhiWgtEast->
2386 Divide(histFull[k].histTwoHar[j].mHistPhiEast);
2387 phiWgtHistNames->AddLast(histFull[k].histTwoHar[j].mHistPhiWgtEast);
2388 histFull[k].histTwoHar[j].mHistPhiWgtWest->
2389 Divide(histFull[k].histTwoHar[j].mHistPhiWest);
2390 phiWgtHistNames->AddLast(histFull[k].histTwoHar[j].mHistPhiWgtWest);
2391 histFull[k].histTwoHar[j].mHistPhiWgtFarWest->
2392 Divide(histFull[k].histTwoHar[j].mHistPhiFarWest);
2393 phiWgtHistNames->AddLast(histFull[k].histTwoHar[j].mHistPhiWgtFarWest);
2396 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarEast->
2397 Divide(histFull[k].histTwoHar[j].mHistPhiFtpcFarEast);
2398 phiWgtHistNames->AddLast(histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarEast);
2399 histFull[k].histTwoHar[j].mHistPhiWgtFtpcEast->
2400 Divide(histFull[k].histTwoHar[j].mHistPhiFtpcEast);
2401 phiWgtHistNames->AddLast(histFull[k].histTwoHar[j].mHistPhiWgtFtpcEast);
2402 histFull[k].histTwoHar[j].mHistPhiWgtFtpcWest->
2403 Divide(histFull[k].histTwoHar[j].mHistPhiFtpcWest);
2404 phiWgtHistNames->AddLast(histFull[k].histTwoHar[j].mHistPhiWgtFtpcWest);
2405 histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarWest->
2406 Divide(histFull[k].histTwoHar[j].mHistPhiFtpcFarWest);
2407 phiWgtHistNames->AddLast(histFull[k].histTwoHar[j].mHistPhiWgtFtpcFarWest);
2412 phiWgtHistNames->AddLast(mHistZDCSMDPsiWgtEast);
2413 phiWgtHistNames->AddLast(mHistZDCSMDPsiWgtWest);
2414 TFile* pPhiWgtFile =
new TFile(
"flowPhiWgt.hist.root",
"READ");
2415 if (pPhiWgtFile->IsOpen())
2416 { phiWgtHistNames->AddLast(mHistZDCSMDPsiWgtFull); }
2419 TFile histFile(
"flow.hist.root",
"RECREATE");
2421 GetHistList()->Write();
2425 if (pFlowMaker->PhiWgtCalc()) {
2426 TFile phiWgtNewFile(
"flowPhiWgtNew.hist.root",
"RECREATE");
2427 TText* textInfo = 0;
2428 if (pFlowEvent->FirstLastPoints()) {
2430 sprintf(chInfo,
"%s%d%s%d%s",
" pt weight= ", pFlowEvent->PtWgt(),
2431 ", eta weight= ", pFlowEvent->EtaWgt(),
"\n");
2432 textInfo =
new TText(0,0,chInfo);
2433 textInfo->Write(
"info");
2436 phiWgtHistNames->Write();
2437 phiWgtNewFile.Close();
2438 if (pFlowEvent->FirstLastPoints())
delete textInfo;
2440 delete phiWgtHistNames;
2443 if (mCalcReCentPars) {
2444 TFile fileReCent(
"flow.reCentAnaNew.root",
"RECREATE");
2446 savedHistReCentNames->Write();
2449 delete savedHistReCentNames;
2458 void StFlowAnalysisMaker::SetHistoRanges(Bool_t ftpc_included) {
2460 if (ftpc_included) {
2461 mEtaMin = Flow::etaMin;
2462 mEtaMax = Flow::etaMax;
2463 mNEtaBins = Flow::nEtaBins;
2466 mEtaMin = Flow::etaMinTpcOnly;
2467 mEtaMax = Flow::etaMaxTpcOnly;
2468 mNEtaBins = Flow::nEtaBinsTpcOnly;
2476 void StFlowAnalysisMaker::SetPtRange_for_vEta(Float_t lo, Float_t hi) {
2480 mPtRange_for_vEta[0] = lo;
2481 mPtRange_for_vEta[1] = hi;
2488 void StFlowAnalysisMaker::SetEtaRange_for_vPt(Float_t lo, Float_t hi) {
2492 mEtaRange_for_vPt[0] = lo;
2493 mEtaRange_for_vPt[1] = hi;
2500 void StFlowAnalysisMaker::SetV1Ep1Ep2(Bool_t v1Ep1Ep2) {
2504 mV1Ep1Ep2 = v1Ep1Ep2;
StFlowAnalysisMaker(const Char_t *name="FlowAnalysis")
Default constructor.