ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/myutils/StackMaker.py
(Generate patch)

Comparing UserCode/VHbb/python/myutils/StackMaker.py (file contents):
Revision 1.9 by peller, Wed Mar 6 16:22:27 2013 UTC vs.
Revision 1.10 by nmohr, Mon Mar 18 11:03:49 2013 UTC

# Line 54 | Line 54 | class StackMaker:
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'))
# Line 261 | Line 265 | class StackMaker:
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()
# Line 288 | Line 292 | class StackMaker:
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:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines