Package aloha :: Module aloha_object
[hide private]
[frames] | no frames]

Source Code for Module aloha.aloha_object

   1  ################################################################################ 
   2  # 
   3  # Copyright (c) 2010 The MadGraph5_aMC@NLO Development team and Contributors 
   4  # 
   5  # This file is a part of the MadGraph5_aMC@NLO project, an application which  
   6  # automatically generates Feynman diagrams and matrix elements for arbitrary 
   7  # high-energy processes in the Standard Model and beyond. 
   8  # 
   9  # It is subject to the MadGraph5_aMC@NLO license which should accompany this  
  10  # distribution. 
  11  # 
  12  # For more information, visit madgraph.phys.ucl.ac.be and amcatnlo.web.cern.ch 
  13  # 
  14  ################################################################################ 
  15  ##   Diagram of Class 
  16  ## 
  17  ##    Variable <--- aloha_lib.Variable  
  18  ##               | 
  19  ##               +- LorentzObject <--- Gamma 
  20  ##                                  | 
  21  ##                                  +- Sigma 
  22  ##                                  | 
  23  ##                                  +- P 
  24  ## 
  25  ##    list <--- AddVariable    
  26  ##           | 
  27  ##           +- MultVariable  <--- MultLorentz  
  28  ##            
  29  ##    list <--- LorentzObjectRepresentation <-- ConstantObject 
  30  ## 
  31  ################################################################################ 
  32  from __future__ import division 
  33  import aloha.aloha_lib as aloha_lib 
  34  import aloha 
  35  import cmath 
36 37 #=============================================================================== 38 # P (Momenta) 39 #=============================================================================== 40 -class L_P(aloha_lib.LorentzObject):
41 """ Helas Object for an Impulsion """ 42 43 contract_first = 1 44
45 - def __init__(self, name, lorentz1, particle):
46 self.particle = particle 47 aloha_lib.LorentzObject.__init__(self, name,[lorentz1], [],['P%s'%particle]) 48 aloha_lib.KERNEL.add_tag((name,))
49
50 - def create_representation(self):
51 self.sub0 = aloha_lib.DVariable('P%s_0' % self.particle) 52 self.sub1 = aloha_lib.DVariable('P%s_1' % self.particle) 53 self.sub2 = aloha_lib.DVariable('P%s_2' % self.particle) 54 self.sub3 = aloha_lib.DVariable('P%s_3' % self.particle) 55 56 self.representation= aloha_lib.LorentzObjectRepresentation( 57 {(0,): self.sub0, (1,): self.sub1, \ 58 (2,): self.sub2, (3,): self.sub3}, 59 self.lorentz_ind, [])
60
61 62 -class P(aloha_lib.FactoryLorentz):
63 """ Helas Object for an Impulsion """ 64 65 object_class = L_P 66 67 #def __init__(self, lorentz1, particle): 68 @classmethod
69 - def get_unique_name(self, lorentz1, particle):
70 return '_P^%s_%s' % (particle, lorentz1)
71
72 73 74 #=============================================================================== 75 # Pslash 76 #=============================================================================== 77 -class L_PSlash(aloha_lib.LorentzObject):
78 """ Gamma Matrices """ 79 80 #gamma0 = [[0, 0, 1, 0], [0, 0, 0, 1], [1, 0, 0, 0], [0, 1, 0, 0]] 81 #gamma1 = [[0, 0, 0, 1], [0, 0, 1, 0], [0, -1, 0, 0], [-1, 0, 0, 0]] 82 #gamma2 = [[0, 0, 0, -complex(0,1)],[0, 0, complex(0,1), 0], 83 # [0, complex(0,1), 0, 0], [-complex(0,1), 0, 0, 0]] 84 #gamma3 = [[0, 0, 1, 0], [0, 0, 0, -1], [-1, 0, 0, 0], [0, 1, 0, 0]] 85 # 86 #gamma = [gamma0, gamma1, gamma2, gamma3] 87
88 - def __init__(self, name, spin1, spin2, particle):
89 90 self.particle = particle 91 aloha_lib.LorentzObject.__init__(self,name,[], [spin1, spin2])
92
93 - def create_representation(self):
94 """create representation""" 95 p0 = aloha_lib.DVariable('P%s_0' % self.particle) 96 p1 = aloha_lib.DVariable('P%s_1' % self.particle) 97 p2 = aloha_lib.DVariable('P%s_2' % self.particle) 98 p3 = aloha_lib.DVariable('P%s_3' % self.particle) 99 100 101 gamma = { 102 (0, 0): 0, (0, 1): 0, (0, 2): p0-p3, (0, 3): -1*p1+1j*p2, 103 (1, 0): 0, (1, 1): 0, (1, 2): -1*p1-1j*p2, (1, 3): p0+p3, 104 (2, 0): p0+p3, (2, 1): p1-1j*p2, (2, 2): 0, (2, 3): 0, 105 (3, 0): p1+1j*p2, (3, 1): p0-p3, (3, 2): 0, (3, 3): 0} 106 107 108 self.representation = aloha_lib.LorentzObjectRepresentation(gamma, 109 self.lorentz_ind,self.spin_ind)
110
111 -class PSlash(aloha_lib.FactoryLorentz):
112 113 object_class = L_PSlash 114 115 @classmethod
116 - def get_unique_name(self, spin1, spin2, particle):
117 return '_P%s/_%s_%s' % (particle, spin1,spin2)
118
119 120 #=============================================================================== 121 # Mass 122 #=============================================================================== 123 -class L_Mass(aloha_lib.LorentzObject):
124 """ Helas Object for a Mass""" 125 126
127 - def __init__(self, name, particle):
128 self.particle = particle 129 aloha_lib.LorentzObject.__init__(self, name,[], [])
130
131 - def create_representation(self):
132 mass = aloha_lib.DVariable('M%s' % self.particle) 133 134 self.representation = aloha_lib.LorentzObjectRepresentation( 135 mass, self.lorentz_ind, self.spin_ind)
136
137 -class Mass(aloha_lib.FactoryLorentz):
138 139 object_class = L_Mass 140 141 @classmethod
142 - def get_unique_name(self, particle):
143 return '_M%s' % particle
144
145 #=============================================================================== 146 # Mass 147 #=============================================================================== 148 -class L_Coup(aloha_lib.LorentzObject):
149 """ Helas Object for a Mass""" 150 151
152 - def __init__(self, name, nb):
153 self.nb = nb 154 aloha_lib.LorentzObject.__init__(self, name,[], [])
155
156 - def create_representation(self):
157 coup = aloha_lib.Variable('COUP%s' % self.nb) 158 159 self.representation = aloha_lib.LorentzObjectRepresentation( 160 coup, self.lorentz_ind, self.spin_ind)
161
162 -class Coup(aloha_lib.FactoryLorentz):
163 164 object_class = L_Coup 165 166 @classmethod
167 - def get_unique_name(self, nb):
168 return 'coup%s' % nb
169
170 171 #=============================================================================== 172 # FCT 173 #=============================================================================== 174 -class L_FCT(aloha_lib.LorentzObject):
175 """ Helas Object for a Mass""" 176 177
178 - def __init__(self, name, id):
179 self.fctid = id 180 aloha_lib.LorentzObject.__init__(self, name,[], [])
181
182 - def create_representation(self):
183 var = aloha_lib.Variable('FCT%s' % self.fctid) 184 185 self.representation = aloha_lib.LorentzObjectRepresentation( 186 var, self.lorentz_ind, self.spin_ind)
187
188 -class FCT(aloha_lib.FactoryLorentz):
189 190 object_class = L_FCT 191 192 @classmethod
193 - def get_unique_name(self, name):
194 195 return '_FCT%s' % name
196
197 198 #=============================================================================== 199 # OverMass2 200 #=============================================================================== 201 -class L_OverMass2(aloha_lib.LorentzObject):
202 """ Helas Object for 1/M**2 """ 203
204 - def __init__(self, name, particle):
205 self.particle = particle 206 aloha_lib.LorentzObject.__init__(self, name, [], [], tags=['OM%s' % particle])
207
208 - def create_representation(self):
209 mass = aloha_lib.DVariable('OM%s' % self.particle) 210 211 self.representation = aloha_lib.LorentzObjectRepresentation( 212 mass, self.lorentz_ind, self.spin_ind)
213
214 -class OverMass2(aloha_lib.FactoryLorentz):
215 216 object_class = L_OverMass2 217 218 @classmethod
219 - def get_unique_name(self, particle):
220 return '_OM2_%s' % particle
221
222 #=============================================================================== 223 # Width 224 #=============================================================================== 225 -class L_Width(aloha_lib.LorentzObject):
226 """ Helas Object for an Impulsion """ 227 228
229 - def __init__(self, name, particle):
230 self.particle = particle 231 aloha_lib.LorentzObject.__init__(self, name, [], [])
232
233 - def create_representation(self):
234 width = aloha_lib.DVariable('W%s' % self.particle) 235 236 self.representation= aloha_lib.LorentzObjectRepresentation( 237 width, self.lorentz_ind, self.spin_ind)
238
239 -class Width(aloha_lib.FactoryLorentz):
240 241 object_class = L_Width 242 243 @classmethod
244 - def get_unique_name(self, particle):
245 return '_W%s' % particle
246
247 #=============================================================================== 248 # Param 249 #=============================================================================== 250 -class L_Param(aloha_lib.LorentzObject):
251 """ Object for a Model Parameter """ 252 253
254 - def __init__(self, Lname, name):
255 self.varname = name 256 aloha_lib.LorentzObject.__init__(self, name, [], [])
257
258 - def create_representation(self):
259 param = aloha_lib.Variable( self.varname, aloha_lib.ExtVariable) 260 261 self.representation= aloha_lib.LorentzObjectRepresentation( 262 param, [], [])
263
264 -class Param(aloha_lib.FactoryLorentz):
265 266 object_class = L_Param 267 268 @classmethod
269 - def get_unique_name(self, name):
270 if name == 'Pi': 271 KERNEL.has_pi = True 272 return 'Param_%s' % name
273
274 #=============================================================================== 275 # Scalar 276 #=============================================================================== 277 -class L_Scalar(aloha_lib.LorentzObject):
278 """ Helas Object for a Spinor""" 279 280
281 - def __init__(self, name, particle):
282 self.particle = particle 283 aloha_lib.LorentzObject.__init__(self, name, [], [])
284 285 286
287 - def create_representation(self):
288 rep = aloha_lib.Variable('S%s_1' % self.particle) 289 self.representation= aloha_lib.LorentzObjectRepresentation( 290 rep, [], [])
291
292 -class Scalar(aloha_lib.FactoryLorentz):
293 294 object_class = L_Scalar 295 296 @classmethod
297 - def get_unique_name(self,particle):
298 return '_S%s' % particle
299 #===============================================================================
300 # Spinor 301 #=============================================================================== 302 -class L_Spinor(aloha_lib.LorentzObject):
303 """ Helas Object for a Spinor""" 304 305 contract_first = 1 306
307 - def __init__(self, name, spin1, particle, prefactor=1):
308 self.particle = particle 309 aloha_lib.LorentzObject.__init__(self, name,[], [spin1])
310
311 - def create_representation(self):
312 self.sub0 = aloha_lib.Variable('F%s_1' % self.particle) 313 self.sub1 = aloha_lib.Variable('F%s_2' % self.particle) 314 self.sub2 = aloha_lib.Variable('F%s_3' % self.particle) 315 self.sub3 = aloha_lib.Variable('F%s_4' % self.particle) 316 317 self.representation= aloha_lib.LorentzObjectRepresentation( 318 {(0,): self.sub0, (1,): self.sub1, \ 319 (2,): self.sub2, (3,): self.sub3}, 320 [],self.spin_ind)
321
322 -class Spinor(aloha_lib.FactoryLorentz):
323 """ Helas Object for a Spinor""" 324 325 object_class = L_Spinor 326 327 @classmethod
328 - def get_unique_name(self,spin1, particle):
329 return '_F%s_%s' % (particle,spin1)
330
331 #=============================================================================== 332 # Vector 333 #=============================================================================== 334 -class L_Vector(aloha_lib.LorentzObject):
335 """ Helas Object for a Vector""" 336 337 contract_first = 1 338
339 - def __init__(self, name, lorentz, particle):
340 341 self.particle = particle 342 aloha_lib.LorentzObject.__init__(self, name, [lorentz], [])
343
344 - def create_representation(self):
345 self.sub0 = aloha_lib.Variable('V%s_1' % self.particle) 346 self.sub1 = aloha_lib.Variable('V%s_2' % self.particle) 347 self.sub2 = aloha_lib.Variable('V%s_3' % self.particle) 348 self.sub3 = aloha_lib.Variable('V%s_4' % self.particle) 349 350 self.representation= aloha_lib.LorentzObjectRepresentation( 351 {(0,): self.sub0, (1,): self.sub1, \ 352 (2,): self.sub2, (3,): self.sub3}, 353 self.lorentz_ind, [])
354
355 -class Vector(aloha_lib.FactoryLorentz):
356 357 object_class = L_Vector 358 359 @classmethod
360 - def get_unique_name(self, lor, particle):
361 return '_V%s_%s' % (particle, lor)
362
363 #=============================================================================== 364 # Spin3/2 365 #=============================================================================== 366 -class L_Spin3Half(aloha_lib.LorentzObject):
367 """ Helas Object for a Spin2""" 368
369 - def __init__(self, name, lorentz, spin, particle):
370 371 self.particle = particle 372 aloha_lib.LorentzObject.__init__(self, name, [lorentz], [spin])
373 374
375 - def create_representation(self):
376 377 self.sub00 = aloha_lib.Variable('R%s_1' % self.particle) 378 self.sub01 = aloha_lib.Variable('R%s_2' % self.particle) 379 self.sub02 = aloha_lib.Variable('R%s_3' % self.particle) 380 self.sub03 = aloha_lib.Variable('R%s_4' % self.particle) 381 382 self.sub10 = aloha_lib.Variable('R%s_5' % self.particle) 383 self.sub11 = aloha_lib.Variable('R%s_6' % self.particle) 384 self.sub12 = aloha_lib.Variable('R%s_7' % self.particle) 385 self.sub13 = aloha_lib.Variable('R%s_8' % self.particle) 386 387 self.sub20 = aloha_lib.Variable('R%s_9' % self.particle) 388 self.sub21 = aloha_lib.Variable('R%s_10' % self.particle) 389 self.sub22 = aloha_lib.Variable('R%s_11' % self.particle) 390 self.sub23 = aloha_lib.Variable('R%s_12' % self.particle) 391 392 self.sub30 = aloha_lib.Variable('R%s_13' % self.particle) 393 self.sub31 = aloha_lib.Variable('R%s_14' % self.particle) 394 self.sub32 = aloha_lib.Variable('R%s_15' % self.particle) 395 self.sub33 = aloha_lib.Variable('R%s_16' % self.particle) 396 397 rep = {(0,0): self.sub00, (0,1): self.sub01, (0,2): self.sub02, (0,3): self.sub03, 398 (1,0): self.sub10, (1,1): self.sub11, (1,2): self.sub12, (1,3): self.sub13, 399 (2,0): self.sub20, (2,1): self.sub21, (2,2): self.sub22, (2,3): self.sub23, 400 (3,0): self.sub30, (3,1): self.sub31, (3,2): self.sub32, (3,3): self.sub33} 401 402 403 self.representation= aloha_lib.LorentzObjectRepresentation( rep, \ 404 self.lorentz_ind, self.spin_ind)
405
406 -class Spin3Half(aloha_lib.FactoryLorentz):
407 408 object_class = L_Spin3Half 409 410 @classmethod
411 - def get_unique_name(self, lor, spin, part):
412 return 'Spin3Half%s^%s_%s' % (part, lor, spin)
413
414 #=============================================================================== 415 # Spin2 416 #=============================================================================== 417 -class L_Spin2(aloha_lib.LorentzObject):
418 """ Helas Object for a Spin2""" 419 420
421 - def __init__(self, name, lorentz1, lorentz2, particle):
422 423 self.particle = particle 424 aloha_lib.LorentzObject.__init__(self, name, [lorentz1, lorentz2], [])
425
426 - def create_representation(self):
427 428 self.sub00 = aloha_lib.Variable('T%s_1' % self.particle) 429 self.sub01 = aloha_lib.Variable('T%s_2' % self.particle) 430 self.sub02 = aloha_lib.Variable('T%s_3' % self.particle) 431 self.sub03 = aloha_lib.Variable('T%s_4' % self.particle) 432 433 self.sub10 = aloha_lib.Variable('T%s_5' % self.particle) 434 self.sub11 = aloha_lib.Variable('T%s_6' % self.particle) 435 self.sub12 = aloha_lib.Variable('T%s_7' % self.particle) 436 self.sub13 = aloha_lib.Variable('T%s_8' % self.particle) 437 438 self.sub20 = aloha_lib.Variable('T%s_9' % self.particle) 439 self.sub21 = aloha_lib.Variable('T%s_10' % self.particle) 440 self.sub22 = aloha_lib.Variable('T%s_11' % self.particle) 441 self.sub23 = aloha_lib.Variable('T%s_12' % self.particle) 442 443 self.sub30 = aloha_lib.Variable('T%s_13' % self.particle) 444 self.sub31 = aloha_lib.Variable('T%s_14' % self.particle) 445 self.sub32 = aloha_lib.Variable('T%s_15' % self.particle) 446 self.sub33 = aloha_lib.Variable('T%s_16' % self.particle) 447 448 rep = {(0,0): self.sub00, (0,1): self.sub01, (0,2): self.sub02, (0,3): self.sub03, 449 (1,0): self.sub10, (1,1): self.sub11, (1,2): self.sub12, (1,3): self.sub13, 450 (2,0): self.sub20, (2,1): self.sub21, (2,2): self.sub22, (2,3): self.sub23, 451 (3,0): self.sub30, (3,1): self.sub31, (3,2): self.sub32, (3,3): self.sub33} 452 453 454 self.representation= aloha_lib.LorentzObjectRepresentation( rep, \ 455 self.lorentz_ind, [])
456
457 -class Spin2(aloha_lib.FactoryLorentz):
458 459 object_class = L_Spin2 460 461 @classmethod
462 - def get_unique_name(self, lor1, lor2, part):
463 return 'Spin2^%s_%s_%s' % (part, lor1, lor2)
464
465 #=============================================================================== 466 # Gamma 467 #=============================================================================== 468 -class L_Gamma(aloha_lib.LorentzObject):
469 """ Gamma Matrices """ 470 471 #gamma0 = [[0, 0, 1, 0], [0, 0, 0, 1], [1, 0, 0, 0], [0, 1, 0, 0]] 472 #gamma1 = [[0, 0, 0, 1], [0, 0, 1, 0], [0, -1, 0, 0], [-1, 0, 0, 0]] 473 #gamma2 = [[0, 0, 0, -complex(0,1)],[0, 0, complex(0,1), 0], 474 # [0, complex(0,1), 0, 0], [-complex(0,1), 0, 0, 0]] 475 #gamma3 = [[0, 0, 1, 0], [0, 0, 0, -1], [-1, 0, 0, 0], [0, 1, 0, 0]] 476 # 477 #gamma = [gamma0, gamma1, gamma2, gamma3] 478 gamma = { #Gamma0 479 (0, 0, 0): 0, (0, 0, 1): 0, (0, 0, 2): 1, (0, 0, 3): 0, 480 (0, 1, 0): 0, (0, 1, 1): 0, (0, 1, 2): 0, (0, 1, 3): 1, 481 (0, 2, 0): 1, (0, 2, 1): 0, (0, 2, 2): 0, (0, 2, 3): 0, 482 (0, 3, 0): 0, (0, 3, 1): 1, (0, 3, 2): 0, (0, 3, 3): 0, 483 #Gamma1 484 (1, 0, 0): 0, (1, 0, 1): 0, (1, 0, 2): 0, (1, 0, 3): 1, 485 (1, 1, 0): 0, (1, 1, 1): 0, (1, 1, 2): 1, (1, 1, 3): 0, 486 (1, 2, 0): 0, (1, 2, 1): -1, (1, 2, 2): 0, (1, 2, 3): 0, 487 (1, 3, 0): -1, (1, 3, 1): 0, (1, 3, 2): 0, (1, 3, 3): 0, 488 #Gamma2 489 (2, 0, 0): 0, (2, 0, 1): 0, (2, 0, 2): 0, (2, 0, 3): -1j, 490 (2, 1, 0): 0, (2, 1, 1): 0, (2, 1, 2): 1j, (2, 1, 3): 0, 491 (2, 2, 0): 0, (2, 2, 1): 1j, (2, 2, 2): 0, (2, 2, 3): 0, 492 (2, 3, 0): -1j, (2, 3, 1): 0, (2, 3, 2): 0, (2, 3, 3): 0, 493 #Gamma3 494 (3, 0, 0): 0, (3, 0, 1): 0, (3, 0, 2): 1, (3, 0, 3): 0, 495 (3, 1, 0): 0, (3, 1, 1): 0, (3, 1, 2): 0, (3, 1, 3): -1, 496 (3, 2, 0): -1, (3, 2, 1): 0, (3, 2, 2): 0, (3, 2, 3): 0, 497 (3, 3, 0): 0, (3, 3, 1): 1, (3, 3, 2): 0, (3, 3, 3): 0 498 } 499
500 - def __init__(self, name, lorentz, spin1, spin2):
501 aloha_lib.LorentzObject.__init__(self,name,[lorentz], [spin1, spin2])
502
503 - def create_representation(self):
504 505 self.representation = aloha_lib.LorentzObjectRepresentation(self.gamma, 506 self.lorentz_ind,self.spin_ind)
507
508 -class Gamma(aloha_lib.FactoryLorentz):
509 510 object_class = L_Gamma 511 512 @classmethod
513 - def get_unique_name(self, lor, spin1, spin2):
514 return 'Gamma^%s_%s_%s' % (lor, spin1, spin2)
515
516 517 #=============================================================================== 518 # Sigma 519 #=============================================================================== 520 -class L_Sigma(aloha_lib.LorentzObject):
521 """ Sigma Matrices """ 522 523 524 525 #zero = [[0,0,0,0]]*4 526 #i = complex(0,1) 527 #sigma01 = [[ 0, -i, 0, 0], [-i, 0, 0, 0], [0, 0, 0, i], [0, 0, i, 0]] 528 #sigma02 = [[ 0, -1, 0, 0], [1, 0, 0, 0], [0, 0, 0, 1], [0, 0, -1, 0]] 529 #sigma03 = [[-i, 0, 0, 0], [0, i, 0, 0], [0, 0, i, 0], [0, 0, 0, -i]] 530 #sigma12 = [[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, 1, 0], [0, 0, 0, -1]] 531 #sigma13 = [[0, i, 0, 0], [-i, 0, 0, 0], [0, 0, 0, i], [0, 0, -i, 0]] 532 #sigma23 = [[0, 1, 0, 0], [1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]] 533 #def inv(matrice): 534 # out=[] 535 # for i in range(4): 536 # out2=[] 537 # out.append(out2) 538 # for j in range(4): 539 # out2.append(-1*matrice[i][j]) 540 # return out 541 # 542 #sigma =[[zero, sigma01, sigma02, sigma03], \ 543 # [inv(sigma01), zero, sigma12, sigma13],\ 544 # [inv(sigma02), inv(sigma12), zero, sigma23],\ 545 # [inv(sigma03), inv(sigma13), inv(sigma23), zero]] 546 547 sigma={(0, 2, 0, 1): -0.5, (3, 1, 2, 0): 0, (3, 2, 3, 1): 0, (1, 3, 1, 3): 0, 548 (2, 3, 3, 2): 0.5, (2, 1, 3, 1): 0, (0, 2, 2, 1): 0, (3, 1, 0, 0): 0, 549 (2, 3, 3, 1): 0, (3, 3, 1, 2): 0, (3, 1, 0, 3): 0, (1, 1, 0, 3): 0, 550 (0, 1, 2, 2): 0, (3, 2, 3, 2): -0.5, (2, 1, 0, 1): 0, (3, 3, 3, 3): 0, 551 (1, 1, 2, 2): 0, (2, 2, 3, 2): 0, (2, 1, 2, 1): 0, (0, 1, 0, 3): 0, 552 (2, 1, 2, 2): -0.5, (1, 2, 2, 1): 0, (2, 2, 1, 3): 0, (0, 3, 1, 3): 0, 553 (3, 0, 3, 2): 0, (1, 2, 0, 1): 0, (3, 0, 3, 1): 0, (0, 0, 2, 2): 0, 554 (1, 2, 0, 2): 0, (2, 0, 0, 3): 0, (0, 0, 2, 1): 0, (0, 3, 3, 2): 0, 555 (3, 0, 1, 1): -0.5j, (3, 2, 0, 1): -0.5, (1, 0, 1, 0): 0.5j, (0, 0, 0, 1): 0, 556 (0, 2, 1, 1): 0, (3, 1, 3, 2): 0.5j, (3, 2, 2, 1): 0, (1, 3, 2, 3): 0.5j, 557 (1, 0, 3, 0): 0, (3, 2, 2, 2): 0, (0, 2, 3, 1): 0, (1, 0, 3, 3): 0, 558 (2, 3, 2, 1): 0, (0, 2, 3, 2): -0.5, (3, 1, 1, 3): 0, (1, 1, 1, 3): 0, 559 (1, 3, 0, 2): 0, (2, 3, 0, 1): 0.5, (1, 1, 1, 0): 0, (2, 3, 0, 2): 0, 560 (3, 3, 0, 3): 0, (1, 1, 3, 0): 0, (0, 1, 3, 3): 0, (2, 2, 0, 1): 0, 561 (2, 1, 1, 0): 0, (3, 3, 2, 2): 0, (2, 3, 1, 0): 0.5, (2, 2, 2, 3): 0, 562 (0, 3, 0, 3): 0, (0, 1, 1, 2): 0, (0, 3, 0, 0): -0.5j, (2, 3, 1, 1): 0, 563 (1, 2, 3, 0): 0, (2, 0, 1, 3): 0, (0, 0, 3, 1): 0, (0, 3, 2, 0): 0, 564 (2, 3, 1, 2): 0, (2, 0, 1, 0): -0.5, (1, 2, 1, 0): 0, (3, 0, 0, 2): 0, 565 (1, 0, 0, 2): 0, (0, 0, 1, 1): 0, (1, 2, 1, 3): 0, (2, 3, 1, 3): 0, 566 (2, 0, 3, 0): 0, (0, 0, 1, 2): 0, (1, 3, 3, 3): 0, (3, 2, 1, 0): -0.5, 567 (1, 3, 3, 0): 0, (1, 0, 2, 3): -0.5j, (0, 2, 0, 0): 0, (3, 1, 2, 3): -0.5j, 568 (3, 2, 3, 0): 0, (1, 3, 1, 0): -0.5j, (3, 2, 3, 3): 0, (0, 2, 2, 0): 0, 569 (2, 3, 3, 0): 0, (3, 3, 1, 3): 0, (0, 2, 2, 3): 0.5, (3, 1, 0, 2): 0, 570 (1, 1, 0, 2): 0, (3, 3, 1, 0): 0, (0, 1, 2, 3): 0.5j, (1, 1, 0, 1): 0, 571 (2, 1, 0, 2): 0, (0, 1, 2, 0): 0, (3, 3, 3, 0): 0, (1, 1, 2, 1): 0, 572 (2, 2, 3, 3): 0, (0, 1, 0, 0): 0, (2, 2, 3, 0): 0, (2, 1, 2, 3): 0, 573 (1, 2, 2, 2): 0.5, (2, 2, 1, 0): 0, (0, 3, 1, 2): 0, (0, 3, 1, 1): 0.5j, 574 (3, 0, 3, 0): 0, (1, 2, 0, 3): 0, (2, 0, 0, 2): 0, (0, 0, 2, 0): 0, 575 (0, 3, 3, 1): 0, (3, 0, 1, 0): 0, (2, 0, 0, 1): 0.5, (3, 2, 0, 2): 0, 576 (3, 0, 1, 3): 0, (1, 0, 1, 3): 0, (0, 0, 0, 0): 0, (0, 2, 1, 2): 0, 577 (3, 1, 3, 3): 0, (0, 0, 0, 3): 0, (1, 3, 2, 2): 0, (3, 1, 3, 0): 0, 578 (3, 2, 2, 3): -0.5, (1, 3, 2, 1): 0, (1, 0, 3, 2): -0.5j, (2, 3, 2, 2): 0, 579 (0, 2, 3, 3): 0, (3, 1, 1, 0): 0.5j, (1, 3, 0, 1): 0.5j, (1, 1, 1, 1): 0, 580 (2, 1, 3, 2): 0, (2, 3, 0, 3): 0, (3, 3, 0, 2): 0, (1, 1, 3, 1): 0, 581 (3, 3, 0, 1): 0, (2, 1, 3, 3): 0.5, (0, 1, 3, 2): 0.5j, (1, 1, 3, 2): 0, 582 (2, 1, 1, 3): 0, (3, 0, 2, 1): 0, (0, 1, 3, 1): 0, (3, 3, 2, 1): 0, 583 (2, 2, 2, 2): 0, (0, 1, 1, 1): 0, (2, 2, 2, 1): 0, (0, 3, 0, 1): 0, 584 (3, 0, 2, 2): -0.5j, (1, 2, 3, 3): -0.5, (0, 0, 3, 2): 0, (0, 3, 2, 1): 0, 585 (2, 0, 1, 1): 0, (2, 2, 0, 0): 0, (0, 3, 2, 2): 0.5j, (3, 0, 0, 3): 0, 586 (1, 0, 0, 3): 0, (1, 2, 1, 2): 0, (2, 0, 3, 1): 0, (1, 0, 0, 0): 0, 587 (0, 0, 1, 3): 0, (2, 0, 3, 2): 0.5, (3, 2, 1, 3): 0, (1, 3, 3, 1): 0, 588 (1, 0, 2, 0): 0, (2, 2, 0, 2): 0, (0, 2, 0, 3): 0, (3, 1, 2, 2): 0, 589 (1, 3, 1, 1): 0, (3, 1, 2, 1): 0, (2, 2, 0, 3): 0, (3, 0, 0, 1): 0, 590 (1, 3, 1, 2): 0, (2, 3, 3, 3): 0, (0, 2, 2, 2): 0, (3, 1, 0, 1): -0.5j, 591 (3, 3, 1, 1): 0, (1, 1, 0, 0): 0, (2, 1, 0, 3): 0, (0, 1, 2, 1): 0, 592 (3, 3, 3, 1): 0, (2, 1, 0, 0): -0.5, (1, 1, 2, 0): 0, (3, 3, 3, 2): 0, 593 (0, 1, 0, 1): -0.5j, (1, 1, 2, 3): 0, (2, 2, 3, 1): 0, (2, 1, 2, 0): 0, 594 (0, 1, 0, 2): 0, (1, 2, 2, 3): 0, (2, 0, 2, 1): 0, (2, 2, 1, 1): 0, 595 (1, 2, 2, 0): 0, (2, 2, 1, 2): 0, (0, 3, 1, 0): 0, (3, 0, 3, 3): 0.5j, 596 (2, 1, 3, 0): 0, (1, 2, 0, 0): 0.5, (0, 0, 2, 3): 0, (0, 3, 3, 0): 0, 597 (2, 0, 0, 0): 0, (3, 2, 0, 3): 0, (0, 3, 3, 3): -0.5j, (3, 0, 1, 2): 0, 598 (1, 0, 1, 2): 0, (3, 2, 0, 0): 0, (0, 2, 1, 3): 0, (1, 0, 1, 1): 0, 599 (0, 0, 0, 2): 0, (0, 2, 1, 0): 0.5, (3, 1, 3, 1): 0, (3, 2, 2, 0): 0, 600 (1, 3, 2, 0): 0, (1, 0, 3, 1): 0, (2, 3, 2, 3): 0.5, (0, 2, 3, 0): 0, 601 (3, 1, 1, 1): 0, (2, 3, 2, 0): 0, (1, 3, 0, 0): 0, (3, 1, 1, 2): 0, 602 (1, 1, 1, 2): 0, (1, 3, 0, 3): 0, (2, 3, 0, 0): 0, (2, 0, 2, 0): 0, 603 (3, 3, 0, 0): 0, (1, 1, 3, 3): 0, (2, 1, 1, 2): 0, (0, 1, 3, 0): 0, 604 (3, 3, 2, 0): 0, (2, 1, 1, 1): 0.5, (2, 0, 2, 2): 0, (3, 3, 2, 3): 0, 605 (0, 1, 1, 0): -0.5j, (2, 2, 2, 0): 0, (0, 3, 0, 2): 0, (3, 0, 2, 3): 0, 606 (0, 1, 1, 3): 0, (2, 0, 2, 3): -0.5, (1, 2, 3, 2): 0, (3, 0, 2, 0): 0, 607 (0, 0, 3, 3): 0, (1, 2, 3, 1): 0, (2, 0, 1, 2): 0, (0, 0, 3, 0): 0, 608 (0, 3, 2, 3): 0, (3, 0, 0, 0): 0.5j, (1, 2, 1, 1): -0.5, (1, 0, 0, 1): 0.5j, 609 (0, 0, 1, 0): 0, (2, 0, 3, 3): 0, (3, 2, 1, 2): 0, (1, 3, 3, 2): -0.5j, 610 (1, 0, 2, 1): 0, (3, 2, 1, 1): 0, (0, 2, 0, 2): 0, (1, 0, 2, 2): 0} 611
612 - def __init__(self, name, lorentz1, lorentz2, spin1, spin2):
613 aloha_lib.LorentzObject.__init__(self, name, [lorentz1, lorentz2], \ 614 [spin1, spin2])
615
616 - def create_representation(self):
617 618 self.representation = aloha_lib.LorentzObjectRepresentation(self.sigma, 619 self.lorentz_ind,self.spin_ind)
620
621 -class Sigma(aloha_lib.FactoryLorentz):
622 623 object_class = L_Sigma 624 625 @classmethod
626 - def get_unique_name(self, lorentz1, lorentz2, spin1, spin2):
627 return 'Sigma_[%s,%s]^[%s,%s]' % (spin1, spin2, lorentz1, lorentz2)
628
629 630 #=============================================================================== 631 # Gamma5 632 #=============================================================================== 633 -class L_Gamma5(aloha_lib.LorentzObject):
634 635 #gamma5 = [[-1, 0, 0, 0, 0], [0, -1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]] 636 gamma5 = {(0,0): -1, (0,1): 0, (0,2): 0, (0,3): 0,\ 637 (1,0): 0, (1,1): -1, (1,2): 0, (1,3): 0,\ 638 (2,0): 0, (2,1): 0, (2,2): 1, (2,3): 0,\ 639 (3,0): 0, (3,1): 0, (3,2): 0, (3,3): 1} 640
641 - def __init__(self, name, spin1, spin2):
642 aloha_lib.LorentzObject.__init__(self, name, [], [spin1, spin2])
643
644 - def create_representation(self):
645 646 self.representation = aloha_lib.LorentzObjectRepresentation(self.gamma5, 647 self.lorentz_ind,self.spin_ind)
648
649 -class Gamma5(aloha_lib.FactoryLorentz):
650 651 object_class = L_Gamma5 652 653 @classmethod
654 - def get_unique_name(self, spin1, spin2):
655 return 'Gamma5_%s_%s' % (spin1, spin2)
656
657 #=============================================================================== 658 # Conjugate Matrices 659 #=============================================================================== 660 -class L_C(aloha_lib.LorentzObject):
661 662 #[0, -1, 0, 0] [1,0,0,0] [0,0,0,1],[0,0,-1,0] 663 664 Cmetrix = {(0,0): 0, (0,1): -1, (0,2): 0, (0,3): 0,\ 665 (1,0): 1, (1,1): 0, (1,2): 0, (1,3): 0,\ 666 (2,0): 0, (2,1): 0, (2,2): 0, (2,3): 1,\ 667 (3,0): 0, (3,1): 0, (3,2): -1, (3,3): 0} 668
669 - def __init__(self, name, spin_list):
670 671 # spin_list is automatically ordered. The sign for the symmetrization 672 # is set in the Factory routine 673 aloha_lib.LorentzObject.__init__(self, name, [], spin_list)
674 675
676 - def create_representation(self):
677 self.representation = aloha_lib.LorentzObjectRepresentation(self.Cmetrix, 678 self.lorentz_ind,self.spin_ind)
679
680 -class C(aloha_lib.FactoryLorentz):
681 682 object_class = L_C 683
684 - def __new__(cls, spin1, spin2):
685 686 spin_list = [spin1, spin2] 687 spin_list.sort() 688 sign = give_sign_perm(spin_list, [spin1, spin2]) 689 name = cls.get_unique_name(spin_list) 690 if sign == 1: 691 return aloha_lib.FactoryVar.__new__(cls, name, cls.object_class, spin_list) 692 else: 693 out = aloha_lib.FactoryVar.__new__(cls, name, cls.object_class, spin_list) 694 out.prefactor = -1 695 return out
696 697 @classmethod
698 - def get_unique_name(cls, spin_list):
699 return "C_%s_%s" % tuple(spin_list)
700
701 #=============================================================================== 702 # EPSILON 703 #=============================================================================== 704 #Helpfull function 705 -def give_sign_perm(perm0, perm1):
706 """Check if 2 permutations are of equal parity. 707 708 Assume that both permutation lists are of equal length 709 and have the same elements. No need to check for these 710 conditions. 711 """ 712 assert len(perm0) == len(perm1) 713 714 perm1 = list(perm1) ## copy this into a list so we don't mutate the original 715 perm1_map = dict((v, i) for i,v in enumerate(perm1)) 716 717 transCount = 0 718 for loc, p0 in enumerate(perm0): 719 p1 = perm1[loc] 720 if p0 != p1: 721 sloc = perm1_map[p0] # Find position in perm1 722 perm1[loc], perm1[sloc] = p0, p1 # Swap in perm1 723 perm1_map[p0], perm1_map[p1] = loc, sloc # Swap the map 724 transCount += 1 725 726 # Even number of transposition means equal parity 727 return -2 * (transCount % 2) + 1
728
729 # Practical definition of Epsilon 730 -class L_Epsilon(aloha_lib.LorentzObject):
731 """ The fully anti-symmetric object in Lorentz-Space """ 732
733 - def give_parity(self, perm):
734 """return the parity of the permutation""" 735 assert set(perm) == set([0,1,2,3]) 736 737 i1 , i2, i3, i4 = perm 738 #formula found on wikipedia 739 return -self.sign * ((i2-i1) * (i3-i1) *(i4-i1) * (i3-i2) * (i4-i2) *(i4-i3))/12
740 741 # DEFINE THE REPRESENTATION OF EPSILON 742
743 - def __init__(self, name, lorentz1, lorentz2, lorentz3, lorentz4):
744 745 lorentz_list = [lorentz1 , lorentz2, lorentz3, lorentz4] 746 #order_lor = list(lorentz_list) 747 #order_lor.sort() 748 749 #self.sign = give_sign_perm(order_lor, lorentz_list) 750 self.sign=1 751 aloha_lib.LorentzObject.__init__(self, name, lorentz_list, [])
752 753
754 - def create_representation(self):
755 756 if not hasattr(self, 'epsilon'): 757 # init all element to zero 758 epsilon = dict( ((l1, l2, l3, l4), 0) 759 for l1 in range(4) \ 760 for l2 in range(4) \ 761 for l3 in range(4) \ 762 for l4 in range(4)) 763 # update non trivial one 764 epsilon.update(dict( 765 ((l1, l2, l3, l4), self.give_parity((l1,l2,l3,l4))) 766 for l1 in range(4) \ 767 for l2 in range(4) if l2 != l1\ 768 for l3 in range(4) if l3 not in [l1,l2]\ 769 for l4 in range(4) if l4 not in [l1,l2,l3])) 770 771 L_Epsilon.epsilon = epsilon 772 773 self.representation = aloha_lib.LorentzObjectRepresentation(self.epsilon, 774 self.lorentz_ind,self.spin_ind)
775
776 777 -class Epsilon(aloha_lib.FactoryLorentz):
778 779 object_class = L_Epsilon 780 781 @classmethod
782 - def get_unique_name(cls,l1,l2,l3,l4):
783 return '_EPSILON_%s_%s_%s_%s' % (l1,l2,l3,l4)
784
785 786 #=============================================================================== 787 # Metric 788 #=============================================================================== 789 -class L_Metric(aloha_lib.LorentzObject):
790 791 metric = {(0,0): 1, (0,1): 0, (0,2): 0, (0,3): 0,\ 792 (1,0): 0, (1,1): -1, (1,2): 0, (1,3): 0,\ 793 (2,0): 0, (2,1): 0, (2,2): -1, (2,3): 0,\ 794 (3,0): 0, (3,1): 0, (3,2): 0, (3,3): -1} 795 796 797 #[[1, 0, 0,0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, -1]] 798
799 - def __init__(self, name, lorentz1, lorentz2):
800 aloha_lib.LorentzObject.__init__(self,name,[lorentz1, lorentz2], [])
801
802 - def create_representation(self):
803 804 self.representation = aloha_lib.LorentzObjectRepresentation(self.metric, 805 self.lorentz_ind,self.spin_ind)
806
807 -class Metric(aloha_lib.FactoryLorentz):
808 809 object_class = L_Metric 810 811 @classmethod
812 - def get_unique_name(cls,l1,l2):
813 if l1<l2: 814 return '_ETA_%s_%s' % (l1,l2) 815 else: 816 return '_ETA_%s_%s' % (l2,l1)
817 #===============================================================================
818 # Identity 819 #=============================================================================== 820 -class L_Identity(aloha_lib.LorentzObject):
821 822 #identity = [[1, 0, 0,0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]] 823 identity = {(0,0): 1, (0,1): 0, (0,2): 0, (0,3): 0,\ 824 (1,0): 0, (1,1): 1, (1,2): 0, (1,3): 0,\ 825 (2,0): 0, (2,1): 0, (2,2): 1, (2,3): 0,\ 826 (3,0): 0, (3,1): 0, (3,2): 0, (3,3): 1} 827 828
829 - def __init__(self, name, spin1, spin2):
830 aloha_lib.LorentzObject.__init__(self, name, [],[spin1, spin2])
831
832 - def create_representation(self):
833 834 self.representation = aloha_lib.LorentzObjectRepresentation(self.identity, 835 self.lorentz_ind,self.spin_ind)
836
837 -class Identity(aloha_lib.FactoryLorentz):
838 839 object_class = L_Identity 840 841 @classmethod
842 - def get_unique_name(self, spin1, spin2):
843 return 'Id_%s_%s' % (spin1, spin2)
844
845 #=============================================================================== 846 # IdentityL 847 #=============================================================================== 848 -class L_IdentityL(aloha_lib.LorentzObject):
849 850 #identity = [[1, 0, 0,0], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]] 851 identity = {(0,0): 1, (0,1): 0, (0,2): 0, (0,3): 0,\ 852 (1,0): 0, (1,1): 1, (1,2): 0, (1,3): 0,\ 853 (2,0): 0, (2,1): 0, (2,2): 1, (2,3): 0,\ 854 (3,0): 0, (3,1): 0, (3,2): 0, (3,3): 1} 855 856
857 - def __init__(self, name, l1, l2):
858 aloha_lib.LorentzObject.__init__(self, name, [l1,l2], [])
859
860 - def create_representation(self):
861 862 self.representation = aloha_lib.LorentzObjectRepresentation(self.identity, 863 self.lorentz_ind,self.spin_ind)
864
865 -class IdentityL(aloha_lib.FactoryLorentz):
866 867 object_class = L_IdentityL 868 869 @classmethod
870 - def get_unique_name(self, l1, l2):
871 return 'IdL_%s_%s' % (l1, l2)
872
873 #=============================================================================== 874 # ProjM 875 #=============================================================================== 876 -class L_ProjM(aloha_lib.LorentzObject):
877 """ A object for (1-gamma5)/2 """ 878 879 #projm = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]] 880 projm= {(0,0): 1, (0,1): 0, (0,2): 0, (0,3): 0,\ 881 (1,0): 0, (1,1): 1, (1,2): 0, (1,3): 0,\ 882 (2,0): 0, (2,1): 0, (2,2): 0, (2,3): 0,\ 883 (3,0): 0, (3,1): 0, (3,2): 0, (3,3): 0} 884
885 - def __init__(self,name, spin1, spin2):
886 """Initialize the object""" 887 aloha_lib.LorentzObject.__init__(self, name, [], [spin1, spin2])
888
889 - def create_representation(self):
890 891 self.representation = aloha_lib.LorentzObjectRepresentation(self.projm, 892 self.lorentz_ind,self.spin_ind)
893
894 -class ProjM(aloha_lib.FactoryLorentz):
895 896 object_class = L_ProjM 897 898 @classmethod
899 - def get_unique_name(self, spin1, spin2):
900 return 'PROJM_%s_%s' % (spin1, spin2)
901 #===============================================================================
902 # ProjP 903 #=============================================================================== 904 -class L_ProjP(aloha_lib.LorentzObject):
905 """A object for (1+gamma5)/2 """ 906 907 #projp = [[0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]] 908 projp = {(0,0): 0, (0,1): 0, (0,2): 0, (0,3): 0,\ 909 (1,0): 0, (1,1): 0, (1,2): 0, (1,3): 0,\ 910 (2,0): 0, (2,1): 0, (2,2): 1, (2,3): 0,\ 911 (3,0): 0, (3,1): 0, (3,2): 0, (3,3): 1} 912
913 - def __init__(self,name, spin1, spin2):
914 """Initialize the object""" 915 aloha_lib.LorentzObject.__init__(self, name, [], [spin1, spin2])
916 917
918 - def create_representation(self):
919 920 self.representation = aloha_lib.LorentzObjectRepresentation(self.projp, 921 self.lorentz_ind, self.spin_ind)
922
923 -class ProjP(aloha_lib.FactoryLorentz):
924 925 object_class = L_ProjP 926 927 @classmethod
928 - def get_unique_name(self, spin1, spin2):
929 930 return 'PROJP_%s_%s' % (spin1, spin2)
931
932 933 #=============================================================================== 934 # Denominator Propagator 935 #=============================================================================== 936 -class DenominatorPropagator(aloha_lib.LorentzObject):
937 """The Denominator of the Propagator""" 938
939 - def __new__(cls, particle):
940 941 name = 'DenomP%s' % particle 942 return aloha_lib.Variable.__new__(cls, name)
943
944 - def __init__(self, particle):
945 if self: 946 return 947 self.particle = particle 948 aloha_lib.LorentzObject.__init__(self, [], [])
949
950 - def get_unique_name(self,*args):
951 return 'DenomP%s' % self.particle
952 953
954 - def simplify(self):
955 """Return the Denominator in a abstract way""" 956 957 mass = Mass(self.particle) 958 width = Width(self.particle) 959 denominator = P('i1', self.particle) * P('i1', self.particle) - \ 960 mass * mass + complex(0,1) * mass* width 961 962 return denominator
963
964 - def create_representation(self):
965 """Create the representation for the Vector propagator""" 966 967 object = self.simplify() 968 self.representation = object.expand()
969 970 971 #=============================================================================== 972 # Numerator Propagator 973 #=============================================================================== 974 975 976 SpinorPropagatorout = lambda spin1, spin2, particle: -1 * (Gamma('mu', spin1, spin2) * \ 977 P('mu', particle) - Mass(particle) * Identity(spin1, spin2)) 978 979 SpinorPropagatorin = lambda spin1, spin2, particle: (Gamma('mu', spin1, spin2) * \ 980 P('mu', particle) + Mass(particle) * Identity(spin1, spin2)) 981 982 VectorPropagator = lambda l1, l2, part: complex(0,1)*(-1 * Metric(l1, l2) + OverMass2(part) * \ 983 Metric(l1,'I3')* P('I3', part) * P(l2, part)) 984 985 VectorPropagatorMassless= lambda l1, l2, part: complex(0,-1) * Metric(l1, l2) 986 987 988 Spin3halfPropagatorin = lambda mu, nu, s1, s2, part: (\ 989 -1/3 * (Gamma(mu,s1,-2) + Identity(s1, -2) * P(mu, part) * Mass(part) * OverMass2(part))* \ 990 (PSlash(-2,-3, part) - Identity(-2,-3) * Mass(part)) * \ 991 ( Gamma(nu, -3, s2)+ Mass(part) * OverMass2(part) * Identity(-3, s2) * P(nu, part) ) - \ 992 (PSlash(s1,s2, part) + Mass(part) * Identity(s1,s2)) * (Metric(mu, nu) - OverMass2(part) * P(mu, part) * P(nu,part))) 993 994 995 Spin3halfPropagatorout = lambda mu, nu, s1, s2, part: ( \ 996 -1/3 * (Gamma(mu,s1,-2) - Identity(s1, -2) * P(mu, part) * Mass(part) * OverMass2(part))* \ 997 (-1*PSlash(-2,-3, part) - Identity(-2,-3) * Mass(part)) * \ 998 ( Gamma(nu, -3, s2)- Mass(part) * OverMass2(part) * Identity(-3, s2) * P(nu, part) ) - \ 999 (-1*PSlash(s1,s2, part) 1000 + Mass(part) * Identity(s1,s2)) * (Metric(mu, nu) - OverMass2(part) * P(mu, part) * P(nu,part))) 1001 1002 1003 Spin3halfPropagatorMasslessOut = lambda mu, nu, s1, s2, part: Gamma(nu, s1,-1) * PSlash(-1,-2, part) * Gamma(mu,-2, s2) 1004 Spin3halfPropagatorMasslessIn = lambda mu, nu, s1, s2, part: -1 * Gamma(mu, s1,-1) * PSlash(-1,-2, part) * Gamma(nu,-2, s2) 1005 1006 1007 Spin2masslessPropagator = lambda mu, nu, alpha, beta: 1/2 *( Metric(mu, alpha)* Metric(nu, beta) +\ 1008 Metric(mu, beta) * Metric(nu, alpha) - Metric(mu, nu) * Metric(alpha, beta)) 1009 1010 1011 1012 Spin2Propagator = lambda mu, nu, alpha, beta, part: Spin2masslessPropagator(mu, nu, alpha, beta) + \ 1013 - 1/2 * OverMass2(part) * (Metric(mu,alpha)* P(nu, part) * P(beta, part) + \ 1014 Metric(nu, beta) * P(mu, part) * P(alpha, part) + \ 1015 Metric(mu, beta) * P(nu, part) * P(alpha, part) + \ 1016 Metric(nu, alpha) * P(mu, part) * P(beta , part) )+ \ 1017 1/6 * (Metric(mu,nu) + 2 * OverMass2(part) * P(mu, part) * P(nu, part)) * \ 1018 (Metric(alpha,beta) + 2 * OverMass2(part) * P(alpha, part) * P(beta, part)) 1019