EEmcTrees Example 1

Here's a brief example of how to make some histograms from the newest version of EEmcTrees.

This is designed for someone somewhat unfamiliar with root, such as new students, and will hopefully give them a good starting point.  To use the example, please aquire some data from the directory (on the BNL RCF)

/star/institutions/anl/sgliske/data/EEmcTrees/2006/

You do not need all the data in the directory, necessarily, but the files corresponding to a selected set of runs is sufficient.  You also do not necessarily need all the algorithms available.  For this example, lets assume we want the data using the IU algorithm.   You will need corresponding parts 1, 2 and 3 for each run, however.

For the purpose of this example, I will assume you have created a directory on your local PC, and have copied some data files into a subdirectory called data.  Next, we need to make some file lists of the runs.  The following will work in Linux:

ls data/run*Part1* > treeList.Part1.txt
ls data/run*Part2.IU* > treeList.Part2.IU.txt
ls data/run*Part3.IU* > treeList.Part3.IU.txt

Next, make sure the example script is in the local directory. It is attached to this blog, but you need to rename it to "example1.C".   You can execute the script by typing

root -b -q example1.C'("treeList.Part1.txt","treeList.Part2.IU.txt","treeList.Part3.IU.txt")'

The '-b' tells it to be in batch mode and not display the graphics.  The TCanvases will change to fast to see anyhow.  The '-q' tells root to end when the script finishes.  When it does, have a look at the created eps files, and compare them with the script and with the output from root.  Note, root will complain about dictionaries not being availble.   That's OK.  I hope to have a later blog about how to create and use the dictionaries, so that one can use the full class, but for this example it is not needed.

Enjoy!  Further details about the EEmcTree structure and how to make the data files in future blogs.