* Author: The ALICE Off-line Project. *
* Contributors are mentioned in the code where appropriate. *
* *
-* Permission to use, copy, modify and distribute this software and its *f
+* Permission to use, copy, modify and distribute this software and its *
* documentation strictly for non-commercial purposes is hereby granted *
* without fee, provided that the above copyright notice appears in all *
* copies and that both the copyright notice and this permission notice *
#include "TFile.h"
#include "TList.h"
#include "TH1.h"
+#include "TGraph.h"
#include "TProfile.h"
#include "TProfile2D.h"
#include "TProfile3D.h"
#include "AliFlowAnalysisWithQCumulants.h"
#include "AliFlowCumuConstants.h"
#include "AliFlowCommonConstants.h"
+#include "AliFlowCommonHist.h"
#include "AliFlowCommonHistResults.h"
#include "AliQCumulantsFunctions.h"
//event maker
fEventMaker = new AliFlowEventSimpleMaker();
-
+
//analyser
fQCA = new AliFlowAnalysisWithQCumulants();
- fQCA->CreateOutputObjects();
+ fQCA->Init();
if(fQCA->GetHistList())
{
}
Printf("There are %d tracks in this event", fESD->GetNumberOfTracks());
- //Q-cumulant analysis
- AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD);
- fQCA->Make(fEvent);
+ //Q-cumulant analysis
+ AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD,fCFManager1,fCFManager2);//cuts
+ //AliFlowEventSimple* fEvent = fEventMaker->FillTracks(fESD);
+
+ fQCA->Make(fEvent);
+
delete fEvent;
}
else if (fAnalysisType == "ESDMC0") {
//================================================================================================================
void AliAnalysisTaskQCumulants::Terminate(Option_t *)
-{
+{
//accessing the output list which contains the merged 2D and 3D profiles from all worker nodes
fListHistos = (TList*)GetOutputData(0);
//fListHistos->Print();
if(fListHistos)
{
- //histograms to store the final results (integrated flow)
- TH1D *intFlowResults = dynamic_cast<TH1D*>(fListHistos->FindObject("fIntFlowResults"));
+ //final results (integrated flow)
+ TH1D *intFlowResults = dynamic_cast<TH1D*>(fListHistos->FindObject("fIntFlowResultsQC"));
- //histograms to store the final results (differential flow)
- TH1D *diffFlowResults2ndOrder = dynamic_cast<TH1D*>(fListHistos->FindObject("fDiffFlowResults2ndOrder"));
- TH1D *diffFlowResults4thOrder = dynamic_cast<TH1D*>(fListHistos->FindObject("fDiffFlowResults4thOrder"));
+ //final results (differential flow)
+ TH1D *diffFlowResults2ndOrder = dynamic_cast<TH1D*>(fListHistos->FindObject("fDiffFlowResults2ndOrderQC"));
+ TH1D *diffFlowResults4thOrder = dynamic_cast<TH1D*>(fListHistos->FindObject("fDiffFlowResults4thOrderQC"));
+ //final results for covariances (1st bin <2*4>-<2>*<4>, 2nd bin <2*6>-<2>*<6>, ...)
+ TH1D *covariances = dynamic_cast<TH1D*>(fListHistos->FindObject("fCovariances"));
- //profile with avarage selected multiplicity for int. flow
- TProfile *AvMultHere = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlow"));
+ //common control histograms (taking into account only the events with 2 and more particles)
+ AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHist2ndOrderQC"));
- //profile with avarage values of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
- TProfile *QvectorComponentsHere = dynamic_cast<TProfile*>(fListHistos->FindObject("fQvectorComponents"));
+ //common control histograms (taking into account only the events with 4 and more particles)
+ AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHist4thOrderQC"));
- TProfile *QCorrelations = dynamic_cast<TProfile*>(fListHistos->FindObject("fQCorrelations"));
- TProfile *QCovariance = dynamic_cast<TProfile*>(fListHistos->FindObject("fQCovariance"));
+ //common control histograms (taking into account only the events with 6 and more particles)
+ AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHist6thOrderQC"));
- TProfile *QCorrelationsPerBin = dynamic_cast<TProfile*>(fListHistos->FindObject("fQCorrelationsPerBin"));
+ //common control histograms (taking into account only the events with 8 and more particles)
+ AliFlowCommonHist *commonHist8th = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHist8thOrderQC"));
+ //common histograms to store the final results for the 2nd order integrated and differential flow
+ AliFlowCommonHistResults *commonHistRes2nd = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResults2ndOrderQC"));
+ //common histograms to store the final results for the 4th order integrated and differential flow
+ AliFlowCommonHistResults *commonHistRes4th = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResults4thOrderQC"));
- TProfile *DirectHere = dynamic_cast<TProfile*>(fListHistos->FindObject("fDirectCorrelations"));
+ //common histograms to store the final results for the 6th order integrated and differential flow
+ AliFlowCommonHistResults *commonHistRes6th = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResults6thOrderQC"));
+ //common histograms to store the final results for the 8th order integrated and differential flow
+ AliFlowCommonHistResults *commonHistRes8th = dynamic_cast<AliFlowCommonHistResults*>(fListHistos->FindObject("AliFlowCommonHistResults8thOrderQC"));
- TProfile *binned2p_1n1n = dynamic_cast<TProfile*>(fListHistos->FindObject("f2_1n1n"));
- TProfile *binned2p_2n2n = dynamic_cast<TProfile*>(fListHistos->FindObject("f2_2n2n"));
- TProfile *binned3p_2n1n1n = dynamic_cast<TProfile*>(fListHistos->FindObject("f3_2n1n1n"));
- TProfile *binned3p_1n1n2n = dynamic_cast<TProfile*>(fListHistos->FindObject("f3_1n1n2n"));
- TProfile *binned4p_1n1n1n1n = dynamic_cast<TProfile*>(fListHistos->FindObject("f4_1n1n1n1n"));
-
-
+ //average selected multiplicity (for int. flow)
+ TProfile *AvMult = dynamic_cast<TProfile*>(fListHistos->FindObject("fAvMultIntFlowQC"));
+
+ //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ // !!!! to be removed !!!!
+ //profiles containing the Q-vectors from all events
+ TProfile *qvectorForEachEventX = dynamic_cast<TProfile*>(fListHistos->FindObject("fQvectorForEachEventX"));
+ TProfile *qvectorForEachEventY = dynamic_cast<TProfile*>(fListHistos->FindObject("fQvectorForEachEventY"));
+ //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ //multi-particle correlations calculated from Q-vectors
+ TProfile *QCorrelations = dynamic_cast<TProfile*>(fListHistos->FindObject("fQCorrelations"));
- AliQCumulantsFunctions finalResults(intFlowResults,diffFlowResults2ndOrder,diffFlowResults4thOrder,AvMultHere,QvectorComponentsHere,QCorrelations,QCovariance,QCorrelationsPerBin,DirectHere,binned2p_1n1n,binned2p_2n2n, binned3p_2n1n1n,binned3p_1n1n2n, binned4p_1n1n1n1n);
-
- finalResults.Calculate();
-
+ //average of products: 1st bin: <2*4>, 2nd bin: <2*6>, ...
+ TProfile *QProduct = dynamic_cast<TProfile*>(fListHistos->FindObject("fQProduct"));
+
+ //average 2-, 3- and 4-particle correlations per pt-bin
+ TProfile *binnedPt2p1n1nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f2PerPtBin1n1nRP"));
+ TProfile *binnedPt2p2n2nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f2PerPtBin2n2nRP"));
+ TProfile *binnedPt3p2n1n1nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f3PerPtBin2n1n1nRP"));
+ TProfile *binnedPt3p1n1n2nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f3PerPtBin1n1n2nRP"));
+ TProfile *binnedPt4p1n1n1n1nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f4PerPtBin1n1n1n1nRP"));
+
+ //average 2-, 3- and 4-particle correlations per eta-bin
+ TProfile *binnedEta2p1n1nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f2PerEtaBin1n1nRP"));
+ TProfile *binnedEta2p2n2nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f2PerEtaBin2n2nRP"));
+ TProfile *binnedEta3p2n1n1nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f3PerEtaBin2n1n1nRP"));
+ TProfile *binnedEta3p1n1n2nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f3PerEtaBin1n1n2nRP"));
+ TProfile *binnedEta4p1n1n1n1nRP = dynamic_cast<TProfile*>(fListHistos->FindObject("f4PerEtaBin1n1n1n1nRP"));
+
+ //average 2-, 3- and 4-particle correlations per pt-bin
+ TProfile *binnedPt2p1n1nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f2PerPtBin1n1nPOI"));
+ TProfile *binnedPt2p2n2nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f2PerPtBin2n2nPOI"));
+ TProfile *binnedPt3p2n1n1nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f3PerPtBin2n1n1nPOI"));
+ TProfile *binnedPt3p1n1n2nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f3PerPtBin1n1n2nPOI"));
+ TProfile *binnedPt4p1n1n1n1nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f4PerPtBin1n1n1n1nPOI"));
+
+ //average 2-, 3- and 4-particle correlations per eta-bin
+ TProfile *binnedEta2p1n1nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f2PerEtaBin1n1nPOI"));
+ TProfile *binnedEta2p2n2nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f2PerEtaBin2n2nPOI"));
+ TProfile *binnedEta3p2n1n1nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f3PerEtaBin2n1n1nPOI"));
+ TProfile *binnedEta3p1n1n2nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f3PerEtaBin1n1n2nPOI"));
+ TProfile *binnedEta4p1n1n1n1nPOI = dynamic_cast<TProfile*>(fListHistos->FindObject("f4PerEtaBin1n1n1n1nPOI"));
+
+ //average values of Q-vector components (1st bin: <Q_x>, 2nd bin: <Q_y>, 3rd bin: <(Q_x)^2>, 4th bin: <(Q_y)^2>)
+ TProfile *QVectorComponents = dynamic_cast<TProfile*>(fListHistos->FindObject("fQvectorComponents"));
+
+ //multi-particle correlations calculated with nested loop
+ TProfile *DirectCorrelations = dynamic_cast<TProfile*>(fListHistos->FindObject("fDirectCorrelations"));
+
+ //----------------------------------------------------
+
+ fQCA = new AliFlowAnalysisWithQCumulants();
+
+ fQCA->SetIntFlowResults(intFlowResults);
+ fQCA->SetDiffFlowResults2nd(diffFlowResults2ndOrder);
+ fQCA->SetDiffFlowResults4th(diffFlowResults4thOrder);
+ fQCA->SetCovariances(covariances);
+
+ fQCA->SetCommonHists2nd(commonHist2nd);
+ fQCA->SetCommonHists4th(commonHist4th);
+ fQCA->SetCommonHists6th(commonHist6th);
+ fQCA->SetCommonHists8th(commonHist8th);
+
+ fQCA->SetCommonHistsResults2nd(commonHistRes2nd);
+ fQCA->SetCommonHistsResults4th(commonHistRes4th);
+ fQCA->SetCommonHistsResults6th(commonHistRes6th);
+ fQCA->SetCommonHistsResults8th(commonHistRes8th);
+ fQCA->SetAverageMultiplicity(AvMult);
+ //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ // !!!! to be removed !!!!
+ fQCA->SetQvectorForEachEventX(qvectorForEachEventX);
+ fQCA->SetQvectorForEachEventY(qvectorForEachEventY);
+ //xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+ fQCA->SetQCorrelations(QCorrelations);
+ fQCA->SetQProduct(QProduct);
+ fQCA->SetQVectorComponents(QVectorComponents);
+ fQCA->SetTwo1n1nPerPtBinRP(binnedPt2p1n1nRP);
+ fQCA->SetTwo2n2nPerPtBinRP(binnedPt2p2n2nRP);
+ fQCA->SetThree2n1n1nPerPtBinRP(binnedPt3p2n1n1nRP);
+ fQCA->SetThree1n1n2nPerPtBinRP(binnedPt3p1n1n2nRP);
+ fQCA->SetFour1n1n1n1nPerPtBinRP(binnedPt4p1n1n1n1nRP);
+
+ fQCA->SetTwo1n1nPerEtaBinRP(binnedEta2p1n1nRP);
+ fQCA->SetTwo2n2nPerEtaBinRP(binnedEta2p2n2nRP);
+ fQCA->SetThree2n1n1nPerEtaBinRP(binnedEta3p2n1n1nRP);
+ fQCA->SetThree1n1n2nPerEtaBinRP(binnedEta3p1n1n2nRP);
+ fQCA->SetFour1n1n1n1nPerEtaBinRP(binnedEta4p1n1n1n1nRP);
+
+ fQCA->SetTwo1n1nPerPtBinPOI(binnedPt2p1n1nPOI);
+ fQCA->SetTwo2n2nPerPtBinPOI(binnedPt2p2n2nPOI);
+ fQCA->SetThree2n1n1nPerPtBinPOI(binnedPt3p2n1n1nPOI);
+ fQCA->SetThree1n1n2nPerPtBinPOI(binnedPt3p1n1n2nPOI);
+ fQCA->SetFour1n1n1n1nPerPtBinPOI(binnedPt4p1n1n1n1nPOI);
+
+ fQCA->SetTwo1n1nPerEtaBinPOI(binnedEta2p1n1nPOI);
+ fQCA->SetTwo2n2nPerEtaBinPOI(binnedEta2p2n2nPOI);
+ fQCA->SetThree2n1n1nPerEtaBinPOI(binnedEta3p2n1n1nPOI);
+ fQCA->SetThree1n1n2nPerEtaBinPOI(binnedEta3p1n1n2nPOI);
+ fQCA->SetFour1n1n1n1nPerEtaBinPOI(binnedEta4p1n1n1n1nPOI);
+
+ fQCA->SetDirectCorrelations(DirectCorrelations);
+
+ fQCA->Finish();
+
+ //----------------------------------------------------
}
else
{