Towards a generic ntuple for the QCD
group and ZEUS
"G-UNIT" - part of the GANGSTAz project
(Generic Analysis Ntuple for
Globally STandardised Analyses @ ZEUS)
project
14 Feb 2007
I have developed a set of tools to help you set up an analysis job to
to use the ntuples. The set comprises of 3 scripts, the
output of which is a root file containing a slimmed down tree with
variables and events you want, as well as any basic histograms you might
want. In principle, the tools can be used to slim down any root tree
in any root file but they have been developed principally with the
generic ntuple in mind. The scripts are named as follows:
o    MakeCards
o    MakeAnalJob
o    MakeFileLists
The scripts can be downloaded in a tar ball, GenericTools.tar. To extract the
scripts into the directory where the tar file is saved, type:
tar -xvf GenericTools.tar
To use the scripts, do the following:
1) Make a directory where you would like your analysis job to be set
up and copy each of them into that directory.
2) Type:
MakeCards 'class-name' 'file' 'tree'
where 'class-name' is the name you want to give your analysis,
e.g. DijetsPHP, 'file' is the name of one of the generic root files
(any one will do), e.g. (for our group),
/data/zenith222a/zqcd/GenericLog/ntp/generic_57035_57077_TLTplus.z_001.root,
and 'tree' is the name of the tree contained within that file,
in this case, generic.
This will then generate a file called 'class-name.cards', which you
need to edit. (It also will produce 2 files 'GenericClass.h' and
'GenericClass.C' - don't delete them!)
3) There are instructions how to edit the cards contained within the
file. You have the option to make any cuts you fancy and book any
histograms based on any of the ORANGE varaibles (or combination of
ORANGE variables, for example, Kt_etjet_a[0]-Kt_etjet_a[1]) contained
within the tree. Your cuts must be written with (correct!) C logic,
and can use any of the logical operators. You must also select which
variables you want in your final slimmed down tree (remebering to
activate any that you have cut on or wish to histogram).
4) Next you run MakeAnalJob. Type:
MakeAnalJob 'class-name'
where you must enter the 'class-name' you previously selected. This
will output the following files: 'class-name.h', 'class-name.C',
Main.C and a Makefile, and will also make the executable,
'class-name.exe'.
You can run the executable by simply typing:
'class-name.exe'
and it will run over the root file you enetered for the MakeCards
command. Alternatively, you can run it by typing:
'class-name.exe' 'file_list'
where 'file_list' is a file containing a list of the root
files, one per line, containing an equivelent tree to the one you
eneter for the MakeCards command.
5) If you don't fancy making one of those file_lists yourself, you can
use the command:
MakeFileLists 'directory' 'Nfiles'
where 'directory' refers to the that which contains equivalent root
files, e.g. /data/zenith222a/zqcd/GenericLog/ntp/, and 'Nfiles' is
an integer number of how many generic files you want to include in
each list. The output of this command is a list of files in a
directory, FileLists/, labelled, list_1,
list_2... . You can now execute your program by typing, for example,:
'class-name.exe' FileLists/list_1
6) The output of this executable is a root file called
'class-name.root', which will contain the filled histograms you booked
in the card file and a slimmed down root tree, with the variables you
selected.
PRESENTLY THESE TOOLS ARE IN A VERY DEVELOPMENTAL STATE SO IT IS
LIKELY SOMETHING MAY NOT WORK. IF SO, PLEASE
EMAIL ME WITH AS MUCH INFO
AS POSSIBLE. THANKS.
THE TOOLS WERE DEVELOPED AND LIGHTLY TESTED USING ROOT 5.12.00 AND
WONT WORK ON VERY OLD VERSIONS OF ROOT. TO SET UP ROOT 5.12.00 EASILY
ON YOUR CENTRALLY MAINTAINED LINUX BOX TYPE: "ini ROOT51200" (IF YOU
HAVE THAT COMMAND).
ONE KNOWN BUG (FIXED AS OF 10-4-07) IS THAT VARIABLES THAT DON'T
ADHERE TO THE STANDARD 1ST LETTER CAPITALISATION RULE (BUG IN ORANGE -
SOON TO BE FIXED), IF SELECTED, WILL CAUSE A PROBLEM. IN THIS CASE
THE USER SHOULD EDIT THE 'class-name.h' AND 'class-name.C' FILES,
ACCORDINGLY.
12 Feb 2007
please find the latest set of QCD generic ntuples in:
    /data/zenith222a/zqcd/GenericLog/ntp
Presently, they only comprise of a subset of the 2005 data and
correspond to an integrated lumi of 3192.01 nb-1. Both PAW and ROOT
files are available. There is as yet no standard framework to use the
ntuple. For root users a TTree::MakeClass() will get you
going. Please let me know if you have any questions and any feedback
you might have. It is likely something wont work/will be missing etc
for you to do your analysis but just let me know and I will make sure
it is in the next version. The next version will come out after the
next ORANGE release (towards the end of March I believe) and will
include most if not all of the HERA II data set.