Difference between revisions of "Ntuple analysis skeleton"
Line 13: | Line 13: | ||
3) [http://www.nikhef.nl/~ivov/Analysis_Skeleton/simpleNtupleTTbarAnalysis.C simpleNtupleTTbarAnalysis.C] | 3) [http://www.nikhef.nl/~ivov/Analysis_Skeleton/simpleNtupleTTbarAnalysis.C simpleNtupleTTbarAnalysis.C] | ||
− | <font color = red> simpleTTbarAnalysis.h </font> | + | |
+ | The file <font color = red> simpleNtupleTTbarAnalysis.C </font> contains the location | ||
+ | of the ntuples and the steering routines that decides: | ||
+ | : o what ntuples to process | ||
+ | : o how many events to process | ||
+ | : o extension to the name of the output file | ||
+ | |||
+ | The file <font color = red> simpleTTbarAnalysis.h </font> contains the header file and | ||
+ | implementation of a few routine the user is not expected to change often | ||
+ | |||
+ | The file <font color = red> simpleTTbarAnalysis.C </font> is the file containing the | ||
+ | analysis code: read in the event, fill vectors with 'good' physics objects (leptons, | ||
+ | jets, photons etc.) that passed the user's quality requirements and finally perform the | ||
+ | analysis. The resulting histograms will be written out in a separate root 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 | ||
+ | <font color=blue>summary_ttbar_full_test.root</font> |
Revision as of 08:49, 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:
3) simpleNtupleTTbarAnalysis.C
The file simpleNtupleTTbarAnalysis.C contains the location
of the ntuples and the steering routines that decides:
- o what ntuples to process
- o how many events to process
- o extension to the name of the output file
The file simpleTTbarAnalysis.h contains the header file and implementation of a few routine the user is not expected to change often
The file simpleTTbarAnalysis.C is the file containing the analysis code: read in the event, fill vectors with 'good' physics objects (leptons, jets, photons etc.) that passed the user's quality requirements and finally perform the analysis. The resulting histograms will be written out in a separate root 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