You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Flat NTuple Analysis

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.

Description

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.

Checkout

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

Run on an example

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

Run over your own NTuple

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

  1. Copy the declarations of variables and branches to private members of the FileEvent_trg.h
  2. Copy only the initialization of the variables and setbranchaddress from the 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:

  • No labels