test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
RestoreRandomSeedsSim Namespace Reference

Functions

def customise
 

Function Documentation

def RestoreRandomSeedsSim.customise (   process)

Definition at line 7 of file RestoreRandomSeedsSim.py.

References reco.return().

7 
8 def customise(process):
9  #Renaming the process
10  process.__dict__['_Process__name']='SIMRestoringSeeds'
11  #Skipping the first 3 events:
12  process.PoolSource.skipEvents=cms.untracked.uint32(3)
13  #Adding RandomNumberGeneratorService
14  process.RandomNumberGeneratorService.restoreStateLabel=cms.untracked.string('rndmStore')
15  process.RandomNumberGeneratorService.VtxSmeared.initialSeed = cms.untracked.uint32(1)
16  process.RandomNumberGeneratorService.g4SimHits.initialSeed = cms.untracked.uint32(1)
17  process.RandomNumberGeneratorService.mix.initialSeed = cms.untracked.uint32(1)
18  process.RandomNumberGeneratorService.simSiPixelDigis.initialSeed = cms.untracked.uint32(1)
19  process.RandomNumberGeneratorService.simSiStripDigis.initialSeed = cms.untracked.uint32(1)
20  process.RandomNumberGeneratorService.simEcalUnsuppressedDigis.initialSeed = cms.untracked.uint32(1)
21  process.RandomNumberGeneratorService.simHcalUnsuppressedDigis.initialSeed = cms.untracked.uint32(1)
22  process.RandomNumberGeneratorService.simMuonCSCDigis.initialSeed = cms.untracked.uint32(1)
23  process.RandomNumberGeneratorService.simMuonDTDigis.initialSeed = cms.untracked.uint32(1)
24  process.RandomNumberGeneratorService.simMuonRPCDigis.initialSeed = cms.untracked.uint32(1)
25  #This line is necessary to eliminate the "theSource" (i.e. source seed) in the python configuration!
26  del process.RandomNumberGeneratorService.theSource
27  #Adding the RandomEngine seeds to the content
28  process.output.outputCommands.append("drop *_*_*_Sim")
29  process.output.outputCommands.append("keep RandomEngineStates_*_*_*")
30  process.g4SimHits_step=cms.Path(process.g4SimHits)
31  #Modifying the schedule:
32  #First delete the current one:
33  del process.schedule[:]
34  #Then add the wanted sequences
35  process.schedule.append(process.g4SimHits_step)
36  process.schedule.append(process.out_step)
37  #Adding SimpleMemoryCheck service:
38  process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
39  ignoreTotal=cms.untracked.int32(1),
40  oncePerEventMode=cms.untracked.bool(True))
41  #Adding Timing service:
42  process.Timing=cms.Service("Timing")
43  return(process)
return(e1-e2)*(e1-e2)+dp *dp