Difference between revisions of "Ntuple analysis skeleton"

From Atlas Wiki
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Analysis Skeleton to analyse the Standard Ntuple ==
 
  
 +
The analysis of the Standard Ntuple for Rome was done in ROOT. On this page
 +
the Analysis Skeleton is presented and instructions on how to use it.
 +
 +
== The tree files that make up the Analysis Skeleton ==
  
 
The Analysis of the Root ntuple proceeds in a very straightforward way.  
 
The Analysis of the Root ntuple proceeds in a very straightforward way.  
Line 24: Line 27:
 
:: o what ntuples to process
 
:: o what ntuples to process
 
:: o how many events to process
 
:: o how many events to process
:: o extension to the name of the output file
+
:: o name of the output file
 +
 
 +
== How to run the Analysis Skeleton in ROOT ==
  
== Prescription ==
+
The first step is to correctly set the location of your ntuples in the file
 +
simpleNtupleTTbarAnalysis.C. Then, to analyse the first 100 events in ntuple-set
 +
1 and to store the output histograms in a file called
 +
<font color=blue>summary_ttbar_full_test.root</font> simply open a root session
 +
and type:
  
After setting the correct location of your ntuples in the file simpleNtupleTTbarAnalysis.C  
+
<font color=blue>
open a root session and do:
+
<pre>
 +
  Root>  .L simpleTTbarAnalysis.C++;
  
1) .L simpleTTbarAnalysis.C++;
+
  Root>  .x  simpleNtupleTTbarAnalysis.C(1,100,"test");
 +
</pre>
 +
</font>
  
2) .x  simpleNtupleTTbarAnalysis.C(1,100,"test");
 
  
: This will results in the analysis of the first 100 events in the ntuple-set 1.  
+
When setting the number of events to "-1", all events are processed.
  The histograms from the analysis will be stored in the file called
 
  <font color=blue>summary_ttbar_full_test.root</font>
 

Latest revision as of 09:12, 30 June 2005

The analysis of the Standard Ntuple for Rome was done in ROOT. On this page the Analysis Skeleton is presented and instructions on how to use it.

The tree files that make up the Analysis Skeleton

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 name of the output file

How to run the Analysis Skeleton in ROOT

The first step is to correctly set the location of your ntuples in the file simpleNtupleTTbarAnalysis.C. Then, to analyse the first 100 events in ntuple-set 1 and to store the output histograms in a file called summary_ttbar_full_test.root simply open a root session and type:

  Root>  .L simpleTTbarAnalysis.C++;

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


When setting the number of events to "-1", all events are processed.