28 #define AliFlowAnalysisWithCumulants_cxx
30 #include "Riostream.h"
35 #include "TProfile2D.h"
36 #include "TProfile3D.h"
59 fAnalysisSettings(NULL),
61 fCommonHistsResults2nd(NULL),
62 fCommonHistsResults4th(NULL),
63 fCommonHistsResults6th(NULL),
64 fCommonHistsResults8th(NULL),
81 fUsePhiWeights(kFALSE),
82 fUsePtWeights(kFALSE),
83 fUseEtaWeights(kFALSE),
87 fMultiplicityWeight(NULL),
88 fReferenceFlowList(NULL),
89 fReferenceFlowProfiles(NULL),
90 fReferenceFlowResults(NULL),
91 fReferenceFlowFlags(NULL),
92 fCalculateVsMultiplicity(kFALSE),
97 fReferenceFlowGenFun(NULL),
98 fQvectorComponents(NULL),
99 fAverageOfSquaredWeight(NULL),
100 fReferenceFlowGenFunVsM(NULL),
101 fQvectorComponentsVsM(NULL),
102 fAverageOfSquaredWeightVsM(NULL),
106 fReferenceFlowCumulants(NULL),
107 fReferenceFlow(NULL),
110 fDiffFlowProfiles(NULL),
111 fDiffFlowResults(NULL),
112 fDiffFlowFlags(NULL),
114 fTuningProfiles(NULL),
115 fTuningResults(NULL),
117 fTuneParameters(kFALSE),
123 fHistList =
new TList();
124 fHistListName =
new TString(
"cobjGFC");
125 fHistList->SetName(fHistListName->Data());
126 fHistList->SetOwner(kTRUE);
129 fMultiplicityWeight =
new TString(
"unit");
132 this->InitializeArrays();
166 Bool_t oldHistAddStatus = TH1::AddDirectoryStatus();
167 TH1::AddDirectory(kFALSE);
184 TH1::AddDirectory(oldHistAddStatus);
271 for(
Int_t r=0;r<10;r++)
273 if(TMath::Abs(
fTuningR0[r])<1.e-10)
continue;
274 for(
Int_t pq=0;pq<5;pq++)
280 TMatrixD dAvG(pMax,qMax);
282 Bool_t someAvGEntryIsNegative = kFALSE;
283 for(
Int_t p=0;p<pMax;p++)
285 for(
Int_t q=0;q<qMax;q++)
290 someAvGEntryIsNegative = kTRUE;
292 cout<<
" WARNING: "<<Form(
"<G[%d][%d]> is negative !!!! GFC results are meaningless for r0 = %f, pq = %i.",p,q,
fTuningR0[r],pq)<<endl;
298 TMatrixD dC(pMax,qMax);
300 if(
fAvM>0. && !someAvGEntryIsNegative)
302 for(
Int_t p=0;p<pMax;p++)
304 for(
Int_t q=0;q<qMax;q++)
306 dC(p,q) =
fAvM*(pow(dAvG(p,q),(1./
fAvM))-1.);
315 for(
Int_t p=0;p<pMax;p++)
318 for(
Int_t q=0;q<qMax;q++)
325 TVectorD cumulant(pMax);
332 cumulant[1]=(2./pow(
fTuningR0[r],4.))*((-2.)*dAvC[0]+1.*dAvC[1]);
333 if(cumulant[0]>=0.) {flow[0] = pow(cumulant[0],1./2.);}
334 if(cumulant[1]<=0.) {flow[1] = pow(-1.*cumulant[1],1./4.);}
338 cumulant[0] = (1./(
fTuningR0[r]*
fTuningR0[r]))*(3.*dAvC[0]-(3./2.)*dAvC[1]+(1./3.)*dAvC[2]);
339 cumulant[1] = (2./pow(
fTuningR0[r],4.))*((-5.)*dAvC[0]+4.*dAvC[1]-1.*dAvC[2]);
340 cumulant[2] = (6./pow(
fTuningR0[r],6.))*(3.*dAvC[0]-3.*dAvC[1]+1.*dAvC[2]);
341 if(cumulant[0]>=0.) {flow[0] = pow(cumulant[0],1./2.);}
342 if(cumulant[1]<=0.) {flow[1] = pow(-1.*cumulant[1],1./4.);}
343 if(cumulant[2]>=0.) {flow[2] = pow((1./4.)*cumulant[2],1./6.);}
347 cumulant[0] = (1./(
fTuningR0[r]*
fTuningR0[r]))*(4.*dAvC[0]-3.*dAvC[1]+(4./3.)*dAvC[2]-(1./4.)*dAvC[3]);
348 cumulant[1] = (1./pow(
fTuningR0[r],4.))*((-52./3.)*dAvC[0]+19.*dAvC[1]-(28./3.)*dAvC[2]+(11./6.)*dAvC[3]);
349 cumulant[2] = (3./pow(
fTuningR0[r],6.))*(18.*dAvC[0]-24.*dAvC[1]+14.*dAvC[2]-3.*dAvC[3]);
350 cumulant[3] = (24./pow(
fTuningR0[r],8.))*((-4.)*dAvC[0]+6.*dAvC[1]-4.*dAvC[2]+1.*dAvC[3]);
351 if(cumulant[0]>=0.) {flow[0] = pow(cumulant[0],1./2.);}
352 if(cumulant[1]<=0.) {flow[1] = pow(-1.*cumulant[1],1./4.);}
353 if(cumulant[2]>=0.) {flow[2] = pow((1./4.)*cumulant[2],1./6.);}
354 if(cumulant[3]<=0.) {flow[3] = pow((-1./33.)*cumulant[3],1./8.);}
358 cumulant[0] = (-1./(60*
fTuningR0[r]*
fTuningR0[r]))*((-300.)*dAvC[0]+300.*dAvC[1]-200.*dAvC[2]+75.*dAvC[3]-12.*dAvC[4]);
359 cumulant[1] = (-1./(6.*pow(
fTuningR0[r],4.)))*(154.*dAvC[0]-214.*dAvC[1]+156.*dAvC[2]-61.*dAvC[3]+10.*dAvC[4]);
360 cumulant[2] = (3./(2.*pow(
fTuningR0[r],6.)))*(71.*dAvC[0]-118.*dAvC[1]+98.*dAvC[2]-41.*dAvC[3]+7.*dAvC[4]);
361 cumulant[3] = (-24./pow(
fTuningR0[r],8.))*(14.*dAvC[0]-26.*dAvC[1]+24.*dAvC[2]-11.*dAvC[3]+2.*dAvC[4]);
362 cumulant[4] = (120./pow(
fTuningR0[r],10.))*(5.*dAvC[0]-10.*dAvC[1]+10.*dAvC[2]-5.*dAvC[3]+1.*dAvC[4]);
363 if(cumulant[0]>=0.) {flow[0] = pow(cumulant[0],1./2.);}
364 if(cumulant[1]<=0.) {flow[1] = pow(-1.*cumulant[1],1./4.);}
365 if(cumulant[2]>=0.) {flow[2] = pow((1./4.)*cumulant[2],1./6.);}
366 if(cumulant[3]<=0.) {flow[3] = pow((-1./33.)*cumulant[3],1./8.);}
367 if(cumulant[4]>=0.) {flow[4] = pow((1./456.)*cumulant[4],1./10.);}
371 cumulant[0] = (1./(
fTuningR0[r]*
fTuningR0[r]))*(8.*dAvC[0]-14.*dAvC[1]+(56./3.)*dAvC[2]-(35./2.)*dAvC[3]
372 + (56./5.)*dAvC[4]-(14./3.)*dAvC[5]+(8./7.)*dAvC[6]-(1./8.)*dAvC[7]);
373 cumulant[1] = (1./pow(
fTuningR0[r],4.))*((-1924./35.)*dAvC[0]+(621./5.)*dAvC[1]-(8012./45.)*dAvC[2]
374 + (691./4.)*dAvC[3]-(564./5.)*dAvC[4]+(2143./45.)*dAvC[5]-(412./35.)*dAvC[6]+(363./280.)*dAvC[7]);
375 cumulant[2] = (1./pow(
fTuningR0[r],6.))*(349.*dAvC[0]-(18353./20.)*dAvC[1]+(7173./5.)*dAvC[2]
376 - 1457.*dAvC[3]+(4891./5.)*dAvC[4]-(1683./4.)*dAvC[5]+(527./5.)*dAvC[6]-(469./40.)*dAvC[7]);
377 cumulant[3] = (1./pow(
fTuningR0[r],8.))*((-10528./5.)*dAvC[0]+(30578./5.)*dAvC[1]-(51456./5.)*dAvC[2]
378 + 10993.*dAvC[3]-(38176./5.)*dAvC[4]+(16818./5.)*dAvC[5]-(4288./5.)*dAvC[6]+(967./10.)*dAvC[7]);
379 cumulant[4] = (1./pow(
fTuningR0[r],10.))*(11500.*dAvC[0]-35800.*dAvC[1]+63900.*dAvC[2]-71600.*dAvC[3]
380 + 51620.*dAvC[4]-23400.*dAvC[5]+6100.*dAvC[6]-700.*dAvC[7]);
381 cumulant[5] = (1./pow(
fTuningR0[r],12.))*(-52560.*dAvC[0]+172080.*dAvC[1]-321840.*dAvC[2]+376200.*dAvC[3]
382 - 281520.*dAvC[4]+131760.*dAvC[5]-35280.*dAvC[6]+4140.*dAvC[7]);
383 cumulant[6] = (1./pow(
fTuningR0[r],14.))*(176400.*dAvC[0]-599760.*dAvC[1]+1164240.*dAvC[2]-1411200.*dAvC[3]
384 + 1093680.*dAvC[4]-529200.*dAvC[5]+146160.*dAvC[6]-17640.*dAvC[7]);
385 cumulant[7] = (1./pow(
fTuningR0[r],16.))*(-322560*dAvC[0]+1128960.*dAvC[1]-2257920.*dAvC[2]+2822400.*dAvC[3]
386 - 2257920.*dAvC[4]+1128960.*dAvC[5]-322560.*dAvC[6]+40320.*dAvC[7]);
387 if(cumulant[0]>=0.) {flow[0] = pow(cumulant[0],1./2.);}
388 if(cumulant[1]<=0.) {flow[1] = pow(-1.*cumulant[1],1./4.);}
389 if(cumulant[2]>=0.) {flow[2] = pow((1./4.)*cumulant[2],1./6.);}
390 if(cumulant[3]<=0.) {flow[3] = pow((-1./33.)*cumulant[3],1./8.);}
391 if(cumulant[4]>=0.) {flow[4] = pow((1./456.)*cumulant[4],1./10.);}
392 if(cumulant[5]<=0.) {flow[5] = pow((-1./9460.)*cumulant[5],1./12.);}
393 if(cumulant[6]>=0.) {flow[6] = pow((1./274800.)*cumulant[6],1./14.);}
394 if(cumulant[7]<=0.) {flow[7] = pow((-1./10643745.)*cumulant[7],1./16.);}
397 for(
Int_t co=0;co<pMax;co++)
413 Int_t pMax[5] = {2,3,4,5,8};
414 Int_t qMax[5] = {5,7,9,11,17};
429 for(
Int_t pq=0;pq<5;pq++)
431 if(nRP<2.*pMax[pq])
continue;
435 Double_t tuningGenFunEBE[10][5][8][17] = {{{{0.}}}};
436 for(
Int_t r=0;r<10;r++)
438 for(
Int_t pq=0;pq<5;pq++)
440 for(
Int_t p=0;p<pMax[pq];p++)
442 for(
Int_t q=0;q<qMax[pq];q++)
444 tuningGenFunEBE[r][pq][p][q] = 1.;
451 for(
Int_t i=0;i<nPrim;i++)
457 dPhi = aftsTrack->
Phi();
458 dPt = aftsTrack->
Pt();
459 dEta = aftsTrack->
Eta();
473 for(
Int_t r=0;r<10;r++)
475 if(TMath::Abs(
fTuningR0[r])<1.e-10)
continue;
476 for(
Int_t pq=0;pq<5;pq++)
478 if(nRP<2.*pMax[pq])
continue;
479 for(
Int_t p=0;p<pMax[pq];p++)
481 for(
Int_t q=0;q<qMax[pq];q++)
483 tuningGenFunEBE[r][pq][p][q] *= (1.+wPhi*wPt*wEta*(2.*
fTuningR0[r]*sqrt(p+1.)/nRP)*cos(
fHarmonic*dPhi-2.*q*TMath::Pi()/qMax[pq]));
492 for(
Int_t r=0;r<10;r++)
494 for(
Int_t pq=0;pq<5;pq++)
496 if(nRP<2.*pMax[pq])
continue;
497 for(
Int_t p=0;p<pMax[pq];p++)
499 for(
Int_t q=0;q<qMax[pq];q++)
517 printf(
" WARNING (GFC): anEvent is NULL !!!!");
539 for(
Int_t p=0;p<pMax;p++)
541 for(
Int_t q=0;q<qMax;q++)
548 Int_t crossCheckRP = 0;
551 for(
Int_t i=0;i<nPrim;i++)
558 dPhi = aftsTrack->
Phi();
559 dPt = aftsTrack->
Pt();
560 dEta = aftsTrack->
Eta();
574 for(
Int_t p=0;p<pMax;p++)
576 for(
Int_t q=0;q<qMax;q++)
578 (*fGEBE)(p,q) *= (1.+wPhi*wPt*wEta*(2.*
fR0*sqrt(p+1.)/nRP)*cos(
fHarmonic*dPhi-2.*q*TMath::Pi()/qMax));
590 cout<<
"WARNING (GFC): crossCheckRP != nRP in GFC::Make(). Something is wrong with RP flagging !!!!"<<endl;
607 for(
Int_t p=0;p<pMax;p++)
609 for(
Int_t q=0;q<qMax;q++)
679 for(
Int_t i=0;i<nPrim;i++)
689 dPhi = aftsTrack->
Phi();
690 dPt = aftsTrack->
Pt();
691 dEta = aftsTrack->
Eta();
695 for(
Int_t pe=0;pe<2;pe++)
703 for(
Int_t p=0;p<pMax;p++)
705 for(
Int_t q=0;q<qMax;q++)
707 for(
Int_t ri=0;ri<2;ri++)
709 for(
Int_t pe=0;pe<2;pe++)
742 for(
Int_t p=0;p<pMax;p++)
744 for(
Int_t q=0;q<qMax;q++)
746 for(
Int_t ri=0;ri<2;ri++)
748 for(
Int_t pe=0;pe<2;pe++)
770 dPhi = aftsTrack->
Phi();
771 dPt = aftsTrack->
Pt();
772 dEta = aftsTrack->
Eta();
776 for(
Int_t pe=0;pe<2;pe++)
795 for(
Int_t p=0;p<pMax;p++)
797 for(
Int_t q=0;q<qMax;q++)
799 for(
Int_t ri=0;ri<2;ri++)
801 for(
Int_t pe=0;pe<2;pe++)
835 cout<<
" WARNING (GFC): fHistList is NULL in AFAWGFC::GOH() !!!!"<<endl;
849 cout<<
" WARNING (GFC): outputListHistos is NULL in AFAWGFC::GOH() !!!!"<<endl;
862 TString analysisSettingsName =
"fAnalysisSettings";
863 TProfile *analysisSettings =
dynamic_cast<TProfile*
>(
fHistList->FindObject(analysisSettingsName.Data()));
870 cout<<
" WARNING (GFC): analysisSettings is NULL in AFAWGFC::GPFBH() !!!!"<<endl;
883 TString commonHistsName =
"AliFlowCommonHistGFC";
891 cout<<
" WARNING (GFC): commonHist is NULL in AFAWGFC::GPFCH() !!!!"<<endl;
904 TString commonHistResults2ndOrderName =
"AliFlowCommonHistResults2ndOrderGFC";
906 (
fHistList->FindObject(commonHistResults2ndOrderName.Data()));
913 cout<<
" WARNING (GFC): commonHistRes2nd is NULL in AFAWGFC::GPFCRH() !!!!"<<endl;
917 TString commonHistResults4thOrderName =
"AliFlowCommonHistResults4thOrderGFC";
919 (
fHistList->FindObject(commonHistResults4thOrderName.Data()));
926 cout<<
" WARNING (GFC): commonHistRes4th is NULL in AFAWGFC::GPFCRH() !!!!"<<endl;
930 TString commonHistResults6thOrderName =
"AliFlowCommonHistResults6thOrderGFC";
932 (
fHistList->FindObject(commonHistResults6thOrderName.Data()));
939 cout<<
" WARNING (GFC): commonHistRes6th is NULL in AFAWGFC::GPFCRH() !!!!"<<endl;
943 TString commonHistResults8thOrderName =
"AliFlowCommonHistResults8thOrderGFC";
945 (
fHistList->FindObject(commonHistResults8thOrderName.Data()));
952 cout<<
" WARNING (GFC): commonHistRes8th is NULL in AFAWGFC::GPFCRH() !!!!"<<endl;
975 cout<<
"WARNING (GFC): uningList is NULL in AFAWGFC::GPFTO() !!!!"<<endl;
979 TList *tuningProfiles =
dynamic_cast<TList*
>(tuningList->FindObject(
"Profiles"));
983 cout<<
"WARNING (GFC): tuningProfiles is NULL in AFAWGFC::GPFTO() !!!!"<<endl;
987 TList *tuningResults =
dynamic_cast<TList*
>(tuningList->FindObject(
"Results"));
991 cout<<
"WARNING (GFC): tuningResults is NULL in AFAWGFC::GPFTO() !!!!"<<endl;
997 TString tuningFlagsName =
"fTuningFlags";
998 TProfile *tuningFlags =
dynamic_cast<TProfile*
>(tuningList->FindObject(tuningFlagsName.Data()));
1005 cout<<
"WARNING (GFC): tuningFlags is NULL in AFAWGFC::GPFTO() !!!!"<<endl;
1012 TProfile2D *tuningGenFun[10][5] = {{NULL}};
1013 for(
Int_t r=0;r<10;r++)
1015 for(
Int_t pq=0;pq<5;pq++)
1017 tuningGenFun[r][pq] =
dynamic_cast<TProfile2D*
>(tuningProfiles->FindObject(Form(
"fTuningGenFun (r_{0,%i}, pq set %i)",r,pq)));
1018 if(tuningGenFun[r][pq])
1024 cout<<
"WARNING (GFC): "<<Form(
"tuningGenFun[%i][%i]",r,pq)<<
" is NULL in AFAWGFC::GPFTO() !!!!"<<endl;
1031 TProfile *tuningAvM =
dynamic_cast<TProfile*
>(tuningProfiles->FindObject(
"fTuningAvM"));
1038 cout<<
"WARNING (GFC): tuningAvM is NULL in AFAWGFC::GPFTO() !!!!"<<endl;
1045 TH1D *tuningCumulants[10][5] = {{NULL}};
1046 for(
Int_t r=0;r<10;r++)
1048 for(
Int_t pq=0;pq<5;pq++)
1050 tuningCumulants[r][pq] =
dynamic_cast<TH1D*
>(tuningResults->FindObject(Form(
"fTuningCumulants (r_{0,%i}, pq set %i)",r,pq)));
1051 if(tuningCumulants[r][pq])
1057 cout<<
"WARNING (GFC): "<<Form(
"tuningCumulants[%i][%i]",r,pq)<<
" is NULL in AFAWGFC::GPFTO() !!!!"<<endl;
1064 TH1D *tuningFlow[10][5] = {{NULL}};
1065 for(
Int_t r=0;r<10;r++)
1067 for(
Int_t pq=0;pq<5;pq++)
1069 tuningFlow[r][pq] =
dynamic_cast<TH1D*
>(tuningResults->FindObject(Form(
"fTuningFlow (r_{0,%i}, pq set %i)",r,pq)));
1070 if(tuningFlow[r][pq])
1076 cout<<
"WARNING (GFC): "<<Form(
"tuningFlow[%i][%i]",r,pq)<<
" is NULL in AFAWGFC::GPFTO() !!!!"<<endl;
1099 if(!referenceFlowList)
1102 cout<<
"WARNING (GFC): referenceFlowList is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1106 TList *referenceFlowProfiles =
dynamic_cast<TList*
>(referenceFlowList->FindObject(
"Profiles"));
1107 if(!referenceFlowProfiles)
1110 cout<<
"WARNING (GFC): referenceFlowProfiles is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1114 TList *referenceFlowResults =
dynamic_cast<TList*
>(referenceFlowList->FindObject(
"Results"));
1115 if(!referenceFlowResults)
1118 cout<<
"WARNING (GFC): referenceFlowResults is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1124 TString referenceFlowFlagsName =
"fReferenceFlowFlags";
1125 TProfile *referenceFlowFlags =
dynamic_cast<TProfile*
>(referenceFlowList->FindObject(referenceFlowFlagsName.Data()));
1126 if(referenceFlowFlags)
1132 cout<<
"WARNING (GFC): referenceFlowFlags is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1138 TString referenceFlowGenFunName =
"fReferenceFlowGenFun";
1139 TProfile2D *referenceFlowGenFun =
dynamic_cast<TProfile2D*
>(referenceFlowProfiles->FindObject(referenceFlowGenFunName.Data()));
1140 if(referenceFlowGenFun)
1146 cout<<
"WARNING (GFC): referenceFlowGenFun is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1151 TString qvectorComponentsName =
"fQvectorComponents";
1152 TProfile *qvectorComponents =
dynamic_cast<TProfile*
>(referenceFlowProfiles->FindObject(qvectorComponentsName.Data()));
1153 if(qvectorComponents)
1159 cout<<
"WARNING (GFC): qvectorComponents is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1164 TString averageOfSquaredWeightName =
"fAverageOfSquaredWeight";
1165 TProfile *averageOfSquaredWeight =
dynamic_cast<TProfile*
>(referenceFlowProfiles->FindObject(averageOfSquaredWeightName.Data()));
1166 if(averageOfSquaredWeight)
1172 cout<<
"WARNING (GFC): averageOfSquaredWeight is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1179 TString referenceFlowCumulantsName =
"fReferenceFlowCumulants";
1180 TH1D *referenceFlowCumulants =
dynamic_cast<TH1D*
>(referenceFlowResults->FindObject(referenceFlowCumulantsName.Data()));
1181 if(referenceFlowCumulants)
1187 cout<<
"WARNING (GFC): referenceFlowCumulants is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1192 TString referenceFlowName =
"fReferenceFlow";
1193 TH1D *referenceFlow =
dynamic_cast<TH1D*
>(referenceFlowResults->FindObject(referenceFlowName.Data()));
1200 cout<<
"WARNING (GFC): referenceFlow is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1206 TH1D *chi =
dynamic_cast<TH1D*
>(referenceFlowResults->FindObject(chiName.Data()));
1213 cout<<
"WARNING (GFC): chi is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1221 TString referenceFlowGenFunVsMName =
"fReferenceFlowGenFunVsM";
1222 TProfile3D *referenceFlowGenFunVsM =
dynamic_cast<TProfile3D*
>(referenceFlowProfiles->FindObject(referenceFlowGenFunVsMName.Data()));
1223 if(referenceFlowGenFunVsM)
1229 cout<<
"WARNING (GFC): referenceFlowGenFunVsM is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1234 TString qvectorComponentsVsMName =
"fQvectorComponentsVsM";
1235 TProfile2D *qvectorComponentsVsM =
dynamic_cast<TProfile2D*
>(referenceFlowProfiles->FindObject(qvectorComponentsVsMName.Data()));
1236 if(qvectorComponentsVsM)
1242 cout<<
"WARNING (GFC): qvectorComponentsVsM is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1247 TString averageOfSquaredWeightVsMName =
"fAverageOfSquaredWeightVsM";
1248 TProfile2D *averageOfSquaredWeightVsM =
dynamic_cast<TProfile2D*
>(referenceFlowProfiles->FindObject(averageOfSquaredWeightVsMName.Data()));
1249 if(averageOfSquaredWeightVsM)
1255 cout<<
"WARNING (GFC): averageOfSquaredWeightVsM is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1260 TString cumulantFlag[4] = {
"GFC{2}",
"GFC{4}",
"GFC{6}",
"GFC{8}"};
1261 TString referenceFlowCumulantsVsMName =
"fReferenceFlowCumulantsVsM";
1262 TH1D *referenceFlowCumulantsVsM[4] = {NULL};
1263 for(
Int_t co=0;co<4;co++)
1265 referenceFlowCumulantsVsM[co] =
dynamic_cast<TH1D*
>(referenceFlowResults->FindObject(Form(
"%s, %s",referenceFlowCumulantsVsMName.Data(),cumulantFlag[co].Data())));
1266 if(referenceFlowCumulantsVsM[co])
1272 cout<<
"WARNING (GFC): "<<Form(
"referenceFlowCumulantsVsM[%i]",co)<<
" is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1278 TProfile *avMVsM =
dynamic_cast<TProfile*
>(referenceFlowProfiles->FindObject(
"fAvMVsM"));
1285 cout<<
"WARNING (GFC): avMVsM is NULL in AFAWGFC::GPFRFO() !!!!"<<endl;
1305 TString reIm[2] = {
"Re",
"Im"};
1306 TString rpPoi[2] = {
"RP",
"POI"};
1307 TString ptEta[2] = {
"p_{t}",
"#eta"};
1308 TString order[4] = {
"2nd order",
"4th order",
"6th order",
"8th order"};
1316 cout<<
"WARNING: diffFlowList is NULL in AFAWC::GPFDFO() !!!!"<<endl;
1320 TList *diffFlowProfiles =
dynamic_cast<TList*
>(diffFlowList->FindObject(
"Profiles"));
1321 if(!diffFlowProfiles)
1324 cout<<
"WARNING: diffFlowProfiles is NULL in AFAWC::GPFDFO() !!!!"<<endl;
1328 TList *diffFlowResults =
dynamic_cast<TList*
>(diffFlowList->FindObject(
"Results"));
1329 if(!diffFlowResults)
1332 cout<<
"WARNING: diffFlowResults is NULL in AFAWC::GPFDFO() !!!!"<<endl;
1338 TString diffFlowFlagsName =
"fDiffFlowFlags";
1339 TProfile *diffFlowFlags =
dynamic_cast<TProfile*
>(diffFlowList->FindObject(diffFlowFlagsName.Data()));
1346 cout<<
"WARNING (GFC): diffFlowFlags is NULL in AFAWGFC::GPFDFO() !!!!"<<endl;
1353 TProfile3D *diffFlowGenFun[2][2][2] = {{{NULL}}};
1354 for(
Int_t ri=0;ri<2;ri++)
1356 for(
Int_t rp=0;rp<2;rp++)
1358 for(
Int_t pe=0;pe<2;pe++)
1360 diffFlowGenFun[ri][rp][pe] =
dynamic_cast<TProfile3D*
>
1361 (diffFlowProfiles->FindObject(Form(
"fDiffFlowGenFun (%s, %s, %s)",reIm[ri].
Data(),rpPoi[rp].
Data(),ptEta[pe].
Data())));
1362 if(diffFlowGenFun[ri][rp][pe])
1368 cout<<
"WARNING (GFC): "<<Form(
"diffFlowGenFun[%d][%d][%d]",ri,rp,pe)<<
" is NULL in AFAWGFC::GPFDFO() !!!!"<<endl;
1376 TProfile *noOfParticlesInBin[2][2] = {{NULL}};
1377 for(
Int_t rp=0;rp<2;rp++)
1379 for(
Int_t pe=0;pe<2;pe++)
1381 noOfParticlesInBin[rp][pe] =
dynamic_cast<TProfile*
>
1382 (diffFlowProfiles->FindObject(Form(
"fNoOfParticlesInBin (%s, %s)",rpPoi[rp].
Data(),ptEta[pe].
Data())));
1383 if(noOfParticlesInBin[rp][pe])
1389 cout<<
"WARNING (GFC): "<<Form(
"noOfParticlesInBin[%d][%d]",rp,pe)<<
" is NULL in AFAWGFC::GPFDFO() !!!!"<<endl;
1396 TH1D *diffFlowCumulants[2][2][4] = {{{NULL}}};
1397 for(
Int_t rp=0;rp<2;rp++)
1399 for(
Int_t pe=0;pe<2;pe++)
1401 for(
Int_t co=0;co<4;co++)
1403 diffFlowCumulants[rp][pe][co] =
dynamic_cast<TH1D*
>
1404 (diffFlowResults->FindObject(Form(
"fDiffFlowCumulants (%s, %s, %s)",rpPoi[rp].
Data(),ptEta[pe].
Data(),order[co].
Data())));
1405 if(diffFlowCumulants[rp][pe][co])
1411 cout<<
"WARNING (GFC): "<<Form(
"diffFlowCumulants[%d][%d][%d]",rp,pe,co)<<
" is NULL in AFAWGFC::GPFDFO() !!!!"<<endl;
1419 TH1D *diffFlow[2][2][4] = {{{NULL}}};
1420 for(
Int_t rp=0;rp<2;rp++)
1422 for(
Int_t pe=0;pe<2;pe++)
1424 for(
Int_t co=0;co<4;co++)
1426 diffFlow[rp][pe][co] =
dynamic_cast<TH1D*
>
1427 (diffFlowResults->FindObject(Form(
"fDiffFlow (%s, %s, %s)",rpPoi[rp].
Data(),ptEta[pe].
Data(),order[co].
Data())));
1428 if(diffFlow[rp][pe][co])
1434 cout<<
"WARNING (GFC): "<<Form(
"diffFlow[%d][%d][%d]",rp,pe,co)<<
" is NULL in AFAWGFC::GPFDFO() !!!!"<<endl;
1456 }
else if(rpPoi ==
"POI")
1462 TH1F *yieldPt = NULL;
1467 }
else if(rpPoi ==
"RP")
1474 printf(
"\n WARNING (GFC): yieldPt is NULL in AFAWC::CIF() !!!!\n");
1482 Double_t dvn2nd = 0., dvn4th = 0., dvn6th = 0., dvn8th = 0.;
1483 Double_t dErrvn2nd = 0., dErrvn4th = 0., dErrvn6th = 0., dErrvn8th = 0.;
1484 Double_t dVn2nd = 0., dVn4th = 0., dVn6th = 0., dVn8th = 0.;
1485 Double_t dErrVn2nd = 0., dErrVn4th = 0., dErrVn6th = 0., dErrVn8th = 0.;
1487 Double_t dSum2nd = 0., dSum4th = 0., dSum6th = 0., dSum8th = 0.;
1488 fnBinsPt = flow2ndPt->GetXaxis()->GetNbins();
1492 dvn2nd = flow2ndPt->GetBinContent(p);
1493 dvn4th = flow4thPt->GetBinContent(p);
1494 dvn6th = flow6thPt->GetBinContent(p);
1495 dvn8th = flow8thPt->GetBinContent(p);
1497 dErrvn2nd = flow2ndPt->GetBinError(p);
1498 dErrvn4th = flow4thPt->GetBinError(p);
1499 dErrvn6th = flow6thPt->GetBinError(p);
1500 dErrvn8th = flow8thPt->GetBinError(p);
1502 dYield = yieldPt->GetBinContent(p);
1504 dVn2nd += dvn2nd*dYield;
1505 dVn4th += dvn4th*dYield;
1506 dVn6th += dvn6th*dYield;
1507 dVn8th += dvn8th*dYield;
1514 dErrVn2nd += dYield*dYield*dErrvn2nd*dErrvn2nd;
1515 dErrVn4th += dYield*dYield*dErrvn4th*dErrvn4th;
1516 dErrVn6th += dYield*dYield*dErrvn6th*dErrvn6th;
1517 dErrVn8th += dYield*dYield*dErrvn8th*dErrvn8th;
1524 dErrVn2nd /= (dSum2nd*dSum2nd);
1525 dErrVn2nd = TMath::Sqrt(dErrVn2nd);
1530 dErrVn4th /= (dSum4th*dSum4th);
1531 dErrVn4th = TMath::Sqrt(dErrVn4th);
1536 dErrVn6th /= (dSum6th*dSum6th);
1537 dErrVn6th = TMath::Sqrt(dErrVn6th);
1542 dErrVn8th /= (dSum8th*dSum8th);
1543 dErrVn8th = TMath::Sqrt(dErrVn8th);
1554 else if(rpPoi ==
"RP")
1582 }
else if(rpPoi ==
"POI")
1607 }
else if(rpPoi ==
"POI")
1636 }
else if(rpPoi ==
"POI")
1659 }
else if(rpPoi ==
"POI")
1666 }
else if(ptEta ==
"eta")
1679 for(
Int_t b=1;b<=nBins;b++)
1694 v2 = gfd2/pow(gfc2,0.5);
1695 fDiffFlow[rp][pe][0]->SetBinContent(b,v2);
1700 v4 = -gfd4/pow(-gfc4,.75);
1701 fDiffFlow[rp][pe][1]->SetBinContent(b,v4);
1706 v6 = gfd6/(4.*pow((1./4.)*gfc6,(5./6.)));
1707 fDiffFlow[rp][pe][2]->SetBinContent(b,v6);
1712 v8 = -gfd8/(33.*pow(-(1./33.)*gfc8,(7./8.)));
1713 fDiffFlow[rp][pe][3]->SetBinContent(b,v8);
1731 }
else if(rpPoi ==
"POI")
1738 }
else if(ptEta ==
"eta")
1750 for(
Int_t b=1;b<=nBins;b++)
1754 if(chi2>0. && nParticles>0.)
1756 Double_t v2Error = pow((1./(2.*nParticles))*((1.+pow(chi2,2.))/pow(chi2,2.)),0.5);
1757 fDiffFlow[rp][pe][0]->SetBinError(b,v2Error);
1760 if(chi4>0. && nParticles>0.)
1762 Double_t v4Error = pow((1./(2.*nParticles))*((2.+6.*pow(chi4,2.)+pow(chi4,4.)+pow(chi4,6.))/pow(chi4,6.)),0.5);
1763 fDiffFlow[rp][pe][1]->SetBinError(b,v4Error);
1769 fDiffFlow[rp][pe][2]->SetBinError(b,0.);
1775 fDiffFlow[rp][pe][3]->SetBinError(b,0.);
1793 }
else if(rpPoi ==
"POI")
1800 }
else if(ptEta ==
"eta")
1810 TMatrixD dAvG(pMax,qMax);
1812 for(
Int_t p=0;p<pMax;p++)
1814 for(
Int_t q=0;q<qMax;q++)
1820 for(
Int_t b=0;b<nBins;b++)
1825 for(
Int_t p=0;p<pMax;p++)
1828 for(
Int_t q=0;q<qMax;q++)
1830 if(TMath::Abs(dAvG(p,q))>1.e-44)
1834 tempSum += cos(
fMultiple*2.*q*TMath::Pi()/qMax)*dX
1835 + sin(
fMultiple*2.*q*TMath::Pi()/qMax)*dY;
1838 dD[p] = (pow(
fR0*pow(p+1.0,0.5),
fMultiple)/qMax)*tempSum;
1840 gfc[0] = (1./(
fR0*
fR0))*(5.*dD[0]-5.*dD[1]+(10./3.)*dD[2]-(5./4.)*dD[3]+(1./5.)*dD[4]);
1841 gfc[1] = (1./pow(
fR0,4.))*((-77./6.)*dD[0]+(107./6.)*dD[1]-(13./1.)*dD[2]+(61./12.)*dD[3]-(5./6.)*dD[4]);
1842 gfc[2] = (1./pow(
fR0,6.))*((71./2.)*dD[0]-59.*dD[1]+49.*dD[2]-(41./2.)*dD[3]+(7./2.)*dD[4]);
1843 gfc[3] = (1./pow(
fR0,8.))*(-84.*dD[0]+156.*dD[1]-144.*dD[2]+66.*dD[3]-12.*dD[4]);
1846 for(
Int_t co=0;co<4;co++)
1875 }
else if(type ==
"RP")
1885 }
else if(type ==
"POI")
1898 cout<<
" WARNING: Impossible type (can be RF, RP or POI) !!!!"<<endl;
1899 cout<<
" Results will not be printed on the screen."<<endl;
1909 subtitle.Append(type);
1910 subtitle.Append(
", without weights)");
1913 subtitle.Append(type);
1914 subtitle.Append(
", with weights)");
1918 cout<<
"*************************************"<<endl;
1919 cout<<
"*************************************"<<endl;
1920 cout<<title.Data()<<endl;
1921 cout<<subtitle.Data()<<endl;
1924 for(
Int_t i=0;i<4;i++)
1926 cout<<
" v_"<<n<<
"{"<<2*(i+1)<<
"} = "<<dVn[i]<<
" +/- "<<dVnErr[i]<<endl;
1934 else if (type ==
"RP")
1938 else if (type ==
"POI")
1942 cout<<
"*************************************"<<endl;
1943 cout<<
"*************************************"<<endl;
2018 if(TMath::Abs(dAvw2)<1.e-44)
2021 cout<<
" WARNING (GFC): Average of squared weight is 0 in GFC. Most probably one of the histograms"<<endl;
2022 cout<<
" in the file \"weights.root\" was empty. Nothing will be calculated !!!!"<<endl;
2027 if(
fnEvts>0. &&
fAvM>0. && dAvw2>0. && gfc2>=0.)
2029 if((dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(gfc2,(1./2.))*(
fAvM/dAvw2),2.)>0.))
2031 chi2 = (
fAvM*v2)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(v2*
fAvM/dAvw2,2.),0.5);
2033 if(TMath::Abs(chi2)>1.e-44)
2035 v2Error = pow(((1./(2.*
fAvM*
fnEvts))*((1.+2.*pow(chi2,2))/(2.*pow(chi2,2)))),0.5);
2039 if(
fnEvts>0 &&
fAvM>0 && dAvw2>0 && gfc4<=0.)
2041 if((dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(-gfc4,(1./4.))*(
fAvM/dAvw2),2.)>0.))
2043 chi4 = (
fAvM*v4)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(v4*
fAvM/dAvw2,2.),0.5);
2045 if(TMath::Abs(chi4)>1.e-44)
2047 v4Error = (1./(pow(2.*
fAvM*
fnEvts,0.5)))*pow((1.+4.*pow(chi4,2)+1.*pow(chi4,4.)+2.*pow(chi4,6.))/(2.*pow(chi4,6.)),0.5);
2051 if(
fnEvts>0 &&
fAvM>0 && dAvw2>0 && gfc6>=0.)
2053 if((dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow((1./4.)*gfc6,(1./6.))*(
fAvM/dAvw2),2.)>0.))
2055 chi6 = (
fAvM*v6)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(v6*
fAvM/dAvw2,2.),0.5);
2057 if(TMath::Abs(chi6)>1.e-44)
2059 v6Error = (1./(pow(2.*
fAvM*
fnEvts,0.5)))*pow((3.+18.*pow(chi6,2)+9.*pow(chi6,4.)+28.*pow(chi6,6.)
2060 +12.*pow(chi6,8.)+24.*pow(chi6,10.))/(24.*pow(chi6,10.)),0.5);
2064 if(
fnEvts>0 &&
fAvM>0 && dAvw2>0 && gfc8<=0.)
2066 if((dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(-(1./33.)*gfc8,(1./8.))*(
fAvM/dAvw2),2.)>0.))
2068 chi8=(
fAvM*v8)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(v8*
fAvM/dAvw2,2.),0.5);
2070 if(TMath::Abs(chi8)>1.e-44)
2072 v8Error = (1./(pow(2.*
fAvM*
fnEvts,0.5)))*pow((12.+96.*pow(chi8,2.)+72.*pow(chi8,4.)+304.*pow(chi8,6.)
2073 +257.*pow(chi8,8.)+804.*pow(chi8,10.)+363.*pow(chi8,12.)+726.*pow(chi8,14.))/(726.*pow(chi8,14.)),0.5);
2083 fChi->SetBinContent(1,chi2);
2084 fChi->SetBinContent(2,chi4);
2085 fChi->SetBinContent(3,chi6);
2086 fChi->SetBinContent(4,chi8);
2107 if(gfc2>=0.) v2 = pow(gfc2,1./2.);
2108 if(gfc4<=0.) v4 = pow(-1.*gfc4,1./4.);
2109 if(gfc6>=0.) v6 = pow((1./4.)*gfc6,1./6.);
2110 if(gfc8<=0.) v8 = pow((-1./33.)*gfc8,1./8.);
2129 TMatrixD dAvG(pMax,qMax);
2131 Bool_t someAvGEntryIsNegative = kFALSE;
2132 for(
Int_t p=0;p<pMax;p++)
2134 for(
Int_t q=0;q<qMax;q++)
2139 someAvGEntryIsNegative = kTRUE;
2141 cout<<
" WARNING: "<<Form(
"<G[%d][%d]> is negative !!!! GFC results are meaningless.",p,q)<<endl;
2148 TMatrixD dC(pMax,qMax);
2150 if(
fAvM>0. && !someAvGEntryIsNegative)
2152 for(
Int_t p=0;p<pMax;p++)
2154 for(
Int_t q=0;q<qMax;q++)
2156 dC(p,q) =
fAvM*(pow(dAvG(p,q),(1./
fAvM))-1.);
2164 TVectorD dAvC(pMax);
2166 for(
Int_t p=0;p<pMax;p++)
2169 for(
Int_t q=0;q<qMax;q++)
2173 dAvC[p] = temp/qMax;
2177 TVectorD cumulant(pMax);
2179 cumulant[0] = (-1./(60*
fR0*
fR0))*((-300.)*dAvC[0]+300.*dAvC[1]-200.*dAvC[2]+75.*dAvC[3]-12.*dAvC[4]);
2180 cumulant[1] = (-1./(6.*pow(
fR0,4.)))*(154.*dAvC[0]-214.*dAvC[1]+156.*dAvC[2]-61.*dAvC[3]+10.*dAvC[4]);
2181 cumulant[2] = (3./(2.*pow(
fR0,6.)))*(71.*dAvC[0]-118.*dAvC[1]+98.*dAvC[2]-41.*dAvC[3]+7.*dAvC[4]);
2182 cumulant[3] = (-24./pow(
fR0,8.))*(14.*dAvC[0]-26.*dAvC[1]+24.*dAvC[2]-11.*dAvC[3]+2.*dAvC[4]);
2183 cumulant[4] = (120./pow(
fR0,10.))*(5.*dAvC[0]-10.*dAvC[1]+10.*dAvC[2]-5.*dAvC[3]+1.*dAvC[4]);
2187 for(
Int_t co=0;co<pMax;co++)
2198 TMatrixD dAvGVsM(pMax,qMax);
2200 Bool_t someAvGEntryIsNegativeVsM = kFALSE;
2201 for(
Int_t p=0;p<pMax;p++)
2203 for(
Int_t q=0;q<qMax;q++)
2208 someAvGEntryIsNegativeVsM = kTRUE;
2210 cout<<
" WARNING: "<<Form(
"<G[%d][%d]> is negative !!!! GFC vs multiplicity results are meaningless.",p,q)<<endl;
2217 TMatrixD dCVsM(pMax,qMax);
2219 if(
fAvM>0. && !someAvGEntryIsNegativeVsM)
2221 for(
Int_t p=0;p<pMax;p++)
2223 for(
Int_t q=0;q<qMax;q++)
2225 dCVsM(p,q) =
fAvM*(pow(dAvGVsM(p,q),(1./
fAvM))-1.);
2233 TVectorD dAvCVsM(pMax);
2235 for(
Int_t p=0;p<pMax;p++)
2238 for(
Int_t q=0;q<qMax;q++)
2240 tempVsM += 1.*dCVsM(p,q);
2242 dAvCVsM[p] = tempVsM/qMax;
2246 TVectorD cumulantVsM(pMax);
2248 cumulantVsM[0] = (-1./(60*
fR0*
fR0))*((-300.)*dAvCVsM[0]+300.*dAvCVsM[1]-200.*dAvCVsM[2]+75.*dAvCVsM[3]-12.*dAvCVsM[4]);
2249 cumulantVsM[1] = (-1./(6.*pow(
fR0,4.)))*(154.*dAvCVsM[0]-214.*dAvCVsM[1]+156.*dAvCVsM[2]-61.*dAvCVsM[3]+10.*dAvCVsM[4]);
2250 cumulantVsM[2] = (3./(2.*pow(
fR0,6.)))*(71.*dAvCVsM[0]-118.*dAvCVsM[1]+98.*dAvCVsM[2]-41.*dAvCVsM[3]+7.*dAvCVsM[4]);
2251 cumulantVsM[3] = (-24./pow(
fR0,8.))*(14.*dAvCVsM[0]-26.*dAvCVsM[1]+24.*dAvCVsM[2]-11.*dAvCVsM[3]+2.*dAvCVsM[4]);
2252 cumulantVsM[4] = (120./pow(
fR0,10.))*(5.*dAvCVsM[0]-10.*dAvCVsM[1]+10.*dAvCVsM[2]-5.*dAvCVsM[3]+1.*dAvCVsM[4]);
2255 for(
Int_t co=0;co<pMax-1;co++)
2280 for(
Int_t ri=0;ri<2;ri++)
2282 for(
Int_t rp=0;rp<2;rp++)
2284 for(
Int_t pe=0;pe<2;pe++)
2290 for(
Int_t rp=0;rp<2;rp++)
2292 for(
Int_t pe=0;pe<2;pe++)
2297 for(
Int_t rp=0;rp<2;rp++)
2299 for(
Int_t pe=0;pe<2;pe++)
2301 for(
Int_t co=0;co<4;co++)
2308 for(
Int_t i=0;i<3;i++)
2312 for(
Int_t r=0;r<10;r++)
2315 for(
Int_t pq=0;pq<5;pq++)
2322 for(
Int_t co=0;co<4;co++)
2342 cout<<
"WARNING (GFC): Multiplicity weight can be either \"unit\" or \"multiplicity\"."<<endl;
2381 cout<<
"WARNING (GFC): fWeightsList is NULL in AFAWGFC::BAFWH() !!!!"<<endl;
2390 if(!
fPhiWeights){printf(
"\n WARNING (GFC): !fPhiWeights !!!!\n");exit(0);}
2394 cout<<
"WARNING (GFC): Inconsistent binning in histograms for phi-weights throughout the code."<<endl;
2401 cout<<
"WARNING (GFC): fWeightsList->FindObject(\"phi_weights\") is NULL in AFAWGFC::BAFWH() !!!!"<<endl;
2412 if(!
fPtWeights){printf(
"\n WARNING (GFC): !fPtWeights !!!!\n");exit(0);}
2416 cout<<
"WARNING (GFC): Inconsistent binning in histograms for pt-weights throughout the code."<<endl;
2423 cout<<
"WARNING (GFC): fWeightsList->FindObject(\"pt_weights\") is NULL in AFAWGFC::BAFWH() !!!!"<<endl;
2434 if(!
fEtaWeights){printf(
"\n WARNING (GFC): !fEtaWeights !!!!\n");exit(0);}
2438 cout<<
"WARNING (GFC): Inconsistent binning in histograms for eta-weights throughout the code."<<endl;
2445 cout<<
"WARNING (GFC): fUseEtaWeights && fWeightsList->FindObject(\"eta_weights\") is NULL in AFAWGFC::BAFWH() !!!!"<<endl;
2466 TString cumulantFlag[4] = {
"GFC{2}",
"GFC{4}",
"GFC{6}",
"GFC{8}"};
2470 fReferenceFlowGenFunVsM =
new TProfile3D(
"fReferenceFlowGenFunVsM",
"#LTG[p][q]#GT vs M",
fnBinsMult,
fMinMult,
fMaxMult,pMax,0.,(
Double_t)pMax,qMax,0.,(
Double_t)qMax);
2496 fAvMVsM->SetLabelOffset(0.01);
2498 fAvMVsM->SetYTitle(
"#LTM#GT");
2503 TString referenceFlowCumulantsVsMName =
"fReferenceFlowCumulantsVsM";
2504 for(
Int_t co=0;co<4;co++)
2507 Form(
"%s vs multipicity",cumulantFlag[co].
Data()),
2530 static const Int_t pMax = 5;
2531 static const Int_t qMax = 11;
2534 TString referenceFlowFlagsName =
"fReferenceFlowFlags";
2535 fReferenceFlowFlags =
new TProfile(referenceFlowFlagsName.Data(),
"Flags for Reference Flow",2,0,2);
2545 fGEBE =
new TMatrixD(pMax,qMax);
2554 fQvectorComponents =
new TProfile(
"fQvectorComponents",
"Averages of Q-vector components",4,0.,4.);
2572 TString referenceFlowCumulantsName =
"fReferenceFlowCumulants";
2573 fReferenceFlowCumulants =
new TH1D(referenceFlowCumulantsName.Data(),
"Isotropic Generating Function Cumulants for reference flow",4,0,4);
2591 fChi =
new TH1D(
"fChi",
"Resolution",4,0,4);
2592 fChi->SetLabelSize(0.06);
2593 fChi->SetMarkerStyle(25);
2594 fChi->GetXaxis()->SetBinLabel(1,
"#chi_{2}");
2595 fChi->GetXaxis()->SetBinLabel(2,
"#chi_{4}");
2596 fChi->GetXaxis()->SetBinLabel(3,
"#chi_{6}");
2597 fChi->GetXaxis()->SetBinLabel(4,
"#chi_{8}");
2614 Int_t pMax[5] = {2,3,4,5,8};
2615 Int_t qMax[5] = {5,7,9,11,17};
2618 TString tuningFlagsName =
"fTuningFlags";
2619 fTuningFlags =
new TProfile(tuningFlagsName.Data(),
"Tuning parameters",10,0,10);
2624 for(
Int_t r=1;r<=10;r++)
2626 fTuningFlags->GetXaxis()->SetBinLabel(r,Form(
"r_{0,%d}",r-1));
2633 for(
Int_t r=0;r<10;r++)
2635 for(
Int_t pq=0;pq<5;pq++)
2637 fTuningGenFun[r][pq] =
new TProfile2D(Form(
"fTuningGenFun (r_{0,%i}, pq set %i)",r,pq),
2638 Form(
"#LTG[p][q]#GT for r_{0} = %f, p_{max} = %i, q_{max} = %i",
fTuningR0[r],pMax[pq],qMax[pq]),
2646 fTuningAvM =
new TProfile(
"fTuningAvM",
"Average multiplicity",5,0,5);
2648 for(
Int_t b=1;b<=5;b++)
2650 fTuningAvM->GetXaxis()->SetBinLabel(b,Form(
"nRP #geq %i",2*pMax[b-1]));
2656 for(
Int_t r=0;r<10;r++)
2658 for(
Int_t pq=0;pq<5;pq++)
2661 Form(
"GFC for r_{0} = %f, p_{max} = %i, q_{max} = %i",
fTuningR0[r],pMax[pq],qMax[pq]),
2662 pMax[pq],0,pMax[pq]);
2665 for(
Int_t b=1;b<=pMax[pq];b++)
2673 for(
Int_t r=0;r<10;r++)
2675 for(
Int_t pq=0;pq<5;pq++)
2677 fTuningFlow[r][pq] =
new TH1D(Form(
"fTuningFlow (r_{0,%i}, pq set %i)",r,pq),
2678 Form(
"Reference flow for r_{0} = %f, p_{max} = %i, q_{max} = %i",
fTuningR0[r],pMax[pq],qMax[pq]),
2679 pMax[pq],0,pMax[pq]);
2682 for(
Int_t b=1;b<=pMax[pq];b++)
2684 fTuningFlow[r][pq]->GetXaxis()->SetBinLabel(b,Form(
"v{%i,GFC}",2*b));
2706 static const Int_t pMax = 5;
2707 static const Int_t qMax = 11;
2713 TString reIm[2] = {
"Re",
"Im"};
2714 TString rpPoi[2] = {
"RP",
"POI"};
2715 TString ptEta[2] = {
"p_{t}",
"#eta"};
2716 TString order[4] = {
"2nd order",
"4th order",
"6th order",
"8th order"};
2719 TString diffFlowFlagsName =
"fDiffFlowFlags";
2720 fDiffFlowFlags =
new TProfile(diffFlowFlagsName.Data(),
"Flags for Differential Flow",1,0,1);
2733 for(
Int_t ri=0;ri<2;ri++)
2735 for(
Int_t rp=0;rp<2;rp++)
2737 for(
Int_t pe=0;pe<2;pe++)
2739 fDiffFlowGenFun[ri][rp][pe] =
new TProfile3D(Form(
"fDiffFlowGenFun (%s, %s, %s)",reIm[ri].
Data(),rpPoi[rp].
Data(),ptEta[pe].
Data()),
2740 Form(
"#LT%s[D[%s-bin][p][q]]#GT for %ss",reIm[ri].
Data(),ptEta[pe].
Data(),rpPoi[rp].
Data()),
2741 nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe],pMax,0.,(
Double_t)pMax,qMax,0.,(
Double_t)qMax);
2753 for(
Int_t rp=0;rp<2;rp++)
2755 for(
Int_t pe=0;pe<2;pe++)
2758 Form(
"Number of %ss per %s bin",rpPoi[rp].
Data(),ptEta[pe].
Data()),
2759 nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]);
2765 for(
Int_t rp=0;rp<2;rp++)
2767 for(
Int_t pe=0;pe<2;pe++)
2769 for(
Int_t co=0;co<4;co++)
2772 Form(
"Differential %s cumulant for %ss vs %s",order[co].
Data(),rpPoi[rp].
Data(),ptEta[pe].
Data()),
2773 nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]);
2780 for(
Int_t rp=0;rp<2;rp++)
2782 for(
Int_t pe=0;pe<2;pe++)
2784 for(
Int_t co=0;co<4;co++)
2787 Form(
"Differential flow from %s cumulant for %ss vs %s",order[co].
Data(),rpPoi[rp].
Data(),ptEta[pe].
Data()),
2788 nBinsPtEta[pe],minPtEta[pe],maxPtEta[pe]);
2806 cout<<
"WARNING: !fReferenceFlowFlags is NULL in AFAWC::SRFF() !!!!"<<endl;
2834 cout<<
"WARNING: !fDiffFlowFlags is NULL in AFAWC::SRFF() !!!!"<<endl;
2914 TString analysisSettingsName =
"fAnalysisSettings";
2915 fAnalysisSettings =
new TProfile(analysisSettingsName.Data(),
"Settings for analysis with Generating Function Cumulants",11,0.,11.);
2950 TString commonHistsName =
"AliFlowCommonHistGFC";
2954 TString commonHistResults2ndOrderName =
"AliFlowCommonHistResults2ndOrderGFC";
2958 TString commonHistResults4thOrderName =
"AliFlowCommonHistResults4thOrderGFC";
2962 TString commonHistResults6thOrderName =
"AliFlowCommonHistResults6thOrderGFC";
2966 TString commonHistResults8thOrderName =
"AliFlowCommonHistResults8thOrderGFC";
2981 cout<<
" WARNING (GFC): fCommonHists is NULL in CPUIM() !!!!"<<endl;
2988 cout<<
" WARNING (GFC): fPhiWeights is NULL in CPUIM() !!!!"<<endl;
2995 cout<<
" WARNING (GFC): fPtWeights is NULL in CPUIM() !!!!"<<endl;
3002 cout<<
" WARNING (GFC): fEtaWeights is NULL in CPUIM() !!!!"<<endl;
3009 cout<<
" WARNING (GFC): fAverageOfSquaredWeight is NULL in CPUIM() !!!!"<<endl;
3016 cout<<
" WARNING (GFC): fReferenceFlowGenFun is NULL in CPUIM() !!!!"<<endl;
3023 cout<<
" WARNING (GFC): fQvectorComponents is NULL in CPUIM() !!!!"<<endl;
3030 cout<<
"WARNING (GFC): fGEBE is NULL in CPUIM() !!!!"<<endl;
3040 cout<<
"WARNING (GFC): fReferenceFlowGenFunVsM is NULL in CPUIM() !!!!"<<endl;
3047 cout<<
"WARNING (GFC): fQvectorComponentsVsM is NULL in CPUIM() !!!!"<<endl;
3054 cout<<
"WARNING (GFC): fAverageOfSquaredWeightVsM is NULL in CPUIM() !!!!"<<endl;
3061 cout<<
"WARNING (GFC): fAvMVsM is NULL in CPUIM() !!!!"<<endl;
3078 cout<<
" WARNING (GFC): fAnalysisSettings is NULL in CPUIF() !!!!"<<endl;
3085 cout<<
" WARNING (GFC): (fCommonHists && fCommonHists->GetHistMultRP) is NULL in CPUIF() !!!!"<<endl;
3092 cout<<
" WARNING (GFC): fReferenceFlowGenFun is NULL in CPUIF() !!!!"<<endl;
3099 cout<<
" WARNING (GFC): fReferenceFlowCumulants is NULL in CPUIF() !!!!"<<endl;
3106 cout<<
" WARNING (GFC): fQvectorComponents is NULL in CPUIF() !!!!"<<endl;
3113 cout<<
" WARNING (GFC): fAverageOfSquaredWeight is NULL in CPUIF() !!!!"<<endl;
3120 cout<<
" WARNING (GFC): fCommonHistsResults2nd && fCommonHistsResults4th && fCommonHistsResults6th && "<<endl;
3121 cout<<
" fCommonHistsResults8th is NULL in CPUIF() !!!!"<<endl;
3128 cout<<
" WARNING (GFC): fReferenceFlow is NULL in CPUIF() !!!!"<<endl;
3135 cout<<
" WARNING (GFC): fChi is NULL in CPUIF() !!!!"<<endl;
3139 for(
Int_t ri=0;ri<2;ri++)
3141 for(
Int_t rp=0;rp<2;rp++)
3143 for(
Int_t pe=0;pe<2;pe++)
3148 cout<<
" WARNING (GFC): "<<Form(
"fDiffFlowGenFun[%d][%d][%d]",ri,rp,pe)<<
" is NULL in CPUIF() !!!!"<<endl;
3155 for(
Int_t rp=0;rp<2;rp++)
3157 for(
Int_t pe=0;pe<2;pe++)
3159 for(
Int_t co=0;co<4;co++)
3164 cout<<
" WARNING (GFC): "<<Form(
"fDiffFlowCumulants[%d][%d][%d]",rp,pe,co)<<
" is NULL in CPUIF() !!!!"<<endl;
3171 cout<<
" WARNING (GFC): "<<Form(
"fDiffFlow[%d][%d][%d]",rp,pe,co)<<
" is NULL in CPUIF() !!!!"<<endl;
3178 for(
Int_t rp=0;rp<2;rp++)
3180 for(
Int_t pe=0;pe<2;pe++)
3185 cout<<
" WARNING (GFC): "<<Form(
"fNoOfParticlesInBin[%d][%d]",rp,pe)<<
" is NULL in CPUIF() !!!!"<<endl;
3197 cout<<
"WARNING (GFC): fReferenceFlowGenFunVsM is NULL in CPUIF() !!!!"<<endl;
3204 cout<<
"WARNING (GFC): fQvectorComponentsVsM is NULL in CPUIF() !!!!"<<endl;
3211 cout<<
"WARNING (GFC): fAverageOfSquaredWeightVsM is NULL in CPUIF() !!!!"<<endl;
3218 cout<<
"WARNING (GFC): fAvMVsM is NULL in CPUIF() !!!!"<<endl;
3252 TFile *output =
new TFile(outputFileName->Data(),
"RECREATE");
3267 TFile *output =
new TFile(outputFileName.Data(),
"RECREATE");
3285 outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey);
TProfile2D * fReferenceFlowGenFun
Double_t GetEtaMax() const
Bool_t FillChi(Double_t aChi)
virtual void GetPointersForCommonResultsHistograms()
virtual void BookCommonHistograms()
TString * fMultiplicityWeight
void SetCommonHistsResults4th(AliFlowCommonHistResults *const chr4th)
virtual void GetPointersForCommonControlHistograms()
virtual AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
TH1D * fReferenceFlowCumulants
virtual void InitializeArrays()
virtual void WriteHistograms(TString *outputFileName)
TProfile * fNoOfParticlesInBin[2][2]
virtual void BookEverythingForTuning()
virtual void BookProfileHoldingSettings()
AliFlowTrackSimple * GetTrack(Int_t i)
TList * fReferenceFlowResults
virtual void CheckPointersUsedInMake()
TProfile * fDiffFlowFlags
TH1D * GetHistIntFlowRP()
virtual void CalculateCumulantsForDiffFlow(TString rpPoi, TString ptEta)
virtual void FillQvectorComponents(AliFlowEventSimple *anEvent)
void SetReferenceFlowCumulantsVsM(TH1D *const rfcVsM, Int_t co)
TH1D * fTuningCumulants[10][5]
virtual void GetAvMultAndNoOfEvts()
Int_t GetNbinsPhi() const
void SetAvMVsM(TProfile *const amVsM)
Double_t GetPtMin() const
virtual void BookEverythingForReferenceFlow()
virtual void CalculateReferenceFlow()
virtual void CalculateDifferentialFlow(TString rpPoi, TString ptEta)
void SetAverageOfSquaredWeight(TProfile *const aosw)
TH1D * fDiffFlowCumulants[2][2][4]
Bool_t FillDifferentialFlowPtRP(Int_t aBin, Double_t av, Double_t anError)
Int_t GetEventNSelTracksRP() const
virtual void GetPointersForTuningObjects()
TList * fReferenceFlowList
virtual void FillCommonHistResultsForDifferentialFlow(TString rpPoi)
TProfile * fAnalysisSettings
Double_t GetPtMax() const
void SetTuningFlags(TProfile *const tf)
virtual void CalculateIntegratedFlow(TString rpPoi)
void SetTuningFlow(TH1D *const tf, Int_t const r, Int_t const pq)
void SetAnalysisSettings(TProfile *const as)
TList * fDiffFlowProfiles
Bool_t InRPSelection() const
Bool_t FillControlHistograms(AliFlowEventSimple *anEvent, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
Bool_t fPrintFinalResults[3]
void SetReferenceFlowFlags(TProfile *const rff)
TProfile2D * fAverageOfSquaredWeightVsM
virtual void BookAndFillWeightsHistograms()
TH1D * fReferenceFlowCumulantsVsM[4]
void SetReferenceFlowCumulants(TH1D *const rfc)
void SetCommonHistsResults8th(AliFlowCommonHistResults *const chr8th)
virtual void PrintFinalResults(TString rpPoi)
void SetReferenceFlowGenFun(TProfile2D *const rfgf)
TH1D * GetHistIntFlowPOI()
AliFlowCommonHist * fCommonHists
void SetCommonHists(AliFlowCommonHist *const ch)
virtual void FillGeneratingFunctionForReferenceFlow(AliFlowEventSimple *anEvent)
TProfile3D * fDiffFlowGenFun[2][2][2]
virtual void CalculateReferenceFlowError()
Bool_t FillIntegratedFlowRP(Double_t aV, Double_t anError)
virtual void BookEverythingForDiffFlow()
void SetHistList(TList *const hl)
void SetNoOfParticlesInBin(TProfile *const nopib, Int_t const rp, Int_t const pe)
Double_t GetPhiMax() const
TH1D * fDiffFlow[2][2][4]
virtual void GetPointersForDiffFlowObjects()
void SetMult(Double_t mult)
virtual void FillCommonHistResultsForReferenceFlow()
void SetDiffFlowGenFun(TProfile3D *const dfgf, Int_t const ri, Int_t const rp, Int_t const pe)
Bool_t fCalculateVsMultiplicity
virtual void BookEverythingForCalculationVsMultiplicity()
virtual void CheckPointersUsedInFinish()
Int_t GetNbinsEta() const
static AliFlowCommonConstants * GetMaster()
void SetTuningGenFun(TProfile2D *const tgf, Int_t const r, Int_t const pq)
virtual void StoreReferenceFlowFlags()
virtual void AccessSettings()
TProfile2D * fTuningGenFun[10][5]
virtual void CrossCheckSettings()
void SetDiffFlow(TH1D *const df, Int_t const rp, Int_t const pe, Int_t const co)
AliFlowCommonHistResults * fCommonHistsResults6th
virtual void GetPointersForBaseHistograms()
virtual void FinalizeTuning()
Bool_t Data(TH1F *h, Double_t *rangefit, Bool_t writefit, Double_t &sgn, Double_t &errsgn, Double_t &bkg, Double_t &errbkg, Double_t &sgnf, Double_t &errsgnf, Double_t &sigmafit, Int_t &status)
TH1D * fTuningFlow[10][5]
virtual void FillGeneratingFunctionsForDifferentTuningParameters(AliFlowEventSimple *anEvent)
void SetDiffFlowCumulants(TH1D *const dfc, Int_t const rp, Int_t const pe, Int_t const co)
Bool_t FillIntegratedFlow(Double_t aV, Double_t anError)
virtual void AccessConstants()
void SetReferenceFlowGenFunVsM(TProfile3D *const rfgfVsM)
Bool_t FillDifferentialFlowEtaPOI(Int_t aBin, Double_t av, Double_t anError)
Bool_t FillIntegratedFlowPOI(Double_t aV, Double_t anError)
TProfile * fQvectorComponents
void SetReferenceFlow(TH1D *const rf)
void SetCommonHistsResults6th(AliFlowCommonHistResults *const chr6th)
virtual void FillGeneratingFunctionForDiffFlow(AliFlowEventSimple *anEvent)
Bool_t FillDifferentialFlowPtPOI(Int_t aBin, Double_t av, Double_t anError)
Double_t GetPhiMin() const
AliFlowCommonHistResults * fCommonHistsResults8th
void SetQvectorComponentsVsM(TProfile2D *const qvcVsM)
Double_t GetEtaMin() const
virtual void CalculateCumulantsForReferenceFlow()
AliFlowCommonHistResults * fCommonHistsResults2nd
TProfile3D * fReferenceFlowGenFunVsM
virtual ~AliFlowAnalysisWithCumulants()
TList * fReferenceFlowProfiles
virtual void Make(AliFlowEventSimple *anEvent)
void SetTuningAvM(TProfile *const tam)
AliFlowCommonHistResults * fCommonHistsResults4th
virtual void GetOutputHistograms(TList *outputListHistos)
TProfile * fAverageOfSquaredWeight
Bool_t InPOISelection(Int_t poiType=1) const
void SetAverageOfSquaredWeightVsM(TProfile2D *const aoswVsM)
void SetChi(TH1D *const c)
virtual void CalculateDifferentialFlowErrors(TString rpPoi, TString ptEta)
void SetCommonHistsResults2nd(AliFlowCommonHistResults *const chr2nd)
void SetQvectorComponents(TProfile *const qvc)
void SetDiffFlowFlags(TProfile *const dff)
void SetTuningCumulants(TH1D *const tc, Int_t const r, Int_t const pq)
virtual void StoreDiffFlowFlags()
TProfile2D * fQvectorComponentsVsM
Bool_t FillDifferentialFlowEtaRP(Int_t aBin, Double_t av, Double_t anError)
TProfile * fReferenceFlowFlags
virtual void BookAndNestAllLists()
ClassImp(AliFlowAnalysisWithCumulants) AliFlowAnalysisWithCumulants
virtual void GetPointersForReferenceFlowObjects()
Int_t NumberOfTracks() const