/monoJetLimits

Code base for running Mono-Jet Expected Limits

Primary LanguagePython

Mono-Jet - CombinedLimit

Follow below instructions to get HiggsCombine

CC7 release CMSSW_10_2_X HiggsCombined

export SCRAM_ARCH=slc7_amd64_gcc700
cmsrel CMSSW_10_2_13
cd CMSSW_10_2_13/src
cmsenv
git clone https://github.com/cms-analysis/HiggsAnalysis-CombinedLimit.git HiggsAnalysis/CombinedLimit
cd HiggsAnalysis/CombinedLimit
git fetch origin
git checkout v8.0.1
scramv1 b clean; scramv1 b # always make a clean build
cd $CMSSW_BASE/src
git clone https://github.com/cms-analysis/CombineHarvester.git CombineHarvester
scram b -j

Mono-Jet-CombinedLimit

cd $CMSSW_BASE/src/HiggsAnalysis/CombinedLimit/
git clone https://github.com/ekoenig4/monoJetLimits.git

Instructions For Running Limits

Systematics files are generated using the PlotTool/saveplot.py from monoJetsTools

Merging Categories

You can copy over the split input files using ./getsys.sh. Go into the file and change the _YEAR variables to valid paths for the Systematics files. Then running build_input.sh will merge the input files into one file. The input files can be changed inside the script as well as the output file name. build_input.sh will also try and add the Hinv templates from a BU input file, the path can be changed to make that work.

Making the Workspace

The workspace is created with an input systematics root file, include --combined to create a combined limit directory.

./makeWorkspace.py -i path/to/name_of_sysfile.sys.root --combined 

This create a directory called Limits. Inside that directory there will be a directory for the .sys file that you included. The name of this directory is autogenerated using tag_{dirname}.sys.root. The directory named can be manual changed using the -o dirname option.

Inside this directory there will be a .sys directory for each category included in the .sys file, as well as a Run2.sys directory if the --combined option is used. Alongside these directories there will be a root file containing the workspace for each category in the .sys file. Contained in each .sys directory will be the datacards for each of the channels (sr,cr, ...).

Change Signal Model

The signal model that is used can be changed by altering the lists in two scripts used by makeWorkspace.py

createDatacards.py

createWorkspace.py

Make sure each of these lists contain the same signal names.

Running Limits

There is a suite of scripts for running limits, impacts, cr fits, and pulls.

the runsuite.sh script handles running each of these for provided .sys directories.

sh runsuite.sh /path/to/dir.sys/

Refer to this script on how to run each of the script, each one is called the same way.

Plot Output

Most scripts will try and put files in my public_html area. Inspect each of the scripts called by runsuite.sh there will be a string at the top with a public_html path. Change this path to something that will work with your machine.

Plotting Limits

Limits are plotted using hte CLplotter.py script.

./CLplotter.py -d path/to/workspace/dir.sys/

The script uses the limits.json file to plot the limits in both 1D and 2D plots. By default the script plots the 2D plot, the type of plot can be specified using

./CLplotter.py -d path/to/workspace/dir.sys/ --version 1D (or 2D)

Inside the script the outdir_base can be changed to specify where the plots are saved to