Пример #1
0
def getChain( sample, mass, path, tag='Data2011', tname='latino' ):
    import ROOT
    files = []
    try:
        all = hwwinfo.samples(mass, tag)
        files = all[sample]
    except Exception as e:
        print 'Exception',e
        return None

    chain = ROOT.TChain(tname)
    for f in files: chain.Add(os.path.join(path,f))

    return chain
Пример #2
0
def getChain(sample, mass, path, tag='Data2011', tname='latino'):
    import ROOT
    files = []
    try:
        all = hwwinfo.samples(mass, tag)
        files = all[sample]
    except Exception as e:
        print 'Exception', e
        return None

    chain = ROOT.TChain(tname)
    for f in files:
        chain.Add(os.path.join(path, f))

    return chain
Пример #3
0
parser.add_option('-s', '--scan', dest='scan', default=None)
parser.add_option('-o', '--opts', dest='opts', default='')
parser.add_option('--bdt', dest='bdtnjet', default=None)
parser.add_option('-l', '--log', dest='log', default=None)
parser.add_option('--treepath', dest='treepath', default='.')
parser.add_option('--bdtpath', dest='bdtpath', default='.')

(opt, args) = parser.parse_args()

if not args or len(args) < 2:
    parser.error('Il cut, deficiente!')

mass = int(args[0])
cut = args[1]

processes = hwwinfo.samples(mass)

treepath = '/shome/thea/HWW/ShapeAnalysis/trees/latino_skim/all/'
bdtpathtmpl = '/shome/thea/HWW/ShapeAnalysis/trees/bdt_skim/ntupleMVA_MH{mass}_njet{njet}/all/'

selections = hwwinfo.massSelections(mass)
sel = selections[cut]
if opt.extra:
    sel = '(' + sel + ')' + opt.extra

print '-' * 80
print selections[cut]
print '-' * 80
chains = {}
for process in sorted(processes):
    if process != 'Data': continue
Пример #4
0
parser.add_option('-o','--opts',dest='opts',default='')
parser.add_option('--bdt',dest='bdtnjet',default=None)
parser.add_option('-l','--log',dest='log',default=None)
parser.add_option('--treepath',dest='treepath',default='.')
parser.add_option('--bdtpath',dest='bdtpath',default='.')

(opt, args) = parser.parse_args()

if not args or len(args) < 2:
    parser.error('Il cut, deficiente!')

mass = int(args[0])
cut = args[1]


processes = hwwinfo.samples(mass)

treepath = '/shome/thea/HWW/ShapeAnalysis/trees/latino_skim/all/'
bdtpathtmpl = '/shome/thea/HWW/ShapeAnalysis/trees/bdt_skim/ntupleMVA_MH{mass}_njet{njet}/all/'

selections = hwwinfo.massSelections(mass)
sel = selections[cut]
if opt.extra:
    sel = '('+sel+')'+opt.extra

print '-'*80
print selections[cut]
print '-'*80
chains = {}
for process in sorted(processes):
    if process != 'Data': continue