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"
84 fBookOnlyBasicCCH(kTRUE),
86 fCommonHists2nd(NULL),
87 fCommonHists4th(NULL),
88 fCommonHists6th(NULL),
89 fCommonHists8th(NULL),
90 fCommonHistsResults2nd(NULL),
91 fCommonHistsResults4th(NULL),
92 fCommonHistsResults6th(NULL),
93 fCommonHistsResults8th(NULL),
106 fCommonConstants(NULL),
107 fFillMultipleControlHistograms(kFALSE),
109 fAnalysisLabel(NULL),
111 fUsePhiWeights(kFALSE),
112 fUsePtWeights(kFALSE),
113 fUseEtaWeights(kFALSE),
114 fUseTrackWeights(kFALSE),
115 fUsePhiEtaWeights(kFALSE),
116 fUsePhiEtaWeightsChDep(kFALSE),
117 fUsePhiEtaWeightsVtxDep(kFALSE),
118 fUsePhiEtaWeightsChPtDep(kFALSE),
119 fUseZDCESEMulWeights(kFALSE),
120 fUseZDCESESpecWeights(kFALSE),
121 fUseParticleWeights(NULL),
123 fMultiplicityWeight(NULL),
127 fIntFlowProfiles(NULL),
128 fIntFlowResults(NULL),
129 fIntFlowAllCorrelationsVsM(NULL),
131 fApplyCorrectionForNUA(kFALSE),
132 fApplyCorrectionForNUAVsM(kFALSE),
136 fPropagateErrorAlsoFromNIT(kFALSE),
137 fCalculateCumulantsVsM(kFALSE),
138 fCalculateAllCorrelationsVsM(kFALSE),
139 fMinimumBiasReferenceFlow(kTRUE),
140 fForgetAboutCovariances(kFALSE),
141 fStoreVarious(kFALSE),
143 fUse2DHistograms(kFALSE),
144 fFillProfilesVsMUsingWeights(kTRUE),
145 fUseQvectorTerms(kFALSE),
149 fIntFlowCorrelationsEBE(NULL),
150 fIntFlowEventWeightsForCorrelationsEBE(NULL),
151 fIntFlowCorrelationsAllEBE(NULL),
153 fNumberOfPOIsEBE(0.),
154 fReferenceMultiplicityEBE(0.),
156 fNewCentralityEBE(0.),
162 fCentralityCL1EBE(0.),
164 fCentralityTRKEBE(0.),
168 fAvMultiplicity(NULL),
169 fIntFlowCorrelationsPro(NULL),
170 fIntFlowSquaredCorrelationsPro(NULL),
171 fIntFlowCorrelationsAllPro(NULL),
172 fIntFlowExtraCorrelationsPro(NULL),
173 fIntFlowProductOfCorrelationsPro(NULL),
174 fIntFlowProductOfCorrectionTermsForNUAPro(NULL),
175 fIntFlowCorrelationsHist(NULL),
176 fIntFlowCorrelationsAllHist(NULL),
177 fIntFlowCovariances(NULL),
178 fIntFlowSumOfProductOfEventWeights(NULL),
179 fIntFlowCovariancesNUA(NULL),
180 fIntFlowSumOfProductOfEventWeightsNUA(NULL),
181 fIntFlowQcumulants(NULL),
182 fIntFlowQcumulantsRebinnedInM(NULL),
183 fIntFlowQcumulantsErrorSquaredRatio(NULL),
185 fIntFlowRebinnedInM(NULL),
186 fIntFlowDetectorBias(NULL),
189 fDiffFlowProfiles(NULL),
190 fDiffFlowResults(NULL),
192 fDiffFlowFlags(NULL),
193 fCalculateDiffFlow(kTRUE),
194 fCalculate2DDiffFlow(kFALSE),
195 fCalculateDiffFlowVsEta(kTRUE),
197 fOtherDiffCorrelatorsList(NULL),
199 fDistributionsList(NULL),
200 fDistributionsFlags(NULL),
201 fStoreDistributions(kFALSE),
202 fnBinsForCorrelations(10000),
204 fNestedLoopsList(NULL),
205 fEvaluateIntFlowNestedLoops(kFALSE),
206 fEvaluateDiffFlowNestedLoops(kFALSE),
207 fMaxAllowedMultiplicity(10),
208 fEvaluateNestedLoops(NULL),
209 fIntFlowDirectCorrelations(NULL),
210 fIntFlowExtraDirectCorrelations(NULL),
211 fCrossCheckInPtBinNo(10),
212 fCrossCheckInEtaBinNo(20),
213 fNoOfParticlesInBin(NULL),
214 fMixedHarmonicsNestedLoops(NULL),
216 fMixedHarmonicsList(NULL),
217 fMixedHarmonicsProfiles(NULL),
218 fMixedHarmonicsResults(NULL),
219 fMixedHarmonicsErrorPropagation(NULL),
220 fMixedHarmonicsFlags(NULL),
221 fCalculateMixedHarmonics(kFALSE),
222 fCalculateMixedHarmonicsVsM(kFALSE),
223 f2pCorrelations(NULL),
224 f3pCorrelations(NULL),
225 f4pCorrelations(NULL),
226 f5pCorrelations(NULL),
227 f6pCorrelations(NULL),
228 f7pCorrelations(NULL),
229 f8pCorrelations(NULL),
237 fMixedHarmonicProductOfEventWeights(NULL),
238 fMixedHarmonicProductOfCorrelations(NULL),
240 fControlHistogramsList(NULL),
241 fControlHistogramsFlags(NULL),
242 fStoreControlHistograms(kFALSE),
243 fCorrelationNoRPsVsRefMult(NULL),
244 fCorrelationNoPOIsVsRefMult(NULL),
245 fCorrelationNoRPsVsNoPOIs(NULL),
247 fBootstrapList(NULL),
248 fBootstrapProfilesList(NULL),
249 fBootstrapResultsList(NULL),
250 fBootstrapFlags(NULL),
251 fUseBootstrap(kFALSE),
252 fUseBootstrapVsM(kFALSE),
255 fBootstrapCorrelations(NULL),
256 fBootstrapCumulants(NULL),
261 fCalculateCRC(kTRUE),
262 fCalculateCRCPt(kFALSE),
263 fCalculateCME(kFALSE),
264 fCalculateCRCInt(kFALSE),
265 fCalculateCRC2(kFALSE),
266 fCalculateCRCVZ(kFALSE),
267 fCalculateCRCZDC(kFALSE),
268 fCalculateFlowQC(kFALSE),
269 fCalculateFlowZDC(kFALSE),
270 fCalculateFlowVZ(kFALSE),
271 fCalculateEbEFlow(kFALSE),
272 fStoreZDCQVecVtxPos(kFALSE),
273 fUsePhiEtaCuts(kFALSE),
276 fRecenterZDC(kFALSE),
278 fUseCRCRecenter(kFALSE),
288 fCorrWeightTPC(kUnit),
289 fCorrWeightVZ(kUnit),
290 fCorrWeightZDC(kUnit),
293 fCRCCenBinWidth(CenWidth),
294 fCRCIntRbRList(NULL),
297 fInteractionRate(kAll),
298 fSelectCharge(kAllCh),
299 fPOIExtraWeights(kNone),
301 fCRCQVecListTPC(NULL),
302 fCRCQVecWeightsList(NULL),
303 fCRCZDCCalibList(NULL),
304 fCRCVZEROCalibList(NULL),
305 fCRCZDCResList(NULL),
309 fCRCZDCRbRList(NULL),
316 fFlowSPZDCList(NULL),
321 fFlowQCDeltaEta(0.4),
327 fQAZDCCutsFlag(kTRUE),
330 fZDCGainAlpha(0.395),
331 fbFlagIsPosMagField(kFALSE)
336 fHistList =
new TList();
337 fHistList->SetName(
"cobjQC");
338 fHistList->SetOwner(kTRUE);
341 fTempList =
new TList();
342 fTempList->SetName(
"temp");
343 fTempList->SetOwner(kTRUE);
346 fMultiplicityWeight =
new TString(
"combinations");
349 fAnalysisLabel =
new TString();
352 this->InitializeArraysForIntFlow();
353 this->InitializeArraysForDiffFlow();
354 this->InitializeArraysForDistributions();
355 this->InitializeArraysForVarious();
356 this->InitializeArraysForNestedLoops();
357 this->InitializeArraysForMixedHarmonics();
358 this->InitializeArraysForControlHistograms();
359 this->InitializeArraysForBootstrap();
367 this->InitializeCostantsForCRC();
368 this->InitializeArraysForParticleWeights();
369 this->InitializeArraysForCRC();
370 this->InitializeArraysForCRCVZ();
371 this->InitializeArraysForCRCZDC();
372 this->InitializeArraysForCRC2();
373 this->InitializeArraysForQVec();
374 this->InitializeArraysForCRCPt();
375 this->InitializeArraysForCME();
376 this->InitializeArraysForFlowEbE();
377 this->InitializeArraysForFlowQC();
378 this->InitializeArraysForFlowQCHighOrders();
379 this->InitializeArraysForFlowSPZDC();
380 this->InitializeArraysForFlowSPVZ();
381 this->InitializeArraysForEbEFlow();
425 Bool_t oldHistAddStatus = TH1::AddDirectoryStatus();
426 TH1::AddDirectory(kFALSE);
479 TH1::AddDirectory(oldHistAddStatus);
520 Int_t nCounterNoRPs = 0;
557 if(fRunBin<0 || fRunBin>=
fCRCnRun) {
return;}
559 if(fCenBin<0 || fCenBin>=
fCRCnCen) {
return;}
663 if(QMC>0. && QMA>0. && sqrt(QCRe*QCRe+QCIm*QCIm)>1.E-6 && sqrt(QARe*QARe+QAIm*QAIm)>1.E-6) {
693 Bool_t bPassZDCcuts = kTRUE;
694 if( ZCM<=0. || ZAM<=0. || sqrt(ZCRe*ZCRe+ZCIm*ZCIm)<1.E-6 || sqrt(ZARe*ZARe+ZAIm*ZAIm)<1.E-6 ) bPassZDCcuts=kFALSE;
715 AliWarning(
"WARNING: POIExtraWeights (kEtaPhiRbR) not found ! \n");
719 for (
Int_t i=0; i<2; i++) {
723 AliWarning(
"WARNING: POIExtraWeights (kEtaPhiChRbR) not found ! \n");
728 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};
729 for (
Int_t i=0; i<40; i++) {
736 for(
Int_t i=0;i<nPrim;i++) {
746 dPhi = aftsTrack->
Phi();
747 dPt = aftsTrack->
Pt();
748 dEta = aftsTrack->
Eta();
749 dCharge = aftsTrack->
Charge();
754 cw = (dCharge > 0. ? 0 : 1);
767 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
774 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
779 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
785 Int_t ptbebe = (dPt>1.? 2 : (dPt>0.5 ? 1 : 0));
789 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
795 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
800 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
808 for(
Int_t m=0;m<12;m++)
810 for(
Int_t k=0;k<9;k++)
812 (*fReQ)(m,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1)*n*dPhi);
813 (*fImQ)(m,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1)*n*dPhi);
817 for(
Int_t p=0;p<8;p++)
819 for(
Int_t k=0;k<9;k++)
821 (*fSpk)(p,k)+=pow(wPhiEta*wPhi*wPt*wEta*wTrack,k);
830 for(
Int_t k=0;k<9;k++)
832 for(
Int_t m=0;m<4;m++)
838 fReRPQ1dEBE[0][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
839 fImRPQ1dEBE[0][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
842 fs1dEBE[0][pe][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
848 fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
849 fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
852 fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
861 for(
Int_t k=0;k<9;k++)
863 for(
Int_t m=0;m<4;m++)
869 fReRPQ1dEBE[2][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
870 fImRPQ1dEBE[2][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
873 fs1dEBE[2][pe][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
879 fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
880 fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
883 fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k),1.);
896 dPhi = aftsTrack->
Phi();
897 dPt = aftsTrack->
Pt();
898 dEta = aftsTrack->
Eta();
899 dCharge = aftsTrack->
Charge();
904 cw = (dCharge > 0. ? 0 : 1);
917 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
924 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
929 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
935 Int_t ptbebe = (dPt>1.? 2 : (dPt>0.5 ? 1 : 0));
939 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
945 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
950 if(std::isfinite(1./wt)) wPhiEta *= 1./wt;
956 if(dPhi>2.136283 && dPhi<2.324779)
continue;
962 for(
Int_t k=0;k<9;k++)
964 for(
Int_t m=0;m<4;m++)
970 fReRPQ1dEBE[1][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
971 fImRPQ1dEBE[1][pe][m][k]->Fill(ptEta[pe],pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
976 fReRPQ2dEBE[1][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
977 fImRPQ2dEBE[1][m][k]->Fill(dPt,dEta,pow(wPhiEta*wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
985 fCRCQRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
986 fCRCQIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
987 fCRCMult[cw][h]->Fill(dEta,wPhiEta);
989 fCRC2QRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
990 fCRC2QIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
991 fCRC2Mul[cw][h]->Fill(dEta,pow(wPhiEta,h));
993 fCRCZDCQRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
994 fCRCZDCQIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
998 fCRC2QRe[2][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
999 fCRC2QIm[2][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1000 fCRC2Mul[2][h]->Fill(dEta,pow(wPhiEta,h));
1004 fCRCZDCQRe[2][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1005 fCRCZDCQIm[2][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1008 fCRCZDCQRe[3][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1009 fCRCZDCQIm[3][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1017 if(weraw > 0.) SpecWeig = 1./weraw;
1019 fCMEQRe[cw][h]->Fill(dEta,SpecWeig*wPhiEta*TMath::Cos((h+1.)*dPhi));
1020 fCMEQIm[cw][h]->Fill(dEta,SpecWeig*wPhiEta*TMath::Sin((h+1.)*dPhi));
1021 fCMEMult[cw][h]->Fill(dEta,SpecWeig*wPhiEta);
1022 fCMEQRe[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.)*TMath::Cos((h+1.)*dPhi));
1023 fCMEQIm[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.)*TMath::Sin((h+1.)*dPhi));
1024 fCMEMult[2+cw][h]->Fill(dEta,pow(SpecWeig*wPhiEta,2.));
1040 fPOIPtDiffQRe[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1041 fPOIPtDiffQIm[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1044 fPOIPtDiffQReCh[cw][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1045 fPOIPtDiffQImCh[cw][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1048 fPOIPhiDiffQRe[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1049 fPOIPhiDiffQIm[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1053 Int_t keta = (dEta<0.?0:1);
1054 fPOIPtDiffQReEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1055 fPOIPtDiffQImEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1057 fPOIPhiDiffQReEG[keta][k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1058 fPOIPhiDiffQImEG[keta][k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1062 }
else if(fFlowQCDeltaEta<0. && fFlowQCDeltaEta>-1.) {
1065 fPOIPtDiffQRe[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1066 fPOIPtDiffQIm[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1069 fPOIPhiDiffQRe[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1070 fPOIPhiDiffQIm[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1075 if((dEta>0. && dEta<0.4-boundetagap/2.) || (dEta>0.4+boundetagap/2. && dEta<0.8)) {
1077 if(dEta>0. && dEta<0.4-boundetagap/2.) keta = 0;
1079 fPOIPtDiffQReEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1080 fPOIPtDiffQImEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1088 }
else if(fFlowQCDeltaEta<-1. && fFlowQCDeltaEta>-2.) {
1091 fPOIPtDiffQRe[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1092 fPOIPtDiffQIm[k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1095 fPOIPhiDiffQRe[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1096 fPOIPhiDiffQIm[k][h]->Fill(dPhi,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1101 if((dEta<0. && dEta>-0.4+boundetagap/2.) || (dEta<-0.4-boundetagap/2. && dEta>-0.8)) {
1103 if(dEta<0. && dEta>-0.4+boundetagap/2.) keta = 0;
1105 fPOIPtDiffQReEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Cos((h+1.)*dPhi));
1106 fPOIPtDiffQImEG[keta][k][h]->Fill(dPt,pow(wPhiEta,k)*TMath::Sin((h+1.)*dPhi));
1119 fEtaDiffQRe[cw][h]->Fill(dEta,wPhiEta*TMath::Cos((h+1.)*dPhi));
1120 fEtaDiffQIm[cw][h]->Fill(dEta,wPhiEta*TMath::Sin((h+1.)*dPhi));
1122 fPOIEtaPtQRe[cw][h]->Fill(dEta,dPt,wPhiEta*TMath::Cos((h+1.)*dPhi));
1123 fPOIEtaPtQIm[cw][h]->Fill(dEta,dPt,wPhiEta*TMath::Sin((h+1.)*dPhi));
1130 if(bFillDis && bPassZDCcuts) {
1169 Int_t ptbebe = (dPt>1.? 2 : (dPt>0.5 ? 1 : 0));
1171 for (
Int_t h=0;h<6;h++) {
1186 printf(
"\n WARNING (QC): No particle (i.e. aftsTrack is a NULL pointer in AFAWQC::Make())!!!!\n\n");
1193 for(
Int_t p=0;p<8;p++)
1195 for(
Int_t k=0;k<9;k++)
1197 (*fSpk)(p,k)=pow((*
fSpk)(p,k),p+1);
1626 cout<<
"Skipping the event because multiplicity is "<<nPrim<<
". Too high to evaluate nested loops!"<<endl;
1630 cout<<
"Skipping the event because multiplicity is "<<nPrim<<
"."<<endl;
1766 cosP1n = dReQ1n/dMult;
1784 cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1));
1785 cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1));
1809 cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n)
1810 / (dMult*(dMult-1)*(dMult-2));
1875 sinP1n = dImQ1n/dMult;
1892 sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1));
1893 sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1));
1917 sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n)
1918 / (dMult*(dMult-1)*(dMult-2));
1948 if(outputListHistos)
1953 printf(
"\n WARNING (QC): fHistList is NULL in AFAWQC::GOH() !!!!\n\n");
1981 printf(
"\n WARNING (QC): outputListHistos is NULL in AFAWQC::GOH() !!!!\n\n");
1993 Int_t nBinsPt = profilePtEta->GetNbinsX();
1994 Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin();
1995 Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax();
1997 Int_t nBinsEta = profilePtEta->GetNbinsY();
1999 TProfile *profilePt =
new TProfile(
"",
"",nBinsPt,dPtMin,dPtMax);
2001 for(
Int_t p=1;p<=nBinsPt;p++)
2009 for(
Int_t e=1;e<=nBinsEta;e++)
2011 contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))
2012 * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2013 entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2015 sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))
2016 * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.)
2017 + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.));
2018 sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2019 sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))
2020 * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)));
2022 if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.)
2024 spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5);
2026 profilePt->SetBinContent(p,contentPt);
2027 profilePt->SetBinEntries(p,entryPt);
2029 profilePt->SetBinError(p,spreadPt);
2046 Int_t nBinsEta = profilePtEta->GetNbinsY();
2047 Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin();
2048 Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax();
2050 Int_t nBinsPt = profilePtEta->GetNbinsX();
2052 TProfile *profileEta =
new TProfile(
"",
"",nBinsEta,dEtaMin,dEtaMax);
2054 for(
Int_t e=1;e<=nBinsEta;e++)
2058 for(
Int_t p=1;p<=nBinsPt;p++)
2060 contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))
2061 * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2062 entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
2064 profileEta->SetBinContent(e,contentEta);
2065 profileEta->SetBinEntries(e,entryEta);
2085 for(
Int_t b=0;b<4;b++)
2096 }
else if(type ==
"RP")
2106 }
else if(type ==
"POI")
2118 for(
Int_t b=0;b<4;b++)
2127 TString subtitle2 =
" (rebinned in M)";
2129 if(type !=
"RF, rebinned in M")
2133 subtitle.Append(type);
2134 subtitle.Append(
", without weights)");
2137 subtitle.Append(type);
2138 subtitle.Append(
", with weights)");
2144 subtitle.Append(
"RF");
2145 subtitle.Append(
", without weights)");
2148 subtitle.Append(
"RF");
2149 subtitle.Append(
", with weights)");
2154 cout<<
"*************************************"<<endl;
2155 cout<<
"*************************************"<<endl;
2156 cout<<title.Data()<<endl;
2157 cout<<subtitle.Data()<<endl;
2158 if(type ==
"RF, rebinned in M"){cout<<subtitle2.Data()<<endl;}
2161 for(
Int_t i=0;i<4;i++)
2163 cout<<
" v_"<<n<<
"{"<<2*(i+1)<<
"} = "<<dVn[i]<<
" +/- "<<dVnErr[i]<<endl;
2171 cout<<
" detector bias (corrected for): "<<endl;
2174 cout<<
" detector bias (not corrected for):"<<endl;
2180 if(type ==
"RF" || type ==
"RF, rebinned in M")
2184 else if (type ==
"RP")
2188 else if (type ==
"POI")
2193 cout<<
"*************************************"<<endl;
2194 cout<<
"*************************************"<<endl;
2204 TFile *output =
new TFile(outputFileName.Data(),
"RECREATE");
2220 outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey);
2233 TString commonHistsName =
"AliFlowCommonHistQC";
2241 TString commonHists2ndOrderName =
"AliFlowCommonHist2ndOrderQC";
2246 TString commonHists4thOrderName =
"AliFlowCommonHist4thOrderQC";
2251 TString commonHists6thOrderName =
"AliFlowCommonHist6thOrderQC";
2256 TString commonHists8thOrderName =
"AliFlowCommonHist8thOrderQC";
2264 TString commonHistResults2ndOrderName =
"AliFlowCommonHistResults2ndOrderQC";
2269 TString commonHistResults4thOrderName =
"AliFlowCommonHistResults4thOrderQC";
2274 TString commonHistResults6thOrderName =
"AliFlowCommonHistResults6thOrderQC";
2279 TString commonHistResults8thOrderName =
"AliFlowCommonHistResults8thOrderQC";
2294 printf(
"\n WARNING (QC): fWeightsList is NULL in AFAWQC::BAFWH() !!!! \n\n");
2298 TString fUseParticleWeightsName =
"fUseParticleWeightsQC";
2300 fUseParticleWeights =
new TProfile(fUseParticleWeightsName.Data(),
"0 = particle weight not used, 1 = particle weight used ",8,0,8);
2494 TF1 *CenFit =
new TF1(
"CenFit",
"pol0", 0., 100.);
2497 Double_t CenAv = CenFit->GetParameter(0);
2509 Double_t CenAv = CenFit->GetParameter(0);
2511 Double_t SemiCenAv = CenFit->GetParameter(0);
2537 TString sinCosFlag[2] = {
"sin",
"cos"};
2538 TString powerFlag[2] = {
"linear",
"quadratic"};
2541 TString intFlowFlagsName =
"fIntFlowFlags";
2543 fIntFlowFlags =
new TProfile(intFlowFlagsName.Data(),
"Flags for Integrated Flow",20,0.,20.);
2549 fIntFlowFlags->GetXaxis()->SetBinLabel(1,
"Particle Weights");
2551 fIntFlowFlags->GetXaxis()->SetBinLabel(3,
"Corrected for NUA?");
2552 fIntFlowFlags->GetXaxis()->SetBinLabel(4,
"Print RF results");
2553 fIntFlowFlags->GetXaxis()->SetBinLabel(5,
"Print RP results");
2554 fIntFlowFlags->GetXaxis()->SetBinLabel(6,
"Print POI results");
2555 fIntFlowFlags->GetXaxis()->SetBinLabel(7,
"Print RF (rebinned in M) results");
2556 fIntFlowFlags->GetXaxis()->SetBinLabel(8,
"Corrected for NUA vs M?");
2557 fIntFlowFlags->GetXaxis()->SetBinLabel(9,
"Propagate errors to v_{n} from correlations?");
2558 fIntFlowFlags->GetXaxis()->SetBinLabel(10,
"Calculate cumulants vs M");
2559 fIntFlowFlags->GetXaxis()->SetBinLabel(11,
"fMinimumBiasReferenceFlow");
2560 fIntFlowFlags->GetXaxis()->SetBinLabel(12,
"fForgetAboutCovariances");
2562 fIntFlowFlags->GetXaxis()->SetBinLabel(14,
"fFillMultipleControlHistograms");
2563 fIntFlowFlags->GetXaxis()->SetBinLabel(15,
"Calculate all correlations vs M");
2564 fIntFlowFlags->GetXaxis()->SetBinLabel(16,
"fMultiplicityIs");
2566 fIntFlowFlags->GetXaxis()->SetBinLabel(18,
"fUse2DHistograms");
2567 fIntFlowFlags->GetXaxis()->SetBinLabel(19,
"fFillProfilesVsMUsingWeights");
2568 fIntFlowFlags->GetXaxis()->SetBinLabel(20,
"fUseQvectorTerms");
2573 fReQ =
new TMatrixD(12,9);
2574 fImQ =
new TMatrixD(12,9);
2575 fSpk =
new TMatrixD(8,9);
2577 TString intFlowCorrelationsEBEName =
"fIntFlowCorrelationsEBE";
2581 TString intFlowEventWeightsForCorrelationsEBEName =
"fIntFlowEventWeightsForCorrelationsEBE";
2582 intFlowEventWeightsForCorrelationsEBEName +=
fAnalysisLabel->Data();
2585 TString intFlowCorrelationsAllEBEName =
"fIntFlowCorrelationsAllEBE";
2590 TString fIntFlowCorrectionTermsForNUAEBEName =
"fIntFlowCorrectionTermsForNUAEBE";
2592 for(
Int_t sc=0;sc<2;sc++)
2594 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);
2597 TString fIntFlowEventWeightForCorrectionTermsForNUAEBEName =
"fIntFlowEventWeightForCorrectionTermsForNUAEBE";
2598 fIntFlowEventWeightForCorrectionTermsForNUAEBEName +=
fAnalysisLabel->Data();
2599 for(
Int_t sc=0;sc<2;sc++)
2605 TString avMultiplicityName =
"fAvMultiplicity";
2607 fAvMultiplicity =
new TProfile(avMultiplicityName.Data(),
"Average multiplicities of reference particles (RPs)",9,0,9);
2624 TString correlationFlag[4] = {
"#LT#LT2#GT#GT",
"#LT#LT4#GT#GT",
"#LT#LT6#GT#GT",
"#LT#LT8#GT#GT"};
2625 TString intFlowCorrelationsProName =
"fIntFlowCorrelationsPro";
2627 fIntFlowCorrelationsPro =
new TProfile(intFlowCorrelationsProName.Data(),
"Average correlations for all events",4,0,4,
"s");
2633 for(
Int_t b=0;b<4;b++)
2639 TString squaredCorrelationFlag[4] = {
"#LT#LT2#GT^{2}#GT",
"#LT#LT4#GT^{2}#GT",
"#LT#LT6#GT^{2}#GT",
"#LT#LT8#GT^{2}#GT"};
2640 TString intFlowSquaredCorrelationsProName =
"fIntFlowSquaredCorrelationsPro";
2648 for(
Int_t b=0;b<4;b++)
2655 for(
Int_t ci=0;ci<4;ci++)
2658 TString intFlowCorrelationsVsMProName =
"fIntFlowCorrelationsVsMPro";
2660 fIntFlowCorrelationsVsMPro[ci] =
new TProfile(Form(
"%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()),
2661 Form(
"%s vs multiplicity",correlationFlag[ci].
Data()),
2677 TString intFlowSquaredCorrelationsVsMProName =
"fIntFlowSquaredCorrelationsVsMPro";
2680 Form(
"%s vs multiplicity",squaredCorrelationFlag[ci].
Data()),
2698 TString intFlowCorrelationsAllProName =
"fIntFlowCorrelationsAllPro";
2700 fIntFlowCorrelationsAllPro =
new TProfile(intFlowCorrelationsAllProName.Data(),
"Average all correlations for all events",64,0,64);
2806 fIntFlowCorrelationsAllVsMPro[30] =
new TProfile(
"eight1n1n1n1n1n1n1n1n",
"#LT#LT8#GT#GT_{n,n,n,n|n,n,n,n}",
fnBinsMult,
fMinMult,
fMaxMult);
2840 for(
Int_t n=0;n<63;n++)
2862 TString intFlowExtraCorrelationsProName =
"fIntFlowExtraCorrelationsPro";
2864 fIntFlowExtraCorrelationsPro =
new TProfile(intFlowExtraCorrelationsProName.Data(),
"Average extra correlations for all events",100,0,100,
"s");
2875 TString productFlag[6] = {
"#LT#LT2#GT#LT4#GT#GT",
"#LT#LT2#GT#LT6#GT#GT",
"#LT#LT2#GT#LT8#GT#GT",
2876 "#LT#LT4#GT#LT6#GT#GT",
"#LT#LT4#GT#LT8#GT#GT",
"#LT#LT6#GT#LT8#GT#GT"};
2877 TString intFlowProductOfCorrelationsProName =
"fIntFlowProductOfCorrelationsPro";
2884 for(
Int_t b=0;b<6;b++)
2893 TString intFlowProductOfCorrelationsVsMProName =
"fIntFlowProductOfCorrelationsVsMPro";
2894 intFlowProductOfCorrelationsVsMProName +=
fAnalysisLabel->Data();
2898 Form(
"%s versus multiplicity",productFlag[
pi].
Data()),
2914 TString intFlowProductOfCorrectionTermsForNUAProName =
"fIntFlowProductOfCorrectionTermsForNUAPro";
2915 intFlowProductOfCorrectionTermsForNUAProName +=
fAnalysisLabel->Data();
2950 for(
Int_t sc=0;sc<2;sc++)
2952 TString intFlowCorrectionTermsForNUAProName =
"fIntFlowCorrectionTermsForNUAPro";
2954 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");
2967 TString correctionTermFlag[4] = {
"(n(phi1))",
"(n(phi1+phi2))",
"(n(phi1-phi2-phi3))",
"(n(2phi1-phi2))"};
2968 for(
Int_t ci=0;ci<4;ci++)
2970 TString intFlowCorrectionTermsForNUAVsMProName =
"fIntFlowCorrectionTermsForNUAVsMPro";
2971 intFlowCorrectionTermsForNUAVsMProName +=
fAnalysisLabel->Data();
2972 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");
2980 TString intFlowCorrelationsHistName =
"fIntFlowCorrelationsHist";
2995 for(
Int_t ci=0;ci<4;ci++)
2997 TString intFlowCorrelationsVsMHistName =
"fIntFlowCorrelationsVsMHist";
3000 Form(
"%s vs multiplicity",correlationFlag[ci].
Data()),
3017 TString intFlowCorrelationsAllHistName =
"fIntFlowCorrelationsAllHist";
3058 for(
Int_t sc=0;sc<2;sc++)
3060 TString intFlowCorrectionTermsForNUAHistName =
"fIntFlowCorrectionTermsForNUAHist";
3062 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);
3074 TString intFlowCovariancesName =
"fIntFlowCovariances";
3076 fIntFlowCovariances =
new TH1D(intFlowCovariancesName.Data(),
"Covariances (multiplied with weight dependent prefactor)",6,0,6);
3087 TString intFlowSumOfEventWeightsName =
"fIntFlowSumOfEventWeights";
3089 for(
Int_t power=0;power<2;power++)
3091 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);
3100 }
else if (power == 1)
3110 TString intFlowSumOfProductOfEventWeightsName =
"fIntFlowSumOfProductOfEventWeights";
3126 TString intFlowCovariancesVsMName =
"fIntFlowCovariancesVsM";
3128 TString covarianceFlag[6] = {
"Cov(<2>,<4>)",
"Cov(<2>,<6>)",
"Cov(<2>,<8>)",
"Cov(<4>,<6>)",
"Cov(<4>,<8>)",
"Cov(<6>,<8>)"};
3129 for(
Int_t ci=0;ci<6;ci++)
3132 Form(
"%s vs multiplicity",covarianceFlag[ci].
Data()),
3152 TString intFlowSumOfEventWeightsVsMName =
"fIntFlowSumOfEventWeightsVsM";
3154 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>}"},
3155 {
"#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}"}};
3156 for(
Int_t si=0;si<4;si++)
3158 for(
Int_t power=0;power<2;power++)
3161 Form(
"%s vs multiplicity",sumFlag[power][si].
Data()),
3183 TString intFlowSumOfProductOfEventWeightsVsMName =
"fIntFlowSumOfProductOfEventWeightsVsM";
3184 intFlowSumOfProductOfEventWeightsVsMName +=
fAnalysisLabel->Data();
3185 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>}",
3186 "#sum_{i=1}^{N} w_{<4>} w_{<6>}",
"#sum_{i=1}^{N} w_{<4>} w_{<8>}",
"#sum_{i=1}^{N} w_{<6>} w_{<8>}"};
3190 Form(
"%s versus multiplicity",sopowFlag[
pi].
Data()),
3207 TString intFlowCovariancesNUAName =
"fIntFlowCovariancesNUA";
3209 fIntFlowCovariancesNUA =
new TH1D(intFlowCovariancesNUAName.Data(),
"Covariances for NUA (multiplied with weight dependent prefactor)",27,0,27);
3228 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(16,
"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
3229 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(17,
"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
3232 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(20,
"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
3233 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(21,
"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
3234 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(22,
"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)");
3235 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(23,
"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
3236 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(24,
"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
3237 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(25,
"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
3238 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(26,
"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
3239 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(27,
"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)");
3242 TString intFlowSumOfEventWeightsNUAName =
"fIntFlowSumOfEventWeightsNUA";
3244 for(
Int_t sc=0;sc<2;sc++)
3246 for(
Int_t power=0;power<2;power++)
3248 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);
3257 }
else if(power == 1)
3261 (
fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form(
"#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}^{2}",sinCosFlag[sc].
Data()));
3268 TString intFlowSumOfProductOfEventWeightsNUAName =
"fIntFlowSumOfProductOfEventWeightsNUA";
3269 intFlowSumOfProductOfEventWeightsNUAName +=
fAnalysisLabel->Data();
3302 TString cumulantFlag[4] = {
"QC{2}",
"QC{4}",
"QC{6}",
"QC{8}"};
3303 TString intFlowQcumulantsName =
"fIntFlowQcumulants";
3308 fIntFlowQcumulants->SetTitle(
"Reference Q-cumulants (error from non-isotropic terms also propagated)");
3312 for(
Int_t b=0;b<4;b++)
3320 TString intFlowQcumulantsRebinnedInMName =
"fIntFlowQcumulantsRebinnedInM";
3325 for(
Int_t b=0;b<4;b++)
3332 TString intFlowQcumulantsErrorSquaredRatioName =
"fIntFlowQcumulantsErrorSquaredRatio";
3333 intFlowQcumulantsErrorSquaredRatioName +=
fAnalysisLabel->Data();
3337 for(
Int_t b=0;b<4;b++)
3345 TString intFlowQcumulantsVsMName =
"fIntFlowQcumulantsVsM";
3347 for(
Int_t co=0;co<4;co++)
3350 Form(
"%s vs multiplicity",cumulantFlag[co].
Data()),
3367 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)};
3368 TString intFlowName =
"fIntFlow";
3371 fIntFlow =
new TH1D(intFlowName.Data(),
"Reference flow estimates from Q-cumulants",4,0,4);
3374 for(
Int_t b=0;b<4;b++)
3376 (
fIntFlow->GetXaxis())->SetBinLabel(b+1,flowFlag[b].
Data());
3382 TString intFlowRebinnedInMName =
"fIntFlowRebinnedInM";
3384 fIntFlowRebinnedInM =
new TH1D(intFlowRebinnedInMName.Data(),
"Reference flow estimates from Q-cumulants (rebinned in M)",4,0,4);
3387 for(
Int_t b=0;b<4;b++)
3396 TString intFlowVsMName =
"fIntFlowVsM";
3398 for(
Int_t co=0;co<4;co++)
3400 fIntFlowVsM[co] =
new TH1D(Form(
"%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()),
3401 Form(
"%s vs multiplicity",flowFlag[co].
Data()),
3408 fIntFlowVsM[co]->GetXaxis()->SetTitle(
"Reference multiplicity (from ESD)");
3418 TString intFlowDetectorBiasName =
"fIntFlowDetectorBias";
3423 for(
Int_t ci=0;ci<4;ci++)
3425 (
fIntFlowDetectorBias->GetXaxis())->SetBinLabel(ci+1,Form(
"#frac{corrected}{measured} %s",cumulantFlag[ci].
Data()));
3431 TString intFlowDetectorBiasVsMName =
"fIntFlowDetectorBiasVsM";
3433 for(
Int_t ci=0;ci<4;ci++)
3436 Form(
"Quantifying detector bias for %s vs multiplicity",cumulantFlag[ci].
Data()),
3465 TString controlHistogramsFlagsName =
"fControlHistogramsFlags";
3467 fControlHistogramsFlags =
new TProfile(controlHistogramsFlagsName.Data(),
"Flags for Control Histograms",2,0,2);
3481 TString sCorrelationNoRPsVsRefMultName =
"fCorrelationNoRPsVsRefMult";
3492 TString sCorrelationNoPOIsVsRefMultName =
"fCorrelationNoPOIsVsRefMult";
3503 TString sCorrelationNoRPsVsNoPOIsName =
"fCorrelationNoRPsVsNoPOIs";
3514 TString sCorrelation[4] = {
"#LT2#GT",
"#LT4#GT",
"#LT6#GT",
"#LT8#GT"};
3518 sMultiplicity =
"# RPs";
3521 sMultiplicity =
"Reference multiplicity (from ESD)";
3524 sMultiplicity =
"# POIs";
3526 for(
Int_t ci=0;ci<4;ci++)
3538 TString sCorrelationProduct[1] = {
"#LT2#GT#LT4#GT"};
3539 for(
Int_t cpi=0;cpi<1;cpi++)
3553 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}}"};
3554 for(
Int_t qvti=0;qvti<4;qvti++)
3581 TString bootstrapFlagsName =
"fBootstrapFlags";
3583 fBootstrapFlags =
new TProfile(bootstrapFlagsName.Data(),
"Flags for bootstrap",3,0,3);
3595 TString correlationFlag[4] = {
"#LT#LT2#GT#GT",
"#LT#LT4#GT#GT",
"#LT#LT6#GT#GT",
"#LT#LT8#GT#GT"};
3596 TString cumulantFlag[4] = {
"QC{2}",
"QC{4}",
"QC{6}",
"QC{8}"};
3600 TString bootstrapCorrelationsName =
"fBootstrapCorrelations";
3604 for(
Int_t ci=0;ci<4;ci++)
3614 TString bootstrapCumulantsName =
"fBootstrapCumulants";
3618 for(
Int_t co=0;co<4;co++)
3633 sMultiplicity =
"# RPs";
3636 sMultiplicity =
"Reference multiplicity (from ESD)";
3639 sMultiplicity =
"# POIs";
3644 TString bootstrapCorrelationsVsMName =
"fBootstrapCorrelationsVsM";
3646 for(
Int_t ci=0;ci<4;ci++)
3648 fBootstrapCorrelationsVsM[ci] =
new TProfile2D(Form(
"%s, %s",bootstrapCorrelationsVsMName.Data(),correlationFlag[ci].Data()),
3649 Form(
"Bootstrap Correlations Vs. M, %s",correlationFlag[ci].
Data()),
3660 TString bootstrapCumulantsVsMName =
"fBootstrapCumulantsVsM";
3662 for(
Int_t co=0;co<4;co++)
3665 Form(
"Bootstrap Cumulants Vs. M, %s",cumulantFlag[co].
Data()),
3691 TString mixedHarmonicsFlagsName =
"fMixedHarmonicsFlags";
3693 fMixedHarmonicsFlags =
new TProfile(mixedHarmonicsFlagsName.Data(),
"Flags for Mixed Harmonics",4,0,4);
3709 TString s2pCorrelationsName =
"f2pCorrelations";
3711 f2pCorrelations =
new TProfile(s2pCorrelationsName.Data(),Form(
"2-particle correlations (n = %d)",
fHarmonic),6,0,6,
"s");
3726 TString s3pCorrelationsName =
"f3pCorrelations";
3728 f3pCorrelations =
new TProfile(s3pCorrelationsName.Data(),Form(
"3-particle correlations (n = %d)",
fHarmonic),10,0,10,
"s");
3749 TString s4pCorrelationsName =
"f4pCorrelations";
3751 f4pCorrelations =
new TProfile(s4pCorrelationsName.Data(),Form(
"4-particle correlations (n = %d)",
fHarmonic),45,0,45,
"s");
3810 TString s5pCorrelationsName =
"f5pCorrelations";
3812 f5pCorrelations =
new TProfile(s5pCorrelationsName.Data(),Form(
"5-particle correlations (n = %d)",
fHarmonic),87,0,87,
"s");
3913 TString s6pCorrelationsName =
"f6pCorrelations";
3915 f6pCorrelations =
new TProfile(s6pCorrelationsName.Data(),Form(
"6-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
3924 TString s7pCorrelationsName =
"f7pCorrelations";
3926 f7pCorrelations =
new TProfile(s7pCorrelationsName.Data(),Form(
"7-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
3935 TString s8pCorrelationsName =
"f8pCorrelations";
3937 f8pCorrelations =
new TProfile(s8pCorrelationsName.Data(),Form(
"8-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
3982 TString mixedHarmonicEventWeightsName =
"fMixedHarmonicEventWeights";
3984 TString powerFlag[2] = {
"linear",
"quadratic"};
3985 for(
Int_t power=0;power<2;power++)
3987 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.);
4001 }
else if (power == 1)
4016 TString mixedHarmonicProductOfEventWeightsName =
"fMixedHarmonicProductOfEventWeights";
4017 mixedHarmonicProductOfEventWeightsName +=
fAnalysisLabel->Data();
4022 for(
Int_t b=1;b<=8;b++)
4030 TString mixedHarmonicProductOfCorrelationsName =
"fMixedHarmonicProductOfCorrelations";
4031 mixedHarmonicProductOfCorrelationsName +=
fAnalysisLabel->Data();