/************************************************************************* * Copyright(c) 1998-2008, ALICE Experiment at CERN, All rights reserved. * * * * 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 * * 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 * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ /********************************** * functions and equations needed * * for calculation of cumulants * * and final flow estimates * * * * author: Ante Bilandzic * * (anteb@nikhef.nl) * *********************************/ #define AliCumulantsFunctions_cxx #include "Riostream.h" #include "TChain.h" #include "TFile.h" #include "TList.h" #include "TParticle.h" #include "TProfile.h" #include "TProfile2D.h" #include "TProfile3D.h" #include "TH1.h" #include "TH1D.h" #include "AliFlowEventSimple.h" #include "AliFlowTrackSimple.h" #include "AliFlowAnalysisWithCumulants.h" #include "AliFlowCumuConstants.h" #include "AliFlowCommonConstants.h" #include "AliFlowCommonHist.h" #include "AliFlowCommonHistResults.h" #include "AliCumulantsFunctions.h" ClassImp(AliCumulantsFunctions) //================================================================================================================_ AliCumulantsFunctions::AliCumulantsFunctions(): fIntGenFun(NULL), fIntGenFun4(NULL),//only for other system of Eq. fIntGenFun6(NULL),//only for other system of Eq. fIntGenFun8(NULL),//only for other system of Eq. fIntGenFun16(NULL),//only for other system of Eq. fAvMult4(NULL),//only for other system of Eq. fAvMult6(NULL),//only for other system of Eq. fAvMult8(NULL),//only for other system of Eq. fAvMult16(NULL),//only for other system of Eq. fDiffPtRPGenFunRe(NULL), fDiffPtRPGenFunIm(NULL), fPtBinRPNoOfParticles(NULL), fDiffEtaRPGenFunRe(NULL), fDiffEtaRPGenFunIm(NULL), fEtaBinRPNoOfParticles(NULL), fDiffPtPOIGenFunRe(NULL), fDiffPtPOIGenFunIm(NULL), fPtBinPOINoOfParticles(NULL), fDiffEtaPOIGenFunRe(NULL), fDiffEtaPOIGenFunIm(NULL), fEtaBinPOINoOfParticles(NULL), fifr(NULL), fdfr2(NULL), fdfr4(NULL), fdfr6(NULL), fdfr8(NULL), fAvMult(NULL), fQVector(NULL), fAverageOfSquaredWeight(NULL), fchr2nd(NULL), fchr4th(NULL), fchr6th(NULL), fchr8th(NULL), fch(NULL)//common control histograms /* fdRe0(NULL), fdRe1(NULL), fdRe2(NULL), fdRe3(NULL), fdRe4(NULL), fdRe5(NULL), fdRe6(NULL), fdRe7(NULL), fdIm0(NULL), fdIm1(NULL), fdIm2(NULL), fdIm3(NULL), fdIm4(NULL), fdIm5(NULL), fdIm6(NULL), fdIm7(NULL) */ { //default constructor } AliCumulantsFunctions::~AliCumulantsFunctions() { //destructor } AliCumulantsFunctions::AliCumulantsFunctions(TProfile2D *intGenFun, TProfile2D *intGenFun4, TProfile2D *intGenFun6, TProfile2D *intGenFun8, TProfile2D *intGenFun16, TProfile *avMult4, TProfile *avMult6, TProfile *avMult8, TProfile *avMult16, TProfile3D *diffPtRPGenFunRe, TProfile3D *diffPtRPGenFunIm, TProfile *ptBinRPNoOfParticles, TProfile3D *diffEtaRPGenFunRe, TProfile3D *diffEtaRPGenFunIm, TProfile *etaBinRPNoOfParticles, TProfile3D *diffPtPOIGenFunRe, TProfile3D *diffPtPOIGenFunIm, TProfile *ptBinPOINoOfParticles, TProfile3D *diffEtaPOIGenFunRe, TProfile3D *diffEtaPOIGenFunIm, TProfile *etaBinPOINoOfParticles, TH1D *ifr, TH1D *dfr2, TH1D *dfr4, TH1D *dfr6, TH1D *dfr8, TProfile *avMult, TProfile *qVector, TProfile *averageOfSquaredWeight, AliFlowCommonHistResults *chr2nd, AliFlowCommonHistResults *chr4th, AliFlowCommonHistResults *chr6th, AliFlowCommonHistResults *chr8th, AliFlowCommonHist *ch): fIntGenFun(intGenFun), fIntGenFun4(intGenFun4),//only for other system of Eq. fIntGenFun6(intGenFun6),//only for other system of Eq. fIntGenFun8(intGenFun8),//only for other system of Eq. fIntGenFun16(intGenFun16),//only for other system of Eq. fAvMult4(avMult4),//only for other system of Eq. fAvMult6(avMult6),//only for other system of Eq. fAvMult8(avMult8),//only for other system of Eq. fAvMult16(avMult16),//only for other system of Eq. fDiffPtRPGenFunRe(diffPtRPGenFunRe), fDiffPtRPGenFunIm(diffPtRPGenFunIm), fPtBinRPNoOfParticles(ptBinRPNoOfParticles), fDiffEtaRPGenFunRe(diffEtaRPGenFunRe), fDiffEtaRPGenFunIm(diffEtaRPGenFunIm), fEtaBinRPNoOfParticles(etaBinRPNoOfParticles), fDiffPtPOIGenFunRe(diffPtPOIGenFunRe), fDiffPtPOIGenFunIm(diffPtPOIGenFunIm), fPtBinPOINoOfParticles(ptBinPOINoOfParticles), fDiffEtaPOIGenFunRe(diffEtaPOIGenFunRe), fDiffEtaPOIGenFunIm(diffEtaPOIGenFunIm), fEtaBinPOINoOfParticles(etaBinPOINoOfParticles), fifr(ifr), fdfr2(dfr2), fdfr4(dfr4), fdfr6(dfr6), fdfr8(dfr8), fAvMult(avMult), fQVector(qVector), fAverageOfSquaredWeight(averageOfSquaredWeight), fchr2nd(chr2nd), fchr4th(chr4th), fchr6th(chr6th), fchr8th(chr8th), fch(ch)//common control histograms /* fdRe0(dRe0), fdRe1(dRe1), fdRe2(dRe2), fdRe3(dRe3), fdRe4(dRe4), fdRe5(dRe5), fdRe6(dRe6), fdRe7(dRe7), fdIm0(dIm0), fdIm1(dIm1), fdIm2(dIm2), fdIm3(dIm3), fdIm4(dIm4), fdIm5(dIm5), fdIm6(dIm6), fdIm7(dIm7) */ { //custom constructor } //================================================================================================================ void AliCumulantsFunctions::Calculate() { //calculate cumulants and final integrated and differential flow estimates and store the results into output histograms static const Int_t fgkQmax=AliFlowCumuConstants::kQmax; //needed for numerics static const Int_t fgkPmax=AliFlowCumuConstants::kPmax; //needed for numerics static const Int_t fgkQmax4=AliFlowCumuConstants::kQmax4; //needed for numerics static const Int_t fgkPmax4=AliFlowCumuConstants::kPmax4; //needed for numerics static const Int_t fgkQmax6=AliFlowCumuConstants::kQmax6; //needed for numerics static const Int_t fgkPmax6=AliFlowCumuConstants::kPmax6; //needed for numerics static const Int_t fgkQmax8=AliFlowCumuConstants::kQmax8; //needed for numerics static const Int_t fgkPmax8=AliFlowCumuConstants::kPmax8; //needed for numerics static const Int_t fgkQmax16=AliFlowCumuConstants::kQmax16; //needed for numerics static const Int_t fgkPmax16=AliFlowCumuConstants::kPmax16; //needed for numerics static const Int_t fgkFlow=AliFlowCumuConstants::kFlow; //integrated flow coefficient to be calculated static const Int_t fgkMltpl=AliFlowCumuConstants::kMltpl; //the multiple in p=m*n (diff. flow) static const Int_t fgknBinsPt=100; //number of pt bins //to be improved static const Int_t fgknBinsEta=80; //number of eta bins //to be improved Double_t fR0=AliFlowCumuConstants::fgR0; //needed for numerics //Double_t fPtMax=AliFlowCommonConstants::GetPtMax(); //maximum pt //Double_t fPtMin=AliFlowCommonConstants::GetPtMin(); //minimum pt //Double_t fBinWidthPt=(fPtMax-fPtMin)/fgknBinsPt; //width of pt bin (in GeV) Bool_t fOtherEquations=AliFlowCumuConstants::fgOtherEquations; //numerical equations for cumulants solved up to different highest order //avarage selected multiplicity Double_t dAvM=0.; if(fAvMult) { dAvM=fAvMult->GetBinContent(1); } //number of events Int_t nEvents=0; if(fAvMult) { nEvents=(Int_t)(fAvMult->GetBinEntries(1)); } // Double_t dAvQx=0.,dAvQy=0.,dAvQ2x=0.,dAvQ2y=0.; if(fQVector) { dAvQx = fQVector->GetBinContent(1); // dAvQy = fQVector->GetBinContent(2); // dAvQ2x = fQVector->GetBinContent(3); //<(Q_x)^2> dAvQ2y = fQVector->GetBinContent(4); //<(Q_y)^2> } // Double_t dAvw2 = 1.; if(nEvents>0) { dAvw2 = fAverageOfSquaredWeight->GetBinContent(1); if(dAvw2 == 0) { cout< is empty. Nothing will be calculated !!!!"< Double_t dAvG[fgkPmax][fgkQmax]={{0.}}; Bool_t someAvGEntryIsNegative=kFALSE; if(fIntGenFun) { for(Int_t p=0;pGetBinContent(p+1,q+1); if(dAvG[p][q]<0.) { someAvGEntryIsNegative=kTRUE; } } } } ///////////////////////////////////////////////////////////////////////////// //////////////////gen. function for the cumulants//////////////////////////// ///////////////////////////////////////////////////////////////////////////// Double_t dC[fgkPmax][fgkQmax]={{0.}};//C[p][q] if(dAvM>0 && someAvGEntryIsNegative==kFALSE) { for(Int_t p=0;p Double_t tempHere=0.; for(Int_t p=0;p0 && dAvM>0 && dAvw2>0 && cumulant[0]>=0.) { if((dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(cumulant[0],(1./2.))*(dAvM/dAvw2),2.)>0.)) { chiQ[0]=(dAvM*dV2)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.),0.5); // to be improved, analogously for higher orders } if(chiQ[0]) { sdQ[0]=pow(((1./(2.*dAvM*nEvents))*((1.+2.*pow(chiQ[0],2))/(2.*pow(chiQ[0],2)))),0.5); } cout<<" v_"<0 && dAvM>0 && dAvw2>0 && cumulant[1]<=0.) { if((dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(-cumulant[1],(1./4.))*(dAvM/dAvw2),2.)>0.)) { chiQ[1]=(dAvM*dV4)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4*dAvM,2.),0.5); } if(chiQ[1]) { sdQ[1]=(1./(pow(2.*dAvM*nEvents,0.5)))*pow((1.+4.*pow(chiQ[1],2)+1.*pow(chiQ[1],4.)+2.*pow(chiQ[1],6.))/(2.*pow(chiQ[1],6.)),0.5); } cout<<" v_"<0 && dAvM>0 && dAvw2>0 && cumulant[2]>=0.) { if((dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow((1./4.)*cumulant[2],(1./6.))*(dAvM/dAvw2),2.)>0.)) { chiQ[2]=(dAvM*dV6)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV6*dAvM,2.),0.5); } if(chiQ[2]) { sdQ[2]=(1./(pow(2.*dAvM*nEvents,0.5)))*pow((3.+18.*pow(chiQ[2],2)+9.*pow(chiQ[2],4.)+28.*pow(chiQ[2],6.)+12.*pow(chiQ[2],8.)+24.*pow(chiQ[2],10.))/(24.*pow(chiQ[2],10.)),0.5); } cout<<" v_"<0 && dAvM>0 && dAvw2>0 && cumulant[3]<=0.) { if((dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(-(1./33.)*cumulant[3],(1./8.))*(dAvM/dAvw2),2.)>0.)) { chiQ[3]=(dAvM*dV8)/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV8*dAvM,2.),0.5); } if(chiQ[3]) { sdQ[3]=(1./(pow(2.*dAvM*nEvents,0.5)))*pow((12.+96.*pow(chiQ[3],2.)+72.*pow(chiQ[3],4.)+304.*pow(chiQ[3],6.)+257.*pow(chiQ[3],8.)+804.*pow(chiQ[3],10.)+363.*pow(chiQ[3],12.)+726.*pow(chiQ[3],14.))/(726.*pow(chiQ[3],14.)),0.5); } cout<<" v_"<=0.) { cout<<"v_"<GetBinEntries(b+1); for(Int_t p=0;pGetBinContent(b+1,p+1,q+1)/dAvG[p][q]; } if(fDiffPtRPGenFunIm) { ptYRP[b][p][q]=fDiffPtRPGenFunIm->GetBinContent(b+1,p+1,q+1)/dAvG[p][q]; } } } } } Double_t etaXRP[fgknBinsEta][fgkPmax][fgkQmax]={{{0.}}}; Double_t etaYRP[fgknBinsEta][fgkPmax][fgkQmax]={{{0.}}}; Double_t etaBinRPNoOfParticles[fgknBinsEta]={0.}; //3D profiles (for eta) for(Int_t b=0;bGetBinEntries(b); for(Int_t p=0;pGetBinContent(b+1,p+1,q+1)/dAvG[p][q]; } if(fDiffEtaRPGenFunIm) { etaYRP[b][p][q]=fDiffEtaRPGenFunIm->GetBinContent(b+1,p+1,q+1)/dAvG[p][q]; } } } } } //------------------------------------------------------------------------------------------------------------------------------- //final results for differential flow (in pt): Double_t ptDRP[fgknBinsPt][fgkPmax]={{0.}}; Double_t tempSumForptDRP=0.; for (Int_t b=0;b0) { v2ptRP[b]=ptRPDiffCumulant2[b]/pow(cumulant[0],0.5); if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.)>0. && ptBinRPNoOfParticles[b]>0.) { if(chiQ[0]>0) { sdRPDiff2pt[b]=pow((1./(2.*ptBinRPNoOfParticles[b]))*((1.+pow(chiQ[0],2.))/pow(chiQ[0],2.)),0.5); } //cout<<"v'_2/2{2} = "<SetBinContent(b+1,v2ptRP[b]); fdfr2->SetBinError(b+1,sdRPDiff2pt[b]); //common histogram: fchr2nd->FillDifferentialFlow(b+1,v2ptRP[b],sdRPDiff2pt[b]); //abTempDeleteMe fchr2nd->FillDifferentialFlowPtRP(b+1,v2ptRP[b],sdRPDiff2pt[b]); //abTempDeleteMe } else { //cout<<"v'_2/2{2} = Im"<0.&&ptBinRPNoOfParticles[b]>0.) // to be improved { if(chiQ[1]>0) { sdRPDiff4pt[b]=pow((1./(2.*ptBinRPNoOfParticles[b]))*((2.+6.*pow(chiQ[1],2.)+pow(chiQ[1],4.)+pow(chiQ[1],6.))/pow(chiQ[1],6.)),0.5); } //cout<<"v'_2/2{4} = "<SetBinContent(b+1,v4ptRP[b]); fdfr4->SetBinError(b+1,sdRPDiff4pt[b]); //common histogram: fchr4th->FillDifferentialFlow(b+1,v4ptRP[b],sdRPDiff4pt[b]); //abTempDeleteMe fchr4th->FillDifferentialFlowPtRP(b+1,v4ptRP[b],sdRPDiff4pt[b]); //abTempDeleteMe } else { //cout<<"v'_2/2{4} = Im"<0){ //cout<<"v'_2/2{6} = "<<100.*ptRPDiffCumulant6[b]/(4.*pow((1./4.)*cumulant[2],(5./6.)))<<"%"<SetBinContent(b+1,v6ptRP[b]); //common histogram: fchr6th->FillDifferentialFlow(b+1,v6ptRP[b],0.); //abTempDeleteMe fchr6th->FillDifferentialFlowPtRP(b+1,v6ptRP[b],0.); //abTempDeleteMe }else{ //cout<<"v'_2/2{6} = Im"<SetBinContent(b+1,v8ptRP[b]); //common histogram: fchr8th->FillDifferentialFlow(b+1,v8ptRP[b],0.); //abTempDeleteMe fchr8th->FillDifferentialFlowPtRP(b+1,v8ptRP[b],0.); //abTempDeleteMe }else{ //cout<<"v'_2/2{8} = Im"<GetHistPtRP()) { dSumOfYieldRP+=(fch->GetHistPtRP())->GetBinContent(b); if(fchr2nd->GetHistDiffFlowPtRP()) { dV2RP+=((fchr2nd->GetHistDiffFlowPtRP())->GetBinContent(b))*(fch->GetHistPtRP())->GetBinContent(b); dV2RPError+=pow((fch->GetHistPtRP())->GetBinContent(b),2.)*pow((fchr2nd->GetHistDiffFlowPtRP())->GetBinError(b),2.); } if(fchr4th->GetHistDiffFlowPtRP()) { dV4RP+=((fchr4th->GetHistDiffFlowPtRP())->GetBinContent(b))*(fch->GetHistPtRP())->GetBinContent(b); dV4RPError+=pow((fch->GetHistPtRP())->GetBinContent(b),2.)*pow((fchr4th->GetHistDiffFlowPtRP())->GetBinError(b),2.); } if(fchr6th->GetHistDiffFlowPtRP()) { dV6RP+=((fchr6th->GetHistDiffFlowPtRP())->GetBinContent(b))*(fch->GetHistPtRP())->GetBinContent(b); dV6RPError+=pow((fch->GetHistPtRP())->GetBinContent(b),2.)*pow((fchr6th->GetHistDiffFlowPtRP())->GetBinError(b),2.); } if(fchr8th->GetHistDiffFlowPtRP()) { dV8RP+=((fchr8th->GetHistDiffFlowPtRP())->GetBinContent(b))*(fch->GetHistPtRP())->GetBinContent(b); dV8RPError+=pow((fch->GetHistPtRP())->GetBinContent(b),2.)*pow((fchr8th->GetHistDiffFlowPtRP())->GetBinError(b),2.); } } } if(dSumOfYieldRP) { dV2RP/=dSumOfYieldRP; dV2RPError/=(dSumOfYieldRP*dSumOfYieldRP); dV4RP/=dSumOfYieldRP; dV4RPError/=(dSumOfYieldRP*dSumOfYieldRP); dV6RP/=dSumOfYieldRP; dV6RPError/=(dSumOfYieldRP*dSumOfYieldRP); dV8RP/=dSumOfYieldRP; dV8RPError/=(dSumOfYieldRP*dSumOfYieldRP); fchr2nd->FillIntegratedFlowRP(dV2RP,pow(dV2RPError,0.5)); fchr4th->FillIntegratedFlowRP(dV4RP,pow(dV4RPError,0.5)); fchr6th->FillIntegratedFlowRP(dV6RP,pow(dV6RPError,0.5));//to be improved (errors needed) fchr8th->FillIntegratedFlowRP(dV8RP,pow(dV8RPError,0.5));//to be improved (errors needed) } cout<0) { v2etaRP[b]=etaRPDiffCumulant2[b]/pow(cumulant[0],0.5); if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.)>0. && etaBinRPNoOfParticles[b]>0.) // to be improved { if(chiQ[0]>0) { sdRPDiff2eta[b]=pow((1./(2.*etaBinRPNoOfParticles[b]))*((1.+pow(chiQ[0],2.))/pow(chiQ[0],2.)),0.5); } //cout<<"v'_2/2{2} = "<SetBinContent(b+1,v2etaRP[b]); //fdfr2->SetBinError(b+1,sdDiff2eta[b]); //common histogram: //fchr2nd->FillDifferentialFlow(b+1,v2etaRP[b],sdDiff2eta[b]); //abTempDeleteMe fchr2nd->FillDifferentialFlowEtaRP(b+1,v2etaRP[b],sdRPDiff2eta[b]); //abTempDeleteMe } else { //cout<<"v'_2/2{2} = Im"<0.&&etaBinRPNoOfParticles[b]>0.) // to be improved { if(chiQ[1]) { sdRPDiff4eta[b]=pow((1./(2.*etaBinRPNoOfParticles[b]))*((2.+6.*pow(chiQ[1],2.)+pow(chiQ[1],4.)+pow(chiQ[1],6.))/pow(chiQ[1],6.)),0.5); } //cout<<"v'_2/2{4} = "<SetBinContent(b+1,v4eta[b]); //fdfr4->SetBinError(b+1,sdDiff4eta[b]); //common histogram: //fchr4th->FillDifferentialFlow(b+1,v4eta[b],sdDiff4eta[b]); //abTempDeleteMe fchr4th->FillDifferentialFlowEtaRP(b+1,v4etaRP[b],sdRPDiff4eta[b]); //abTempDeleteMe } else { //cout<<"v'_2/2{4} = Im"<0){ //cout<<"v'_2/2{6} = "<<100.*etaRPDiffCumulant6[b]/(4.*pow((1./4.)*cumulant[2],(5./6.)))<<"%"<SetBinContent(b+1,v6eta[b]); //common histogram: //fchr6th->FillDifferentialFlow(b+1,v6eta[b],0.); //abTempDeleteMe fchr6th->FillDifferentialFlowEtaRP(b+1,v6etaRP[b],0.); //abTempDeleteMe }else{ //cout<<"v'_2/2{6} = Im"<SetBinContent(b+1,v8eta[b]); //common histogram: //fchr8th->FillDifferentialFlow(b+1,v8eta[b],0.); //abTempDeleteMe fchr8th->FillDifferentialFlowEtaRP(b+1,v8etaRP[b],0.); //abTempDeleteMe }else{ //cout<<"v'_2/2{8} = Im"<GetBinEntries(b+1); for(Int_t p=0;pGetBinContent(b+1,p+1,q+1)/dAvG[p][q]; } if(fDiffPtPOIGenFunIm) { ptY[b][p][q]=fDiffPtPOIGenFunIm->GetBinContent(b+1,p+1,q+1)/dAvG[p][q]; } } } } } Double_t etaX[fgknBinsEta][fgkPmax][fgkQmax]={{{0.}}}; Double_t etaY[fgknBinsEta][fgkPmax][fgkQmax]={{{0.}}}; Double_t etaBinPOINoOfParticles[fgknBinsEta]={0.}; //3D profiles (for eta) for(Int_t b=0;bGetBinEntries(b+1); for(Int_t p=0;pGetBinContent(b+1,p+1,q+1)/dAvG[p][q]; } if(fDiffEtaPOIGenFunIm) { etaY[b][p][q]=fDiffEtaPOIGenFunIm->GetBinContent(b+1,p+1,q+1)/dAvG[p][q]; } } } } } /* if(dAvM){ for(Int_t b=0;bGetBinContent(b+1,q+1)/AvG[0][q]; Y[b][0][q]=fdIm0->GetBinContent(b+1,q+1)/AvG[0][q]; //-------------------------------------------------- X[b][1][q]=fdRe1->GetBinContent(b+1,q+1)/AvG[1][q]; Y[b][1][q]=fdIm1->GetBinContent(b+1,q+1)/AvG[1][q]; //-------------------------------------------------- X[b][2][q]=fdRe2->GetBinContent(b+1,q+1)/AvG[2][q]; Y[b][2][q]=fdIm2->GetBinContent(b+1,q+1)/AvG[2][q]; //-------------------------------------------------- X[b][3][q]=fdRe3->GetBinContent(b+1,q+1)/AvG[3][q]; Y[b][3][q]=fdIm3->GetBinContent(b+1,q+1)/AvG[3][q]; //-------------------------------------------------- X[b][4][q]=fdRe4->GetBinContent(b+1,q+1)/AvG[4][q]; Y[b][4][q]=fdIm4->GetBinContent(b+1,q+1)/AvG[4][q]; //-------------------------------------------------- X[b][5][q]=fdRe5->GetBinContent(b+1,q+1)/AvG[5][q]; Y[b][5][q]=fdIm5->GetBinContent(b+1,q+1)/AvG[5][q]; //-------------------------------------------------- X[b][6][q]=fdRe6->GetBinContent(b+1,q+1)/AvG[6][q]; Y[b][6][q]=fdIm6->GetBinContent(b+1,q+1)/AvG[6][q]; //-------------------------------------------------- X[b][7][q]=fdRe7->GetBinContent(b+1,q+1)/AvG[7][q]; Y[b][7][q]=fdIm7->GetBinContent(b+1,q+1)/AvG[7][q]; } //} } } */ //------------------------------------------------------------------------------------------------------------------------------- //final results for differential flow (in pt): Double_t ptD[fgknBinsPt][fgkPmax]={{0.}}; Double_t tempSumForPtD=0.; for (Int_t b=0;b0) { v2pt[b]=ptDiffCumulant2[b]/pow(cumulant[0],0.5); if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.)>0.&&ptBinPOINoOfParticles[b]>0.) { if(chiQ[0]>0) { sdDiff2pt[b]=pow((1./(2.*ptBinPOINoOfParticles[b]))*((1.+pow(chiQ[0],2.))/pow(chiQ[0],2.)),0.5); } //cout<<"v'_2/2{2} = "<SetBinContent(b+1,v2pt[b]); fdfr2->SetBinError(b+1,sdDiff2pt[b]); //common histogram: fchr2nd->FillDifferentialFlow(b+1,v2pt[b],sdDiff2pt[b]); //abTempDeleteMe fchr2nd->FillDifferentialFlowPtPOI(b+1,v2pt[b],sdDiff2pt[b]); //abTempDeleteMe } else { //cout<<"v'_2/2{2} = Im"<0.&&ptBinPOINoOfParticles[b]>0.) { if(chiQ[1]>0) { sdDiff4pt[b]=pow((1./(2.*ptBinPOINoOfParticles[b]))*((2.+6.*pow(chiQ[1],2.)+pow(chiQ[1],4.)+pow(chiQ[1],6.))/pow(chiQ[1],6.)),0.5); } //cout<<"v'_2/2{4} = "<SetBinContent(b+1,v4pt[b]); fdfr4->SetBinError(b+1,sdDiff4pt[b]); //common histogram: fchr4th->FillDifferentialFlow(b+1,v4pt[b],sdDiff4pt[b]); //abTempDeleteMe fchr4th->FillDifferentialFlowPtPOI(b+1,v4pt[b],sdDiff4pt[b]); //abTempDeleteMe } else { //cout<<"v'_2/2{4} = Im"<0){ //cout<<"v'_2/2{6} = "<<100.*ptDiffCumulant6[b]/(4.*pow((1./4.)*cumulant[2],(5./6.)))<<"%"<SetBinContent(b+1,v6pt[b]); //common histogram: fchr6th->FillDifferentialFlow(b+1,v6pt[b],0.); //abTempDeleteMe fchr6th->FillDifferentialFlowPtPOI(b+1,v6pt[b],0.); //abTempDeleteMe }else{ //cout<<"v'_2/2{6} = Im"<SetBinContent(b+1,v8pt[b]); //common histogram: fchr8th->FillDifferentialFlow(b+1,v8pt[b],0.); //abTempDeleteMe fchr8th->FillDifferentialFlowPtPOI(b+1,v8pt[b],0.); //abTempDeleteMe }else{ //cout<<"v'_2/2{8} = Im"<GetHistPtPOI()) { dSumOfYieldPOI+=(fch->GetHistPtPOI())->GetBinContent(b); if(fchr2nd->GetHistDiffFlowPtPOI()) { dV2POI+=((fchr2nd->GetHistDiffFlowPtPOI())->GetBinContent(b))*(fch->GetHistPtPOI())->GetBinContent(b); dV2POIError+=pow((fch->GetHistPtPOI())->GetBinContent(b),2.)*pow((fchr2nd->GetHistDiffFlowPtPOI())->GetBinError(b),2.); } if(fchr4th->GetHistDiffFlowPtPOI()) { dV4POI+=((fchr4th->GetHistDiffFlowPtPOI())->GetBinContent(b))*(fch->GetHistPtPOI())->GetBinContent(b); dV4POIError+=pow((fch->GetHistPtPOI())->GetBinContent(b),2.)*pow((fchr4th->GetHistDiffFlowPtPOI())->GetBinError(b),2.); } if(fchr6th->GetHistDiffFlowPtPOI()) { dV6POI+=((fchr6th->GetHistDiffFlowPtPOI())->GetBinContent(b))*(fch->GetHistPtPOI())->GetBinContent(b); dV6POIError+=pow((fch->GetHistPtPOI())->GetBinContent(b),2.)*pow((fchr6th->GetHistDiffFlowPtPOI())->GetBinError(b),2.); } if(fchr8th->GetHistDiffFlowPtPOI()) { dV8POI+=((fchr8th->GetHistDiffFlowPtPOI())->GetBinContent(b))*(fch->GetHistPtPOI())->GetBinContent(b); dV8POIError+=pow((fch->GetHistPtPOI())->GetBinContent(b),2.)*pow((fchr8th->GetHistDiffFlowPtPOI())->GetBinError(b),2.); } } } if(dSumOfYieldPOI) { dV2POI/=dSumOfYieldPOI; dV2POIError/=(dSumOfYieldPOI*dSumOfYieldPOI); dV4POI/=dSumOfYieldPOI; dV4POIError/=(dSumOfYieldPOI*dSumOfYieldPOI); dV6POI/=dSumOfYieldPOI; dV6POIError/=(dSumOfYieldPOI*dSumOfYieldPOI); dV8POI/=dSumOfYieldPOI; dV8POIError/=(dSumOfYieldPOI*dSumOfYieldPOI); fchr2nd->FillIntegratedFlowPOI(dV2POI,pow(dV2POIError,0.5)); fchr4th->FillIntegratedFlowPOI(dV4POI,pow(dV4POIError,0.5)); fchr6th->FillIntegratedFlowPOI(dV6POI,pow(dV6POIError,0.5));//to be improved (errors needed) fchr8th->FillIntegratedFlowPOI(dV8POI,pow(dV8POIError,0.5));//to be improved (errors needed) } cout<0) { v2eta[b]=etaDiffCumulant2[b]/pow(cumulant[0],0.5); if (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2*dAvM,2.)>0.&&etaBinPOINoOfParticles[b]>0.) // to be improved { if(chiQ[0]>0) { sdDiff2eta[b]=pow((1./(2.*etaBinPOINoOfParticles[b]))*((1.+pow(chiQ[0],2.))/pow(chiQ[0],2.)),0.5); } //cout<<"v'_2/2{2} = "<SetBinContent(b+1,v2eta[b]); fdfr2->SetBinError(b+1,sdDiff2eta[b]); //common histogram: //fchr2nd->FillDifferentialFlow(b+1,v2eta[b],sdDiff2eta[b]); //abTempDeleteMe fchr2nd->FillDifferentialFlowEtaPOI(b+1,v2eta[b],sdDiff2eta[b]); //abTempDeleteMe } else { //cout<<"v'_2/2{2} = Im"<0.&&etaBinPOINoOfParticles[b]>0.) // to be improved { if(chiQ[1]>0) { sdDiff4eta[b]=pow((1./(2.*etaBinPOINoOfParticles[b]))*((2.+6.*pow(chiQ[1],2.)+pow(chiQ[1],4.)+pow(chiQ[1],6.))/pow(chiQ[1],6.)),0.5); } //cout<<"v'_2/2{4} = "<SetBinContent(b+1,v4eta[b]); fdfr4->SetBinError(b+1,sdDiff4eta[b]); //common histogram: //fchr4th->FillDifferentialFlow(b+1,v4eta[b],sdDiff4eta[b]); //abTempDeleteMe fchr4th->FillDifferentialFlowEtaPOI(b+1,v4eta[b],sdDiff4eta[b]); //abTempDeleteMe } else { //cout<<"v'_2/2{4} = Im"<0){ //cout<<"v'_2/2{6} = "<<100.*etaDiffCumulant6[b]/(4.*pow((1./4.)*cumulant[2],(5./6.)))<<"%"<SetBinContent(b+1,v6eta[b]); //common histogram: //fchr6th->FillDifferentialFlow(b+1,v6eta[b],0.); //abTempDeleteMe fchr6th->FillDifferentialFlowEtaPOI(b+1,v6eta[b],0.); //abTempDeleteMe }else{ //cout<<"v'_2/2{6} = Im"<SetBinContent(b+1,v8eta[b]); //common histogram: //fchr8th->FillDifferentialFlow(b+1,v8eta[b],0.); //abTempDeleteMe fchr8th->FillDifferentialFlowEtaPOI(b+1,v8eta[b],0.); //abTempDeleteMe }else{ //cout<<"v'_2/2{8} = Im"<GetBinContent(1); } //number of events Int_t nEvents4=0; if(fAvMult4) { nEvents4=(Int_t)(fAvMult4->GetBinEntries(1)); } Double_t dAvG4[fgkPmax4][fgkQmax4]={{0.}}; Bool_t someAvGEntryIsNegative4=kFALSE; for(Int_t p=0;pGetBinContent(p+1,q+1); if(dAvG4[p][q]<0.) { someAvGEntryIsNegative4=kTRUE; } } } ///////////////////////////////////////////////////////////////////////////// //////////////////gen. function for the cumulants//////////////////////////// ///////////////////////////////////////////////////////////////////////////// Double_t dC4[fgkPmax4][fgkQmax4]={{0.}};//C[p][q] if(dAvM4>0 && someAvGEntryIsNegative4==kFALSE) { for (Int_t p=0;p for (Int_t p=0;p=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(cumulant4[0],(1./2.))*dAvM4,2.)>0.)) { chiQo4[0]=dAvM4*dV2o4/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2o4*dAvM4,2.),0.5); if(chiQo4[0]) { sdQo4[0]=pow(((1./(2.*dAvM4*nEvents4))*((1.+2.*pow(chiQo4[0],2))/(2.*pow(chiQo4[0],2)))),0.5); } cout<<" v_"<0.)) { chiQo4[1]=dAvM4*dV4o4/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4o4*dAvM4,2.),0.5); if(chiQo4[1]) { sdQo4[1]=(1./(pow(2.*dAvM4*nEvents4,0.5)))*pow((1.+4.*pow(chiQo4[1],2)+1.*pow(chiQo4[1],4.)+2.*pow(chiQo4[1],6.))/(2.*pow(chiQo4[1],6.)),0.5); } cout<<" v_"<GetBinContent(1); } //number of events Int_t nEvents6=0; if(fAvMult6) { nEvents6=(Int_t)(fAvMult6->GetBinEntries(1)); } Double_t dAvG6[fgkPmax6][fgkQmax6]={{0.}}; Bool_t someAvGEntryIsNegative6=kFALSE; for(Int_t p=0;pGetBinContent(p+1,q+1); if(dAvG6[p][q]<0.) { someAvGEntryIsNegative6=kTRUE; } } } ///////////////////////////////////////////////////////////////////////////// //////////////////gen. function for the cumulants//////////////////////////// ///////////////////////////////////////////////////////////////////////////// Double_t dC6[fgkPmax6][fgkQmax6]={{0.}};//C[p][q] if(dAvM6>0 && someAvGEntryIsNegative6==kFALSE) { for (Int_t p=0;p Double_t tempHere6=0.; for (Int_t p=0;p=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(cumulant6[0],(1./2.))*dAvM6,2.)>0.)) { chiQo6[0]=dAvM6*dV2o6/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2o6*dAvM6,2.),0.5); if(chiQo6[0]) { sdQo6[0]=pow(((1./(2.*dAvM6*nEvents6))*((1.+2.*pow(chiQo6[0],2))/(2.*pow(chiQo6[0],2)))),0.5); } cout<<" v_"<0.)) { chiQo6[1]=dAvM6*dV4o6/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4o6*dAvM6,2.),0.5); if(chiQo6[1]) { sdQo6[1]=(1./(pow(2.*dAvM6*nEvents6,0.5)))*pow((1.+4.*pow(chiQo6[1],2)+1.*pow(chiQo6[1],4.)+2.*pow(chiQo6[1],6.))/(2.*pow(chiQo6[1],6.)),0.5); } cout<<" v_"<=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow((1./4.)*cumulant6[2],(1./6.))*dAvM6,2.)>0.)) { chiQo6[2]=dAvM6*dV6/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV6o6*dAvM6,2.),0.5); if(chiQo6[2]) { sdQo6[2]=(1./(pow(2.*dAvM6*nEvents6,0.5)))*pow((3.+18.*pow(chiQo6[2],2.)+9.*pow(chiQo6[2],4.)+28.*pow(chiQo6[2],6.)+12.*pow(chiQo6[2],8.)+24.*pow(chiQo6[2],10.))/(24.*pow(chiQo6[2],10.)),0.5); } cout<<" v_"<GetBinContent(1); } //number of events Int_t nEvents8=0; if(fAvMult8) { nEvents8=(Int_t)(fAvMult8->GetBinEntries(1)); } Double_t dAvG8[fgkPmax8][fgkQmax8]={{0.}}; Bool_t someAvGEntryIsNegative8=kFALSE; for(Int_t p=0;pGetBinContent(p+1,q+1); if(dAvG8[p][q]<0.) { someAvGEntryIsNegative8=kTRUE; } } } ///////////////////////////////////////////////////////////////////////////// //////////////////gen. function for the cumulants//////////////////////////// ///////////////////////////////////////////////////////////////////////////// Double_t dC8[fgkPmax8][fgkQmax8]={{0.}};//C[p][q] if(dAvM8>0 && someAvGEntryIsNegative8==kFALSE) { for (Int_t p=0;p Double_t tempHere8=0.; for (Int_t p=0;p=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(cumulant8[0],(1./2.))*dAvM8,2.)>0.)) { chiQo8[0]=dAvM8*dV2o8/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2o8*dAvM8,2.),0.5); if(chiQo8[0]) { sdQo8[0]=pow(((1./(2.*dAvM8*nEvents8))*((1.+2.*pow(chiQo8[0],2.))/(2.*pow(chiQo8[0],2)))),0.5); } cout<<" v_"<0.)) { chiQo8[1]=dAvM8*dV4o8/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4o8*dAvM8,2.),0.5); if(chiQo8[1]) { sdQo8[1]=(1./(pow(2.*dAvM8*nEvents8,0.5)))*pow((1.+4.*pow(chiQo8[1],2)+1.*pow(chiQo8[1],4.)+2.*pow(chiQo8[1],6.))/(2.*pow(chiQo8[1],6.)),0.5); } cout<<" v_"<=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow((1./4.)*cumulant8[2],(1./6.))*dAvM8,2.)>0.)) { chiQo8[2]=dAvM8*dV6o8/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV6o8*dAvM8,2.),0.5); if(chiQo8[2]) { sdQo8[2]=(1./(pow(2.*dAvM8*nEvents8,0.5)))*pow((3.+18.*pow(chiQo8[2],2)+9.*pow(chiQo8[2],4.)+28.*pow(chiQo8[2],6.)+12.*pow(chiQo8[2],8.)+24.*pow(chiQo8[2],10.))/(24.*pow(chiQo8[2],10.)),0.5); } cout<<" v_"<0.)) { chiQo8[3]=dAvM8*dV8o8/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV8o8*dAvM8,2.),0.5); if(chiQo8[3]) { sdQo8[3]=(1./(pow(2.*dAvM8*nEvents8,0.5)))*pow((12.+96.*pow(chiQo8[3],2)+72.*pow(chiQo8[3],4.)+304.*pow(chiQo8[3],6.)+257.*pow(chiQo8[3],8.)+804.*pow(chiQo8[3],10.)+363.*pow(chiQo8[3],12.)+726.*pow(chiQo8[3],14.))/(726.*pow(chiQo8[3],14.)),0.5); } cout<<" v_"<GetBinContent(1); } //number of events Int_t nEvents16=0; if(fAvMult16) { nEvents16=(Int_t)(fAvMult16->GetBinEntries(1)); } Double_t dAvG16[fgkPmax16][fgkQmax16]={{0.}}; Bool_t someAvGEntryIsNegative16=kFALSE; for(Int_t p=0;pGetBinContent(p+1,q+1); if(dAvG16[p][q]<0.) { someAvGEntryIsNegative16=kTRUE; } } } ///////////////////////////////////////////////////////////////////////////// //////////////////gen. function for the cumulants//////////////////////////// ///////////////////////////////////////////////////////////////////////////// Double_t dC16[fgkPmax16][fgkQmax16]={{0.}};//C16[p][q] if(dAvM16>0 && someAvGEntryIsNegative16==kFALSE) { for(Int_t p=0;p Double_t tempHere16=0.; for (Int_t p=0;p=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow(cumulant16[0],(1./2.))*dAvM16,2.)>0.)) { chiQo16[0]=dAvM16*dV2o16/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV2o16*dAvM16,2.),0.5); if(chiQo16[0]) { sdQo16[0]=pow(((1./(2.*dAvM16*nEvents16))*((1.+2.*pow(chiQo16[0],2))/(2.*pow(chiQo16[0],2)))),0.5); } cout<<" v_"<0.)) { chiQo16[1]=dAvM16*dV4o16/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV4o16*dAvM16,2.),0.5); if(chiQo16[1]) { sdQo16[1]=(1./(pow(2.*dAvM16*nEvents16,0.5)))*pow((1.+4.*pow(chiQo16[1],2.)+1.*pow(chiQo16[1],4.)+2.*pow(chiQo16[1],6.))/(2.*pow(chiQo16[1],6.)),0.5); } cout<<" v_"<=0. && (dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(pow((1./4.)*cumulant16[2],(1./6.))*dAvM16,2.)>0.)) { chiQo16[2]=dAvM16*dV6o16/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV6o16*dAvM16,2.),0.5); if(chiQo16[2]) { sdQo16[2]=(1./(pow(2.*dAvM16*nEvents16,0.5)))*pow((3.+18.*pow(chiQo16[2],2)+9.*pow(chiQo16[2],4.)+28.*pow(chiQo16[2],6.)+12.*pow(chiQo16[2],8.)+24.*pow(chiQo16[2],10.))/(24.*pow(chiQo16[2],10.)),0.5); } cout<<" v_"<0.)) { chiQo16[3]=dAvM16*dV8o16/pow(dAvQ2x+dAvQ2y-pow(dAvQx,2.)-pow(dAvQy,2.)-pow(dV8o16*dAvM16,2.),0.5); if(chiQo16[3]) { sdQo16[3]=(1./(pow(2.*dAvM16*nEvents16,0.5)))*pow((12.+96.*pow(chiQo16[3],2)+72.*pow(chiQo16[3],4.)+304.*pow(chiQo16[3],6.)+257.*pow(chiQo16[3],8.)+804.*pow(chiQo16[3],10.)+363.*pow(chiQo16[3],12.)+726.*pow(chiQo16[3],14.))/(726.*pow(chiQo16[3],14.)),0.5); } cout<<" v_"<=0.) { cout<<"v_"<=0.) { cout<<"v_"<