25 if not dirName.endswith(
"/"):
26 dirName = dirName +
"/"
31 files =
sorted(glob.glob(dirName+
"b-JES*GSC.root"))
32 for aFileName
in files:
35 for aFileDef,aJetDef
in jetDefDict.iteritems():
36 if aFileDef
in aFileName:
40 print "Failed to determine jet definition for file:",aFileName
45 inFile = TFile(aFileName,
"READ")
46 for aName,aSystName
in SystematicNameDictionary.iteritems():
47 systematicName = aSystName +
"_" + jetDef
48 histo = inFile.Get(aName)
50 print "Failed to get histogram:",systematicName
54 histo2D.SetDirectory(0)
57 for ptBin
in range(1,histo2D.GetNbinsX()+1):
58 for etaBin
in range(1,histo2D.GetNbinsY()+1):
59 histo2D.SetBinContent(ptBin,etaBin,1-histo2D.GetBinContent(ptBin,etaBin))
61 histos[jetDef][aSystName] = histo2D
68 for aDef,aHistoSet
in histos.iteritems():