JHUGen MELA  v2.4.1
Matrix element calculations as used in JHUGen. MELA is an important tool that was used for the Higgs boson discovery and for precise measurements of its structure and interactions. Please see the website https://spin.pha.jhu.edu/ and papers cited there for more details, and kindly cite those papers when using this code.
Public Member Functions | Public Attributes | List of all members
testME_more.TestMela Class Reference
Inheritance diagram for testME_more.TestMela:
Inheritance graph
[legend]
Collaboration diagram for testME_more.TestMela:
Collaboration graph
[legend]

Public Member Functions

def setUpClass (cls)
 
def setUp (self)
 
def tearDown (self)
 
def testcontact_decay (self)
 
def testcontact_VBF (self)
 
def testcontact_ZH (self)
 
def runcontact (self, event, isprod, *setprocessargs)
 
def Vprimekwargs (self, process, usevpvp)
 
def testzp_decay (self)
 
def testzp_spin2 (self)
 
def testzp_VBF (self)
 
def testzp_ZH (self)
 
def testzpzp_decay (self)
 
def testzp_spin2 (self)
 
def testzpzp_VBF (self)
 
def testzpzp_ZH (self)
 
def runVprime (self, event, isprod, usevpvp, *setprocessargs, **couplings)
 
def testmultiplecalls_VBF (self)
 
def testmultiplecalls_ZH (self)
 
def runmultiplecalls (self, event)
 

Public Attributes

 m
 

Detailed Description

Definition at line 73 of file testME_more.py.

Member Function Documentation

◆ runcontact()

def testME_more.TestMela.runcontact (   self,
  event,
  isprod,
setprocessargs 
)
correspondence between a1 L1 L1Zg and contact terms

Definition at line 87 of file testME_more.py.

87  def runcontact(self, event, isprod, *setprocessargs):
88  """
89  correspondence between a1 L1 L1Zg and contact terms
90  """
91 
92  M_Z = 91.1876
93  Ga_Z = 2.4952
94  aL_lep = -0.53762
95  aR_lep = 0.46238
96  aL_nu = 1
97  aR_nu = 0
98 
99  sitW2 = 0.23119
100  aL_up = (-2 * sitW2 * 2./3 + 1)
101  aR_up = -2 * sitW2 * 2./3
102  aL_dn = (-2 * sitW2 * -1./3 - 1)
103  aR_dn = -2 * sitW2 * -1./3
104 
105  e = 0.8431872482432357 # = cL_lep = cR_lep from mod_Parameters
106  c_up = -2./3 * e
107  c_dn = 1./3 * e
108  L1 = 10000.
109 
110  m = self.m
111  computeP = m.computeProdP if isprod else m.computeP
112 
113  ghz1, ghz1_prime2, ghzgs1_prime2 = random.uniform(-1, 1), random.uniform(-10000, 10000), random.uniform(-10000, 10000)
114  m.setInputEvent_fromLHE_Hwithdecay(event, True)
115 
116  m.setProcess(*setprocessargs)
117  m.ghz1 = ghz1
118  m.ghz1_prime2 = ghz1_prime2
119  m.ghzgs1_prime2 = ghzgs1_prime2
120  me1 = computeP()
121 
122  m.setProcess(*setprocessargs)
123  m.ghz1 = ghz1 + 2 * ghz1_prime2 * (M_Z**2 - 1j*M_Z*Ga_Z)/L1**2
124  m.ghzzp1 = M_Z**2/L1**2
125  m.ezp_El_left = m.ezp_Mu_left = m.ezp_Ta_left = aL_lep * ghz1_prime2 + e * ghzgs1_prime2
126  m.ezp_El_right = m.ezp_Mu_right = m.ezp_Ta_right = aR_lep * ghz1_prime2 + e * ghzgs1_prime2
127  m.ezp_Up_left = m.ezp_Chm_left = m.ezp_Top_left = aL_up * ghz1_prime2 + c_up * ghzgs1_prime2
128  m.ezp_Up_right = m.ezp_Chm_right = m.ezp_Top_right = aR_up * ghz1_prime2 + c_up * ghzgs1_prime2
129  m.ezp_Dn_left = m.ezp_Str_left = m.ezp_Bot_left = aL_dn * ghz1_prime2 + c_dn * ghzgs1_prime2
130  m.ezp_Dn_right = m.ezp_Str_right = m.ezp_Bot_right = aR_dn * ghz1_prime2 + c_dn * ghzgs1_prime2
131  m.ezp_NuE_left = aL_nu * ghz1_prime2
132  m.ezp_NuE_right = aR_nu * ghz1_prime2
133  me2 = computeP()
134 
135  self.assertEquals(me1, me2)
136  self.assertNotEquals(me1, 0)
137 

◆ runmultiplecalls()

def testME_more.TestMela.runmultiplecalls (   self,
  event 
)

Definition at line 257 of file testME_more.py.

257  def runmultiplecalls(self, event):
258  m = self.m
259  m.setInputEvent_fromLHE_Hwithdecay(event, False)
260 
261  firstrun = []
262  secondrun = []
263 
264  for lst in firstrun, secondrun:
265  m.setProcess(TVar.SelfDefine_spin0, TVar.JHUGen, TVar.JJVBF)
266  m.ghz1 = 1
267  lst.append(m.computeProdP(True))
268  lst.append(m.getConstant())
269 
270  m.setProcess(TVar.SelfDefine_spin0, TVar.JHUGen, TVar.JJQCD)
271  m.ghg2 = 1
272  lst.append(m.computeProdP(True))
273  lst.append(m.getConstant())
274 
275  m.setProcess(TVar.SelfDefine_spin0, TVar.JHUGen, TVar.Had_ZH)
276  m.ghz3 = 1
277  lst.append(m.computeProdP(True))
278  lst.append(m.getConstant())
279 
280  m.setProcess(TVar.SelfDefine_spin0, TVar.JHUGen, TVar.Had_WH)
281  m.ghz2_prime4 = 1
282  lst.append(m.computeProdP(True))
283  lst.append(m.getConstant())
284 
285  m.setProcess(TVar.SelfDefine_spin0, TVar.JHUGen, TVar.ZZINDEPENDENT)
286  m.ghzzp1 = ezp_El_left = 1
287  lst.append(m.computeP(True))
288  lst.append(m.getConstant())
289 
290  self.assertEquals(firstrun, secondrun)
291 

◆ runVprime()

def testME_more.TestMela.runVprime (   self,
  event,
  isprod,
  usevpvp,
setprocessargs,
**  couplings 
)
test that with mZ' == mZ, we get the same behavor with Z and Z'

Definition at line 178 of file testME_more.py.

178  def runVprime(self, event, isprod, usevpvp, *setprocessargs, **couplings):
179  """
180  test that with mZ' == mZ, we get the same behavor with Z and Z'
181  """
182 
183  M_Z = 91.1876
184  Ga_Z = 2.4952
185  M_W = 80.399
186  Ga_W = 2.085
187  sitW2 = 0.23119
188 
189  aL_lep = -0.53762
190  aR_lep = 0.46238
191  aL_nu = 1
192  aR_nu = 0
193 
194  sitW2 = 0.23119
195  aL_up = (-2 * sitW2 * 2./3 + 1)
196  aR_up = -2 * sitW2 * 2./3
197  aL_dn = (-2 * sitW2 * -1./3 - 1)
198  aR_dn = -2 * sitW2 * -1./3
199 
200  bL = (2*(1-sitW2))**.5
201 
202  m = self.m
203  computeP = m.computeProdP if isprod else m.computeP
204  m.setInputEvent_fromLHE_Hwithdecay(event, True)
205 
206  m.setProcess(*setprocessargs)
207  for coupling, value in couplings.iteritems():
208  if re.match("(ghz[1-4](_prime[2-7]?)?|b([1-9]|10))", coupling):
209  pass
210  elif re.match("(ghzgs([2-4]|1_prime2)|bzgs[12348])", coupling):
211  if usevpvp:
212  raise ValueError("Can't use gs coupling {} for vpvp test".format(coupling))
213  else:
214  raise ValueError("Invalid coupling {}".format(coupling))
215  setattr(m, coupling, value)
216 
217  me1 = computeP()
218 
219  m.setProcess(*setprocessargs)
220 
221  m.a1 = 1
222  for coupling, value in couplings.iteritems():
223  if usevpvp:
224  newcoupling = coupling.replace("ghz", "ghzpzp").replace("b", "bzpzp")
225  else:
226  newcoupling = coupling.replace("ghz", "ghzzp").replace("b", "bzzp").replace("zzpgs", "zpgs").replace("zzpzgs", "zpgs")
227  if "gs" not in coupling:
228  value /= 2
229  assert newcoupling != coupling
230  setattr(m, newcoupling, value)
231  m.M_Zprime = M_Z
232  m.Ga_Zprime = Ga_Z
233  m.M_Wprime = M_W
234  m.Ga_Wprime = Ga_W
235 
236  m.ezp_El_left = m.ezp_Mu_left = m.ezp_Ta_left = aL_lep
237  m.ezp_El_right = m.ezp_Mu_right = m.ezp_Ta_right = aR_lep
238  m.ezp_Up_left = m.ezp_Chm_left = m.ezp_Top_left = aL_up
239  m.ezp_Up_right = m.ezp_Chm_right = m.ezp_Top_right = aR_up
240  m.ezp_Dn_left = m.ezp_Str_left = m.ezp_Bot_left = aL_dn
241  m.ezp_Dn_right = m.ezp_Str_right = m.ezp_Bot_right = aR_dn
242  m.ezp_NuE_left = aL_nu
243  m.ezp_NuE_right = aR_nu
244 
245  m.ewp_El_left = m.ewp_Mu_left = m.ewp_Ta_left = m.ewp_Up_left = m.ewp_Chm_left = m.ewp_Top_left = bL
246 
247  me2 = computeP()
248 
249  self.assertEquals(me1, me2)
250  self.assertNotEquals(me1, 0)
251 

◆ setUp()

def testME_more.TestMela.setUp (   self)

Definition at line 77 of file testME_more.py.

77  def setUp(self):
78  random.seed(seed)

◆ setUpClass()

def testME_more.TestMela.setUpClass (   cls)

Definition at line 75 of file testME_more.py.

75  def setUpClass(cls):
76  cls.m = Mela()

◆ tearDown()

def testME_more.TestMela.tearDown (   self)

Definition at line 79 of file testME_more.py.

79  def tearDown(self):
80  self.m.resetInputEvent()

◆ testcontact_decay()

def testME_more.TestMela.testcontact_decay (   self)

Definition at line 81 of file testME_more.py.

81  def testcontact_decay(self):
82  self.runcontact(event1_ggH, False, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.ZZINDEPENDENT)

◆ testcontact_VBF()

def testME_more.TestMela.testcontact_VBF (   self)

Definition at line 83 of file testME_more.py.

83  def testcontact_VBF(self):
84  self.runcontact(event2_VBF, True, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.JJVBF)

◆ testcontact_ZH()

def testME_more.TestMela.testcontact_ZH (   self)

Definition at line 85 of file testME_more.py.

85  def testcontact_ZH(self):
86  self.runcontact(event3_ZH, True, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.Lep_ZH)

◆ testmultiplecalls_VBF()

def testME_more.TestMela.testmultiplecalls_VBF (   self)

Definition at line 252 of file testME_more.py.

252  def testmultiplecalls_VBF(self):
253  self.runmultiplecalls(event2_VBF)

◆ testmultiplecalls_ZH()

def testME_more.TestMela.testmultiplecalls_ZH (   self)

Definition at line 254 of file testME_more.py.

254  def testmultiplecalls_ZH(self):
255  self.runmultiplecalls(event3_ZH.replace(" 13", " 3").replace("-13", " -3"))
256 

◆ testzp_decay()

def testME_more.TestMela.testzp_decay (   self)

Definition at line 162 of file testME_more.py.

162  def testzp_decay(self):
163  self.runVprime(event1_ggH, False, False, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.ZZINDEPENDENT, **self.Vprimekwargs(0, False))

◆ testzp_spin2() [1/2]

def testME_more.TestMela.testzp_spin2 (   self)

Definition at line 164 of file testME_more.py.

164  def testzp_spin2(self):
165  self.runVprime(event1_ggH, False, False, TVar.SelfDefine_spin2, TVar.JHUGen, TVar.ZZINDEPENDENT, **self.Vprimekwargs(2, False))

◆ testzp_spin2() [2/2]

def testME_more.TestMela.testzp_spin2 (   self)

Definition at line 172 of file testME_more.py.

172  def testzp_spin2(self):
173  self.runVprime(event1_ggH, False, True, TVar.SelfDefine_spin2, TVar.JHUGen, TVar.ZZINDEPENDENT, **self.Vprimekwargs(2, True))

◆ testzp_VBF()

def testME_more.TestMela.testzp_VBF (   self)

Definition at line 166 of file testME_more.py.

166  def testzp_VBF(self):
167  self.runVprime(event2_VBF, True, False, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.JJVBF, **self.Vprimekwargs(60, False))

◆ testzp_ZH()

def testME_more.TestMela.testzp_ZH (   self)

Definition at line 168 of file testME_more.py.

168  def testzp_ZH(self):
169  self.runVprime(event3_ZH, True, False, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.Lep_ZH, **self.Vprimekwargs(50, False))

◆ testzpzp_decay()

def testME_more.TestMela.testzpzp_decay (   self)

Definition at line 170 of file testME_more.py.

170  def testzpzp_decay(self):
171  self.runVprime(event1_ggH, False, True, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.ZZINDEPENDENT, **self.Vprimekwargs(0, True))

◆ testzpzp_VBF()

def testME_more.TestMela.testzpzp_VBF (   self)

Definition at line 174 of file testME_more.py.

174  def testzpzp_VBF(self):
175  self.runVprime(event2_VBF, True, True, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.JJVBF, **self.Vprimekwargs(60, True))

◆ testzpzp_ZH()

def testME_more.TestMela.testzpzp_ZH (   self)

Definition at line 176 of file testME_more.py.

176  def testzpzp_ZH(self):
177  self.runVprime(event3_ZH, True, True, TVar.SelfDefine_spin0, TVar.JHUGen, TVar.Lep_ZH, **self.Vprimekwargs(50, True))

◆ Vprimekwargs()

def testME_more.TestMela.Vprimekwargs (   self,
  process,
  usevpvp 
)

Definition at line 138 of file testME_more.py.

138  def Vprimekwargs(self, process, usevpvp):
139  def couplings():
140  if process in (0, 50, 60):
141  for i in range(1, 5):
142  for j in range(8):
143  if j in (3, 6) and not usevpvp: continue #for ZZ', q1^2-q2^2 is defined differently
144  coupling = "ghz{}".format(i)
145  if j: coupling += "_prime"
146  if j>1: coupling += str(j)
147  yield coupling
148  if process == 0 and not usevpvp:
149  yield "ghzgs1_prime2"; yield "ghzgs2"; yield "ghzgs3"; yield "ghzgs4"
150  elif process == 2:
151  for i in range(1, 11): yield "b{}".format(i)
152  if not usevpvp:
153  for i in range(1, 5)+[8]: yield "bzgs".format(i)
154  else:
155  assert False, process
156 
157  return {coupling:
158  (random.uniform(0, 1) + random.uniform(0, 1) * 1j)
159  * (10000 if "prime" in coupling else 1)
160  for coupling in couplings()}
161 

Member Data Documentation

◆ m

testME_more.TestMela.m

Definition at line 76 of file testME_more.py.


The documentation for this class was generated from the following file:
Mela
Definition: Mela.h:48
mela.couplings
tuple couplings
Definition: mela.py:791