Пример #1
0
    if options.error == None:
        print _legend, 'no histogram bin error specified, using default sqrt(value)'
        print _legend, 'exiting...'
        _errors.append(math.sqrt(_bin_value))
    else:
        _errors.append(options.error)

    add_hist.add_new_hist(_file_name, _hist_name, _values, _errors)

if options.rename_hists:
    if len(options.in_file) > 0 and options.out_file:
        for name in options.in_file:
            ds.load_all_hists(name)

    ds.RenameHistograms(options.rename_hists)
    ds.SaveAllHists(options.out_file)

if options.hist_factory:
    import hist_factory as hf
    hf.run(mass=options.mass, in_file=options.in_file)

if options.toys_pvalue or options.toys:
    import tprime_toys as tt
    par = {}
    if options.toys:
        par['study'] = options.toys.strip()
    pvalue = tt.RunToy(par)
    print legend, 'p-value from a toy:', pvalue

if options.fit: