You should use root version 5.34 or above. The input format for the analysis are the FHD3PDs which are a slimmed/skimmed version of the official TopD3PDs. You do NOT NEED RootCore or TopRootCore to run the code. The data and MC files are located on the grid and also replicated to MPPMU_LOCALGROUPDISK in Garching. It is recommended to run the analysis code on the machines at RZG in Garching (mppuiN.t2.rzg.mpg.de, N=1,2,3).

Getting the code

The analysis code is locate in the svn area:
You can either check out the trunk version
svn co svn+ssh://svn.cern.ch/reps/atlasusr/wildauer/FullHadronic/FullHadronicAnalysis/trunk FullHadronicAnalysis
or a tagged version
svn co svn+ssh://svn.cern.ch/reps/atlasusr/wildauer/FullHadronic/FullHadronicAnalysis/tags/FullHadronicAnalysis-12-00-01 FullHadronicAnalysis
The latest tagged version is normally the one to be used. If in doubt, contact us.

Compiling the code

To compile the code just type (don't forget to setup root before):
After that you will end up with an executable called FHAnalysisExe.exe.

Running the code

There are three main steps involved when running the local analysis. By simply typing ./FHAnalysisExe.exe you can run the code, but note that by default the first two steps are turned off; for the first time you will need to specify that you wish to run the first two steps by using two of several input parameters. These input parameters are used to steer the code (this list might get larger) and avoid having to re-compile just by turning options on or off. You can type
./FHAnalysisExe.exe -usage
to see the list:
  • Which steps to run: options specifying which of the three main steps you wish to run (again note that these must all be set to 1 for the first time):
    • -rederiveJetCorrections: runs over MC FHD3PD ntuple to derive jet correction factors for jets (as a function of jet energy and pseudorapidity). The output is a .txt file located in /files containing the jet energy and eta bin ranges as well as the actual correction factors. These are then later read in (if desired) and applied to jets in the analysis [0 or 1, default = 0]
    • -runInitial: runs over all events in MC and data from the FHD3PDs input ntuples, does basic event selection (trigger, jet isolation cut, minimum number of required jets, etc.) as well as top reconstruction (the Min∆PhiTop method for now, but no cuts are done - just to have the top candidates in place). It is at this stage that the jet correction factors are applied (unless you specify in the input parameters -applyJetCFs 0 which keeps the original jet 4-vectors). NOTE: an input .txt file is required with the parton-level jet corrections even if they are not applied - this is for technical reasons, but we could change it in the future. (Approximate time = 40 min.) [0 or 1, default = 0]
    • -runFinal: runs over the output from the -runInitial step above, does the final event selection (currently being optimized by Denis), does the ABCDEF method for background estimation, produces final combined plots as well as background-subtracted plots, and does a fit to the reconstructed mass distributions for the W and Top candidates. Several additional options are available for this step below, and more can be added later - otherwise they have to be changed in the code (FHAnalysisLoopFinal.C) and re-compiled. [0 or 1, default = 1]
  • Specify inputs/outputs: options to specify names of input and output files to be used (all set by default, so do not have to be changed):
    • -inFileMC: input file path for MC (do not use together with -inFileTxt) [runInitial]
    • -inFileTxtCSMC: text file with COMMA SEPARATED input file paths for MC [runInitial]
    • -inFileTxtNLMC:text file with NEWLINE SEPARATED input file paths for MC [runInitial]
    • -inFileData: input file path for Data (do not use together with -inFileTxt) [runInitial]
    • -inFileTxtCSData: text file with COMMA SEPARATED input file paths for MC [runInitial]
    • -inFileTxtNLData: text file with NEWLINE SEPARATED input file paths for MC [runInitial]
    • -initialOutFile: initial program output file path (default: tTNtuple_InclTopRecoIndices(MC/Data)_nominal.root [runInitial]
    • -inFileFinalMC: input file path for final run MC (default: tTNtuple_InclTopRecoIndicesMC_nominal.root) [runFinal]
    • -inFileFinalData: input file path for final run Data (default: tTNtuple_InclTopRecoIndicesData_nominal.root) [runFinal]
    • -inFileJetCF: input txt file containing jet correction factors to be applied in final stage (default = files/JetCF_nominal.txt) [runFinal]
  • Additional options for final analysis: options to turn on/off several extra features in the final analysis (more are available but currently hard-coded):
    • -applySLBJetVeto: cut on top candidates with b-jet suspected to have decayed semileptonically [0 or 1, default = 1]
    • -applyJetCFs: apply correction factors to jet 4-vectors [0 or 1, default = 1]
    • -runType: string identifier for particular run, which will be used later on with systematic samples [default = nominal]

Examples of how to run the code

  • To run over everything (all three steps - jet correction factor derivation, initial run (which then applies correction factors and runs top reco as well), produce final plots):
./FHAnalysisExe.exe -rederiveJetCorrections 1 -runInitial 1
  • To run a second time without re-doing the first two steps:
  • To do the initial and final stages, but not derive the jet correction factors and neither apply the jet correction factors (during the initial stage), nor the semileptonic b-jet veto (during the final stage):
./FHAnalysisExe.exe -runInitial 1 -applyJetCFs 0  -applySLBJetVeto 0

Getting the FHD3PDs directly from the grid to run locally

If you want to download the slimmed D3PDs yourself look for the dq2 keys:


The D3PDs have been produced for LC and EM jets. But the EM jets are not yet replicated to Garching (as of 5-FEB-2013).

Content of the analysis package

There are 4 files/classes in the package
  • physics.h/.C ... this is the base class to read the ntuple. It was created with root MakeClass mechanism and should not be edited.
  • physicsFinal.h/C ... same as above but is used to be able to read the input for the final stage (based on the output ntuple from the initial stage....)
  • FHAnalysisLoop.h/.C ... inherits from physics and implements the actual event loop. It can access all variables of the slimmed FHD3PD ntuple directly. This is where the base event selection and top reconstruction is done.
  • FHAnalysisLoopFinal.h/C ... inherits from physicsFinal and implements the final event loop. It also calls functions from the CombinedPlots helper class to produce final plots (with mc signal, data and the estimated background from the ABCDEF method) or background-subtracted plots
  • PlotStylesAndFits.h/C ... is a helper class for setting up 1d and 2d histograms, setting labels for plots, the fit functions used by various programs, etc.
  • PartonLevelJetCorrection.h/C ... is a larger bit of code containing everything needed to do the parton-level jet correction derivation (based on the iterative W method for light jets).
  • FHAnalysisExe.C ... the top level file implementing the main() method. It deals with the input and processes the command line arguements.
  • TopReco.h/.C ... this is a helper class to reconstruct the tops. As the analysis gets more complex we will create more of these helpers for all sort of tasks.

More info

For more info you can also checkout the talks I gave in the MPP hadronic top analysis meetings:
Meeting on 23 January 2013
Meeting on 11 January 2013

This topic: Main > TWikiUsers > AndreasWildauer > FullHadronAnalysisAtMPI > FullHadronAnalysisFramework
Topic revision: r7 - 2013-06-02 - ThomasMcCarthy
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback