<br />
<b>Deprecated</b>:  Array and string offset access syntax with curly braces is deprecated in <b>/mnt/hep_web/hep_web/member/n-kota/dokuwiki/inc/init.php</b> on line <b>542</b><br />
<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/feed.php">
        <title>GiriWiki ja:root</title>
        <description></description>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/</link>
        <image rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-04-30T06:08:20+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:axis&amp;rev=1540060736&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:color&amp;rev=1535606698&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:fit&amp;rev=1504078975&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:font&amp;rev=1466399366&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:hist&amp;rev=1533263776&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:install&amp;rev=1443962484&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:stat&amp;rev=1555604620&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tcanvas&amp;rev=1400825892&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tcut&amp;rev=1397450068&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tdatime&amp;rev=1491437943&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tf1&amp;rev=1504103902&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tgrapherrors&amp;rev=1486045524&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tlegend&amp;rev=1539691776&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tmultigraph&amp;rev=1408457132&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tproof&amp;rev=1538183283&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tstopwatch&amp;rev=1402474695&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tstring&amp;rev=1517901703&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:ttree&amp;rev=1503134845&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto1&amp;rev=1406860260&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto2&amp;rev=1536169354&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto3&amp;rev=1427874484&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto4&amp;rev=1532653029&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto5&amp;rev=1534954071&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto6&amp;rev=1534954247&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto7&amp;rev=1534959727&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto8&amp;rev=1485138455&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto9&amp;rev=1541571506&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto10&amp;rev=1491473950&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto11&amp;rev=1534958820&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto12&amp;rev=1499147131&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto13&amp;rev=1506166801&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto14&amp;rev=1533263079&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto15&amp;rev=1533622465&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto16&amp;rev=1536151644&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto17&amp;rev=1537435380&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto18&amp;rev=1538210558&amp;do=diff"/>
                <rdf:li rdf:resource="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto19&amp;rev=1541230835&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico">
        <title>GiriWiki</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/</link>
        <url>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:axis&amp;rev=1540060736&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-10-20T18:38:56+00:00</dc:date>
        <title>ja:root:axis</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:axis&amp;rev=1540060736&amp;do=diff</link>
        <description>軸の設定・装飾

----------

はじめに

ROOTでは軸の目盛文字のことを”Label”といい、[MeV]とか[cm]とかの軸に添わせた文字を”Title”という。
また、目盛線のことを”Tick”という。

----------</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:color&amp;rev=1535606698&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-30T05:24:58+00:00</dc:date>
        <title>ja:root:color</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:color&amp;rev=1535606698&amp;do=diff</link>
        <description>カラー・スタイル・マーカー

カラーテーブル (TColor)




 TCanvas *c = new TCanvas(&quot;c&quot;,&quot;Fill Area colors&quot;,0,0,500,200);
 c.DrawColorTable();


	*  使い方は単に SetFillColor(2) のように、番号で色を指定すればよい。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:fit&amp;rev=1504078975&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-08-30T07:42:55+00:00</dc:date>
        <title>ja:root:fit</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:fit&amp;rev=1504078975&amp;do=diff</link>
        <description>Fitting

----------

簡単な例


  TH1F *hist = new TH1F(&quot;hist&quot;,&quot;hist&quot;,100,-10,10);
  hist-&gt;FillRandom(&quot;gaus&quot;,10000);
  hist-&gt;Fit(&quot;gaus&quot;,&quot;&quot;,&quot;&quot;,-10,10);


としてやればガウシアンでのfittingの例が得られる。

“gaus”の他にも以下のような関数が使える。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:font&amp;rev=1466399366&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2016-06-20T05:09:26+00:00</dc:date>
        <title>ja:root:font</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:font&amp;rev=1466399366&amp;do=diff</link>
        <description>フォント

----------

基本的にはTAttTextを参照。
Text font code = 10*fontnumber + precision
The precision can be:
precision = 0 fast hardware fonts (steps in the size)
precision = 1 scalable and rotatable hardware fonts (see below)
precision = 2 scalable and rotatable hardware fonts
precision = 3 scalable and rotatable hardware fonts. Text size is given in pixels.</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:hist&amp;rev=1533263776&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-03T02:36:16+00:00</dc:date>
        <title>ja:root:hist</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:hist&amp;rev=1533263776&amp;do=diff</link>
        <description>ヒストグラムの装飾

----------

スケールする


 hist-&gt;Scale(2.5); //2.5倍に（縦に）スケールする


	*  hist1 , hist2 , hist3 , ... とあって、hist1 のエントリー数でスケールしたい（規格化したい）ときは以下のようにすればよい（複数のヒストグラムの形を比べるときなど）</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:install&amp;rev=1443962484&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-10-04T12:41:24+00:00</dc:date>
        <title>ja:root:install</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:install&amp;rev=1443962484&amp;do=diff</link>
        <description>source からコンパイルする

以下のようにしておけば、バージョン更新・戻しもシンボリックリンクの張り替えだけで済み便利

----------

ダウンロード

	*  以下、ほとんどにsudoが要るかも（mac）</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:stat&amp;rev=1555604620&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2019-04-18T16:23:40+00:00</dc:date>
        <title>ja:root:stat</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:stat&amp;rev=1555604620&amp;do=diff</link>
        <description>統計情報（統計box）

----------

統計情報の表示

	*  表示される情報は、SetOptStat で制御される


gStyle-&gt;SetOptStat(mode);


	* modeで指定するのは、尖度(k)、歪度(s)、ビン数(i)、オーバーフロー数(o)、アンダーフロー数(u)、RMS(</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tcanvas&amp;rev=1400825892&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-05-23T06:18:12+00:00</dc:date>
        <title>ja:root:tcanvas</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tcanvas&amp;rev=1400825892&amp;do=diff</link>
        <description>キャンバスの設定・装飾

----------

Canvas の作成

	*  Canvas を作成（TCanvas クラスのインスタンスを作成）


TCanvas *c = new TCanvas(&quot;c&quot;,&quot;c&quot;,600,500);//TCanvas(const char* name, const char* title, Int_t ww, Int_t wh)</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tcut&amp;rev=1397450068&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-04-14T04:34:28+00:00</dc:date>
        <title>ja:root:tcut</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tcut&amp;rev=1397450068&amp;do=diff</link>
        <description>TCut

----------

TCut

	*  cutの条件を書いておける
	*  同じcutを使い回したりするときにかなり便利
	*  使い方は、大体下のような感じ


 TCut c1 = &quot;x&lt;1&quot;;  //文字列を &quot; &quot; で囲んで書く
 TCut c2 = &quot;y&lt;0&quot;;  //
 TCut c3 = c1&amp;&amp;c2; //合成することもできる
 
 tree-&gt;Draw(&quot;x&quot;, c1);　　　　　//一番基本的な使い方
 tree-&gt;Draw(&quot;x&quot;, c1||&quot;x&gt;0&quot;);  //他のcut条件(not TCut)と組み合わせるときは &quot; &quot; でくくって並べる
 tree-&gt;Draw(&quot;x&quot;, c1&amp;&amp;c2);     //TCutを合わせるときは &quot; &quot; でくくらずそのまま
 
 tree-&gt;Draw(&quot;x&quot;, &quot;(x+y)&quot;*(c1&amp;&amp;c2));       // &quot; * &quot; て何？…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tdatime&amp;rev=1491437943&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-06T00:19:03+00:00</dc:date>
        <title>ja:root:tdatime</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tdatime&amp;rev=1491437943&amp;do=diff</link>
        <description>TDatime

----------

正直あんまり便利じゃないかも。

時間を横軸にしたりするときに使えるかも。

#include &lt;TDatime.h&gt;


  TDatime::TDatime()// 引数なしだと現在時刻をとる。
  TDatime::TDatime(Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)
  TDatime::Set(Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec)

　UInt_t TDatime::Convert(Bool_t toGMT=kFALSE)// UNIX time で出力
　char* TDatime::AsString()//出力
　char* TDatime::AsSQLString()//SQLのフォーマットで出力…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tf1&amp;rev=1504103902&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-08-30T14:38:22+00:00</dc:date>
        <title>ja:root:tf1</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tf1&amp;rev=1504103902&amp;do=diff</link>
        <description>TF1

----------

基本


  TF1 *func1 = nes TF1(&quot;func1&quot; , &quot;x*sin(x)&quot; , x_min , x_max);//x_min,x_maxは定義域 
  TF1 *func2 = nes TF1(&quot;func2&quot; , &quot;gaus&quot; , x_min , x_max);// システム定義関数を使うことができる
  TF1 *func3 = nes TF1(&quot;func3&quot; , &quot;gaus(0)+pol1(3)&quot; , x_min , x_max);// 複数使う場合は最初のパラメータの番号を指定する</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tgrapherrors&amp;rev=1486045524&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-02-02T14:25:24+00:00</dc:date>
        <title>ja:root:tgrapherrors</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tgrapherrors&amp;rev=1486045524&amp;do=diff</link>
        <description>TGraphErrors

TGraph の上位互換（TGraphを継承している）なので、基本的にこちらを使っておけばよい。

----------

コンストラクタ


  TGraphErrors(Int_t n, const Float_t* x, const Float_t* y, const Float_t* ex = 0, const Float_t* ey = 0)
  TGraphErrors(Int_t n, const Double_t* x, const Double_t* y, const Double_t* ex = 0, const Double_t* ey = 0)
  TGraphErrors(const TVectorF&amp; vx, const TVectorF&amp; vy, const TVectorF&amp; vex, const TVectorF&amp; vey)
  TGraphErrors(const TVectorD&amp; vx, const TVectorD&amp; vy, const TVectorD&amp; vex, const TVectorD&amp; vey)
  TG…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tlegend&amp;rev=1539691776&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-10-16T12:09:36+00:00</dc:date>
        <title>ja:root:tlegend</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tlegend&amp;rev=1539691776&amp;do=diff</link>
        <description>凡例（TLegend）

----------

	*  ヒストグラム等の色分け等を表示


  TLegend *legend = new TLegend( 0.8, 0.68, 0.99, 0.78) ; //（）の中は位置の指定（左下の x , y 、右上の x , y ）
  legend-&gt;AddEntry( h0, &quot;histogram 0&quot; , &quot;l&quot;) ; // AddEntry( pointer , &quot;interpretation&quot; , &quot;option&quot; )
  legend-&gt;AddEntry( h1, &quot;histogram 1&quot; , &quot;l&quot;) ; // option は　&quot;f&quot;=box, &quot;l&quot;=&quot;L&quot;=line, &quot;p&quot;=marker
  legend-&gt;AddEntry( h2, &quot;histogram 2&quot; , &quot;l&quot;) ;
  legend-&gt;SetFillColor(0);
  legend-&gt;Draw() ;…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tmultigraph&amp;rev=1408457132&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-08-19T14:05:32+00:00</dc:date>
        <title>ja:root:tmultigraph</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tmultigraph&amp;rev=1408457132&amp;do=diff</link>
        <description>TMultiGraph

複数のグラフを１つにして扱ったりできる。

複数のグラフをマージして、Fitしたりという使い方ができる。

----------

使い方
   TGraph *gr1 = new TGraph(... ;
   TGraphErrors *gr2 = new TGraphErrors(... ;
   TMultiGraph *mg = new TMultiGraph();
   mg-&gt;Add(gr1,&quot;lp&quot;);
   mg-&gt;Add(gr2,&quot;cp&quot;);
   mg-&gt;Draw(&quot;a&quot;);
   mg-&gt;Fit(&quot;pol1&quot;);</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tproof&amp;rev=1538183283&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-09-29T01:08:03+00:00</dc:date>
        <title>ja:root:tproof</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tproof&amp;rev=1538183283&amp;do=diff</link>
        <description>TProof

----------

マルチコアリソースを有効活用するのに便利なクラスらしい。
TChainでのDrawにしか使ったことがないのでその話。

TChain では複数のFileからtreeをつなぎ合わせてくるが、Drawの時にその処理を並列化してくれるというもの。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tstopwatch&amp;rev=1402474695&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-06-11T08:18:15+00:00</dc:date>
        <title>ja:root:tstopwatch</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tstopwatch&amp;rev=1402474695&amp;do=diff</link>
        <description>TStopwatch

----------

	*  その名の通りストップウォッチの様に使える。
	*  #include &lt;TStopwatch.h&gt;

基本的な機能


TStopwatch sw;

sw.Start(); //スタート　前に使っていたら、その値をresetして、０から計測する。
sw.Start(1);//上と同じ
sw.Start(0);//前に使っていた値をresetせず、その続きから計測。

sw.Stop();  //ストップ

sw.Continue(); //ストップしていたところから計測再開
sw.RealTime(); // （ストップをかけて、）running time を秒の単位で返す。返り値はDouble_t。
sw.CPUtime();  // （ストップをかけて、）CPU time を秒の単位で返す。返り値はDouble_t。

sw.Print();     //Real time 0:00:04, CP time 0.000 のように返す(running time 4[sec] ,CPU time 0 [sec])
sw.Prin…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tstring&amp;rev=1517901703&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-02-06T07:21:43+00:00</dc:date>
        <title>ja:root:tstring</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:tstring&amp;rev=1517901703&amp;do=diff</link>
        <description>TString

----------

TString型の変数に文字を入れる

	*  初期化
	*  やり方色々


TString str(&quot;hoge&quot;);

TString str = &quot;hoge&quot;;

TString str;          //まず宣言してから
str.Form(&quot;hoge&quot;);     //Form関数を使って値を入れる</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:ttree&amp;rev=1503134845&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-08-19T09:27:25+00:00</dc:date>
        <title>ja:root:ttree</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:ttree&amp;rev=1503134845&amp;do=diff</link>
        <description>TTree

----------

読み込むBranchを限定する

方法１ --- SetBranchStatus

デフォルトではGetEntryすると、SetBranchAddressで指定されていないBranchまでも読みにいく。

というかすべてのbranchのデータをメモリに乗せるが、SetBranchAddressすると
そのbranchに対応するメモリのポインタが指定した変数に割り当てられる。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto1&amp;rev=1406860260&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2014-08-01T02:31:00+00:00</dc:date>
        <title>ja:root:wantto1</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto1&amp;rev=1406860260&amp;do=diff</link>
        <description>ヒストグラムが最大値を取るX座標を取ってきたい
histo-&gt;GetXaxis()-&gt;GetBinCenter(histo-&gt;GetMaximumBin());

 とすればよい。

	*  histo-&gt;GetMaximumBin() でヒストグラムが最大値を取るBin番号を取ってくる
	*</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto2&amp;rev=1536169354&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-09-05T17:42:34+00:00</dc:date>
        <title>ja:root:wantto2</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto2&amp;rev=1536169354&amp;do=diff</link>
        <description>ヒストグラムを規格化(Scale)して、さらにエラーバーをつけたい

----------

ヒストグラムを規格化する

エントリー数の違うヒストグラムの形を比べる時などに活躍。

TH1::Scale を使って


h-&gt;Scale(ScaleFactor);</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto3&amp;rev=1427874484&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2015-04-01T07:48:04+00:00</dc:date>
        <title>ja:root:wantto3</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto3&amp;rev=1427874484&amp;do=diff</link>
        <description>Shell command を実行させたい


gSystem-&gt;Exec(&quot;COMMAND&quot;)


を使えば良い。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto4&amp;rev=1532653029&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-07-27T00:57:09+00:00</dc:date>
        <title>ja:root:wantto4</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto4&amp;rev=1532653029&amp;do=diff</link>
        <description>イベントループの進行状況を表示させたい

Tree から1イベントずつ取ってきて処理するような解析をよくやるが、その時にイベントループの進行状況を表示させたい。 



   const Long64_t nentry = tree-&gt;GetEntries();    // Loopさせるイベント数を取得
   const Long64_t n_100  = nentry/100;      // イベント数÷100 を定義しておく
   cout &lt;&lt; &quot;# events : &quot; &lt;&lt; nentry &lt;&lt; endl;

  for( Long64_t ientry = 0 ; ientry &lt; nentry ; ++ientry ){
     if( nentry&gt;100 ){
       if( (ientry%n_100==0) &amp;&amp; (ientry!=0) ){
         if( ientry % (n_100 * 10) == 0 )
	   std::cerr &lt;&lt; (ientry / n_100) &lt;&lt; &quot;% processed.  &quot;  &lt;&lt; std::en…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto5&amp;rev=1534954071&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-22T16:07:51+00:00</dc:date>
        <title>ja:root:wantto5</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto5&amp;rev=1534954071&amp;do=diff</link>
        <description>root fileをマージしたい

----------

root fileをマージするのに、haddというコマンドがある。(${ROOTSYS}/bin/ 以下)
hadd output.root input1.root input2.root input3.root ....
のように第一引数に新規の出力ファイル名、第二引数以降にマージしたいroot file名をとればよい。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto6&amp;rev=1534954247&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-22T16:10:47+00:00</dc:date>
        <title>ja:root:wantto6</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto6&amp;rev=1534954247&amp;do=diff</link>
        <description>treeの中のbranchの有無を判定したい

----------

TTree::GetBranch(const char *name)を使う。
返り値はそのbranchへのポインタ(TBranch*)だが、指定した名前のbranchがなかった場合、0が返る(sourceを見るとnullではなく0)ので、</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto7&amp;rev=1534959727&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-22T17:42:07+00:00</dc:date>
        <title>ja:root:wantto7</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto7&amp;rev=1534959727&amp;do=diff</link>
        <description>軸のラベルをtextにする

----------

元のラベルを飛ばして、手動でtextを配置する方法


hist-&gt;GetXaxis()-&gt;SetLabelOffset(100); // 範囲外へ元の数字のラベルを飛ばしてしまう
hist-&gt;GetXaxis()-&gt;SetNdivisions(3,1,1);
TLatex *label = new TLatex();
label-&gt;SetTextSize(0.07);
label-&gt;DrawLatexNDC(0.18,0.04,&quot;K_{L}#rightarrow3#pi^{0}&quot;);// TLatexでtextを書いていく
label-&gt;DrawLatexNDC(0.45,0.04,&quot;K_{L}#rightarrow2#pi^{0}&quot;);
label-&gt;DrawLatexNDC(0.72,0.04,&quot;K_{L}#rightarrow2#gamma&quot;);…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto8&amp;rev=1485138455&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-23T02:27:35+00:00</dc:date>
        <title>ja:root:wantto8</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto8&amp;rev=1485138455&amp;do=diff</link>
        <description>ヒストグラムのbinの中のentry数を表示させたい

----------

TH1::Draw の“TEXT” optionを使う。

ただし、“TEXT” だけだとhistogram自身が描画されず、数字だけ、しかも横向きに表示されてしまう。
そのため、</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto9&amp;rev=1541571506&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-11-07T06:18:26+00:00</dc:date>
        <title>ja:root:wantto9</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto9&amp;rev=1541571506&amp;do=diff</link>
        <description>treeからグラフを作る

----------

TTree::GetSelectedRows()とかTTree::GetV1()とかの存在を初めて知ったのでメモ。

Rootのclass referenceの”How to obtain more info from TTree::Draw”のところに色々書いてある。



  tree-&gt;Draw(&quot;X:Y&quot;,Cut);//一旦Drawしておく (普段の二次元ヒストグラムを描く時とは順番が違うのに注意)
  const Int_t N = tree-&gt;GetSelectedRows();//Drawでselectionを通ったイベントの数を取ってくる
  TGraph *graph = new TGraph(N, tree-&gt;GetV1(), tree-&gt;GetV2());…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto10&amp;rev=1491473950&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-04-06T10:19:10+00:00</dc:date>
        <title>ja:root:wantto10</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto10&amp;rev=1491473950&amp;do=diff</link>
        <description>TGraphの統計Boxをいじりたい

----------

コード内で出てくる全てについて同じ処理をしたい時はTStyleの方のメソッドを使えばよい。
（gStyle-&gt;SetOptFit(0)とか）

以下は個別でいろいろ変えたい時用。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto11&amp;rev=1534958820&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-22T17:27:00+00:00</dc:date>
        <title>ja:root:wantto11</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto11&amp;rev=1534958820&amp;do=diff</link>
        <description>TChainでループを回している時、参照しているイベントの属するTTreeが記録されたファイル名を知りたい

----------

TChainを使ってイベント毎に処理をさせている時、当該イベントがどのファイルに属しているtreeに含まれているイベントなのかを知るのには、</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto12&amp;rev=1499147131&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-07-04T05:45:31+00:00</dc:date>
        <title>ja:root:wantto12</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto12&amp;rev=1499147131&amp;do=diff</link>
        <description>TTreeのScanでカラムの幅、数値の精度などを指定したい

----------

TTree::Scan()の第3引数がオプション指定になっている。


  tree-&gt;Scan(&quot;a:b:c&quot;,&quot;&quot;,&quot;colsize=30 precision=3 col=::20.10:#x:5ld&quot;);


のように指定する。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto13&amp;rev=1506166801&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-09-23T11:40:01+00:00</dc:date>
        <title>ja:root:wantto13</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto13&amp;rev=1506166801&amp;do=diff</link>
        <description>Fit関数としてクラスのメンバ関数を使いたい

----------

static メンバ関数としておく必要があるみたい。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto14&amp;rev=1533263079&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-03T02:24:39+00:00</dc:date>
        <title>ja:root:wantto14</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto14&amp;rev=1533263079&amp;do=diff</link>
        <description>ヒストグラムの最大値をとってきたい

----------


  hist-&gt;GetMaximum()


でOK。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto15&amp;rev=1533622465&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-08-07T06:14:25+00:00</dc:date>
        <title>ja:root:wantto15</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto15&amp;rev=1533622465&amp;do=diff</link>
        <description>１次元ヒストグラムを描いた後、フレームの最大値・最小値を知りたい

----------

例えばヒストグラムを描いた後に、1σのところにフレームいっぱいに縦に線をいれたい、とする。
そうした時にヒストグラムのフレームの上限、下限の値が知りたいが、それはヒストグラムのエントリー数によっても変わるし、
Y軸がリニアかログかでも変わる。その辺をうまくやる方法が、…</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto16&amp;rev=1536151644&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-09-05T12:47:24+00:00</dc:date>
        <title>ja:root:wantto16</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto16&amp;rev=1536151644&amp;do=diff</link>
        <description>Eventごとにweightが付いている場合の統計誤差を得たい

----------

	*  weightなしの場合、Nイベントあった場合の統計誤差は√Nで表すことができる。(N ± √N)
	*  weightが全イベントで同じ場合(W)は,中心値 W*N, 誤差W*√N (W*N ± W*√N)</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto17&amp;rev=1537435380&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-09-20T09:23:00+00:00</dc:date>
        <title>ja:root:wantto17</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto17&amp;rev=1537435380&amp;do=diff</link>
        <description>macroを実行したら自動的にROOTを終了するようにしたい

----------

マクロを実行後、そのままROOTを終了するようにするためには、
root -q macro.C
のようにすればよい。

毎度 -q を入れるのが面倒ならば、マクロの最後に以下のどれかを加えてやれば良い。</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto18&amp;rev=1538210558&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-09-29T08:42:38+00:00</dc:date>
        <title>ja:root:wantto18</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto18&amp;rev=1538210558&amp;do=diff</link>
        <description>macroに引数を渡したい

----------

たとえば、Int_t と TString の2変数をとるマクロがあるとする。

test.C


void test( const Int_t N, const TString str )
{
  std::cout &lt;&lt; &quot;N = &quot; &lt;&lt; N &lt;&lt; std::endl;
  std::cout &lt;&lt; &quot;str = &quot; &lt;&lt; str.Data() &lt;&lt; std::endl;
}</description>
    </item>
    <item rdf:about="https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto19&amp;rev=1541230835&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-11-03T07:40:35+00:00</dc:date>
        <title>ja:root:wantto19</title>
        <link>https://www-he.scphys.kyoto-u.ac.jp/member/n-kota/dokuwiki/doku.php?id=ja:root:wantto19&amp;rev=1541230835&amp;do=diff</link>
        <description>ヒストグラムのbin、境界上はどっちに入る？

ヒストグラムのbin IDは, ヒストグラムのbin数をnbinsとして
bin = 0;       underflow bin
bin = 1;       first bin with low-edge xlow INCLUDED
bin = nbins;   last bin with upper-edge xup EXCLUDED
bin = nbins+1; overflow bin</description>
    </item>
</rdf:RDF>
