diff --git a/data/lhc-hxswg/BRU_rules b/data/lhc-hxswg/BRU_rules new file mode 100644 index 0000000000000..4a978e8554815 --- /dev/null +++ b/data/lhc-hxswg/BRU_rules @@ -0,0 +1,67 @@ +================================= +# grand combination has processes +# non-ttH htt: qqH_hww ggH_hww WH_hww WH_htt ZH_hww ZH_htt +# non-ttH hww3l: WH_htt WH_hww +# ttH(bbttww): ttH_[cc,bb,tt,gg,gluglu,ww,zz,zg] +# keep also in mind processes like ggH_SM in two state searches + +# first drop old BR unc implementation from individual analyses +nuisance edit drop * * BRhiggs_htt +nuisance edit drop * * BRhiggs_hvv +nuisance edit drop * * BRhiggs_hzz4l +nuisance edit drop * * CMS_hgg_BR + +# adding nuisances according to +# https://indico.cern.ch/event/317643/contribution/0/material/0/0.pdf#6 + +# Lines come in pairs: +# - first line takes care of all signal names we know only in cards for given decays +# - second line takes care of special signal names that involve the decay and does it in all cards + +#param_alphaS +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ h(ww|zz|gg|tt|zg|mm) param_alphaS lnN 1.012 +nuisance edit add h(tt|ww|zz|zg|gg|mm) * param_alphaS lnN 1.012 +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ hbb param_alphaS lnN 0.989 +nuisance edit add hbb * param_alphaS lnN 0.989 +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ hcc param_alphaS lnN 0.942 +nuisance edit add hcc * param_alphaS lnN 0.942 +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ hgluglu param_alphaS lnN 1.055 +nuisance edit add hgluglu * param_alphaS lnN 1.055 + +#param_mB +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ h(ww|zz|gg|tt|zg|mm|cc|gluglu) param_mB lnN 0.981 +nuisance edit add h(ww|zz|gg|tt|zg|mm|cc|gluglu) * param_mB lnN 0.981 +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ hbb param_mB lnN 1.014 +nuisance edit add hbb * param_mB lnN 1.014 + +#param_mC +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ hcc param_mC lnN 1.062 +nuisance edit add hcc * param_mC lnN 1.062 + +#param_mt + +#HiggsDecayWidthTHU_hqq +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ h(ww|zz|gg|tt|zg|mm|gluglu) HiggsDecayWidthTHU_hqq lnN 0.988 +nuisance edit add h(ww|zz|gg|tt|zg|mm|gluglu) * HiggsDecayWidthTHU_hqq lnN 0.988 +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)$ h(bb|cc) HiggsDecayWidthTHU_hqq lnN 1.008 +nuisance edit add h(bb|cc) * HiggsDecayWidthTHU_hqq lnN 1.008 + +#HiggsDecayWidthTHU_hvv +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ h(ww|zz) HiggsDecayWidthTHU_hvv lnN 1.004 +nuisance edit add h(ww|zz) * HiggsDecayWidthTHU_hvv lnN 1.004 + +#HiggsDecayWidthTHU_hll +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ h(tt|mm) HiggsDecayWidthTHU_hll lnN 1.019 +nuisance edit add h(tt|mm) * HiggsDecayWidthTHU_hll lnN 1.019 + +#HiggsDecayWidthTHU_hgg +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ hgg HiggsDecayWidthTHU_hgg lnN 1.010 +nuisance edit add hgg * HiggsDecayWidthTHU_hgg lnN 1.010 + +#HiggsDecayWidthTHU_hzg +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ hzg HiggsDecayWidthTHU_hzg lnN 1.051 +nuisance edit add hzg * HiggsDecayWidthTHU_hzg lnN 1.051 + +#HiggsDecayWidthTHU_hgluglu +nuisance edit add ^((W|qq|tt|Z|V|gg)H|VBF)(|_SM)$ hgluglu HiggsDecayWidthTHU_hgluglu lnN 1.028 +nuisance edit add hgluglu * HiggsDecayWidthTHU_hgluglu lnN 1.028 diff --git a/python/NuisanceModifier.py b/python/NuisanceModifier.py index 1677f5cb34182..9e4ffc093110a 100644 --- a/python/NuisanceModifier.py +++ b/python/NuisanceModifier.py @@ -21,6 +21,8 @@ def doAddNuisance(datacard, args): if len(args) < 5: raise RuntimeError, "Missing arguments: the syntax is: nuisance edit add process channel name pdf value [ options ]" (process, channel, name, pdf, value) = args[:5] + if process != "*": cprocess = re.compile(process) + if channel != "*": cchannel = re.compile(channel) opts = args[5:] found = False errline = dict([(b,dict([(p,0) for p in datacard.exp[b]])) for b in datacard.bins]) @@ -37,10 +39,10 @@ def doAddNuisance(datacard, args): value = float(value) foundChann, foundProc = False, False for b in errline.keys(): - if channel == "*" or re.match(channel,b): + if channel == "*" or cchannel.search(b): foundChann = True for p in datacard.exp[b]: - if process == "*" or re.match(process,p): + if process == "*" or cprocess.search(p): foundProc = True if p in errline[b] and errline[b][p] not in [ 0.0, 1.0 ]: if "addq" in opts: @@ -60,15 +62,17 @@ def doDropNuisance(datacard, args): if len(args) < 3: raise RuntimeError, "Missing arguments: the syntax is: nuisance edit drop process channel name [ options ]" (process, channel, name) = args[:3] + if process != "*": cprocess = re.compile(process) + if channel != "*": cchannel = re.compile(channel) opts = args[3:] foundProc = False for lsyst,nofloat,pdf,args0,errline in datacard.systs: if re.match(name,lsyst): for b in errline.keys(): - if channel == "*" or re.match(channel,b): + if channel == "*" or cchannel.search(b): #if channel != "*": foundProc = False for p in datacard.exp[b]: - if process == "*" or re.match(process,p): + if process == "*" or cprocess.search(p): foundProc = True errline[b][p] = 0 #if channel != "*" and foundProc == False: @@ -87,6 +91,8 @@ def doRenameNuisance(datacard, args): if len(args) < 4: raise RuntimeError, "Missing arguments: the syntax is: nuisance edit rename process channel oldname newname" (process, channel, oldname, newname) = args[:4] + if process != "*": cprocess = re.compile(process) + if channel != "*": cchannel = re.compile(channel) opts = args[5:] for lsyst,nofloat,pdf0,args0,errline0 in datacard.systs[:]: lsystnew = re.sub(oldname,newname,lsyst) @@ -102,11 +108,11 @@ def doRenameNuisance(datacard, args): datacard.systs.append([lsystnew,nofloat,pdf0,args0,errline2]) foundChann, foundProc = False, False for b in errline0.keys(): - if channel == "*" or re.match(channel,b): + if channel == "*" or cchannel.search(b): foundChann = True if channel != "*": foundProc = False for p in datacard.exp[b].keys(): - if process == "*" or re.match(process,p): + if process == "*" or cprocess.search(p): foundProc = True if p in errline0[b] and errline2[b][p] not in [ 0.0, 1.0 ]: if "addq" in opts: