Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/parser/handler.php on line
1458
Warning: Declaration of syntax_plugin_note::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line
79
Warning: Declaration of syntax_plugin_note::render($mode, &$renderer, $indata) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in
/mnt/hep_web/hep_web/member/n-kota/dokuwiki/lib/plugins/note/syntax.php on line
101
ヒストグラムの装飾
スケールする
hist->Scale(2.5); //2.5倍に(縦に)スケールする
hist2->Scale(hist1->GetEntries()/hist2->GetEntries());
hist3->Scale(hist1->GetEntries()/hist3->GetEntries());
.
.
.
hist2->Scale(hist1->Integral()/hist2->Integral());
hist3->Scale(hist1->Integral()/hist3->Integral());
.
.
.
GetEntries() と Integral() の違いは?
hist->GetEntries() はヒストグラムに詰まった全エントリー数をとってくるのに対し、
hist->Integral() は”キャンバスに表示されている範囲の”エントリー数をとってくる。
weightして詰めている場合はIntegralではweightが加味される。
Integral(minbin,maxbin) でminbinからmaxbinまでのイベント数をとってきてくれるが、このminbin,maxbinは横軸の値でなくbin番号。
横軸の値で求めたければ、
hist->Integral(hist->GetXaxis()->FindBin(min),hist->GetXaxis()->FindBin(max))
の様にすればよい。