treeVars = vars
print "Variables for jet image creation: ", vars

# create selection criteria
#sel = ""
sel = "jetAK8_pt > 500 && jetAK8_mass > 50"
#sel = "tau32 < 9999. && et > 500. && et < 2500. && bDisc1 > -0.05 && SDmass < 400"

# make arrays from the trees
start, stop, step = 0, 167262, 1
arrayHH4B = tree2array(treeHH4B, treeVars, sel, None, start, stop, step)
arrayHH4B = tools.appendTreeArray(arrayHH4B)

print "Number of Jets that will be imaged: ", len(arrayHH4B)

imgArrayHH4B = img.makeBoostCandFourVector(arrayHH4B)

print "Made candidate 4 vector arrays from the datasets"

#==================================================================================
# Store BEST Variables ////////////////////////////////////////////////////////////
#==================================================================================

# get BEST variable names from branches
bestVars = tools.getBestBranchNames(treeHH4B)
print "Boosted Event Shape Variables: ", bestVars

# make arrays from the trees
start, stop, step = 0, 167262, 1
bestArrayHH4B = tree2array(treeHH4B, bestVars, sel, None, start, stop, step)
bestArrayHH4B = tools.appendTreeArray(bestArrayHH4B)
示例#2
0
print "Accessed the trees"

# get input variable names from branches
vars = img.getBoostCandBranchNames(treeJJ)
treeVars = vars
print "Variables for jet image creation: ", vars

# create selection criteria
#sel = ""
sel = "jetAK8_pt > 500 && jetAK8_mass > 50"
#sel = "tau32 < 9999. && et > 500. && et < 2500. && bDisc1 > -0.05 && SDmass < 400"

# make arrays from the trees
arrayJJ = tree2array(treeJJ, treeVars, sel)
arrayJJ = tools.appendTreeArray(arrayJJ)
imgArrayJJ = img.makeBoostCandFourVector(arrayJJ)

arrayHH4W = tree2array(treeHH4W, treeVars, sel)
arrayHH4W = tools.appendTreeArray(arrayHH4W)
imgArrayHH4W = img.makeBoostCandFourVector(arrayHH4W)

arrayHH4B = tree2array(treeHH4B, treeVars, sel)
arrayHH4B = tools.appendTreeArray(arrayHH4B)
imgArrayHH4B = img.makeBoostCandFourVector(arrayHH4B)

print "Made candidate 4 vector arrays from the datasets"

#==================================================================================
# Make Jet Images /////////////////////////////////////////////////////////////////
#==================================================================================
treeVars = vars
print "Variables for jet image creation: ", vars

# create selection criteria
#sel = ""
sel = "jetAK8_pt > 500 && jetAK8_mass > 50"
#sel = "tau32 < 9999. && et > 500. && et < 2500. && bDisc1 > -0.05 && SDmass < 400"

# make arrays from the trees
start, stop, step = 0, 167262, 1
arrayQCD = tree2array(treeQCD, treeVars, sel, None, start, stop, step )
arrayQCD = tools.appendTreeArray(arrayQCD)

print "Number of Jets that will be imaged: ", len(arrayQCD)

imgArrayQCD = img.makeBoostCandFourVector(arrayQCD)

print "Made candidate 4 vector arrays from the datasets"

#==================================================================================
# Store BEST Variables ////////////////////////////////////////////////////////////
#==================================================================================

# get BEST variable names from branches
bestVars = tools.getBestBranchNames(treeQCD)
print "Boosted Event Shape Variables: ", bestVars

# make arrays from the trees
start, stop, step = 0, 167262, 1
bestArrayQCD = tree2array(treeQCD, bestVars, sel, None, start, stop, step)
bestArrayQCD = tools.appendTreeArray(bestArrayQCD)