54 |
|
cut = None |
55 |
|
if config.has_option(section, 'Datacut'): |
56 |
|
cut=config.get(section, 'Datacut') |
57 |
+ |
if config.has_option(section, 'doFit'): |
58 |
+ |
self.doFit=eval(config.get(section, 'doFit')) |
59 |
+ |
else: |
60 |
+ |
self.doFit = False |
61 |
|
|
62 |
|
self.colorDict=eval(config.get('Plot_general','colorDict')) |
63 |
|
self.typLegendDict=eval(config.get('Plot_general','typLegendDict')) |
265 |
|
l.Draw() |
266 |
|
|
267 |
|
tPrel = self.myText("CMS Preliminary",0.17,0.88,1.04) |
268 |
< |
tLumi = self.myText("#sqrt{s} = %s, L = %s fb^{-1}"%(self.anaTag,(float(self.lumi)/1000.)),0.17,0.83) |
268 |
> |
tLumi = self.myText("#sqrt{s} = %s, L = %.1f fb^{-1}"%(self.anaTag,(float(self.lumi)/1000.)),0.17,0.83) |
269 |
|
tAddFlag = self.myText(addFlag,0.17,0.78) |
270 |
|
|
271 |
|
unten.cd() |
292 |
|
ratioError.SetFillColor(ROOT.kGray+3) |
293 |
|
ratioError.SetFillStyle(3013) |
294 |
|
ratio.Draw("E1") |
295 |
< |
|
295 |
> |
if self.doFit: |
296 |
> |
fitData = ROOT.TF1("fData", "gaus",0.7, 1.3) |
297 |
> |
fitMC = ROOT.TF1("fMC", "gaus",0.7, 1.3) |
298 |
> |
print 'Fit on data' |
299 |
> |
d1.Fit(fitData,"R") |
300 |
> |
print 'Fit on simulation' |
301 |
> |
allMC.Fit(fitMC,"R") |
302 |
|
|
303 |
|
|
304 |
|
if not self.AddErrors == None: |