27 #include "Riostream.h"
36 #include "TDirectoryFile.h"
68 fHistProVetaPOI(NULL),
72 fHistProReDenom(NULL),
73 fHistProImDenom(NULL),
76 fHistQsumforChi(NULL),
82 if (fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::AliFlowAnalysisWithLeeYangZeros default constructor****"<<endl;
84 fHistList =
new TList();
85 fFirstRunList =
new TList();
87 for(
Int_t i = 0;i<5;i++)
94 fQsum =
new TVector2();
104 if (
fDebug) cout<<
"****~AliFlowAnalysisWithLeeYangZeros****"<<endl;
117 TFile *output =
new TFile(outputFileName->Data(),
"RECREATE");
121 else {
fHistList->SetName(
"cobjLYZ1PROD");}
128 else {
fHistList->SetName(
"cobjLYZ2PROD"); }
141 TFile *output =
new TFile(outputFileName.Data(),
"RECREATE");
145 else {
fHistList->SetName(
"cobjLYZ1PROD");}
152 else {
fHistList->SetName(
"cobjLYZ2PROD"); }
166 else {
fHistList->SetName(
"cobjLYZ1PROD");}
169 outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey);
173 else {
fHistList->SetName(
"cobjLYZ2PROD"); }
176 outputFileName->Write(outputFileName->GetName(), TObject::kSingleKey);
185 if (
fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::Init()****"<<endl;
190 Bool_t oldHistAddStatus = TH1::AddDirectoryStatus();
191 TH1::AddDirectory(kFALSE);
222 if (
fUseSum) {nameChiHist =
"Flow_QsumforChi_LYZSUM";}
223 else {nameChiHist =
"Flow_QsumforChi_LYZPROD";}
224 fHistQsumforChi =
new TH1F(nameChiHist.Data(),nameChiHist.Data(),3,-1.,2.);
232 if (
fUseSum) {nameR0Hist =
"First_Flow_r0theta_LYZSUM";}
233 else {nameR0Hist =
"First_Flow_r0theta_LYZPROD";}
234 fHistR0theta =
new TH1D(nameR0Hist.Data(),nameR0Hist.Data(),iNtheta,-0.5,iNtheta-0.5);
240 if (
fUseSum) {nameVHist =
"First_Flow_Vtheta_LYZSUM";}
241 else {nameVHist =
"First_Flow_Vtheta_LYZPROD";}
242 fHistVtheta =
new TH1D(nameVHist.Data(),nameVHist.Data(),iNtheta,-0.5,iNtheta-0.5);
248 for (
Int_t theta=0;theta<iNtheta;theta++) {
250 if (
fUseSum) {nameHist1 =
"AliFlowLYZHist1_";}
251 else {nameHist1 =
"AliFlowLYZHist1_";}
261 if (
fUseSum) {nameReDenomHist =
"Second_FlowPro_ReDenom_LYZSUM";}
262 else {nameReDenomHist =
"Second_FlowPro_ReDenom_LYZPROD";}
263 fHistProReDenom =
new TProfile(nameReDenomHist.Data(),nameReDenomHist.Data(), iNtheta, -0.5, iNtheta-0.5);
265 fHistProReDenom->SetYTitle(
"Re(Q^{#theta}e^{ir_{0}^{#theta}Q^{#theta}})");
269 if (
fUseSum) {nameImDenomHist =
"Second_FlowPro_ImDenom_LYZSUM";}
270 else {nameImDenomHist =
"Second_FlowPro_ImDenom_LYZPROD";}
271 fHistProImDenom =
new TProfile(nameImDenomHist.Data(),nameImDenomHist.Data(), iNtheta, -0.5, iNtheta-0.5);
273 fHistProImDenom->SetYTitle(
"Im(Q^{#theta}e^{ir_{0}^{#theta}Q^{#theta}})");
277 if (
fUseSum) {nameVetaRPHist =
"Second_FlowPro_VetaRP_LYZSUM";}
278 else {nameVetaRPHist =
"Second_FlowPro_VetaRP_LYZPROD";}
279 fHistProVetaRP =
new TProfile(nameVetaRPHist.Data(),nameVetaRPHist.Data(),iNbinsEta,dEtaMin,dEtaMax);
285 if (
fUseSum) {nameVetaPOIHist =
"Second_FlowPro_VetaPOI_LYZSUM";}
286 else {nameVetaPOIHist =
"Second_FlowPro_VetaPOI_LYZPROD";}
287 fHistProVetaPOI =
new TProfile(nameVetaPOIHist.Data(),nameVetaPOIHist.Data(),iNbinsEta,dEtaMin,dEtaMax);
293 if (
fUseSum) {nameVPtRPHist =
"Second_FlowPro_VPtRP_LYZSUM";}
294 else {nameVPtRPHist =
"Second_FlowPro_VPtRP_LYZPROD";}
295 fHistProVPtRP =
new TProfile(nameVPtRPHist.Data(),nameVPtRPHist.Data(),iNbinsPt,dPtMin,dPtMax);
301 if (
fUseSum) {nameVPtPOIHist =
"Second_FlowPro_VPtPOI_LYZSUM";}
302 else {nameVPtPOIHist =
"Second_FlowPro_VPtPOI_LYZPROD";}
303 fHistProVPtPOI =
new TProfile(nameVPtPOIHist.Data(),nameVPtPOIHist.Data(),iNbinsPt,dPtMin,dPtMax);
309 fHistReDtheta =
new TH1D(
"Second_Flow_ReDtheta_LYZSUM",
"Second_Flow_ReDtheta_LYZSUM",iNtheta, -0.5, (
double)iNtheta-0.5);
314 fHistImDtheta =
new TH1D(
"Second_Flow_ImDtheta_LYZSUM",
"Second_Flow_ImDtheta_LYZSUM",iNtheta, -0.5, (
double)iNtheta-0.5);
321 for (
Int_t theta=0;theta<iNtheta;theta++) {
322 TString nameRP =
"AliFlowLYZHist2RP_";
327 TString namePOI =
"AliFlowLYZHist2POI_";
337 if (!
fHistR0theta) {cout<<
"fHistR0theta has a NULL pointer!"<<endl;}
339 }
else { cout<<
"list is NULL pointer!"<<endl; }
344 if (
fDebug) cout<<
"****Histograms initialised****"<<endl;
349 TH1::AddDirectory(oldHistAddStatus);
359 if (
fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::Make()****"<<endl;
374 cout<<
"##### FlowLeeYangZero: Stack pointer null"<<endl;
390 if (outputListHistos) {
395 TH1D* pHistR0theta = NULL;
396 TH1D* pHistVtheta = NULL;
397 TProfile* pHistProReDenom = NULL;
398 TProfile* pHistProImDenom = NULL;
399 TProfile* pHistProVetaRP = NULL;
400 TProfile* pHistProVetaPOI = NULL;
401 TProfile* pHistProVPtRP = NULL;
402 TProfile* pHistProVPtPOI = NULL;
403 TH1F* pHistQsumforChi = NULL;
410 for (
Int_t i=0; i<iNtheta; i++)
413 pLYZHist2RP[i] = NULL;
414 pLYZHist2POI[i] = NULL;
421 (outputListHistos->FindObject(
"AliFlowCommonHistLYZ1SUM"));
423 (outputListHistos->FindObject(
"AliFlowCommonHistResultsLYZ1SUM"));
425 for(
Int_t theta = 0;theta<iNtheta;theta++){
426 TString name =
"AliFlowLYZHist1_";
429 (outputListHistos->FindObject(name));
431 pHistVtheta =
dynamic_cast<TH1D*
>
432 (outputListHistos->FindObject(
"First_Flow_Vtheta_LYZSUM"));
434 pHistR0theta =
dynamic_cast<TH1D*
>
435 (outputListHistos->FindObject(
"First_Flow_r0theta_LYZSUM"));
437 pHistQsumforChi =
dynamic_cast<TH1F*
>
438 (outputListHistos->FindObject(
"Flow_QsumforChi_LYZSUM"));
441 if (pCommonHist && pCommonHistResults && pLYZHist1[0] &&
442 pHistVtheta && pHistR0theta && pHistQsumforChi ) {
451 cout<<
"WARNING: Histograms needed to run Finish() firstrun (SUM) are not accessable!"<<endl;
456 (outputListHistos->FindObject(
"AliFlowCommonHistLYZ1PROD"));
458 (outputListHistos->FindObject(
"AliFlowCommonHistResultsLYZ1PROD"));
460 for(
Int_t theta = 0;theta<iNtheta;theta++){
461 TString name =
"AliFlowLYZHist1_";
464 (outputListHistos->FindObject(name));
466 pHistVtheta =
dynamic_cast<TH1D*
>
467 (outputListHistos->FindObject(
"First_Flow_Vtheta_LYZPROD"));
469 pHistR0theta =
dynamic_cast<TH1D*
>
470 (outputListHistos->FindObject(
"First_Flow_r0theta_LYZPROD"));
472 pHistQsumforChi =
dynamic_cast<TH1F*
>
473 (outputListHistos->FindObject(
"Flow_QsumforChi_LYZPROD"));
476 if (pCommonHist && pCommonHistResults && pLYZHist1[0] &&
477 pHistVtheta && pHistR0theta && pHistQsumforChi ) {
485 cout<<
"WARNING: Histograms needed to run Finish() firstrun (PROD) are not accessable!"<<endl;
493 (outputListHistos->FindObject(
"AliFlowCommonHistLYZ2SUM"));
495 (outputListHistos->FindObject(
"AliFlowCommonHistResultsLYZ2SUM"));
497 pHistR0theta =
dynamic_cast<TH1D*
>
498 (outputListHistos->FindObject(
"First_Flow_r0theta_LYZSUM"));
500 pHistQsumforChi =
dynamic_cast<TH1F*
>
501 (outputListHistos->FindObject(
"Flow_QsumforChi_LYZSUM"));
504 for(
Int_t theta = 0;theta<iNtheta;theta++){
505 TString nameRP =
"AliFlowLYZHist2RP_";
508 (outputListHistos->FindObject(nameRP));
509 TString namePOI =
"AliFlowLYZHist2POI_";
512 (outputListHistos->FindObject(namePOI));
514 pHistProReDenom =
dynamic_cast<TProfile*
>
515 (outputListHistos->FindObject(
"Second_FlowPro_ReDenom_LYZSUM"));
516 pHistProImDenom =
dynamic_cast<TProfile*
>
517 (outputListHistos->FindObject(
"Second_FlowPro_ImDenom_LYZSUM"));
519 TH1D* pHistReDtheta =
dynamic_cast<TH1D*
>
520 (outputListHistos->FindObject(
"Second_Flow_ReDtheta_LYZSUM"));
521 TH1D* pHistImDtheta =
dynamic_cast<TH1D*
>
522 (outputListHistos->FindObject(
"Second_Flow_ImDtheta_LYZSUM"));
524 pHistProVetaRP =
dynamic_cast<TProfile*
>
525 (outputListHistos->FindObject(
"Second_FlowPro_VetaRP_LYZSUM"));
526 pHistProVetaPOI =
dynamic_cast<TProfile*
>
527 (outputListHistos->FindObject(
"Second_FlowPro_VetaPOI_LYZSUM"));
528 pHistProVPtRP =
dynamic_cast<TProfile*
>
529 (outputListHistos->FindObject(
"Second_FlowPro_VPtRP_LYZSUM"));
530 pHistProVPtPOI =
dynamic_cast<TProfile*
>
531 (outputListHistos->FindObject(
"Second_FlowPro_VPtPOI_LYZSUM"));
535 if (pCommonHist && pCommonHistResults &&
536 pLYZHist2RP[0] && pLYZHist2POI[0] &&
538 pHistProReDenom && pHistProImDenom &&
539 pHistReDtheta && pHistImDtheta &&
540 pHistProVetaRP && pHistProVetaPOI &&
541 pHistProVPtRP && pHistProVPtPOI &&
559 cout<<
"WARNING: Histograms needed to run Finish() secondrun (SUM) are not accessable!"<<endl;
564 (outputListHistos->FindObject(
"AliFlowCommonHistLYZ2PROD"));
566 (outputListHistos->FindObject(
"AliFlowCommonHistResultsLYZ2PROD"));
569 pHistR0theta =
dynamic_cast<TH1D*
>
570 (outputListHistos->FindObject(
"First_Flow_r0theta_LYZPROD"));
572 pHistQsumforChi =
dynamic_cast<TH1F*
>
573 (outputListHistos->FindObject(
"Flow_QsumforChi_LYZPROD"));
576 for(
Int_t theta = 0;theta<iNtheta;theta++){
577 TString nameRP =
"AliFlowLYZHist2RP_";
580 (outputListHistos->FindObject(nameRP));
581 TString namePOI =
"AliFlowLYZHist2POI_";
584 (outputListHistos->FindObject(namePOI));
586 pHistProReDenom =
dynamic_cast<TProfile*
>
587 (outputListHistos->FindObject(
"Second_FlowPro_ReDenom_LYZPROD"));
588 pHistProImDenom =
dynamic_cast<TProfile*
>
589 (outputListHistos->FindObject(
"Second_FlowPro_ImDenom_LYZPROD"));
591 pHistProVetaRP =
dynamic_cast<TProfile*
>
592 (outputListHistos->FindObject(
"Second_FlowPro_VetaRP_LYZPROD"));
593 pHistProVetaPOI =
dynamic_cast<TProfile*
>
594 (outputListHistos->FindObject(
"Second_FlowPro_VetaPOI_LYZPROD"));
595 pHistProVPtRP =
dynamic_cast<TProfile*
>
596 (outputListHistos->FindObject(
"Second_FlowPro_VPtRP_LYZPROD"));
597 pHistProVPtPOI =
dynamic_cast<TProfile*
>
598 (outputListHistos->FindObject(
"Second_FlowPro_VPtPOI_LYZPROD"));
601 if (pCommonHist && pCommonHistResults && pLYZHist2RP[0] && pLYZHist2POI[0] &&
602 pHistR0theta && pHistProReDenom && pHistProImDenom && pHistProVetaRP &&
603 pHistProVetaPOI && pHistProVPtRP && pHistProVPtPOI && pHistQsumforChi) {
618 cout<<
"WARNING: Histograms needed to run Finish() secondrun (PROD) are not accessable!"<<endl;
624 delete [] pLYZHist2RP;
625 delete [] pLYZHist2POI;
628 cout <<
"histogram list pointer is empty in method AliFlowAnalysisWithLeeYangZeros::GetOutputHistograms() " << endl;}
635 if (
fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::Finish()****"<<endl;
646 if (
fDebug) cout<<
"The average multiplicity is "<<dMultRP<<endl;
664 for (
Int_t theta=0;theta<iNtheta;theta++)
671 if (!TMath::AreEqualAbs(dR0, 0., 1e-100)) { dVtheta = dJ01/dR0; }
672 else { cout<<
"r0 is not found! Leaving LYZ analysis."<<endl;
return kFALSE; }
680 if (!TMath::AreEqualAbs(dR0+dBinsize, 0., 1e-100)) {dVplus = dJ01/(dR0+dBinsize);}
681 if (!TMath::AreEqualAbs(dR0-dBinsize, 0., 1e-100)) {dVmin = dJ01/(dR0-dBinsize);}
692 if (!TMath::AreEqualAbs(dMultRP, 0., 1e-100)){
693 dv = dVtheta/dMultRP;
694 dvplus = dVplus/dMultRP;
695 dvmin = dVmin/dMultRP; }}
697 if (
fDebug) cout<<
"dv = "<<dv<<
" and dvplus = "<<dvplus<<
" and dvmin = "<<dvmin<<endl;
710 if (!
fUseSum) {
if (dMultRP!=0.){dV /=dMultRP;}}
720 dSigma2 =
fQ2sum - TMath::Power(
fQsum->X(),2.) - TMath::Power(
fQsum->Y(),2.) - TMath::Power(dV,2.);
722 if (dSigma2>0) dChi = dV/TMath::Sqrt(dSigma2);
726 cout<<
"*************************************"<<endl;
727 cout<<
"*************************************"<<endl;
728 cout<<
" Integrated flow from "<<endl;
730 cout<<
" Lee-Yang Zeroes SUM "<<endl;}
732 cout<<
" Lee-Yang Zeroes PRODUCT "<<endl;}
734 cout<<
"Chi = "<<dChi<<endl;
743 for (
Int_t theta=0;theta<iNtheta;theta++){
744 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi();
745 Double_t dApluscomb = TMath::Exp((dJ01*dJ01)/(2*dChi*dChi)*
747 Double_t dAmincomb = TMath::Exp(-(dJ01*dJ01)/(2*dChi*dChi)*
749 dRelErr2comb += (1/(2*iEvts*(dJ01*dJ01)*TMath::BesselJ1(dJ01)*
750 TMath::BesselJ1(dJ01)))*
751 (dApluscomb*TMath::BesselJ0(2*dJ01*TMath::Sin(dTheta/2)) +
752 dAmincomb*TMath::BesselJ0(2*dJ01*TMath::Cos(dTheta/2)));
754 dRelErr2comb /= iNtheta;
756 Double_t dRelErrcomb = TMath::Sqrt(dRelErr2comb);
760 Double_t dv2Err = dv2pro*dRelErrcomb ;
761 cout<<
"dV = "<<dv2pro<<
" +- "<<dv2Err<<endl;
763 cout<<
"*************************************"<<endl;
764 cout<<
"*************************************"<<endl;
768 if (
fDebug) cout<<
"****histograms filled****"<<endl;
777 TComplex cDenom, cNumerRP, cNumerPOI, cDtheta;
779 TComplex i = TComplex::I();
780 Double_t dBesselRatio[3] = {1., 1.202, 2.69};
801 if (!
fHistR0theta) { cout<<
"Hist pointer R0theta in file does not exist"<<endl; }
804 if (iEntries > iNtheta){
806 Int_t iFiles = iEntries/iNtheta;
807 cout<<iFiles<<
" files were merged!"<<endl;
812 for (
Int_t theta=0;theta<iNtheta;theta++) {
814 if (
fDebug) cerr<<
"dR0 = "<<dR0<<endl;
815 if (!TMath::AreEqualAbs(dR0, 0., 1e-100)) dVtheta = dJ01/dR0;
819 cout <<
"Hist pointer fDenom in file does not exist" <<endl;
820 cout<<
"Leaving LYZ second pass analysis!" <<endl;
825 cDenom(dReDenom,dImDenom);
829 cDtheta = dR0*cDenom/dJ01;
836 cDenom *= TComplex::Power(i, m-1);
839 for (
Int_t be=1;be<=iNbinsEta;be++) {
843 if (cNumerRP.Rho()==0) {
844 if (
fDebug) cerr<<
"WARNING: modulus of cNumerRP is zero in Finish()"<<endl;
846 else if (TMath::AreEqualAbs(cDenom.Rho(), 0, 1e-100)) {
847 if (
fDebug) cerr<<
"WARNING: modulus of cDenom is zero"<<endl;
850 dReRatioRP = (cNumerRP/cDenom).Re();
852 Double_t dVetaRP = dBesselRatio[m-1]*dReRatioRP*dVtheta;
858 for (
Int_t be=1;be<=iNbinsEta;be++) {
862 if (cNumerPOI.Rho()==0) {
863 if (
fDebug) cerr<<
"WARNING: modulus of cNumerPOI is zero in Finish()"<<endl;
865 else if (cDenom.Rho()==0) {
866 if (
fDebug) cerr<<
"WARNING: modulus of cDenom is zero"<<endl;
869 dReRatioPOI = (cNumerPOI/cDenom).Re();
871 Double_t dVetaPOI = dBesselRatio[m-1]*dReRatioPOI*dVtheta;
877 for (
Int_t bp=1;bp<=iNbinsPt;bp++) {
881 if (cNumerRP.Rho()==0) {
882 if (
fDebug) cerr<<
"WARNING: modulus of cNumerRP is zero"<<endl;
884 else if (cDenom.Rho()==0) {
885 if (
fDebug) cerr<<
"WARNING: modulus of cDenom is zero"<<endl;
888 dReRatioRP = (cNumerRP/cDenom).Re();
890 Double_t dVPtRP = dBesselRatio[m-1]*dReRatioRP*dVtheta;
896 for (
Int_t bp=1;bp<=iNbinsPt;bp++) {
900 if (cNumerPOI.Rho()==0) {
901 if (
fDebug) cerr<<
"WARNING: modulus of cNumerPOI is zero"<<endl;
903 else if (cDenom.Rho()==0) {
904 if (
fDebug) cerr<<
"WARNING: modulus of cDenom is zero"<<endl;
907 dReRatioPOI = (cNumerPOI/cDenom).Re();
909 Double_t dVPtPOI = dBesselRatio[m-1]*dReRatioPOI*dVtheta;
920 if (!
fUseSum) {
if (dMultRP!=0.) { dV /=dMultRP; }}
921 if (TMath::AreEqualAbs(dV, 0., 1e-100)) { cout<<
"dV = 0! Leaving LYZ analysis."<<endl;
return kFALSE; }
932 dSigma2 =
fQ2sum - TMath::Power(
fQsum->X(),2.) - TMath::Power(
fQsum->Y(),2.) - TMath::Power(dV,2.);
933 if (dSigma2>0) dChi = dV/TMath::Sqrt(dSigma2);
942 for (
Int_t theta=0;theta<iNtheta;theta++){
943 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi();
944 Double_t dApluscomb = TMath::Exp((dJ01*dJ01)/(2*dChi*dChi)*
946 Double_t dAmincomb = TMath::Exp(-(dJ01*dJ01)/(2*dChi*dChi)*
948 dRelErr2comb += (1/(2*iEvts*(dJ01*dJ01)*TMath::BesselJ1(dJ01)*
949 TMath::BesselJ1(dJ01)))*
950 (dApluscomb*TMath::BesselJ0(2*dJ01*TMath::Sin(dTheta/2)) +
951 dAmincomb*TMath::BesselJ0(2*dJ01*TMath::Cos(dTheta/2)));
953 dRelErr2comb /= iNtheta;
955 Double_t dRelErrcomb = TMath::Sqrt(dRelErr2comb);
959 cout<<
"*************************************"<<endl;
960 cout<<
"*************************************"<<endl;
961 cout<<
" Integrated flow from "<<endl;
963 cout<<
" Lee-Yang Zeroes SUM "<<endl;}
965 cout<<
" Lee-Yang Zeroes PRODUCT "<<endl;}
967 cout<<
"Chi = "<<dChi<<endl;
968 cout<<
"dV = "<<dV<<
" +- "<<dVErr<<endl;
975 for(
Int_t b=0;b<iNbinsEta;b++) {
981 if (!TMath::AreEqualAbs(dNprime, 0., 1e-100)) {
982 for (
Int_t theta=0;theta<iNtheta;theta++) {
983 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi();
984 Double_t dApluscomb = TMath::Exp((dJ01*dJ01)/(2*dChi*dChi)*
986 Double_t dAmincomb = TMath::Exp(-(dJ01*dJ01)/(2*dChi*dChi)*
988 dErr2difcomb += (TMath::Cos(dTheta)/(4*dNprime*TMath::BesselJ1(dJ01)*
989 TMath::BesselJ1(dJ01)))*
990 ((dApluscomb*TMath::BesselJ0(2*dJ01*TMath::Sin(dTheta/2))) -
991 (dAmincomb*TMath::BesselJ0(2*dJ01*TMath::Cos(dTheta/2))));
995 if (!TMath::AreEqualAbs(dErr2difcomb, 0., 1e-100)) {
996 dErr2difcomb /= iNtheta;
997 dErrdifcomb = TMath::Sqrt(dErr2difcomb);
999 else {dErrdifcomb = 0.;}
1006 for(
Int_t b=0;b<iNbinsEta;b++) {
1013 for (
Int_t theta=0;theta<iNtheta;theta++) {
1014 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi();
1015 Double_t dApluscomb = TMath::Exp((dJ01*dJ01)/(2*dChi*dChi)*
1016 TMath::Cos(dTheta));
1017 Double_t dAmincomb = TMath::Exp(-(dJ01*dJ01)/(2*dChi*dChi)*
1018 TMath::Cos(dTheta));
1019 dErr2difcomb += (TMath::Cos(dTheta)/(4*dNprime*TMath::BesselJ1(dJ01)*
1020 TMath::BesselJ1(dJ01)))*
1021 ((dApluscomb*TMath::BesselJ0(2*dJ01*TMath::Sin(dTheta/2))) -
1022 (dAmincomb*TMath::BesselJ0(2*dJ01*TMath::Cos(dTheta/2))));
1026 if (dErr2difcomb!=0.) {
1027 dErr2difcomb /= iNtheta;
1028 dErrdifcomb = TMath::Sqrt(dErr2difcomb);
1030 else {dErrdifcomb = 0.;}
1042 for(
Int_t b=0;b<iNbinsPt;b++) {
1049 for (
Int_t theta=0;theta<iNtheta;theta++) {
1050 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi();
1051 Double_t dApluscomb = TMath::Exp((dJ01*dJ01)/(2*dChi*dChi)*
1052 TMath::Cos(dTheta));
1053 Double_t dAmincomb = TMath::Exp(-(dJ01*dJ01)/(2*dChi*dChi)*
1054 TMath::Cos(dTheta));
1055 dErr2difcomb += (TMath::Cos(dTheta)/(4*dNprime*TMath::BesselJ1(dJ01)*
1056 TMath::BesselJ1(dJ01)))*
1057 ((dApluscomb*TMath::BesselJ0(2*dJ01*TMath::Sin(dTheta/2))) -
1058 (dAmincomb*TMath::BesselJ0(2*dJ01*TMath::Cos(dTheta/2))));
1062 if (dErr2difcomb!=0.) {
1063 dErr2difcomb /= iNtheta;
1064 dErrdifcomb = TMath::Sqrt(dErr2difcomb);
1067 else {dErrdifcomb = 0.;}
1073 Double_t dYieldPt = fHistPtRP->GetBinContent(b);
1074 dVRP += dv2pro*dYieldPt;
1076 dErrV += dYieldPt*dYieldPt*dErrdifcomb*dErrdifcomb;
1077 }
else { cout<<
"fHistPtRP is NULL"<<endl; }
1080 if (!TMath::AreEqualAbs(dSum, 0., 1e-100)) {
1082 dErrV /= (dSum*dSum);
1083 dErrV = TMath::Sqrt(dErrV);
1085 cout<<
"dV(RP) = "<<dVRP<<
" +- "<<dErrV<<endl;
1096 for(
Int_t b=0;b<iNbinsPt;b++) {
1103 for (
Int_t theta=0;theta<iNtheta;theta++) {
1104 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi();
1105 Double_t dApluscomb = TMath::Exp((dJ01*dJ01)/(2*dChi*dChi)*
1106 TMath::Cos(dTheta));
1107 Double_t dAmincomb = TMath::Exp(-(dJ01*dJ01)/(2*dChi*dChi)*
1108 TMath::Cos(dTheta));
1109 dErr2difcomb += (TMath::Cos(dTheta)/(4*dNprime*TMath::BesselJ1(dJ01)*
1110 TMath::BesselJ1(dJ01)))*
1111 ((dApluscomb*TMath::BesselJ0(2*dJ01*TMath::Sin(dTheta/2))) -
1112 (dAmincomb*TMath::BesselJ0(2*dJ01*TMath::Cos(dTheta/2))));
1116 if (dErr2difcomb!=0.) {
1117 dErr2difcomb /= iNtheta;
1118 dErrdifcomb = TMath::Sqrt(dErr2difcomb);
1121 else {dErrdifcomb = 0.;}
1127 Double_t dYieldPt = fHistPtPOI->GetBinContent(b);
1128 dVPOI += dv2pro*dYieldPt;
1130 dErrV += dYieldPt*dYieldPt*dErrdifcomb*dErrdifcomb;
1131 }
else { cout<<
"fHistPtPOI is NULL"<<endl; }
1136 dErrV /= (dSum*dSum);
1137 dErrV = TMath::Sqrt(dErrV);
1139 cout<<
"dV(POI) = "<<dVPOI<<
" +- "<<dErrV<<endl;
1141 cout<<
"*************************************"<<endl;
1142 cout<<
"*************************************"<<endl;
1159 if (
fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::FillFromFlowEvent()****"<<endl;
1162 cout<<
"##### FlowLeeYangZero: FlowEvent pointer null"<<endl;
1167 TComplex cExpo, cGtheta, cGthetaNew, cZ;
1179 if (!TMath::AreEqualAbs(vQ.
GetMult(), 0., 1e-100)) {
1192 for (
Int_t theta=0;theta<iNtheta;theta++) {
1193 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi()/dOrder;
1198 for (
Int_t bin=1;bin<=iNbins;bin++) {
1202 cExpo(0.,dR*dQtheta);
1203 cGtheta = TComplex::Exp(cExpo);
1208 if (cGtheta.Rho2() > 100.)
break;
1224 if (
fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::SecondFillFromFlowEvent()****"<<endl;
1227 cout<<
"##### FlowLeeYangZero: FlowEvent pointer null"<<endl;
1232 TComplex cExpo, cDenom, cNumerRP, cNumerPOI, cCosTermComplex;
1258 for (
Int_t theta=0;theta<iNtheta;theta++)
1260 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi()/dOrder;
1269 else { cout <<
"pointer fHistR0theta does not exist" << endl;
1274 cExpo(0.,dR0*dQtheta);
1275 cDenom = dQtheta*(TComplex::Exp(cExpo));
1278 for (
Int_t i=0;i<iNumberOfTracks;i++) {
1285 dCosTermRP = cos(m*dOrder*(dPhi-dTheta));
1286 cNumerRP = dCosTermRP*(TComplex::Exp(cExpo));
1287 if (cNumerRP.Rho()==0) { cerr<<
"WARNING: modulus of cNumerRP is zero in SecondFillFromFlowEvent"<<endl;}
1288 if (
fDebug) { cerr<<
"modulus of cNumerRP is "<<cNumerRP.Rho()<<endl;}
1294 dCosTermPOI = cos(m*dOrder*(dPhi-dTheta));
1295 cNumerPOI = dCosTermPOI*(TComplex::Exp(cExpo));
1296 if (cNumerPOI.Rho()==0) { cerr<<
"WARNING: modulus of cNumerPOI is zero in SecondFillFromFlowEvent"<<endl;}
1297 if (
fDebug) { cerr<<
"modulus of cNumerPOI is "<<cNumerPOI.Rho()<<endl;}
1303 else {cerr <<
"no particle!!!"<<endl;}
1314 else { cout <<
"Pointers to cDenom mising" << endl;}
1325 if (
fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::GetQtheta()****"<<endl;
1330 dQtheta = aQ.X()*cos(dOrder*aTheta)+aQ.Y()*sin(dOrder*aTheta);
1343 if (
fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::GetGrtheta()****"<<endl;
1346 TComplex cG = TComplex::One();
1353 for (
Int_t i=0;i<iNumberOfTracks;i++)
1359 Double_t dGIm = aR * dWgt*cos(dOrder*(dPhi - aTheta));
1360 TComplex cGi(1., dGIm);
1364 else {cerr <<
"no particle pointer !!!"<<endl;}
1380 if (
fDebug) cout<<
"****AliFlowAnalysisWithLeeYangZeros::GetGrtheta()****"<<endl;
1382 TComplex cG = TComplex::One();
1383 TComplex cdGr0(0.,0.);
1391 Double_t dTheta = ((double)theta/iNtheta)*TMath::Pi()/dOrder;
1394 for (
Int_t i=0;i<iNumberOfTracks;i++)
1400 Double_t dCosTerm = dWgt*cos(dOrder*(dPhi - dTheta));
1403 TComplex cGi(1., dGIm);
1404 TComplex cCosTermComplex(1., aR0*dCosTerm);
1407 cdGr0 +=(dCosTerm / cCosTermComplex);
1410 else {cerr <<
"no particle!!!"<<endl;}
1414 for (
Int_t i=0;i<iNumberOfTracks;i++)
1421 Double_t dCosTerm = cos(dOrder*(dPhi-dTheta));
1422 TComplex cCosTermComplex(1.,aR0*dCosTerm);
1425 TComplex cNumerRP = cG*dCosTerm/cCosTermComplex;
1430 TComplex cNumerPOI = cG*dCosTerm/cCosTermComplex;
1434 else {cerr <<
"no particle pointer!!!"<<endl;}
1437 TComplex cDenom = cG*cdGr0;
Double_t GetEtaMax() const
Bool_t FillChi(Double_t aChi)
void Fill(Double_t f, TComplex c)
void SetHist2POI(AliFlowLYZHist2 *const aLYZHist2POI[])
TComplex GetGrtheta(AliFlowEventSimple *anEvent, Double_t aR, Double_t aTheta)
AliFlowLYZHist1 * fHist1[5]
virtual AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
void SetHistProVetaRP(TProfile *const aHistProVetaRP)
void SetHistProVetaPOI(TProfile *const aHistProVetaPOI)
Double_t GetEntriesInEtaBinPOI(Int_t iBin)
void WriteHistograms(TString *outputFileName)
AliFlowTrackSimple * GetTrack(Int_t i)
void SetHistProReDenom(TProfile *const aHistProReDenom)
Double_t GetQtheta(AliFlowVector aQ, Double_t aTheta)
Double_t GetEntriesInPtBinPOI(Int_t iBin)
Double_t GetPtMin() const
Double_t GetBinCenter(Int_t i)
Bool_t FillDifferentialFlowPtRP(Int_t aBin, Double_t av, Double_t anError)
void SetCommonHists(AliFlowCommonHist *const aCommonHist)
Double_t GetPtMax() const
void SetHistR0theta(TH1D *const aHistR0theta)
Bool_t InRPSelection() const
Bool_t FillControlHistograms(AliFlowEventSimple *anEvent, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
TComplex GetNumerPt(Int_t i)
TProfile * fHistProVetaPOI
static AliFlowLYZConstants * GetMaster()
Bool_t FillIntegratedFlowRP(Double_t aV, Double_t anError)
Double_t GetBinCenter(Int_t i)
void SetHistProVPtPOI(TProfile *const aHistProVPtPOI)
void Fill(Double_t d1, Double_t d2, TComplex c)
Double_t GetMaxPROD() const
ClassImp(AliFlowAnalysisWithLeeYangZeros) AliFlowAnalysisWithLeeYangZeros
TProfile * fHistProVPtPOI
void SetCommonHistsRes(AliFlowCommonHistResults *const aCommonHistResult)
Int_t GetNbinsEta() const
void SetHistReDtheta(TH1D *const aHistReDtheta)
void SetHist2RP(AliFlowLYZHist2 *const aLYZHist2RP[])
Double_t GetEntriesInPtBinRP(Int_t iBin)
static AliFlowCommonConstants * GetMaster()
TProfile * fHistProReDenom
Double_t GetEntriesInEtaBinRP(Int_t iBin)
AliFlowLYZHist2 * fHist2POI[5]
Bool_t GetFirstRun() const
void SetHistVtheta(TH1D *const aHistVtheta)
TComplex GetDiffFlow(AliFlowEventSimple *anEvent, Double_t aR, Int_t theta)
Bool_t FillIntegratedFlow(Double_t aV, Double_t anError)
void SetEventNumber(Int_t n)
Bool_t FillDifferentialFlowEtaPOI(Int_t aBin, Double_t av, Double_t anError)
Bool_t FillIntegratedFlowPOI(Double_t aV, Double_t anError)
Double_t GetBinCenterPt(Int_t i)
void SetHistQsumforChi(TH1F *const aHistQsumforChi)
Bool_t Make(AliFlowEventSimple *anEvent)
Bool_t FillDifferentialFlowPtPOI(Int_t aBin, Double_t av, Double_t anError)
TProfile * fHistProVetaRP
Double_t GetEtaMin() const
Bool_t FillFromFlowEvent(AliFlowEventSimple *anEvent)
TComplex GetNumerEta(Int_t i)
void GetOutputHistograms(TList *outputListHistos)
virtual ~AliFlowAnalysisWithLeeYangZeros()
Bool_t InPOISelection(Int_t poiType=1) const
void SetHistProVPtRP(TProfile *const aHistProVPtRP)
void SetHistProImDenom(TProfile *const aHistProImDenom)
void SetHistImDtheta(TH1D *const aHistImDtheta)
Bool_t FillDifferentialFlowEtaRP(Int_t aBin, Double_t av, Double_t anError)
AliFlowCommonHistResults * fCommonHistsRes
TProfile * fHistProImDenom
Bool_t SecondFillFromFlowEvent(AliFlowEventSimple *anEvent)
Double_t GetMaxSUM() const
AliFlowLYZHist2 * fHist2RP[5]
void SetHist1(AliFlowLYZHist1 *const aLYZHist1[])
void SetQ2sum(Double_t d)
AliFlowCommonHist * fCommonHists
Int_t NumberOfTracks() const