23 #define AliFlowAnalysisCRC_cxx
25 #include "Riostream.h"
34 #include "TParticle.h"
38 #include "TProfile2D.h"
39 #include "TProfile3D.h"
42 #include "TPaveLabel.h"
52 #include "THnSparse.h"
85 fBookOnlyBasicCCH(kTRUE),
87 fCommonHists2nd(NULL),
88 fCommonHists4th(NULL),
89 fCommonHists6th(NULL),
90 fCommonHists8th(NULL),
91 fCommonHistsResults2nd(NULL),
92 fCommonHistsResults4th(NULL),
93 fCommonHistsResults6th(NULL),
94 fCommonHistsResults8th(NULL),
107 fCommonConstants(NULL),
108 fFillMultipleControlHistograms(kFALSE),
110 fAnalysisLabel(NULL),
112 fUsePhiWeights(kFALSE),
113 fUsePtWeights(kFALSE),
114 fUseEtaWeights(kFALSE),
115 fUseTrackWeights(kFALSE),
116 fUsePhiEtaWeights(kFALSE),
117 fUsePhiEtaWeightsChDep(kFALSE),
118 fUsePhiEtaWeightsVtxDep(kFALSE),
119 fUsePhiEtaWeightsChPtDep(kFALSE),
120 fUseZDCESEMulWeights(kFALSE),
121 fUseZDCESESpecWeights(kFALSE),
122 fUseParticleWeights(NULL),
124 fMultiplicityWeight(NULL),
128 fIntFlowProfiles(NULL),
129 fIntFlowResults(NULL),
130 fIntFlowAllCorrelationsVsM(NULL),
132 fApplyCorrectionForNUA(kFALSE),
133 fApplyCorrectionForNUAVsM(kFALSE),
137 fPropagateErrorAlsoFromNIT(kFALSE),
138 fCalculateCumulantsVsM(kFALSE),
139 fCalculateAllCorrelationsVsM(kFALSE),
140 fMinimumBiasReferenceFlow(kTRUE),
141 fForgetAboutCovariances(kFALSE),
142 fStoreVarious(kFALSE),
144 fUse2DHistograms(kFALSE),
145 fFillProfilesVsMUsingWeights(kTRUE),
146 fUseQvectorTerms(kFALSE),
152 fIntFlowCorrelationsEBE(NULL),
153 fIntFlowEventWeightsForCorrelationsEBE(NULL),
154 fIntFlowCorrelationsAllEBE(NULL),
156 fNumberOfPOIsEBE(0.),
157 fReferenceMultiplicityEBE(0.),
158 fReferenceMultiplicityRecEBE(0.),
160 fNewCentralityEBE(0.),
166 fCentralityCL1EBE(0.),
168 fCentralityTRKEBE(0.),
176 fAvMultiplicity(NULL),
177 fIntFlowCorrelationsPro(NULL),
178 fIntFlowSquaredCorrelationsPro(NULL),
179 fIntFlowCorrelationsAllPro(NULL),
180 fIntFlowExtraCorrelationsPro(NULL),
181 fIntFlowProductOfCorrelationsPro(NULL),
182 fIntFlowProductOfCorrectionTermsForNUAPro(NULL),
183 fIntFlowCorrelationsHist(NULL),
184 fIntFlowCorrelationsAllHist(NULL),
185 fIntFlowCovariances(NULL),
186 fIntFlowSumOfProductOfEventWeights(NULL),
187 fIntFlowCovariancesNUA(NULL),
188 fIntFlowSumOfProductOfEventWeightsNUA(NULL),
189 fIntFlowQcumulants(NULL),
190 fIntFlowQcumulantsRebinnedInM(NULL),
191 fIntFlowQcumulantsErrorSquaredRatio(NULL),
193 fIntFlowRebinnedInM(NULL),
194 fIntFlowDetectorBias(NULL),
197 fDiffFlowProfiles(NULL),
198 fDiffFlowResults(NULL),
200 fDiffFlowFlags(NULL),
201 fCalculateDiffFlow(kTRUE),
202 fCalculate2DDiffFlow(kFALSE),
203 fCalculateDiffFlowVsEta(kTRUE),
205 fOtherDiffCorrelatorsList(NULL),
207 fDistributionsList(NULL),
208 fDistributionsFlags(NULL),
209 fStoreDistributions(kFALSE),
210 fnBinsForCorrelations(10000),
212 fNestedLoopsList(NULL),
213 fEvaluateIntFlowNestedLoops(kFALSE),
214 fEvaluateDiffFlowNestedLoops(kFALSE),
215 fMaxAllowedMultiplicity(10),
216 fEvaluateNestedLoops(NULL),
217 fIntFlowDirectCorrelations(NULL),
218 fIntFlowExtraDirectCorrelations(NULL),
219 fCrossCheckInPtBinNo(10),
220 fCrossCheckInEtaBinNo(20),
221 fNoOfParticlesInBin(NULL),
222 fMixedHarmonicsNestedLoops(NULL),
224 fMixedHarmonicsList(NULL),
225 fMixedHarmonicsProfiles(NULL),
226 fMixedHarmonicsResults(NULL),
227 fMixedHarmonicsErrorPropagation(NULL),
228 fMixedHarmonicsFlags(NULL),
229 fCalculateMixedHarmonics(kFALSE),
230 fCalculateMixedHarmonicsVsM(kFALSE),
231 f2pCorrelations(NULL),
232 f3pCorrelations(NULL),
233 f4pCorrelations(NULL),
234 f5pCorrelations(NULL),
235 f6pCorrelations(NULL),
236 f7pCorrelations(NULL),
237 f8pCorrelations(NULL),
245 fMixedHarmonicProductOfEventWeights(NULL),
246 fMixedHarmonicProductOfCorrelations(NULL),
248 fControlHistogramsList(NULL),
249 fControlHistogramsFlags(NULL),
250 fStoreControlHistograms(kFALSE),
251 fCorrelationNoRPsVsRefMult(NULL),
252 fCorrelationNoPOIsVsRefMult(NULL),
253 fCorrelationNoRPsVsNoPOIs(NULL),
255 fBootstrapList(NULL),
256 fBootstrapProfilesList(NULL),
257 fBootstrapResultsList(NULL),
258 fBootstrapFlags(NULL),
259 fUseBootstrap(kFALSE),
260 fUseBootstrapVsM(kFALSE),
263 fBootstrapCorrelations(NULL),
264 fBootstrapCumulants(NULL),
269 fCalculateCRC(kTRUE),
270 fCalculateCRCPt(kFALSE),
271 fCalculateCME(kFALSE),
272 fCalculateCRCInt(kFALSE),
273 fCalculateCRC2(kFALSE),
274 fCalculateCRCVZ(kFALSE),
275 fCalculateCRCZDC(kFALSE),
276 fCalculateFlowQC(kFALSE),
277 fCalculateFlowZDC(kFALSE),
278 fCalculateFlowVZ(kFALSE),
279 fCalculateEbEFlow(kFALSE),
280 fStoreZDCQVecVtxPos(kFALSE),
281 fUsePhiEtaCuts(kFALSE),
284 fRecenterZDC(kFALSE),
286 fUseCRCRecenter(kFALSE),
297 fCorrWeightTPC(kUnit),
298 fCorrWeightVZ(kUnit),
299 fCorrWeightZDC(kUnit),
302 fCRCCenBinWidth(CenWidth),
303 fCRCIntRbRList(NULL),
306 fInteractionRate(kAll),
307 fSelectCharge(kAllCh),
308 fPOIExtraWeights(kNone),
310 fCRCQVecListTPC(NULL),
311 fCRCQVecWeightsList(NULL),
312 fCRCZDCCalibList(NULL),
313 fCRCZDC2DCutList(NULL),
314 fCRCVZEROCalibList(NULL),
315 fCRCZDCResList(NULL),
319 fCRCZDCRbRList(NULL),
326 fFlowSPZDCList(NULL),
328 fFlowQCCorrZDCList(NULL),
333 fFlowQCDeltaEta(0.4),
339 fQAZDCCutsFlag(kTRUE),
340 fUseTracklets(kFALSE),
343 fZDCGainAlpha(0.395),
344 fbFlagIsPosMagField(kFALSE)
349 fHistList =
new TList();
350 fHistList->SetName(
"cobjQC");
351 fHistList->SetOwner(kTRUE);
354 fTempList =
new TList();
355 fTempList->SetName(
"temp");
356 fTempList->SetOwner(kTRUE);
359 fMultiplicityWeight =
new TString(
"combinations");
362 fAnalysisLabel =
new TString();
365 this->InitializeArraysForIntFlow();
366 this->InitializeArraysForDiffFlow();
367 this->InitializeArraysForDistributions();
368 this->InitializeArraysForVarious();
369 this->InitializeArraysForNestedLoops();
370 this->InitializeArraysForMixedHarmonics();
371 this->InitializeArraysForControlHistograms();
372 this->InitializeArraysForBootstrap();
381 this->InitializeCostantsForCRC();
382 this->InitializeArraysForParticleWeights();
383 this->InitializeArraysForCRC();
384 this->InitializeArraysForCRCVZ();
385 this->InitializeArraysForCRCZDC();
386 this->InitializeArraysForCRC2();
387 this->InitializeArraysForQVec();
388 this->InitializeArraysForCRCPt();
389 this->InitializeArraysForCME();
390 this->InitializeArraysForFlowEbE();
391 this->InitializeArraysForFlowQC();
392 this->InitializeArraysForFlowQCHighOrders();
393 this->InitializeArraysForFlowGF();
394 this->InitializeArraysForFlowSPZDC();
395 this->InitializeArraysForFlowSPVZ();
396 this->InitializeArraysForEbEFlow();
441 Bool_t oldHistAddStatus = TH1::AddDirectoryStatus();
442 TH1::AddDirectory(kFALSE);
500 TH1::AddDirectory(oldHistAddStatus);
541 Int_t nCounterNoRPs = 0;
592 if(fRunBin<0 || fRunBin>=
fCRCnRun) {
return;}
594 if(fCenBin<0 || fCenBin>=
fCRCnCen) {
return;}
607 Int_t dRun15hPos[] = {246390, 246391, 246392, 246994, 246991, 246989, 246984, 246982, 246980, 246948, 246945, 246928, 246851, 246847, 246846, 246845, 246844, 246810, 246809, 246808, 246807, 246805, 246804, 246766, 246765, 246763, 246760, 246759, 246758, 246757, 246751, 246750, 246495, 246493, 246488, 246487, 246434, 246431, 246428, 246424};
608 for (
Int_t i=0; i<40; i++) {
676 Bool_t bPassZDCcuts = kTRUE;
677 if( ZCM<=0. || ZAM<=0. || sqrt(ZCRe*ZCRe+ZCIm*ZCIm)<1.E-6 || sqrt(ZARe*ZARe+ZAIm*ZAIm)<1.E-6 ) bPassZDCcuts=kFALSE;
699 AliWarning(
"WARNING: POIExtraWeights (kEtaPhiRbR) not found ! \n");
703 for (
Int_t i=0; i<2; i++) {
707 AliWarning(
"WARNING: POIExtraWeights (kEtaPhiChRbR) not found ! \n");
716 AliWarning(
"WARNING: POIExtraWeights (kEtaPhiVtxRbR) not found ! \n");
724 for(
Int_t i=0;i<nPrim;i++) {
731 Bool_t IsSplitMergedTracks = kFALSE;
735 if(IsSplitMergedTracks)
continue;
741 dPhi = aftsTrack->
Phi();
742 dPt = aftsTrack->
Pt();
743 dEta = aftsTrack->
Eta();
744 dCharge = aftsTrack->
Charge();
749 cw = (dCharge > 0. ? 0 : 1);
761 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
768 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
773 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
778 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
780 Int_t ptbebe = (dPt>1.? 2 : (dPt>0.5 ? 1 : 0));
784 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
790 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
795 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
803 for(
Int_t m=0;m<12;m++)
805 for(
Int_t k=0;k<9;k++)
807 (*fReQ)(m,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1)*n*dPhi);
808 (*fImQ)(m,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1)*n*dPhi);
812 for(
Int_t p=0;p<8;p++)
814 for(
Int_t k=0;k<9;k++)
816 (*fSpk)(p,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k);
825 for(
Int_t k=0;k<9;k++)
827 for(
Int_t m=0;m<4;m++)
833 fReRPQ1dEBE[0][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
834 fImRPQ1dEBE[0][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
837 fs1dEBE[0][pe][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
843 fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
844 fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
847 fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
856 for(
Int_t k=0;k<9;k++)
858 for(
Int_t m=0;m<4;m++)
864 fReRPQ1dEBE[2][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
865 fImRPQ1dEBE[2][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
868 fs1dEBE[2][pe][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
874 fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
875 fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
878 fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
895 dPhi = aftsTrack->
Phi();
896 dPt = aftsTrack->
Pt();
897 dEta = aftsTrack->
Eta();
898 dCharge = aftsTrack->
Charge();
905 if(dCharge > 0.) dPt += 1.E-2;
909 cw = (dCharge > 0. ? 0 : 1);
922 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
929 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
934 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
939 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
941 Int_t ptbebe = (dPt>1.? 2 : (dPt>0.5 ? 1 : 0));
945 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
951 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
956 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
962 if(dPhi>2.136283 && dPhi<2.324779)
continue;
966 for(
Int_t m=0;m<21;m++)
968 for(
Int_t k=0;k<9;k++)
970 (*fReQGF)(m,k) += pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos(m*dPhi);
971 (*fImQGF)(m,k) += pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin(m*dPhi);
978 for(
Int_t k=0;k<9;k++)
980 for(
Int_t m=0;m<4;m++)
986 fReRPQ1dEBE[1][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
987 fImRPQ1dEBE[1][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
992 fReRPQ2dEBE[1][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
993 fImRPQ2dEBE[1][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
1001 fCRCQRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1002 fCRCQIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1003 fCRCMult[cw][h]->Fill(dEta,wPhiEta);
1005 fCRC2QRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1006 fCRC2QIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1007 fCRC2Mul[cw][h]->Fill(dEta,pow(wPhiEta,h));
1009 fCRCZDCQRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1010 fCRCZDCQIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1014 fCRC2QRe[2][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1015 fCRC2QIm[2][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1016 fCRC2Mul[2][h]->Fill(dEta,pow(wPhiEta,h));
1020 fCRCZDCQRe[2][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1021 fCRCZDCQIm[2][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1024 fCRCZDCQRe[3][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1025 fCRCZDCQIm[3][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1033 if(weraw > 0.) SpecWeig = 1./weraw;
1035 fCMEQRe[cw][h]->Fill(dEta,SpecWeig*wPhiEta*TMath::Cos((h+1.)*dPhi));
1036 fCMEQIm[cw][h]->Fill(dEta,SpecWeig*wPhiEta*TMath::Sin((h+1.)*dPhi));
1037 fCMEMult[cw][h]->Fill(dEta,SpecWeig*wPhiEta);
1038 fCMEQRe[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.)*TMath::Cos((h+1.)*dPhi));
1039 fCMEQIm[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.)*TMath::Sin((h+1.)*dPhi));
1040 fCMEMult[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.));
1056 fPOIPtDiffQRe[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1057 fPOIPtDiffQIm[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1060 fPOIPtDiffQReCh[cw][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1061 fPOIPtDiffQImCh[cw][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1064 fPOIPhiDiffQRe[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1065 fPOIPhiDiffQIm[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1068 fPOIPtEtaDiffQRe[k][h]->Fill(dPt,dEta,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1069 fPOIPtEtaDiffQIm[k][h]->Fill(dPt,dEta,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1077 Int_t keta = (dEta<0.?0:1);
1078 fPOIPtDiffQReEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1079 fPOIPtDiffQImEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1081 fPOIPhiDiffQReEG[keta][k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1082 fPOIPhiDiffQImEG[keta][k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1086 }
else if(fFlowQCDeltaEta<0. && fFlowQCDeltaEta>-1.) {
1089 fPOIPtDiffQRe[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1090 fPOIPtDiffQIm[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1093 fPOIPhiDiffQRe[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1094 fPOIPhiDiffQIm[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1099 if((dEta>0. && dEta<0.4-boundetagap/2.) || (dEta>0.4+boundetagap/2. && dEta<0.8)) {
1101 if(dEta>0. && dEta<0.4-boundetagap/2.) keta = 0;
1103 fPOIPtDiffQReEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1104 fPOIPtDiffQImEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1112 }
else if(fFlowQCDeltaEta<-1. && fFlowQCDeltaEta>-2.) {
1115 fPOIPtDiffQRe[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1116 fPOIPtDiffQIm[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1119 fPOIPhiDiffQRe[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1120 fPOIPhiDiffQIm[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1125 if((dEta<0. && dEta>-0.4+boundetagap/2.) || (dEta<-0.4-boundetagap/2. && dEta>-0.8)) {
1127 if(dEta<0. && dEta>-0.4+boundetagap/2.) keta = 0;
1129 fPOIPtDiffQReEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1130 fPOIPtDiffQImEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1143 fEtaDiffQRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1144 fEtaDiffQIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1146 fPOIEtaPtQRe[cw][h]->Fill(dEta,dPt,wPhiEta*TMath::Cos((h+1.)*dPhi));
1147 fPOIEtaPtQIm[cw][h]->Fill(dEta,dPt,wPhiEta*TMath::Sin((h+1.)*dPhi));
1176 for (
Int_t h=0;h<6;h++) {
1196 printf(
"\n WARNING (QC): No particle (i.e. aftsTrack is a NULL pointer in AFAWQC::Make())!!!!\n\n");
1203 for(
Int_t p=0;p<8;p++)
1205 for(
Int_t k=0;k<9;k++)
1207 (*fSpk)(p,k)=pow((*
fSpk)(p,k),p+1);
1602 const Float_t kLimit1 = 0.02 * 3;
1606 Bool_t isNoSplit = kFALSE;
1609 if (it1 < nTracks - 1) {
1610 for (
Int_t itll2 = it1 + 1; itll2 < nTracks; itll2++) {
1622 if (TMath::Abs(deta1) < 0.02 * 2.5 * 3) {
1630 Float_t dphistarminabs1 = 1e5;
1633 if (TMath::Abs(dphistar11) < kLimit1 || TMath::Abs(dphistar21) < kLimit1 || dphistar11 * dphistar21 < 0 ) {
1635 for (
Double_t rad1 = 0.8; rad1 < 2.51; rad1 += 0.01) {
1638 Float_t dphistarabs1 = TMath::Abs(dphistar1);
1639 if (dphistarabs1 < dphistarminabs1) {
1640 dphistarmin1 = dphistar1;
1641 dphistarminabs1 = dphistarabs1;
1644 if (dphistarminabs1 < 0.02 && TMath::Abs(deta1) < 0.02) {
1698 cout<<
"Skipping the event because multiplicity is "<<nPrim<<
". Too high to evaluate nested loops!"<<endl;
1702 cout<<
"Skipping the event because multiplicity is "<<nPrim<<
"."<<endl;
1838 cosP1n = dReQ1n/dMult;
1856 cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1));
1857 cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1));
1881 cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n)
1882 / (dMult*(dMult-1)*(dMult-2));
1947 sinP1n = dImQ1n/dMult;
1964 sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1));
1965 sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1));
1989 sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n)
1990 / (dMult*(dMult-1)*(dMult-2));
2020 if(outputListHistos)
2025 printf(
"\n WARNING (QC): fHistList is NULL in AFAWQC::GOH() !!!!\n\n");
2054 printf(
"\n WARNING (QC): outputListHistos is NULL in AFAWQC::GOH() !!!!\n\n");
2066 Int_t nBinsPt = profilePtEta->GetNbinsX();
2067 Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin();
2068 Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax();
2070 Int_t nBinsEta = profilePtEta->GetNbinsY();
2072 TProfile *profilePt =
new TProfile(
"",
"",nBinsPt,dPtMin,dPtMax);
2074 for(
Int_t p=1;p<=nBinsPt;p++)
2082 for(
Int_t e=1;e<=nBinsEta;e++)
2084 contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))
2085 * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2086 entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2088 sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))
2089 * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.)
2090 + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.));
2091 sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2092 sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))
2093 * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)));
2095 if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.)
2097 spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5);
2099 profilePt->SetBinContent(p,contentPt);
2100 profilePt->SetBinEntries(p,entryPt);
2102 profilePt->SetBinError(p,spreadPt);
2119 Int_t nBinsEta = profilePtEta->GetNbinsY();
2120 Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin();
2121 Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax();
2123 Int_t nBinsPt = profilePtEta->GetNbinsX();
2125 TProfile *profileEta =
new TProfile(
"",
"",nBinsEta,dEtaMin,dEtaMax);
2127 for(
Int_t e=1;e<=nBinsEta;e++)
2131 for(
Int_t p=1;p<=nBinsPt;p++)
2133 contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))
2134 * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2135 entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2137 profileEta->SetBinContent(e,contentEta);
2138 profileEta->SetBinEntries(e,entryEta);
2158 for(
Int_t b=0;b<4;b++)
2169 }
else if(type ==
"RP")
2179 }
else if(type ==
"POI")
2191 for(
Int_t b=0;b<4;b++)
2200 TString subtitle2 =
" (rebinned in M)";
2202 if(type !=
"RF, rebinned in M")
2206 subtitle.Append(type);
2207 subtitle.Append(
", without weights)");
2210 subtitle.Append(type);
2211 subtitle.Append(
", with weights)");
2217 subtitle.Append(
"RF");
2218 subtitle.Append(
", without weights)");
2221 subtitle.Append(
"RF");
2222 subtitle.Append(
", with weights)");
2227 cout<<
"*************************************"<<endl;
2228 cout<<
"*************************************"<<endl;
2229 cout<<title.Data()<<endl;
2230 cout<<subtitle.Data()<<endl;
2231 if(type ==
"RF, rebinned in M"){cout<<subtitle2.Data()<<endl;}
2234 for(
Int_t i=0;i<4;i++)
2236 cout<<
" v_"<<n<<
"{"<<2*(i+1)<<
"} = "<<dVn[i]<<
" +/- "<<dVnErr[i]<<endl;
2244 cout<<
" detector bias (corrected for): "<<endl;
2247 cout<<
" detector bias (not corrected for):"<<endl;
2253 if(type ==
"RF" || type ==
"RF, rebinned in M")
2257 else if (type ==
"RP")
2261 else if (type ==
"POI")
2266 cout<<
"*************************************"<<endl;
2267 cout<<
"*************************************"<<endl;
2277 TFile *output =
new TFile(outputFileName.Data(),
"RECREATE");
2293 outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey);
2306 TString commonHistsName =
"AliFlowCommonHistQC";
2314 TString commonHists2ndOrderName =
"AliFlowCommonHist2ndOrderQC";
2319 TString commonHists4thOrderName =
"AliFlowCommonHist4thOrderQC";
2324 TString commonHists6thOrderName =
"AliFlowCommonHist6thOrderQC";
2329 TString commonHists8thOrderName =
"AliFlowCommonHist8thOrderQC";
2337 TString commonHistResults2ndOrderName =
"AliFlowCommonHistResults2ndOrderQC";
2342 TString commonHistResults4thOrderName =
"AliFlowCommonHistResults4thOrderQC";
2347 TString commonHistResults6thOrderName =
"AliFlowCommonHistResults6thOrderQC";
2352 TString commonHistResults8thOrderName =
"AliFlowCommonHistResults8thOrderQC";
2544 TF1 *CenFit =
new TF1(
"CenFit",
"pol0", 0., 100.);
2547 Double_t CenAv = CenFit->GetParameter(0);
2559 Double_t CenAv = CenFit->GetParameter(0);
2561 Double_t SemiCenAv = CenFit->GetParameter(0);
2587 TString sinCosFlag[2] = {
"sin",
"cos"};
2588 TString powerFlag[2] = {
"linear",
"quadratic"};
2591 TString intFlowFlagsName =
"fIntFlowFlags";
2593 fIntFlowFlags =
new TProfile(intFlowFlagsName.Data(),
"Flags for Integrated Flow",20,0.,20.);
2599 fIntFlowFlags->GetXaxis()->SetBinLabel(1,
"Particle Weights");
2601 fIntFlowFlags->GetXaxis()->SetBinLabel(3,
"Corrected for NUA?");
2602 fIntFlowFlags->GetXaxis()->SetBinLabel(4,
"Print RF results");
2603 fIntFlowFlags->GetXaxis()->SetBinLabel(5,
"Print RP results");
2604 fIntFlowFlags->GetXaxis()->SetBinLabel(6,
"Print POI results");
2605 fIntFlowFlags->GetXaxis()->SetBinLabel(7,
"Print RF (rebinned in M) results");
2606 fIntFlowFlags->GetXaxis()->SetBinLabel(8,
"Corrected for NUA vs M?");
2607 fIntFlowFlags->GetXaxis()->SetBinLabel(9,
"Propagate errors to v_{n} from correlations?");
2608 fIntFlowFlags->GetXaxis()->SetBinLabel(10,
"Calculate cumulants vs M");
2609 fIntFlowFlags->GetXaxis()->SetBinLabel(11,
"fMinimumBiasReferenceFlow");
2610 fIntFlowFlags->GetXaxis()->SetBinLabel(12,
"fForgetAboutCovariances");
2612 fIntFlowFlags->GetXaxis()->SetBinLabel(14,
"fFillMultipleControlHistograms");
2613 fIntFlowFlags->GetXaxis()->SetBinLabel(15,
"Calculate all correlations vs M");
2614 fIntFlowFlags->GetXaxis()->SetBinLabel(16,
"fMultiplicityIs");
2616 fIntFlowFlags->GetXaxis()->SetBinLabel(18,
"fUse2DHistograms");
2617 fIntFlowFlags->GetXaxis()->SetBinLabel(19,
"fFillProfilesVsMUsingWeights");
2618 fIntFlowFlags->GetXaxis()->SetBinLabel(20,
"fUseQvectorTerms");
2623 fReQ =
new TMatrixD(12,9);
2624 fImQ =
new TMatrixD(12,9);
2625 fSpk =
new TMatrixD(8,9);
2626 fReQGF =
new TMatrixD(21,9);
2627 fImQGF =
new TMatrixD(21,9);
2629 TString intFlowCorrelationsEBEName =
"fIntFlowCorrelationsEBE";
2633 TString intFlowEventWeightsForCorrelationsEBEName =
"fIntFlowEventWeightsForCorrelationsEBE";
2634 intFlowEventWeightsForCorrelationsEBEName +=
fAnalysisLabel->Data();
2637 TString intFlowCorrelationsAllEBEName =
"fIntFlowCorrelationsAllEBE";
2642 TString fIntFlowCorrectionTermsForNUAEBEName =
"fIntFlowCorrectionTermsForNUAEBE";
2644 for(
Int_t sc=0;sc<2;sc++)
2646 fIntFlowCorrectionTermsForNUAEBE[sc] =
new TH1D(Form(
"%s: %s terms",fIntFlowCorrectionTermsForNUAEBEName.Data(),sinCosFlag[sc].Data()),Form(
"Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].
Data()),4,0,4);
2649 TString fIntFlowEventWeightForCorrectionTermsForNUAEBEName =
"fIntFlowEventWeightForCorrectionTermsForNUAEBE";
2650 fIntFlowEventWeightForCorrectionTermsForNUAEBEName +=
fAnalysisLabel->Data();
2651 for(
Int_t sc=0;sc<2;sc++)
2657 TString avMultiplicityName =
"fAvMultiplicity";
2659 fAvMultiplicity =
new TProfile(avMultiplicityName.Data(),
"Average multiplicities of reference particles (RPs)",9,0,9);
2676 TString correlationFlag[4] = {
"#LT#LT2#GT#GT",
"#LT#LT4#GT#GT",
"#LT#LT6#GT#GT",
"#LT#LT8#GT#GT"};
2677 TString intFlowCorrelationsProName =
"fIntFlowCorrelationsPro";
2679 fIntFlowCorrelationsPro =
new TProfile(intFlowCorrelationsProName.Data(),
"Average correlations for all events",4,0,4,
"s");
2685 for(
Int_t b=0;b<4;b++)
2691 TString squaredCorrelationFlag[4] = {
"#LT#LT2#GT^{2}#GT",
"#LT#LT4#GT^{2}#GT",
"#LT#LT6#GT^{2}#GT",
"#LT#LT8#GT^{2}#GT"};
2692 TString intFlowSquaredCorrelationsProName =
"fIntFlowSquaredCorrelationsPro";
2700 for(
Int_t b=0;b<4;b++)
2707 for(
Int_t ci=0;ci<4;ci++)
2710 TString intFlowCorrelationsVsMProName =
"fIntFlowCorrelationsVsMPro";
2712 fIntFlowCorrelationsVsMPro[ci] =
new TProfile(Form(
"%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()),
2713 Form(
"%s vs multiplicity",correlationFlag[ci].
Data()),
2729 TString intFlowSquaredCorrelationsVsMProName =
"fIntFlowSquaredCorrelationsVsMPro";
2732 Form(
"%s vs multiplicity",squaredCorrelationFlag[ci].
Data()),
2750 TString intFlowCorrelationsAllProName =
"fIntFlowCorrelationsAllPro";
2752 fIntFlowCorrelationsAllPro =
new TProfile(intFlowCorrelationsAllProName.Data(),
"Average all correlations for all events",64,0,64);
2858 fIntFlowCorrelationsAllVsMPro[30] =
new TProfile(
"eight1n1n1n1n1n1n1n1n",
"#LT#LT8#GT#GT_{n,n,n,n|n,n,n,n}",
fnBinsMult,
fMinMult,
fMaxMult);
2892 for(
Int_t n=0;n<63;n++)
2914 TString intFlowExtraCorrelationsProName =
"fIntFlowExtraCorrelationsPro";
2916 fIntFlowExtraCorrelationsPro =
new TProfile(intFlowExtraCorrelationsProName.Data(),
"Average extra correlations for all events",100,0,100,
"s");
2927 TString productFlag[6] = {
"#LT#LT2#GT#LT4#GT#GT",
"#LT#LT2#GT#LT6#GT#GT",
"#LT#LT2#GT#LT8#GT#GT",
2928 "#LT#LT4#GT#LT6#GT#GT",
"#LT#LT4#GT#LT8#GT#GT",
"#LT#LT6#GT#LT8#GT#GT"};
2929 TString intFlowProductOfCorrelationsProName =
"fIntFlowProductOfCorrelationsPro";
2936 for(
Int_t b=0;b<6;b++)
2945 TString intFlowProductOfCorrelationsVsMProName =
"fIntFlowProductOfCorrelationsVsMPro";
2946 intFlowProductOfCorrelationsVsMProName +=
fAnalysisLabel->Data();
2950 Form(
"%s versus multiplicity",productFlag[
pi].
Data()),
2966 TString intFlowProductOfCorrectionTermsForNUAProName =
"fIntFlowProductOfCorrectionTermsForNUAPro";
2967 intFlowProductOfCorrectionTermsForNUAProName +=
fAnalysisLabel->Data();
3002 for(
Int_t sc=0;sc<2;sc++)
3004 TString intFlowCorrectionTermsForNUAProName =
"fIntFlowCorrectionTermsForNUAPro";
3006 fIntFlowCorrectionTermsForNUAPro[sc] =
new TProfile(Form(
"%s: %s terms",intFlowCorrectionTermsForNUAProName.Data(),sinCosFlag[sc].Data()),Form(
"Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].
Data()),4,0,4,
"s");
3019 TString correctionTermFlag[4] = {
"(n(phi1))",
"(n(phi1+phi2))",
"(n(phi1-phi2-phi3))",
"(n(2phi1-phi2))"};
3020 for(
Int_t ci=0;ci<4;ci++)
3022 TString intFlowCorrectionTermsForNUAVsMProName =
"fIntFlowCorrectionTermsForNUAVsMPro";
3023 intFlowCorrectionTermsForNUAVsMProName +=
fAnalysisLabel->Data();
3024 fIntFlowCorrectionTermsForNUAVsMPro[sc][ci] =
new TProfile(Form(
"%s: #LT#LT%s%s#GT#GT",intFlowCorrectionTermsForNUAVsMProName.Data(),sinCosFlag[sc].Data(),correctionTermFlag[ci].Data()),Form(
"#LT#LT%s%s#GT#GT vs M",sinCosFlag[sc].
Data(),correctionTermFlag[ci].Data()),
fnBinsMult,
fMinMult,
fMaxMult,
"s");
3032 TString intFlowCorrelationsHistName =
"fIntFlowCorrelationsHist";
3047 for(
Int_t ci=0;ci<4;ci++)
3049 TString intFlowCorrelationsVsMHistName =
"fIntFlowCorrelationsVsMHist";
3052 Form(
"%s vs multiplicity",correlationFlag[ci].
Data()),
3069 TString intFlowCorrelationsAllHistName =
"fIntFlowCorrelationsAllHist";
3110 for(
Int_t sc=0;sc<2;sc++)
3112 TString intFlowCorrectionTermsForNUAHistName =
"fIntFlowCorrectionTermsForNUAHist";
3114 fIntFlowCorrectionTermsForNUAHist[sc] =
new TH1D(Form(
"%s: %s terms",intFlowCorrectionTermsForNUAHistName.Data(),sinCosFlag[sc].Data()),Form(
"Correction terms for non-uniform acceptance (%s terms)",sinCosFlag[sc].
Data()),4,0,4);
3126 TString intFlowCovariancesName =
"fIntFlowCovariances";
3128 fIntFlowCovariances =
new TH1D(intFlowCovariancesName.Data(),
"Covariances (multiplied with weight dependent prefactor)",6,0,6);
3139 TString intFlowSumOfEventWeightsName =
"fIntFlowSumOfEventWeights";
3141 for(
Int_t power=0;power<2;power++)
3143 fIntFlowSumOfEventWeights[power] =
new TH1D(Form(
"%s: %s",intFlowSumOfEventWeightsName.Data(),powerFlag[power].Data()),Form(
"Sum of %s event weights for correlations",powerFlag[power].
Data()),4,0,4);
3152 }
else if (power == 1)
3162 TString intFlowSumOfProductOfEventWeightsName =
"fIntFlowSumOfProductOfEventWeights";
3178 TString intFlowCovariancesVsMName =
"fIntFlowCovariancesVsM";
3180 TString covarianceFlag[6] = {
"Cov(<2>,<4>)",
"Cov(<2>,<6>)",
"Cov(<2>,<8>)",
"Cov(<4>,<6>)",
"Cov(<4>,<8>)",
"Cov(<6>,<8>)"};
3181 for(
Int_t ci=0;ci<6;ci++)
3184 Form(
"%s vs multiplicity",covarianceFlag[ci].
Data()),
3204 TString intFlowSumOfEventWeightsVsMName =
"fIntFlowSumOfEventWeightsVsM";
3206 TString sumFlag[2][4] = {{
"#sum_{i=1}^{N} w_{<2>}",
"#sum_{i=1}^{N} w_{<4>}",
"#sum_{i=1}^{N} w_{<6>}",
"#sum_{i=1}^{N} w_{<8>}"},
3207 {
"#sum_{i=1}^{N} w_{<2>}^{2}",
"#sum_{i=1}^{N} w_{<4>}^{2}",
"#sum_{i=1}^{N} w_{<6>}^{2}",
"#sum_{i=1}^{N} w_{<8>}^{2}"}};
3208 for(
Int_t si=0;si<4;si++)
3210 for(
Int_t power=0;power<2;power++)
3213 Form(
"%s vs multiplicity",sumFlag[power][si].
Data()),
3235 TString intFlowSumOfProductOfEventWeightsVsMName =
"fIntFlowSumOfProductOfEventWeightsVsM";
3236 intFlowSumOfProductOfEventWeightsVsMName +=
fAnalysisLabel->Data();
3237 TString sopowFlag[6] = {
"#sum_{i=1}^{N} w_{<2>} w_{<4>}",
"#sum_{i=1}^{N} w_{<2>} w_{<6>}",
"#sum_{i=1}^{N} w_{<2>} w_{<8>}",
3238 "#sum_{i=1}^{N} w_{<4>} w_{<6>}",
"#sum_{i=1}^{N} w_{<4>} w_{<8>}",
"#sum_{i=1}^{N} w_{<6>} w_{<8>}"};
3242 Form(
"%s versus multiplicity",sopowFlag[
pi].
Data()),
3259 TString intFlowCovariancesNUAName =
"fIntFlowCovariancesNUA";
3261 fIntFlowCovariancesNUA =
new TH1D(intFlowCovariancesNUAName.Data(),
"Covariances for NUA (multiplied with weight dependent prefactor)",27,0,27);
3280 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(16,
"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
3281 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(17,
"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
3284 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(20,
"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
3285 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(21,
"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
3286 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(22,
"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)");
3287 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(23,
"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
3288 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(24,
"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
3289 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(25,
"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
3290 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(26,
"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
3291 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(27,
"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)");
3294 TString intFlowSumOfEventWeightsNUAName =
"fIntFlowSumOfEventWeightsNUA";
3296 for(
Int_t sc=0;sc<2;sc++)
3298 for(
Int_t power=0;power<2;power++)
3300 fIntFlowSumOfEventWeightsNUA[sc][power] =
new TH1D(Form(
"%s: %s, %s",intFlowSumOfEventWeightsNUAName.Data(),powerFlag[power].Data(),sinCosFlag[sc].Data()),Form(
"Sum of %s event weights for NUA %s terms",powerFlag[power].
Data(),sinCosFlag[sc].Data()),4,0,4);
3309 }
else if(power == 1)
3313 (
fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form(
"#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}^{2}",sinCosFlag[sc].
Data()));
3320 TString intFlowSumOfProductOfEventWeightsNUAName =
"fIntFlowSumOfProductOfEventWeightsNUA";
3321 intFlowSumOfProductOfEventWeightsNUAName +=
fAnalysisLabel->Data();
3354 TString cumulantFlag[4] = {
"QC{2}",
"QC{4}",
"QC{6}",
"QC{8}"};
3355 TString intFlowQcumulantsName =
"fIntFlowQcumulants";
3360 fIntFlowQcumulants->SetTitle(
"Reference Q-cumulants (error from non-isotropic terms also propagated)");
3364 for(
Int_t b=0;b<4;b++)
3372 TString intFlowQcumulantsRebinnedInMName =
"fIntFlowQcumulantsRebinnedInM";
3377 for(
Int_t b=0;b<4;b++)
3384 TString intFlowQcumulantsErrorSquaredRatioName =
"fIntFlowQcumulantsErrorSquaredRatio";
3385 intFlowQcumulantsErrorSquaredRatioName +=
fAnalysisLabel->Data();
3389 for(
Int_t b=0;b<4;b++)
3397 TString intFlowQcumulantsVsMName =
"fIntFlowQcumulantsVsM";
3399 for(
Int_t co=0;co<4;co++)
3402 Form(
"%s vs multiplicity",cumulantFlag[co].
Data()),
3419 TString flowFlag[4] = {Form(
"v_{%d}{2,QC}",
fHarmonic),Form(
"v_{%d}{4,QC}",
fHarmonic),Form(
"v_{%d}{6,QC}",
fHarmonic),Form(
"v_{%d}{8,QC}",
fHarmonic)};
3420 TString intFlowName =
"fIntFlow";
3423 fIntFlow =
new TH1D(intFlowName.Data(),
"Reference flow estimates from Q-cumulants",4,0,4);
3426 for(
Int_t b=0;b<4;b++)
3428 (
fIntFlow->GetXaxis())->SetBinLabel(b+1,flowFlag[b].
Data());
3434 TString intFlowRebinnedInMName =
"fIntFlowRebinnedInM";
3436 fIntFlowRebinnedInM =
new TH1D(intFlowRebinnedInMName.Data(),
"Reference flow estimates from Q-cumulants (rebinned in M)",4,0,4);
3439 for(
Int_t b=0;b<4;b++)
3448 TString intFlowVsMName =
"fIntFlowVsM";
3450 for(
Int_t co=0;co<4;co++)
3452 fIntFlowVsM[co] =
new TH1D(Form(
"%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()),
3453 Form(
"%s vs multiplicity",flowFlag[co].
Data()),
3460 fIntFlowVsM[co]->GetXaxis()->SetTitle(
"Reference multiplicity (from ESD)");
3470 TString intFlowDetectorBiasName =
"fIntFlowDetectorBias";
3475 for(
Int_t ci=0;ci<4;ci++)
3477 (
fIntFlowDetectorBias->GetXaxis())->SetBinLabel(ci+1,Form(
"#frac{corrected}{measured} %s",cumulantFlag[ci].
Data()));
3483 TString intFlowDetectorBiasVsMName =
"fIntFlowDetectorBiasVsM";
3485 for(
Int_t ci=0;ci<4;ci++)
3488 Form(
"Quantifying detector bias for %s vs multiplicity",cumulantFlag[ci].
Data()),
3517 TString controlHistogramsFlagsName =
"fControlHistogramsFlags";
3519 fControlHistogramsFlags =
new TProfile(controlHistogramsFlagsName.Data(),
"Flags for Control Histograms",2,0,2);
3533 TString sCorrelationNoRPsVsRefMultName =
"fCorrelationNoRPsVsRefMult";
3544 TString sCorrelationNoPOIsVsRefMultName =
"fCorrelationNoPOIsVsRefMult";
3555 TString sCorrelationNoRPsVsNoPOIsName =
"fCorrelationNoRPsVsNoPOIs";
3566 TString sCorrelation[4] = {
"#LT2#GT",
"#LT4#GT",
"#LT6#GT",
"#LT8#GT"};
3570 sMultiplicity =
"# RPs";
3573 sMultiplicity =
"Reference multiplicity (from ESD)";
3576 sMultiplicity =
"# POIs";
3578 for(
Int_t ci=0;ci<4;ci++)
3590 TString sCorrelationProduct[1] = {
"#LT2#GT#LT4#GT"};
3591 for(
Int_t cpi=0;cpi<1;cpi++)
3605 TString sQvectorTerms[4] = {
"#frac{|Q_{n}|^{2}}{M}",
"#frac{|Q_{2n}|^{2}}{M}",
"#frac{|Q_{n}|^{4}}{M(2M-1)}",
"#frac{Re[Q_{2n}Q_{n}^{*}Q_{n}^{*}]}{M^{3/2}}"};
3606 for(
Int_t qvti=0;qvti<4;qvti++)
3633 TString bootstrapFlagsName =
"fBootstrapFlags";
3635 fBootstrapFlags =
new TProfile(bootstrapFlagsName.Data(),
"Flags for bootstrap",3,0,3);
3647 TString correlationFlag[4] = {
"#LT#LT2#GT#GT",
"#LT#LT4#GT#GT",
"#LT#LT6#GT#GT",
"#LT#LT8#GT#GT"};
3648 TString cumulantFlag[4] = {
"QC{2}",
"QC{4}",
"QC{6}",
"QC{8}"};
3652 TString bootstrapCorrelationsName =
"fBootstrapCorrelations";
3656 for(
Int_t ci=0;ci<4;ci++)
3666 TString bootstrapCumulantsName =
"fBootstrapCumulants";
3670 for(
Int_t co=0;co<4;co++)
3685 sMultiplicity =
"# RPs";
3688 sMultiplicity =
"Reference multiplicity (from ESD)";
3691 sMultiplicity =
"# POIs";
3696 TString bootstrapCorrelationsVsMName =
"fBootstrapCorrelationsVsM";
3698 for(
Int_t ci=0;ci<4;ci++)
3700 fBootstrapCorrelationsVsM[ci] =
new TProfile2D(Form(
"%s, %s",bootstrapCorrelationsVsMName.Data(),correlationFlag[ci].Data()),
3701 Form(
"Bootstrap Correlations Vs. M, %s",correlationFlag[ci].
Data()),
3712 TString bootstrapCumulantsVsMName =
"fBootstrapCumulantsVsM";
3714 for(
Int_t co=0;co<4;co++)
3717 Form(
"Bootstrap Cumulants Vs. M, %s",cumulantFlag[co].
Data()),
3743 TString mixedHarmonicsFlagsName =
"fMixedHarmonicsFlags";
3745 fMixedHarmonicsFlags =
new TProfile(mixedHarmonicsFlagsName.Data(),
"Flags for Mixed Harmonics",4,0,4);
3761 TString s2pCorrelationsName =
"f2pCorrelations";
3763 f2pCorrelations =
new TProfile(s2pCorrelationsName.Data(),Form(
"2-particle correlations (n = %d)",
fHarmonic),6,0,6,
"s");
3778 TString s3pCorrelationsName =
"f3pCorrelations";
3780 f3pCorrelations =
new TProfile(s3pCorrelationsName.Data(),Form(
"3-particle correlations (n = %d)",
fHarmonic),10,0,10,
"s");
3801 TString s4pCorrelationsName =
"f4pCorrelations";
3803 f4pCorrelations =
new TProfile(s4pCorrelationsName.Data(),Form(
"4-particle correlations (n = %d)",
fHarmonic),45,0,45,
"s");
3862 TString s5pCorrelationsName =
"f5pCorrelations";
3864 f5pCorrelations =
new TProfile(s5pCorrelationsName.Data(),Form(
"5-particle correlations (n = %d)",
fHarmonic),87,0,87,
"s");
3965 TString s6pCorrelationsName =
"f6pCorrelations";
3967 f6pCorrelations =
new TProfile(s6pCorrelationsName.Data(),Form(
"6-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
3976 TString s7pCorrelationsName =
"f7pCorrelations";
3978 f7pCorrelations =
new TProfile(s7pCorrelationsName.Data(),Form(
"7-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
3987 TString s8pCorrelationsName =
"f8pCorrelations";
3989 f8pCorrelations =
new TProfile(s8pCorrelationsName.Data(),Form(
"8-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
4034 TString mixedHarmonicEventWeightsName =
"fMixedHarmonicEventWeights";
4036 TString powerFlag[2] = {
"linear",
"quadratic"};
4037 for(
Int_t power=0;power<2;power++)
4039 fMixedHarmonicEventWeights[power] =
new TH1D(Form(
"%s: %s",mixedHarmonicEventWeightsName.Data(),powerFlag[power].Data()),Form(
"Sum of %s event weights for correlations",powerFlag[power].
Data()),8,0.,8.);
4053 }
else if (power == 1)
4068 TString mixedHarmonicProductOfEventWeightsName =
"fMixedHarmonicProductOfEventWeights";
4069 mixedHarmonicProductOfEventWeightsName +=
fAnalysisLabel->Data();
4074 for(
Int_t b=1;b<=8;b++)
4082 TString mixedHarmonicProductOfCorrelationsName =
"fMixedHarmonicProductOfCorrelations";
4083 mixedHarmonicProductOfCorrelationsName +=
fAnalysisLabel->Data();