Difference between revisions of "Ntuple analysis skeleton"

From Atlas Wiki
Jump to navigation Jump to search
Line 9: Line 9:
 
1) [http://www.nikhef.nl/~ivov/Analysis_Skeleton/simpleTTbarAnalysis.h simpleTTbarAnalysis.h]
 
1) [http://www.nikhef.nl/~ivov/Analysis_Skeleton/simpleTTbarAnalysis.h simpleTTbarAnalysis.h]
  
:The standard header file extended with the implementation of a few routine
+
:The standard header file extended with the implementation of a few routines the user is not expected to change often
the user is not expected to change often
 
  
 
2) [http://www.nikhef.nl/~ivov/Analysis_Skeleton/simpleTTbarAnalysis.C simpleTTbarAnalysis.C]
 
2) [http://www.nikhef.nl/~ivov/Analysis_Skeleton/simpleTTbarAnalysis.C simpleTTbarAnalysis.C]
 +
 +
:The user analysis-file where the user:
 +
 +
:: o reads in the event 
 +
:: o fills vectors with 'good' physics objects (leptons, jets, photons etc. passing the user's quality requirements)
 +
:: o performs the top-analysis. The resulting histograms will be written out in a separate root file
 +
 +
3) [http://www.nikhef.nl/~ivov/Analysis_Skeleton/simpleNtupleTTbarAnalysis.C simpleNtupleTTbarAnalysis.C]
  
 
:The steering-file containing the location of the ntuples and a function that decides:
 
:The steering-file containing the location of the ntuples and a function that decides:
Line 18: Line 25:
 
:: o how many events to process
 
:: o how many events to process
 
:: o extension to the name of the output file
 
:: o extension to the name of the output file
 
3) [http://www.nikhef.nl/~ivov/Analysis_Skeleton/simpleNtupleTTbarAnalysis.C simpleNtupleTTbarAnalysis.C]
 
 
The user analysis-file where the user reads in the event, fills vectors with 'good'
 
physics objects (leptons, jets, photons etc. passing the user's quality requirements)
 
and finally performs the top-analysis. The resulting histograms will be written out
 
in a separate root file.
 
  
 
== Prescription ==
 
== Prescription ==

Revision as of 08:56, 30 June 2005

Analysis Skeleton to analyse the Standard Ntuple

The Analysis of the Root ntuple proceeds in a very straightforward way. Inside ROOT we used MakeClass() to get the .h and .C files. These were extended to our needs and together the following three files form the analysis skeleton:

1) simpleTTbarAnalysis.h

The standard header file extended with the implementation of a few routines the user is not expected to change often

2) simpleTTbarAnalysis.C

The user analysis-file where the user:
o reads in the event
o fills vectors with 'good' physics objects (leptons, jets, photons etc. passing the user's quality requirements)
o performs the top-analysis. The resulting histograms will be written out in a separate root file

3) simpleNtupleTTbarAnalysis.C

The steering-file containing the location of the ntuples and a function that decides:
o what ntuples to process
o how many events to process
o extension to the name of the output file

Prescription

After setting the correct location of your ntuples in the file simpleNtupleTTbarAnalysis.C open a root session and do:

1) .L simpleTTbarAnalysis.C++;

2) .x simpleNtupleTTbarAnalysis.C(1,100,"test");

This will results in the analysis of the first 100 events in the ntuple-set 1.
 The histograms from the analysis will be stored in the file called 
 summary_ttbar_full_test.root