cms-analysis/HiggsAnalysis-HiggsToTauTau — pull request #196 by ajgilbert (2013-10-13 15:40:16+00:00)
Title: add script for pre-merging bin errors

Hi Roger, all,

I've added a standalone script that will take a datacard input file and merge the bin errors as requested by the user. This is really just a modified copy of add_stat_shapes.py, and behaves in quite a similar way. I would recommend finding some volunteers to test that it behaves correctly though. It should be run before adding the actual bbb templates. The example usage is:

merge_bin_errors.py --folder muTau_0jet_medium --processes W,QCD,ZL,ZJ ---bbb_threshold=0.1 --merge_threshold=0.5 --verbose htt_mt.inputs-sm-8TeV.root htt_mt.inputs-sm-8TeV.root

For the given category this script will loop through each bin and evaluate the bin error for each background in the "processes" list which passes the bbb_threshold - the default being the 0.1 that we use for adding bbb at the moment. In principle this could be set to zero (which ensures all bin uncertainties are taken into account), but I kept it at 0.1 for consistency with our current procedure: ie. if the error on a background in a bin is < 10% then we ignore that error.

The option merge_threshold controls the extent to which bin errors are redistributed from the least to the most contributing in a given bin. For details see the slides here:
https://indico.cern.ch/getFile.py/access?contribId=15&sessionId=10&resId=0&materialId=slides&confId=274013

So far I tested up to 0.4 and found this to be safe, but I think it would be good if someone can test all the way up to 1.0. This is maximal merging, meaning there will be at most one bbb error per bin.

Finally, I would add that if you decide to go ahead and use this script then I think it doesn't make so much sense to merge QCD into W with the standard bbb script as we do now.

cheers,
Andrew

p.s. I'm mostly offline this next week so I will only be able to reply to emails very occasionally.