44def processFile( inFileName, dirName, label, data, dataDict, index, updateIndex=True, printMultiplicity=True ):
45 if updateIndex: index.clear()
48 inFile = ROOT.TFile.Open( inFileName,
"READ" )
52 hs = inFile.Get( dirName+
"Multiplicities/summary" )
53 for i
in range( 1, 8 ) :
55 if updateIndex : index.append( hs.GetXaxis().GetBinLabel(i) )
56 c = hs.GetBinContent(i)
58 sList.append( f
"{c:.0f} \u00b1 {e:.0f}" )
59 sDict.update( {
"mult_"+str(i) : [ c, e ] } )
61 if updateIndex : index.append(
" ")
65 he = inFile.Get( dirName+
"Efficiencies/eff_vs_truth_inclusive" )
66 if updateIndex : index.append(
" " )
68 if updateIndex : index.append(
"Eff_vs_truth" )
70 c = 100*he.GetEfficiency(1)
71 eu = 100*he.GetEfficiencyErrorUp(1)
72 el = 100*he.GetEfficiencyErrorLow(1)
74 sList.append( f
"{fround( c, e )} %" )
75 sDict.update( {
"eff" : [ c, e ] } )
76 else : sList.append(
"-" )
79 het = inFile.Get( dirName+
"Efficiencies/Technical/eff_vs_truth_inclusive" )
80 if updateIndex : index.append(
"Tech_eff_vs_truth" )
82 c = 100*het.GetEfficiency(1)
83 eu = 100*het.GetEfficiencyErrorUp(1)
84 el = 100*het.GetEfficiencyErrorLow(1)
86 sList.append( f
"{fround( c, e )} %" )
87 sDict.update( {
"tech_eff" : [ c, e ] } )
88 else : sList.append(
"-" )
92 hrpt = inFile.Get( dirName+
"Resolutions/resolution_pt_vs_truth_inclusive" )
93 if updateIndex : index.append(
" " )
95 if updateIndex : index.append(
"Resolution_pT_vs_truth" )
97 c = hrpt.GetBinContent(1)
98 e = hrpt.GetBinError(1)
99 sList.append( f
"{fround( c, e )} GeV" )
100 sDict.update( {
"res_pt" : [ c, e ] } )
101 else : sList.append(
"-" )
105 hrd0 = inFile.Get( dirName+
"Resolutions/resolution_d0_vs_truth_inclusive" )
106 if updateIndex : index.append(
"Resolution_d0_vs_truth" )
108 c = hrd0.GetBinContent(1)
109 e = hrd0.GetBinError(1)
110 sList.append( f
"{fround( c, e )} \u03BCm" )
111 sDict.update( {
"res_d0" : [ c, e ] } )
112 else : sList.append(
"-" )
116 hrz0 = inFile.Get( dirName+
"Resolutions/resolution_z0_vs_truth_inclusive" )
117 if updateIndex : index.append(
"Resolution_z0_vs_truth" )
119 c = hrz0.GetBinContent(1)
120 e = hrz0.GetBinError(1)
121 sList.append( f
"{fround( c, e )} \u03BCm" )
122 sDict.update( {
"res_z0" : [ c, e ] } )
123 else : sList.append(
"-" )
127 hf = inFile.Get( dirName+
"FakeRates/fakerate_vs_offl_inclusive" )
128 if updateIndex : index.append(
" " )
130 if updateIndex : index.append(
"FakeRate_vs_reco" )
132 c = 100*hf.GetEfficiency(1)
133 eu = 100*hf.GetEfficiencyErrorUp(1)
134 el = 100*hf.GetEfficiencyErrorLow(1)
135 e =
max( [ eu, el ] )
136 sList.append( f
"{fround( c, e )} %" )
137 sDict.update( {
"fake" : [ c, e ] } )
138 else : sList.append(
"-" )
142 hd = inFile.Get( dirName+
"Duplicates/duplrate_vs_truth_inclusive" )
143 if updateIndex : index.append(
"DuplicateRate_vs_truth" )
145 c = 100*hd.GetEfficiency(1)
146 eu = 100*hd.GetEfficiencyErrorUp(1)
147 el = 100*hd.GetEfficiencyErrorLow(1)
148 e =
max( [ eu, el ] )
149 sList.append( f
"{fround( c, e )} %" )
150 sDict.update( {
"dupl" : [ c, e ] } )
151 else : sList.append(
"-" )
155 data.update( { label : sList } )
156 dataDict.update( { label : sDict } )