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:fit [GiriWiki]

ユーザ用ツール

サイト用ツール


ja:root:fit

差分

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

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

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:root:fit [2014/08/03 07:08]
kota
ja:root:fit [2017/08/30 07:42] (現在)
kota [任意の関数でfitting]
ライン 3: ライン 3:
 ---- ----
  
 +===== 簡単な例 =====
 +<code cpp>
   TH1F *hist = new TH1F("​hist","​hist",​100,​-10,​10);​   TH1F *hist = new TH1F("​hist","​hist",​100,​-10,​10);​
   hist->​FillRandom("​gaus",​10000);​   hist->​FillRandom("​gaus",​10000);​
   hist->​Fit("​gaus","","",​-10,​10);​   hist->​Fit("​gaus","","",​-10,​10);​
-  ​+</​code>​ 
 としてやればガウシアンでのfittingの例が得られる。 としてやればガウシアンでのfittingの例が得られる。
 +
 +"​gaus"​の他にも以下のような関数が使える。
 +  * expo   ​--->​ exponential関数
 +  * landau ---> ランダウ関数
 +  * pol0   ​--->​ ゼロ次関数
 +  * pol1   ​--->​ 一次関数
 +  * pol2   ​--->​ 二次関数
 +===== 任意の関数でfitting =====
 +
 +<code cpp>
 +  TF1 *func = new TF1("​func","​[0] + [1]*x",​ -10 , 10);
 +  hist->​Fit("​func","","",​-10,​10);​
 +</​code>​
 + ​のようにして、先にfittingするための関数を用意してやり、Fitでそれを指定する。
ja/root/fit.1407049733.txt.gz · 最終更新: 2014/08/03 07:08 by kota