CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch1/src/Configuration/StandardSequences/python/Mixing.py

Go to the documentation of this file.
00001 Mixing = {}
00002 
00003 
00004 def addMixingScenario(label,dict):
00005     global Mixing
00006     if label in Mixing:
00007         print 'duplicated definition of',label
00008     else:
00009         #try:
00010         #    m=__import__(dict['file'])
00011         #except:
00012         #    raise Exception('no file'+dict['file']+'to be loaded')
00013         Mixing[label]=dict
00014 
00015 ##full sim section
00016 addMixingScenario("156BxLumiPileUp",{'file': 'SimGeneral.MixingModule.StageA156Bx_cfi'})
00017 addMixingScenario("E10TeV_FIX_1_BX432",{'file': 'SimGeneral.MixingModule.mix_E10TeV_FIX_1_BX432_cfi'})
00018 addMixingScenario("E10TeV_FIX_2_BX432",{'file': 'SimGeneral.MixingModule.mix_E10TeV_FIX_1_BX432_cfi', 'N': 2})
00019 addMixingScenario("E10TeV_FIX_3_BX432",{'file': 'SimGeneral.MixingModule.mix_E10TeV_FIX_1_BX432_cfi', 'N': 3})
00020 addMixingScenario("E10TeV_FIX_5_BX432",{'file': 'SimGeneral.MixingModule.mix_E10TeV_FIX_1_BX432_cfi', 'N': 5})
00021 addMixingScenario("E10TeV_L13E31_BX432",{'file': 'SimGeneral.MixingModule.mix_E10TeV_L13E31_BX432_cfi'})
00022 addMixingScenario("E10TeV_L21E31_BX432",{'file': 'SimGeneral.MixingModule.mix_E10TeV_L21E31_BX432_cfi'})
00023 addMixingScenario("E14TeV_L10E33_BX2808",{'file': 'SimGeneral.MixingModule.mix_E14TeV_L10E33_BX2808_cfi'})
00024 addMixingScenario("E14TeV_L28E32_BX2808",{'file': 'SimGeneral.MixingModule.mix_E14TeV_L28E32_BX2808_cfi'})
00025 addMixingScenario("E7TeV_AVE_01_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi', 'N': 0.1})
00026 addMixingScenario("E7TeV_AVE_02_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi', 'N': 0.2})
00027 addMixingScenario("E7TeV_AVE_05_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi', 'N': 0.5})
00028 addMixingScenario("E7TeV_AVE_10_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi', 'N': 10})
00029 addMixingScenario("E7TeV_AVE_1_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_1_BX156_cfi', 'N': 1})
00030 addMixingScenario("E7TeV_AVE_1_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi', 'N': 1})
00031 addMixingScenario("E7TeV_AVE_20_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi', 'N': 20})
00032 addMixingScenario("E7TeV_AVE_2_8_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_8_BX_50ns_cfi'})
00033 addMixingScenario("E7TeV_AVE_2_8_BXgt50ns_intime_only",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_8_BXgt50ns_intime_only_cfi'})
00034 addMixingScenario("E7TeV_AVE_2_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_1_BX156_cfi','N': 2})
00035 addMixingScenario("E7TeV_AVE_2_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi'})
00036 addMixingScenario("E7TeV_AVE_3_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_1_BX156_cfi','N': 3})
00037 addMixingScenario("E7TeV_AVE_50_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi','N': 50})
00038 addMixingScenario("E7TeV_AVE_5_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_1_BX156_cfi', 'N': 5})
00039 addMixingScenario("E7TeV_AVE_5_BX2808",{'file': 'SimGeneral.MixingModule.mix_E7TeV_AVE_2_BX2808_cfi', 'N': 5})
00040 addMixingScenario("E7TeV_FIX_1_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FIX_1_BX156_cfi'})
00041 addMixingScenario("E7TeV_FIX_2_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FIX_1_BX156_cfi', 'N': 2})
00042 addMixingScenario("E7TeV_FIX_3_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FIX_1_BX156_cfi', 'N': 3})
00043 addMixingScenario("E7TeV_FIX_5_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FIX_1_BX156_cfi', 'N': 5})
00044 addMixingScenario("E7TeV_L34E30_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_L34E30_BX156_cfi'})
00045 addMixingScenario("E7TeV_L69E30_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_L69E30_BX156_cfi'})
00046 addMixingScenario("E8TeV_AVE_4_BX_50ns",{'file':'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50,'B': (-3,2),'N': 4})
00047 addMixingScenario("E8TeV_AVE_10_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-3,2), 'N': 10})
00048 addMixingScenario("E8TeV_AVE_16_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi'})
00049 addMixingScenario("E8TeV_AVE_16_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX': 50, 'B': (-3,2)})
00050 addMixingScenario("HiMix",{'file': 'SimGeneral.MixingModule.HiEventMixing_cff'})
00051 addMixingScenario("HighLumiPileUp",{'file': 'SimGeneral.MixingModule.mixHighLumPU_cfi'})
00052 addMixingScenario("InitialLumiPileUp",{'file': 'SimGeneral.MixingModule.mixInitialLumPU_cfi'})
00053 addMixingScenario("LowLumiPileUp",{'file': 'SimGeneral.MixingModule.mixLowLumPU_cfi'})
00054 addMixingScenario("LowLumiPileUp4Sources",{'file': 'SimGeneral.MixingModule.mixLowLumPU_4sources_cfi'})
00055 addMixingScenario("LowLumiPileUp4Sources_ProdStep1",{'file': 'SimGeneral.MixingModule.mixLowLumPU_4sources_mixProdStep1_cfi'})
00056 addMixingScenario("LowLumiPileUp_ProdStep1",{'file': 'SimGeneral.MixingModule.mixLowLumPU_mixProdStep1_cfi'})
00057 addMixingScenario("NoPileUp",{'file': 'SimGeneral.MixingModule.mixNoPU_cfi'})
00058 addMixingScenario("E7TeV_ProbDist_2010Data_BX156",{'file': 'SimGeneral.MixingModule.mix_E7TeV_ProbDist_2010Data_BX156_cfi'})
00059 addMixingScenario("E8TeV_ProbDist_2011EarlyData_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_ProbDist_2011EarlyData_50ns_cfi'})
00060 addMixingScenario("E8TeV_FlatDist_2011EarlyData_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_FlatDist_2011EarlyData_50ns_cfi'})
00061 addMixingScenario("E7TeV_FlatDist10_2011EarlyData_50ns",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FlatDist10_2011EarlyData_50ns_cfi'})
00062 addMixingScenario("E7TeV_FlatDist10_2011EarlyData_75ns",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FlatDist10_2011EarlyData_75ns_cfi'})
00063 addMixingScenario("E7TeV_FlatDist10_2011EarlyData_inTimeOnly",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FlatDist10_2011EarlyData_inTimeOnly_cfi'})
00064 addMixingScenario("E7TeV_Flat20_AllEarly_75ns",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Flat20_AllEarly_75ns_cfi'})
00065 addMixingScenario("E7TeV_Flat20_AllLate_75ns",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Flat20_AllLate_75ns_cfi'})
00066 addMixingScenario("E7TeV_Flat20_AllEarly_50ns",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Flat20_AllEarly_50ns_cfi'})
00067 addMixingScenario("E7TeV_Flat20_AllLate_50ns",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Flat20_AllLate_50ns_cfi'})
00068 addMixingScenario("E7TeV_FlatDist10_2011EarlyData_50ns_PoissonOOT",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FlatDist10_2011EarlyData_50ns_PoissonOOT'})
00069 addMixingScenario("E7TeV_FlatDist10_2011EarlyData_25ns_PoissonOOT",{'file': 'SimGeneral.MixingModule.mix_E7TeV_FlatDist10_2011EarlyData_25ns_PoissonOOT_cfi'})
00070 addMixingScenario("E7TeV_Ave18p4_50ns", {'file': 'SimGeneral.MixingModule.mix_E7TeV_Ave18p4_50ns_cfi'})
00071 addMixingScenario("E7TeV_Ave23_50ns", {'file': 'SimGeneral.MixingModule.mix_E7TeV_Ave18p4_50ns_cfi', 'N': 23 })
00072 addMixingScenario("E7TeV_Ave32_50ns", {'file': 'SimGeneral.MixingModule.mix_E7TeV_Ave18p4_50ns_cfi', 'N': 32 })
00073 addMixingScenario("E7TeV_Ave25_50ns_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Ave25_50ns_PoissonOOTPU_cfi'})
00074 addMixingScenario("E7TeV_Ave25_25ns_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Ave25_25ns_PoissonOOTPU_cfi'})
00075 addMixingScenario("E7TeV_Fall2011ReDigi_prelim_50ns_PoissonOOT",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Fall2011ReDigi_prelim_50ns_PoissonOOT_cfi'})
00076 addMixingScenario("E7TeV_Fall2011ReDigi_50ns_PoissonOOT",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Fall2011ReDigi_50ns_PoissonOOT_cfi'})
00077 addMixingScenario("E7TeV_Fall2011ReDigi_25ns_PoissonOOT",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Fall2011ReDigi_25ns_PoissonOOT_cfi'})
00078 addMixingScenario("E7TeV_Fall2011_Reprocess_50ns_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Fall2011_Reprocess_50ns_PoissonOOTPU_cfi'})
00079 addMixingScenario("E7TeV_Chamonix2012_50ns_PoissonOOT",{'file': 'SimGeneral.MixingModule.mix_E7TeV_Chamonix2012_50ns_PoissonOOT_cfi'})
00080 addMixingScenario("2012_lumiLevel_15_20_50ns_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012_lumiLevel_15_20_50ns_PoissonOOTPU_cfi'})
00081 addMixingScenario("2012_peak11_25ns_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012_peak11_25ns_PoissonOOTPU_cfi'})
00082 addMixingScenario("2012_peak26_50ns_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012_peak26_50ns_PoissonOOTPU_cfi'})
00083 addMixingScenario("2012_Startup_50ns_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012_Startup_50ns_PoissonOOTPU_cfi'})
00084 addMixingScenario("2012_Summer_50ns_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012_Summer_50ns_PoissonOOTPU_cfi'})
00085 addMixingScenario("2012A_Profile_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012A_Profile_PoissonOOTPU_cfi'})
00086 addMixingScenario("2012B_Profile_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012B_Profile_PoissonOOTPU_cfi'})
00087 addMixingScenario("2012C_Profile_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012C_Profile_PoissonOOTPU_cfi'})
00088 addMixingScenario("2012D_Profile_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_2012D_Profile_PoissonOOTPU_cfi'})
00089 addMixingScenario("E8TeV_2012_25nsRunning_PoissonOOTPU",{'file': 'SimGeneral.MixingModule.mix_E8TeV_2012_25nsRunning_PoissonOOTPU_cfi'})
00090 addMixingScenario("E8TeV_2012_25nsRunning_TrainBackOOTPU",{'file': 'SimGeneral.MixingModule.mix_E8TeV_2012_25nsRunning_TrainBackOOTPU_cfi'})
00091 addMixingScenario("E8TeV_2012_25nsRunning_TrainFrontOOTPU",{'file': 'SimGeneral.MixingModule.mix_E8TeV_2012_25nsRunning_TrainFrontOOTPU_cfi'})
00092 addMixingScenario("2012_Summer_50ns_PoissonOOTPU_FixedInTime0",{'file': 'SimGeneral.MixingModule.mix_2012_Summer_50ns_PoissonOOTPU_FixedInTime0_cfi'})
00093 addMixingScenario("2012_Summer_50ns_PoissonOOTPU_FixedInTime30",{'file': 'SimGeneral.MixingModule.mix_2012_Summer_50ns_PoissonOOTPU_FixedInTime30_cfi'})
00094 addMixingScenario("ProdStep2",{'file': 'SimGeneral.MixingModule.mixProdStep2_cfi'})
00095 addMixingScenario("fromDB",{'file': 'SimGeneral.MixingModule.mix_fromDB_cfi'})
00096 ##fastsim section
00097 addMixingScenario("FS_NoPileUp",{'file': 'FastSimulation.PileUpProducer.PileUpSimulator_NoPileUp_cff'})
00098 addMixingScenario("FS_LowLumiPileUp",{'file': 'FastSimulation.PileUpProducer.PileUpSimulator_LowLumiPileUp_cff'})
00099 addMixingScenario("FS_FlatDist10_2011EarlyData_inTimeOnly",{'file': 'FastSimulation.PileUpProducer.PileUpSimulator_FlatDist10_2011EarlyData_inTimeOnly_cff'})
00100 addMixingScenario("FS_E7TeV_Fall2011_Reprocess_inTimeOnly",{'file': 'FastSimulation.PileUpProducer.PileUpSimulator_E7TeV_Fall2011_Reprocess_inTimeOnly_cff'})
00101 addMixingScenario("FS_E7TeV_ProbDist_2011Data_inTimeOnly",{'file': 'FastSimulation.PileUpProducer.PileUpSimulator_E7TeV_ProbDist_2011Data_inTimeOnly_cff'})
00102 addMixingScenario("FS_2012_Startup_inTimeOnly",{'file': 'FastSimulation.PileUpProducer.PileUpSimulator_2012_Startup_inTimeOnly_cff'})
00103 addMixingScenario("FS_2012_Summer_inTimeOnly",{'file': 'FastSimulation.PileUpProducer.PileUpSimulator_2012_Summer_inTimeOnly_cff'})
00104 addMixingScenario("FS_mix_2012_Startup_inTimeOnly",{'file': 'FastSimulation.PileUpProducer.mix_2012_Startup_inTimeOnly_cff'})
00105 addMixingScenario("FS_mix_2012_Summer_inTimeOnly",{'file': 'FastSimulation.PileUpProducer.mix_2012_Summer_inTimeOnly_cff'})
00106 
00107 
00108 #scenarios for L1 tdr work
00109 addMixingScenario("AVE_25_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 25})
00110 addMixingScenario("AVE_25_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 25})
00111 addMixingScenario("AVE_35_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 35})
00112 addMixingScenario("AVE_35_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 35})
00113 addMixingScenario("AVE_50_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 50})
00114 addMixingScenario("AVE_50_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 50})
00115 addMixingScenario("AVE_75_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 75})
00116 addMixingScenario("AVE_75_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 75})
00117 addMixingScenario("AVE_100_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 100})
00118 addMixingScenario("AVE_100_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 100})
00119 addMixingScenario("AVE_125_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 125})
00120 addMixingScenario("AVE_125_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 125})
00121 addMixingScenario("AVE_150_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 150})
00122 addMixingScenario("AVE_150_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 150})
00123 addMixingScenario("AVE_175_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 175})
00124 addMixingScenario("AVE_175_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 175})
00125 addMixingScenario("AVE_200_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 200})
00126 addMixingScenario("AVE_200_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 200})
00127 addMixingScenario("AVE_140_BX_50ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':50, 'B': (-5,3), 'N': 140})
00128 addMixingScenario("AVE_140_BX_25ns",{'file': 'SimGeneral.MixingModule.mix_E8TeV_AVE_16_BX_25ns_cfi','BX':25, 'B': (-5,3), 'N': 140})
00129 
00130 
00131 MixingDefaultKey = '2012_Summer_50ns_PoissonOOTPU'
00132 MixingFSDefaultKey = '2012_Summer_inTimeOnly'
00133 
00134 def printMe():
00135     global Mixing
00136     keys = Mixing.keys()
00137     keys.sort()
00138     fskeys=[]
00139     for key in keys:
00140         if '_FS' in key:
00141             fskeys.append(key)
00142         else:
00143             print 'addMixingScenario("%s",%s)'%(key,repr(Mixing[key]))
00144 
00145     for key in fskeys:
00146         print 'addMixingScenario("%s",%s)'%(key,repr(Mixing[key]))
00147 
00148 
00149 def defineMixing(dict,FS=False):
00150     commands=[]
00151     if 'N' in dict:
00152         if FS:
00153             commands.append('process.famosPileUp.PileUpSimulator.averageNumber = cms.double(%f)'%(dict['N'],))
00154         else:
00155             commands.append('process.mix.input.nbPileupEvents.averageNumber = cms.double(%f)'%(dict['N'],))
00156         dict.pop('N')
00157     if 'BX' in dict:
00158         commands.append('process.mix.bunchspace = cms.int32(%d)'%(dict['BX'],))
00159         dict.pop('BX')
00160     if 'B' in dict:
00161         commands.append('process.mix.minBunch = cms.int32(%d)'%(dict['B'][0],))
00162         commands.append('process.mix.maxBunch = cms.int32(%d)'%(dict['B'][1],))
00163         dict.pop('B')
00164     if 'F' in dict:
00165         commands.append('process.mix.input.fileNames = cms.untracked.vstring(%s)'%(repr(dict['F'])))
00166         dict.pop('F')
00167     return commands