"E0", Dir="mt_jecUncNom_tauEsNom", fillcolor=0, linecolor=1, cuts=Cuts) """ stack """ RF2 = "phi_stacked.root" g = ROOT.TFile(RF2, "recreate") g.Close() List = ["dphi/QCD", "dphi/WJ", "dphi/TTJ", "dphi/VV", "dphi/ZTT", "dphi/ZLL"] LegendList = ["QCD", "W+Jets", "tt+jets", "Di-boson", "Z->tautau", "Z->ll"] Data = "dphi/data_obs_errorbar" Datalegend = "SM-Data" stackedhist(RF, RF2, "phistacked", List, LegendList, data=Data, datalegend=Datalegend, title="phi_stacked", xtitle="delta_phi", maximum=700, savename="dphi_2015.png")
List = ["QCD", "WJ", "TTJ", "ZTT", "VV", "ZLL", "qqH", "WH", "ZH"] LegendList = [ "QCD", "W+Jets", "tt+jets", "Z->tautau", "Z->ll", "qqH", "WH", "ZH" ] Signallistsm = ["dphi_postfit/TotalSig"] smlegend = ["sm"] Signallistmm = ["dphi_postfit/ggH125_050"] mmlegend = ["maxmixing"] Signallistpc = ["dphi_postfit/ggH125_100"] pclegend = ["pseudoscalar"] Data = "dphi_postfit/data_obs" Datalegend = "SM-Data" stackedhist(RF, RF2, "phistacked", List, "dphi_postfit", Signallistsm, smlegend, data=Data, datalegend=Datalegend, title="phitt_stacked", xtitle="delta_phi", maximum=150, savename="dphitt_postfit_2016sm.png")
Signallistmm = ["dphi/ggH125_050"] mmlegend = ["maxmixing"] Signallistpc = ["dphi/ggH125_100"] pclegend = ["pseudoscalar"] Data = "dphi/data_obs" Datalegend = "SM-Data" stackedhist(RF, RF2, "phistacked", List, LegendList, Signallistsm, smlegend, data=Data, datalegend=Datalegend, title="phi_stacked", xtitle="delta_phi", maximum=600, savename="dphi_2016sm.png") stackedhist(RF, RF2, "phistacked", List, LegendList, Signallistmm, mmlegend, data=Data,
#!/usr/bin/env python # -*- coding: utf-8 -*- import ROOT ROOT.gROOT.SetBatch(True) #from bachelorarbeit.code.histfunction import hist #from bachelorarbeit.code.stacked_hist import stackedhist from bachelorarbeit.code.stacked_hist import stackedhist RF = "stacked_phi.root" g = ROOT.TFile(RF, "recreate") g.Close() ROOTfile = "deltaphi.root" List = ["test2/data", "test2/data2"] LegendList = ["m1", "m2"] print stackedhist(ROOTfile, RF, "phistacked", List, LegendList, List, LegendList, title="mass_stacked", xtitle="mass(GeV)")