Ejemplo n.º 1
0
def addleadinJetSelectorHistos( aBranch ):
    if ("LC" in aBranch or "EM"  in aBranch) and isSupportedType(tree.GetBranchType(aBranch)):
        builder.addHistosWithLeadingJetSelectors( JetType(aBranch), aBranch )
Ejemplo n.º 2
0
  print ("Tree: ",treeName)
  exit(2)


##################################################
# Dump everything                                #
##################################################

from JetValidation.D3PDHistoBuildLib import HistoBuilderFromD3PD,isSupportedType

builder = HistoBuilderFromD3PD(tree)

print ("Adding branches...")
for aBranch in sorted(tree.GetSetOfTreeBranchNames()):
  if str.startswith(aBranch,"jet_") or str.startswith(aBranch,"MET_"):
    if isSupportedType(tree.GetBranchType(aBranch)):
      builder.addHistos(aBranch)

print ("\nRunning event loop...")
builder.eventLoop()
print ("Done event loop!")

#builder.dumpAllHistosToFile(pdfName)
builder.dumpStructuredPDF(pdfName)
builder.saveHistos(pdfName.replace('.pdf','.root'))
builder.saveHistoBins(pdfName.replace('.pdf','.pck'))

inFile.Close()


Ejemplo n.º 3
0
def addAllHistos( aBranch ):
    if isSupportedType(tree.GetBranchType(aBranch)):
        builder.addHistos(aBranch)