4 from array
import array
8 import ProviderHistoHelpers
10 SystematicNames = [
'EtaIntercalibration_TotalStat',
'EtaIntercalibration_Modelling']
13 'AntiKt4TopoEM' :
'AntiKt4Topo_EMJES',
14 'AntiKt6TopoEM' :
'AntiKt6Topo_EMJES',
15 'AntiKt4LCTopo' :
'AntiKt4Topo_LCJES',
16 'AntiKt6LCTopo' :
'AntiKt6Topo_LCJES'
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