import os import ROOT import JPsi.MuMu.common.r9Chains as chains import JPsi.MuMu.common.cmsstyle as cmsstyle labels = """ Endcaps Flat p_{T} gun E^{#gamma}_{T} #in [10, 100] GeV """.split( "\n" ) trees = [chains.getChains("v1")[i] for i in "g93p01 g94cms g94p02".split()] for i, t in enumerate(trees): t.SetAlias("brem", "scPhiWidth/scEtaWidth") t.Draw("brem>>h%d(30,0,15)" % i, "r9 < 0.94 & 1.16 < abs(eta) & abs(eta) < 1.44") histos = [ROOT.gDirectory.Get("h%d" % i) for i in range(len(trees))] for h in histos: h.Sumw2() h.Scale(200.0 / h.Integral(1, 100)) h.GetXaxis().SetTitle("photon R_{9}") h.GetYaxis().SetTitle("a.u.") h.SetTitle("") h.SetStats(0) histos[0].SetLineColor(ROOT.kRed) histos[1].SetLineColor(ROOT.kBlack)
import copy import ROOT import JPsi.MuMu.common.r9Chains as r9Chains import JPsi.MuMu.common.canvases as canvases import JPsi.MuMu.common.cmsstyle as cmsstyle from JPsi.MuMu.common.plotter import Plotter canvases.wwidth = 500 chains = r9Chains.getChains('v1') plots = [] ROOT.gStyle.SetTitleOffset(1.25, "Y") # ROOT.gStyle.SetPadRightMargin(0.02) # ROOT.gStyle.SetPadLeftMargin(0.15) # ROOT.gStyle.SetPadTopMargin(0.02) ### Configuration plot = Plotter( cuts = [ '!isEBEtaGap', '!isEBPhiGap', ## Module +4 '1.16 < scEta & scEta < 1.44', ], expression = '100*(scRawE / genE - 1)', binning = '50,-10,10', name = 'mp4', title = '',
import copy import ROOT import JPsi.MuMu.common.r9Chains as r9Chains import JPsi.MuMu.common.canvases as canvases import JPsi.MuMu.common.cmsstyle as cmsstyle from JPsi.MuMu.common.plotter import Plotter canvases.wwidth = 700 chains = r9Chains.getChains('v1') plots = [] ROOT.gStyle.SetTitleOffset(1.25, "Y") # ROOT.gStyle.SetPadRightMargin(0.02) # ROOT.gStyle.SetPadLeftMargin(0.15) # ROOT.gStyle.SetPadTopMargin(0.02) ### Configuration plot = Plotter( cuts=[ '!isEBEtaGap', '!isEBPhiGap', '!isEBEEGap', ## Module +4 # '1.16 < scEta & scEta < 1.44', ## Barrel 'isEB', ], expression='r9',