Skip to content

Z nunu background estimation instructions

scarletnorberg edited this page Feb 13, 2017 · 8 revisions

On this page we can collect the recipe for the Z->nunu background estimation.

2015 style

This is the default recipe, using the method used for the 2015 analysis and the ICHEP analysis. It is based on a dilepton control region and uses MC that is corrected using Data/MC shape comparisons.

Step 1: Run makeplots to get basic Data/MC plots

Someone to put exact instructions here

The output of this step will be referred to as myrootfile in the next steps.

Step 2: Extract the Njets weights

Many things are done using various options of the makeReweightingHisto.py script. Probably we should streamline it a bit more, but for now this is how it goes. Remember that you can run python makeReweightingHisto.py -h to get a list of all the command line options.

To extract the Njets weights from the loose control region, run the following:

python makeReweightingHisto.py --njet -f <myrootfile>

This now also computes the overall normalization weight in the tight region. If successful, it will have created a new dataMCweights.root file containing the njets weights, and it will have updated the ScaleFactors.h (and ScaleFactors.cc) file with the new normalization weight. Don't forget to commit them once they are ready to be used by others!

Check that the Njet weights and normalization weight make sense before proceeding to the next step.

Step 3: Rerun makeplots to get weighted histograms

makeplots automatically picks up the Njets weights that are in your area, so when you rerun, the histograms named DataMCw..., DataMCwtt..., and DataMCww... should all make sense now that the weights are updated.

The output of this step will be called mynewrootfile in the following.

Step 3.1: for the note to produce the SF plots

scalefactorplot.C this needs to be run ./scalefactorplot This file is hard coded with where the file is please edit the file!!

Step 4: Systematics!

Computing the systematics is done in various steps, which are detailed in the following sections.

Shape systematics

python makeReweightingHisto.py --shape -f <mynewrootfile>

The output of this step is a file called syst_shape.root, which will be needed for subsequent steps, and some plots shapeSyst_*.

Njet weight systematics

For this you need the minituples (with a local filelist, check with Joe), the dataMCweights.root file, and the syst_shape.root file.

Run:

./nJetWgtSyst

This will take some time. The output will be a file called syst_nJetWgt.root, and a file called Corrolation_MET-MT2.root (although I forget what that was for again).

Get the systematics from the 1D shape differences

You need the syst_shape.root file to be up to date for this. You also need a directory called Syst_plots for plots to appear in.

Remember that this text file needs to be updated minituple-ZJetsToNuNu.txt!! This looks for the mini tuple added file.

Run:

./systematics

This will take some time. At the end you should get a file called systematics.root.

PDF and scale systematics

python makeReweightingHisto.py --systScale -f <mynewrootfile>

The output is a file called syst_scalePDF.root.

Aggregrate all systematics

Make sure you have executed all the previous steps, and have the following files in your area:

  • systematics.root
  • syst_nJetWgt.root
  • syst_scalePDF.root

Then run:

python makeReweightingHisto.py --systHarvest -f <mynewrootfile>

This will compute some of the simpler uncertainties (e.g. JEC, trigger, btag) and will aggregrate everything. The output is a file called syst_all.root. It will also print the datacard to the screen.

Step 5: Final plot

Make sure the filepaths in the moneyplot.C file are all up to date and pointing to valid files. Then just run: Remember !!! money plot has the root file hard coded in it.

# Run moneyplot
./moneyplot

The output is our final prediction in plot form. It should also make a table.