1 |
loizides |
1.5 |
# $Id: GenExample.py,v 1.4 2009/03/17 17:21:09 loizides Exp $
|
2 |
sixie |
1.1 |
|
3 |
|
|
import FWCore.ParameterSet.Config as cms
|
4 |
|
|
|
5 |
|
|
process = cms.Process('HLT')
|
6 |
|
|
|
7 |
bendavid |
1.3 |
process.load('Configuration.StandardSequences.SimulationRandomNumberGeneratorSeeds_cff')
|
8 |
sixie |
1.1 |
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
process.maxEvents = cms.untracked.PSet(
|
12 |
loizides |
1.4 |
input = cms.untracked.int32(100)
|
13 |
sixie |
1.1 |
)
|
14 |
|
|
|
15 |
|
|
process.source = cms.Source("PythiaSource",
|
16 |
|
|
pythiaPylistVerbosity = cms.untracked.int32(0),
|
17 |
loizides |
1.4 |
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 |
sixie |
1.1 |
|
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 |
loizides |
1.4 |
fillers = cms.untracked.vstring('MetaInfos',
|
40 |
loizides |
1.5 |
'MCParticles',
|
41 |
|
|
'MCEventInfo'),
|
42 |
sixie |
1.1 |
|
43 |
|
|
MetaInfos = cms.untracked.PSet(
|
44 |
loizides |
1.4 |
hltActive = cms.untracked.bool(False),
|
45 |
|
|
fillerType = cms.untracked.string('FillerMetaInfos')
|
46 |
sixie |
1.1 |
),
|
47 |
|
|
|
48 |
|
|
MCParticles = cms.untracked.PSet(
|
49 |
loizides |
1.5 |
simActive = cms.untracked.bool(False),
|
50 |
|
|
fillerType = cms.untracked.string('FillerMCParticles')
|
51 |
sixie |
1.1 |
)
|
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 )
|