next up previous contents
: Draw $B$N%*%W%7%g%s(B : $B%R%9%H%0%i%`$N:n@.(B : $B%R%9%H%0%i%`$N:n@.(B   $BL\

$B#1

$B$^$:$O!"%R%9%H%0%i%`$NH"$r:n@.$9$k!#(B $B$I$N7?$G$b07$$$OF1$8$J$N$G!"(B ${\tt Float\_t}$ $B7?$N#1 TH1F *h1 = new TH1F("name","title",60,-10.,20.); $B$N$h$&$J46$8$G$"$k!#(B $B$3$3$G!"(B${\tt ''name''}$ $B$O!"(B${\tt TNamed}$ $B%/%i%9$NGI@8%/%i%9$H$7$F$N(B $BL>A0$G$"$j!"$"$H$G8+$k$h$&$K!"(B $B%]%$%s%?!<$rCN$i$J$/$F$b$3$NL>A0$r$?$h$j$K(B $B%*%V%8%'%/%H$rC5$9$3$H$,$G$-$k!#(B ${\tt ''title''}$ $B$O%R%9%H%0%i%`$NBj$G$"$j!"(B ${\tt 60}$ $B$O%S%s$N?t!"(B${\tt -10.}$ $B$H(B ${\tt 20.}$ $B$O2#<4$N(B $B2<8B$H>e8B$G$"$k!#(B

${\tt TCanvas}$ $B$N>l9g$HF1MM!"(B

 
  TH1F h1("name","title",60,-10.,20.);
$B$N$h$&$K:n$C$F$bNI$$!#(B $B$?$@$7!"%W%m%C%H4XO"$N(B ROOT $B$N%/%i%9$N%a%s%P!<4X?t$O(B $B$=$NLa$jCM$H$7$F?7$?$K$G$-$?%W%m%C%H$N(B $B%]%$%s%?!<$rJV$9$3$H$,B?$$$N$G!"(B $B:.Mp$rHr$1$k$?$a!"(B $BCxl9g!"<+J,$G:n$k:]$b%]%$%s%?!<$r;H$&$3$H$K$7$F$$$k!#(B

$B$5$F!"H"$,$G$-$?$N$G$3$N%R%9%H%0%i%`$K%G!<%?$r%U%#%k$7$F$_$h$&!#(B ${\tt x = 5.}$ $B$N$H$3$m$K%G!<%?$r%U%#%k$9$k$K$O(B

  Double_t x = 5.;
$B$H$7$F!"(B
  h1->Fill(x);
$B$GNI$$$o$1$@$,!"(B $B$?$/$5$s%U%#%k$9$k$N$K gRandom->SetSeed(); Int_t i; for (i=0; i<10000; i++) h1->Fill(gRandom->Gaus(5.,3.)); $B$3$NNc$G$O!"Mp?t$N%7!<%I$r%;%C%H$7$?8e!"(B $BCf?4(B ${\tt 5}$. $B$G!"I}(B ${\tt 3.}$ $B$N(B $B@55,J,I[Mp?t(B ${\tt 10000}$ $BE@$r%U%#%k$7$F$$$k!#(B ${\tt gRandom->SetSeed()}$ $B$O>JN,$G$-$k$h$&$G$"$k!#(B $BMp?t$K$OB>$K$b!"(B${\tt Exp}$ $B$H$+(B ${\tt Landau}$ $B$H$+(B ${\tt Poisson}$ $B$H$+(B ${\tt Binomial}$ $B$H$+$$$m$$$m$"$k$N$G;n$7$F$_$k$N$b0l6=$G$"$k!#(B $B:#$NNc$G$O!"(B${\tt for}$ $B%k!<%W$r#19T$G=q$/$3$H$,$G$-$?$,!"(B $BJ#?t9T$K$o$?$k%3%^%s%I$r=q$-$?$$>l9g$b@8$:$k!#(B $B$=$s$J>l9g$O(B "{" $B$r$&$AJ#?t9T%b!<%I$K$O$$$C$F$+$iF~NO$9$k!#(B $BJ#?t9T%b!<%I$N=*$O(B "}" $B$G$"$k!#(B

$B%R%9%H%0%i%`$O=E$_$D$-$G%U%#%k$9$k$3$H$b$G$-$k!#(B

  Double_t w = 0.5;
  h1->Fill(x,w);
$B$H$+$9$k$H!"%S%s$O(B ${\tt 1}$ $B$G$O$J$/(B${\tt w}$ $B$@$1A}$($k$3$H$K$J$k!#(B $B$3$l$i$N%U%#%k$NA`:n$O!"8e$G8+$k$h$&$K(B $B#2 $B$5$F!"(B $B%U%#%k$N7k2L$rIA2h$9$k$K$O(B
  h1->Draw();
$B$HBG$D!#(B

$B?^(B 3.3: $B%R%9%H%0%i%`$NIA2h!#(B
\begin{figure}
\centerline {
\epsfig{file=figs/h1p.eps,width=6cm}}\end{figure}

$B?^(B 3.4: $B8m:9K@$r$D$1$k!#(B
\begin{figure}
\centerline {
\epsfig{file=figs/drawoption.eps,width=6cm}}\end{figure}

$BL#$b$=$C$1$b$J$$%R%9%H%0%i%`$G$"$k!#(B


next up previous contents
: Draw $B$N%*%W%7%g%s(B : $B%R%9%H%0%i%`$N:n@.(B : $B%R%9%H%0%i%`$N:n@.(B   $BL\
Keisuke Fujii $BJ?@.(B12$BG/(B12$B7n(B22$BF|(B