Difference between revisions of "Ntuple analysis skeleton"
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
== Prescription == | == Prescription == | ||
− | + | The first step is to correctly set the location of your ntuples in the file | |
− | open a root session and do: | + | 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 do: | ||
− | + | <font color=blue> | |
+ | <pre> | ||
+ | Root> .L simpleTTbarAnalysis.C++; | ||
− | + | Root> .x simpleNtupleTTbarAnalysis.C(1,100,"test"); | |
+ | </pre> | ||
+ | </font> | ||
− | + | ||
− | + | When setting the number of events to "-1", all events are processed. | |
− |
Revision as of 08:59, 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:
- The standard header file extended with the implementation of a few routines the user is not expected to change often
- 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
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 do:
Root> .L simpleTTbarAnalysis.C++; Root> .x simpleNtupleTTbarAnalysis.C(1,100,"test");
When setting the number of events to "-1", all events are processed.