CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/TauAnalysis/MCEmbeddingTools/python/customizePU.py

Go to the documentation of this file.
00001 # -*- coding: utf-8 -*-
00002 import FWCore.ParameterSet.Config as cms
00003 
00004 
00005 def customise(process):
00006 
00007 
00008   print "Add "
00009   print "process.local = cms.PSet() # for local running "
00010   if hasattr(process,"local"):
00011     print "#########################################################"
00012     print "  local run!"
00013     print "#########################################################"
00014     print
00015     print
00016     print
00017     
00018     base="file:/scratch/scratch0/tfruboes/DATA_tmp/RelValMinBias/CMSSW_4_2_0_pre4-MC_42_V1-v1/GEN-SIM-DIGI-RAW-HLTDEBUG/"
00019     process.mix.input.fileNames = cms.untracked.vstring(
00020                                        base+'4C824492-2639-E011-9506-001A928116F0.root', 
00021                                        base+'9ED6309B-C238-E011-A1D6-003048678ADA.root', 
00022                                        base+'487A3591-CA38-E011-92A8-00248C0BE013.root', 
00023                                        base+'0E5A4D31-BD38-E011-93B7-0026189437F2.root')
00024 
00025 
00026 
00027   process.mix.input.nbPileupEvents.probFunctionVariable = cms.vint32()
00028   process.mix.input.nbPileupEvents.probValue = cms.vdouble()
00029   #print dir(process.mix.input.nbPileupEvents.probValue)
00030   for i in range(0,51):
00031     process.mix.input.nbPileupEvents.probFunctionVariable.append(i)
00032     val=0.25
00033     if i == 0 or i==9 or i==19 or i==29:
00034     #val=1
00035     #if i==0:
00036       process.mix.input.nbPileupEvents.probValue.append(val)
00037     else:
00038       process.mix.input.nbPileupEvents.probValue.append(0.)
00039 
00040   return(process)