ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeFiller/python/GenExample.py
Revision: 1.1
Committed: Sat Sep 13 12:47:59 2008 UTC (16 years, 7 months ago) by sixie
Content type: text/x-python
Branch: MAIN
Log Message:
python version of example for MC generation.

File Contents

# User Rev Content
1 sixie 1.1 # $Id $
2    
3     import FWCore.ParameterSet.Config as cms
4    
5     process = cms.Process('HLT')
6    
7     Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff')
8     process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
9    
10    
11     process.maxEvents = cms.untracked.PSet(
12     input = cms.untracked.int32(10)
13     )
14    
15     process.source = cms.Source("PythiaSource",
16     pythiaPylistVerbosity = cms.untracked.int32(0),
17     filterEfficiency = cms.untracked.double(1.0),
18     pythiaHepMCVerbosity = cms.untracked.bool(False),
19     #comEnergy = cms.untracked.double(10000.0),
20     maxEventsToPrint = cms.untracked.int32(0),
21    
22     PythiaParameters = cms.PSet(
23     parameterSets = cms.vstring()
24     )
25     )
26    
27     # load generator sequence (VtxSmeared is needed inside, missing dependence)
28     process.load('Configuration.StandardSequences.VtxSmearedBetafuncEarlyCollision_cff')
29     process.load('Configuration.StandardSequences.Generator_cff')
30    
31     # include the MIT services and standard filler
32     process.ObjectService = cms.Service("ObjectService")
33    
34     process.TreeService = cms.Service("TreeService",
35     fileNames = cms.untracked.vstring("mit-gen")
36     )
37    
38     process.MitTreeFiller = cms.EDAnalyzer("FillMitTree",
39     defactive = cms.untracked.bool(False),
40    
41     MetaInfos = cms.untracked.PSet(
42     active = cms.untracked.bool(True),
43     hltActive = cms.untracked.bool(False),
44     ),
45    
46     MCParticles = cms.untracked.PSet(
47     active = cms.untracked.bool(True),
48     genActive = cms.untracked.bool(True),
49     simActive = cms.untracked.bool(False),
50     )
51     )
52    
53     process.p0 = cms.Path( process.pgen * process.MitTreeFiller)
54    
55     # also make Edm output for the events we generate
56     process.load('Configuration.EventContent.EventContent_cff')
57    
58     process.FEVT = cms.OutputModule("PoolOutputModule",
59     process.FEVTSIMEventContent,
60     fileName = cms.untracked.string('edm-gen.root'),
61     )
62    
63     process.end = cms.EndPath( process.FEVT )