def __init__(self,datacard,options): ModelBuilder.__init__(self,datacard,options) if not datacard.hasShapes: raise RuntimeError, "You're using a ShapeBuilder for a model that has no shapes" if options.libs: for lib in options.libs: ROOT.gSystem.Load(lib) self.wspnames = {} self.wsp = None
default=-1.0, type="float", help="Threshold below which to ignore a number") (options, args) = parser.parse_args() decays = [x.strip() for x in options.decays.split(",") ] if options.decays != None else SM_HIGGS_DECAYS ## set up some dummy options for the sake of the ModelBuilder options.bin = True options.fileName = "dummy.txt" options.out = "dummy.root" options.cexpr = False ## and create a model builder DC = Datacard() MB = ModelBuilder(DC, options) MB.doVar("MH[%g,110,140]" % options.mass) SMH = SMHiggsBuilder(MB) widthUncertainties = {} widthUncertaintiesKeys = [] for line in open(SMH.brpath + "/WidthUncertainties_126GeV.txt"): if widthUncertaintiesKeys == []: widthUncertaintiesKeys = line.split()[1:] else: fields = line.split() widthUncertainties[fields[0]] = dict([ (k, 0.01 * float(v)) for (k, v) in zip(widthUncertaintiesKeys, fields[1:]) ])
) parser.add_option( "-t", "--threshold", dest="negligible", default=-1.0, type="float", help="Threshold below which to ignore a number" ) (options, args) = parser.parse_args() decays = [x.strip() for x in options.decays.split(",")] if options.decays != None else SM_HIGGS_DECAYS ## set up some dummy options for the sake of the ModelBuilder options.bin = True options.fileName = "dummy.txt" options.out = "dummy.root" options.cexpr = False ## and create a model builder DC = Datacard() MB = ModelBuilder(DC, options) MB.doVar("MH[%g,110,140]" % options.mass) SMH = SMHiggsBuilder(MB) widthUncertainties = {} widthUncertaintiesKeys = [] for line in open(SMH.brpath + "/WidthUncertainties_126GeV.txt"): if widthUncertaintiesKeys == []: widthUncertaintiesKeys = line.split()[1:] else: fields = line.split() widthUncertainties[fields[0]] = dict( [(k, 0.01 * float(v)) for (k, v) in zip(widthUncertaintiesKeys, fields[1:])] ) BRs = {}