Program  Ampcalculator

The program generates the amplitude for any strong or nonleptonic weak process of pseudoscalar mesons, 
external photons and W bosons to next-to-leading order in the low-energy expansion (chiral SU(3)) with at most 
six external particles (a photon counts as two particles), at most one W (semileptonic decays) and with at most three propagators in the loop. The W is assumed to couple to a lepton pair indicated in the output by the leptonic matrix elements l\(TraditionalForm\`\_μ\) and \(TraditionalForm\`l\&^\)\(TraditionalForm\`\_μ\),  defined by
 
                 l\(TraditionalForm\`\_μ\)= \(TraditionalForm\`u\&_\)((Subscript[p, ν]))(Subscript[γ, μ]) (1-(Subscript[γ, 5]))\(TraditionalForm\`\(\(\ \)\(v(p\_\(l\^+\))\)\)\) ,   \(TraditionalForm\`l\&^\)\(TraditionalForm\`\_μ\)= \(TraditionalForm\`u\&_\)\(TraditionalForm\`\((p\_\(/\^-\))\)\)(Subscript[γ, μ]) (1-(Subscript[γ, 5])) v((Subscript[p, ν])),

where \(TraditionalForm\`p\_ν\ , \ \(\(p\_l\)\(\ \ \)\(are\)\(\ \)\(the\)\(\ \)\(momenta\)\(\ \)\(of\)\(\ \)\(the\)\(\ \)\(neutrino\)\(\ \)\(and\)\(\ \)\(of\)\(\ \)\(the\)\(\ \)\(charged\)\(\ \)\)\)lepton. For radiative semileptonic decays, 
Bremsstrahlung off the charged lepton is not included and must be added by hand.  In the anomaly functional, 
only terms containing external gauge fields are included. 

\(Select\ up\ to\ six\ particles\ \((a\ photon\ counts\ as\ two\ particles)\) 
        of\ the\ list\ \(\({\(π\_+\), \(π\_-\), π\_0, \(K\_+\), \(K\_-\), K\_0, 
            K\&_\_0, η\_8, γ, \(W\_+\), \(W\_-\)}\)\(.\)\(\ \)\)\)
Assign a momentum to each particle. In the list ExternalParticles all particles are supposed to be incoming. Define the scalar products sp[(Subscript[p, i]), (Subscript[p, j])]  \(\(\(that\)\(\ \)\(you\)\(\ \)\(want\)\(\ \ \)\(to\)\(\ \)\(replace\)\(\ \)\(by\)\(\ \)\(polynomials\)\(\ \)\(of\)\(\ \)\(kinematic\)\(\ \)\(variables\)\(\ \)\(in\)\(\ \)\(the\)\(\ \)\)\)lists replist1 and replist2.  One should not use the capital letters F,G,L,N and R in the lists  replist1,  replist2 and ExternalParticles as they are reserved for coupling constants. Small l is reserved for the leptonic matrix element.
For semileptonic decays the index μ should only be used for momenta that are contracted with the leptonic matrix elements l\(TraditionalForm\`\_μ\) or  \(TraditionalForm\`l\&^\)\(TraditionalForm\`\_μ\). Isospin conservation is assumed. 

The program terminates if either
	    i) some of the external particles are not contained in the list above,
              ii) charge is not conserved, 
             iii) there are more than one external W,
             iv) strangeness change |ΔS|>1.                                                           
             
Notation:  
\(A\&_[M\^2]\ is\ the\ renormalized\ single\)-propagator loop integral  \(A\&_[M\^2]\)= - ((M^2)/(((4 π))^2))log((M^2)/(μ^2)), 
where M is a meson mass and μ is the renormalization scale.
\(B\&_[s, M\_1\%2, M\_2\%2]\) is the standard two-propagator loop function subtracted at s=0, i.e. \(B\&_[0, M\_1\%2, M\_2\%2]\)=0.
All loop functions and recursion relations can be found in App. B of hep-ph/0507173.
(Subscript[G, 8]), (Subscript[G, 27]) are the nonleptonic weak LECs of order (p^2). (Subscript[L, i]^r) ,(Subscript[N, i]^r), (Subscript[R, i]^r)  are the strong, weak octet and 27-plet LECs of O((p^4)), respectively, all renormalized at scale μ. The corresponding Lagrangians are reproduced in App. C of
hep-ph/0507173. \(\(\(\ \)\(G\&^\_8\)\)\), \(G\&^\_27\), \(\(N\&^\)\_i\%r\), \(\(R\&^\)\_i\%r\)  are complex conjugate LECs.

Options:

	Set  the following variables equal to 1 to get partial results 
	(otherwise the variables should be set to 0):
	
		onlytreep2=1	 		amplitude of O((p^2))
		onlytreep2and4=1		tree level amplitude up to O((p^4))
		onlyloops=1			one-loop amplitude only
		
           By default (nogmo=0), the Gell-Mann-Okubo relation is applied in the amplitudes of O((p^4)) to express (Subscript[M, η]^2) 
           in terms of  (Subscript[M, K]^2),  (Subscript[M, π]^2). For better readability, (Subscript[M, η]^2) is never replaced as argument in loop functions. Setting 
           nogmo=1, (Subscript[M, η]^2) is kept everywhere. 
           If the recursion relations for the loop integrals should not be performed set norecurs=1.

onlytreep2 = 0;
onlytreep2and4 = 0;
onlyloops = 0;
nogmo = 0;
norecurs = 0;

\(\(\(ExternalParticles = {π\_0[p\_1], π\_0[p\_2], \(π\_+\)[
            p\_3], \(π\_-\)[p\_4]};\)\(\ \)\)\)

replist1 = {sp[(Subscript[p, 1]), (Subscript[p, 2])], sp[(Subscript[p, 1]), (Subscript[p, 3])], sp[(Subscript[p, 1]), (Subscript[p, 4])], 
          sp[(Subscript[p, 2]), (Subscript[p, 3])], sp[(Subscript[p, 2]), (Subscript[p, 4])], 
          sp[(Subscript[p, 3]), (Subscript[p, 4])]};

replist2 = {(1/2) (s - 
                2  (Subscript[M, π]^2)), -(1/2) (2  (Subscript[M, π]^2) - 
                t), -(1/2) (2  (Subscript[M, π]^2) - 
                u), -(1/2) (2  (Subscript[M, π]^2) - 
                u), -(1/2) (2  (Subscript[M, π]^2) - t), (1/2) (s - 
                2  (Subscript[M, π]^2))};

notesub = 
        NotebookOpen["C:\ampcalculatorsub.nb"];

SelectionMove[notesub, All, Notebook]

SelectionEvaluate[notesub]