Functions | |
def | _generate_Higgs |
def | _generate_HpT |
def | _generate_MINBIAS |
def | _generate_PGUN |
def | _generate_QCD |
def | _generate_RS1GG |
def | _generate_TTBAR |
def | _generate_udscb_jets |
def | _generate_Wl |
def | _generate_Zll |
def | _generate_ZPJJ |
def | _generate_ZPll |
def | energy_split |
def | generate |
def | user_pythia_ue_settings |
Variables | |
float | ETA_MAX = 2.5 |
float | ETA_MIN = 2.5 |
string | mod_id = "[" |
def relval_generation_module::_generate_Higgs | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the generation of Higgs->ZZ->ll events The energy parameter is not used. According to the evt_type ("HZZMUMUMUMU" or "HZZEEEE") the final state is chosen.
Definition at line 243 of file relval_generation_module.py.
00244 : 00245 """ 00246 Here the settings for the generation of Higgs->ZZ->ll events 00247 The energy parameter is not used. According to the evt_type ("HZZMUMUMUMU" 00248 or "HZZEEEE") the final state is chosen. 00249 """ 00250 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00251 common.log( func_id+" Entering... ") 00252 00253 # Choose between muon, tau or electron decay of the Z 00254 z_flag="0" 00255 electron_flag = "0" 00256 muon_flag = "0" 00257 tau_flag = "0" 00258 gamma_flag="0" 00259 if evt_type == "HZZEEEE": 00260 electron_flag = "1" 00261 z_flag="1" 00262 elif evt_type == "HZZMUMUMUMU": 00263 muon_flag = "1" 00264 z_flag="1" 00265 elif evt_type == "HZZTTTT": 00266 tau_flag = "1" 00267 z_flag="1" 00268 elif evt_type == "HZZLLLL": 00269 electron_flag=muon_flag=tau_flag= "1" 00270 z_flag="1" 00271 elif evt_type == "HGG": 00272 gamma_flag="1" 00273 00274 00275 # Prepare The Pythia params 00276 params = cms.vstring( 00277 "PMAS(25,1)=%s" %energy, #mass of Higgs", 00278 "MSEL=0", 00279 #(D=1) to select between full user control 00280 #(0, then use MSUB) and some preprogrammed alternative: QCD hight pT 00281 #processes (1, then ISUB=11, 12, 13, 28, 53, 68), QCD low pT processes 00282 #(2, then ISUB=11, #12, 13, 28, 53, 68, 91, 92, 94, 95)", 00283 # 00284 #Check on possible errors during program 00285 #execution", 00286 "MSUB(102)=1", #ggH", 00287 "MSUB(123)=1", #ZZ fusion to H", 00288 "MSUB(124)=1", #WW fusion to H", 00289 "CKIN(45)=5.", 00290 "CKIN(46)=150.", 00291 #high mass cut on secondary resonance m1 in 00292 #2->1->2 process Registered by Alexandre.Nikitenko@cern.ch", 00293 "CKIN(47)=5.", 00294 #low mass cut on secondary resonance m2 in 00295 #2->1->2 process Registered by Alexandre.Nikitenko@cern.ch", 00296 "CKIN(48)=150.", 00297 #high mass cut on secondary resonance m2 in 00298 #2->1->2 process Registered by Alexandre.Nikitenko@cern.ch", 00299 "MDME(174,1)=0", #Z decay into d dbar", 00300 "MDME(175,1)=0", #Z decay into u ubar", 00301 "MDME(176,1)=0", #Z decay into s sbar", 00302 "MDME(177,1)=0", #Z decay into c cbar", 00303 "MDME(178,1)=0", #Z decay into b bbar", 00304 "MDME(179,1)=0", #Z decay into t tbar", 00305 "MDME(182,1)=%s" %electron_flag,#Z decay into e- e+", 00306 "MDME(183,1)=0", #Z decay into nu_e nu_ebar", 00307 "MDME(184,1)=%s" %muon_flag,#Z decay into mu- mu+", 00308 "MDME(185,1)=0", #Z decay into nu_mu nu_mubar", 00309 "MDME(186,1)=%s" %tau_flag,#Z decay into tau- tau+", 00310 "MDME(187,1)=0", #Z decay into nu_tau nu_taubar", 00311 "MDME(210,1)=0", #Higgs decay into dd", 00312 "MDME(211,1)=0", #Higgs decay into uu", 00313 "MDME(212,1)=0", #Higgs decay into ss", 00314 "MDME(213,1)=0", #Higgs decay into cc", 00315 "MDME(214,1)=0", #Higgs decay into bb", 00316 "MDME(215,1)=0", #Higgs decay into tt", 00317 "MDME(216,1)=0", #Higgs decay into", 00318 "MDME(217,1)=0", #Higgs decay into Higgs decay", 00319 "MDME(218,1)=0", #Higgs decay into e nu e", 00320 "MDME(219,1)=0", #Higgs decay into mu nu mu", 00321 "MDME(220,1)=0", #Higgs decay into tau nu tau", 00322 "MDME(221,1)=0", #Higgs decay into Higgs decay", 00323 "MDME(222,1)=0", #Higgs decay into g g", 00324 "MDME(223,1)=%s" %gamma_flag,#Higgs decay into gam gam", 00325 "MDME(224,1)=0", #Higgs decay into gam Z", 00326 "MDME(225,1)=%s" %z_flag, #Higgs decay into Z Z", 00327 "MDME(226,1)=0", #Higgs decay into W W" 00328 ) 00329 00330 # Build the process source 00331 generator = cms.EDFilter('Pythia6GeneratorFilter', 00332 pythiaPylistVerbosity=cms.untracked.int32(0), 00333 pythiaHepMCVerbosity=cms.untracked.bool(False), 00334 maxEventsToPrint = cms.untracked.int32(0), 00335 filterEfficiency = cms.untracked.double(1), 00336 pythiaVerbosity =cms.untracked.bool(False), 00337 PythiaParameters = cms.PSet\ 00338 (parameterSets = cms.vstring('PythiaUESettings','processParameters'), 00339 PythiaUESettings = user_pythia_ue_settings(), 00340 processParameters=params 00341 ) 00342 ) 00343 00344 common.log( func_id+" Returning Generator...") 00345 00346 return generator 00347 00348 #---------------------------------
def relval_generation_module::_generate_HpT | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the RS1 graviton into gamma gamma.
Definition at line 707 of file relval_generation_module.py.
00708 : 00709 """ 00710 Here the settings for the RS1 graviton into gamma gamma. 00711 """ 00712 00713 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00714 common.log( func_id+" Entering... ") 00715 00716 # Build the process source 00717 generator = cms.EDFilter("Pythia6GeneratorFilter", 00718 pythiaPylistVerbosity = cms.untracked.int32(0), 00719 pythiaHepMCVerbosity = cms.untracked.bool(False), 00720 maxEventsToPrint = cms.untracked.int32(0), 00721 filterEfficiency = cms.untracked.double(1.0), 00722 PythiaParameters = cms.PSet(\ 00723 parameterSets = cms.vstring('PythiaUESettings', 'processParameters', 'pythiaMSSMmhmax'), 00724 PythiaUESettings=user_pythia_ue_settings(), 00725 processParameters=cms.vstring\ 00726 ('MSEL = 0 ',# ! user control', 00727 'MSUB(401) = 1 ',# ! gg->tbH+ Registered by Alexandre.Nikitenko@cern.ch', 00728 'MSUB(402) = 1 ',# ! qq->tbH+ Registered by Alexandre.Nikitenko@cern.ch', 00729 'IMSS(1)= 1 ',# ! MSSM ', 'RMSS(5) = 30. ! TANBETA', 00730 'RMSS(19) = 200.',# ! (D=850.) m_A', 00731 'MDME(503,1)=0 ',# !Higgs(H+) decay into dbar u', 00732 'MDME(504,1)=0 ',# !Higgs(H+) decay into sbar c', 00733 'MDME(505,1)=0 ',# !Higgs(H+) decay into bbar t', 00734 'MDME(506,1)=0 ',# !Higgs(H+) decay into b bar t', 00735 'MDME(507,1)=0 ',# !Higgs(H+) decay into e+ nu_e', 00736 'MDME(508,1)=0 ',# !Higgs(H+) decay into mu+ nu_mu', 00737 'MDME(509,1)=1 ',# !Higgs(H+) decay into tau+ nu_tau', 00738 'MDME(510,1)=0 ',# !Higgs(H+) decay into tau prime+ nu_tau', 00739 'MDME(511,1)=0 ',# !Higgs(H+) decay into W+ h0', 00740 'MDME(512,1)=0 ',# !Higgs(H+) decay into ~chi_10 ~chi_1+', 00741 'MDME(513,1)=0 ',# !Higgs(H+) decay into ~chi_10 ~chi_2+', 00742 'MDME(514,1)=0 ',# !Higgs(H+) decay into ~chi_20 ~chi_1+', 00743 'MDME(515,1)=0 ',# !Higgs(H+) decay into ~chi_20 ~chi_2+', 00744 'MDME(516,1)=0 ',# !Higgs(H+) decay into ~chi_30 ~chi_1+', 00745 'MDME(517,1)=0 ',# !Higgs(H+) decay into ~chi_30 ~chi_2+', 00746 'MDME(518,1)=0 ',# !Higgs(H+) decay into ~chi_40 ~chi_1+', 00747 'MDME(519,1)=0 ',# !Higgs(H+) decay into ~chi_40 ~chi_2+', 00748 'MDME(520,1)=0 ',# !Higgs(H+) decay into ~t_1 ~b_1bar', 00749 'MDME(521,1)=0 ',# !Higgs(H+) decay into ~t_2 ~b_1bar', 00750 'MDME(522,1)=0 ',# !Higgs(H+) decay into ~t_1 ~b_2bar', 00751 'MDME(523,1)=0 ',# !Higgs(H+) decay into ~t_2 ~b_2bar', 00752 'MDME(524,1)=0 ',# !Higgs(H+) decay into ~d_Lbar ~u_L', 00753 'MDME(525,1)=0 ',# !Higgs(H+) decay into ~s_Lbar ~c_L', 00754 'MDME(526,1)=0 ',# !Higgs(H+) decay into ~e_L+ ~nu_eL', 00755 'MDME(527,1)=0 ',# !Higgs(H+) decay into ~mu_L+ ~nu_muL', 00756 'MDME(528,1)=0 ',# !Higgs(H+) decay into ~tau_1+ ~nu_tauL', 00757 'MDME(529,1)=0 '# !Higgs(H+) decay into ~tau_2+ ~nu_tauL'), 00758 ), 00759 pythiaMSSMmhmax = cms.vstring\ 00760 ('RMSS(2)= 200. ',# ! SU(2) gaugino mass ', 00761 'RMSS(3)= 800. ',# ! SU(3) (gluino) mass ', 00762 'RMSS(4)= 200. ',# ! higgsino mass parameter', 00763 'RMSS(6)= 1000. ',# ! left slepton mass', 00764 'RMSS(7)= 1000. ',# ! right slepton mass', 00765 'RMSS(8)= 1000. ',# ! right slepton mass', 00766 'RMSS(9)= 1000. ',# ! right squark mass', 00767 'RMSS(10)= 1000. ',# ! left sq mass for 3th gen/heaviest stop mass', 00768 'RMSS(11)= 1000. ',# ! right sbottom mass/lightest sbotoom mass', 00769 'RMSS(12)= 1000. ',# ! right stop mass/lightest stop mass', 00770 'RMSS(13)= 1000. ',# ! left stau mass', 00771 'RMSS(14)= 1000. ',# ! right stau mass', 00772 'RMSS(15)= 2449. ',# ! Ab', 00773 'RMSS(16)= 2449. ',# ! At', 00774 'RMSS(17)= 2449. '# ! Atau' 00775 ) 00776 ) 00777 ) 00778 00779 00780 common.log(func_id+" Returning Generator...") 00781 00782 return generator 00783 00784 #---------------------------------
def relval_generation_module::_generate_MINBIAS | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Settings for MINBIAS events generation
Definition at line 205 of file relval_generation_module.py.
00206 : 00207 """ 00208 Settings for MINBIAS events generation 00209 """ 00210 00211 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00212 common.log( func_id+" Entering... ") 00213 00214 # Build the process source 00215 generator = cms.EDFilter("Pythia6GeneratorFilter", 00216 pythiaPylistVerbosity=cms.untracked.int32(0), 00217 pythiaHepMCVerbosity=cms.untracked.bool(False), 00218 maxEventsToPrint = cms.untracked.int32(0), 00219 filterEfficiency = cms.untracked.double(1), 00220 PythiaParameters = cms.PSet\ 00221 (parameterSets = cms.vstring\ 00222 ("pythiaUESettings", 00223 "processParameters"), 00224 pythiaUESettings = user_pythia_ue_settings(), 00225 processParameters = cms.vstring( 00226 "MSEL=0", 00227 "MSUB(11)=1", 00228 "MSUB(12)=1", 00229 "MSUB(13)=1", 00230 "MSUB(28)=1", 00231 "MSUB(53)=1", 00232 "MSUB(68)=1", 00233 "MSUB(92)=1", 00234 "MSUB(93)=1", 00235 "MSUB(94)=1", 00236 "MSUB(95)=1")) 00237 ) 00238 common.log( func_id+" Returning Generator...") 00239 00240 return generator 00241 00242 #---------------------------------
def relval_generation_module::_generate_PGUN | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the simple generation of a muon, electron or gamma are stated.
Definition at line 74 of file relval_generation_module.py.
00075 : 00076 """ 00077 Here the settings for the simple generation of a muon, electron or gamma 00078 are stated. 00079 """ 00080 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00081 common.log( func_id+" Entering... ") 00082 00083 # pythia ID: configure the ID of the particle through a dictionary 00084 py_id_dict = {"MU-":13, 00085 "MU+":-13, 00086 "E" :11, 00087 "DIE":11, 00088 "TAU":15, 00089 "GAMMA":22, 00090 "PI+":211, 00091 "PI-":-211, 00092 "PI0":111} 00093 00094 # Build the id string of the event name: 00095 id_string = evt_type+" "+energy+" nevts "+ str(evtnumber) 00096 00097 # We have to check if we want to generate a particle with pt=X or Energy=X 00098 pt_flag=True 00099 if 'pt' in energy[0:2] or \ 00100 'Pt' in energy[0:2] or \ 00101 'PT' in energy[0:2]: 00102 energy=energy[2:] 00103 else: 00104 pt_flag=False 00105 00106 # Energy boundaries are now set: 00107 lower_energy = "" 00108 upper_energy = "" 00109 00110 00111 00112 # Build the partID string 00113 part_id = cms.untracked.vint32 () 00114 00115 part_id.append(py_id_dict[evt_type]) 00116 upper_energy='' 00117 lower_energy='' 00118 if energy.find('_')!=-1: 00119 upper_energy,lower_energy=energy_split(energy) 00120 else: 00121 epsilon= 0.001 00122 lower_energy = str ( int(energy) - epsilon) # We want a calculation and 00123 upper_energy = str ( int(energy) + epsilon) # the result as a string 00124 00125 # Build the process source 00126 if evt_type in ("TAU","E"): 00127 # Add the corresponding opposite sign particle. Only for taus and es. 00128 part_id.append(-1*part_id[0]) 00129 00130 antip_flag=False 00131 if evt_type=="DIE": 00132 antip_flag=True 00133 00134 if pt_flag: 00135 common.log( func_id+ "This is a pt particle gun ..." ) 00136 generator = cms.EDProducer("FlatRandomPtGunProducer", 00137 psethack = cms.string(id_string), 00138 firstRun = cms.untracked.uint32(1), 00139 PGunParameters = cms.PSet( 00140 PartID = part_id, 00141 MinEta = cms.double(ETA_MAX), 00142 MaxEta = cms.double(ETA_MIN), 00143 MinPhi = cms.double(-PI), 00144 MaxPhi = cms.double(PI), 00145 MinPt = cms.double(lower_energy), 00146 MaxPt = cms.double(upper_energy) 00147 ), 00148 AddAntiParticle=cms.bool(antip_flag), 00149 Verbosity = cms.untracked.int32(0) 00150 ) 00151 else: 00152 common.log( func_id+ " This is an Energy particle gun ..." ) 00153 generator = cms.EDProducer("FlatRandomEGunProducer", 00154 psethack = cms.string(id_string), 00155 firstRun = cms.untracked.uint32(1), 00156 PGunParameters = cms.PSet( 00157 PartID = part_id, 00158 MinEta = cms.double(ETA_MAX), 00159 MaxEta = cms.double(ETA_MIN), 00160 MinPhi = cms.double(-PI), 00161 MaxPhi = cms.double(PI), 00162 MinE = cms.double(lower_energy), 00163 MaxE = cms.double(upper_energy) 00164 ), 00165 AddAntiParticle=cms.bool(antip_flag), 00166 Verbosity = cms.untracked.int32(0) 00167 ) 00168 00169 common.log( func_id+" Returning Generator...") 00170 00171 return generator 00172 00173 #---------------------------
def relval_generation_module::_generate_QCD | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the generation of QCD events
Definition at line 174 of file relval_generation_module.py.
00175 : 00176 """ 00177 Here the settings for the generation of QCD events 00178 """ 00179 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00180 common.log( func_id+" Entering... ") 00181 00182 # Recover the energies from the string: 00183 upper_energy, lower_energy = energy_split(energy) 00184 00185 # Build the process source 00186 generator = cms.EDFilter("Pythia6GeneratorFilter", 00187 pythiaPylistVerbosity=cms.untracked.int32(0), 00188 pythiaHepMCVerbosity=cms.untracked.bool(False), 00189 maxEventsToPrint = cms.untracked.int32(0), 00190 filterEfficiency = cms.untracked.double(1), 00191 PythiaParameters = cms.PSet\ 00192 (parameterSets = cms.vstring\ 00193 ("pythiaUESettings", 00194 "processParameters"), 00195 pythiaUESettings = user_pythia_ue_settings(), 00196 processParameters = cms.vstring("MSEL=1", 00197 "CKIN(3)="+upper_energy, 00198 "CKIN(4)="+lower_energy)) 00199 ) 00200 00201 common.log( func_id+" Returning Generator...") 00202 return generator 00203 00204 #---------------------------------
def relval_generation_module::_generate_RS1GG | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the RS1 graviton into gamma gamma.
Definition at line 651 of file relval_generation_module.py.
00652 : 00653 """ 00654 Here the settings for the RS1 graviton into gamma gamma. 00655 """ 00656 00657 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00658 common.log( func_id+" Entering... ") 00659 00660 # Build the process source 00661 generator = cms.EDFilter('Pythia6GeneratorFilter', 00662 pythiaPylistVerbosity=cms.untracked.int32(0), 00663 pythiaHepMCVerbosity=cms.untracked.bool(False), 00664 maxEventsToPrint = cms.untracked.int32(0), 00665 filterEfficiency = cms.untracked.double(1), 00666 PythiaParameters = cms.PSet\ 00667 (parameterSets = cms.vstring('PythiaUESettings','processParameters'), 00668 PythiaUESettings=user_pythia_ue_settings(), 00669 processParameters=\ 00670 cms.vstring('MSEL=0 ', 00671 'MSUB(391) =1 ', 00672 'MSUB(392) =1 ', 00673 'PMAS(347,1) = %s ' %energy,# ! minv ', 00674 'PARP(50) = 0.54 ',# ! 0.54 == c=0.1', 00675 'MDME(4158,1)=0 ', 00676 'MDME(4159,1)=0 ', 00677 'MDME(4160,1)=0 ', 00678 'MDME(4161,1)=0 ', 00679 'MDME(4162,1)=0 ', 00680 'MDME(4163,1)=0 ', 00681 'MDME(4164,1)=0 ', 00682 'MDME(4165,1)=0 ', 00683 'MDME(4166,1)=0 ', 00684 'MDME(4167,1)=0 ', 00685 'MDME(4168,1)=0 ', 00686 'MDME(4169,1)=0 ', 00687 'MDME(4170,1)=0 ', 00688 'MDME(4170,1)=0 ', 00689 'MDME(4171,1)=0 ', 00690 'MDME(4172,1)=0 ', 00691 'MDME(4173,1)=0 ', 00692 'MDME(4174,1)=0 ', 00693 'MDME(4175,1)=1 ',#! gamma gamma ', 00694 'MDME(4176,1)=0 ', 00695 'MDME(4177,1)=0 ', 00696 'MDME(4178,1)=0 ', 00697 'CKIN(3)=20. ',#! minimum pt hat for hard interactions', 00698 'CKIN(4)=-1. '#! maximum pt hat for hard interactions' 00699 ) 00700 ) 00701 ) 00702 00703 common.log(func_id+" Returning Generator...") 00704 00705 return generator 00706 #-----------------------------------
def relval_generation_module::_generate_TTBAR | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the ttbar pairs are added to the process.
Definition at line 401 of file relval_generation_module.py.
00402 : 00403 """ 00404 Here the settings for the ttbar pairs are added to the process. 00405 """ 00406 00407 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00408 common.log(func_id+" Entering... ") 00409 00410 # Build the process source 00411 generator = cms.EDFilter('Pythia6GeneratorFilter', 00412 pythiaPylistVerbosity=cms.untracked.int32(0), 00413 pythiaHepMCVerbosity=cms.untracked.bool(False), 00414 maxEventsToPrint = cms.untracked.int32(0), 00415 filterEfficiency = cms.untracked.double(1), 00416 PythiaParameters = cms.PSet\ 00417 (parameterSets = cms.vstring\ 00418 ('pythiaUESettings', 00419 'processParameters'), 00420 pythiaUESettings = user_pythia_ue_settings(), 00421 # Tau jets (config by A. Nikitenko) 00422 # No tau -> electron 00423 # No tau -> muon 00424 processParameters =cms.vstring\ 00425 ("MSEL=0", # userdef process 00426 "MSUB(81)=1", # qqbar->QQbar 00427 "MSUB(82)=1", # gg to QQbar 00428 "MSTP(7)=6", # flavour top 00429 "PMAS(6,1)=175" # top mass 00430 ) 00431 ) 00432 ) 00433 00434 common.log(func_id+" Returning Generator...") 00435 00436 return generator 00437 00438 #---------------------------------
def relval_generation_module::_generate_udscb_jets | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings necessary to udscb jets generation are added. According to the flavour the Pythia parameters are changed slightly. For the time being the energy parameter is not used.
Definition at line 349 of file relval_generation_module.py.
00351 : 00352 """ 00353 Here the settings necessary to udscb jets generation are added. According 00354 to the flavour the Pythia parameters are changed slightly. 00355 For the time being the energy parameter is not used. 00356 """ 00357 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00358 common.log( func_id+" Entering... ") 00359 00360 # Recover the energies from the string: 00361 upper_energy, lower_energy = energy_split(energy) 00362 00363 # According to the evt_type build the Pythia settings: 00364 pythia_jet_settings=cms.vstring("MSEL=0") # User defined process 00365 pythia_jet_settings+=cms.vstring("MSUB(81)=1", #qq->QQ massive 00366 "MSUB(82)=1") #gg->QQ massive 00367 if evt_type == "C_JETS": 00368 pythia_jet_settings+=cms.vstring("MSTP(7)=4") #ccbar 00369 common.log( func_id+" Including settings for c jets") 00370 else: 00371 pythia_jet_settings+=cms.vstring("MSTP(7)=5") #bbbar 00372 common.log( func_id+" Including settings for b jets") 00373 00374 # Common part to all cases 00375 pythia_common=cms.vstring("CKIN(3)="+upper_energy, # Pt low cut 00376 "CKIN(4)="+lower_energy, # Pt high cut 00377 "CKIN(13)=0.", # eta min 00378 "CKIN(14)=2.5", # etamax 00379 "CKIN(15)=-2.5", # -etamin 00380 "CKIN(16)=0" # -etamax 00381 ) 00382 00383 pythia_jet_settings+=pythia_common 00384 00385 # Build the process source 00386 generator = cms.EDFilter('Pythia6GeneratorFilter', 00387 pythiaVerbosity =cms.untracked.bool(True), 00388 PythiaParameters = cms.PSet\ 00389 (parameterSets = cms.vstring\ 00390 ("pythiaUESettings","pythiaJets"), 00391 pythiaUESettings = user_pythia_ue_settings(), 00392 pythiaJets = pythia_jet_settings 00393 ) 00394 ) 00395 00396 common.log(func_id+" Returning Generator...") 00397 00398 return generator 00399 00400 #-----------------------------------
def relval_generation_module::_generate_Wl | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the Z ee simulation are added to the process. Energy parameter is not used.
Definition at line 513 of file relval_generation_module.py.
00514 : 00515 """ 00516 Here the settings for the Z ee simulation are added to the process. 00517 Energy parameter is not used. 00518 """ 00519 00520 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00521 common.log( func_id+" Entering... ") 00522 00523 # Choose between muon or electron decay of the Z 00524 electron_flag = "0" 00525 muon_flag = "0" 00526 tau_flag = "0" 00527 if evt_type == "WE": 00528 electron_flag = "1" 00529 elif evt_type == "WM": 00530 muon_flag = "1" 00531 elif evt_type == "WT": 00532 tau_flag = "1" 00533 00534 # Build the process source 00535 generator = cms.EDFilter('Pythia6GeneratorFilter', 00536 pythiaPylistVerbosity=cms.untracked.int32(0), 00537 pythiaHepMCVerbosity=cms.untracked.bool(False), 00538 maxEventsToPrint = cms.untracked.int32(0), 00539 filterEfficiency = cms.untracked.double(1), 00540 PythiaParameters = cms.PSet\ 00541 (parameterSets = cms.vstring('PythiaUESettings','processParameters'), 00542 PythiaUESettings=user_pythia_ue_settings(), 00543 processParameters=cms.vstring('MSEL=0 !User defined processes', 00544 'MSUB(2) = 1',# !W production 00545 'MDME(190,1) = 0',# !W decay into dbar u 00546 'MDME(191,1) = 0',# !W decay into dbar c 00547 'MDME(192,1) = 0',# !W decay into dbar t 00548 'MDME(194,1) = 0',# !W decay into sbar u 00549 'MDME(195,1) = 0',# !W decay into sbar c 00550 'MDME(196,1) = 0',# !W decay into sbar t 00551 'MDME(198,1) = 0',# !W decay into bbar u 00552 'MDME(199,1) = 0',# !W decay into bbar c 00553 'MDME(200,1) = 0',# !W decay into bbar t 00554 'MDME(205,1) = 0',# !W decay into bbar tp 00555 'MDME(206,1) = %s' %electron_flag,# !W decay into e+ nu_e 00556 'MDME(207,1) = %s' %muon_flag,# !W decay into mu+ nu_mu 00557 'MDME(208,1) = %s' %tau_flag,# !W decay into tau+ nu_tau 00558 ) 00559 ) 00560 ) 00561 00562 common.log(func_id+" Returning Generator...") 00563 00564 return generator 00565 00566 #---------------------------------
def relval_generation_module::_generate_Zll | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the Z ee simulation are added to the process. Energy parameter is not used.
Definition at line 439 of file relval_generation_module.py.
00440 : 00441 """ 00442 Here the settings for the Z ee simulation are added to the process. 00443 Energy parameter is not used. 00444 """ 00445 00446 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00447 common.log( func_id+" Entering... ") 00448 00449 # Choose between muon or electron decay of the Z 00450 user_param_sets = "pythiaZll" 00451 electron_flag = "0" 00452 muon_flag = "0" 00453 tau_flag = "0" 00454 if evt_type == "ZEE": 00455 electron_flag = "1" 00456 elif evt_type == "ZMUMU": 00457 muon_flag = "1" 00458 elif evt_type == "ZTT": 00459 tau_flag = "1" 00460 else: 00461 electron_flag=muon_flag=tau_flag= "1" 00462 00463 pythia_param_sets = cms.vstring( 00464 "MSEL = 11 ", 00465 "MDME( 174,1) = 0", #Z decay into d dbar", 00466 "MDME( 175,1) = 0", #Z decay into u ubar", 00467 "MDME( 176,1) = 0", #Z decay into s sbar", 00468 "MDME( 177,1) = 0", #Z decay into c cbar", 00469 "MDME( 178,1) = 0", #Z decay into b bbar", 00470 "MDME( 179,1) = 0", #Z decay into t tbar", 00471 "MDME( 182,1) = %s" %electron_flag,#Z decay into e- e+", 00472 "MDME( 183,1) = 0", #Z decay into nu_e nu_ebar", 00473 "MDME( 184,1) = %s" %muon_flag,#Z decay into mu- mu+", 00474 "MDME( 185,1) = 0", #Z decay into nu_mu nu_mubar", 00475 "MDME( 186,1) = %s" %tau_flag, #Z decay into tau- tau+", 00476 "MDME( 187,1) = 0", #Z decay into nu_tau nu_taubar", 00477 "MSTJ( 11) = 3", #Choice of the fragmentation function", 00478 "MSTP( 2) = 1", #which order running alphaS", 00479 "MSTP( 33) = 0", #(D=0) ", 00480 "MSTP( 51) = 7", #structure function chosen", 00481 "MSTP( 81) = 1", #multiple parton interactions 1 is 00482 #Pythia default, 00483 "MSTP( 82) = 4", #Defines the multi-parton model", 00484 "PARJ( 71) = 10.", #for which ctau 10 mm", 00485 "PARP( 82) = 1.9", #pt cutoff for multiparton interactions", 00486 "PARP( 89) = 1000.", #sqrts for which PARP82 is set", 00487 "PARP( 83) = 0.5", #Multiple interactions: matter distrbn 00488 #parameter Registered byChris.Seez@cern.ch 00489 "PARP( 84) = 0.4", #Multiple interactions: matterdistribution 00490 #parameter Registered by Chris.Seez@cern.ch 00491 "PARP( 90) = 0.16", #Multiple interactions:rescaling power 00492 #Registered by Chris.Seez@cern.ch 00493 "CKIN( 1) = 40.", #(D=2. GeV) 00494 "CKIN( 2) = -1.", #(D=-1. GeV) \ 00495 ) 00496 00497 # Build the process source 00498 generator = cms.EDFilter('Pythia6GeneratorFilter', 00499 pythiaPylistVerbosity=cms.untracked.int32(0), 00500 pythiaHepMCVerbosity=cms.untracked.bool(False), 00501 maxEventsToPrint = cms.untracked.int32(0), 00502 filterEfficiency = cms.untracked.double(1), 00503 PythiaParameters = cms.PSet\ 00504 (parameterSets = cms.vstring('PythiaUESettings','processParameters'), 00505 PythiaUESettings=user_pythia_ue_settings(), 00506 processParameters=pythia_param_sets ) 00507 ) 00508 00509 common.log(func_id+" Returning Generator...") 00510 00511 return generator 00512 #---------------------------------
def relval_generation_module::_generate_ZPJJ | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the Zprime to JJ simulation are added to the process.
Definition at line 567 of file relval_generation_module.py.
00568 : 00569 """ 00570 Here the settings for the Zprime to JJ simulation are added to the 00571 process. 00572 """ 00573 00574 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00575 common.log(func_id+" Entering... ") 00576 common.log( func_id+" Returning Generator...") 00577 # You might wonder why this time it's not pythonised..Me too: due to the excessive fragmentation of the 00578 # cfgs it's not worth to do that at the moment. It also obliges to have two functions for the ZP instead of one. 00579 return common.include_files('Configuration/JetMET/data/calorimetry-gen-Zprime_Dijets_700.cff')[0].source 00580 00581 #---------------------------------
def relval_generation_module::_generate_ZPll | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) | [private] |
Here the settings for the Z ee simulation are added to the process. Energy parameter is not used.
Definition at line 582 of file relval_generation_module.py.
00583 : 00584 """ 00585 Here the settings for the Z ee simulation are added to the process. 00586 Energy parameter is not used. 00587 """ 00588 00589 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00590 common.log( func_id+" Entering... ") 00591 00592 # Choose between muon or electron decay of the Z 00593 electron_flag = "0" 00594 muon_flag = "0" 00595 tau_flag = "0" 00596 if evt_type == "ZPEE": 00597 electron_flag = "1" 00598 elif evt_type == "ZPMUMU": 00599 muon_flag = "1" 00600 elif evt_type == "ZPTT": 00601 tau_flag = "1" 00602 else: 00603 electron_flag=muon_flag=tau_flag= "1" 00604 00605 # Build the process source 00606 generator = cms.EDFilter('Pythia6GeneratorFilter', 00607 pythiaPylistVerbosity=cms.untracked.int32(0), 00608 pythiaHepMCVerbosity=cms.untracked.bool(False), 00609 maxEventsToPrint = cms.untracked.int32(0), 00610 filterEfficiency = cms.untracked.double(1), 00611 PythiaParameters = cms.PSet\ 00612 (parameterSets = cms.vstring('PythiaUESettings','processParameters'), 00613 PythiaUESettings=user_pythia_ue_settings(), 00614 processParameters=\ 00615 cms.vstring('MSEL = 0 ', 00616 'MSUB(141) = 1 ',# !ff gamma z0 Z0', 00617 'MSTP(44) = 3 ',# !only select the Z process', 00618 'PMAS(32,1) = %s' %energy,# !mass of Zprime', 00619 'CKIN(1) = 400 ',# !(D=2. GeV)', 00620 'MDME(289,1)= 0 ',# !d dbar', 00621 'MDME(290,1)= 0 ',# !u ubar', 00622 'MDME(291,1)= 0 ',# !s sbar', 00623 'MDME(292,1)= 0 ',# !c cbar', 00624 'MDME(293,1)= 0 ',# !b bar', 00625 'MDME(294,1)= 0 ',# !t tbar', 00626 'MDME(295,1)= 0 ',# !4th gen Q Qbar', 00627 'MDME(296,1)= 0 ',# !4th gen Q Qbar', 00628 'MDME(297,1)= %s ' %electron_flag,# !e e', 00629 'MDME(298,1)= 0 ',# !neutrino e e', 00630 'MDME(299,1)= %s ' %muon_flag,# ! mu mu', 00631 'MDME(300,1)= 0 ',# !neutrino mu mu', 00632 'MDME(301,1)= %s ' %tau_flag,# !tau tau', 00633 'MDME(302,1)= 0 ',# !neutrino tau tau', 00634 'MDME(303,1)= 0 ',# !4th generation lepton', 00635 'MDME(304,1)= 0 ',# !4th generation neutrino', 00636 'MDME(305,1)= 0 ',# !W W', 00637 'MDME(306,1)= 0 ',# !H charged higgs', 00638 'MDME(307,1)= 0 ',# !Z', 00639 'MDME(308,1)= 0 ',# !Z', 00640 'MDME(309,1)= 0 ',# !sm higgs', 00641 'MDME(310,1)= 0 ' # !weird neutral higgs HA') 00642 ) 00643 ) 00644 ) 00645 00646 common.log(func_id+" Returning Generator...") 00647 00648 return generator 00649 00650 #-----------------------------------
def relval_generation_module::energy_split | ( | energy | ) |
Extract from a string of the form "lowenergy*highenergy" two bounds. It checks on its consistency. If the format is unknown the program stops.
Definition at line 785 of file relval_generation_module.py.
00786 : 00787 """ 00788 Extract from a string of the form "lowenergy*highenergy" two 00789 bounds. It checks on its consistency. If the format is unknown 00790 the program stops. 00791 """ 00792 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00793 common.log( func_id+" Entering... ") 00794 00795 separator_list = ["-", #fault tolerance is good 00796 "_", 00797 "*", 00798 "/", 00799 ";", 00800 ","] 00801 for separator in separator_list: 00802 if energy.count(separator)==1: 00803 common.log( func_id+" Found separator in energy string...") 00804 low,high = energy.split(separator) 00805 if float(high) > float(low): 00806 common.log(func_id+" Returning Energy...") 00807 return (low,high) 00808 00809 raise "Energy Format: ","Unrecognised energy format." 00810 00811 #-----------------------------------
def relval_generation_module::generate | ( | step, | |
evt_type, | |||
energy, | |||
evtnumber | |||
) |
This function calls all the other functions specific for an event evt_type.
Definition at line 27 of file relval_generation_module.py.
Referenced by ToyMCSamplerOpt::GenerateToyData().
00028 : 00029 """ 00030 This function calls all the other functions specific for 00031 an event evt_type. 00032 """ 00033 00034 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00035 common.log( func_id+" Entering... ") 00036 00037 # Build the switch cases: 00038 00039 # Particle Gun 00040 if evt_type in ("MU+","MU-","E","DIE","GAMMA","TAU","PI0","PI+","PI-"): 00041 generator = _generate_PGUN\ 00042 (step, evt_type, energy, evtnumber) 00043 00044 elif evt_type in ("HZZMUMUMUMU", "HZZEEEE", "HZZTTTT", "HZZLLLL","HGG"): 00045 generator = _generate_Higgs\ 00046 (step, evt_type, energy, evtnumber) 00047 00048 elif evt_type in ("B_JETS", "C_JETS"): 00049 generator = _generate_udscb_jets\ 00050 (step, evt_type, energy, evtnumber) 00051 00052 elif evt_type in ("QCD","TTBAR","ZPJJ","MINBIAS","RS1GG","HpT"): 00053 generator = eval("_generate_"+evt_type+"(step, evt_type, energy, evtnumber)") 00054 00055 elif evt_type in ("ZEE","ZTT","ZMUMU"): 00056 generator = _generate_Zll\ 00057 (step, evt_type, energy, evtnumber) 00058 00059 elif evt_type in ("ZPEE","ZPTT","ZPMUMU"): 00060 generator = _generate_ZPll\ 00061 (step, evt_type, energy, evtnumber) 00062 00063 elif evt_type in ("WE","WM","WT"): 00064 generator = _generate_Wl(step, evt_type, energy, evtnumber) 00065 00066 else: 00067 raise "Event type","Type not yet implemented." 00068 00069 common.log( func_id+" Returning Generator") 00070 00071 return generator 00072 00073 #------------------------------
def relval_generation_module::user_pythia_ue_settings | ( | ) |
The function simply returns a cms.vstring which is a summary of the Pythia settings for the event generation
Definition at line 812 of file relval_generation_module.py.
00813 : 00814 """ 00815 The function simply returns a cms.vstring which is a summary of the 00816 Pythia settings for the event generation 00817 """ 00818 00819 00820 00821 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]" 00822 common.log(func_id+" Returning PythiaUE settings...") 00823 00824 return common.include_files('Configuration/Generator/data/PythiaUESettings.cfi')[0].pythiaUESettings 00825
float relval_generation_module::ETA_MAX = 2.5 |
Definition at line 24 of file relval_generation_module.py.
float relval_generation_module::ETA_MIN = 2.5 |
Definition at line 25 of file relval_generation_module.py.
string relval_generation_module::mod_id = "[" |
Definition at line 20 of file relval_generation_module.py.