nbtags_stack = getStack( labels={'x':'number of b-tags (CSVM)','y':'Number of Events'}, var={'name':'nBTags','TTreeFormula':"Sum$(Jet_pt>30&&abs(Jet_eta)<2.4&&Jet_id&&Jet_btagCSV>0.890)", 'overFlow':'upper'}, binning={'binning':[8,0,8]}, cut={'string':cutString,'func':cutFunc, 'dataCut':dataCut}) allStacks.append(nbtags_stack) njets_stack = getStack( labels={'x':'number of jets','y':'Number of Events'}, var={'name':'njets','TTreeFormula':'Sum$(Jet_pt>30&&abs(Jet_eta)<2.4&&Jet_id)', 'overFlow':'upper'}, binning={'binning':[14,0,14]}, cut={'string':cutString,'func':cutFunc, 'dataCut':dataCut}) allStacks.append(njets_stack) nVert_stack = getStack( labels={'x':'vertex multiplicity','y':'Number of Events'}, var={'name':'nVert','leaf':"nVert", 'overFlow':'upper'}, binning={'binning':[50,0,50]}, cut={'string':cutString,'func':cutFunc, 'dataCut':dataCut}) allStacks.append(nVert_stack) loopAndFill(allStacks) if not os.path.exists(path): os.makedirs(path) stuff=[] for stk in allStacks: stuff.append(drawNMStacks(1,1,[stk], path=path, filename=stk.options['fileName']))
labels={'x':'jetDR (ele)','y':'Number of Events'}, var={'name':'LepGood_jetDR_ele','string':"LepGood_jetDR", 'overFlow':'both', 'branches':[]}, binning={'binning':[42,0,0.42]}, cut={'string':cutStringEle+"&&"+getEleCut()}, qcdSample=QCD_EMbcToE ) allStacks.append(ele_jetDR_stack) if opts.plot=='lostHits': ele_lostHits_stack = getStack( labels={'x':'lostHits (ele)','y':'Number of Events'}, var={'name':'LepGood_lostHits_ele','string':"LepGood_lostHits", 'overFlow':'both', 'branches':[]}, binning={'binning':[5,0,5]}, cut={'string':cutStringEle+"&&"+getEleCut()}, qcdSample=QCD_EMbcToE ) allStacks.append(ele_lostHits_stack) if len(allStacks)==0: print "Don't know what to do with channel: %s and plot: %s"%(opts.channel, opts.plot) loopAndFill(allStacks, mode='draw') path = '/'.join([plotDir, subdir, prefix]) print "path",path if not os.path.exists(path): os.makedirs(path) stuff=[] for stk in allStacks: stuff.append(drawNMStacks(1,1,[stk], path=path, filename=stk.options['fileName']))
}) allStacks.append(njets_stack) nVert_stack = getStack(labels={ 'x': 'vertex multiplicity', 'y': 'Number of Events' }, var={ 'name': 'nVert', 'leaf': "nVert", 'overFlow': 'upper' }, binning={'binning': [50, 0, 50]}, cut={ 'string': cutString, 'func': cutFunc, 'dataCut': dataCut }) allStacks.append(nVert_stack) loopAndFill(allStacks) if not os.path.exists(path): os.makedirs(path) stuff = [] for stk in allStacks: stuff.append( drawNMStacks(1, 1, [stk], path=path, filename=stk.options['fileName']))