From: Kris Hagel (hagel@comp.tamu.edu)
Date: Wed May 28 2003 - 10:10:24 EDT
Bjorn,
Michael had gotten these scripts from Ian.  The ratiosIGB.C script has 
the ratios hard wired into it.  The other script is only for cultural 
enrichment.  I should note that these scripts are just as Michael gave 
them to me.  They did not run right out of the box; I had to muck with 
it and did that on the linux machine which would require an extra few 
microseconds to get for you.  I figured this satisfies you needs for the 
moment (if no one else sent you the data)
See you next week.
Kris
Bjorn H Samset wrote:
>Ho dev'lephants.
>
>Could someone tell me where I can find the raw data points for our AuAu
>200GeV ratos? I'd like to plot them together with my pp results.
>
>Ping :-)
>
>--
>Bjorn H. Samset                           Phone: 22856465/92051998
>PhD student, heavy ion physics            Adr:   Schouterrassen 6
>Inst. of Physics, University of Oslo             0573 Oslo
>                              \|/
>----------------------------> -*- <-----------------------------
>                              /|\
>
>  
>
pbarpVskbark(void) 
{
  //check to see effect of proper errors...
   gInterpreter->LoadMacro("ratiosIGB.C");
   //  gInterpreter->LoadMacro("ratios.C");
  TCanvas *c1 = new TCanvas("Figure4", "",100,100,670,700);
  TCanvas *c2 = new TCanvas("ratios2", "",100,100,600,600);
  gStyle->SetOptFit(0);
  gStyle->SetOptStat(0);
  gStyle->SetEndErrorSize(-1);
  gStyle->SetStripDecimals(kFALSE);
  gStyle->SetLineWidth(2);
  c1->Draw();
  c2->Draw();
  c2->Divide(1,2);
  c1->cd();
  TPad *pad1 = new TPad("pad1", "", 0, 0, 1, 1,0,0,0);
  pad1->SetTopMargin(0.12);
  pad1->SetBottomMargin(0.13);
  pad1->SetLeftMargin(0.15);
  pad1->SetRightMargin(0.03);
  pad1->Draw();
  pad1->cd();
  TH2F* null = new TH2F("","",100,-0.05,0.99,100,0.15,1);
  null->GetXaxis()->SetTitle("#bar{p}/p");
  null->GetYaxis()->SetTitle("");
  null->GetYaxis()->SetNdivisions(805);
  null->GetXaxis()->SetNdivisions(807);
  null->GetYaxis()->SetLabelSize(0.045);
  null->GetXaxis()->SetLabelSize(0.045);
  null->GetXaxis()->SetLabelOffset(0.01);
  null->GetYaxis()->SetLabelOffset(0.005);
  null->GetYaxis()->SetTitleOffset(1.2);
  null->GetYaxis()->SetTitleSize(0.05);
  null->GetXaxis()->SetTitleOffset(1.2);
  null->GetXaxis()->SetTitleSize(0.05);
  null->GetYaxis()->CenterTitle(kTRUE);
  null->GetXaxis()->CenterTitle(kTRUE);
  null->Draw();
  TLine* lright = new TLine(0.99,0.15,0.99,1);
  lright->Draw();
  
  TLine* ltop = new TLine(-0.05,1,0.99,1);
  ltop->Draw();
  TLatex* yTitle = new TLatex(-0.22,0.6,"#frac{K^{- }}{K^{+}}");
  yTitle->SetTextSize(0.05);
  yTitle->Draw();
  TLatex* rel = 
    new TLatex(0.01,0.88,"#frac{K^{- }}{K^{+}} =
 #left(#frac{#bar{p}}{p}#right)^{1/4} (dashed)");
  rel->SetTextSize(0.04);
  rel->Draw();
  TLatex* rel = 
    new TLatex(0.45,0.7,"#frac{K^{- }}{K^{+}}  =
 #left(#frac{#bar{p}}{p}#right)^{1/3} (dotted)");
  rel->SetTextSize(0.04);
  rel->Draw();
  TF1* curve = new TF1("f","x**0.3333",0,1);
  curve->SetLineStyle(3);
  curve->SetLineColor(12);
  curve->Draw("same");
  TF1* curve2 = new TF1("f","x**0.25",0,1);
  curve2->SetLineStyle(2);
  curve2->SetLineColor(12);
  curve2->Draw("same");
  TGraphErrors* kRatio = getKaonRatio(2);
  TGraphErrors* pRatio = getProtonRatio(2);
  
  TH2F* null2 = new TH2F("","",100,-4,4,100,0,1.2);
  c2->cd(1);
  null2->Draw();
  kRatio->Draw("PS");
  gStyle->SetOptFit(1111);
  kRatio->Fit("gaus","","",-3.4,3.4);
  TF1* kFit = (TF1*)(kRatio->GetListOfFunctions())->At(0);
  kFit->SetLineColor(3);
  kFit->Draw("same");
  c2->cd(2);
  null2->Draw();
  pRatio->Draw("PS");
  pRatio->Fit("gaus","","",-3.2,3.2);
  TF1* pFit = (TF1*)(pRatio->GetListOfFunctions())->At(0);
  pFit->SetLineColor(2);
  pFit->Draw("same");
  //c2->cd("");
  //c2->Update();
  //c2->Print("gFits.ps");
  c1->cd();
  pad1->cd();
  // becattini
  Float_t P_bec170[31] = {1.08872591,
			  0.918504827, 
			  0.774931719, 
			  0.65388714,  
			  0.551870325, 
			  0.465910901,
			  0.393492186, 
			  0.332483291, 
			  0.281084662, 
			  0.237775655, 
			  0.201274854, 
			  0.170501915,  
			  0.144547261,  
			  0.122645992,  
			  0.104154708,  
			  0.0885328683, 
			  0.0753260811, 
			  0.0641527885, 
			  0.0546925958, 
			  0.0466762317, 
			  0.0398774574, 
			  0.0341063237, 
			  0.0292029691, 
			  0.0250331152, 
			  0.0214836335, 
			  0.0184593572, 
			  0.0158800662, 
			  0.0136781121, 
			  0.0117964315, 
			  0.0101868116, 
			  0.00880854954};
  
  Float_t K_bec170[31] = {1.0188133,
			  0.981534106,
			  0.945577294,
			  0.910816985,
			  0.877143226,
			  0.844460705,
			  0.812687922,
			  0.781760868,
			  0.751623326,
			  0.722237541,
			  0.693571495,
			  0.665606908,
			  0.638334565,
			  0.611751015,
			  0.585860166,
			  0.560669154,
			  0.536191298,
			  0.512440824,
			  0.48943115,
			  0.467178208,
			  0.445697563,
			  0.425000012,
			  0.405097802,
			  0.38599665,
			  0.367702476,
			  0.350215686,
			  0.333534098,
			  0.317652447,
			  0.302561512,
			  0.288249458,
			  0.274699876};
  TGraph* Bec170 = new TGraph(31,P_bec170,K_bec170);
  Bec170->SetLineColor(4);
  Bec170->SetLineWidth(3.5);
  Bec170->Draw("c");
  TGraphErrors* gp = new TGraphErrors(pRatio->GetN());
  for (Int_t i=0; i<gp->GetN(); i++) {
    Float_t pbarp  = pRatio->GetY()[i];
    Float_t pbarpE = pRatio->GetEY()[i];
    Float_t kbarkE = kRatio->GetEY()[i];
    gp->SetPoint(i,pbarp,kFit->Eval(pRatio->GetX()[i]));
    gp->SetPointError(i,pbarpE,kbarkE);
  }
  gp->SetMarkerStyle(20);
  gp->SetMarkerColor(2);
  gp->SetMarkerSize(1.7);
  gp->Draw("P");
  
  TGraphErrors* na49PRatio = getSPSProtonRatio(2);  
  TGraphErrors* na49KRatio = getSPSKaonRatio(2);  
  TGraphErrors* na49 = new TGraphErrors(10);
  na49KRatio->Fit("pol5","","",-3.2,3.2);
  TF1* spskFit = (TF1*)(na49KRatio->GetListOfFunctions())->At(0);
  na49PRatio->Fit("pol5","","",-3,3);
  
  TF1* spspFit = (TF1*)(na49PRatio->GetListOfFunctions())->At(0);  
  for (Int_t i=0; i<9; i++) {
    Float_t pbarp  = na49PRatio->GetY()[i];
    Float_t pbarpE = na49PRatio->GetEY()[i];
    Float_t kbarkE = na49KRatio->GetEY()[i];
    na49->SetPoint(i,pbarp,spskFit->Eval(na49PRatio->GetX()[i]));
    na49->SetPointError(i,pbarpE,kbarkE);
    //  cout << i << "   " << pbarp << "  " <<  spskFit->Eval(na49PRatio->GetX()[i]) << endl;
  }
  Float_t Pbar_P_NA49[7] = {0.132,0.111,0.086,0.074,0.059,0.049,0.039};
  Float_t K_NA49_rat[7] = {0.570,0.561,0.549,0.529,0.509,0.469,0.435};
  Float_t Pbar_P_NA49_error[7] = {0.017,0.014,0.011,0.010,0.009,0.008,0.008};
  Float_t K_NA49_error[7] = {0.022,0.024,0.026,0.029,0.034,0.039,0.046};
  TGraphErrors *NA49_K_vs_P;
  NA49_K_vs_P = new TGraphErrors(7,Pbar_P_NA49,K_NA49_rat,Pbar_P_NA49_error,K_NA49_error);
  NA49_K_vs_P->SetMarkerStyle(23);
  NA49_K_vs_P->SetMarkerColor(6);
  NA49_K_vs_P->SetMarkerSize(1.3);
  NA49_K_vs_P->SetMarkerSize(1.7);
  NA49_K_vs_P->Draw("P");
  
  na49->SetMarkerStyle(23);
  na49->SetMarkerSize(1.3);
  na49->SetMarkerSize(1.7);
  //  na49->SetMarkerColor(4);
  //na49->Draw("P");
  TGraphErrors* na44 = new TGraphErrors(2);
  na44->SetPoint(0, 0.0719, 0.6167); 
  na44->SetPoint(1, 0.0534, 0.5300); 
  na44->SetPointError(0, 0.0191,  0.0086);
  na44->SetPointError(1, 0.0175,  0.03);
  na44->SetMarkerStyle(26);
  na44->SetMarkerColor(4);
  na44->SetMarkerSize(1.3);
  na44->SetMarkerSize(1.7);
  na44->Draw("p");  
  Int_t n1 = gp->GetN();
  Int_t n2 = na49->GetN();
  TGraphErrors* g = new TGraphErrors(n1+n2+4);
  
  for(Int_t i=0; i<n1; i++){
    g->SetPoint(i+1,gp->GetX()[i],gp->GetY()[i]);
    g->SetPointError(i+1,gp->GetErrorX(i),gp->GetErrorY(i));
  }
  for(Int_t i=0; i<n2; i++){
    g->SetPoint(i+n1+1,na49->GetX()[i],na49->GetY()[i]);
    g->SetPointError(i+n1+1,na49->GetErrorX(i),na49->GetErrorY(i));
  }
  g->SetPoint(0,1,1);
  g->SetPointError(0,0.001,0.001);
  g->SetPoint(n1+n2+1,0.0719,0.6167);
  g->SetPointError(n1+n2+1,0.0191,0.0086);
  g->SetPoint(n1+n2+2,0.0534,0.5300);
  g->SetPointError(n1+n2+2,0.0175,0.03);
  g->SetPoint(n1+n2+3,0.001,0.2);
  g->SetPointError(n1+n2+3,0.001,0.001);
  //g->Draw("p");
  TF1* fit = new TF1("user","exp(2*[0]/170)*x**(1/3)",0.01,1.0);
  fit->SetParameter(0,0.3);
  g->Fit(fit,"0","",0.01,1.01);
  fit->SetLineColor(2);
  //  fit->Draw("same");
  TGraphErrors* ags = new TGraphErrors(1);
  ags->SetMarkerStyle(21);
  ags->SetPoint(0,0.00002,0.21);
  ags->SetPointError(0,0.00025,0.028);
  ags->SetMarkerSize(1.7);
  ags->Draw("p");
  TGraphErrors* brahms130 = new TGraphErrors(1);
  brahms130->SetMarkerStyle(24);
  brahms130->SetMarkerColor(2);
  brahms130->SetPoint(0,0.64,0.90);
  brahms130->SetPointError(0,0.05,0.05);
  brahms130->SetMarkerSize(1.7);
  brahms130->Draw("p");
  TLegend* leg = new TLegend(0.52,pad1->GetBottomMargin()+0.02,
			     1-pad1->GetRightMargin()-0.02,0.52);
  leg->SetFillColor(0);
  leg->SetBorderSize(1);
  leg->SetTextSize(0.04);
  leg->SetMargin(0.17);
  leg->AddEntry(gp,"BRAHMS (200 GeV)","P");
  leg->AddEntry(brahms130,"BRAHMS (130 GeV)","P");
  leg->AddEntry(NA49_K_vs_P,"NA49 (17 GeV)","P");
  leg->AddEntry(na44,"NA44 (17 GeV)","P");
  leg->AddEntry(ags,"E866 (5 GeV)","P");
  //  leg->AddEntry(new TMarker(0,0,27),"p+p (???)","P");
  leg->AddEntry(Bec170,"Becattini et. al","L");
  leg->Draw();
  TF1* mubFunc = new TF1("mubF","-0.5*170*log(x)",0,391.4);
  //  cout << mubFunc->Eval(0.6) << endl;
  TGaxis* mub = new TGaxis(0.02,1,0.99,1,0.02,0.99,107,"-");
  //  mub->SetTitle("#mu_{B}  (T=170MeV)");
  mub->SetLabelSize(0.05);
  mub->SetLabelOffset(-20.075);
  mub->SetTitleOffset(0.92);
  mub->SetTitleSize(0.05);
  mub->CenterTitle(kTRUE);
  mub->SetTickSize(0.0);
  mub->Draw("S");
  TLatex* mubTitle1 = new TLatex(0.3, 1.08,"#mu_{B}");
  mubTitle1->SetTextSize(0.054);
  mubTitle1->Draw();
  TLatex* mubTitle2 = new TLatex(0.4, 1.08,"(T=170MeV)");
  mubTitle2->SetTextSize(0.04);
  mubTitle2->Draw();
  TLatex* axisText1 = new TLatex(0.01 ,1.01,"255");
  TLatex* axisText2 = new TLatex(0.16 ,1.01,"137");
  TLatex* axisText3 = new TLatex(0.37 ,1.01,"78");
  TLatex* axisText4 = new TLatex(0.57 ,1.01,"43");
  TLatex* axisText5 = new TLatex(0.77 ,1.01,"19");
  TLatex* axisText6 = new TLatex(0.97 ,1.01,"0");
  
  axisText1->SetTextSize(0.045);
  axisText1->Draw();
  axisText2->SetTextSize(0.045);
  axisText2->Draw();
  axisText3->SetTextSize(0.045);
  axisText3->Draw();
  axisText4->SetTextSize(0.045);
  axisText4->Draw();
  axisText5->SetTextSize(0.045);
  axisText5->Draw();
  axisText6->SetTextSize(0.045);
  axisText6->Draw();
  
  TLine* l1 = new TLine(0.05,0.975,0.05,1.0);
  l1->Draw();
  TLine* l2 = new TLine(0.0,0.99,0.0,1.0);
  l2->Draw();
}
TGraphErrors* 
getPionRatio(Int_t s=0) 
{
  Float_t rpi[7] =  {1.01,  1.01,  1.01, 1.01, 1.00, 1.00, 1.02};
  Float_t ypi[7] =  {0,    0.465, 1,    1.7,  2.25, 2.55, 3.25};
  Float_t erpi[7] = {0.04, 0.015, 0.06,  0.02, 0.01, 0.01, 0.04};  
  Float_t eypi[7] = {0.02, 0.04, 0.05,  0.1,  0.1,  0.1,  0.1};
   
  if (s==0) {
    TGraphErrors *pi = new TGraphErrors(7);
    
    for(Int_t i=0; i<7; i++){
      pi->SetPoint(i,ypi[i],rpi[i]);
      pi->SetPointError(i,eypi[i],erpi[i]);
    }
    return pi;
  }
  if (s==1) {
    TGraphErrors *pi = new TGraphErrors(6);
    
    for(Int_t i=0; i<6; i++){
      pi->SetPoint(i,-ypi[6-i],rpi[6-i]);
      pi->SetPointError(i,eypi[6-i],erpi[6-i]);
    }
    return pi;
  }
  if (s==2){
    TGraphErrors *pi = new TGraphErrors(13);
    for(Int_t i=0; i<7; i++){
      pi->SetPoint(i,ypi[i],rpi[i]);
      pi->SetPointError(i,eypi[i],erpi[i]);
    }
    for(Int_t i=7; i<13; i++){
      pi->SetPoint(i,-ypi[i-6],rpi[i-6]);
      pi->SetPointError(i,eypi[i-6],erpi[i-6]);
    }
    return pi;
  }
}
TGraphErrors* 
getKaonRatio(Int_t s=0) 
{
  Float_t rk[7] =  {0.95, 0.95, 0.93, 0.87, 0.84,  0.81,  0.66};
  Float_t yk[7] =  {0,    0.46, 0.85, 1.6,  2.075, 2.325, 3.1};
  Float_t erk1[7] = {0.05, 0.06, 0.05, 0.06, 0.03,  0.03,  0.05};  
  Float_t eyk[7] = {0.05, 0.05, 0.06, 0.1,  0.05,  0.05,  0.05};
  Float_t erk[7];
  erk[0]=erk1[0];
  for (Int_t j=1; j<7;j++)
    {
      erk[j]=erk1[j]*TMath::Sqrt(2);
    }
  
  if (s==0) {
    TGraphErrors *k = new TGraphErrors(7);
    
    for(Int_t i=0; i<7; i++){
      k->SetPoint(i,yk[i],rk[i]);
      k->SetPointError(i,eyk[i],erk[i]);
    }
    return k;
  }
  if (s==1) {
    TGraphErrors *k = new TGraphErrors(6);
    
    for(Int_t i=0; i<6; i++){
      k->SetPoint(i,-yk[6-i],rk[6-i]);
      k->SetPointError(i,eyk[6-i],erk[6-i]);
    }
    return k;
  }
  if (s==2) {
    TGraphErrors *k = new TGraphErrors(13); 
    for(Int_t i=0; i<7; i++){
      k->SetPoint(i,yk[i],rk[i]);
      k->SetPointError(i,eyk[i],erk1[i]);
    }
    for(Int_t i=7; i<13; i++){
      k->SetPoint(i,-yk[i-6],rk[i-6]);
      k->SetPointError(i,eyk[i-6],erk1[i-6]);
    }
    return k;
  }
}
TGraphErrors* 
getProtonRatio(Int_t s=0) 
{
  Float_t rp[9] =  {0.75, 0.745, 0.74, 0.58, 0.51, 0.45,0.41, 0.27, 0.23};
  Float_t yp[9] =  {0,    0.45, 0.8,  1.5 , 1.85, 2.05, 2.4,2.9, 3.1};
  Float_t erp1[9] = {0.04, 0.05, 0.05, 0.06, 0.02, 0.03, 0.03,0.03, 0.02};  
  Float_t eyp[9] = {0.06, 0.05, 0.05, 0.1,  0.05, 0.05, 0.05, 0.05, 0.1};
   
  TGraphErrors *fsp = new TGraphErrors(9);
  Float_t erp[9];
  erp[0]=erp1[0];
  for (Int_t j=1; j<9;j++)
    {
      cout << "errror before " << erp[j] << endl;
      erp[j]=erp1[j]*TMath::Sqrt(2);
      cout << "errror after " << erp[j] << endl;
    }
  
  if (s==0) {
    for(Int_t i=0; i<8; i++){
      fsp->SetPoint(i,yp[i],rp[i]);
      fsp->SetPointError(i,eyp[i],erp[i]);
    }
    return fsp;
  }
  if (s==1) {
    TGraphErrors *p = new TGraphErrors(6);
    
    for(Int_t i=0; i<6; i++){
      p->SetPoint(i,-yp[6-i],rp[6-i]);
      p->SetPointError(i,eyp[6-i],erp[6-i]);
    }
    return p;
  }
  if (s==2) {
    TGraphErrors *p = new TGraphErrors(17);
    for(Int_t i=0; i<9; i++){
      p->SetPoint(i,yp[i],rp[i]);
      p->SetPointError(i,eyp[i],erp1[i]);
    }
    for(Int_t i=9; i<17; i++){
      p->SetPoint(i,-yp[i-8],rp[i-8]);
      p->SetPointError(i,eyp[i-8],erp1[i-8]);
    }
    return p;    
  }
}
TGraphErrors* 
getSPSProtonRatio(Int_t s=0) 
{
  Float_t rp[9]= {0.146 ,0.13 ,0.108,0.078,0.068,0.049,0.045,0.034,0.033};
  Float_t yp[9]= {0.19  ,0.42 ,0.65 ,0.9  ,1.14 ,1.39 ,1.62 ,1.87 ,2.1};
  Float_t erp[9]={0.05  ,0.05, 0.05, 0.05, 0.05, 0.05, 0.06, 0.06, 0.06};  
  Float_t eyp[9]={0.01  ,0.01 ,0.01 ,0.01 ,0.01 ,0.01 ,0.01 ,0.01 ,0.01};
    
  if(s==0) {
    TGraphErrors *p = new TGraphErrors(9);
    for(Int_t i=0; i<9; i++){
      p->SetPoint(i,yp[i],rp[i]);
      p->SetPointError(i,eyp[i],erp[i]);
    }
    return p;
  }
  if (s==1) {
    TGraphErrors *p = new TGraphErrors(9);
    for(Int_t i=0; i<9; i++){
      p->SetPoint(i,-yp[8-i],rp[8-i]);
      p->SetPointError(i,eyp[8-i],erp[8-i]);
    }
    return p;
  }
  if (s==2) {
    TGraphErrors *p = new TGraphErrors(17);
    for(Int_t i=0; i<9; i++){
      p->SetPoint(i,yp[i],rp[i]);
      p->SetPointError(i,eyp[i],erp[i]);
    }
    for(Int_t i=9; i<17; i++){
      p->SetPoint(i,-yp[i-8],rp[i-8]);
      p->SetPointError(i,eyp[i-8],erp[i-8]);
    }
    return p;    
  }
}
TGraphErrors* 
getSPSKaonRatio(Int_t s=0) 
{
  //Float_t rk[9]= {0.55, 0.65, 0.55, 0.55, 0.5,  0.5};
  //Float_t yk[9]= {0.05, 0.05, 0.05, 0.05, 0.05, 0.05};
  //Float_t erk[9]={0,    0.5,  1.0,  1.5,  2.0,  2.4};
  Float_t rk[10] ={0.562,0.573,0.562,0.559,0.55,0.530,0.485,0.456,0.453,0.44};
  Float_t yk[10]= {0.0,  0.20, 0.40, 0.60, 0.80, 1.00, 1.20,1.40, 1.60, 1.80};
  Float_t erk[10]={0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,0.05, 0.05, 0.05};
  Float_t eyk[10]={0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05,0.05, 0.05, 0.05};
  if(s==0) {
    TGraphErrors *k = new TGraphErrors(10);
    for(Int_t i=0; i<10; i++){
      k->SetPoint(i,yk[i],rk[i]);
      k->SetPointError(i,eyk[i],erk[i]);
    }
    return k;
  }
  if (s==1) {
    TGraphErrors *k = new TGraphErrors(10);
    for(Int_t i=0; i<10; i++){
      k->SetPoint(i,-yk[8-i],rk[8-i]);
      k->SetPointError(i,eyk[8-i],erk[8-i]);
    }
    return k;
  }
  if (s==2) {
    TGraphErrors *k = new TGraphErrors(19); 
    for(Int_t i=0; i<10; i++){
      k->SetPoint(i,yk[i],rk[i]);
      k->SetPointError(i,eyk[i],erk[i]);
    }
    for(Int_t i=10; i<19; i++){
      k->SetPoint(i,-yk[i-9],rk[i-9]);
      k->SetPointError(i,eyk[i-9],erk[i-9]);
    }
    return k;
  }
}
This archive was generated by hypermail 2.1.5 : Wed May 28 2003 - 10:11:01 EDT