CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
relval_generation_module Namespace Reference

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 = "["
 

Function Documentation

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.

References _generate_udscb_jets(), and user_pythia_ue_settings().

244 def _generate_Higgs(step, evt_type, energy, evtnumber):
245  """
246  Here the settings for the generation of Higgs->ZZ->ll events
247  The energy parameter is not used. According to the evt_type ("HZZMUMUMUMU"
248  or "HZZEEEE") the final state is chosen.
249  """
250  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
251  common.log( func_id+" Entering... ")
252 
253  # Choose between muon, tau or electron decay of the Z
254  z_flag="0"
255  electron_flag = "0"
256  muon_flag = "0"
257  tau_flag = "0"
258  gamma_flag="0"
259  if evt_type == "HZZEEEE":
260  electron_flag = "1"
261  z_flag="1"
262  elif evt_type == "HZZMUMUMUMU":
263  muon_flag = "1"
264  z_flag="1"
265  elif evt_type == "HZZTTTT":
266  tau_flag = "1"
267  z_flag="1"
268  elif evt_type == "HZZLLLL":
269  electron_flag=muon_flag=tau_flag= "1"
270  z_flag="1"
271  elif evt_type == "HGG":
272  gamma_flag="1"
273 
274 
275  # Prepare The Pythia params
276  params = cms.vstring(
277  "PMAS(25,1)=%s" %energy, #mass of Higgs",
278  "MSEL=0",
279  #(D=1) to select between full user control
280  #(0, then use MSUB) and some preprogrammed alternative: QCD hight pT
281  #processes (1, then ISUB=11, 12, 13, 28, 53, 68), QCD low pT processes
282  #(2, then ISUB=11, #12, 13, 28, 53, 68, 91, 92, 94, 95)",
283  #
284  #Check on possible errors during program
285  #execution",
286  "MSUB(102)=1", #ggH",
287  "MSUB(123)=1", #ZZ fusion to H",
288  "MSUB(124)=1", #WW fusion to H",
289  "CKIN(45)=5.",
290  "CKIN(46)=150.",
291  #high mass cut on secondary resonance m1 in
292  #2->1->2 process Registered by Alexandre.Nikitenko@cern.ch",
293  "CKIN(47)=5.",
294  #low mass cut on secondary resonance m2 in
295  #2->1->2 process Registered by Alexandre.Nikitenko@cern.ch",
296  "CKIN(48)=150.",
297  #high mass cut on secondary resonance m2 in
298  #2->1->2 process Registered by Alexandre.Nikitenko@cern.ch",
299  "MDME(174,1)=0", #Z decay into d dbar",
300  "MDME(175,1)=0", #Z decay into u ubar",
301  "MDME(176,1)=0", #Z decay into s sbar",
302  "MDME(177,1)=0", #Z decay into c cbar",
303  "MDME(178,1)=0", #Z decay into b bbar",
304  "MDME(179,1)=0", #Z decay into t tbar",
305  "MDME(182,1)=%s" %electron_flag,#Z decay into e- e+",
306  "MDME(183,1)=0", #Z decay into nu_e nu_ebar",
307  "MDME(184,1)=%s" %muon_flag,#Z decay into mu- mu+",
308  "MDME(185,1)=0", #Z decay into nu_mu nu_mubar",
309  "MDME(186,1)=%s" %tau_flag,#Z decay into tau- tau+",
310  "MDME(187,1)=0", #Z decay into nu_tau nu_taubar",
311  "MDME(210,1)=0", #Higgs decay into dd",
312  "MDME(211,1)=0", #Higgs decay into uu",
313  "MDME(212,1)=0", #Higgs decay into ss",
314  "MDME(213,1)=0", #Higgs decay into cc",
315  "MDME(214,1)=0", #Higgs decay into bb",
316  "MDME(215,1)=0", #Higgs decay into tt",
317  "MDME(216,1)=0", #Higgs decay into",
318  "MDME(217,1)=0", #Higgs decay into Higgs decay",
319  "MDME(218,1)=0", #Higgs decay into e nu e",
320  "MDME(219,1)=0", #Higgs decay into mu nu mu",
321  "MDME(220,1)=0", #Higgs decay into tau nu tau",
322  "MDME(221,1)=0", #Higgs decay into Higgs decay",
323  "MDME(222,1)=0", #Higgs decay into g g",
324  "MDME(223,1)=%s" %gamma_flag,#Higgs decay into gam gam",
325  "MDME(224,1)=0", #Higgs decay into gam Z",
326  "MDME(225,1)=%s" %z_flag, #Higgs decay into Z Z",
327  "MDME(226,1)=0", #Higgs decay into W W"
328  )
329 
330  # Build the process source
331  generator = cms.EDFilter('Pythia6GeneratorFilter',
332  pythiaPylistVerbosity=cms.untracked.int32(0),
333  pythiaHepMCVerbosity=cms.untracked.bool(False),
334  maxEventsToPrint = cms.untracked.int32(0),
335  filterEfficiency = cms.untracked.double(1),
336  pythiaVerbosity =cms.untracked.bool(False),
337  PythiaParameters = cms.PSet\
338  (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
339  PythiaUESettings = user_pythia_ue_settings(),
340  processParameters=params
341  )
342  )
343 
344  common.log( func_id+" Returning Generator...")
345 
346  return generator
347 
348 #---------------------------------
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.

References user_pythia_ue_settings().

708 def _generate_HpT(step, evt_type, energy, evtnumber):
709  """
710  Here the settings for the RS1 graviton into gamma gamma.
711  """
712 
713  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
714  common.log( func_id+" Entering... ")
715 
716  # Build the process source
717  generator = cms.EDFilter("Pythia6GeneratorFilter",
718  pythiaPylistVerbosity = cms.untracked.int32(0),
719  pythiaHepMCVerbosity = cms.untracked.bool(False),
720  maxEventsToPrint = cms.untracked.int32(0),
721  filterEfficiency = cms.untracked.double(1.0),
722  PythiaParameters = cms.PSet(\
723  parameterSets = cms.vstring('PythiaUESettings', 'processParameters', 'pythiaMSSMmhmax'),
724  PythiaUESettings=user_pythia_ue_settings(),
725  processParameters=cms.vstring\
726  ('MSEL = 0 ',# ! user control',
727  'MSUB(401) = 1 ',# ! gg->tbH+ Registered by Alexandre.Nikitenko@cern.ch',
728  'MSUB(402) = 1 ',# ! qq->tbH+ Registered by Alexandre.Nikitenko@cern.ch',
729  'IMSS(1)= 1 ',# ! MSSM ', 'RMSS(5) = 30. ! TANBETA',
730  'RMSS(19) = 200.',# ! (D=850.) m_A',
731  'MDME(503,1)=0 ',# !Higgs(H+) decay into dbar u',
732  'MDME(504,1)=0 ',# !Higgs(H+) decay into sbar c',
733  'MDME(505,1)=0 ',# !Higgs(H+) decay into bbar t',
734  'MDME(506,1)=0 ',# !Higgs(H+) decay into b bar t',
735  'MDME(507,1)=0 ',# !Higgs(H+) decay into e+ nu_e',
736  'MDME(508,1)=0 ',# !Higgs(H+) decay into mu+ nu_mu',
737  'MDME(509,1)=1 ',# !Higgs(H+) decay into tau+ nu_tau',
738  'MDME(510,1)=0 ',# !Higgs(H+) decay into tau prime+ nu_tau',
739  'MDME(511,1)=0 ',# !Higgs(H+) decay into W+ h0',
740  'MDME(512,1)=0 ',# !Higgs(H+) decay into ~chi_10 ~chi_1+',
741  'MDME(513,1)=0 ',# !Higgs(H+) decay into ~chi_10 ~chi_2+',
742  'MDME(514,1)=0 ',# !Higgs(H+) decay into ~chi_20 ~chi_1+',
743  'MDME(515,1)=0 ',# !Higgs(H+) decay into ~chi_20 ~chi_2+',
744  'MDME(516,1)=0 ',# !Higgs(H+) decay into ~chi_30 ~chi_1+',
745  'MDME(517,1)=0 ',# !Higgs(H+) decay into ~chi_30 ~chi_2+',
746  'MDME(518,1)=0 ',# !Higgs(H+) decay into ~chi_40 ~chi_1+',
747  'MDME(519,1)=0 ',# !Higgs(H+) decay into ~chi_40 ~chi_2+',
748  'MDME(520,1)=0 ',# !Higgs(H+) decay into ~t_1 ~b_1bar',
749  'MDME(521,1)=0 ',# !Higgs(H+) decay into ~t_2 ~b_1bar',
750  'MDME(522,1)=0 ',# !Higgs(H+) decay into ~t_1 ~b_2bar',
751  'MDME(523,1)=0 ',# !Higgs(H+) decay into ~t_2 ~b_2bar',
752  'MDME(524,1)=0 ',# !Higgs(H+) decay into ~d_Lbar ~u_L',
753  'MDME(525,1)=0 ',# !Higgs(H+) decay into ~s_Lbar ~c_L',
754  'MDME(526,1)=0 ',# !Higgs(H+) decay into ~e_L+ ~nu_eL',
755  'MDME(527,1)=0 ',# !Higgs(H+) decay into ~mu_L+ ~nu_muL',
756  'MDME(528,1)=0 ',# !Higgs(H+) decay into ~tau_1+ ~nu_tauL',
757  'MDME(529,1)=0 '# !Higgs(H+) decay into ~tau_2+ ~nu_tauL'),
758  ),
759  pythiaMSSMmhmax = cms.vstring\
760  ('RMSS(2)= 200. ',# ! SU(2) gaugino mass ',
761  'RMSS(3)= 800. ',# ! SU(3) (gluino) mass ',
762  'RMSS(4)= 200. ',# ! higgsino mass parameter',
763  'RMSS(6)= 1000. ',# ! left slepton mass',
764  'RMSS(7)= 1000. ',# ! right slepton mass',
765  'RMSS(8)= 1000. ',# ! right slepton mass',
766  'RMSS(9)= 1000. ',# ! right squark mass',
767  'RMSS(10)= 1000. ',# ! left sq mass for 3th gen/heaviest stop mass',
768  'RMSS(11)= 1000. ',# ! right sbottom mass/lightest sbotoom mass',
769  'RMSS(12)= 1000. ',# ! right stop mass/lightest stop mass',
770  'RMSS(13)= 1000. ',# ! left stau mass',
771  'RMSS(14)= 1000. ',# ! right stau mass',
772  'RMSS(15)= 2449. ',# ! Ab',
773  'RMSS(16)= 2449. ',# ! At',
774  'RMSS(17)= 2449. '# ! Atau'
775  )
776  )
777  )
778 
779 
780  common.log(func_id+" Returning Generator...")
781 
782  return generator
783 
784 #---------------------------------
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.

References user_pythia_ue_settings().

206 def _generate_MINBIAS(step, evt_type, energy, evtnumber):
207  """
208  Settings for MINBIAS events generation
209  """
210 
211  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
212  common.log( func_id+" Entering... ")
213 
214  # Build the process source
215  generator = cms.EDFilter("Pythia6GeneratorFilter",
216  pythiaPylistVerbosity=cms.untracked.int32(0),
217  pythiaHepMCVerbosity=cms.untracked.bool(False),
218  maxEventsToPrint = cms.untracked.int32(0),
219  filterEfficiency = cms.untracked.double(1),
220  PythiaParameters = cms.PSet\
221  (parameterSets = cms.vstring\
222  ("pythiaUESettings",
223  "processParameters"),
224  pythiaUESettings = user_pythia_ue_settings(),
225  processParameters = cms.vstring(
226  "MSEL=0",
227  "MSUB(11)=1",
228  "MSUB(12)=1",
229  "MSUB(13)=1",
230  "MSUB(28)=1",
231  "MSUB(53)=1",
232  "MSUB(68)=1",
233  "MSUB(92)=1",
234  "MSUB(93)=1",
235  "MSUB(94)=1",
236  "MSUB(95)=1"))
237  )
238  common.log( func_id+" Returning Generator...")
239 
240  return generator
241 
242 #---------------------------------
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.

References energy_split().

74 
75 def _generate_PGUN(step, evt_type, energy, evtnumber):
76  """
77  Here the settings for the simple generation of a muon, electron or gamma
78  are stated.
79  """
80  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
81  common.log( func_id+" Entering... ")
82 
83  # pythia ID: configure the ID of the particle through a dictionary
84  py_id_dict = {"MU-":13,
85  "MU+":-13,
86  "E" :11,
87  "DIE":11,
88  "TAU":15,
89  "GAMMA":22,
90  "PI+":211,
91  "PI-":-211,
92  "PI0":111}
93 
94  # Build the id string of the event name:
95  id_string = evt_type+" "+energy+" nevts "+ str(evtnumber)
96 
97  # We have to check if we want to generate a particle with pt=X or Energy=X
98  pt_flag=True
99  if 'pt' in energy[0:2] or \
100  'Pt' in energy[0:2] or \
101  'PT' in energy[0:2]:
102  energy=energy[2:]
103  else:
104  pt_flag=False
105 
106  # Energy boundaries are now set:
107  lower_energy = ""
108  upper_energy = ""
109 
110 
111 
112  # Build the partID string
113  part_id = cms.untracked.vint32 ()
114 
115  part_id.append(py_id_dict[evt_type])
116  upper_energy=''
117  lower_energy=''
118  if energy.find('_')!=-1:
119  upper_energy,lower_energy=energy_split(energy)
120  else:
121  epsilon= 0.001
122  lower_energy = str ( int(energy) - epsilon) # We want a calculation and
123  upper_energy = str ( int(energy) + epsilon) # the result as a string
124 
125  # Build the process source
126  if evt_type in ("TAU","E"):
127  # Add the corresponding opposite sign particle. Only for taus and es.
128  part_id.append(-1*part_id[0])
129 
130  antip_flag=False
131  if evt_type=="DIE":
132  antip_flag=True
133 
134  if pt_flag:
135  common.log( func_id+ "This is a pt particle gun ..." )
136  generator = cms.EDProducer("FlatRandomPtGunProducer",
137  psethack = cms.string(id_string),
138  firstRun = cms.untracked.uint32(1),
139  PGunParameters = cms.PSet(
140  PartID = part_id,
141  MinEta = cms.double(ETA_MAX),
142  MaxEta = cms.double(ETA_MIN),
143  MinPhi = cms.double(-PI),
144  MaxPhi = cms.double(PI),
145  MinPt = cms.double(lower_energy),
146  MaxPt = cms.double(upper_energy)
147  ),
148  AddAntiParticle=cms.bool(antip_flag),
149  Verbosity = cms.untracked.int32(0)
150  )
151  else:
152  common.log( func_id+ " This is an Energy particle gun ..." )
153  generator = cms.EDProducer("FlatRandomEGunProducer",
154  psethack = cms.string(id_string),
155  firstRun = cms.untracked.uint32(1),
156  PGunParameters = cms.PSet(
157  PartID = part_id,
158  MinEta = cms.double(ETA_MAX),
159  MaxEta = cms.double(ETA_MIN),
160  MinPhi = cms.double(-PI),
161  MaxPhi = cms.double(PI),
162  MinE = cms.double(lower_energy),
163  MaxE = cms.double(upper_energy)
164  ),
165  AddAntiParticle=cms.bool(antip_flag),
166  Verbosity = cms.untracked.int32(0)
167  )
168 
169  common.log( func_id+" Returning Generator...")
170 
171  return generator
172 
173 #---------------------------
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.

References energy_split(), and user_pythia_ue_settings().

175 def _generate_QCD(step, evt_type, energy, evtnumber):
176  """
177  Here the settings for the generation of QCD events
178  """
179  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
180  common.log( func_id+" Entering... ")
181 
182  # Recover the energies from the string:
183  upper_energy, lower_energy = energy_split(energy)
184 
185  # Build the process source
186  generator = cms.EDFilter("Pythia6GeneratorFilter",
187  pythiaPylistVerbosity=cms.untracked.int32(0),
188  pythiaHepMCVerbosity=cms.untracked.bool(False),
189  maxEventsToPrint = cms.untracked.int32(0),
190  filterEfficiency = cms.untracked.double(1),
191  PythiaParameters = cms.PSet\
192  (parameterSets = cms.vstring\
193  ("pythiaUESettings",
194  "processParameters"),
195  pythiaUESettings = user_pythia_ue_settings(),
196  processParameters = cms.vstring("MSEL=1",
197  "CKIN(3)="+upper_energy,
198  "CKIN(4)="+lower_energy))
199  )
200 
201  common.log( func_id+" Returning Generator...")
202  return generator
203 
204 #---------------------------------
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.

References user_pythia_ue_settings().

652 def _generate_RS1GG(step, evt_type, energy, evtnumber):
653  """
654  Here the settings for the RS1 graviton into gamma gamma.
655  """
656 
657  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
658  common.log( func_id+" Entering... ")
659 
660  # Build the process source
661  generator = cms.EDFilter('Pythia6GeneratorFilter',
662  pythiaPylistVerbosity=cms.untracked.int32(0),
663  pythiaHepMCVerbosity=cms.untracked.bool(False),
664  maxEventsToPrint = cms.untracked.int32(0),
665  filterEfficiency = cms.untracked.double(1),
666  PythiaParameters = cms.PSet\
667  (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
668  PythiaUESettings=user_pythia_ue_settings(),
669  processParameters=\
670  cms.vstring('MSEL=0 ',
671  'MSUB(391) =1 ',
672  'MSUB(392) =1 ',
673  'PMAS(347,1) = %s ' %energy,# ! minv ',
674  'PARP(50) = 0.54 ',# ! 0.54 == c=0.1',
675  'MDME(4158,1)=0 ',
676  'MDME(4159,1)=0 ',
677  'MDME(4160,1)=0 ',
678  'MDME(4161,1)=0 ',
679  'MDME(4162,1)=0 ',
680  'MDME(4163,1)=0 ',
681  'MDME(4164,1)=0 ',
682  'MDME(4165,1)=0 ',
683  'MDME(4166,1)=0 ',
684  'MDME(4167,1)=0 ',
685  'MDME(4168,1)=0 ',
686  'MDME(4169,1)=0 ',
687  'MDME(4170,1)=0 ',
688  'MDME(4170,1)=0 ',
689  'MDME(4171,1)=0 ',
690  'MDME(4172,1)=0 ',
691  'MDME(4173,1)=0 ',
692  'MDME(4174,1)=0 ',
693  'MDME(4175,1)=1 ',#! gamma gamma ',
694  'MDME(4176,1)=0 ',
695  'MDME(4177,1)=0 ',
696  'MDME(4178,1)=0 ',
697  'CKIN(3)=20. ',#! minimum pt hat for hard interactions',
698  'CKIN(4)=-1. '#! maximum pt hat for hard interactions'
699  )
700  )
701  )
702 
703  common.log(func_id+" Returning Generator...")
704 
705  return generator
706 #-----------------------------------
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.

References user_pythia_ue_settings().

402 def _generate_TTBAR(step, evt_type, energy, evtnumber):
403  """
404  Here the settings for the ttbar pairs are added to the process.
405  """
406 
407  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
408  common.log(func_id+" Entering... ")
409 
410  # Build the process source
411  generator = cms.EDFilter('Pythia6GeneratorFilter',
412  pythiaPylistVerbosity=cms.untracked.int32(0),
413  pythiaHepMCVerbosity=cms.untracked.bool(False),
414  maxEventsToPrint = cms.untracked.int32(0),
415  filterEfficiency = cms.untracked.double(1),
416  PythiaParameters = cms.PSet\
417  (parameterSets = cms.vstring\
418  ('pythiaUESettings',
419  'processParameters'),
420  pythiaUESettings = user_pythia_ue_settings(),
421  # Tau jets (config by A. Nikitenko)
422  # No tau -> electron
423  # No tau -> muon
424  processParameters =cms.vstring\
425  ("MSEL=0", # userdef process
426  "MSUB(81)=1", # qqbar->QQbar
427  "MSUB(82)=1", # gg to QQbar
428  "MSTP(7)=6", # flavour top
429  "PMAS(6,1)=175" # top mass
430  )
431  )
432  )
433 
434  common.log(func_id+" Returning Generator...")
435 
436  return generator
437 
438 #---------------------------------
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 350 of file relval_generation_module.py.

References energy_split(), and user_pythia_ue_settings().

Referenced by _generate_Higgs().

351  (step, evt_type, energy, evtnumber):
352  """
353  Here the settings necessary to udscb jets generation are added. According
354  to the flavour the Pythia parameters are changed slightly.
355  For the time being the energy parameter is not used.
356  """
357  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
358  common.log( func_id+" Entering... ")
359 
360  # Recover the energies from the string:
361  upper_energy, lower_energy = energy_split(energy)
362 
363  # According to the evt_type build the Pythia settings:
364  pythia_jet_settings=cms.vstring("MSEL=0") # User defined process
365  pythia_jet_settings+=cms.vstring("MSUB(81)=1", #qq->QQ massive
366  "MSUB(82)=1") #gg->QQ massive
367  if evt_type == "C_JETS":
368  pythia_jet_settings+=cms.vstring("MSTP(7)=4") #ccbar
369  common.log( func_id+" Including settings for c jets")
370  else:
371  pythia_jet_settings+=cms.vstring("MSTP(7)=5") #bbbar
372  common.log( func_id+" Including settings for b jets")
373 
374  # Common part to all cases
375  pythia_common=cms.vstring("CKIN(3)="+upper_energy, # Pt low cut
376  "CKIN(4)="+lower_energy, # Pt high cut
377  "CKIN(13)=0.", # eta min
378  "CKIN(14)=2.5", # etamax
379  "CKIN(15)=-2.5", # -etamin
380  "CKIN(16)=0" # -etamax
381  )
382 
383  pythia_jet_settings+=pythia_common
384 
385  # Build the process source
386  generator = cms.EDFilter('Pythia6GeneratorFilter',
387  pythiaVerbosity =cms.untracked.bool(True),
388  PythiaParameters = cms.PSet\
389  (parameterSets = cms.vstring\
390  ("pythiaUESettings","pythiaJets"),
391  pythiaUESettings = user_pythia_ue_settings(),
392  pythiaJets = pythia_jet_settings
393  )
394  )
395 
396  common.log(func_id+" Returning Generator...")
397 
398  return generator
399 
400 #-----------------------------------
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.

References user_pythia_ue_settings().

Referenced by generate().

514 def _generate_Wl(step, evt_type, energy, evtnumber):
515  """
516  Here the settings for the Z ee simulation are added to the process.
517  Energy parameter is not used.
518  """
519 
520  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
521  common.log( func_id+" Entering... ")
522 
523  # Choose between muon or electron decay of the Z
524  electron_flag = "0"
525  muon_flag = "0"
526  tau_flag = "0"
527  if evt_type == "WE":
528  electron_flag = "1"
529  elif evt_type == "WM":
530  muon_flag = "1"
531  elif evt_type == "WT":
532  tau_flag = "1"
533 
534  # Build the process source
535  generator = cms.EDFilter('Pythia6GeneratorFilter',
536  pythiaPylistVerbosity=cms.untracked.int32(0),
537  pythiaHepMCVerbosity=cms.untracked.bool(False),
538  maxEventsToPrint = cms.untracked.int32(0),
539  filterEfficiency = cms.untracked.double(1),
540  PythiaParameters = cms.PSet\
541  (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
542  PythiaUESettings=user_pythia_ue_settings(),
543  processParameters=cms.vstring('MSEL=0 !User defined processes',
544  'MSUB(2) = 1',# !W production
545  'MDME(190,1) = 0',# !W decay into dbar u
546  'MDME(191,1) = 0',# !W decay into dbar c
547  'MDME(192,1) = 0',# !W decay into dbar t
548  'MDME(194,1) = 0',# !W decay into sbar u
549  'MDME(195,1) = 0',# !W decay into sbar c
550  'MDME(196,1) = 0',# !W decay into sbar t
551  'MDME(198,1) = 0',# !W decay into bbar u
552  'MDME(199,1) = 0',# !W decay into bbar c
553  'MDME(200,1) = 0',# !W decay into bbar t
554  'MDME(205,1) = 0',# !W decay into bbar tp
555  'MDME(206,1) = %s' %electron_flag,# !W decay into e+ nu_e
556  'MDME(207,1) = %s' %muon_flag,# !W decay into mu+ nu_mu
557  'MDME(208,1) = %s' %tau_flag,# !W decay into tau+ nu_tau
558  )
559  )
560  )
561 
562  common.log(func_id+" Returning Generator...")
563 
564  return generator
565 
566 #---------------------------------
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.

References user_pythia_ue_settings().

440 def _generate_Zll(step, evt_type, energy, evtnumber):
441  """
442  Here the settings for the Z ee simulation are added to the process.
443  Energy parameter is not used.
444  """
445 
446  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
447  common.log( func_id+" Entering... ")
448 
449  # Choose between muon or electron decay of the Z
450  user_param_sets = "pythiaZll"
451  electron_flag = "0"
452  muon_flag = "0"
453  tau_flag = "0"
454  if evt_type == "ZEE":
455  electron_flag = "1"
456  elif evt_type == "ZMUMU":
457  muon_flag = "1"
458  elif evt_type == "ZTT":
459  tau_flag = "1"
460  else:
461  electron_flag=muon_flag=tau_flag= "1"
462 
463  pythia_param_sets = cms.vstring(
464  "MSEL = 11 ",
465  "MDME( 174,1) = 0", #Z decay into d dbar",
466  "MDME( 175,1) = 0", #Z decay into u ubar",
467  "MDME( 176,1) = 0", #Z decay into s sbar",
468  "MDME( 177,1) = 0", #Z decay into c cbar",
469  "MDME( 178,1) = 0", #Z decay into b bbar",
470  "MDME( 179,1) = 0", #Z decay into t tbar",
471  "MDME( 182,1) = %s" %electron_flag,#Z decay into e- e+",
472  "MDME( 183,1) = 0", #Z decay into nu_e nu_ebar",
473  "MDME( 184,1) = %s" %muon_flag,#Z decay into mu- mu+",
474  "MDME( 185,1) = 0", #Z decay into nu_mu nu_mubar",
475  "MDME( 186,1) = %s" %tau_flag, #Z decay into tau- tau+",
476  "MDME( 187,1) = 0", #Z decay into nu_tau nu_taubar",
477  "MSTJ( 11) = 3", #Choice of the fragmentation function",
478  "MSTP( 2) = 1", #which order running alphaS",
479  "MSTP( 33) = 0", #(D=0) ",
480  "MSTP( 51) = 7", #structure function chosen",
481  "MSTP( 81) = 1", #multiple parton interactions 1 is
482  #Pythia default,
483  "MSTP( 82) = 4", #Defines the multi-parton model",
484  "PARJ( 71) = 10.", #for which ctau 10 mm",
485  "PARP( 82) = 1.9", #pt cutoff for multiparton interactions",
486  "PARP( 89) = 1000.", #sqrts for which PARP82 is set",
487  "PARP( 83) = 0.5", #Multiple interactions: matter distrbn
488  #parameter Registered byChris.Seez@cern.ch
489  "PARP( 84) = 0.4", #Multiple interactions: matterdistribution
490  #parameter Registered by Chris.Seez@cern.ch
491  "PARP( 90) = 0.16", #Multiple interactions:rescaling power
492  #Registered by Chris.Seez@cern.ch
493  "CKIN( 1) = 40.", #(D=2. GeV)
494  "CKIN( 2) = -1.", #(D=-1. GeV) \
495  )
496 
497  # Build the process source
498  generator = cms.EDFilter('Pythia6GeneratorFilter',
499  pythiaPylistVerbosity=cms.untracked.int32(0),
500  pythiaHepMCVerbosity=cms.untracked.bool(False),
501  maxEventsToPrint = cms.untracked.int32(0),
502  filterEfficiency = cms.untracked.double(1),
503  PythiaParameters = cms.PSet\
504  (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
505  PythiaUESettings=user_pythia_ue_settings(),
506  processParameters=pythia_param_sets )
507  )
508 
509  common.log(func_id+" Returning Generator...")
510 
511  return generator
512 #---------------------------------
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.

568 def _generate_ZPJJ(step, evt_type, energy, evtnumber):
569  """
570  Here the settings for the Zprime to JJ simulation are added to the
571  process.
572  """
573 
574  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
575  common.log(func_id+" Entering... ")
576  common.log( func_id+" Returning Generator...")
577  # You might wonder why this time it's not pythonised..Me too: due to the excessive fragmentation of the
578  # cfgs it's not worth to do that at the moment. It also obliges to have two functions for the ZP instead of one.
579  return common.include_files('Configuration/JetMET/data/calorimetry-gen-Zprime_Dijets_700.cff')[0].source
580 
581 #---------------------------------
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.

References user_pythia_ue_settings().

583 def _generate_ZPll(step, evt_type, energy, evtnumber):
584  """
585  Here the settings for the Z ee simulation are added to the process.
586  Energy parameter is not used.
587  """
588 
589  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
590  common.log( func_id+" Entering... ")
591 
592  # Choose between muon or electron decay of the Z
593  electron_flag = "0"
594  muon_flag = "0"
595  tau_flag = "0"
596  if evt_type == "ZPEE":
597  electron_flag = "1"
598  elif evt_type == "ZPMUMU":
599  muon_flag = "1"
600  elif evt_type == "ZPTT":
601  tau_flag = "1"
602  else:
603  electron_flag=muon_flag=tau_flag= "1"
604 
605  # Build the process source
606  generator = cms.EDFilter('Pythia6GeneratorFilter',
607  pythiaPylistVerbosity=cms.untracked.int32(0),
608  pythiaHepMCVerbosity=cms.untracked.bool(False),
609  maxEventsToPrint = cms.untracked.int32(0),
610  filterEfficiency = cms.untracked.double(1),
611  PythiaParameters = cms.PSet\
612  (parameterSets = cms.vstring('PythiaUESettings','processParameters'),
613  PythiaUESettings=user_pythia_ue_settings(),
614  processParameters=\
615  cms.vstring('MSEL = 0 ',
616  'MSUB(141) = 1 ',# !ff gamma z0 Z0',
617  'MSTP(44) = 3 ',# !only select the Z process',
618  'PMAS(32,1) = %s' %energy,# !mass of Zprime',
619  'CKIN(1) = 400 ',# !(D=2. GeV)',
620  'MDME(289,1)= 0 ',# !d dbar',
621  'MDME(290,1)= 0 ',# !u ubar',
622  'MDME(291,1)= 0 ',# !s sbar',
623  'MDME(292,1)= 0 ',# !c cbar',
624  'MDME(293,1)= 0 ',# !b bar',
625  'MDME(294,1)= 0 ',# !t tbar',
626  'MDME(295,1)= 0 ',# !4th gen Q Qbar',
627  'MDME(296,1)= 0 ',# !4th gen Q Qbar',
628  'MDME(297,1)= %s ' %electron_flag,# !e e',
629  'MDME(298,1)= 0 ',# !neutrino e e',
630  'MDME(299,1)= %s ' %muon_flag,# ! mu mu',
631  'MDME(300,1)= 0 ',# !neutrino mu mu',
632  'MDME(301,1)= %s ' %tau_flag,# !tau tau',
633  'MDME(302,1)= 0 ',# !neutrino tau tau',
634  'MDME(303,1)= 0 ',# !4th generation lepton',
635  'MDME(304,1)= 0 ',# !4th generation neutrino',
636  'MDME(305,1)= 0 ',# !W W',
637  'MDME(306,1)= 0 ',# !H charged higgs',
638  'MDME(307,1)= 0 ',# !Z',
639  'MDME(308,1)= 0 ',# !Z',
640  'MDME(309,1)= 0 ',# !sm higgs',
641  'MDME(310,1)= 0 ' # !weird neutral higgs HA')
642  )
643  )
644  )
645 
646  common.log(func_id+" Returning Generator...")
647 
648  return generator
649 
650 #-----------------------------------
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.

Referenced by _generate_PGUN(), _generate_QCD(), and _generate_udscb_jets().

786 def energy_split(energy):
787  """
788  Extract from a string of the form "lowenergy*highenergy" two
789  bounds. It checks on its consistency. If the format is unknown
790  the program stops.
791  """
792  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
793  common.log( func_id+" Entering... ")
794 
795  separator_list = ["-", #fault tolerance is good
796  "_",
797  "*",
798  "/",
799  ";",
800  ","]
801  for separator in separator_list:
802  if energy.count(separator)==1:
803  common.log( func_id+" Found separator in energy string...")
804  low,high = energy.split(separator)
805  if float(high) > float(low):
806  common.log(func_id+" Returning Energy...")
807  return (low,high)
808 
809  raise "Energy Format: ","Unrecognised energy format."
810 
811 #-----------------------------------
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.

References _generate_Wl().

27 
28 def generate(step, evt_type, energy, evtnumber):
29  """
30  This function calls all the other functions specific for
31  an event evt_type.
32  """
33 
34  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
35  common.log( func_id+" Entering... ")
36 
37  # Build the switch cases:
38 
39  # Particle Gun
40  if evt_type in ("MU+","MU-","E","DIE","GAMMA","TAU","PI0","PI+","PI-"):
41  generator = _generate_PGUN\
42  (step, evt_type, energy, evtnumber)
43 
44  elif evt_type in ("HZZMUMUMUMU", "HZZEEEE", "HZZTTTT", "HZZLLLL","HGG"):
45  generator = _generate_Higgs\
46  (step, evt_type, energy, evtnumber)
47 
48  elif evt_type in ("B_JETS", "C_JETS"):
49  generator = _generate_udscb_jets\
50  (step, evt_type, energy, evtnumber)
51 
52  elif evt_type in ("QCD","TTBAR","ZPJJ","MINBIAS","RS1GG","HpT"):
53  generator = eval("_generate_"+evt_type+"(step, evt_type, energy, evtnumber)")
54 
55  elif evt_type in ("ZEE","ZTT","ZMUMU"):
56  generator = _generate_Zll\
57  (step, evt_type, energy, evtnumber)
58 
59  elif evt_type in ("ZPEE","ZPTT","ZPMUMU"):
60  generator = _generate_ZPll\
61  (step, evt_type, energy, evtnumber)
62 
63  elif evt_type in ("WE","WM","WT"):
64  generator = _generate_Wl(step, evt_type, energy, evtnumber)
65 
66  else:
67  raise "Event type","Type not yet implemented."
68 
69  common.log( func_id+" Returning Generator")
70 
71  return generator
72 
73 #------------------------------
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.

Referenced by _generate_Higgs(), _generate_HpT(), _generate_MINBIAS(), _generate_QCD(), _generate_RS1GG(), _generate_TTBAR(), _generate_udscb_jets(), _generate_Wl(), _generate_Zll(), and _generate_ZPll().

814  """
815  The function simply returns a cms.vstring which is a summary of the
816  Pythia settings for the event generation
817  """
818 
819 
820 
821  func_id=mod_id+"["+sys._getframe().f_code.co_name+"]"
822  common.log(func_id+" Returning PythiaUE settings...")
823 
824  return common.include_files('Configuration/Generator/data/PythiaUESettings.cfi')[0].pythiaUESettings
825 

Variable Documentation

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.