This software tool can be used to analyze flat root ntuples. The aim is to have a lightweight framework to enable quick study of different ntuples.
The tool is based on so-called Topologies. The different topologies can reflect different analyses which are interested in different final states e.g. search for bjet+MET and long-lived particles. The idea is that while the final states are different many needs are common for the different analyses; cross-section/k-factor handling, histogramming, cut flow, statistics, etc. Also, the overhead in the use of different ntuples is minimized as these common functionalities are decoupled from the ntuple structure.
It is based on a analysis package developed by J. Sjolin (Stockholm University) and P. Hansson.
The goal is to have a tool that is quick and easy to install and run to facilitate large numebr of iterations as usually needed when doing analysis.
The code is in SVN and can be found by doing:
phansson@pcphuat27]/u1/phansson/jetmetbtag% svn co svn+ssh://svn.cern.ch/reps/atlasusr/phansson/flatana
In order to run on the example you need a ntuple. This example runs on ntuples in e.g.:
/u1/data/user09.DavidWilkinsMiller.trigger.v02.SethCaughron.misal1_mc12.EnhancedBias_1031.digit.RDO.v13004004_AANT_PHCOPY_SLIM/
All the needed compilations are done automatically in the main root macro ana.C
.
There is an example analysis/topology class to start from:
phansson@pcphuat27/u1/phansson/jetmetbtag% cd flatana/trunk/topologies/example
The
phansson@pcphuat27/u1/phansson/jetmetbtag/flatana/trunk/topologies/example% ./ana.sh l2rate 10
In order to run over your own ntuple you need only to create a new FileEvent
:
phansson@pcphuat27/u1/phansson/jetmetbtag/flatana/trunk/topologies/example% cp FileEvent_template.h FileEvent_trg.h
phansson@pcphuat27/u1/phansson/jetmetbtag/flatana/trunk/topologies/example% cp FileEvent_template.cxx FileEvent_trg.cxx
Then open your root file (e.g. ntuple.root) and do a makeclass:
phansson@pcphuat27/u1/phansson/jetmetbtag/flatana/trunk/topologies/example% root -l /u1/data/user09.DavidWilkinsMiller.trigger.v02.SethCaughron.misal1_mc12.EnhancedBias_1031.digit.RDO.v13004004_AANT_PHCOPY_SLIM/user09.DavidWilkinsMiller.trigger.v02.SethCaughron.misal1_mc12.EnhancedBias_1031.digit.RDO.v13004004.AANT._00001_slim.root
root 1 CollectionTree->MakeClass("slimclass")
Open slimclass.h
and
FileEvent_trg.h
Init(TTree *tree)
functions to FileEvent_trg.cxx
function SetBranches (Note that only the initialization of variables and SetBranchAddress() should be copied)The last step is to schedule this to be recognized in the main macro ana.C
: