Example #1
0
def main(opts):
    # Assume by default that the observed limit should be blinded
    if not opts.unblinded:
        print "Working in BLINDED mode, i.e. I will not tell you the observed limit before you say please ..."

    limits = limit.BRLimits()

    # Enable OpenGL
    if opts.excludedArea:
        ROOT.gEnv.SetValue("OpenGL.CanvasPreferGL", 1)

    # Apply TDR style
    style = tdrstyle.TDRStyle()
    if not limits.isHeavyStatus:
        # Give more space for four digits on the y axis labels
        style.tdrStyle.SetPadLeftMargin(0.19)
        style.tdrStyle.SetTitleYOffset(1.6)

    # Set the paper mode
    limit.forPaper = True
    if opts.paper:
        histograms.cmsTextMode = histograms.CMSMode.PAPER
    if opts.unpublished:
        histograms.cmsTextMode = histograms.CMSMode.UNPUBLISHED

    if opts.parentheses:
        limit.useParentheses()

    doBRlimit(limits, opts.unblinded, opts)
    doBRlimit(limits, opts.unblinded, opts, log=True)
    doLimitError(limits, opts.unblinded)
    limits.print2(opts.unblinded)
    limits.saveAsLatexTable(opts.unblinded)
Example #2
0
def main(opts):
    # Assume by default that the observed limit should be blinded
    if not opts.unblinded:
        print "Working in BLINDED mode, i.e. I will not tell you the observed limit before you say please ..."

    limits = limit.BRLimits()

    # Enable OpenGL
    if opts.excludedArea:
        ROOT.gEnv.SetValue("OpenGL.CanvasPreferGL", 1)

    # Apply TDR style
    style = tdrstyle.TDRStyle()
    if not limits.isHeavyStatus:
        # Give more space for four digits on the y axis labels
        style.tdrStyle.SetPadLeftMargin(0.19)
        style.tdrStyle.SetTitleYOffset(1.6)

    # Set the paper mode
    limit.forPaper = True
    if opts.paper:
        histograms.cmsTextMode = histograms.CMSMode.PAPER
    if opts.unpublished:
        histograms.cmsTextMode = histograms.CMSMode.UNPUBLISHED

    if opts.parentheses:
        limit.useParentheses()

    doBRlimit(limits, opts.unblinded, opts)
    doBRlimit(limits, opts.unblinded, opts, log=True)
    doLimitError(limits, opts.unblinded)
    limits.print2(opts.unblinded)
    limits.saveAsLatexTable(opts.unblinded)
def main(opts):
    if opts.saveDir == "":
        opts.saveDir = os.getcwd()

    # Assume by default that the observed limit should be blinded
    if not opts.unblinded:
        msg = "Working in BLINDED mode, i.e. I will not tell you the observed limit before you say please ..."
        Print(msg, True)

    limits = limit.BRLimits()

    # Enable OpenGL
    if opts.excludedArea:
        ROOT.gEnv.SetValue("OpenGL.CanvasPreferGL", 1)

    # Apply TDR style
    style = tdrstyle.TDRStyle()
    if not limits.isHeavyStatus:
        # Give more space for four digits on the y axis labels
        style.tdrStyle.SetPadLeftMargin(0.19)
        style.tdrStyle.SetTitleYOffset(1.6)

    # Set the paper mode
    if opts.paper:
        histograms.cmsTextMode = histograms.CMSMode.PAPER
    # Set the paper mode
    if opts.unpublished:
        histograms.cmsTextMode = histograms.CMSMode.UNPUBLISHED
    # Use BR symbol for H+ decay channel with subscript or parentheses?
    if opts.parentheses:
        limit.useParentheses()
    else:
        limit.useSubscript(True)

    # Do the limit plots
    doBRlimit(limits, opts.unblinded, opts, logy=False)
    doBRlimit(limits, opts.unblinded, opts, logy=True)
    doLimitError(limits, opts.unblinded)

    # Print the Limits
    limits.printLimits(unblindedStatus=opts.unblinded, nDigits=opts.digits)
    # limits.print2(unblindedStatus=opts.unblinded)

    # Save the Limits in a LaTeX table file
    limits.saveAsLatexTable(unblindedStatus=opts.unblinded,
                            nDigits=opts.digits)
    limits.saveAsLatexTable(unblindedStatus=opts.unblinded,
                            nDigits=opts.digits,
                            savePath=os.path.join(opts.saveDir, opts.subdir))
    return
def main(opts):
    if opts.saveDir =="":
        opts.saveDir = os.getcwd()

    # Assume by default that the observed limit should be blinded
    if not opts.unblinded:
        msg="Working in BLINDED mode, i.e. I will not tell you the observed limit before you say please ..."
        Print(msg, True)

    limits = limit.BRLimits()

    # Enable OpenGL
    if opts.excludedArea:
        ROOT.gEnv.SetValue("OpenGL.CanvasPreferGL", 1)

    # Apply TDR style
    style = tdrstyle.TDRStyle()
    if not limits.isHeavyStatus:
        # Give more space for four digits on the y axis labels
        style.tdrStyle.SetPadLeftMargin(0.19)
        style.tdrStyle.SetTitleYOffset(1.6)

    # Set the paper mode
    if opts.paper:
        histograms.cmsTextMode = histograms.CMSMode.PAPER
    # Set the paper mode
    if opts.unpublished:
        histograms.cmsTextMode = histograms.CMSMode.UNPUBLISHED
    # Use BR symbol for H+ decay channel with subscript or parentheses?
    if opts.parentheses:
        limit.useParentheses()
    else:
        limit.useSubscript(True)
    
    # Do the limit plots
    doBRlimit(limits, opts.unblinded, opts, logy=False)
    doBRlimit(limits, opts.unblinded, opts, logy=True)
    doLimitError(limits, opts.unblinded)

    # Print the Limits
    limits.printLimits(unblindedStatus=opts.unblinded, nDigits=opts.digits)
    # limits.print2(unblindedStatus=opts.unblinded)
    
    # Save the Limits in a LaTeX table file
    limits.saveAsLatexTable(unblindedStatus=opts.unblinded, nDigits=opts.digits)
    limits.saveAsLatexTable(unblindedStatus=opts.unblinded, nDigits=opts.digits, savePath=os.path.join(opts.saveDir, opts.subdir) )
    return