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

ユーザ用ツール

サイト用ツール


ja:root:wantto2

差分

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

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

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:root:wantto2 [2018/07/25 05:35]
kota
ja:root:wantto2 [2018/09/05 17:42] (現在)
kota [サンプルコード]
ライン 41: ライン 41:
 h->​Draw("​hist e1"); h->​Draw("​hist e1");
 </​code>​ </​code>​
-のようにすればよい+すれば綺麗に解決
  
 ===== ヒストグラムを規格化(Scale)して、さらにエラーバーをつけたい ===== ===== ヒストグラムを規格化(Scale)して、さらにエラーバーをつけたい =====
ライン 75: ライン 75:
  
 <code c_mac> <code c_mac>
-// マクロ test.C ​のサンプルコード+// マクロ test.C
 void test() void test()
 { {
ライン 86: ライン 86:
   h2->​FillRandom("​gaus",​1000);​   h2->​FillRandom("​gaus",​1000);​
  
-  ​TH1D *h1e = (TH1D*)h1->​Clone("​h1e"​);​ +  h2->​Sumw2();​
-  TH1D *h2e = (TH1D*)h2->​Clone("​h2e"​);​ +
-  h2e->​Sumw2();​+
   h2->​Scale(10);​   h2->​Scale(10);​
-  h2e->​Scale(10);​ 
  
   h1->​SetLineColor(2);​   h1->​SetLineColor(2);​
   h2->​SetLineColor(4);​   h2->​SetLineColor(4);​
-  h1e->​SetLineColor(2);​ 
-  h2e->​SetLineColor(4);​ 
  
-  h1->​Draw();​ +  h1->​Draw("​hist e1"​);​ 
-  h1e->​Draw("​same e1"​);​ +  h2->​Draw("​same ​hist e1");
-  h2->​Draw("​same"); +
-  h2e->​Draw("​same ​e1");+
 } }
 </​code>​ </​code>​
ja/root/wantto2.1532496954.txt.gz · 最終更新: 2018/07/25 05:35 by kota