#!/usr/bin/env python import math,ROOT, sys import collections from array import array import numpy as np from setTDRStyle import * from ROOT import gROOT, TFile, TChain, TTree, TH1F, TF1, TLegend, TCanvas, gStyle, TH2F gROOT.Reset() gROOT.SetBatch() setTDRStyle() gROOT.ForceStyle() gROOT.SetStyle('tdrStyle') gStyle.SetOptStat(0) def grabTriggerNumbers( file, xs, PU ): txtFile = open( file ) tmpList = [] completeList = [] with txtFile as fh: for line in fh: tmpList.append( line.split() ) for j in tmpList: rate, rateErr = GetRates( float(j[1]), float(j[2]), xs, PU ) completeList.append( [ j[0], int(j[1]), int(j[2]), int(j[3]), rate, rateErr ] )
if not '-b' in sys.argv: sys.argv.append('-b') from ROOT import * from setTDRStyle import * from array import array from errorLists import * import itertools import ROOT import glob import os gStyle.SetOptStat(0) gStyle.SetOptTitle(0) setTDRStyle() gStyle.SetErrorX(0.5) AllowedRegions = [ '1j0t', '1j1t', '1jNoTagging', '2j0t', '2j1t', '2j2t', '2jNoTagging', '3plusjNoTagging', '1j1tZpeak', 'ZpeakLepSel', '2plusjets1plustag', '3plusjets1plustag', 'tree1j1tNomllMetCut' ] region = '1j1t' runPicked = False RunA = False RunB = False RunC = False TotalLumi = 0.