Skip to content

2 Processing the datacards

Thomas Klijnsma edited this page Apr 3, 2019 · 1 revision

Get the preprocessed datacards

All the input and processed .txt datacards are stored in a separate repository:

git clone [email protected]:tklijnsma/input-diffcomb-HIG17028.git suppliedInput

The datacards contained in here are the ones used for the final results in HIG-17-028. The rest of this page concerns the necessary steps to recreate them.

Preprocessing datacards

The scripts responsible for the datacard preprocessing are all contained in datacard_preprocessing.py.

For the hgg datacards, the process names don't quite follow the conventions (see the conventions twikis here and here). To rename the processes, do:

python test.py rename_processes_hgg_pth_ggH

This takes the raw hgg input, suppliedInput/fromVittorio/pT_newBins_Feb28/Datacard_13TeV_differential_PtGghPlusHxNNLOPS_newBins.txt, and creates a new file suppliedInput/fromVittorio/pT_newBins_Feb28/Datacard_13TeV_differential_PtGghPlusHxNNLOPS_newBins_renamedProcesses.txt with the process names replaced.

For the hzz datacards, the processes need to be renumbered. Each process in the .txt datacard gets an integer, and somewhere in the combine code a distinction between signal and background processes is made based on the sign of said integer. In order for the hzz datacards to work in the combination, run the following:

python test.py --renumber_processes_hzz_pth_ggH
python test.py --renumber_processes_hzz_pth_smH

All the output files should have already been present in the the suppliedInput directory. You can check whether any changes were made to the files by running these commands--there shouldn't have been any.

The renaming commands for the other datacards are:

python test.py --rename_processes_hgg_njets
python test.py --rename_processes_hgg_ptjet
python test.py --rename_processes_hgg_rapidity
python test.py --rename_processes_hgg_INC

Adding an xH nuisance parameter

When fitting only a ggH-signal to data, one must take into account that other production modes are included in the data as well. In order to do this, the xH processes are fixed to their SM expectation, but it is then necessary to include a nuisance parameter related to the uncertainty on the SM expectation. The code to do this is contained in the function add_xH_nuisance_parameter in datacard_preprocessing.py.

As an example, consider:

python test.py --add_xH_nuisance_parameter_to_ggH_card --combination

which adds a line to combination_pth_ggH_Mar01.txt and yields combination_pth_ggH_Mar01_xHNuisPar.txt. The difference is only an additional line at the bottom of the datacard, assigning a 2.07% uncertainty on all the xH processes.

Combining cards

Combining the datacards is based on the combineCards.py script contained in the combine tool. The following command creates a new combined datacard, using only the hgg and hzz channels:

python test.py --combine_pth_smH --combination

You can compare the output you get from that with suppliedInput/combination_pth_smH_Mar13.txt. The order of some lines may change, but other than that the content should match.

For the ggH/xH processes split, do:

python test.py --combine_pth_ggH --combination

And the create the cards with hbb included, do:

python test.py --combine_pth_smH --combWithHbb
python test.py --combine_pth_ggH --combWithHbb

for the ggH/xH processes split, do not forget to assign the xH uncertainty nuisance parameter.

Cards used for HIG-17-028

The module LatestPaths.py contains the paths to all the datacards used for the analysis in HIG-17-028.