meanptvscent(){ gROOT->Reset(); //=========Macro generated from canvas: bb/bb //========= (Wed Aug 14 17:34:53 2002) by ROOT version3.02/00 TCanvas *bb = new TCanvas("bb", "bb",179,141,700,600); bb->Range(0,0,1,1); bb->SetFillColor(10); bb->SetBorderMode(0); bb->SetBorderSize(2); gStyle->SetOptStat(0);//don't draw the statistics information gStyle->SetMarkerStyle(24); gStyle->SetMarkerColor(2); gStyle->SetHistLineColor(6); gStyle->SetAxisColor(1,"xy"); gStyle->SetTitleColor(5); gStyle->SetStatColor(7); gStyle->SetStatTextColor(4); gStyle->SetFrameLineColor(1); gStyle->SetTitleTextColor(2); gStyle->SetCanvasBorderSize(0); gStyle->SetPadBorderSize(0); bb->DrawFrame(0.,0.,10.,1.); char charc[3]; Int_t energe[6]={5,10,20,60,130,200}; TString *thetitle = new TString("#bar{P}/P and #bar{#Lambda}/#Lambda vs Centrality for Au+Au at "); TLegend *ff=new TLegend(0.7532,0.4480,0.8737,0.8667,"","brNDC"); for(int ik=1;ik<=6;ik++){ TString *FileName = new TString("/direct/star+u/chengyh/centrality/analysis/result/MC_Tree/"); sprintf(charc,"%d",energe[ik-1]); FileName->Append(charc); cout<<*FileName<Append("/ptmean.root"); cout<<*FileName<Data()); delete FileName; Float_t y[9]; Float_t ey[9]; Float_t x[9]={1.,2.,3.,4.,5.,6.,7.,8.,9.}; Float_t ex[9]={0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5}; for(int ip=1;ip<=9;ip++){ y[ip-1]=(Float_t)pbar_cent->GetBinContent(ip); ey[ip-1]=pbar_cent->GetBinError(ip); cout<SetMarkerColor(1); gr->SetMarkerColor(ik-1); gr->SetMarkerStyle(8); gr->Draw("p"); for(int ip=1;ip<=9;ip++){ y[ip-1]=(Float_t)pro_cent->GetBinContent(ip); ey[ip-1]=pro_cent->GetBinError(ip); cout<SetMarkerColor(1); gr->SetMarkerColor(ik-1); gr->SetMarkerStyle(8); gr->Draw("p"); delete bbb; } bb->cd(); bb->Modified(); bb->cd(); }