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

Comparing UserCode/VHbb/python/tree_stack.py (file contents):
Revision 1.5 by peller, Thu Aug 2 16:03:52 2012 UTC vs.
Revision 1.6 by peller, Fri Aug 10 09:36:16 2012 UTC

# Line 17 | Line 17 | from Ratio import getRatio
17  
18   #load config
19   config = BetterConfigParser()
20 < config.read('./config')
20 > config.read('./config7TeV_ZZ')
21  
22   #get locations:
23   Wdir=config.get('Directories','Wdir')
# Line 60 | Line 60 | color=color.split(',')
60  
61  
62   weightF=config.get('Weights','weightF')
63 + Group = eval(config.get('LimitGeneral','Group'))
64  
65  
66   print '\nProducing Plot of %s\n'%title
# Line 70 | Line 71 | typs = []
71   datas = []
72   datatyps =[]
73   datanames=[]
74 <
74 > '''
75   for job in info:
76      if job.type == 'BKG':
77          #print 'MC'
# Line 87 | Line 88 | for job in info:
88          datas.append(hTemp)
89          datatyps.append(typ)
90          datanames.append(job.name)
91 + '''
92 + for job in info:
93 +    if eval(job.active):
94 +        if job.subsamples:
95 +            for subsample in range(0,len(job.subnames)):
96 +                
97 +                if job.subnames[subsample] in setup:
98 +                    hTemp, typ = getHistoFromTree(job,options,1,subsample)
99 +                    histos.append(hTemp)
100 +                    typs.append(Group[job.subnames[subsample]])
101 +
102 +
103 +    
104 +        else:
105 +            if job.name in setup:
106 +                #print job.getpath()
107 +                hTemp, typ = getHistoFromTree(job,options,1)
108 +                histos.append(hTemp)
109 +                typs.append(Group[job.name])
110 +
111 +            elif job.name in data:
112 +                #print 'DATA'
113 +                hTemp, typ = getHistoFromTree(job,options)
114 +                datas.append(hTemp)
115 +                datatyps.append(typ)
116 +                datanames.append(job.name)
117 +
118 +
119 +
120  
121  
122  
123   ROOT.gROOT.SetStyle("Plain")
124 < import TdrStyles
125 < TdrStyles.tdrStyle()
124 > #import TdrStyles
125 > #TdrStyles.tdrStyle()
126   c = ROOT.TCanvas(name,title, 700, 600)
127   c.SetFillStyle(4000)
128   c.SetFrameFillStyle(1000)
# Line 132 | Line 162 | print "\033[1;32m\n\tMC integral = %s\03
162  
163   #ORDER AND ADD TOGETHER
164  
165 < histos, typs = orderandadd(histos,typs,setup)
165 > #histos, typs = orderandadd(histos,typs,setup)
166  
167  
168   k=len(histos)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines