4 TH1F
h1(
"h1",
"H1;Mass [GeV];Counts [/ GeV];",20,0,20);
5 TH1F
h2(
"h2",
"H2;Mass [GeV];Counts [/ GeV];",20,0,20);
6 for (
int i = 0;i<1000;i++){
h1.Fill(gRandom->Gaus(7,2));}
7 for (
int i = 0;i<1000;i++){
h1.Fill(gRandom->Exp(.5)*20);}
8 for (
int i = 0;i<1000;i++){
h2.Fill(gRandom->Exp(.5)*20);}
14 TLegend
leg(.55,.70,.85,.93);
15 leg.AddEntry(
"",
"#it{#bf{sPHENIX}} Simulation",
"");
16 leg.AddEntry(
"",
"Au+Au #sqrt{s_{NN}}=200 GeV",
"");
21 c.Print(
"test_style.pdf");
22 c.Print(
"test_style.png");
25 c2.SetRightMargin(.2);
26 TF2
f2(
"f2",
"exp(-x/5)*sin(y)",-5,5,-5,5);
31 f2.GetXaxis()->SetTitle(
"X");
32 f2.GetYaxis()->SetTitle(
"Y");
33 f2.GetZaxis()->SetTitle(
"Z");
34 c2.Print(
"test_style_f2.pdf");
35 c2.Print(
"test_style_f2.png");