20 if not dirName.endswith(
"/"):
21 dirName = dirName +
"/"
25 files =
sorted(glob.glob(dirName+
"*.root"))
26 for aFileName
in files:
29 for aFileDef,aJetDef
in jetDefDict.iteritems():
30 if aFileDef
in aFileName:
34 print "Failed to determine jet definition for file:",aFileName
39 inFile = TFile(aFileName,
"READ")
40 for aName
in SystematicNames:
41 systematicName = aName +
"_" + jetDef
42 histo = inFile.Get(systematicName)
44 print "Failed to get histogram:",systematicName
46 histo.SetName(systematicName+
"_old")
50 histoNew.SetDirectory(0)
51 histos[jetDef][aName] = histoNew