47 |
|
nBins=int(options[3]) |
48 |
|
xMin=float(options[4]) |
49 |
|
xMax=float(options[5]) |
50 |
+ |
addOverFlow=eval(config.get('Plot_general','addOverFlow')) |
51 |
|
|
52 |
|
if job.type != 'DATA': |
53 |
|
|
56 |
|
elif type(options[7])==list: |
57 |
|
cutcut=config.get('Cuts',options[7][0]) |
58 |
|
cutcut=cutcut.replace(options[7][1],options[7][2]) |
59 |
< |
print cutcut |
59 |
> |
#print cutcut |
60 |
|
if subsample>-1: |
61 |
|
treeCut='%s & %s & EventForTraining == 0'%(cutcut,job.subcuts[subsample]) |
62 |
|
else: |
107 |
|
ScaleFactor = getScale(job,path,config,rescale,subsample) |
108 |
|
if ScaleFactor != 0: |
109 |
|
hTree.Scale(ScaleFactor) |
110 |
+ |
|
111 |
+ |
if addOverFlow: |
112 |
+ |
print 'Adding overflow' |
113 |
+ |
uFlow = hTree.GetBinContent(0)+hTree.GetBinContent(1) |
114 |
+ |
oFlow = hTree.GetBinContent(hTree.GetNbinsX()+1)+hTree.GetBinContent(hTree.GetNbinsX()) |
115 |
+ |
uFlowErr = ROOT.TMath.Sqrt(ROOT.TMath.Power(hTree.GetBinError(0),2)+ROOT.TMath.Power(hTree.GetBinError(1),2)) |
116 |
+ |
oFlowErr = ROOT.TMath.Sqrt(ROOT.TMath.Power(hTree.GetBinError(hTree.GetNbinsX()),2)+ROOT.TMath.Power(hTree.GetBinError(hTree.GetNbinsX()+1),2)) |
117 |
+ |
hTree.SetBinContent(1,uFlow) |
118 |
+ |
hTree.SetBinContent(hTree.GetNbinsX(),oFlow) |
119 |
+ |
hTree.SetBinError(1,uFlowErr) |
120 |
+ |
hTree.SetBinError(hTree.GetNbinsX(),oFlowErr) |
121 |
+ |
|
122 |
|
|
123 |
|
print '\t-->import %s\t Integral: %s'%(job.name,hTree.Integral()) |
124 |
|
|
125 |
|
hTree.SetDirectory(0) |
126 |
|
input.Close() |
127 |
|
|
115 |
– |
|
116 |
– |
|
128 |
|
return hTree, group |
129 |
|
|
130 |
|
|
151 |
|
histos=ordnung |
152 |
|
typs=ordnungtyp |
153 |
|
|
154 |
+ |
print typs |
155 |
+ |
|
156 |
|
for k in range(0,len(num)): |
157 |
|
for m in range(0,num[k]): |
158 |
|
if m > 0: |