6 TFile *f = new TFile("../flow11h.root");
9 printf("No such file\n");
17 TH2F * hcos2AC = (TH2F*)f->Get("cos2AC");
18 TH2F * hcos2V0AC = (TH2F*)f->Get("cos2V0AC");
19 TH2F * hcos2V0ATPC = (TH2F*)f->Get("cos2V0ATPC");
20 TH2F * hcos2V0CTPC = (TH2F*)f->Get("cos2V0CTPC");
22 // TH1F * hresCh = (TH1F*)f2->Get("hEvPlResEta4");
27 TH1D* rpT2 = new TH1D("rpTPC", "rpTPC 2 sub", hcos2AC->GetNbinsY(),0,100.);
28 TH1D* rpT3 = new TH1D("rpTPC2", "rpTPC 3 sub", hcos2AC->GetNbinsY(),0,100.);
29 TH1D* rpA = new TH1D("rpV0A", "rpV0A", hcos2AC->GetNbinsY(),0,100.);
30 TH1D* rpC = new TH1D("rpV0C", "rpV0C", hcos2AC->GetNbinsY(),0,100.);
32 Double_t resT2, resTA, resTC, resAC;
34 for(int i=0;i<hcos2AC->GetNbinsY();i++){
35 hres = hcos2AC->ProjectionX("res",i,i) ;
37 if(resT2>0)rpT2->SetBinContent(i, resT2);
39 hresF = hcos2V0AC->ProjectionX("res2",i,i) ;
40 resAC = GetCos(hresF);
41 hres = hcos2V0ATPC->ProjectionX("res3",i,i) ;
43 hres = hcos2V0CTPC->ProjectionX("res4",i,i) ;
46 if(resAC>0)rpT3->SetBinContent(i, TMath::Sqrt(resTA*resTC/resAC));
47 if(resTC>0)rpA->SetBinContent(i, TMath::Sqrt(resTA*resAC/resTC));
48 if(resTA>0)rpC->SetBinContent(i, TMath::Sqrt(resTC*resAC/resTA));
50 //cout<<"i="<<i<<", rpA="<<TMath::Sqrt(resTA*resAC/resTC)<< endl;
53 rpT2->SetTitle("Reaction plane resolution with different ALICE detectors");
54 rpT2->GetXaxis()->SetTitle("centrality percentage");
55 rpT2->GetYaxis()->SetTitle("resolution");
57 rpT2->SetMarkerStyle(20);
58 rpT2->SetMarkerColor(2);
59 rpT2->SetLineColor(2);
62 rpT3->SetMarkerStyle(21);
63 rpT3->SetMarkerColor(2);
64 rpT3->SetLineColor(2);
67 rpA->SetMarkerStyle(22);
68 rpA->SetMarkerColor(kMagenta);
69 rpA->SetLineColor(kMagenta);
72 rpC->SetMarkerStyle(22);
73 rpC->SetMarkerColor(kGreen);
74 rpC->SetLineColor(kGreen);
78 hresCh->SetMarkerStyle(21);
79 hresCh->SetMarkerColor(kBlue);
80 hresCh->SetLineColor(kBlue);
84 TLegend * l = new TLegend(0.12,0.15,0.6,0.35) ;
86 l->SetTextSize(0.03) ;
87 l->AddEntry(rpT2,"RPRes with TPC 2 subs","p") ;
88 l->AddEntry(rpT3,"RPRes with TPC 3 subs","p") ;
89 l->AddEntry(rpA,"RPRes with V0A","p") ;
90 l->AddEntry(rpC,"RPRes with V0C","p") ;
91 // l->AddEntry(hresCh,"RPRes TPC (Alex Dobrin)","p") ;
96 Double_t Ollitrault(Double_t chi){
97 Double_t x = 0.25*chi*chi;
98 Double_t resk1 = 0.626657 * chi * exp(-x) * (TMath::BesselI0((float)x) + TMath::BesselI1((float)x));
99 Double_t resk2 = 0.626657 * chi * exp(-x) * (TMath::Sqrt(2./TMath::Pi()/x)*TMath::SinH(x) + TMath::Sqrt(2./TMath::Pi()/x)*(TMath::CosH(x) - TMath::SinH(x)/x));
104 Double_t GetCos(TH1D* hres){
105 Double_t resMean = hres->GetMean() ;
107 if(resMean>0)return resMean ;
111 Double_t GetRes(TH1D* hres){
112 Double_t resMean = hres->GetMean() ;
114 if(resMean>0)resOld=1./TMath::Sqrt(resMean) ;
119 for(int j=0; j<15; j++){
120 double resSub = sqrt(rxn2);
121 Double_t resEve = Ollitrault(chi);
122 chi= (resEve < resSub) ? chi+1.0*pow(0.5, j) : chi-1.0*pow(0.5, j);
124 return Ollitrault(TMath::Sqrt(2)*chi);