Exemplo n.º 1
0
                skiplessDataMiter.add( monitor_node, dataset = sample,
                                                     trigger = trigger[1],
                                                     bin     = bin[0],
                                                     opoint  = opoint )

#
# Merge triggers
#
dataForWeights = {}
haddedDataMiter = Miter()
dataForPlots = Miter()

for opoint in operating_points:
    for bin in jet_bins:  
        currNode = hadd_helper( g, "-%s-%s-data" % (bin[0],opoint), 
                                        skiplessDataMiter.getValues( bin=bin[0],
                                        opoint = opoint) )
        haddedDataMiter.add(
                            currNode,
                            opoint = opoint,
                            bin = bin[0] )
        singleMonitorMiter.add( currNode,\
                                                bin     = bin[0],
                                                opoint  = opoint,
                                                njetpt  = True,
                                                njeteta = True,
                                                privert = True,
                                                type    = "hadd_data" )
        dataForWeights[ bin[0] ] = currNode
        if opoint == "SSVHEM":
            dataForPlots.add( currNode, bin = bin[0] )
Exemplo n.º 2
0
            getLuminosity = LocalScriptEdge.LocalScriptEdge( name = "getLumi-%s-%s" % ( dataset[1], trigger[1] ),
                command = commandLine,
                output = "luminosity.txt",
                noEmptyFiles=True)

            g.addEdge( treeNode, lumiNode, getLuminosity )
            
            # Add accounting
            luminosityMiter.add( lumiNode, dataset = dataset[1], trigger = trigger[1] )

luminositySumNode  = Node( name = "luminosity-sum"  )
luminosityListNode = Node( name = "luminosity-list" )
g.addNode( luminositySumNode  )
g.addNode( luminosityListNode )

for lumiNode in luminosityMiter.getValues():
    g.addEdge( lumiNode, luminosityListNode, NullEdge() )

sumLuminosity = LocalScriptEdge.LocalScriptEdge( name = "sum-all-lumis",
                                                 command = 
                            "/uscms_data/d2/meloam/s8workflow/lumiSum.py luminosity.txt ",
                                                 output  = "luminosity.txt",
                                                 addFileNamesToCommandLine = True,
                                                 noEmptyFiles = True)

g.addEdge( luminosityListNode, luminositySumNode, sumLuminosity )


#
# Now, compute the lumi per-trigger. If there's just one dataset that contains
# the trigger we're looking for, we can just pass through from the previous
                    trigger=trigger[1],
                    bin=bin[0],
                    opoint=opoint,
                    njetpt=True,
                    njeteta=True,
                    privert=True,
                    type="data",
                )

                skiplessDataMiter.add(monitor_node, dataset=sample, trigger=trigger[1], bin=bin[0], opoint=opoint)

haddedDataMiter = Miter()
for opoint in operating_points:
    for bin in jet_bins:
        currNode = hadd_helper(
            g, "-%s-%s-data-with-20" % (bin[0], opoint), skiplessDataMiter.getValues(bin=bin[0], opoint=opoint)
        )
        haddedDataMiter.add(currNode, opoint=opoint, bin=bin[0])

        singleMonitorMiter.add(
            currNode, bin=bin[0], opoint=opoint, njetpt=True, njeteta=True, privert=True, type="hadd_data"
        )


#
# Some website stuff
#
allPages = Miter()
webRoot = "/afs/fnal.gov/files/home/room3/meloam/public_html/s8/dijet10exercise-with20/"
httpRoot = "http://home.fnal.gov/~meloam/s8/dijet10exercise-with20/"
Exemplo n.º 4
0
        luminosityMiter.add(lumiNode, dataset=dataset[1], trigger=trigger[1])
#            luminosityNodes[ "%s-%s" % (dataset[1], trigger[1]) ] = lumiNode
#            if not trigger[1] in luminosityByTrigger:
#                luminosityByTrigger[ trigger[1] ] = []
#            luminosityByTrigger[ trigger[1] ].append( lumiNode )

#
# We have a bunch of individual lumis, make a node
# that is dependent on the individual ones and one w/the sum
#
luminositySumNode = Node(name="luminosity-sum")
luminosityListNode = Node(name="luminosity-list")
g.addNode(luminositySumNode)
g.addNode(luminosityListNode)

for lumiNode in luminosityMiter.getValues():
    g.addEdge(lumiNode, luminosityListNode, NullEdge())

sumLuminosity = LocalScriptEdge.LocalScriptEdge(
    name="sum-all-lumis",
    command="/uscms_data/d2/meloam/s8workflow/lumiSum.py luminosity.txt ",
    output="luminosity.txt",
    addFileNamesToCommandLine=True,
    noEmptyFiles=True,
)

g.addEdge(luminosityListNode, luminositySumNode, sumLuminosity)


#
# Now, compute the lumi per-trigger. If there's just one dataset that contains
Exemplo n.º 5
0
                    privert=True,
                    type="data",
                )
                skiplessDataMiter.add(monitor_node, dataset=sample, trigger=trigger[1], bin=bin[0], opoint=opoint)

#
# Merge triggers
#
dataForWeights = {}
haddedDataMiter = Miter()
dataForPlots = Miter()

for opoint in operating_points:
    for bin in jet_bins:
        currNode = hadd_helper(
            g, "-%s-%s-data" % (bin[0], opoint), skiplessDataMiter.getValues(bin=bin[0], opoint=opoint)
        )
        haddedDataMiter.add(currNode, opoint=opoint, bin=bin[0])
        singleMonitorMiter.add(
            currNode, bin=bin[0], opoint=opoint, njetpt=True, njeteta=True, privert=True, type="hadd_data"
        )
        dataForWeights[bin[0]] = currNode
        if opoint == "SSVHEM":
            dataForPlots.add(currNode, bin=bin[0])

#
# Merge Bins
#
haddedDataFinalMiter = Miter()
for opoint in haddedDataMiter.iterGrouped("opoint"):
    currNode = hadd_helper(
                                                opoint  = opoint,
                                                njetpt  = True,
                                                njeteta = True,
                                                privert = True,
                                                type    = "data" )
 
                skiplessDataMiter.add( monitor_node, dataset = sample,
                                                     trigger = trigger[1],
                                                     bin     = bin[0],
                                                     opoint  = opoint )

haddedDataMiter = Miter()
for opoint in operating_points:
    for bin in jet_bins:  
        currNode = hadd_helper( g, "-%s-%s-data-highpt-20" % (bin[0],opoint), 
                                        skiplessDataMiter.getValues( bin=bin[0],
                                        opoint = opoint) )
        haddedDataMiter.add(
                            currNode,
                            opoint = opoint,
                            bin = bin[0] )

        singleMonitorMiter.add( currNode,\
                                                bin     = bin[0],
                                                opoint  = opoint,
                                                njetpt  = True,
                                                njeteta = True,
                                                privert = True,
                                                type    = "hadd_data" )
 

#
                skiplessDataMiter.add( monitor_node, dataset = sample,
                                                     trigger = trigger[1],
                                                     bin     = bin[0],
                                                     opoint  = opoint )

#
# Merge triggers
#
dataForWeights = {}
haddedDataMiter = Miter()
dataForPlots = Miter()
for opoint in operating_points:
    for bin in jet_bins:  
        currNode = hadd_helper( g, "-%s-%s-data-combine" % (bin[0],opoint), 
                                        skiplessDataMiter.getValues( bin=bin[0],
                                        opoint = opoint) )
        haddedDataMiter.add(
                            currNode,
                            opoint = opoint,
                            bin = bin[0] )
        print "the opoint is %s" % opoint
        singleMonitorMiter.add( currNode,\
                                                bin     = bin[0],
                                                opoint  = opoint,
                                                njetpt  = True,
                                                njeteta = True,
                                                privert = True,
                                                type    = "hadd_data" )
        dataForWeights[ bin[0] ] = currNode
        if opoint == "TCHEM":
            dataForPlots.add( currNode, bin = bin[0] )
#
# Merge triggers
#
dataForWeightsSyst = Miter()
for systematic in systematicDataList:
    for opoint in operating_points:
        for bin in jet_bins_data:
            #            if opoint == operating_points[0] and systematic[0] == systematicDataList[0][0]:
            #                dataForWeightsSyst.add( dataForWeights[ bin[0] ],
            #                                        bin = bin[0],
            #                                        syst = 'gsplit' )
            currNode = hadd_helper(
                g,
                "-%s-%s-%s-data" % (systematic[0], bin[0], opoint),
                systematicsDataMiter.getValues(bin=bin[0], opoint=opoint, syst=systematic[0]),
            )
            addSingleMonitor(currNode, bin=bin[0], opoint=opoint, syst=systematic[0], type="data_binned")

#
# Merge Bins
#
haddedDataFinalSystMiter = Miter()
for systematic in systematicDataList:
    for opoint in operating_points:
        #    for opoint in haddedDataMiter.iterGrouped( 'opoint' ):
        #        if (opoint.vals[0][1]['opoint'] == operating_points[0]) and \
        #           (systematic[0] == systematicDataList[0][0]):
        #            haddedDataFinalSystMiter.add( haddedDataFinalMiter.getOneValue ( opoint = opoint.vals[0][1]['opoint'] ),
        #
        #                                                    opoint = opoint.vals[0][1]['opoint'],