Difference between revisions of "Ttbar analysis skeleton"

From Atlas Wiki
Jump to navigation Jump to search
 
Line 32: Line 32:
 
The first step is to correctly set the location of your ntuples in the file  
 
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  
 
simpleNtupleTTbarAnalysis.C. Then, to analyse the first 100 events in ntuple-set  
1 and to store the output histograms in a file called  
+
1 (full simulation) and to store the output histograms in a file called  
<font color=blue>summary_ttbar_full_test.root</font> simply open a root session  
+
<font color=blue>summary_ttbar_full_test.root</font> simply open a root  
and type:
+
session and type:
  
 
<font color=blue>
 
<font color=blue>
Line 43: Line 43:
 
</pre>
 
</pre>
 
</font>
 
</font>
 
  
 
When setting the number of events to "-1", all events are processed.
 
When setting the number of events to "-1", all events are processed.
 
+
If you want to analyze all events in ntuple-set 2 (W+4jets background) and to store the
 +
output histograms in a file called <font color=blue>summary_wjets_full_test.root</font>
 +
simly execute the following line:
 +
<font color=blue>
 +
<pre>
 +
  Root>  .x  simpleNtupleTTbarAnalysis.C(2,-1,"test");
 +
</pre>
 +
</font>
  
 
== Structure of the program ==
 
== Structure of the program ==

Revision as of 15:23, 25 August 2005

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

The 3 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 (fast/full/background simulation)
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 (full simulation) 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. If you want to analyze all events in ntuple-set 2 (W+4jets background) and to store the output histograms in a file called summary_wjets_full_test.root simly execute the following line:

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

Structure of the program

The '.C'-file is documented and should speak for itself. Nevertheless it is always nice to get a little bit more information on the logic behind the program:

step 1) After reading the full event information into memory, we proceed by filling vectors of analysis objects (electrons, muons, photons, jets)

step 2)

step 3)

step 4)

step 5)


What is produced

At the end of the Ntuple, all histograms are written to file