Beispiel #1
0
if options.ismc and sgf:        # consistency check
    print 'Cannot calculate significance with MC, will calc only eff'
    sgf = False

# for convenience
istmva = options.istmva
ismc = options.ismc
isdata = options.isdata
classifier = options.classifier

from utils import session_from_path
prefix = 'plots/{}'
if options.session:
    prefix = prefix.format(options.session)
else:
    prefix = prefix.format(session_from_path(options.rfile))


from fixes import ROOT
ROOT.gROOT.SetBatch(options.batch)

cltitle = {
    'BDTB': 'BDT cuts (w/ bagging)',
    'BDTG': 'BDT cuts (w/ gradient boost)',
    'BDTGResponse_1': 'Old BDT cuts (w/ gradient boost)'
}

# read tree
if options.tree:
    tree = options.tree
else:
Beispiel #2
0
from utils import plot_conf
rfiles = plot_conf(options.yamlfile, options.schema, options.files)
if not rfiles:
    sys.exit('Config parsing error.')

from rplot.rdir import Rdir
fnames = [rfile[0]['file'] for rfile in rfiles]
pathtool = Rdir(fnames)

# FIXME: only processes first file
rfileconf = rfiles[0]

# guess session from file name
from utils import session_from_path
session = session_from_path(rfileconf[0]['file'])
prefix = 'plots/{}'.format(session)

from config import transforms

from fnmatch import fnmatchcase
if options.transglob:
    # only process matching transforms
    for key in transforms:
        if not fnmatchcase(key, options.transglob):
            del transforms[key]

from fixes import ROOT
ROOT.gROOT.SetBatch(options.batch)
ROOT.gStyle.SetOptTitle(options.title)
Beispiel #3
0
if options.ismc and sgf:  # consistency check
    print 'Cannot calculate significance with MC, will calc only eff'
    sgf = False

# for convenience
istmva = options.istmva
ismc = options.ismc
isdata = options.isdata
classifier = options.classifier

from utils import session_from_path
prefix = 'plots/{}'
if options.session:
    prefix = prefix.format(options.session)
else:
    prefix = prefix.format(session_from_path(options.rfile))

from fixes import ROOT
ROOT.gROOT.SetBatch(options.batch)

cltitle = {
    'BDTB': 'BDT cuts (w/ bagging)',
    'BDTG': 'BDT cuts (w/ gradient boost)',
    'BDTGResponse_1': 'Old BDT cuts (w/ gradient boost)'
}

# read tree
if options.tree:
    tree = options.tree
else:
    tree = 'TestTree' if options.istmva else 'DecayTree'