00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 import FWCore.ParameterSet.Config as cms
00012 import relval_common_module as common
00013
00014 from math import pi as PI
00015 import os
00016 import sys
00017
00018
00019
00020 mod_id="["+os.path.basename(sys._getframe().f_code.co_filename)[:-3]+"]"
00021
00022
00023
00024 ETA_MAX=2.5
00025 ETA_MIN=-2.5
00026
00027 def generate(step, evt_type, energy, evtnumber):
00028 """
00029 This function calls all the other functions specific for
00030 an event evt_type.
00031 """
00032
00033 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00034 common.log( func_id+" Entering... ")
00035
00036
00037
00038
00039 if evt_type in ("MU+","MU-","E","DIE","GAMMA","TAU","PI0","PI+","PI-"):
00040 generator = _generate_PGUN\
00041 (step, evt_type, energy, evtnumber)
00042
00043 elif evt_type in ("HZZMUMUMUMU", "HZZEEEE", "HZZTTTT", "HZZLLLL","HGG"):
00044 generator = _generate_Higgs\
00045 (step, evt_type, energy, evtnumber)
00046
00047 elif evt_type in ("B_JETS", "C_JETS"):
00048 generator = _generate_udscb_jets\
00049 (step, evt_type, energy, evtnumber)
00050
00051 elif evt_type in ("QCD","TTBAR","ZPJJ","MINBIAS","RS1GG","HpT"):
00052 generator = eval("_generate_"+evt_type+"(step, evt_type, energy, evtnumber)")
00053
00054 elif evt_type in ("ZEE","ZTT","ZMUMU"):
00055 generator = _generate_Zll\
00056 (step, evt_type, energy, evtnumber)
00057
00058 elif evt_type in ("ZPEE","ZPTT","ZPMUMU"):
00059 generator = _generate_ZPll\
00060 (step, evt_type, energy, evtnumber)
00061
00062 elif evt_type in ("WE","WM","WT"):
00063 generator = _generate_Wl(step, evt_type, energy, evtnumber)
00064
00065 else:
00066 raise "Event type","Type not yet implemented."
00067
00068 common.log( func_id+" Returning Generator")
00069
00070 return generator
00071
00072
00073
00074 def _generate_PGUN(step, evt_type, energy, evtnumber):
00075 """
00076 Here the settings for the simple generation of a muon, electron or gamma
00077 are stated.
00078 """
00079 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00080 common.log( func_id+" Entering... ")
00081
00082
00083 py_id_dict = {"MU-":13,
00084 "MU+":-13,
00085 "E" :11,
00086 "DIE":11,
00087 "TAU":15,
00088 "GAMMA":22,
00089 "PI+":211,
00090 "PI-":-211,
00091 "PI0":111}
00092
00093
00094 id_string = evt_type+" "+energy+" nevts "+ str(evtnumber)
00095
00096
00097 pt_flag=True
00098 if 'pt' in energy[0:2] or \
00099 'Pt' in energy[0:2] or \
00100 'PT' in energy[0:2]:
00101 energy=energy[2:]
00102 else:
00103 pt_flag=False
00104
00105
00106 lower_energy = ""
00107 upper_energy = ""
00108
00109
00110
00111
00112 part_id = cms.untracked.vint32 ()
00113
00114 part_id.append(py_id_dict[evt_type])
00115 upper_energy=''
00116 lower_energy=''
00117 if energy.find('_')!=-1:
00118 upper_energy,lower_energy=energy_split(energy)
00119 else:
00120 epsilon= 0.001
00121 lower_energy = str ( int(energy) - epsilon)
00122 upper_energy = str ( int(energy) + epsilon)
00123
00124
00125 if evt_type in ("TAU","E"):
00126
00127 part_id.append(-1*part_id[0])
00128
00129 antip_flag=False
00130 if evt_type=="DIE":
00131 antip_flag=True
00132
00133 if pt_flag:
00134 common.log( func_id+ "This is a pt particle gun ..." )
00135 generator = cms.EDProducer("FlatRandomPtGunProducer",
00136 psethack = cms.string(id_string),
00137 firstRun = cms.untracked.uint32(1),
00138 PGunParameters = cms.PSet(
00139 PartID = part_id,
00140 MinEta = cms.double(ETA_MAX),
00141 MaxEta = cms.double(ETA_MIN),
00142 MinPhi = cms.double(-PI),
00143 MaxPhi = cms.double(PI),
00144 MinPt = cms.double(lower_energy),
00145 MaxPt = cms.double(upper_energy)
00146 ),
00147 AddAntiParticle=cms.bool(antip_flag),
00148 Verbosity = cms.untracked.int32(0)
00149 )
00150 else:
00151 common.log( func_id+ " This is an Energy particle gun ..." )
00152 generator = cms.EDProducer("FlatRandomEGunProducer",
00153 psethack = cms.string(id_string),
00154 firstRun = cms.untracked.uint32(1),
00155 PGunParameters = cms.PSet(
00156 PartID = part_id,
00157 MinEta = cms.double(ETA_MAX),
00158 MaxEta = cms.double(ETA_MIN),
00159 MinPhi = cms.double(-PI),
00160 MaxPhi = cms.double(PI),
00161 MinE = cms.double(lower_energy),
00162 MaxE = cms.double(upper_energy)
00163 ),
00164 AddAntiParticle=cms.bool(antip_flag),
00165 Verbosity = cms.untracked.int32(0)
00166 )
00167
00168 common.log( func_id+" Returning Generator...")
00169
00170 return generator
00171
00172
00173
00174 def _generate_QCD(step, evt_type, energy, evtnumber):
00175 """
00176 Here the settings for the generation of QCD events
00177 """
00178 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00179 common.log( func_id+" Entering... ")
00180
00181
00182 upper_energy, lower_energy = energy_split(energy)
00183
00184
00185 generator = cms.EDFilter("Pythia6GeneratorFilter",
00186 pythiaPylistVerbosity=cms.untracked.int32(0),
00187 pythiaHepMCVerbosity=cms.untracked.bool(False),
00188 maxEventsToPrint = cms.untracked.int32(0),
00189 filterEfficiency = cms.untracked.double(1),
00190 PythiaParameters = cms.PSet\
00191 (parameterSets = cms.vstring\
00192 ("pythiaUESettings",
00193 "processParameters"),
00194 pythiaUESettings = user_pythia_ue_settings(),
00195 processParameters = cms.vstring("MSEL=1",
00196 "CKIN(3)="+upper_energy,
00197 "CKIN(4)="+lower_energy))
00198 )
00199
00200 common.log( func_id+" Returning Generator...")
00201 return generator
00202
00203
00204
00205 def _generate_MINBIAS(step, evt_type, energy, evtnumber):
00206 """
00207 Settings for MINBIAS events generation
00208 """
00209
00210 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00211 common.log( func_id+" Entering... ")
00212
00213
00214 generator = cms.EDFilter("Pythia6GeneratorFilter",
00215 pythiaPylistVerbosity=cms.untracked.int32(0),
00216 pythiaHepMCVerbosity=cms.untracked.bool(False),
00217 maxEventsToPrint = cms.untracked.int32(0),
00218 filterEfficiency = cms.untracked.double(1),
00219 PythiaParameters = cms.PSet\
00220 (parameterSets = cms.vstring\
00221 ("pythiaUESettings",
00222 "processParameters"),
00223 pythiaUESettings = user_pythia_ue_settings(),
00224 processParameters = cms.vstring(
00225 "MSEL=0",
00226 "MSUB(11)=1",
00227 "MSUB(12)=1",
00228 "MSUB(13)=1",
00229 "MSUB(28)=1",
00230 "MSUB(53)=1",
00231 "MSUB(68)=1",
00232 "MSUB(92)=1",
00233 "MSUB(93)=1",
00234 "MSUB(94)=1",
00235 "MSUB(95)=1"))
00236 )
00237 common.log( func_id+" Returning Generator...")
00238
00239 return generator
00240
00241
00242
00243 def _generate_Higgs(step, evt_type, energy, evtnumber):
00244 """
00245 Here the settings for the generation of Higgs->ZZ->ll events
00246 The energy parameter is not used. According to the evt_type ("HZZMUMUMUMU"
00247 or "HZZEEEE") the final state is chosen.
00248 """
00249 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00250 common.log( func_id+" Entering... ")
00251
00252
00253 z_flag="0"
00254 electron_flag = "0"
00255 muon_flag = "0"
00256 tau_flag = "0"
00257 gamma_flag="0"
00258 if evt_type == "HZZEEEE":
00259 electron_flag = "1"
00260 z_flag="1"
00261 elif evt_type == "HZZMUMUMUMU":
00262 muon_flag = "1"
00263 z_flag="1"
00264 elif evt_type == "HZZTTTT":
00265 tau_flag = "1"
00266 z_flag="1"
00267 elif evt_type == "HZZLLLL":
00268 electron_flag=muon_flag=tau_flag= "1"
00269 z_flag="1"
00270 elif evt_type == "HGG":
00271 gamma_flag="1"
00272
00273
00274
00275 params = cms.vstring(
00276 "PMAS(25,1)=%s" %energy,
00277 "MSEL=0",
00278
00279
00280
00281
00282
00283
00284
00285 "MSUB(102)=1",
00286 "MSUB(123)=1",
00287 "MSUB(124)=1",
00288 "CKIN(45)=5.",
00289 "CKIN(46)=150.",
00290
00291
00292 "CKIN(47)=5.",
00293
00294
00295 "CKIN(48)=150.",
00296
00297
00298 "MDME(174,1)=0",
00299 "MDME(175,1)=0",
00300 "MDME(176,1)=0",
00301 "MDME(177,1)=0",
00302 "MDME(178,1)=0",
00303 "MDME(179,1)=0",
00304 "MDME(182,1)=%s" %electron_flag,
00305 "MDME(183,1)=0",
00306 "MDME(184,1)=%s" %muon_flag,
00307 "MDME(185,1)=0",
00308 "MDME(186,1)=%s" %tau_flag,
00309 "MDME(187,1)=0",
00310 "MDME(210,1)=0",
00311 "MDME(211,1)=0",
00312 "MDME(212,1)=0",
00313 "MDME(213,1)=0",
00314 "MDME(214,1)=0",
00315 "MDME(215,1)=0",
00316 "MDME(216,1)=0",
00317 "MDME(217,1)=0",
00318 "MDME(218,1)=0",
00319 "MDME(219,1)=0",
00320 "MDME(220,1)=0",
00321 "MDME(221,1)=0",
00322 "MDME(222,1)=0",
00323 "MDME(223,1)=%s" %gamma_flag,
00324 "MDME(224,1)=0",
00325 "MDME(225,1)=%s" %z_flag,
00326 "MDME(226,1)=0",
00327 )
00328
00329
00330 generator = cms.EDFilter('Pythia6GeneratorFilter',
00331 pythiaPylistVerbosity=cms.untracked.int32(0),
00332 pythiaHepMCVerbosity=cms.untracked.bool(False),
00333 maxEventsToPrint = cms.untracked.int32(0),
00334 filterEfficiency = cms.untracked.double(1),
00335 pythiaVerbosity =cms.untracked.bool(False),
00336 PythiaParameters = cms.PSet\
00337 (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
00338 PythiaUESettings = user_pythia_ue_settings(),
00339 processParameters=params
00340 )
00341 )
00342
00343 common.log( func_id+" Returning Generator...")
00344
00345 return generator
00346
00347
00348
00349 def _generate_udscb_jets\
00350 (step, evt_type, energy, evtnumber):
00351 """
00352 Here the settings necessary to udscb jets generation are added. According
00353 to the flavour the Pythia parameters are changed slightly.
00354 For the time being the energy parameter is not used.
00355 """
00356 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00357 common.log( func_id+" Entering... ")
00358
00359
00360 upper_energy, lower_energy = energy_split(energy)
00361
00362
00363 pythia_jet_settings=cms.vstring("MSEL=0")
00364 pythia_jet_settings+=cms.vstring("MSUB(81)=1",
00365 "MSUB(82)=1")
00366 if evt_type == "C_JETS":
00367 pythia_jet_settings+=cms.vstring("MSTP(7)=4")
00368 common.log( func_id+" Including settings for c jets")
00369 else:
00370 pythia_jet_settings+=cms.vstring("MSTP(7)=5")
00371 common.log( func_id+" Including settings for b jets")
00372
00373
00374 pythia_common=cms.vstring("CKIN(3)="+upper_energy,
00375 "CKIN(4)="+lower_energy,
00376 "CKIN(13)=0.",
00377 "CKIN(14)=2.5",
00378 "CKIN(15)=-2.5",
00379 "CKIN(16)=0"
00380 )
00381
00382 pythia_jet_settings+=pythia_common
00383
00384
00385 generator = cms.EDFilter('Pythia6GeneratorFilter',
00386 pythiaVerbosity =cms.untracked.bool(True),
00387 PythiaParameters = cms.PSet\
00388 (parameterSets = cms.vstring\
00389 ("pythiaUESettings","pythiaJets"),
00390 pythiaUESettings = user_pythia_ue_settings(),
00391 pythiaJets = pythia_jet_settings
00392 )
00393 )
00394
00395 common.log(func_id+" Returning Generator...")
00396
00397 return generator
00398
00399
00400
00401 def _generate_TTBAR(step, evt_type, energy, evtnumber):
00402 """
00403 Here the settings for the ttbar pairs are added to the process.
00404 """
00405
00406 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00407 common.log(func_id+" Entering... ")
00408
00409
00410 generator = cms.EDFilter('Pythia6GeneratorFilter',
00411 pythiaPylistVerbosity=cms.untracked.int32(0),
00412 pythiaHepMCVerbosity=cms.untracked.bool(False),
00413 maxEventsToPrint = cms.untracked.int32(0),
00414 filterEfficiency = cms.untracked.double(1),
00415 PythiaParameters = cms.PSet\
00416 (parameterSets = cms.vstring\
00417 ('pythiaUESettings',
00418 'processParameters'),
00419 pythiaUESettings = user_pythia_ue_settings(),
00420
00421
00422
00423 processParameters =cms.vstring\
00424 ("MSEL=0",
00425 "MSUB(81)=1",
00426 "MSUB(82)=1",
00427 "MSTP(7)=6",
00428 "PMAS(6,1)=175"
00429 )
00430 )
00431 )
00432
00433 common.log(func_id+" Returning Generator...")
00434
00435 return generator
00436
00437
00438
00439 def _generate_Zll(step, evt_type, energy, evtnumber):
00440 """
00441 Here the settings for the Z ee simulation are added to the process.
00442 Energy parameter is not used.
00443 """
00444
00445 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00446 common.log( func_id+" Entering... ")
00447
00448
00449 user_param_sets = "pythiaZll"
00450 electron_flag = "0"
00451 muon_flag = "0"
00452 tau_flag = "0"
00453 if evt_type == "ZEE":
00454 electron_flag = "1"
00455 elif evt_type == "ZMUMU":
00456 muon_flag = "1"
00457 elif evt_type == "ZTT":
00458 tau_flag = "1"
00459 else:
00460 electron_flag=muon_flag=tau_flag= "1"
00461
00462 pythia_param_sets = cms.vstring(
00463 "MSEL = 11 ",
00464 "MDME( 174,1) = 0",
00465 "MDME( 175,1) = 0",
00466 "MDME( 176,1) = 0",
00467 "MDME( 177,1) = 0",
00468 "MDME( 178,1) = 0",
00469 "MDME( 179,1) = 0",
00470 "MDME( 182,1) = %s" %electron_flag,
00471 "MDME( 183,1) = 0",
00472 "MDME( 184,1) = %s" %muon_flag,
00473 "MDME( 185,1) = 0",
00474 "MDME( 186,1) = %s" %tau_flag,
00475 "MDME( 187,1) = 0",
00476 "MSTJ( 11) = 3",
00477 "MSTP( 2) = 1",
00478 "MSTP( 33) = 0",
00479 "MSTP( 51) = 7",
00480 "MSTP( 81) = 1",
00481
00482 "MSTP( 82) = 4",
00483 "PARJ( 71) = 10.",
00484 "PARP( 82) = 1.9",
00485 "PARP( 89) = 1000.",
00486 "PARP( 83) = 0.5",
00487
00488 "PARP( 84) = 0.4",
00489
00490 "PARP( 90) = 0.16",
00491
00492 "CKIN( 1) = 40.",
00493 "CKIN( 2) = -1.",
00494 )
00495
00496
00497 generator = cms.EDFilter('Pythia6GeneratorFilter',
00498 pythiaPylistVerbosity=cms.untracked.int32(0),
00499 pythiaHepMCVerbosity=cms.untracked.bool(False),
00500 maxEventsToPrint = cms.untracked.int32(0),
00501 filterEfficiency = cms.untracked.double(1),
00502 PythiaParameters = cms.PSet\
00503 (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
00504 PythiaUESettings=user_pythia_ue_settings(),
00505 processParameters=pythia_param_sets )
00506 )
00507
00508 common.log(func_id+" Returning Generator...")
00509
00510 return generator
00511
00512
00513 def _generate_Wl(step, evt_type, energy, evtnumber):
00514 """
00515 Here the settings for the Z ee simulation are added to the process.
00516 Energy parameter is not used.
00517 """
00518
00519 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00520 common.log( func_id+" Entering... ")
00521
00522
00523 electron_flag = "0"
00524 muon_flag = "0"
00525 tau_flag = "0"
00526 if evt_type == "WE":
00527 electron_flag = "1"
00528 elif evt_type == "WM":
00529 muon_flag = "1"
00530 elif evt_type == "WT":
00531 tau_flag = "1"
00532
00533
00534 generator = cms.EDFilter('Pythia6GeneratorFilter',
00535 pythiaPylistVerbosity=cms.untracked.int32(0),
00536 pythiaHepMCVerbosity=cms.untracked.bool(False),
00537 maxEventsToPrint = cms.untracked.int32(0),
00538 filterEfficiency = cms.untracked.double(1),
00539 PythiaParameters = cms.PSet\
00540 (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
00541 PythiaUESettings=user_pythia_ue_settings(),
00542 processParameters=cms.vstring('MSEL=0 !User defined processes',
00543 'MSUB(2) = 1',
00544 'MDME(190,1) = 0',
00545 'MDME(191,1) = 0',
00546 'MDME(192,1) = 0',
00547 'MDME(194,1) = 0',
00548 'MDME(195,1) = 0',
00549 'MDME(196,1) = 0',
00550 'MDME(198,1) = 0',
00551 'MDME(199,1) = 0',
00552 'MDME(200,1) = 0',
00553 'MDME(205,1) = 0',
00554 'MDME(206,1) = %s' %electron_flag,
00555 'MDME(207,1) = %s' %muon_flag,
00556 'MDME(208,1) = %s' %tau_flag,
00557 )
00558 )
00559 )
00560
00561 common.log(func_id+" Returning Generator...")
00562
00563 return generator
00564
00565
00566
00567 def _generate_ZPJJ(step, evt_type, energy, evtnumber):
00568 """
00569 Here the settings for the Zprime to JJ simulation are added to the
00570 process.
00571 """
00572
00573 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00574 common.log(func_id+" Entering... ")
00575 common.log( func_id+" Returning Generator...")
00576
00577
00578 return common.include_files('Configuration/JetMET/data/calorimetry-gen-Zprime_Dijets_700.cff')[0].source
00579
00580
00581
00582 def _generate_ZPll(step, evt_type, energy, evtnumber):
00583 """
00584 Here the settings for the Z ee simulation are added to the process.
00585 Energy parameter is not used.
00586 """
00587
00588 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00589 common.log( func_id+" Entering... ")
00590
00591
00592 electron_flag = "0"
00593 muon_flag = "0"
00594 tau_flag = "0"
00595 if evt_type == "ZPEE":
00596 electron_flag = "1"
00597 elif evt_type == "ZPMUMU":
00598 muon_flag = "1"
00599 elif evt_type == "ZPTT":
00600 tau_flag = "1"
00601 else:
00602 electron_flag=muon_flag=tau_flag= "1"
00603
00604
00605 generator = cms.EDFilter('Pythia6GeneratorFilter',
00606 pythiaPylistVerbosity=cms.untracked.int32(0),
00607 pythiaHepMCVerbosity=cms.untracked.bool(False),
00608 maxEventsToPrint = cms.untracked.int32(0),
00609 filterEfficiency = cms.untracked.double(1),
00610 PythiaParameters = cms.PSet\
00611 (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
00612 PythiaUESettings=user_pythia_ue_settings(),
00613 processParameters=\
00614 cms.vstring('MSEL = 0 ',
00615 'MSUB(141) = 1 ',
00616 'MSTP(44) = 3 ',
00617 'PMAS(32,1) = %s' %energy,
00618 'CKIN(1) = 400 ',
00619 'MDME(289,1)= 0 ',
00620 'MDME(290,1)= 0 ',
00621 'MDME(291,1)= 0 ',
00622 'MDME(292,1)= 0 ',
00623 'MDME(293,1)= 0 ',
00624 'MDME(294,1)= 0 ',
00625 'MDME(295,1)= 0 ',
00626 'MDME(296,1)= 0 ',
00627 'MDME(297,1)= %s ' %electron_flag,
00628 'MDME(298,1)= 0 ',
00629 'MDME(299,1)= %s ' %muon_flag,
00630 'MDME(300,1)= 0 ',
00631 'MDME(301,1)= %s ' %tau_flag,
00632 'MDME(302,1)= 0 ',
00633 'MDME(303,1)= 0 ',
00634 'MDME(304,1)= 0 ',
00635 'MDME(305,1)= 0 ',
00636 'MDME(306,1)= 0 ',
00637 'MDME(307,1)= 0 ',
00638 'MDME(308,1)= 0 ',
00639 'MDME(309,1)= 0 ',
00640 'MDME(310,1)= 0 '
00641 )
00642 )
00643 )
00644
00645 common.log(func_id+" Returning Generator...")
00646
00647 return generator
00648
00649
00650
00651 def _generate_RS1GG(step, evt_type, energy, evtnumber):
00652 """
00653 Here the settings for the RS1 graviton into gamma gamma.
00654 """
00655
00656 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00657 common.log( func_id+" Entering... ")
00658
00659
00660 generator = cms.EDFilter('Pythia6GeneratorFilter',
00661 pythiaPylistVerbosity=cms.untracked.int32(0),
00662 pythiaHepMCVerbosity=cms.untracked.bool(False),
00663 maxEventsToPrint = cms.untracked.int32(0),
00664 filterEfficiency = cms.untracked.double(1),
00665 PythiaParameters = cms.PSet\
00666 (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
00667 PythiaUESettings=user_pythia_ue_settings(),
00668 processParameters=\
00669 cms.vstring('MSEL=0 ',
00670 'MSUB(391) =1 ',
00671 'MSUB(392) =1 ',
00672 'PMAS(347,1) = %s ' %energy,
00673 'PARP(50) = 0.54 ',
00674 'MDME(4158,1)=0 ',
00675 'MDME(4159,1)=0 ',
00676 'MDME(4160,1)=0 ',
00677 'MDME(4161,1)=0 ',
00678 'MDME(4162,1)=0 ',
00679 'MDME(4163,1)=0 ',
00680 'MDME(4164,1)=0 ',
00681 'MDME(4165,1)=0 ',
00682 'MDME(4166,1)=0 ',
00683 'MDME(4167,1)=0 ',
00684 'MDME(4168,1)=0 ',
00685 'MDME(4169,1)=0 ',
00686 'MDME(4170,1)=0 ',
00687 'MDME(4170,1)=0 ',
00688 'MDME(4171,1)=0 ',
00689 'MDME(4172,1)=0 ',
00690 'MDME(4173,1)=0 ',
00691 'MDME(4174,1)=0 ',
00692 'MDME(4175,1)=1 ',
00693 'MDME(4176,1)=0 ',
00694 'MDME(4177,1)=0 ',
00695 'MDME(4178,1)=0 ',
00696 'CKIN(3)=20. ',
00697 'CKIN(4)=-1. '
00698 )
00699 )
00700 )
00701
00702 common.log(func_id+" Returning Generator...")
00703
00704 return generator
00705
00706
00707 def _generate_HpT(step, evt_type, energy, evtnumber):
00708 """
00709 Here the settings for the RS1 graviton into gamma gamma.
00710 """
00711
00712 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00713 common.log( func_id+" Entering... ")
00714
00715
00716 generator = cms.EDFilter("Pythia6GeneratorFilter",
00717 pythiaPylistVerbosity = cms.untracked.int32(0),
00718 pythiaHepMCVerbosity = cms.untracked.bool(False),
00719 maxEventsToPrint = cms.untracked.int32(0),
00720 filterEfficiency = cms.untracked.double(1.0),
00721 PythiaParameters = cms.PSet(\
00722 parameterSets = cms.vstring('PythiaUESettings', 'processParameters', 'pythiaMSSMmhmax'),
00723 PythiaUESettings=user_pythia_ue_settings(),
00724 processParameters=cms.vstring\
00725 ('MSEL = 0 ',
00726 'MSUB(401) = 1 ',
00727 'MSUB(402) = 1 ',
00728 'IMSS(1)= 1 ',
00729 'RMSS(19) = 200.',
00730 'MDME(503,1)=0 ',
00731 'MDME(504,1)=0 ',
00732 'MDME(505,1)=0 ',
00733 'MDME(506,1)=0 ',
00734 'MDME(507,1)=0 ',
00735 'MDME(508,1)=0 ',
00736 'MDME(509,1)=1 ',
00737 'MDME(510,1)=0 ',
00738 'MDME(511,1)=0 ',
00739 'MDME(512,1)=0 ',
00740 'MDME(513,1)=0 ',
00741 'MDME(514,1)=0 ',
00742 'MDME(515,1)=0 ',
00743 'MDME(516,1)=0 ',
00744 'MDME(517,1)=0 ',
00745 'MDME(518,1)=0 ',
00746 'MDME(519,1)=0 ',
00747 'MDME(520,1)=0 ',
00748 'MDME(521,1)=0 ',
00749 'MDME(522,1)=0 ',
00750 'MDME(523,1)=0 ',
00751 'MDME(524,1)=0 ',
00752 'MDME(525,1)=0 ',
00753 'MDME(526,1)=0 ',
00754 'MDME(527,1)=0 ',
00755 'MDME(528,1)=0 ',
00756 'MDME(529,1)=0 '
00757 ),
00758 pythiaMSSMmhmax = cms.vstring\
00759 ('RMSS(2)= 200. ',
00760 'RMSS(3)= 800. ',
00761 'RMSS(4)= 200. ',
00762 'RMSS(6)= 1000. ',
00763 'RMSS(7)= 1000. ',
00764 'RMSS(8)= 1000. ',
00765 'RMSS(9)= 1000. ',
00766 'RMSS(10)= 1000. ',
00767 'RMSS(11)= 1000. ',
00768 'RMSS(12)= 1000. ',
00769 'RMSS(13)= 1000. ',
00770 'RMSS(14)= 1000. ',
00771 'RMSS(15)= 2449. ',
00772 'RMSS(16)= 2449. ',
00773 'RMSS(17)= 2449. '
00774 )
00775 )
00776 )
00777
00778
00779 common.log(func_id+" Returning Generator...")
00780
00781 return generator
00782
00783
00784
00785 def energy_split(energy):
00786 """
00787 Extract from a string of the form "lowenergy*highenergy" two
00788 bounds. It checks on its consistency. If the format is unknown
00789 the program stops.
00790 """
00791 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00792 common.log( func_id+" Entering... ")
00793
00794 separator_list = ["-",
00795 "_",
00796 "*",
00797 "/",
00798 ";",
00799 ","]
00800 for separator in separator_list:
00801 if energy.count(separator)==1:
00802 common.log( func_id+" Found separator in energy string...")
00803 low,high = energy.split(separator)
00804 if float(high) > float(low):
00805 common.log(func_id+" Returning Energy...")
00806 return (low,high)
00807
00808 raise "Energy Format: ","Unrecognised energy format."
00809
00810
00811
00812 def user_pythia_ue_settings():
00813 """
00814 The function simply returns a cms.vstring which is a summary of the
00815 Pythia settings for the event generation
00816 """
00817
00818
00819
00820 func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
00821 common.log(func_id+" Returning PythiaUE settings...")
00822
00823 return common.include_files('Configuration/Generator/data/PythiaUESettings.cfi')[0].pythiaUESettings
00824