help="type of plot you want to make: mjj, log10") parser.add_option("-F", "--format", dest="format", default="pdf", help="outut format for the plot: pdf, root, png, C, jpg, etc.") (opts, args) = parser.parse_args(argv) if opts.config =="": opts.config = "config" from myutils import BetterConfigParser, printc, ParseInfo, mvainfo, StackMaker, HistoMaker print opts.config opts.config.append('8TeVconfig/vhbbPlotDef.ini') config = BetterConfigParser() config.read(opts.config) TdrStyles.tdrStyle() def get_s_or_b(fName,binmin,binmax,sb): s=0 b=0 if isinstance(fName,str): histos = get_th1(fName) else: histos = [fName] for histo in histos: if 'data' in histo.GetName(): continue for i in range(binmin,binmax+1): if 'VH' in histo.GetName(): s+=histo.GetBinContent(i) else:
dest="format", default="pdf", help="outut format for the plot: pdf, root, png, C, jpg, etc.") (opts, args) = parser.parse_args(argv) if opts.config == "": opts.config = "config" from myutils import BetterConfigParser, printc, ParseInfo, mvainfo, StackMaker, HistoMaker opts.config.append('13TeVconfig/plots') opts.config.append('13TeVconfig/configPlot_vars') opts.config.append('13TeVconfig/paths') config = BetterConfigParser() config.read(opts.config) TdrStyles.tdrStyle() def get_s_or_b(fName, binmin, binmax, sb): #print '\n\n-----> Running def get_s_or_b()...' #print 'fname:', fName #print 'binmin:', binmin #print 'binmax:', binmax #print 's or b:', sb s = 0 b = 0 if isinstance(fName, str): #histos = get_th1(fName)