FullHadronAnalysisFramework

Prerequisites

You should use root version 5.34 or above. I used 5.34.04 when I wrote this. 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. The only machines where (at the moment) the analysis code runs out of the box are the SLC5 mppuiN.t2.rzg.mpg.de machines. A root version at MPI that supports dcache access from (ubuntu based) local desktop machines is under testing (I tried it successfully) and will be deployed shortly. If you want to run on lxplus or any other machine you need to make sure the input files are available.

Getting the code

The analysis code is locate in my svn area. You can get it by typing
svn co svn+ssh://svn.cern.ch/reps/atlasusr/wildauer/FullHadronic/FullHadronicAnalysis/tags/FullHadronicAnalysis-12-00-01 FullHadronicAnalysis
We continue to develop the trunk version, but for the moment this is the first tagged version (FullHadronicAnalysis-12-00-01), so we could all use this for now to be consistent. As the analysis evolves and gets more mature we will tag later versions.

Compiling the code

To compile the code just type (don't forget to setup root before):
make
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):
    • -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 ∆mTop method for now, but no cuts are done - just to have the top candidates in place). (Approximate time = 35 min.) [0 or 1, default = 0]
    • -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]
    • -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 - initial run, jet correction factor derivation, produce final plots):
./FHAnalysisExe.exe -runInitial 1 -rederiveJetCorrections 1
  • To run a second time without re-doing the first two steps:
./FHAnalysisExe.exe
  • To run a second time without re-doing the first two steps and neither applying the semileptonic b-jet veto nor the jet correction factors:
./FHAnalysisExe.exe -applySLBJetVeto 0 -applyJetCFs 0

NOTE: When running on data you will get many set branch status errors because it tries to set the MC branches. This is harmless. If I find some time I will fix it.

Getting the FHD3PDs directly from the grid to run locally

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

user.wildauer.*NTUP_FHTOP*v2/

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
Edit | Attach | Watch | Print version | History: r34 | r6 < r5 < r4 < r3 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r4 - 2013-05-16 - ThomasMcCarthy
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback