ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/samplesclass.py
Revision: 1.4
Committed: Thu Aug 2 16:03:52 2012 UTC (12 years, 9 months ago) by peller
Content type: text/x-python
Branch: MAIN
Changes since 1.3: +5 -2 lines
Log Message:
removed flavour splitting, fixed training readin problem

File Contents

# User Rev Content
1 peller 1.1 class sample:
2    
3     def __init__(self,name,type):
4     self.name=name
5     #type = bkg, sig or data
6     if type not in ['BKG','SIG','DATA']:
7     raise Exception("type must be 'BKG', 'SIG', or 'DATA'!")
8     self.type=type
9     self.prefix=''
10     self.identifier=''
11 peller 1.4 self.active=True
12 peller 1.1 self.group=''
13     self.path=''
14     self.lumi=0.
15 peller 1.2 self.sf=1.0
16 peller 1.1 self.xsec=0.
17     self.split=1.0
18     self.weightexpression=1.0
19     self.SYS=['Nominal']
20     self.tree='tree'
21     self.treecut=''
22     self.comment=''
23 peller 1.4 #for DY falvours
24     self.subsamples=False
25     self.subnames=[]
26     self.subcuts=[]
27 peller 1.1
28     def getpath(self):
29     return self.path+'/'+self.prefix+self.identifier+'.root'
30    
31     def addtreecut(self, cut):
32     if self.treecut == '':
33     self.treecut = cut
34     else:
35     self.treecut = '(%s) && (%s)'%(self.treecut,cut)
36    
37     def addcomment(self, comment):
38     if self.comment == '':
39     self.comment = '- %s'%comment
40     else:
41     self.comment = '%s\n- %s'%(self.comment,comment)
42    
43     def addprefix(self,prefix):
44     self.prefix=prefix+self.prefix
45    
46     def addpath(self,path):
47     self.path=self.path+path