Differences between revisions 4 and 5
Deletions are marked like this. | Additions are marked like this. |
Line 53: | Line 53: |
=== anafileの書き方 === ==== anapawのanafileと変えたところ ==== ・2Dで今までは {{{ "IDx" "IDy" "binx" "biny" }}} の順だったのを {{{ "IDx" "binx" "IDy" "biny" }}} にした。 ・処理方法を先に書いて続く行を処理 -> 一行ごとに処理 ・analyserやstopに非対応。stopの代わりにanaloopを継承したクラスで直接 {{{ if(hoge) return; }}} を書いて途中で抜けてください。 ・hcutで吐くテキストの文法はanafileと同じにしたので.anaに直接書くか<include>する。 ==== 文法 ==== {{{ <hoge>: 続く文字の処理を指定。何も書かない場合はhistogramの定義と見なされる。 100,: 数字の後ろ「のみ」ついてカンマを「必ず」書くこと。カンマの数が適切でない場合に怒られます。 "title": 大体においてobjectのtitleになります。 }}} ==== 具体例 ==== {{{ # include another anafile # <include> "filename" <include> "cut/example.cut" <include> "ana/example.ana" # gate # <gate> {index}, low,up, "title" <gate> 101, 1,1,1,30, 1400,1500, "turaw 101 gate" # circle cut # <cc> {index x}, {index y}, center x, center y, radius x, radius y, <cc> 201, 1,1,1,30, 1,1,1,10, 1450,300,100,100, "turaw 101 vs auraw 101" # and, or # <and> new_gate_id, gate_id1, gate_id2, ... , "title" <and> 104, 101,102, "turaw 101 and auraw 101" <or> 105, 101,102, "turaw 101 or auraw 101" <and> 106, 101,102,103, "101 and 102 and 103" # 1D hist # gate_id, analyser,index_start,index_end,wnum, bin#,low,up, "title" 0, 1,3,3,2, 100,0,4100, "turaw ch3" # 2D hist # gate_id, analyser,index_start,index_end,wnum, bin#,low,up, analyser,...,up, "title" 0, 1,1,150,1, 150,0.5,150.5, 1,1,150,2, 4100,0,4100, "id vs turaw ch1-150" }}} |
使い方についてざっくばらんに
How To いろいろ
anarootにログイン(仮)
$ anarootlogin username $ root -l root[i] .x hoge.C (マクロを実行) root[i] .q (rootを終了)
ridfを解析
root[i] book(new TArtAnaLoopExample, "ana/example.ana") root[i] push("ridf/run0001.ridf") root[i] start() root[i] status() root[i] ls() root[i] hn() root[i] hn() ...
数を数える
root[i] stop() (stopしないと刻一刻とevent数が増えていくのでわけがわからなくなる) root[i] ls() root[i] ht(5) root[i] xsta() (for 1D) root[i] zoom() (for 2D, xystaはまだ作ってないのでとりあえずこれで代用)
Draw same
root[i] ht(1) root[i] ht(2, "same")
もしzone()しているのなら、
root[i] ht(1) root[i] hht(2, "same") (hhなんたらは次のpadに進まずに描画)
histの保存・読み込み
... root[i] hstore("hist.root") // 保存 root[i] fetch("hist.root") // 読み込み
analoopの書き方
valに詰める -> Add関数 このときanapawではデータが無いときに非物理量(-1000等)を詰めていたが、 anarootではAddしなければhistogramにはfillされない。 例えばTDCのover flowを詰めたいのなら詰めて構わないがその分パフォーマンスは落ちる。