How to use the Stntuple
The Stntuple is a root ntuple designed to hold event data in a compressed
form. It is a powerful way of quickly performing analysis as most Production
output objects are stored within in it, and can be accessed much faster than
by running dedicated jobs over the actual production output many times.
How to access Stntuple
A version of Production corresponding to
the most recent frozen code version can be found in
$CDFSOFT2_DIR/bin/Linux2-KCC_4_0/stnmaker.exe .
If you really want
to make your own executable, do this:
- type newrel -t X mystn , where X corresponds to your desired code version
- type cd mystn to move into that directory
- type addpkg dev_YYY Stntuple to copy the
relevant code into your
subdirectory. Here dev_YYY is the most recent version of Stntuple.
You will need to check this on the Stntuple home page.
- type export USESHLIBS=1 to compile shared libraries.
- type gmake Stntuple.all to compile the Stntuple
executable.
- Your executable can now be found in the mystn/bin/Linux2-KCC_4_0
subdirectory.
How to run the job
Just type executable_path tcl_path , where executable_path is the
full path to your Stntuple executable, and tcl_path is the full path to your
directives file. An example directives file can be found in
Stntuple/test/stnmaker/run_stnmaker.tcl .
If you make your own release of the Stntuple you can edit this directly.
The only parts you need alter are:
include file data69/upgrade/mc_data/ttbar/isajet/top175_prod.root
..... this sets the full path to your input file. Change this to your desired
input file.
histfile ./results/stntuple.root
.... this sets your output file (this example goes into the results
subdirectory)
splitMode set -1
this is the place to add extra branches of information to your tree.
For example, if you are analysing MC, you would want to add
makeGenp set 1
makeObsp set 1
under here. To get a full listing of what is available (and what is set by
default), you could add "show" to this list, and stntuple will print out
the current settings at the start of the job.
begin -nev 10
.... in this case you will pass 10 events through the stntuple.
Don't be dismayed by the huge amounts of printout on your screen as stnmaker
runs. This is normal.
Analysing your output
Although the stntuples you produce are ROOT ntuples, like the eN ntuples,
they are a little more complex and can't just be accessed directly. A special
analysis class is included in the Stntuple that you can inherit from to
interrogate the stntuples. There are lots of examples of classes to
interrogate all sorts of MC information in the Stntuple release. A good place
to start is with the MC info example, instructions for making and running
this are given here.
Useful links