Example #1
0
import sys
import glob

import slideMaker as sm

# test2 and test3 can be folders with your plots, so you can execute this script anywhere really
sm.addGlobalOptions("--graphicspaths ../yield_plots/")

# sm.initSlides(me="Nick",themeName="alex",opts="--casual Nick --themecolor random --font gillius")
sm.initSlides(me="Nick",themeName="alex",opts="--casual Nick --themecolor 81,73,69 --font gillius")
sm.addSlide(title="SS: 74X vs 76X ", opts="")

# samples = [
# "TChiChi_mChi-150_mLSP-1",
# "TChiNeu_mChi-300_mLSP-285",
# "TChiNeu_mChi-300_mLSP-290",
# "TChiNeu_mChi-300_mLSP-295",
# "TChiNeu_mChi-300_mLSP-297",
# "TChiNeu_mChi-300_mLSP-299",
# ]

# plot_types = [
#         "mChi", "chargino daughters", "W daughters", "met", "pfjet pt", "pfjet eta"
#         ]



plot_types = [
        ["HH"          , "high_yields.pdf"   , "high_yields_76x.pdf"]   ,
        ["HL"          , "hl_yields.pdf"     , "hl_yields_76x.pdf"]     ,
        ["$H_T$"       , "kinem_ht_.pdf"     , "kinem_ht__76x.pdf"]     ,
Example #2
0
import slideMaker as sm
import fnmatch
import os
import utils

#PATH=/nfs-7/texlive/2015/bin/x86_64-linux:$PATH
#export PYTHONPATH=$PYTHONPATH:/home/users/cgeorge/software/slideMaker/

t = "madrid"

exprs = {'_mm_OS', '_ee_OS', '_em_OS', '_all_SF', '_all_EZ', '_all_SS'}
#exprs = {'_all_SF','_all_EZ','_all_SS'}

for expr in exprs:
    sm.initSlides(me="GC", themeName=t, opts="--themecolor 51,51,179")
    for file in os.listdir('.'):
        if fnmatch.fnmatch(file, '*' + expr + '.pdf'):
            print file
            sm.addSlide(p1=file)
    sm.writeSlides("kinem_plot_dump" + expr + ".tex", opts="--compile --copy")
Example #3
0
"""

sm.addObject("t1","text",(0.25,0.15),width=0.3, text="testlabel", color="red", size=0, bold=False,opts="--rotate -45") 
sm.addObject("t2","text",(0.75,0.15),width=0.3, text="testlabel", color="coolblue", size=0, bold=False) 
sm.addObject("a1","arrow", (0.31,0.15), (0.69,0.15))
sm.addObject("a2","arrow", (0.31,0.15), (0.65,0.46), opts="--crayon --noarrowhead")

sm.addObject("a0","arrow")
sm.addObject("c0","circle")

# supported themes are "nick", "alex", and "madrid"
# test2 and test3 can be folders with your plots, so you can execute this script anywhere really
# themecolor takes RGB. could put in explicit color names, but RGB more robust
# also try the --modernfont option
sm.initSlides(me="Nick",themeName="nick",opts="--graphicspaths ./test2/,./test3/ --themecolor 51,51,179")
sm.addSlide(title="Perturbation Theory on $H_m(dS_n,\\mathbb{R})$ Orbifolds", opts="--shorttitle snarxiv hep-th")

# pass in a list of textobjects (which are just dicts, so they can be modified too)
sm.addSlide(p1="yields.pdf",p2="yields.pdf", objects=["t1","t2","a1","a2"])
sm.addSlide(p1="yields.pdf",p2="yields.pdf")

# when I specify an empty object, a helper grid gets printed on the slide if I've specified
# the global option "--makegrid". A gui is produced if I specify "--makegui" instead
sm.addSlide(p1="zmass.pdf", objects=["a0","c0"])
sm.addSlide(text=content+content)

# slides reset their numbering when you start the backup section
sm.startBackup()
sm.addSlide(text=content, p1="filt.pdf", opts="--sidebyside")
sm.addSlide(text=content, p1="zmass.pdf", p2="zmass.pdf")
Example #4
0
import sys, os
import slideMaker as sm
import tableMaker as tm

sm.addGlobalOptions("--graphicspaths /home/users/namin/2015/fr/CMSSW_7_4_1_patch1/src/testing/SSAnalysis/WZRun2/pdfs_before/")

sm.initSlides(me="Nick",themeName="alex",opts="--themecolor 13,26,129")
sm.addSlide(title="WZ Scale Factor ENDL With 832.7 pb$^{-1} (OLD)$", opts="")

sm.addSlide(title="Overview", text="""
        - Using latest json with 832 pb$^{-1}$
        - Construct \\coolblue{WZ control region} with baseline requirement of $\\met > 30$ and Njets$>2$ and
          -- 3 tight leptons
          -- Pair of leptons has $|m_{\\ell\\ell}-m_Z|\\leq15$
          -- Njets$<5$
          -- 0 btags
          -- in the HighHigh region (each lepton has $\\pt>25$)
""")

sm.addSlide(p1="h1D_njets.pdf", p2="h1D_nbtags.pdf", title="N-1 plots: njets, nbtags")
sm.addSlide(p1="h1D_lep1pt.pdf", p2="h1D_lep2pt.pdf", title="N-1 plots: lepton $\\pt$")

sm.addSlide(p1="h1D_met.pdf", p2="h1D_mtmin.pdf", title="CR plots: $\\met$, $\\mtmin$")
sm.addSlide(p1="h1D_ht.pdf", p2="h1D_zmass.pdf", title="CR plots: $\\Ht$, $m_{\\ell\\ell}$")

# DATA
# data = 14.00 pm 3.74

# WZ
# wz = 8.44 pm 0.13
Example #5
0
import sys, os
import slideMaker as sm
import tableMaker as tm

sm.addGlobalOptions("--graphicspaths ../pdfs/")

sm.initSlides(me="Nick", themeName="alexmod", opts="--themecolor 13,26,129")
sm.addSlide(title="WZ Scale Factor ENDL With 1.264 fb$^{-1} (OLD)$", opts="")

sm.addSlide(title="Overview",
            text="""
        - Using latest json with 1.264 fb$^{-1}$
        - Construct \\coolblue{WZ control region} with baseline requirement of $\\met > 30$ and Njets$>2$ and
          -- 3 tight leptons
          -- Pair of leptons has $|m_{\\ell\\ell}-m_Z|\\leq15$
          -- $2<$Njets$<5$
          -- 0 btags
          -- in the HighHigh region (each lepton has $\\pt>25$)
""")

sm.addSlide(p1="h1D_njets.pdf",
            p2="h1D_nbtags.pdf",
            title="N-1 plots: njets, nbtags")
sm.addSlide(p1="h1D_lep1pt.pdf",
            p2="h1D_lep2pt.pdf",
            title="N-1 plots: lepton $\\pt$")

sm.addSlide(p1="h1D_met.pdf",
            p2="h1D_mtmin.pdf",
            title="CR plots: $\\met$, $\\mtmin$")
sm.addSlide(p1="h1D_ht.pdf",
Example #6
0
import sys, os
import slideMaker as sm
import tableMaker as tm

# sm.addGlobalOptions("--graphicspaths ../plots_120215/,/home/users/namin/2015/jec/an2013_131/CMSSW_7_4_1_patch1/src/JetMETAnalysis/JetAnalyzers/test/flat/,/home/users/namin/2015/jec/an2013_131/CMSSW_7_4_1_patch1/src/JetMETAnalysis/JetAnalyzers/test/flat/images/")
# sm.addGlobalOptions("--graphicspaths ../plots/,/home/users/namin/2015/jec/an2013_131/CMSSW_7_4_1_patch1/src/JetMETAnalysis/JetAnalyzers/test/flat/,/home/users/namin/2015/jec/an2013_131/CMSSW_7_4_1_patch1/src/JetMETAnalysis/JetAnalyzers/test/flat/images/")
sm.addGlobalOptions("--graphicspaths ../plots/,../../l1/images/")

# sm.initSlides(me="Nick",themeName="alex",opts="--themecolor 100,74,196 --casual \\textbf{Nick Amin} ENDL \\today --font gillius")
# sm.initSlides(me="Nick",themeName="alex",opts="--themecolor 29,76,165 --casual \\textbf{Nick Amin} ENDL \\today --font gillius")
sm.initSlides(me="Nick",
              themeName="alexmod",
              opts="--themecolor 255,105,180 --font gillius")

sm.addSlide(title="80X FastSim JECs", opts="")
# - Use PU, NoPU samples to derive \\textbf{L1} corrections
# -- /QCD\\_Pt-15to7000\\_TuneCUETP8M1\\_Flat\\_13TeV\\_pythia8/ RunIISpring15FSPremixDR-NoPU\\_ForSUSJECs\\_MCRUN2\\_74\\_V9-v1/AODSIM
# -- /QCD\\_Pt-15to7000\\_TuneCUETP8M1\\_Flat\\_13TeV\\_pythia8/ RunIISpring15FSPremixDR-FlatPU0To50\\_ForSUSJECs\\_MCRUN2\\_74\\_V9-v1/AODSIM
# -- Corrects for PU in bins of $\\eta$ as a function of $\\pt$
# - Use NoPU sample to derive \\textbf{L2L3} correction
# -- L3Absolute makes response flat in $\\pt$ using absolute response ($\\pt^\\text{gen}-\\pt^\\text{reco}$). Text file produced from this is a dummy file nowadays (L2L3 done together in one step)
# -- L2Relative makes response flat in $\\eta$ using relative response ($\\pt^\\text{reco}/\\pt^\\text{gen}$).
# - Produce corrections for ak\\{4,8\\}\\{pf,pfchs\\} jets since this is what we have in FastSim
# -- Use TAMU framework (\\url{https://github.com/cms-jet/})
# -- Focus on AK4PFchs here (other 3 are in backup)
sm.addSlide(title="Overview",
            text="""
        - Use PU, NoPU samples (made from same GEN events) to derive L1 corrections
        -- /QCD\\_Pt-15to7000\\_TuneCUETP8M1\\_Flat\\_13TeV\\_pythia8/RunIISpring16FSPremixDR-NoPU\\_ForSUSJECs\\_80X\\_mcRun2\\_asymptotic\\_v12-v1/AODSIM
        -- /QCD\\_Pt-15to7000\\_TuneCUETP8M1\\_Flat\\_13TeV\\_pythia8/RunIISpring16FSPremixDR-FlatPU0To50\\_ForSUSJECs\\_80X\\_mcRun2\\_asymptotic\\_v12-v1/AODSIM
        - Use L1 corrected PU sample to derive L2L3 correction
Example #7
0
import sys, os
import slideMaker as sm
import tableMaker as tm

# sm.addGlobalOptions("--graphicspaths ../plots_120215/,/home/users/namin/2015/jec/an2013_131/CMSSW_7_4_1_patch1/src/JetMETAnalysis/JetAnalyzers/test/flat/,/home/users/namin/2015/jec/an2013_131/CMSSW_7_4_1_patch1/src/JetMETAnalysis/JetAnalyzers/test/flat/images/")
# sm.addGlobalOptions("--graphicspaths ../plots/,/home/users/namin/2015/jec/an2013_131/CMSSW_7_4_1_patch1/src/JetMETAnalysis/JetAnalyzers/test/flat/,/home/users/namin/2015/jec/an2013_131/CMSSW_7_4_1_patch1/src/JetMETAnalysis/JetAnalyzers/test/flat/images/")
sm.addGlobalOptions("--graphicspaths ../plots/,../../l1/images/")

# sm.initSlides(me="Nick",themeName="alex",opts="--themecolor 100,74,196 --casual \\textbf{Nick Amin} ENDL \\today --font gillius")
# sm.initSlides(me="Nick",themeName="alex",opts="--themecolor 29,76,165 --casual \\textbf{Nick Amin} ENDL \\today --font gillius")
sm.initSlides(me="Nick",themeName="alexmod",opts="--themecolor 255,105,180 --font gillius")

sm.addSlide(title="80X FastSim JECs", opts="")
        # - Use PU, NoPU samples to derive \\textbf{L1} corrections
        # -- /QCD\\_Pt-15to7000\\_TuneCUETP8M1\\_Flat\\_13TeV\\_pythia8/ RunIISpring15FSPremixDR-NoPU\\_ForSUSJECs\\_MCRUN2\\_74\\_V9-v1/AODSIM
        # -- /QCD\\_Pt-15to7000\\_TuneCUETP8M1\\_Flat\\_13TeV\\_pythia8/ RunIISpring15FSPremixDR-FlatPU0To50\\_ForSUSJECs\\_MCRUN2\\_74\\_V9-v1/AODSIM
        # -- Corrects for PU in bins of $\\eta$ as a function of $\\pt$
        # - Use NoPU sample to derive \\textbf{L2L3} correction
        # -- L3Absolute makes response flat in $\\pt$ using absolute response ($\\pt^\\text{gen}-\\pt^\\text{reco}$). Text file produced from this is a dummy file nowadays (L2L3 done together in one step)
        # -- L2Relative makes response flat in $\\eta$ using relative response ($\\pt^\\text{reco}/\\pt^\\text{gen}$).
        # - Produce corrections for ak\\{4,8\\}\\{pf,pfchs\\} jets since this is what we have in FastSim
        # -- Use TAMU framework (\\url{https://github.com/cms-jet/})
        # -- Focus on AK4PFchs here (other 3 are in backup)
sm.addSlide(title="Overview", text="""
        - Use PU, NoPU samples (made from same GEN events) to derive L1 corrections
        -- /QCD\\_Pt-15to7000\\_TuneCUETP8M1\\_Flat\\_13TeV\\_pythia8/RunIISpring16FSPremixDR-NoPU\\_ForSUSJECs\\_80X\\_mcRun2\\_asymptotic\\_v12-v1/AODSIM
        -- /QCD\\_Pt-15to7000\\_TuneCUETP8M1\\_Flat\\_13TeV\\_pythia8/RunIISpring16FSPremixDR-FlatPU0To50\\_ForSUSJECs\\_80X\\_mcRun2\\_asymptotic\\_v12-v1/AODSIM
        - Use L1 corrected PU sample to derive L2L3 correction
        - Produce corrections for ak\\{4,8\\}\\{pf,pfchs\\} jets
        -- Use TAMU framework (\\url{https://github.com/cms-jet/})
        -- Focus on AK4PFchs here (other 3 are in backup)
Example #8
0
             bold=False)
sm.addObject("a1", "arrow", (0.31, 0.15), (0.69, 0.15))
sm.addObject("a2",
             "arrow", (0.31, 0.15), (0.65, 0.46),
             opts="--crayon --noarrowhead")

sm.addObject("a0", "arrow")
sm.addObject("c0", "circle")

# supported themes are "nick", "alex", and "madrid"
# themecolor takes RGB. could put in explicit color names, but RGB more robust
# also try the --modernfont option
sm.initSlides(me="Nick",
              themeName="alexmod",
              opts="--themecolor 51,51,179 --font gillius")
sm.addSlide(title="Perturbation Theory on $H_m(dS_n,\\mathbb{R})$ Orbifolds",
            opts="--shorttitle snarxiv hep-th")

# pass in a list of textobjects (which are just dicts, so they can be modified too)
sm.addSlide(p1="yields.pdf", p2="yields.pdf", objects=["t1", "t2", "a1", "a2"])
sm.addSlide(p1="yields.pdf", p2="yields.pdf")

# or EVEN better, you can pass in a list of plots
sm.addSlide(
    title="Many plots",
    plots=["zmass.pdf", "zmass.pdf", "zmass.pdf", "zmass.pdf", "zmass.pdf"])

# when I specify an empty object, a helper grid gets printed on the slide if I've specified
# the global option "--makegrid". A gui is produced if I specify "--makegui" instead
sm.addSlide(p1="zmass.pdf", objects=["a0", "c0"])
sm.addSlide(text1=content + content)
Example #9
0
gridslides = []

#t1 = sm.textObject(x=0.25,y=0.15,width=0.3, text="testlabel", color="red", size=0, bold=False)
#t2 = sm.textObject(x=0.75,y=0.15,width=0.3, text="testlabel", color="coolblue", size=0, bold=False)

#a1 = sm.arrowObject( (0.31,0.15), (0.69,0.15) )
#a2 = sm.arrowObject( (0.31,0.15), (0.69,0.42) )

# supported themes are "nick", "alex", and "madrid"
t = "alex"
# test2 and test3 can be folders with your plots, so you can execute this script anywhere really
# themecolor takes RGB. could put in explicit color names, but RGB more robust
# also try the --modernfont option
sm.initSlides(me="Alex", themeName=t, opts="--themecolor 51,51,179")
sm.addSlide(title="PHYS14 vs. Run2 ENDL Comparison", opts="")

#Label
sm.addObject("Phys14",
             "text", (0.21, 0.23),
             text="\\underline{Phys14}",
             bold=True)
sm.addObject("Run2-25ns",
             "text", (0.71, 0.23),
             text="\\underline{Run2-25ns}",
             bold=True)
sm.addSlide(
    title=
    "This is a check to see if the phys14 and run2-25ns samples are consistent",
    text=content)
sm.addSlide(title="Several updates have been made since last week",