Useful Macros

Truth Tree Viewer

This archive includes dsp.C, dsp.h, and pdgid.h. You need a AANT file to browse a tree of truth particles event by event. It also supports AANT which does not contain vectors like AANT in v12.

root[0] .L dsp.C
root[1] dsp aho("AANT_File_Name");     <--- You can use wild card like "hoge_*.root" as the file name.  
root[2] aho.ShowparticleList(4);       <--- shows a normal list of truth muons for event 4(5th event).
                                            Note that event number starts from 0.
                                            Top particles are displayed in magenta.
                                            The status is displayed as 'P' in yellow if it is 9999. 
root[3] aho.ShowParticleList(1,10);    <--- shows event 1 to 10. 
root[4] aho.ShowTreeFromPDG(13);       <--- shows a decay tree which begins from the given particle(13==muon) over all events. 
root[5] aho.ShowTreeFromPDG(13,2);     <--- shows muon trees for event 2. 
root[6] aho.ShowTreeFromPDG(13,1,10);  <--- shows muon trees event 1 to 10. 
root[7] aho.ShowDecayFromTop(1);       <--- shows a tree from the grandest mother particle. 
                                            The 1st particle(Type[0]) is not always the top of the family. 
root[8] aho.ShowDecayFromTop(2,20);    <--- shows trees event 2 to 20. 
root[9] aho.SetColor(13, 1);  <--- sets the color of muon(PDGID==13) to red.
                                   0:black, 1:red, 2:green, 3:yellow, 4:blue, 5:magenta, 6:cyan, 7:white 
root[10] aho.EnableColor(1);  <--- enables color. 0:disable, deault=1 
root[11] aho.SetShowStat(1);  <--- shows status code. 0:reset, default=1 
root[12] aho.SetShowType(1);  <--- shows type(PDGID). 0:reset, default=1 
root[13] aho.SetShowMoth(1);  <--- shows mother index. 0:reset, default=1 
root[14] aho.SetShowPt(1);    <--- shows pT. 0:reset, default=0 
root[15] aho.SetShowEta(1);   <--- shows eta. 0:reset, default=0 
root[16] aho.SetShowPhi(1);   <--- shows phi. 0:reset, default=0 

PDG ID is seen at PDG site.

-- KenjiOzone - 07 Nov 2008

  • dsp.tgz: Truth Tree Viewer macro in root
Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivetgz dsp.tgz r1 manage 4.8 K 2008-11-11 - 02:35 KenjiOzone TruthTreeViewer macro in root
Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r2 - 2008-11-11 - KenjiOzone
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback