CMS 3D CMS Logo

mix_fromDB_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 # here we define part of the configuration of MixingModule
4 # the rest, notably:
5 # "input","bunchspace","minBunch","maxBunch"
6 # is to be retrieved from database
7 # see: https://twiki.cern.ch/twiki/bin/viewauth/CMS/PdmVRunDependentMC
8 
9 # configuration to model pileup for initial physics phase
10 from SimGeneral.MixingModule.mixObjects_cfi import theMixObjects
13 
14 mix = cms.EDProducer("MixingModule",
15 
16  # this is where you activate reading from DB of: "input","bunchspace","minBunch","maxBunch"
17  readDB = cms.bool(True),
18 
19  digitizers = cms.PSet(theDigitizers),
20  LabelPlayback = cms.string(''),
21  maxBunch = cms.int32(314159), ## these three parameters are needed at instantiation time, BUT the actual value will NOT be used
22  minBunch = cms.int32(-314159), ## actual values will be retrieved from database
23 
24  bunchspace = cms.int32(314159), ## [ditto]
25  mixProdStep1 = cms.bool(False),
26  mixProdStep2 = cms.bool(False),
27 
28  playback = cms.untracked.bool(False),
29  useCurrentProcessOnly = cms.bool(False),
30 
31  input = cms.SecSource("EmbeddedRootSource",
32  type = cms.string('readDB'),
33  sequential = cms.untracked.bool(False),
34  fileNames = FileNames
35  ),
36 
37  mixObjects = cms.PSet(theMixObjects)
38  #mixObjects = cms.PSet(
39  # mixCH = cms.PSet(
40  # mixCaloHits
41  # ),
42  # mixTracks = cms.PSet(
43  # mixSimTracks
44  # ),
45  # mixVertices = cms.PSet(
46  # mixSimVertices
47  # ),
48  # mixSH = cms.PSet(
49  # mixSimHits
50  # ),
51  # mixHepMC = cms.PSet(
52  # mixHepMCProducts
53  # )
54  #)
55 )
56 
57 
58 
59 if mix.readDB == cms.bool(True):
60  print ' '
61  print 'MixingModule will be configured from db; this is mix.readDB : ',mix.readDB
62 else :
63  print ' '
64  print 'MixingModule is NOT going to be configured from db; this is mix.readDB : ',mix.readDB