ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitProd/TreeFiller/python/GenExample.py
Revision: 1.5
Committed: Thu Mar 19 16:35:41 2009 UTC (16 years, 1 month ago) by loizides
Content type: text/x-python
Branch: MAIN
CVS Tags: Mit_009c, Mit_009b, Mit_009a, Mit_009, Mit_008
Changes since 1.4: +5 -9 lines
Log Message:
Updated example to include FillerMCEventInfo

File Contents

# Content
1 # $Id: GenExample.py,v 1.4 2009/03/17 17:21:09 loizides Exp $
2
3 import FWCore.ParameterSet.Config as cms
4
5 process = cms.Process('HLT')
6
7 process.load('Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff')
8 process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
9
10
11 process.maxEvents = cms.untracked.PSet(
12 input = cms.untracked.int32(100)
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 fillers = cms.untracked.vstring('MetaInfos',
40 'MCParticles',
41 'MCEventInfo'),
42
43 MetaInfos = cms.untracked.PSet(
44 hltActive = cms.untracked.bool(False),
45 fillerType = cms.untracked.string('FillerMetaInfos')
46 ),
47
48 MCParticles = cms.untracked.PSet(
49 simActive = cms.untracked.bool(False),
50 fillerType = cms.untracked.string('FillerMCParticles')
51 )
52 )
53
54 process.p0 = cms.Path( process.pgen * process.MitTreeFiller)
55
56 # also make Edm output for the events we generate
57 process.load('Configuration.EventContent.EventContent_cff')
58
59 process.FEVT = cms.OutputModule("PoolOutputModule",
60 process.FEVTSIMEventContent,
61 fileName = cms.untracked.string('edm-gen.root'),
62 )
63
64 process.end = cms.EndPath( process.FEVT )