ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/VHbb/python/samplesclass.py
Revision: 1.3
Committed: Mon Jun 25 11:43:56 2012 UTC (12 years, 10 months ago) by peller
Content type: text/x-python
Branch: MAIN
CVS Tags: ICHEP8TeV
Changes since 1.2: +2 -0 lines
Log Message:
bugfix and removed conflicts

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     self.group=''
12     self.path=''
13     self.lumi=0.
14 peller 1.2 self.sf=1.0
15 peller 1.1 self.xsec=0.
16     self.split=1.0
17     self.weightexpression=1.0
18     self.SYS=['Nominal']
19     self.tree='tree'
20     self.treecut=''
21     self.comment=''
22 peller 1.3 self.subsample=False
23     self.subcut=1
24 peller 1.1
25     def getpath(self):
26     return self.path+'/'+self.prefix+self.identifier+'.root'
27    
28     def addtreecut(self, cut):
29     if self.treecut == '':
30     self.treecut = cut
31     else:
32     self.treecut = '(%s) && (%s)'%(self.treecut,cut)
33    
34     def addcomment(self, comment):
35     if self.comment == '':
36     self.comment = '- %s'%comment
37     else:
38     self.comment = '%s\n- %s'%(self.comment,comment)
39    
40     def addprefix(self,prefix):
41     self.prefix=prefix+self.prefix
42    
43     def addpath(self,path):
44     self.path=self.path+path