23 #define AliFlowAnalysisWithQCumulants_cxx 25 #include "Riostream.h" 34 #include "TParticle.h" 38 #include "TProfile2D.h" 41 #include "TPaveLabel.h" 76 fBookOnlyBasicCCH(kTRUE),
78 fCommonHists2nd(NULL),
79 fCommonHists4th(NULL),
80 fCommonHists6th(NULL),
81 fCommonHists8th(NULL),
82 fCommonHistsResults2nd(NULL),
83 fCommonHistsResults4th(NULL),
84 fCommonHistsResults6th(NULL),
85 fCommonHistsResults8th(NULL),
98 fCommonConstants(NULL),
99 fFillMultipleControlHistograms(kFALSE),
101 fAnalysisLabel(NULL),
102 fMaxCommonResultsHistogram(8),
105 fUsePhiWeights(kFALSE),
106 fUsePtWeights(kFALSE),
107 fUseEtaWeights(kFALSE),
108 fUseTrackWeights(kFALSE),
109 fUseParticleWeights(NULL),
114 fMultiplicityWeight(NULL),
118 fIntFlowProfiles(NULL),
119 fIntFlowResults(NULL),
120 fIntFlowAllCorrelationsVsM(NULL),
122 fApplyCorrectionForNUA(kFALSE),
123 fApplyCorrectionForNUAVsM(kFALSE),
127 fPropagateErrorAlsoFromNIT(kFALSE),
128 fCalculateCumulantsVsM(kFALSE),
129 fCalculateAllCorrelationsVsM(kFALSE),
130 fMinimumBiasReferenceFlow(kTRUE),
131 fForgetAboutCovariances(kFALSE),
132 fStorePhiDistributionForOneEvent(kFALSE),
134 fUse2DHistograms(kFALSE),
135 fFillProfilesVsMUsingWeights(kTRUE),
136 fUseQvectorTerms(kFALSE),
140 fIntFlowCorrelationsEBE(NULL),
141 fIntFlowEventWeightsForCorrelationsEBE(NULL),
142 fIntFlowCorrelationsAllEBE(NULL),
144 fNumberOfPOIsEBE(0.),
145 fReferenceMultiplicityEBE(0.),
146 fAvMultiplicity(NULL),
147 fIntFlowCorrelationsPro(NULL),
148 fIntFlowSquaredCorrelationsPro(NULL),
149 fIntFlowCorrelationsAllPro(NULL),
150 fIntFlowExtraCorrelationsPro(NULL),
151 fIntFlowProductOfCorrelationsPro(NULL),
152 fIntFlowProductOfCorrectionTermsForNUAPro(NULL),
153 fIntFlowCorrelationsHist(NULL),
154 fIntFlowCorrelationsAllHist(NULL),
155 fIntFlowCovariances(NULL),
156 fIntFlowSumOfProductOfEventWeights(NULL),
157 fIntFlowCovariancesNUA(NULL),
158 fIntFlowSumOfProductOfEventWeightsNUA(NULL),
159 fIntFlowQcumulants(NULL),
160 fIntFlowQcumulantsRebinnedInM(NULL),
161 fIntFlowQcumulantsErrorSquaredRatio(NULL),
163 fIntFlowRebinnedInM(NULL),
164 fIntFlowDetectorBias(NULL),
167 fDiffFlowProfiles(NULL),
168 fDiffFlowResults(NULL),
170 fDiffFlowFlags(NULL),
171 fCalculateDiffFlow(kTRUE),
172 fCalculate2DDiffFlow(kFALSE),
173 fCalculateDiffFlowVsEta(kTRUE),
175 fOtherDiffCorrelatorsList(NULL),
177 fDistributionsList(NULL),
178 fDistributionsFlags(NULL),
179 fStoreDistributions(kFALSE),
180 fnBinsForCorrelations(10000),
183 fPhiDistributionForOneEvent(NULL),
185 fNestedLoopsList(NULL),
186 fEvaluateIntFlowNestedLoops(kFALSE),
187 fEvaluateDiffFlowNestedLoops(kFALSE),
188 fMaxAllowedMultiplicity(10),
189 fEvaluateNestedLoops(NULL),
190 fIntFlowDirectCorrelations(NULL),
191 fIntFlowExtraDirectCorrelations(NULL),
192 fCrossCheckInPtBinNo(10),
193 fCrossCheckInEtaBinNo(20),
194 fNoOfParticlesInBin(NULL),
195 fMixedHarmonicsNestedLoops(NULL),
197 fMixedHarmonicsList(NULL),
198 fMixedHarmonicsProfiles(NULL),
199 fMixedHarmonicsResults(NULL),
200 fMixedHarmonicsErrorPropagation(NULL),
201 fMixedHarmonicsFlags(NULL),
202 fCalculateMixedHarmonics(kFALSE),
203 fCalculateMixedHarmonicsVsM(kFALSE),
204 f2pCorrelations(NULL),
205 f3pCorrelations(NULL),
206 f4pCorrelations(NULL),
207 f5pCorrelations(NULL),
208 f6pCorrelations(NULL),
209 f7pCorrelations(NULL),
210 f8pCorrelations(NULL),
218 fMixedHarmonicProductOfEventWeights(NULL),
219 fMixedHarmonicProductOfCorrelations(NULL),
221 fControlHistogramsList(NULL),
222 fControlHistogramsFlags(NULL),
223 fStoreControlHistograms(kFALSE),
224 fCorrelationNoRPsVsRefMult(NULL),
225 fCorrelationNoPOIsVsRefMult(NULL),
226 fCorrelationNoRPsVsNoPOIs(NULL),
228 fBootstrapList(NULL),
229 fBootstrapProfilesList(NULL),
230 fBootstrapResultsList(NULL),
231 fBootstrapFlags(NULL),
232 fUseBootstrap(kFALSE),
233 fUseBootstrapVsM(kFALSE),
236 fBootstrapCorrelations(NULL),
237 fBootstrapCumulants(NULL)
242 fHistList =
new TList();
243 fHistList->SetName(
"cobjQC");
244 fHistList->SetOwner(kTRUE);
247 fWeightsList =
new TList();
250 fMultiplicityWeight =
new TString(
"combinations");
253 fAnalysisLabel =
new TString();
256 this->InitializeArraysForIntFlow();
257 this->InitializeArraysForDiffFlow();
258 this->InitializeArraysForDistributions();
259 this->InitializeArraysForVarious();
260 this->InitializeArraysForNestedLoops();
261 this->InitializeArraysForMixedHarmonics();
262 this->InitializeArraysForControlHistograms();
263 this->InitializeArraysForBootstrap();
294 Bool_t oldHistAddStatus = TH1::AddDirectoryStatus();
295 TH1::AddDirectory(kFALSE);
329 TH1::AddDirectory(oldHistAddStatus);
365 Int_t nCounterNoRPs = 0;
382 for(
Int_t i=0;i<nPrim;i++)
392 dPhi = aftsTrack->
Phi();
393 dPt = aftsTrack->
Pt();
394 dEta = aftsTrack->
Eta();
410 wTrack = aftsTrack->
Weight();
413 for(
Int_t m=0;m<12;m++)
415 for(
Int_t k=0;k<9;k++)
417 (*fReQ)(m,k)+=pow(wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1)*n*dPhi);
418 (*fImQ)(m,k)+=pow(wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1)*n*dPhi);
422 for(
Int_t p=0;p<8;p++)
424 for(
Int_t k=0;k<9;k++)
426 (*fSpk)(p,k)+=pow(wPhi*wPt*wEta*wTrack,k);
435 for(
Int_t k=0;k<9;k++)
437 for(
Int_t m=0;m<4;m++)
443 fReRPQ1dEBE[0][pe][m][k]->Fill(ptEta[pe],pow(wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
444 fImRPQ1dEBE[0][pe][m][k]->Fill(ptEta[pe],pow(wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
447 fs1dEBE[0][pe][k]->Fill(ptEta[pe],pow(wPhi*wPt*wEta*wTrack,k),1.);
453 fReRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
454 fImRPQ2dEBE[0][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
457 fs2dEBE[0][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta*wTrack,k),1.);
466 for(
Int_t k=0;k<9;k++)
468 for(
Int_t m=0;m<4;m++)
474 fReRPQ1dEBE[2][pe][m][k]->Fill(ptEta[pe],pow(wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
475 fImRPQ1dEBE[2][pe][m][k]->Fill(ptEta[pe],pow(wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
478 fs1dEBE[2][pe][k]->Fill(ptEta[pe],pow(wPhi*wPt*wEta*wTrack,k),1.);
484 fReRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
485 fImRPQ2dEBE[2][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
488 fs2dEBE[2][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta*wTrack,k),1.);
498 dPhi = aftsTrack->
Phi();
499 dPt = aftsTrack->
Pt();
500 dEta = aftsTrack->
Eta();
520 wTrack = aftsTrack->
Weight();
525 for(
Int_t k=0;k<9;k++)
527 for(
Int_t m=0;m<4;m++)
533 fReRPQ1dEBE[1][pe][m][k]->Fill(ptEta[pe],pow(wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
534 fImRPQ1dEBE[1][pe][m][k]->Fill(ptEta[pe],pow(wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
539 fReRPQ2dEBE[1][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta*wTrack,k)*TMath::Cos((m+1.)*n*dPhi),1.);
540 fImRPQ2dEBE[1][m][k]->Fill(dPt,dEta,pow(wPhi*wPt*wEta*wTrack,k)*TMath::Sin((m+1.)*n*dPhi),1.);
547 printf(
"\n WARNING (QC): No particle (i.e. aftsTrack is a NULL pointer in AFAWQC::Make())!!!!\n\n");
552 for(
Int_t p=0;p<8;p++)
554 for(
Int_t k=0;k<9;k++)
556 (*fSpk)(p,k)=pow((*
fSpk)(p,k),p+1);
931 cout<<
"Skipping the event because multiplicity is "<<nPrim<<
". Too high to evaluate nested loops!"<<endl;
935 cout<<
"Skipping the event because multiplicity is "<<nPrim<<
"."<<endl;
1071 cosP1n = dReQ1n/dMult;
1089 cosP1nP1n = (pow(dReQ1n,2)-pow(dImQ1n,2)-dReQ2n)/(dMult*(dMult-1));
1090 cosP2nM1n = (dReQ2n*dReQ1n+dImQ2n*dImQ1n-dReQ1n)/(dMult*(dMult-1));
1114 cosP1nM1nM1n = (dReQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))-dReQ1n*dReQ2n-dImQ1n*dImQ2n-2.*(dMult-1)*dReQ1n)
1115 / (dMult*(dMult-1)*(dMult-2));
1180 sinP1n = dImQ1n/dMult;
1197 sinP1nP1n = (2.*dReQ1n*dImQ1n-dImQ2n)/(dMult*(dMult-1));
1198 sinP2nM1n = (dImQ2n*dReQ1n-dReQ2n*dImQ1n-dImQ1n)/(dMult*(dMult-1));
1222 sinP1nM1nM1n = (-dImQ1n*(pow(dReQ1n,2)+pow(dImQ1n,2))+dReQ1n*dImQ2n-dImQ1n*dReQ2n+2.*(dMult-1)*dImQ1n)
1223 / (dMult*(dMult-1)*(dMult-2));
1252 if(outputListHistos)
1257 printf(
"\n WARNING (QC): fHistList is NULL in AFAWQC::GOH() !!!!\n\n");
1272 printf(
"\n WARNING (QC): outputListHistos is NULL in AFAWQC::GOH() !!!!\n\n");
1284 Int_t nBinsPt = profilePtEta->GetNbinsX();
1285 Double_t dPtMin = (profilePtEta->GetXaxis())->GetXmin();
1286 Double_t dPtMax = (profilePtEta->GetXaxis())->GetXmax();
1288 Int_t nBinsEta = profilePtEta->GetNbinsY();
1290 TProfile *profilePt =
new TProfile(
"",
"",nBinsPt,dPtMin,dPtMax);
1292 for(
Int_t p=1;p<=nBinsPt;p++)
1300 for(
Int_t e=1;e<=nBinsEta;e++)
1302 contentPt += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))
1303 * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1304 entryPt += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1306 sum1 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))
1307 * (pow(profilePtEta->GetBinError(profilePtEta->GetBin(p,e)),2.)
1308 + pow(profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)),2.));
1309 sum2 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1310 sum3 += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)))
1311 * (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)));
1313 if(sum2>0. && sum1/sum2-pow(sum3/sum2,2.) > 0.)
1315 spreadPt = pow(sum1/sum2-pow(sum3/sum2,2.),0.5);
1317 profilePt->SetBinContent(p,contentPt);
1318 profilePt->SetBinEntries(p,entryPt);
1320 profilePt->SetBinError(p,spreadPt);
1337 Int_t nBinsEta = profilePtEta->GetNbinsY();
1338 Double_t dEtaMin = (profilePtEta->GetYaxis())->GetXmin();
1339 Double_t dEtaMax = (profilePtEta->GetYaxis())->GetXmax();
1341 Int_t nBinsPt = profilePtEta->GetNbinsX();
1343 TProfile *profileEta =
new TProfile(
"",
"",nBinsEta,dEtaMin,dEtaMax);
1345 for(
Int_t e=1;e<=nBinsEta;e++)
1349 for(
Int_t p=1;p<=nBinsPt;p++)
1351 contentEta += (profilePtEta->GetBinContent(profilePtEta->GetBin(p,e)))
1352 * (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1353 entryEta += (profilePtEta->GetBinEntries(profilePtEta->GetBin(p,e)));
1355 profileEta->SetBinContent(e,contentEta);
1356 profileEta->SetBinEntries(e,entryEta);
1376 for(
Int_t b=0;b<4;b++)
1399 }
else if(type ==
"RP")
1421 }
else if(type ==
"POI")
1445 for(
Int_t b=0;b<4;b++)
1454 TString subtitle2 =
" (rebinned in M)";
1456 if(type !=
"RF, rebinned in M")
1460 subtitle.Append(type);
1461 subtitle.Append(
", without weights)");
1464 subtitle.Append(type);
1465 subtitle.Append(
", with weights)");
1471 subtitle.Append(
"RF");
1472 subtitle.Append(
", without weights)");
1475 subtitle.Append(
"RF");
1476 subtitle.Append(
", with weights)");
1481 cout<<
"*************************************"<<endl;
1482 cout<<
"*************************************"<<endl;
1483 cout<<title.Data()<<endl;
1484 cout<<subtitle.Data()<<endl;
1485 if(type ==
"RF, rebinned in M"){cout<<subtitle2.Data()<<endl;}
1488 for(
Int_t i=0;i<4;i++)
1490 cout<<
" v_"<<n<<
"{"<<2*(i+1)<<
"} = "<<dVn[i]<<
" +/- "<<dVnErr[i]<<endl;
1498 cout<<
" detector bias (corrected for): "<<endl;
1501 cout<<
" detector bias (not corrected for):"<<endl;
1507 if(type ==
"RF" || type ==
"RF, rebinned in M")
1511 else if (type ==
"RP")
1515 else if (type ==
"POI")
1520 cout<<
"*************************************"<<endl;
1521 cout<<
"*************************************"<<endl;
1531 TFile *output =
new TFile(outputFileName.Data(),
"RECREATE");
1547 outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey);
1560 TString commonHistsName =
"AliFlowCommonHistQC";
1568 TString commonHists2ndOrderName =
"AliFlowCommonHist2ndOrderQC";
1573 TString commonHists4thOrderName =
"AliFlowCommonHist4thOrderQC";
1578 TString commonHists6thOrderName =
"AliFlowCommonHist6thOrderQC";
1583 TString commonHists8thOrderName =
"AliFlowCommonHist8thOrderQC";
1593 TString commonHistResults2ndOrderName =
"AliFlowCommonHistResults2ndOrderQC";
1601 TString commonHistResults4thOrderName =
"AliFlowCommonHistResults4thOrderQC";
1609 TString commonHistResults6thOrderName =
"AliFlowCommonHistResults6thOrderQC";
1617 TString commonHistResults8thOrderName =
"AliFlowCommonHistResults8thOrderQC";
1633 printf(
"\n WARNING (QC): fWeightsList is NULL in AFAWQC::BAFWH() !!!! \n\n");
1637 TString fUseParticleWeightsName =
"fUseParticleWeightsQC";
1639 fUseParticleWeights =
new TProfile(fUseParticleWeightsName.Data(),
"0 = particle weight not used, 1 = particle weight used ",4,0,4);
1659 printf(
"\n WARNING (QC): fPhiWeights is NULL in AFAWQC::BAFWH() !!!!\n\n");
1665 cout<<
"WARNING (QC): Inconsistent binning in histograms for phi-weights throughout the code."<<endl;
1671 cout<<
"WARNING: fWeightsList->FindObject(\"phi_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
1683 printf(
"\n WARNING (QC): fPtWeights is NULL in AFAWQC::BAFWH() !!!!\n\n");
1689 cout<<
"WARNING (QC): Inconsistent binning in histograms for pt-weights throughout the code."<<endl;
1695 cout<<
"WARNING: fWeightsList->FindObject(\"pt_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
1707 printf(
"\n WARNING (QC): fEtaWeights is NULL in AFAWQC::BAFWH() !!!!\n\n");
1713 cout<<
"WARNING (QC): Inconsistent binning in histograms for eta-weights throughout the code."<<endl;
1719 cout<<
"WARNING: fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in AFAWQC::BAFWH() !!!!"<<endl;
1736 TString sinCosFlag[2] = {
"sin",
"cos"};
1737 TString powerFlag[2] = {
"linear",
"quadratic"};
1740 TString intFlowFlagsName =
"fIntFlowFlags";
1742 fIntFlowFlags =
new TProfile(intFlowFlagsName.Data(),
"Flags for Integrated Flow",21,0.,21.);
1748 fIntFlowFlags->GetXaxis()->SetBinLabel(1,
"Particle Weights");
1750 fIntFlowFlags->GetXaxis()->SetBinLabel(3,
"Corrected for NUA?");
1751 fIntFlowFlags->GetXaxis()->SetBinLabel(4,
"Print RF results");
1752 fIntFlowFlags->GetXaxis()->SetBinLabel(5,
"Print RP results");
1753 fIntFlowFlags->GetXaxis()->SetBinLabel(6,
"Print POI results");
1754 fIntFlowFlags->GetXaxis()->SetBinLabel(7,
"Print RF (rebinned in M) results");
1755 fIntFlowFlags->GetXaxis()->SetBinLabel(8,
"Corrected for NUA vs M?");
1756 fIntFlowFlags->GetXaxis()->SetBinLabel(9,
"Propagate errors to v_{n} from correlations?");
1757 fIntFlowFlags->GetXaxis()->SetBinLabel(10,
"Calculate cumulants vs M");
1758 fIntFlowFlags->GetXaxis()->SetBinLabel(11,
"fMinimumBiasReferenceFlow");
1759 fIntFlowFlags->GetXaxis()->SetBinLabel(12,
"fForgetAboutCovariances");
1760 fIntFlowFlags->GetXaxis()->SetBinLabel(13,
"fStorePhiDistributionForOneEvent");
1761 fIntFlowFlags->GetXaxis()->SetBinLabel(14,
"fFillMultipleControlHistograms");
1762 fIntFlowFlags->GetXaxis()->SetBinLabel(15,
"Calculate all correlations vs M");
1763 fIntFlowFlags->GetXaxis()->SetBinLabel(16,
"fMultiplicityIs");
1765 fIntFlowFlags->GetXaxis()->SetBinLabel(18,
"fUse2DHistograms");
1766 fIntFlowFlags->GetXaxis()->SetBinLabel(19,
"fFillProfilesVsMUsingWeights");
1767 fIntFlowFlags->GetXaxis()->SetBinLabel(20,
"fUseQvectorTerms");
1768 fIntFlowFlags->GetXaxis()->SetBinLabel(21,
"fMaxCommonResultsHistogram");
1773 fReQ =
new TMatrixD(12,9);
1774 fImQ =
new TMatrixD(12,9);
1775 fSpk =
new TMatrixD(8,9);
1777 TString intFlowCorrelationsEBEName =
"fIntFlowCorrelationsEBE";
1781 TString intFlowEventWeightsForCorrelationsEBEName =
"fIntFlowEventWeightsForCorrelationsEBE";
1782 intFlowEventWeightsForCorrelationsEBEName +=
fAnalysisLabel->Data();
1785 TString intFlowCorrelationsAllEBEName =
"fIntFlowCorrelationsAllEBE";
1790 TString fIntFlowCorrectionTermsForNUAEBEName =
"fIntFlowCorrectionTermsForNUAEBE";
1792 for(
Int_t sc=0;sc<2;sc++)
1794 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);
1797 TString fIntFlowEventWeightForCorrectionTermsForNUAEBEName =
"fIntFlowEventWeightForCorrectionTermsForNUAEBE";
1798 fIntFlowEventWeightForCorrectionTermsForNUAEBEName +=
fAnalysisLabel->Data();
1799 for(
Int_t sc=0;sc<2;sc++)
1805 TString avMultiplicityName =
"fAvMultiplicity";
1807 fAvMultiplicity =
new TProfile(avMultiplicityName.Data(),
"Average multiplicities of reference particles (RPs)",9,0,9);
1824 TString correlationFlag[4] = {
"#LT#LT2#GT#GT",
"#LT#LT4#GT#GT",
"#LT#LT6#GT#GT",
"#LT#LT8#GT#GT"};
1825 TString intFlowCorrelationsProName =
"fIntFlowCorrelationsPro";
1827 fIntFlowCorrelationsPro =
new TProfile(intFlowCorrelationsProName.Data(),
"Average correlations for all events",4,0,4,
"s");
1833 for(
Int_t b=0;b<4;b++)
1839 TString squaredCorrelationFlag[4] = {
"#LT#LT2#GT^{2}#GT",
"#LT#LT4#GT^{2}#GT",
"#LT#LT6#GT^{2}#GT",
"#LT#LT8#GT^{2}#GT"};
1840 TString intFlowSquaredCorrelationsProName =
"fIntFlowSquaredCorrelationsPro";
1848 for(
Int_t b=0;b<4;b++)
1855 for(
Int_t ci=0;ci<4;ci++)
1858 TString intFlowCorrelationsVsMProName =
"fIntFlowCorrelationsVsMPro";
1860 fIntFlowCorrelationsVsMPro[ci] =
new TProfile(Form(
"%s, %s",intFlowCorrelationsVsMProName.Data(),correlationFlag[ci].Data()),
1861 Form(
"%s vs multiplicity",correlationFlag[ci].
Data()),
1877 TString intFlowSquaredCorrelationsVsMProName =
"fIntFlowSquaredCorrelationsVsMPro";
1880 Form(
"%s vs multiplicity",squaredCorrelationFlag[ci].
Data()),
1898 TString intFlowCorrelationsAllProName =
"fIntFlowCorrelationsAllPro";
1900 fIntFlowCorrelationsAllPro =
new TProfile(intFlowCorrelationsAllProName.Data(),
"Average all correlations for all events",64,0,64);
2006 fIntFlowCorrelationsAllVsMPro[30] =
new TProfile(
"eight1n1n1n1n1n1n1n1n",
"#LT#LT8#GT#GT_{n,n,n,n|n,n,n,n}",
fnBinsMult,
fMinMult,
fMaxMult);
2040 for(
Int_t n=0;n<63;n++)
2062 TString intFlowExtraCorrelationsProName =
"fIntFlowExtraCorrelationsPro";
2064 fIntFlowExtraCorrelationsPro =
new TProfile(intFlowExtraCorrelationsProName.Data(),
"Average extra correlations for all events",100,0,100,
"s");
2075 TString productFlag[6] = {
"#LT#LT2#GT#LT4#GT#GT",
"#LT#LT2#GT#LT6#GT#GT",
"#LT#LT2#GT#LT8#GT#GT",
2076 "#LT#LT4#GT#LT6#GT#GT",
"#LT#LT4#GT#LT8#GT#GT",
"#LT#LT6#GT#LT8#GT#GT"};
2077 TString intFlowProductOfCorrelationsProName =
"fIntFlowProductOfCorrelationsPro";
2084 for(
Int_t b=0;b<6;b++)
2093 TString intFlowProductOfCorrelationsVsMProName =
"fIntFlowProductOfCorrelationsVsMPro";
2094 intFlowProductOfCorrelationsVsMProName +=
fAnalysisLabel->Data();
2098 Form(
"%s versus multiplicity",productFlag[
pi].
Data()),
2114 TString intFlowProductOfCorrectionTermsForNUAProName =
"fIntFlowProductOfCorrectionTermsForNUAPro";
2115 intFlowProductOfCorrectionTermsForNUAProName +=
fAnalysisLabel->Data();
2150 for(
Int_t sc=0;sc<2;sc++)
2152 TString intFlowCorrectionTermsForNUAProName =
"fIntFlowCorrectionTermsForNUAPro";
2154 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");
2167 TString correctionTermFlag[4] = {
"(n(phi1))",
"(n(phi1+phi2))",
"(n(phi1-phi2-phi3))",
"(n(2phi1-phi2))"};
2168 for(
Int_t ci=0;ci<4;ci++)
2170 TString intFlowCorrectionTermsForNUAVsMProName =
"fIntFlowCorrectionTermsForNUAVsMPro";
2171 intFlowCorrectionTermsForNUAVsMProName +=
fAnalysisLabel->Data();
2172 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");
2180 TString intFlowCorrelationsHistName =
"fIntFlowCorrelationsHist";
2195 for(
Int_t ci=0;ci<4;ci++)
2197 TString intFlowCorrelationsVsMHistName =
"fIntFlowCorrelationsVsMHist";
2200 Form(
"%s vs multiplicity",correlationFlag[ci].
Data()),
2217 TString intFlowCorrelationsAllHistName =
"fIntFlowCorrelationsAllHist";
2258 for(
Int_t sc=0;sc<2;sc++)
2260 TString intFlowCorrectionTermsForNUAHistName =
"fIntFlowCorrectionTermsForNUAHist";
2262 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);
2274 TString intFlowCovariancesName =
"fIntFlowCovariances";
2276 fIntFlowCovariances =
new TH1D(intFlowCovariancesName.Data(),
"Covariances (multiplied with weight dependent prefactor)",6,0,6);
2287 TString intFlowSumOfEventWeightsName =
"fIntFlowSumOfEventWeights";
2289 for(
Int_t power=0;power<2;power++)
2291 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);
2300 }
else if (power == 1)
2310 TString intFlowSumOfProductOfEventWeightsName =
"fIntFlowSumOfProductOfEventWeights";
2326 TString intFlowCovariancesVsMName =
"fIntFlowCovariancesVsM";
2328 TString covarianceFlag[6] = {
"Cov(<2>,<4>)",
"Cov(<2>,<6>)",
"Cov(<2>,<8>)",
"Cov(<4>,<6>)",
"Cov(<4>,<8>)",
"Cov(<6>,<8>)"};
2329 for(
Int_t ci=0;ci<6;ci++)
2332 Form(
"%s vs multiplicity",covarianceFlag[ci].
Data()),
2352 TString intFlowSumOfEventWeightsVsMName =
"fIntFlowSumOfEventWeightsVsM";
2354 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>}"},
2355 {
"#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}"}};
2356 for(
Int_t si=0;si<4;si++)
2358 for(
Int_t power=0;power<2;power++)
2361 Form(
"%s vs multiplicity",sumFlag[power][si].
Data()),
2383 TString intFlowSumOfProductOfEventWeightsVsMName =
"fIntFlowSumOfProductOfEventWeightsVsM";
2384 intFlowSumOfProductOfEventWeightsVsMName +=
fAnalysisLabel->Data();
2385 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>}",
2386 "#sum_{i=1}^{N} w_{<4>} w_{<6>}",
"#sum_{i=1}^{N} w_{<4>} w_{<8>}",
"#sum_{i=1}^{N} w_{<6>} w_{<8>}"};
2390 Form(
"%s versus multiplicity",sopowFlag[
pi].
Data()),
2407 TString intFlowCovariancesNUAName =
"fIntFlowCovariancesNUA";
2409 fIntFlowCovariancesNUA =
new TH1D(intFlowCovariancesNUAName.Data(),
"Covariances for NUA (multiplied with weight dependent prefactor)",27,0,27);
2428 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(16,
"Cov(<cos(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2429 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(17,
"Cov(<cos(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2432 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(20,
"Cov(<sin(#phi)>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2433 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(21,
"Cov(<sin(#phi)>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2434 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(22,
"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}+#phi_{2})>)");
2435 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(23,
"Cov(<cos(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2436 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(24,
"Cov(<cos(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2437 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(25,
"Cov(<sin(#phi_{1}+#phi_{2})>,<cos(#phi_{1}-#phi_{2}-#phi_{3})>)");
2438 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(26,
"Cov(<sin(#phi_{1}+#phi_{2})>,<sin(#phi_{1}-#phi_{2}-#phi_{3})>)");
2439 (
fIntFlowCovariancesNUA->GetXaxis())->SetBinLabel(27,
"Cov(<cos(#phi_{1}-#phi_{2}-#phi_{3}>,<sin(#phi_{1}-#phi_{2}-#phi_{3}>)");
2442 TString intFlowSumOfEventWeightsNUAName =
"fIntFlowSumOfEventWeightsNUA";
2444 for(
Int_t sc=0;sc<2;sc++)
2446 for(
Int_t power=0;power<2;power++)
2448 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);
2457 }
else if(power == 1)
2461 (
fIntFlowSumOfEventWeightsNUA[sc][power]->GetXaxis())->SetBinLabel(3,Form(
"#sum_{i=1}^{N} w_{<%s(#phi_{1}-#phi_{2}-#phi_{3})>}^{2}",sinCosFlag[sc].
Data()));
2468 TString intFlowSumOfProductOfEventWeightsNUAName =
"fIntFlowSumOfProductOfEventWeightsNUA";
2469 intFlowSumOfProductOfEventWeightsNUAName +=
fAnalysisLabel->Data();
2502 TString cumulantFlag[4] = {
"QC{2}",
"QC{4}",
"QC{6}",
"QC{8}"};
2503 TString intFlowQcumulantsName =
"fIntFlowQcumulants";
2508 fIntFlowQcumulants->SetTitle(
"Reference Q-cumulants (error from non-isotropic terms also propagated)");
2512 for(
Int_t b=0;b<4;b++)
2520 TString intFlowQcumulantsRebinnedInMName =
"fIntFlowQcumulantsRebinnedInM";
2525 for(
Int_t b=0;b<4;b++)
2532 TString intFlowQcumulantsErrorSquaredRatioName =
"fIntFlowQcumulantsErrorSquaredRatio";
2533 intFlowQcumulantsErrorSquaredRatioName +=
fAnalysisLabel->Data();
2537 for(
Int_t b=0;b<4;b++)
2545 TString intFlowQcumulantsVsMName =
"fIntFlowQcumulantsVsM";
2547 for(
Int_t co=0;co<4;co++)
2550 Form(
"%s vs multiplicity",cumulantFlag[co].
Data()),
2567 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)};
2568 TString intFlowName =
"fIntFlow";
2571 fIntFlow =
new TH1D(intFlowName.Data(),
"Reference flow estimates from Q-cumulants",4,0,4);
2574 for(
Int_t b=0;b<4;b++)
2576 (
fIntFlow->GetXaxis())->SetBinLabel(b+1,flowFlag[b].
Data());
2582 TString intFlowRebinnedInMName =
"fIntFlowRebinnedInM";
2584 fIntFlowRebinnedInM =
new TH1D(intFlowRebinnedInMName.Data(),
"Reference flow estimates from Q-cumulants (rebinned in M)",4,0,4);
2587 for(
Int_t b=0;b<4;b++)
2596 TString intFlowVsMName =
"fIntFlowVsM";
2598 for(
Int_t co=0;co<4;co++)
2600 fIntFlowVsM[co] =
new TH1D(Form(
"%s, %s",intFlowVsMName.Data(),flowFlag[co].Data()),
2601 Form(
"%s vs multiplicity",flowFlag[co].
Data()),
2608 fIntFlowVsM[co]->GetXaxis()->SetTitle(
"Reference multiplicity (from ESD)");
2618 TString intFlowDetectorBiasName =
"fIntFlowDetectorBias";
2623 for(
Int_t ci=0;ci<4;ci++)
2625 (
fIntFlowDetectorBias->GetXaxis())->SetBinLabel(ci+1,Form(
"#frac{corrected}{measured} %s",cumulantFlag[ci].
Data()));
2631 TString intFlowDetectorBiasVsMName =
"fIntFlowDetectorBiasVsM";
2633 for(
Int_t ci=0;ci<4;ci++)
2636 Form(
"Quantifying detector bias for %s vs multiplicity",cumulantFlag[ci].
Data()),
2665 TString controlHistogramsFlagsName =
"fControlHistogramsFlags";
2667 fControlHistogramsFlags =
new TProfile(controlHistogramsFlagsName.Data(),
"Flags for Control Histograms",2,0,2);
2681 TString sCorrelationNoRPsVsRefMultName =
"fCorrelationNoRPsVsRefMult";
2692 TString sCorrelationNoPOIsVsRefMultName =
"fCorrelationNoPOIsVsRefMult";
2703 TString sCorrelationNoRPsVsNoPOIsName =
"fCorrelationNoRPsVsNoPOIs";
2714 TString sCorrelation[4] = {
"#LT2#GT",
"#LT4#GT",
"#LT6#GT",
"#LT8#GT"};
2718 sMultiplicity =
"# RPs";
2721 sMultiplicity =
"Reference multiplicity (from ESD)";
2724 sMultiplicity =
"# POIs";
2726 for(
Int_t ci=0;ci<4;ci++)
2738 TString sCorrelationProduct[1] = {
"#LT2#GT#LT4#GT"};
2739 for(
Int_t cpi=0;cpi<1;cpi++)
2753 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}}"};
2754 for(
Int_t qvti=0;qvti<4;qvti++)
2781 TString bootstrapFlagsName =
"fBootstrapFlags";
2783 fBootstrapFlags =
new TProfile(bootstrapFlagsName.Data(),
"Flags for bootstrap",3,0,3);
2801 TString correlationFlag[4] = {
"#LT#LT2#GT#GT",
"#LT#LT4#GT#GT",
"#LT#LT6#GT#GT",
"#LT#LT8#GT#GT"};
2802 TString cumulantFlag[4] = {
"QC{2}",
"QC{4}",
"QC{6}",
"QC{8}"};
2806 TString bootstrapCorrelationsName =
"fBootstrapCorrelations";
2810 for(
Int_t ci=0;ci<4;ci++)
2820 TString bootstrapCumulantsName =
"fBootstrapCumulants";
2824 for(
Int_t co=0;co<4;co++)
2839 sMultiplicity =
"# RPs";
2842 sMultiplicity =
"Reference multiplicity (from ESD)";
2845 sMultiplicity =
"# POIs";
2850 TString bootstrapCorrelationsVsMName =
"fBootstrapCorrelationsVsM";
2852 for(
Int_t ci=0;ci<4;ci++)
2854 fBootstrapCorrelationsVsM[ci] =
new TProfile2D(Form(
"%s, %s",bootstrapCorrelationsVsMName.Data(),correlationFlag[ci].Data()),
2855 Form(
"Bootstrap Correlations Vs. M, %s",correlationFlag[ci].
Data()),
2866 TString bootstrapCumulantsVsMName =
"fBootstrapCumulantsVsM";
2868 for(
Int_t co=0;co<4;co++)
2871 Form(
"Bootstrap Cumulants Vs. M, %s",cumulantFlag[co].
Data()),
2897 TString mixedHarmonicsFlagsName =
"fMixedHarmonicsFlags";
2899 fMixedHarmonicsFlags =
new TProfile(mixedHarmonicsFlagsName.Data(),
"Flags for Mixed Harmonics",4,0,4);
2915 TString s2pCorrelationsName =
"f2pCorrelations";
2917 f2pCorrelations =
new TProfile(s2pCorrelationsName.Data(),Form(
"2-particle correlations (n = %d)",
fHarmonic),6,0,6,
"s");
2932 TString s3pCorrelationsName =
"f3pCorrelations";
2934 f3pCorrelations =
new TProfile(s3pCorrelationsName.Data(),Form(
"3-particle correlations (n = %d)",
fHarmonic),10,0,10,
"s");
2955 TString s4pCorrelationsName =
"f4pCorrelations";
2957 f4pCorrelations =
new TProfile(s4pCorrelationsName.Data(),Form(
"4-particle correlations (n = %d)",
fHarmonic),45,0,45,
"s");
3016 TString s5pCorrelationsName =
"f5pCorrelations";
3018 f5pCorrelations =
new TProfile(s5pCorrelationsName.Data(),Form(
"5-particle correlations (n = %d)",
fHarmonic),87,0,87,
"s");
3119 TString s6pCorrelationsName =
"f6pCorrelations";
3121 f6pCorrelations =
new TProfile(s6pCorrelationsName.Data(),Form(
"6-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
3130 TString s7pCorrelationsName =
"f7pCorrelations";
3132 f7pCorrelations =
new TProfile(s7pCorrelationsName.Data(),Form(
"7-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
3141 TString s8pCorrelationsName =
"f8pCorrelations";
3143 f8pCorrelations =
new TProfile(s8pCorrelationsName.Data(),Form(
"8-particle correlations (n = %d)",
fHarmonic),1,0.,1.);
3188 TString mixedHarmonicEventWeightsName =
"fMixedHarmonicEventWeights";
3190 TString powerFlag[2] = {
"linear",
"quadratic"};
3191 for(
Int_t power=0;power<2;power++)
3193 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.);
3207 }
else if (power == 1)
3222 TString mixedHarmonicProductOfEventWeightsName =
"fMixedHarmonicProductOfEventWeights";
3223 mixedHarmonicProductOfEventWeightsName +=
fAnalysisLabel->Data();
3228 for(
Int_t b=1;b<=8;b++)
3236 TString mixedHarmonicProductOfCorrelationsName =
"fMixedHarmonicProductOfCorrelations";
3237 mixedHarmonicProductOfCorrelationsName +=
fAnalysisLabel->Data();