00001 #G.Benelli 00002 #This fragment is used to add the SimpleMemoryCheck 00003 #and Timing services output to the log of the simulation 00004 #performance candles and add pile-up events at the DIGI level using the MixingModule. 00005 #It is meant to be used with the cmsDriver.py option 00006 #--customise in the following fashion: 00007 #E.g. 00008 #./cmsDriver.py MinBias.cfi -n 50 --step=GEN,SIM,DIGI --pileup LowLumiPileUp --customise=Validation/Performance/MixingModule.py >& MINBIAS_GEN,SIM,DIGI_PILEUP.log& 00009 00010 import FWCore.ParameterSet.Config as cms 00011 def customise(process): 00012 #Renaming the process 00013 process.__dict__['_Process__name']=process.__dict__['_Process__name']+'-PILEUP' 00014 #Adding SimpleMemoryCheck service: 00015 process.SimpleMemoryCheck=cms.Service("SimpleMemoryCheck", 00016 ignoreTotal=cms.untracked.int32(1), 00017 oncePerEventMode=cms.untracked.bool(True)) 00018 #Adding Timing service: 00019 process.Timing=cms.Service("Timing") 00020 00021 #Add these 3 lines to put back the summary for timing information at the end of the logfile 00022 #(needed for TimeReport report) 00023 process.options = cms.untracked.PSet( 00024 wantSummary = cms.untracked.bool(True) 00025 ) 00026 00027 #Overwriting the fileNames to be used by the MixingModule 00028 #when invoking cmsDriver.py with the --PU option 00029 process.mix.input.fileNames = cms.untracked.vstring('file:../INPUT_PILEUP_EVENTS.root') 00030 00031 return(process)