4 from array
import array
8 import ProviderHistoHelpers
11 SystematicNames = [
'Pileup_PtTerm_NPV',
'Pileup_PtTerm_Mu',
'Pileup_OffsetNPV',
'Pileup_OffsetMu',
'Pileup_RhoTopology']
13 jetDefs = [
'AntiKt4Topo_EMJES',
'AntiKt6Topo_EMJES',
'AntiKt4Topo_LCJES',
'AntiKt6Topo_LCJES']
16 if not dirName.endswith(
"/"):
17 dirName = dirName +
"/"
21 rootFileList =
sorted(glob.glob(dirName+
"*.root"))
22 if len(rootFileList) != 1:
23 print "Directory contains multiple or no root files - was expecting one:",dirName
25 rootFile = TFile(rootFileList[0],
"READ")
28 for aJetDef
in jetDefs:
32 for aSystName
in SystematicNames:
33 systematicName = aSystName +
"_" + aJetDef
34 histo = rootFile.Get(systematicName)
36 print "Failed to get histogram:",systematicName
40 histos[aJetDef][aSystName] = histo