CMS 3D CMS Logo

Functions
RestoreRandomSeedsSim Namespace Reference

Functions

def customise (process)
 

Function Documentation

def RestoreRandomSeedsSim.customise (   process)

Definition at line 7 of file RestoreRandomSeedsSim.py.

References reco.return().

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