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

Comparing UserCode/VHbb/python/myutils/HistoMaker.py (file contents):
Revision 1.10 by peller, Tue Feb 19 17:22:31 2013 UTC vs.
Revision 1.11 by nmohr, Tue Feb 19 17:44:12 2013 UTC

# Line 18 | Line 18 | class HistoMaker:
18          self.cuts = []
19          for options in optionsList:
20              self.cuts.append(options['cut'])
21 <        print self.cuts
21 >        #print self.cuts
22          #self.tc = TreeCache(self.cuts,samples,path)
23          self.tc = TreeCache(self.cuts,samples,path,config)
24          self._rebin = False
# Line 72 | Line 72 | class HistoMaker:
72                  else:
73                      full=False
74              elif job.type == 'DATA':
75 <                if eval(options['blind']):
75 >                if options['blind']:
76                      if treeVar == 'H.mass':
77                          CuttedTree.Draw('%s>>%s(%s,%s,%s)' %(treeVar,name,nBins,xMin,xMax),treeVar+'<90. || '+treeVar + '>150.' , "goff,e")
78                      else:
# Line 114 | Line 114 | class HistoMaker:
114                  gDict[group] = self.mybinning.rebin(hTree)
115                  del hTree
116              else:
117 <                print 'not rebinning %s'%job.name
117 >                #print 'not rebinning %s'%job.name
118                  gDict[group] = hTree
119              hTreeList.append(gDict)
120              CuttedTree.IsA().Destructor(CuttedTree)
# Line 173 | Line 173 | class HistoMaker:
173              if not TotR == 0 and not ErrorR == 0:
174                  rel=ErrorR/TotR
175                  #print rel
176 <        print 'upper bin is %s'%binR
176 >        #print 'upper bin is %s'%binR
177  
178          #---- from left
179          rel=1.0
# Line 186 | Line 186 | class HistoMaker:
186                  #print rel
187          #it's the lower edge
188          binL+=1
189 <        print 'lower bin is %s'%binL
189 >        #print 'lower bin is %s'%binL
190  
191          inbetween=binR-binL
192          stepsize=int(inbetween)/(int(self.norebin_nBins)-2)
193          modulo = int(inbetween)%(int(self.norebin_nBins)-2)
194  
195 <        print 'stepsize %s'% stepsize
195 >        #print 'stepsize %s'% stepsize
196          #print 'modulo %s'%modulo
197          binlist=[binL]
198          for i in range(0,int(self.norebin_nBins)-3):
# Line 200 | Line 200 | class HistoMaker:
200          binlist[-1]+=modulo
201          binlist.append(binR)
202          binlist.append(self.rebin_nBins+1)
203 <        print 'binning set to %s'%binlist
203 >        #print 'binning set to %s'%binlist
204          self.mybinning = Rebinner(int(self.norebin_nBins),array('d',[-1.0]+[totalBG.GetBinLowEdge(i) for i in binlist]),True)
205          self._rebin = True
206          print '\t > rebinning is set <\n'

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines