Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Installing the Software

The software comes as part of the ttH multileptonic code, which is unfortunately a rather large code base.  Follow the check out procedures given in the CERN wiki page.  The scripts are all in the HWWtthCode/other/stack area.  Make sure you set up an athena release and RootCore every time you start a new session working with these scriptshas been separated from other code and is now its own standalone package.  You need to check out the =SimplePlottingCutflow= package, e.g.

No Format
svn co svn+ssh://svn.cern.ch/reps/atlasphys-hsg8/Physics/Higgs/HSG8/AnalysisCode/m
ultileptons/SimplePlottingCutflow/trunk Run2Plotting

You will need to set up an Athena release, e.g. asetup 20.1.8.3, to use the code.  Unfortunately it cannot run in a pure RootCore environment yet because we depend on libraries not available from RootCore.

Within the package there are two subdirectories. The subdirectory plotting contains all the scripts and configuration files.  The subdirectory XsectionInput contains the configuration files for the sample cross sections, k-factors, filter efficiencies, and "priorities" (only priority 1 samples are included by default). It contains a script to allow you to convert the .txt files (which are nicely human-readable) to .yaml files (which the scripts actually use).

The scripts we're going to use are called do_cutflow.py and dump_plots2plots.py.  They're part of a broader suite of programs based on stack.py, which allows you to do interactive querying and plotting of the MC and data from the command line.  Basically do_cutflow.py and dump_plots2plots.py automate calls to stack.py.

The Input Data

You can use the files in in /data/onyisi/tth_13TeV_merged/v425ns_processed3.4/trigpdf.  Any output of our ntupler will be compatible with this software (see 13 TeV tth Analysis with MultiLepAnalysisNtupler for instructions to build and run that ntupler).  The ntupler expects the MC files to be provided with names of the form "DSID.root", and the data files to be "period*.root".  All files should be in the same directory.

...

The cross sections for all processes are specified in HWWtthCode/XsectionInput/Xsection8TeVXsection13TeV_tth_bkg_v2v1.yaml and Xsection8TeVXsection13TeV_tth_sig_v2v1.yaml.  These are autogenerated from the corresponding .txt files in the same directory, which are much easier to read.  By default the "priority 1" samples are the ones that are used, although in practice we override these choices with some regularity.  When you run either the cutflow dumper or the plotter, they will first print out all the MC files they have loaded, so you can keep track of what is being done.

You are unlikely to ever need to edit plotting/config_8TeV.yaml, but for completeness, this is the file that maps the process names given in the cross section files to categories of processes (e.g. "single top" or "diboson").  Effectively it groups the DSIDs and configures how they will be displayed in the cutflows and plots (and what colors the histograms will be).  The color choices are the result of a carefully negotiated agreement, don't touch them unless really necessary.  This file also contains weights for various Alpgen Z samples which you can mostly ignore.

If you need to tweak DSIDs for input files (e.g. you want to use an alternate MC for some process), you will likely need to add a command line argument to common_sample_arguments.py and configure the DSIDs in stack_defs.py (see those files for examples of doing this).
 

Making Cutflows

The cuts are specified in yaml files, in lists like:

...

The simplest execution of the code is
DISPLAY="" python do_cutflow.py standard_3l_cutflow.yaml  --filedir '/data/onyisi/tth_13TeV_merged/v425ns_processed3.4/trigpdf' --texout mycutflow.tex
This will dump the expected yields for the cuts specified in standard_3l_cutflow.yaml to the output file mycutflow.tex.  Since these cuts do not need to have any particular relationship to each other, you can make cutflows, or scan alternative signal regions, or whatever you would like to do.

...

The simplest running of the code is
DISPLAY="" python dump_plots2plots.py standardCR_fornote.yaml --filedir '/data/tth/v4_processed/trigpdf/' --outdir output_dir_for_plots/ --texout standardCR_fornote.tex 
Many of the options to dump_plots2plots.py are the same as for do_cutflow.py (especially regarding the MC samples that are used). 

Some useful configuration files:

  • plotconfigs/standardCR_fornote13TeV.yaml: the control regions used in Note 3standardSR_fornote.yaml: the signal regions