Example #1
0
dataPlotters=[singleMuA,singleMuB,singleEleA,singleEleB,jetA,jetB]


dataEMUPlotters=[singleMuA,singleMuB,singleEleA,singleEleB]
dataJetPlotters=[jetA,jetB]
dataMETPlotters=[metA,metB]



WWLNUJJ = TreePlotter('samples/BulkGravToWWToWlepWhad_narrow_4000.root','tree')
WWLNUJJ.setupFromFile('samples/BulkGravToWWToWlepWhad_narrow_4000.pck')
WWLNUJJ.addCorrectionFactor('xsec','tree')
WWLNUJJ.addCorrectionFactor('genWeight','tree')
WWLNUJJ.addCorrectionFactor('puWeight','tree')
WWLNUJJ.setFillProperties(0,ROOT.kWhite)
WWLNUJJ.setLineProperties(1,ROOT.kRed,3)


WZLNUJJ = TreePlotter('samples/WprimeToWZ_narrow_4000.root','tree')
WZLNUJJ.setupFromFile('samples/WprimeToWZ_narrow_4000.pck')
WZLNUJJ.addCorrectionFactor('3*xsec','tree')
WZLNUJJ.addCorrectionFactor('genWeight','tree')
WZLNUJJ.addCorrectionFactor('puWeight','tree')
WZLNUJJ.setFillProperties(0,ROOT.kWhite)
WZLNUJJ.setLineProperties(1,ROOT.kGreen+3,3)

WHLNUJJ = TreePlotter('samples/WprimeToWhToWlephbb_narrow_4000.root','tree')
WHLNUJJ.setupFromFile('samples/WprimeToWhToWlephbb_narrow_4000.pck')
WHLNUJJ.addCorrectionFactor('xsec','tree')
WHLNUJJ.addCorrectionFactor('genWeight','tree')
Example #2
0
import ROOT

from CMGTools.VVResonances.plotting.TreePlotter import TreePlotter
from CMGTools.VVResonances.plotting.MergedPlotter import MergedPlotter
from CMGTools.VVResonances.plotting.StackPlotter import StackPlotter
 

#create the W+jets plotters
wjPlotters=[]


WJets = TreePlotter('samples/WJetsToLNu_50ns.root','tree')
WJets.setupFromFile('samples/WJetsToLNu_50ns.pck')
WJets.addCorrectionFactor('xsec','xsec',0.0,'lnN')
WJets.addCorrectionFactor('genWeight','genWeight',0.0,'lnN')
WJets.setFillProperties(1001,ROOT.kAzure-9)



TTJets = TreePlotter('samples/TTJets_50ns.root','tree')
TTJets.setupFromFile('samples/TTJets_50ns.pck')
TTJets.addCorrectionFactor('xsec','xsec',0.0,'lnN')
TTJets.addCorrectionFactor('genWeight','genWeight',0.0,'lnN')
TTJets.setFillProperties(1001,ROOT.kGreen-5)



qcdPlotters=[]

for sample in [
"QCD_Pt1000to1400_50ns","QCD_Pt120to170_50ns","QCD_Pt1400to1800_50ns","QCD_Pt170to300_50ns","QCD_Pt1800to2400_50ns","QCD_Pt2400to3200_50ns","QCD_Pt300to470_50ns","QCD_Pt3200_50ns","QCD_Pt470to600_50ns","QCD_Pt600to800_50ns","QCD_Pt800to1000_50ns","QCD_Pt80to120_50ns"
Example #3
0
import ROOT

from CMGTools.VVResonances.plotting.TreePlotter import TreePlotter
from CMGTools.VVResonances.plotting.MergedPlotter import MergedPlotter
from CMGTools.VVResonances.plotting.StackPlotter import StackPlotter

#create the W+jets plotters
wjPlotters = []

WJets = TreePlotter('samples/WJetsToLNu_50ns.root', 'tree')
WJets.setupFromFile('samples/WJetsToLNu_50ns.pck')
WJets.addCorrectionFactor('xsec', 'xsec', 0.0, 'lnN')
WJets.addCorrectionFactor('genWeight', 'genWeight', 0.0, 'lnN')
WJets.setFillProperties(1001, ROOT.kAzure - 9)

TTJets = TreePlotter('samples/TTJets_50ns.root', 'tree')
TTJets.setupFromFile('samples/TTJets_50ns.pck')
TTJets.addCorrectionFactor('xsec', 'xsec', 0.0, 'lnN')
TTJets.addCorrectionFactor('genWeight', 'genWeight', 0.0, 'lnN')
TTJets.setFillProperties(1001, ROOT.kGreen - 5)

qcdPlotters = []

for sample in [
        "QCD_Pt1000to1400_50ns", "QCD_Pt120to170_50ns",
        "QCD_Pt1400to1800_50ns", "QCD_Pt170to300_50ns",
        "QCD_Pt1800to2400_50ns", "QCD_Pt2400to3200_50ns",
        "QCD_Pt300to470_50ns", "QCD_Pt3200_50ns", "QCD_Pt470to600_50ns",
        "QCD_Pt600to800_50ns", "QCD_Pt800to1000_50ns", "QCD_Pt80to120_50ns"
]:
    qcdPlotters.append(TreePlotter('samples/' + sample + '.root', 'tree'))
Example #4
0
singleMu = TreePlotter('samples/SingleMuon_Run2015D_16Dec.root', 'tree')
singleEle = TreePlotter('samples/SingleElectron_Run2015D_16Dec.root', 'tree')
jet = TreePlotter('samples/JetHT_Run2015D_16Dec.root', 'tree')
met = TreePlotter('samples/MET_Run2015D_16Dec.root', 'tree')

dataEMUPlotters = [singleMu, singleEle]
dataJetPlotters = [jet]
dataMETPlotters = [met]

WWLNUJJ = TreePlotter('samples/BulkGravToWWToWlepWhad_narrow_4000.root',
                      'tree')
WWLNUJJ.setupFromFile('samples/BulkGravToWWToWlepWhad_narrow_4000.pck')
WWLNUJJ.addCorrectionFactor('xsec', 'tree')
WWLNUJJ.addCorrectionFactor('genWeight', 'tree')
WWLNUJJ.addCorrectionFactor('puWeight', 'tree')
WWLNUJJ.setFillProperties(0, ROOT.kWhite)
WWLNUJJ.setLineProperties(1, ROOT.kRed, 3)

WZLNUJJ = TreePlotter('samples/WprimeToWZToWlepZhad_narrow_1000.root', 'tree')
WZLNUJJ.setupFromFile('samples/WprimeToWZToWlepZhad_narrow_1000.pck')
WZLNUJJ.addCorrectionFactor('xsec', 'tree')
WZLNUJJ.addCorrectionFactor('genWeight', 'tree')
WZLNUJJ.addCorrectionFactor('puWeight', 'tree')
WZLNUJJ.setFillProperties(0, ROOT.kWhite)
WZLNUJJ.setLineProperties(1, ROOT.kGreen + 3, 3)

WHLNUJJ = TreePlotter('samples/WprimeToWhToWlephbb_narrow_4000.root', 'tree')
WHLNUJJ.setupFromFile('samples/WprimeToWhToWlephbb_narrow_4000.pck')
WHLNUJJ.addCorrectionFactor('xsec', 'tree')
WHLNUJJ.addCorrectionFactor('genWeight', 'tree')
WHLNUJJ.addCorrectionFactor('puWeight', 'tree')
Example #5
0
import ROOT

from CMGTools.VVResonances.plotting.TreePlotter import TreePlotter
from CMGTools.VVResonances.plotting.StackPlotter import StackPlotter
 
ROOT.gROOT.ProcessLine('.x tdrstyle.C')



w = TreePlotter('samples/W.root','tree')
w.addCorrectionFactor('xsec','xsec',0.0,'lnN')
w.addCorrectionFactor('mc','l_mcPt>0',0.0,'lnN')
w.setFillProperties(0,ROOT.kWhite)
w.setLineProperties(1,ROOT.kOrange+10,3)

qcd = TreePlotter('samples/W.root','tree')
qcd.addCorrectionFactor('xsec','xsec',0.0,'lnN')
qcd.addCorrectionFactor('mc','l_mcPt==0',0.0,'lnN')
qcd.setFillProperties(3003,ROOT.kBlue)
qcd.setLineProperties(1,ROOT.kBlue,3)




#Stack
lStack = StackPlotter()
lStack.addPlotter(qcd,"QCD","Non prompt","background")
lStack.addPlotter(w,"Prompt_leptons","Prompt","signal")
Example #6
0
from CMGTools.VVResonances.plotting.TreePlotter import TreePlotter
from CMGTools.VVResonances.plotting.MergedPlotter import MergedPlotter
from CMGTools.VVResonances.plotting.StackPlotter import StackPlotter

#create the W+jets plotters
wjPlotters = []

for sample in [
        'WJetsToLNu_HT100to200', 'WJetsToLNu_HT200to400',
        'WJetsToLNu_HT400to600', 'WJetsToLNu_HT600toInf'
]:
    wjPlotters.append(TreePlotter('samples/' + sample + '.root', 'tree'))
    wjPlotters[-1].setupFromFile('samples/' + sample + '.pck')
    wjPlotters[-1].addCorrectionFactor('xsec', 'xsec', 0.0, 'lnN')

WJets = MergedPlotter(wjPlotters)

WJets.setFillProperties(1001, ROOT.kAzure - 9)

RSGWWLNuQQ = TreePlotter('samples/RSGravToWWToLNQQ_2000.root', 'tree')
RSGWWLNuQQ.setupFromFile('samples/RSGravToWWToLNQQ_2000.pck')
RSGWWLNuQQ.setFillProperties(0, ROOT.kWhite)
RSGWWLNuQQ.setLineProperties(1, ROOT.kOrange + 10, 3)
#RSGWWLNuQQ..addCorrectionFactor('xsec',0.001,0.0,'lnN')

#Stack
vvStack = StackPlotter()
vvStack.addPlotter(WJets, "W+jets", "W+Jets", "background")
vvStack.addPlotter(RSGWWLNuQQ, "RSG2000", "RSGWW #rightarrow l#nu QQ",
                   "signal")
Example #7
0
for sample in ['WWTo1L1Nu2Q', 'WZTo1L1Nu2Q']:
    vvPlotters.append(TreePlotter('samples/' + sample + '.root', 'tree'))
    vvPlotters[-1].setupFromFile('samples/' + sample + '.pck')
    vvPlotters[-1].addCorrectionFactor('xsec', 'tree')
    vvPlotters[-1].addCorrectionFactor('genWeight', 'tree')
    vvPlotters[-1].addCorrectionFactor('puWeight', 'tree')

vv = MergedPlotter(vvPlotters)

WWLNUJJ = TreePlotter('samples/VBF_RadionToWW_narrow_3000.root', 'tree')
WWLNUJJ.setupFromFile('samples/VBF_RadionToWW_narrow_3000.pck')
WWLNUJJ.addCorrectionFactor('xsec', 'tree')
WWLNUJJ.addCorrectionFactor(100, 'flat')
WWLNUJJ.addCorrectionFactor('genWeight', 'tree')
WWLNUJJ.addCorrectionFactor('puWeight', 'tree')
WWLNUJJ.setFillProperties(0, ROOT.kWhite)
WWLNUJJ.setLineProperties(1, ROOT.kRed, 3)

#Fill properties
WJets.setFillProperties(1001, ROOT.kAzure - 9)
vv.setFillProperties(1001, ROOT.kOrange)
ttO.setFillProperties(1001, ROOT.kSpring - 5)
ttM.setFillProperties(1001, ROOT.kTeal - 1)
#ZJets.setFillProperties(1001,ROOT.kAzure+5)
#GJets.setFillProperties(1001,ROOT.kYellow)
QCD.setFillProperties(1001, ROOT.kGray)

data = MergedPlotter(dataPlotters)

#Stack for lnu+J
lnujjStack = StackPlotter()
Example #8
0
from CMGTools.VVResonances.plotting.StackPlotter import StackPlotter
 

#create the W+jets plotters
wjPlotters=[]


for sample in ['WJetsToLNu_HT100to200','WJetsToLNu_HT200to400','WJetsToLNu_HT400to600','WJetsToLNu_HT600toInf']:
    wjPlotters.append(TreePlotter('samples/'+sample+'.root','tree'))
    wjPlotters[-1].setupFromFile('samples/'+sample+'.pck')
    wjPlotters[-1].addCorrectionFactor('xsec','xsec',0.0,'lnN')
    wjPlotters[-1].addCorrectionFactor('genWeight','genWeight',0.0,'lnN')


WJets = MergedPlotter(wjPlotters)


WJets.setFillProperties(1001,ROOT.kAzure-9)

RSGWWLNuQQ = TreePlotter('samples/RSGravToWWToLNQQ_kMpl01_2500.root','tree')
RSGWWLNuQQ.setupFromFile('samples/RSGravToWWToLNQQ_kMpl01_2500.pck')
RSGWWLNuQQ.setFillProperties(0,ROOT.kWhite)
RSGWWLNuQQ.setLineProperties(1,ROOT.kOrange+10,3)
RSGWWLNuQQ.addCorrectionFactor('xsec',0.001,0.0,'lnN')


#Stack
vvStack = StackPlotter()
vvStack.addPlotter(WJets,"W+jets","W+Jets","background")
vvStack.addPlotter(RSGWWLNuQQ,"RSG2000","RSGWW #rightarrow l#nu QQ","signal")
Example #9
0
singleEleA = TreePlotter('samples/SingleElectron_Run2015D_05Oct.root', 'tree')
singleEleB = TreePlotter('samples/SingleElectron_Run2015D_v4.root', 'tree')
jetA = TreePlotter('samples/JetHT_Run2015D_05Oct.root', 'tree')
jetB = TreePlotter('samples/JetHT_Run2015D_v4.root', 'tree')
metA = TreePlotter('samples/MET_Run2015D_05Oct.root', 'tree')
metB = TreePlotter('samples/MET_Run2015D_v4.root', 'tree')

dataPlotters = [singleMuA, singleMuB, singleEleA, singleEleB, jetA, jetB]

dataEMUPlotters = [singleMuA, singleMuB, singleEleA, singleEleB]
dataJetPlotters = [jetA, jetB]
dataMETPlotters = [metA, metB]

#Fill properties
WJets.setFillProperties(1001, ROOT.kAzure - 9)
tt.setFillProperties(1001, ROOT.kGreen - 5)
ZJets.setFillProperties(1001, ROOT.kAzure + 5)
GJets.setFillProperties(1001, ROOT.kYellow)
QCD.setFillProperties(1001, ROOT.kGray)

dataEMU = MergedPlotter(dataEMUPlotters)
dataJet = MergedPlotter(dataJetPlotters)

#Stack for lnu+J
lnujjStack = StackPlotter()
lnujjStack.addPlotter(QCD, "QCD", "QCD multijet", "background")
lnujjStack.addPlotter(GJets, "GJets", "#gamma+Jets", "background")
lnujjStack.addPlotter(tt, "tt", "t#bar{t}", "background")
lnujjStack.addPlotter(WJets, "WJets", "W+Jets", "background")
lnujjStack.addPlotter(dataEMU, "data_obs", "Data", "data")