CMS 3D CMS Logo

Functions
SaveRandomSeedsSim Namespace Reference

Functions

def customise (process)
 

Function Documentation

def SaveRandomSeedsSim.customise (   process)

Definition at line 7 of file SaveRandomSeedsSim.py.

References reco.return().

7 def customise(process):
8  #Renaming the process
9  process.__dict__['_Process__name']='SIMSavingSeeds'
10  #Storing the random seeds
11  #This would no more be necessary, randomEngineStateProducer is always in the configuration
12  #But I prefer to delete it and call it rndStore:
13  #del process.randomEngineStateProducer
14  process.rndmStore=cms.EDProducer("RandomEngineStateProducer")
15  #Adding the RandomEngine seeds to the content
16  process.output.outputCommands.append("keep RandomEngineStates_*_*_*")
17  process.rndmStore_step=cms.Path(process.rndmStore)
18  #Modifying the schedule:
19  #First delete the current one:
20  del process.schedule[:]
21  #Then add the wanted sequences
22  process.schedule.append(process.simulation_step)
23  process.schedule.append(process.rndmStore_step)
24  process.schedule.append(process.out_step)
25  #Adding SimpleMemoryCheck service:
26  process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck",
27  ignoreTotal=cms.untracked.int32(1),
28  oncePerEventMode=cms.untracked.bool(True))
29  #Adding Timing service:
30  process.Timing=cms.Service("Timing")
31 
32  #Tweak Message logger to dump G4cout and G4cerr messages in G4msg.log
33  process.MessageLogger.destinations=cms.untracked.vstring('warnings'
34  , 'errors'
35  , 'infos'
36  , 'debugs'
37  , 'cout'
38  , 'cerr'
39  , 'G4msg'
40  )
41  process.MessageLogger.categories=cms.untracked.vstring('FwkJob'
42  ,'FwkReport'
43  ,'FwkSummary'
44  ,'Root_NoDictionary'
45  ,'G4cout'
46  ,'G4cerr'
47  )
48  process.MessageLogger.cerr = cms.untracked.PSet(
49  noTimeStamps = cms.untracked.bool(True)
50  )
51  process.MessageLogger.G4msg = cms.untracked.PSet(
52  noTimeStamps = cms.untracked.bool(True)
53  ,threshold = cms.untracked.string('INFO')
54  ,INFO = cms.untracked.PSet(limit = cms.untracked.int32(0))
55  ,G4cout = cms.untracked.PSet(limit = cms.untracked.int32(-1))
56  ,G4cerr = cms.untracked.PSet(limit = cms.untracked.int32(-1))
57  )
58  return(process)
59 
def customise(process)
return(e1-e2)*(e1-e2)+dp *dp