#define AliFlowAnalysisWithLYZEventPlane_cxx
#include "Riostream.h"
#include "TProfile.h"
#include "TFile.h"
#include "TComplex.h"
#include "TList.h"
#include "AliFlowVector.h"
#include "AliFlowLYZConstants.h"
#include "AliFlowEventSimple.h"
#include "AliFlowLYZEventPlane.h"
class AliFlowTrackSimple;
using std::cout;
using std::endl;
ClassImp(AliFlowLYZEventPlane)
AliFlowLYZEventPlane::AliFlowLYZEventPlane():
fSecondRunList(0),
fWR(0),
fPsi(0),
fSecondReDtheta(0),
fSecondImDtheta(0),
fFirstr0theta(0)
{
}
AliFlowLYZEventPlane::~AliFlowLYZEventPlane()
{
delete fSecondRunList;
}
void AliFlowLYZEventPlane::Init()
{
cout<<"---Lee Yang Zeros Event Plane Method---"<<endl;
if (fSecondRunList) {
fSecondReDtheta = (TProfile*)fSecondRunList->FindObject("Second_FlowPro_ReDtheta_LYZSUM");
fSecondImDtheta = (TProfile*)fSecondRunList->FindObject("Second_FlowPro_ImDtheta_LYZSUM");
fFirstr0theta = (TProfile*)fSecondRunList->FindObject("First_FlowPro_r0theta_LYZSUM");
if (!fSecondReDtheta) {cout<<"fSecondReDtheta is NULL!"<<endl; }
if (!fSecondImDtheta) {cout<<"fSecondImDtheta is NULL!"<<endl; }
if (!fFirstr0theta) {cout<<"fFirstr0theta is NULL!"<<endl; }
}
}
void AliFlowLYZEventPlane::CalculateRPandW(AliFlowVector aQ)
{
Int_t iNtheta = AliFlowLYZConstants::GetMaster()->GetNtheta();
Double_t dCosTerm = 0;
Double_t dSinTerm = 0;
TComplex cDtheta;
TComplex cRatio;
if (aQ.Mod()==0.) { cout<<"Q vector is NULL"<<endl; }
else {
for (Int_t theta=0;theta<iNtheta;theta++) {
Double_t dTheta = ((float)theta/iNtheta)*TMath::Pi()/2;
Double_t dQtheta = aQ.X()*cos(2*dTheta)+aQ.Y()*sin(2*dTheta);
Double_t dR0 = fFirstr0theta->GetBinContent(theta+1);
Double_t dReDtheta = fSecondReDtheta->GetBinContent(theta+1);
Double_t dImDtheta = fSecondImDtheta->GetBinContent(theta+1);
cDtheta(dReDtheta,dImDtheta);
TComplex cExpo(0.,dR0*dQtheta);
if (cDtheta.Rho()!=0.) { cRatio =(TComplex::Exp(cExpo))/cDtheta; }
else { cRatio(0.,0.); }
dCosTerm += cRatio.Re() * TMath::Cos(2*dTheta);
dSinTerm += cRatio.Re() * TMath::Sin(2*dTheta);
}
dCosTerm /= iNtheta;
dSinTerm /= iNtheta;
fWR = TMath::Sqrt(dCosTerm*dCosTerm + dSinTerm*dSinTerm);
fPsi = 0.5*TMath::ATan2(dSinTerm,dCosTerm);
if (fPsi < 0.) { fPsi += TMath::Pi(); }
}
}
AliFlowLYZEventPlane.cxx:1 AliFlowLYZEventPlane.cxx:2 AliFlowLYZEventPlane.cxx:3 AliFlowLYZEventPlane.cxx:4 AliFlowLYZEventPlane.cxx:5 AliFlowLYZEventPlane.cxx:6 AliFlowLYZEventPlane.cxx:7 AliFlowLYZEventPlane.cxx:8 AliFlowLYZEventPlane.cxx:9 AliFlowLYZEventPlane.cxx:10 AliFlowLYZEventPlane.cxx:11 AliFlowLYZEventPlane.cxx:12 AliFlowLYZEventPlane.cxx:13 AliFlowLYZEventPlane.cxx:14 AliFlowLYZEventPlane.cxx:15 AliFlowLYZEventPlane.cxx:16 AliFlowLYZEventPlane.cxx:17 AliFlowLYZEventPlane.cxx:18 AliFlowLYZEventPlane.cxx:19 AliFlowLYZEventPlane.cxx:20 AliFlowLYZEventPlane.cxx:21 AliFlowLYZEventPlane.cxx:22 AliFlowLYZEventPlane.cxx:23 AliFlowLYZEventPlane.cxx:24 AliFlowLYZEventPlane.cxx:25 AliFlowLYZEventPlane.cxx:26 AliFlowLYZEventPlane.cxx:27 AliFlowLYZEventPlane.cxx:28 AliFlowLYZEventPlane.cxx:29 AliFlowLYZEventPlane.cxx:30 AliFlowLYZEventPlane.cxx:31 AliFlowLYZEventPlane.cxx:32 AliFlowLYZEventPlane.cxx:33 AliFlowLYZEventPlane.cxx:34 AliFlowLYZEventPlane.cxx:35 AliFlowLYZEventPlane.cxx:36 AliFlowLYZEventPlane.cxx:37 AliFlowLYZEventPlane.cxx:38 AliFlowLYZEventPlane.cxx:39 AliFlowLYZEventPlane.cxx:40 AliFlowLYZEventPlane.cxx:41 AliFlowLYZEventPlane.cxx:42 AliFlowLYZEventPlane.cxx:43 AliFlowLYZEventPlane.cxx:44 AliFlowLYZEventPlane.cxx:45 AliFlowLYZEventPlane.cxx:46 AliFlowLYZEventPlane.cxx:47 AliFlowLYZEventPlane.cxx:48 AliFlowLYZEventPlane.cxx:49 AliFlowLYZEventPlane.cxx:50 AliFlowLYZEventPlane.cxx:51 AliFlowLYZEventPlane.cxx:52 AliFlowLYZEventPlane.cxx:53 AliFlowLYZEventPlane.cxx:54 AliFlowLYZEventPlane.cxx:55 AliFlowLYZEventPlane.cxx:56 AliFlowLYZEventPlane.cxx:57 AliFlowLYZEventPlane.cxx:58 AliFlowLYZEventPlane.cxx:59 AliFlowLYZEventPlane.cxx:60 AliFlowLYZEventPlane.cxx:61 AliFlowLYZEventPlane.cxx:62 AliFlowLYZEventPlane.cxx:63 AliFlowLYZEventPlane.cxx:64 AliFlowLYZEventPlane.cxx:65 AliFlowLYZEventPlane.cxx:66 AliFlowLYZEventPlane.cxx:67 AliFlowLYZEventPlane.cxx:68 AliFlowLYZEventPlane.cxx:69 AliFlowLYZEventPlane.cxx:70 AliFlowLYZEventPlane.cxx:71 AliFlowLYZEventPlane.cxx:72 AliFlowLYZEventPlane.cxx:73 AliFlowLYZEventPlane.cxx:74 AliFlowLYZEventPlane.cxx:75 AliFlowLYZEventPlane.cxx:76 AliFlowLYZEventPlane.cxx:77 AliFlowLYZEventPlane.cxx:78 AliFlowLYZEventPlane.cxx:79 AliFlowLYZEventPlane.cxx:80 AliFlowLYZEventPlane.cxx:81 AliFlowLYZEventPlane.cxx:82 AliFlowLYZEventPlane.cxx:83 AliFlowLYZEventPlane.cxx:84 AliFlowLYZEventPlane.cxx:85 AliFlowLYZEventPlane.cxx:86 AliFlowLYZEventPlane.cxx:87 AliFlowLYZEventPlane.cxx:88 AliFlowLYZEventPlane.cxx:89 AliFlowLYZEventPlane.cxx:90 AliFlowLYZEventPlane.cxx:91 AliFlowLYZEventPlane.cxx:92 AliFlowLYZEventPlane.cxx:93 AliFlowLYZEventPlane.cxx:94 AliFlowLYZEventPlane.cxx:95 AliFlowLYZEventPlane.cxx:96 AliFlowLYZEventPlane.cxx:97 AliFlowLYZEventPlane.cxx:98 AliFlowLYZEventPlane.cxx:99 AliFlowLYZEventPlane.cxx:100 AliFlowLYZEventPlane.cxx:101 AliFlowLYZEventPlane.cxx:102 AliFlowLYZEventPlane.cxx:103 AliFlowLYZEventPlane.cxx:104 AliFlowLYZEventPlane.cxx:105 AliFlowLYZEventPlane.cxx:106 AliFlowLYZEventPlane.cxx:107 AliFlowLYZEventPlane.cxx:108 AliFlowLYZEventPlane.cxx:109 AliFlowLYZEventPlane.cxx:110 AliFlowLYZEventPlane.cxx:111 AliFlowLYZEventPlane.cxx:112 AliFlowLYZEventPlane.cxx:113 AliFlowLYZEventPlane.cxx:114 AliFlowLYZEventPlane.cxx:115 AliFlowLYZEventPlane.cxx:116 AliFlowLYZEventPlane.cxx:117 AliFlowLYZEventPlane.cxx:118 AliFlowLYZEventPlane.cxx:119 AliFlowLYZEventPlane.cxx:120 AliFlowLYZEventPlane.cxx:121 AliFlowLYZEventPlane.cxx:122 AliFlowLYZEventPlane.cxx:123 AliFlowLYZEventPlane.cxx:124 AliFlowLYZEventPlane.cxx:125 AliFlowLYZEventPlane.cxx:126 AliFlowLYZEventPlane.cxx:127 AliFlowLYZEventPlane.cxx:128 AliFlowLYZEventPlane.cxx:129 AliFlowLYZEventPlane.cxx:130 AliFlowLYZEventPlane.cxx:131 AliFlowLYZEventPlane.cxx:132 AliFlowLYZEventPlane.cxx:133 AliFlowLYZEventPlane.cxx:134 AliFlowLYZEventPlane.cxx:135 AliFlowLYZEventPlane.cxx:136 AliFlowLYZEventPlane.cxx:137