ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/algomez/GenAnalyzer/genanalyzer_cfg.py
(Generate patch)

Comparing UserCode/algomez/GenAnalyzer/genanalyzer_cfg.py (file contents):
Revision 1.1 by algomez, Mon Jun 3 20:34:29 2013 UTC vs.
Revision 1.3 by algomez, Wed Jun 19 02:41:24 2013 UTC

# Line 9 | Line 9 | from FWCore.ParameterSet.VarParsing impo
9   options = VarParsing ('standard')                       ### For a simple set of parameters
10   #options = VarParsing ('analysis')                      ### For a complete set of parameters
11  
12 < options.register ('stop1mass',
12 > options.register ('st1',
13                    0,
14                    VarParsing.multiplicity.singleton,
15                    VarParsing.varType.int,
16                    'Mass for the Stop1')
17  
18 < options.register ('stop2mass',
18 > options.register ('st2',
19                    0,
20                    VarParsing.multiplicity.singleton,
21                    VarParsing.varType.int,
22                    'Mass for the Stop2')
23  
24 < #options.register ('useData',
25 < #                  False,
26 < #                  VarParsing.multiplicity.singleton,
27 < #                  VarParsing.varType.int,
28 < #                  'Run this on real data')
24 > options.register ('use',
25 >                  '',
26 >                  VarParsing.multiplicity.singleton,
27 >                  VarParsing.varType.string,
28 >                  'Stop1 decay in')
29   options.parseArguments()
30   print options
31  
# Line 37 | Line 37 | print options
37   process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(options.maxEvents) )
38   ## Report every ..
39   process.load("FWCore.MessageService.MessageLogger_cfi")
40 < process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(100)
40 > process.MessageLogger.cerr.FwkReport.reportEvery = cms.untracked.int32(2000)
41  
42   ## Source
43 + stop2 = str(options.st2)                        # Convert it into string only for inputfile names
44 + stop1 = str(options.st1)
45   process.source = cms.Source("PoolSource",
46      fileNames = cms.untracked.vstring(
47 < #           'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_bj_250_100/st2_h_bb_st1_bj_250_100_tlbsm_53x_v2_mcst2_h_bb_st1_bj_250_100_1_tlbsm_53x_v2_mc.root',
48 < #           'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_bj_250_100/st2_h_bb_st1_bj_250_100_tlbsm_53x_v2_mcst2_h_bb_st1_bj_250_100_2_tlbsm_53x_v2_mc.root',
49 < #           'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_bj_250_100/st2_h_bb_st1_bj_250_100_tlbsm_53x_v2_mcst2_h_bb_st1_bj_250_100_3_tlbsm_53x_v2_mc.root',
50 < #           'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_bj_250_100/st2_h_bb_st1_bj_250_100_tlbsm_53x_v2_mcst2_h_bb_st1_bj_250_100_4_tlbsm_53x_v2_mc.root'
51 < 'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_jj_250_100/st2_h_bb_st1_jj_250_100_tlbsm_53x_v2_mc_2.root',
50 < 'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_jj_250_100/st2_h_bb_st1_jj_250_100_tlbsm_53x_v2_mc_3.root',
51 < 'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_jj_250_100/st2_h_bb_st1_jj_250_100_tlbsm_53x_v2_mc_4.root',
52 < 'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_jj_250_100/st2_h_bb_st1_jj_250_100_tlbsm_53x_v2_mc.root'
47 >            ##### For normal process
48 >            'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'_tlbsm_53x_v2_mc_1.root',
49 >            'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'_tlbsm_53x_v2_mc_2.root',
50 >            'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'_tlbsm_53x_v2_mc_3.root',
51 >            'file:/eos/uscms/store/user/algomez/Stops/PATTuples/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'_tlbsm_53x_v2_mc_4.root'
52  
53      )
54   )
55  
56 + ## Output Dir
57 + output_Dir='/uscms_data/d3/algomez/files/stops/GenPlots/st2_h_bb_st1_'+options.use+'_'+stop2+'_'+stop1+'/'
58 +
59  
60   ###############################
61   ########## Gen Setup ##########
# Line 62 | Line 64 | process.source = cms.Source("PoolSource"
64   process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")
65  
66  
67 + ############################# The following EDAnalyzer are usefull for simple analysis,
68 + ############################# but I am not using them for the current GenAnalysis.
69   ## Print Tree
70   process.printGenParticle = cms.EDAnalyzer("ParticleListDrawer",
71 <                src = cms.InputTag("prunedGenParticles"),
71 >                #src = cms.InputTag("prunedGenParticles"),
72 >                src = cms.InputTag("genParticles"),
73                  maxEventsToPrint = cms.untracked.int32(1)
74                  )
75  
# Line 129 | Line 134 | process.partonPlusBHistos= cms.EDAnalyze
134                          )
135                  )
136  
137 + dummyprocess = -999
138 + if options.use=='bj': dummyprocess = 1
139 + else: dummyprocess = 0
140   ############################
141   ###### My Analyzer  ########
142   ############################
143   process.genHistos = cms.EDAnalyzer('GenAnalyzer',
144 <                src = cms.InputTag("prunedGenParticles"),
145 <                stop1Mass = cms.double(options.stop1mass),
146 <                stop2Mass = cms.double(options.stop2mass)
144 >                #src = cms.InputTag("prunedGenParticles"),
145 >                src = cms.InputTag("genParticles"),
146 >                stop1Mass = cms.double(options.st1),
147 >                stop2Mass = cms.double(options.st2),
148 >                st1decay = cms.double(dummyprocess)
149   )
150  
151   #############################
152   ###### Output module  #######
153   #############################
154   process.TFileService = cms.Service("TFileService",
155 <                fileName = cms.string (options.output)
155 >                fileName = cms.string (output_Dir+options.output)
156   )
157  
158  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines