示例#1
0
def MakeModeling(baseDir,
                 dirName,
                 outputFileName="",
                 key="",
                 pdfDir=None,
                 mcscale=1.0,
                 histName="hist.root",
                 interactive=False):

    #
    # Create the Histogram manager which will do the stacking with the data
    #
    thisJob = ProcessManager()

    #
    # Add the Process
    #
    thisJob.AddProcess("file1",
                       file=baseDir + "/" + histName,
                       dir=dirName,
                       color=ROOT.kYellow,
                       scale=mcscale)

    if not interactive:
        outputFile = TFile(outputFileName, "RECREATE")
        thisJob.makeStacks(outputFile, key)

    return thisJob
示例#2
0
def MakeModeling(baseDir,
                 dirName,
                 outputFileName="",
                 key="",
                 pdfDir=None,
                 mcscale=1.0,
                 histName1="",
                 histName2="",
                 interactive=False,
                 debug=False):

    #
    # Create the Histogram manager which will do the stacking with the data
    #
    thisJob = ProcessManager()

    #
    # Add the various background modeling
    #
    thisJob.AddProcess("dir1",
                       file=baseDir + "/" + histName1,
                       dir=dirName,
                       color=ROOT.kBlack,
                       scale=1.0)

    thisJob.AddProcess("dir2",
                       file=baseDir + "/" + histName2,
                       dir=dirName,
                       color=ROOT.kYellow,
                       scale=mcscale)

    if not interactive:
        outputFile = TFile(outputFileName, "RECREATE")
        thisJob.makeStacks(outputFile, key)

    return thisJob