Deprecated: Array and string offset access syntax with curly braces is deprecated in /mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php on line 542
ja:root:wantto19 [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:root:wantto19

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
ja:root:wantto19 [2018/11/03 07:22]
kota
ja:root:wantto19 [2018/11/03 07:40] (現在)
kota
ライン 13: ライン 13:
   hist->​Fill(1);​   hist->​Fill(1);​
   Int_t ibin = hist->​FindBin(1);​   Int_t ibin = hist->​FindBin(1);​
 +  cout << "​Integral [0,1] : " << hist->​Integral( hist->​FindBin(0),​ hist->​FindBin(1) ) << endl;/// <-(a)
 +  cout << "​Integral [0,1) : " << hist->​Integral( hist->​FindBin(0),​ hist->​FindBin(1-1e-6) ) << endl;/// <-(b)
 +  cout << "bin content[0,​1):​ " << hist->​GetBinContent( hist->​FindBin(0) ) << endl;/// <-(c)
 </​code>​ </​code>​
 とした場合、 とした場合、
ライン 18: ライン 21:
   * Fillした1は以下の図のように、bin=2 : 1≦ x < 2 のbinに入る。   * Fillした1は以下の図のように、bin=2 : 1≦ x < 2 のbinに入る。
   * ibinには2が返る   * ibinには2が返る
 +  * (a)のようにした場合は0を含むbin (bin=1) から1を含むbin (bin=2)までのIntegralを取りなさい、ということなので、bin=2も含んでしまって1が返る。0-1のbinのことを指定したいのであれば、(b)のようにする。(これは(c)と同じこと)
 となる。 となる。
  
ja/root/wantto19.txt · 最終更新: 2018/11/03 07:40 by kota