#include "AliFlowAnalysisWithQCumulants.h"
#include "AliFlowCumuConstants.h"
#include "AliFlowCommonConstants.h"
+#include "AliFlowCommonHist.h"
#include "AliFlowCommonHistResults.h"
#include "AliQCumulantsFunctions.h"
//final results for covariances (1st bin <2*4>-<2>*<4>, 2nd bin <2*6>-<2>*<6>, ...)
TH1D *covariances = dynamic_cast<TH1D*>(fListHistos->FindObject("fCovariances"));
+ //common control histograms (taking into account only the events with 2 and more particles)
+ AliFlowCommonHist *commonHist2nd = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHist2ndOrderQC"));
+
+ //common control histograms (taking into account only the events with 4 and more particles)
+ AliFlowCommonHist *commonHist4th = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHist4thOrderQC"));
+
+ //common control histograms (taking into account only the events with 6 and more particles)
+ AliFlowCommonHist *commonHist6th = dynamic_cast<AliFlowCommonHist*>(fListHistos->FindObject("AliFlowCommonHist6thOrderQC"));
+
+ //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"));
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);
void AliFlowAnalysisWithQCumulants::Finish()
{
//calculate the final results
- AliQCumulantsFunctions finalResults(fIntFlowResultsQC,fDiffFlowResults2ndOrderQC,fDiffFlowResults4thOrderQC,fCovariances,fAvMultIntFlowQC,fQvectorComponents,fQCorrelations, fQProduct,fDirectCorrelations,f2PerPtBin1n1nRP,f2PerPtBin2n2nRP,f3PerPtBin2n1n1nRP,f3PerPtBin1n1n2nRP,f4PerPtBin1n1n1n1nRP, f2PerEtaBin1n1nRP,f2PerEtaBin2n2nRP,f3PerEtaBin2n1n1nRP,f3PerEtaBin1n1n2nRP,f4PerEtaBin1n1n1n1nRP, f2PerPtBin1n1nPOI,f2PerPtBin2n2nPOI,f3PerPtBin2n1n1nPOI,f3PerPtBin1n1n2nPOI,f4PerPtBin1n1n1n1nPOI, f2PerEtaBin1n1nPOI,f2PerEtaBin2n2nPOI,f3PerEtaBin2n1n1nPOI,f3PerEtaBin1n1n2nPOI,f4PerEtaBin1n1n1n1nPOI,fCommonHistsResults2nd, fCommonHistsResults4th,fCommonHistsResults6th,fCommonHistsResults8th);
-
+ AliQCumulantsFunctions finalResults(fIntFlowResultsQC,fDiffFlowResults2ndOrderQC,fDiffFlowResults4thOrderQC,fCovariances,fAvMultIntFlowQC,fQvectorComponents,fQCorrelations, fQProduct,fDirectCorrelations,f2PerPtBin1n1nRP,f2PerPtBin2n2nRP,f3PerPtBin2n1n1nRP,f3PerPtBin1n1n2nRP,f4PerPtBin1n1n1n1nRP, f2PerEtaBin1n1nRP,f2PerEtaBin2n2nRP,f3PerEtaBin2n1n1nRP,f3PerEtaBin1n1n2nRP,f4PerEtaBin1n1n1n1nRP, f2PerPtBin1n1nPOI,f2PerPtBin2n2nPOI,f3PerPtBin2n1n1nPOI,f3PerPtBin1n1n2nPOI,f4PerPtBin1n1n1n1nPOI, f2PerEtaBin1n1nPOI,f2PerEtaBin2n2nPOI,f3PerEtaBin2n1n1nPOI,f3PerEtaBin1n1n2nPOI,f4PerEtaBin1n1n1n1nPOI,fCommonHists2nd,fCommonHists4th, fCommonHists6th, fCommonHists8th,fCommonHistsResults2nd, fCommonHistsResults4th,fCommonHistsResults6th,fCommonHistsResults8th);
+
finalResults.Calculate();
}
void SetCovariances(TH1D* const cov) {this->fCovariances = cov;};
TH1D* GetCovariances() const {return this->fCovariances;};
+ void SetCommonHists2nd(AliFlowCommonHist* const ch2nd) {this->fCommonHists2nd = ch2nd;};
+ AliFlowCommonHist* GetCommonHists2nd() const {return this->fCommonHists2nd;};
+
+ void SetCommonHists4th(AliFlowCommonHist* const ch4th) {this->fCommonHists4th = ch4th;};
+ AliFlowCommonHist* GetCommonHists4th() const {return this->fCommonHists4th;};
+
+ void SetCommonHists6th(AliFlowCommonHist* const ch6th) {this->fCommonHists6th = ch6th;};
+ AliFlowCommonHist* GetCommonHists6th() const {return this->fCommonHists6th;};
+
+ void SetCommonHists8th(AliFlowCommonHist* const ch8th) {this->fCommonHists8th = ch8th;};
+ AliFlowCommonHist* GetCommonHists8th() const {return this->fCommonHists8th;};
+
void SetCommonHistsResults2nd(AliFlowCommonHistResults* const chr2nd) {this->fCommonHistsResults2nd = chr2nd;};
AliFlowCommonHistResults* GetCommonHistsResults2nd() const {return this->fCommonHistsResults2nd;};
TProfile* f3PerEtaBin1n1n2nPOI; //<<3'>>_{n,n|2n} per eta-bin
TProfile* f4PerEtaBin1n1n1n1nPOI; //<<4'>>_{n,n|n,n} per eta-bin
- AliFlowCommonHist* fCommonHists2nd; //common control histograms for 2nd order
- AliFlowCommonHist* fCommonHists4th; //common control histograms for 4th order
- AliFlowCommonHist* fCommonHists6th; //common control histograms for 6th order
- AliFlowCommonHist* fCommonHists8th; //common control histograms for 8th order
+ AliFlowCommonHist* fCommonHists2nd; //common control histograms (taking into account only the events with 2 and more particles)
+ AliFlowCommonHist* fCommonHists4th; //common control histograms (taking into account only the events with 4 and more particles)
+ AliFlowCommonHist* fCommonHists6th; //common control histograms (taking into account only the events with 6 and more particles)
+ AliFlowCommonHist* fCommonHists8th; //common control histograms (taking into account only the events with 8 and more particles)
AliFlowCommonHistResults* fCommonHistsResults2nd; //final results for 2nd order int. and diff. flow stored in the common histograms
AliFlowCommonHistResults* fCommonHistsResults4th; //final results for 4th order int. and diff. flow stored in the common histograms
#include "AliFlowTrackSimple.h"
#include "AliFlowAnalysisWithCumulants.h"
#include "AliFlowCommonConstants.h"
+#include "AliFlowCommonHist.h"
#include "AliFlowCommonHistResults.h"
#include "AliQCumulantsFunctions.h"
fbinEta3p2n1n1nPOI(NULL),
fbinEta3p1n1n2nPOI(NULL),
fbinEta4p1n1n1n1nPOI(NULL),
- fchr2nd(NULL),
+ fch2nd(NULL),//ch = common histogram (control)
+ fch4th(NULL),
+ fch6th(NULL),
+ fch8th(NULL),
+ fchr2nd(NULL),//chr = common histogram results
fchr4th(NULL),
fchr6th(NULL),
fchr8th(NULL)
//destructor
}
-AliQCumulantsFunctions::AliQCumulantsFunctions(TH1D *intRes, TH1D *diffRes2nd, TH1D *diffRes4th, TH1D *covar, TProfile *AvMult, TProfile *QVector, TProfile *QCorr, TProfile *QProd, TProfile *Direct, TProfile *binPt2p1n1nRP, TProfile *binPt2p2n2nRP, TProfile *binPt3p2n1n1nRP, TProfile *binPt3p1n1n2nRP, TProfile *binPt4p1n1n1n1nRP, TProfile *binEta2p1n1nRP, TProfile *binEta2p2n2nRP, TProfile *binEta3p2n1n1nRP, TProfile *binEta3p1n1n2nRP, TProfile *binEta4p1n1n1n1nRP, TProfile *binPt2p1n1nPOI, TProfile *binPt2p2n2nPOI, TProfile *binPt3p2n1n1nPOI, TProfile *binPt3p1n1n2nPOI, TProfile *binPt4p1n1n1n1nPOI, TProfile *binEta2p1n1nPOI, TProfile *binEta2p2n2nPOI, TProfile *binEta3p2n1n1nPOI, TProfile *binEta3p1n1n2nPOI, TProfile *binEta4p1n1n1n1nPOI, AliFlowCommonHistResults *chr2nd, AliFlowCommonHistResults *chr4th, AliFlowCommonHistResults *chr6th, AliFlowCommonHistResults *chr8th):
+AliQCumulantsFunctions::AliQCumulantsFunctions(TH1D *intRes, TH1D *diffRes2nd, TH1D *diffRes4th, TH1D *covar, TProfile *AvMult, TProfile *QVector, TProfile *QCorr, TProfile *QProd, TProfile *Direct, TProfile *binPt2p1n1nRP, TProfile *binPt2p2n2nRP, TProfile *binPt3p2n1n1nRP, TProfile *binPt3p1n1n2nRP, TProfile *binPt4p1n1n1n1nRP, TProfile *binEta2p1n1nRP, TProfile *binEta2p2n2nRP, TProfile *binEta3p2n1n1nRP, TProfile *binEta3p1n1n2nRP, TProfile *binEta4p1n1n1n1nRP, TProfile *binPt2p1n1nPOI, TProfile *binPt2p2n2nPOI, TProfile *binPt3p2n1n1nPOI, TProfile *binPt3p1n1n2nPOI, TProfile *binPt4p1n1n1n1nPOI, TProfile *binEta2p1n1nPOI, TProfile *binEta2p2n2nPOI, TProfile *binEta3p2n1n1nPOI, TProfile *binEta3p1n1n2nPOI, TProfile *binEta4p1n1n1n1nPOI, AliFlowCommonHist *ch2nd, AliFlowCommonHist *ch4th, AliFlowCommonHist *ch6th, AliFlowCommonHist *ch8th, AliFlowCommonHistResults *chr2nd, AliFlowCommonHistResults *chr4th, AliFlowCommonHistResults *chr6th, AliFlowCommonHistResults *chr8th):
fIntRes(intRes),
fDiffRes2nd(diffRes2nd),
fDiffRes4th(diffRes4th),
fbinEta2p2n2nPOI(binEta2p2n2nPOI),
fbinEta3p2n1n1nPOI(binEta3p2n1n1nPOI),
fbinEta3p1n1n2nPOI(binEta3p1n1n2nPOI),
- fbinEta4p1n1n1n1nPOI(binEta4p1n1n1n1nPOI),
+ fbinEta4p1n1n1n1nPOI(binEta4p1n1n1n1nPOI),
+ fch2nd(ch2nd),
+ fch4th(ch4th),
+ fch6th(ch6th),
+ fch8th(ch8th),
fchr2nd(chr2nd),
fchr4th(chr4th),
fchr6th(chr6th),
}
}
-
//differential flow (POI)
+Int_t nBinsPtPOI = fbinPt2p1n1nPOI->GetNbinsX();
+Int_t nBinsEtaPOI = fbinEta2p1n1nPOI->GetNbinsX();
//Pt:
Double_t secondOrderQCumulantDiffFlowPtPOI = 0.;
Double_t fourthOrderQCumulantDiffFlowPtPOI = 0.;
-Int_t nBinsPtPOI = fbinPt2p1n1nPOI->GetNbinsX();
+Double_t dVn2ndPOI=0.,dDiffvn2nd=0.,dYield2nd=0.,dSum2nd=0.;
+
+Double_t dVn2ndPOIEta=0.,dDiffvn2ndEta=0.,dYield2ndEta=0.,dSum2ndEta=0.;//to be removed
for(Int_t bb=1;bb<nBinsPtPOI+1;bb++)
{
+ //QC{2}
if(fbinPt2p1n1nPOI->GetBinEntries(bb)>0.&&vn2!=0)
{
+ //cout<<"bin = "<<bb<<" : "<<(fch2nd->GetHistPtDiff())->GetBinContent(bb)<<endl;
+ //cout<<endl;
secondOrderQCumulantDiffFlowPtPOI = fbinPt2p1n1nPOI->GetBinContent(bb);
fDiffRes2nd->SetBinContent(bb,secondOrderQCumulantDiffFlowPtPOI/vn2);
//common histogram:
- fchr2nd->FillDifferentialFlowPtPOI(bb,secondOrderQCumulantDiffFlowPtPOI/vn2, 0.);//to be improved (errors)
+ fchr2nd->FillDifferentialFlowPtPOI(bb,secondOrderQCumulantDiffFlowPtPOI/vn2, 0.);//to be improved (errors) && bb or bb+1
+ //-------------------------------------------------------------
+ //integrated flow (POI, Pt, 2nd order):
+ dDiffvn2nd=(fchr2nd->GetHistDiffFlowPtPOI())->GetBinContent(bb);
+ dYield2nd=(fch2nd->GetHistPtDiff())->GetBinContent(bb);
+ dVn2ndPOI+=dDiffvn2nd*dYield2nd;
+ dSum2nd+=dYield2nd;
+ //-------------------------------------------------------------
}
+ //QC{4]
if(fbinPt4p1n1n1n1nPOI->GetBinEntries(bb)>0.&&vn4!=0.)
{
fourthOrderQCumulantDiffFlowPtPOI = fbinPt4p1n1n1n1nPOI->GetBinContent(bb)-2.*fbinPt2p1n1nPOI->GetBinContent(bb)*pow(vn2,2.);
}
}
+//storing the final results for integrated flow (POI):
+//QC{2}
+if(dSum2nd && fchr2nd)
+{
+ dVn2ndPOI/=dSum2nd;
+ fchr2nd->FillIntegratedFlowPOI(dVn2ndPOI,0.);
+}
+
+
+
+
//Eta:
Double_t secondOrderQCumulantDiffFlowEtaPOI = 0.;
Double_t fourthOrderQCumulantDiffFlowEtaPOI = 0.;
-Int_t nBinsEtaPOI = fbinEta2p1n1nPOI->GetNbinsX();
-
for(Int_t bb=1;bb<nBinsEtaPOI+1;bb++)
{
if(fbinEta2p1n1nPOI->GetBinEntries(bb)>0.&&vn2!=0)
-
+//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+// !!!! to be removed !!!!
+for(Int_t bb=1;bb<nBinsEtaPOI+1;bb++)
+{
+ //integrated flow (POI, Eta, 2nd order):
+ dDiffvn2ndEta=(fchr2nd->GetHistDiffFlowEtaPOI())->GetBinContent(bb);
+ dYield2ndEta=(fch2nd->GetHistEtaDiff())->GetBinContent(bb);
+ // cout<<"bin = "<<bb<<" : "<<dDiffvn2ndEta<<" "<<dYield2ndEta<<endl;
+ // cout<<endl;
+ dVn2ndPOIEta+=dDiffvn2ndEta*dYield2ndEta;
+ dSum2ndEta+=dYield2ndEta;
+
+
+//check why for small number of events there is a mismatch here (should be exactly the same)://to be removed
+//cout<<dSum2nd<<" to be improved "<<(fch2nd->GetHistPtDiff())->Integral()<<endl;//to be removed
+}
+if(dSum2ndEta)
+{
+ dVn2ndPOIEta/=dSum2ndEta;
+ //cout<<"POI Pt vs POI Eta:"<<endl;
+ //cout<<dVn2ndPOI<<" vs "<<dVn2ndPOIEta<<endl;
+ //cout<<dSum2nd<<" vs "<<dSum2ndEta<<endl;
+// cout<<"eta = "<<(fchr2nd->GetHistDiffFlowEtaPOI())->GetBinContent(44)<<endl;
+// cout<<"poi = "<<(fchr2nd->GetHistDiffFlowPtPOI())->GetBinContent(14)<<endl;
+// cout<<"+++++++++"<<endl;
+}
+
+//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
/*
Double_t first=16.*pow(two*twoErr,2.);
public:
AliQCumulantsFunctions();
virtual ~AliQCumulantsFunctions();
- AliQCumulantsFunctions(TH1D *intRes, TH1D *diffRes2nd, TH1D *diffRes4th, TH1D *covar, TProfile *AvMult, TProfile *QVector, TProfile *QCorr, TProfile *QProd, TProfile *Direct, TProfile *binPt2p1n1nRP, TProfile *binPt2p2n2nRP, TProfile *binPt3p2n1n1nRP, TProfile *binPt3p1n1n2nRP, TProfile *binPt4p1n1n1n1nRP, TProfile *binEta2p1n1nRP, TProfile *binEta2p2n2nRP, TProfile *binEta3p2n1n1nRP, TProfile *binEta3p1n1n2nRP, TProfile *binEta4p1n1n1n1nRP, TProfile *binPt2p1n1nPOI, TProfile *binPt2p2n2nPOI, TProfile *binPt3p2n1n1nPOI, TProfile *binPt3p1n1n2nPOI, TProfile *binPt4p1n1n1n1nPOI, TProfile *binEta2p1n1nPOI, TProfile *binEta2p2n2nPOI, TProfile *binEta3p2n1n1nPOI, TProfile *binEta3p1n1n2nPOI, TProfile *binEta4p1n1n1n1nPOI, AliFlowCommonHistResults *chr2nd, AliFlowCommonHistResults *chr4th, AliFlowCommonHistResults *chr6th, AliFlowCommonHistResults *chr8th);
+ AliQCumulantsFunctions(TH1D *intRes, TH1D *diffRes2nd, TH1D *diffRes4th, TH1D *covar, TProfile *AvMult, TProfile *QVector, TProfile *QCorr, TProfile *QProd, TProfile *Direct, TProfile *binPt2p1n1nRP, TProfile *binPt2p2n2nRP, TProfile *binPt3p2n1n1nRP, TProfile *binPt3p1n1n2nRP, TProfile *binPt4p1n1n1n1nRP, TProfile *binEta2p1n1nRP, TProfile *binEta2p2n2nRP, TProfile *binEta3p2n1n1nRP, TProfile *binEta3p1n1n2nRP, TProfile *binEta4p1n1n1n1nRP, TProfile *binPt2p1n1nPOI, TProfile *binPt2p2n2nPOI, TProfile *binPt3p2n1n1nPOI, TProfile *binPt3p1n1n2nPOI, TProfile *binPt4p1n1n1n1nPOI, TProfile *binEta2p1n1nPOI, TProfile *binEta2p2n2nPOI, TProfile *binEta3p2n1n1nPOI, TProfile *binEta3p1n1n2nPOI, TProfile *binEta4p1n1n1n1nPOI, AliFlowCommonHist *ch2nd, AliFlowCommonHist *ch4th, AliFlowCommonHist *ch6th, AliFlowCommonHist *ch8th, AliFlowCommonHistResults *chr2nd, AliFlowCommonHistResults *chr4th, AliFlowCommonHistResults *chr6th, AliFlowCommonHistResults *chr8th);
void Calculate();
TProfile *fbinEta3p1n1n2nPOI; //<<3'>>_{n,n|2n} per eta-bin
TProfile *fbinEta4p1n1n1n1nPOI; //<<4'>>_{n,n|n,n} per eta-bin
+ AliFlowCommonHist *fch2nd; //common control histograms (taking into account only the events with 2 and more particles)
+ AliFlowCommonHist *fch4th; //common control histograms (taking into account only the events with 4 and more particles)
+ AliFlowCommonHist *fch6th; //common control histograms (taking into account only the events with 6 and more particles)
+ AliFlowCommonHist *fch8th; //common control histograms (taking into account only the events with 8 and more particles)
+
AliFlowCommonHistResults *fchr2nd; //final results for 2nd order int. and diff. flow stored in the common histograms
AliFlowCommonHistResults *fchr4th; //final results for 4th order int. and diff. flow stored in the common histograms
AliFlowCommonHistResults *fchr6th; //final results for 6th order int. and diff. flow stored in the common histograms