CMS 3D CMS Logo

Functions
RestoreRandomSeedsDigi Namespace Reference

Functions

def customise (process)
 

Function Documentation

def RestoreRandomSeedsDigi.customise (   process)

Definition at line 7 of file RestoreRandomSeedsDigi.py.

References reco.return().

7 def customise(process):
8  #Renaming the process
9  process.__dict__['_Process__name']='DIGIRestoringSeeds'
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.out_step.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.digitisation_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 
43  #Add these 3 lines to put back the summary for timing information at the end of the logfile
44  #(needed for TimeReport report)
45  if hasattr(process,'options'):
46  process.options.wantSummary = cms.untracked.bool(True)
47  else:
48  process.options = cms.untracked.PSet(
49  wantSummary = cms.untracked.bool(True)
50  )
51 
52  return(process)
53 
return(e1-e2)*(e1-e2)+dp *dp