<<

Numerical Object Oriented Quantum Theory Calculations M. Williams Carnegie Mellon University, Pittsburgh PA, 15213

Abstract

The qft++ package is a library of C++ classes that facilitate numerical (not algebraic) quantum field theory calcu- lations. Mathematical objects such as matrices, , Dirac , polarization and orbital tensors, etc. are represented as C++ objects in qft++. The package permits construction of code which closely re- sembles quantum field theory expressions, allowing for quick and reliable calculations.

1. Introduction calculations of expressions involving matrices and high-rank tensors using as little cpu time as possible. It is often desirable to describe particle The qft++ package satisfies both of these criteria. processes using a covariant formalism. This The operations of multiplication and ten- formalism contains Dirac spinors and matrices, po- sor contraction (the building blocks of all such calcu- larization and orbital angular momentum tensors, lations) can be broken down into nested loops; thus, etc. For cases involving higher spin particles or large they are easy to perform (numerically) on a com- values of orbital angular momentum, the presence puter. The qft++ package was developed to take ad- of high rank tensors can make explicit calculation of vantage of this fact by performing numerical calcu- the desired quantities (typically scattering or decay lations (not algebraic manipulations), making these amplitudes) cumbersome at best and impossible at types of calculations easier and more accessible to a worst. larger portion of the physics community. The qft++ A common approach is to perform algebraic package has been used in a number of PWA’s to date manipulations to reduce the number of tensor (see, e.g., [5]) and has performed exceptionally well. contractions prior to coding the expressions of in- One further point before discussing specific details about the software, this package was designed to arXiv:0805.2956v2 [hep-ph] 7 May 2009 terest. There are several software packages avail- able to facilitate this approach, e.g. FeynCalc [1] calculate tree-level expressions. No work has been and FeynArts [2]. Packages like GRACE [3] and done to provide a simple way of performing loop CompHEP [4] take this a step further by (mostly au- integrals. tomatically) producing distributions from physical models. While these packages are extremely use- 2. Overview ful in certain areas of physics (e.g. writing event generators), they are not ideal for performing an The the main design goal for the application pro- event-based partial wave analysis (PWA). gramming interface (API) was to make the code re- In this type of analysis, numeric values for ampli- semble the mathematical expressions as closely as tudes must be calculated for upwards of 100 million possible. To facilitate this goal, each type of mathe- events (data and/or Monte Carlo). Thus, the am- matical object (e.g. tensors, spinors, etc.) has a cor- plitude calculation software must not only be easy responding C++ object in qft++. Through the use to use, but also be capable of performing numerical of operator overloading, operations such as matrix

Preprint submitted to Elsevier 29 May 2018 multiplication and tensor contraction are handled 3.1. Matrix Operations by the objects themselves; not by the user, i.e. the user never has to keep track of any indices. Matrix operations are handled by the template As a very simple example, consider the electro- class Matrix, which can store any data type which µ magnetic vertex eu¯(p1, m1)γ u(p2, m2)µ(pγ , mγ ). can be stored in a C++ STL container class, i.e. After variable declaration and initialization (dis- it can store any object which can be stored by cussed below), this expression can be written using std::vector. A complete set of methods are pro- qft++ as follows: vided including those useful in Quantum Field the- ory calculations, such as and Adjoint, along with all the necessary operators. e*Bar(u1(m1))*gamma*u2(m2)*eps(mg);

3.2. Tensor Operations The object types determine how “multiplication”, i.e. the * operator, is to be performed. The matrix Tensor operations are handled by the template multiplications and tensor contractions are handled class , which can also store any data type internally by the objects. This feature allows for Tensor which can be stored in a C++ STL container class; self-documenting code, greatly reducing the proba- however, the most useful types are typically bility for mistakes. double and complex. Methods are provided to perform Lorentz transformations, symmetrization and a number of other functions. 3. Basic Operations A number of operators are provided to perform tensor contractions. The Tensor class assumes that The two main types of operations required in all indices are either raised or lowered. The field quantum field theory calculations, but not con- theory objects discussed in Section 4 use the for- tained in standard C++, involve matrices and mer, i.e. they are contravariant. The * operator per- tensors. From these constituents, it is easy to build forms standard multiplication if either object is not classes which handle Dirac matrices, covariant pro- a Tensor and contraction of a single index other- jection operators, etc. This section describes how wise. For example, if x is a rank-2 Tensor, then the the qft++ package implements these basic types of code snippet 3*x simply multiplies each of the ele- ments of x by three; however, the snippet x*y will operations. µν ρ This package makes heavy use of template classes; evaluate the expression x yν if y is also a rank- thus, a number of template utilities have been devel- 2 Tensor. Full contraction of all possible indices is performed using the | operator; thus, x|y evaluates oped for performance and/or API reasons. Among µν these are compile-time detection of inheritance and the expression x yµν . parameter passing optimization [6], along with se- lective inclusion of class methods [7]. Symbolic Expression qft++ Code Unlike many standard C++ template classes, all µ of the template classes defined in the qft++ pack- x yµ x*y age are designed such that instantiations of differ- xµyν x%y ent types are fully compatible, provided the types µ1µ2...µn x yµ1µ2...µn (x|y) themselves have the necessary operators defined, e.g. the following code is legal: Table 1 Example tensor operations using the Tensor template class.

SomeClass sc1; Additional classes are provided for the Minkowski SomeClass sc2; , gµν (MetricTensor), and the Levi-Civita sc1*sc2; tensor, µναβ (LeviCivitaTensor). The Vector4 template class, which is derived from Tensor, pro- vides a number of additional methods specific to 4- if the operator * is defined between types T1 and T2. vectors, e.g. CosTheta and Beta.

2 4. Object-Oriented Field Theory spin is set using the constructor, e.g PolVector eps(3) would be used for a spin-3 particle. The From the Tensor and Matrix classes discussed PolVector object must then be initialized for a above, all of the necessary objects for quantum field given 4-momentum. At this point, the user can de- theory calculations can be constructed. In this sec- cide whether or not the particle is to be on-shell. For tion, a brief overview of the formalism will be pre- example, if a spin-1 particle is initialized on-shell sented followed by a discussion of the corresponding then the projection operator is given by qft++ class. More detailed descriptions of the for- p p P (1)(p) = −g + µ ν , (5) malism are given in [8,9]. Recent examples of apply- µν µν p2 ing this formalism to PWA - for which this code was developed - can be found in [5,10,11]. otherwise, it is calculated using (4). This option is also available in qft++ for half-integral spin parti- 4.1. Integral Spin Wave Functions cles. After initialization, the sub-states can be ac- cessed via calls like eps(m), which returns the The wave function of a particle with integral spin- Tensor > object for sub-state J, 4-momentum p and spin projection to some quan- m. The spin-J projection operator can be ac- tization axis m, is described by a rank-J tensor, cessed easily in the code using the method  (p, m). The Rarita-Schwinger conditions for µ1...µJ eps.Projector(), which returns an object of type integral spin-J are Tensor > with a rank of 2J .

µi p µ1µ2...µi...µJ (p, m) = 0 (1a) 4.2. Half-Integral Spin Wave Functions µ1...µi...µj ...µJ (p, m) = µ1...µj ...µi...µJ (p, m) (1b)

µiµj g µ1µ2...µi...µj ...µJ (p, m) = 0, (1c) The wave function for a spin-1/2 particle is de- scribed by a 4-component Dirac , denoted for any µi, µj, and reduce the number of independent as u(p, m), where p and m again represent the 4- J elements from 4 to (2J + 1). momentum and spin projection of the particle. The The spin-J projection operator, defined as representation chosen here leads to the following form of the spinors: P (J) (p) µ1µ2...µJ ν1ν2...νJ X ∗   = µ µ ...µ (p, m) (p, m), (2) √ χ(m) 1 2 J ν1ν2...νJ u(p, m) = E + w , (6) m  ~σ·~p  E+w χ(m) is used to construct the particle’s propagator. As a simple example, consider a massive spin-1 where E(w) is the energy(mass) of the particle and particle. The Rarita-Schwinger conditions for spin-1 χ(m) are the standard non-relativistic 2-component µ simply require p µ(p, m) = 0. Thus, in the parti- spinors. cle’s rest frame the energy component of the wave Wave functions for particles with higher half-

function is zero. The spatial components are then integral spin, denoted as uµ1...µJ−1/2 (p, m), are con- chosen to be structed using tensor products of integral spin wave 1 functions and the spin-1/2 spinors described above. ~(±1) = ∓√ (1, ±i, 0), ~(0) = (0, 0, 1). (3) The Rarita-Schwinger conditions for half-integral 2 spin-J are [8] The wave function can be obtained in any other µ frame through the use of Lorentz transformations. (γ pµ − w)uµ1...... µJ−1/2 (p, m) = 0 (7a) The spin-1 projection operator is given by

(1) X ∗ pµpν u (p, m) P (p) =  (p, m) (p, m) = −g + , (4) µ1...µi...µj ...µJ−1/2 µν µ ν µν w2 m = uµ1...µj ...µi...µJ−1/2 (p, m) (7b) where w is the mass of the particle. µi p uµ ...µ ...µ (p, m) = 0 (7c) Wave functions for particles with integral spin 1 i J−1/2 µi are handled in qft++ by the PolVector class. The γ uµ1...µi...µJ−1/2 (p, m) = 0 (7d)

3 qft++ Class Symbol Concept

Matrix aij matrices of any

Tensor xµ1...µn tensors of any rank

MetricTensor gµν Minkowski metric

LeviCivitaTensor µναβ totally anti-symmetric Levi-Civita tensor

DiracSpinor uµ1...µJ−1/2 (p, m) half-integral spin wave functions DiracAntiSpinor v(p, m) spin-1/2 anti-particle wave functions DiracGamma γµ DiracGamma5 γ5 Dirac matrices DiracSigma σµν

PolVector µ1...µJ (p, m) integral spin wave functions (`) OrbitalTensor Lµ1...µ` orbital angular momentum tensors Table 2 A partial list of qft++ classes, a complete list can be found at [12].

µiµj g uµ1...µi...µj ...µJ−1/2 (p, m) = 0, (7e) 4.3. Dirac Matrices

for any µi, µj, and reduce the number of independent J+1/2 Classes are also provided to handle the Dirac elements from 4 to (2J + 1). matrices, γµ (DiracGamma) and γ5 (DiracGamma5), The spin-J projection operator is then defined as µν i µ ν along with σ ≡ 2 [γ , γ ](DiracSigma). Each 1 of these classes is derived from the common base P (J) (p) = class Matrix > >. Thus, µ1...µJ−1/2ν1...νJ−1/2 2w X they inherit all of the necessary Matrix and Tensor × u (p, m)¯u (p, m). (8) µ1...... µJ−1/2 ν1...... νJ−1/2 operators. m

For example, the spin-1/2 projection operator is 4.4. Orbital Angular Momentum Tensors (1/2) 1 µ simply P (p) = 2w (p γµ +w), while for spin-3/2 the projection operator is given by Two particles, with 4-momenta pa and pb, can be coupled to a state of pure orbital angular momen- ( 3 ) 1 2 ( 2 ) (`) Pµν (p) = −P (p) tum, `, using the operators Lµ µ ...µ . The total and   1 2 ` (1) 1 (1) α (1) β relative momenta are defined as P = pa + pb and × Pµν (p) + Pµα (p)γ Pνβ (p)γ . (9) 1 3 pab = 2 (pa − pb) respectively. The orbital-angular- momentum operators are then built using the rela- Wave functions for particles with half-integral tive momentum and the spin-` projection operator spin are handled in qft++ by the DiracSpinor as follows: class. The spin is set using the constructor, L(`) ∝ P (`) (P )pν1 pν2 . . . pν` . (10) e.g. DiracSpinor u(3/2.) would be used for µ1µ2...µ` µ1µ2...µ`ν1ν2...ν` ab ab ab a spin-3/2 particle. As with the PolVector class, the DiracSpinor class must be initialized These operators satisfy the Rarita-Schwinger condi- for a given 4-momentum. The sub-states can tions then be accessed via , which returns the µ (`) u(m) P i L = 0 (11a) Matrix > > object for µ1µ2...µi...µ` sub-state m. The spin-J projection operators can be (`) (`) Lµ µ ...µ ...µ ...µ = Lµ µ ...µ ...µ ...µ (11b) easily accessed using the method u.Projector() 1 2 i j ` 1 2 j i ` which returns a 4 × 4 Matrix of rank-(2J − 1) µiµj (`) g Lµ µ ...µ ...µ ...µ = 0, (11c) Tensor > objects. We also note 1 2 i j ` here that the quantityu ¯(p, m) is obtained using the for any µi, µj, which insure that they have (2` + 1) function Bar(u(m)). independent elements.

4 In the qft++ package, orbital-angular-momentum To calculate this distribution using qft++, the operators are handled by the OrbitalTensor class. necessary variables must first be declared: This class inherits from Tensor; thus, after construction it can be used just like any (`) PolVector epso; // omega other tensor. Setting the tensor elements of Lµ ...µ 1 ` PolVector epsx(2); // X (OrbitalTensor object orbL) for 4-momenta pa OrbitalTensor orb3(3); // L^3 and pb (Vector4 objects pa and pb) is done by simply calling orbL.SetP4(pa,pb). Tensor > amp; Vector4 p4o,p4k,p4x; 4.5. Additional Utilities

Functions are also provided to calculate use- For each point at which I is to be calculated, the ful quantities such as Clebsch-Gordon coefficients, 4-momenta must be set and the polarization states Wigner D-functions, Breit-Wigner and Regge prop- initialized using calls to SetP4; however, if the kine- agators, etc. matics are such that the X mass is constant, then p4x and epsx will only need to be initialized once. In the code, a loop would then be performed over 5. Example Applications all values of cos θ (the decay angle of the ω in the X rest frame) for which the decay intensity is to In this section, a few simple examples will be ex- be calculated (or over events). At each point, the amined. The qft++ package computes the values of calculation would be performed as: expressions numerically; thus, the 4-momenta of the particles involved must be known. In an event-based partial wave analysis, these would be obtained from double intensity = 0.; the experimental data and/or Monte Carlo events. for(Spin m = -1; m <= 1; m+=2){ In the case that one wants to calculate theoreti- for(Spin mo = -1; mo <= 1; mo++){ cal angular distributions, cross sections, polarization amp = conj(epso(mo))*orb3|epsx(m); observables, etc., events with the desired kinemat- intensity += norm(amp()); ics must be generated as input for the qft++ code. } In the examples below, the assumption is made that } one of these methods is employed. For the example plots shown in this section, the latter method was used. In this way, the value of I can be calculated at any number of points in cos θ (or, for any number of 5.1. X(2−) → ωK → π+π−π0K events). It is worth examining this more carefully. The Consider the decay of a particle, X, with spin- tensor contractions in the code above are performed parity J P = 2− into an ω and K via F -wave. The by first evaluating the * operator which contracts ∗ (3)µνα invariant decay amplitude for this process is propor- µ(pω, mω) into the first index of L (pωK ). tional to The result is a rank-2 Tensor whose two in- dices are contracted via the | operator into ∗ (3)µνα A ∝ µ(pω, mω)L (pωK )να(P,M), (12) both indices of να(P,M). The result is a rank-0 whose value is ac- where p , m (P,M) are the momentum and > ω ω cessed via the operator. projection of the ω(X) and p is the relative mo- () ωK To check that the code is working for this simple mentum of the ωK system. example, the intensity in (13) can be calculated in For this example, assume that the X is produced the X rest frame by making a slight modification via e+e− annihilation resulting in population of only to the non-relativistic helicity formalism solution as the M = ±1 sub-states. The decay distribution is follows: then obtained by calculating the intensity

X X 2 X 2 2 I ∝ |A| . (13) I ∝ |f(Eω/wω, λ)(301λ|2λ)dMλ(θ)| , (14)

M=±1 mω =±1,0 M,λ

5 (1)µν iP (pω) ρ α β ωµ(pω) ∝ νραβp + p − p 0 , (19) 50 p2 − w2 + iw Γ π π π qft++ ω ω ω ω 45 analytic and wω, Γω are the mass and width of the ω. intensity 40 To add this decay to the qft++ calculation, the 35 following variables need to be defined: 30

25

20 complex i(0,1); Tensor > omega; 15 LeviCivitaTensor levi; 10 Vector4 p4pip,p4pim,p4pi0; 5

0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 cos(θ) Then, for each point the intensity is calculated as: Fig. 1. (Color Online) Intensity vs cos θ: Angular distri- bution calculated for the decay X(2−) → ωK using qft++ (black filled squares) compared with an analytic solution omega = epso.Projector()*levi (red line). See text for details. *p4pip*p4pim*p4pi0 *BreitWigner(p4o,0.78256,0.00844); where Eω, wω, λ are the energy, mass and helicity of double intensity = 0.; the ω and f(x, ±1) = 1, f(x, 0) = x accounts for for(Spin m = -1; m <= 1; m+=2){ the effects of the boosts on the covariant ω helicity amp = omega*orb3|epsx(m); states. Notice that as Eω → wω, the non-relativistic intensity += norm(amp()); solution is recovered. } The expression in (14) can then be rewritten purely in terms of the decay angle as follows:

I ∝ (2 cos2 θ − 1)2 + cos2 θ Since all of the objects are covariant, no extra boosts or rotations to the ω rest frame are required. E 2 +9 ω sin2 θ cos2 θ. (15) wω 5.2. πp → ∆ → πp Figure 1 shows the angular distributions obtained by calculating (12) using qft++ compared to the As an example involving half-integral spin par- modified helicity formalism expression given in (15), ticles, consider the reaction πp → ∆(1232) → πp. normalized to have the same integral as the qft++ The invariant scattering amplitude for this process solution. The two calculations give the same angular is proportional to distributions, i.e. the code is working properly. 3 This example can be extended by considering the µ ( 2 ) ν M ∝ u¯(p , m )p Pµν (P )p u(p , m ), (20) secondary decay ω → π+π−π0. The amplitude for f f f i i i

this process can be written as where pi(pf ) and mi(mf ) are the 4-momentum and ν α β µ canonical spin projection of the initial(final) proton A + − 0 ∝ i p + p − p  (p , m ), (16) ω→π π π µναβ π π π0 ω ω respectively. For this example, the mass-dependence which, in the ω rest frame, simplifies to of the propagator will be ignored. In the code, adding this would simply involve multiplying the amplitude mω Aω→π+π−π0 ∝ i (~pπ+ × ~pπ− ) · ~(mω). (17) by a complex. The distribution in the scattering angle, i.e. This is the standard non-relativistic result [13]. the angle between the initial and final protons To incorporate this decay, (12) must be rewritten (cos θ =p ˆ · pˆ ), is obtained by calculating the scat- as i f tering intensity (3)µνα A ∝ ωµ(pω)L (pωK )να(P,M), (18) X I ∝ |M|2. (21) where, mi,mf

6 To calculate this distribution using qft++, the following variables must be declared: 0.01 qft++ 0.009 analytic

intensity 0.008 DiracSpinor ui,uf; // proton spinors DiracSpinor delta(3/2.); 0.007 Matrix > amp(1,1); 0.006 Vector4 p4_i,p4_f,p4_delta; 0.005 0.004

0.003 For each point at which I is to be calculated, the 0.002 4-momenta must be set and the spinors initialized 0.001

using calls to SetP4; however, if the 4-momentum of 0 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 any given particle does change from point to point, cos(θ) then its corresponding object would only need to be initialized once. Fig. 2. (Color Online) Intensity vs cos θ: Angular distribu- In the code, a loop would then be performed over tion calculated for the reaction πp → ∆(1232) → πp using all values of cos θ for which the scattering intensity qft++ (black filled squares) compared with an analytic solu- tion (red line). See text for details. is to be calculated (or, again, over all events). At each point, the calculation would be performed as:

double intensity = 0.; 5.3. Compton Scattering for(Spin m_i = -1/2.; m_i <= 1/2.; m_i++){ for(Spin m_f = -1/2.; m_f <= 1/2.; m_f++){ As a final example, the unpolarized Compton amp = Bar(uf(m_f))*p4_f scattering cross section will be calculated to leading *delta.Projector()*p4_i*ui(m_i); order in α. The two well-known tree-level ampli- intensity += norm(amp(0,0)); tudes, corresponding to s- and u-channel electron } exchange diagrams, are }

2 0 0 µ ∗ 0 0 As = −e u¯(p , mp)γ µ(k , mγ ) In this way, the value of I can be calculated at any p/ + k/ + w × γν  (k, m )u(p, m ) (23a) number of points in cos θ. (p + k)2 − w2 ν γ p If the ∆(1232) projector is on-shell (see discussion in Section 4.1), then the numerical calculations can be checked in the overall center-of-mass frame using

the non-relativistic helicity formalism. In this frame, 2 0 0 ν the scattering intensity is proportional to Au = −e u¯(p , mp)γ ν (k, mγ ) p − k/0 + w 3 / µ ∗ 0 0 X 2 2 × γ  (k , m )u(p, m ), (23b) I ∝ |d 2 (θ)| ∝ 1 + 3 cos θ, (22) 0 2 2 µ γ p λiλf (p − k ) − w λi,λf

0 0 where λi(λf ) are the initial(final) proton helicities. where p(p ) and k(k ) denote the initial(final) elec- Figure 2 shows the angular distributions obtained tron and photon momenta respectively and w is the by calculating (20) in the overall center-of-mass mass of the electron. The full scattering amplitude, frame using qft++ compared to the non-relativistic from which the cross section can be calculated, is helicity formalism calculation used to obtain (22). obtained by combining these two processes. The result obtained using (22) was normalized to The calculation of this scattering amplitude is have the same integral as the covariant calculation. similar to that of the previous example. First, the Clearly the two calculations give the same angular following variables must be declared: distributions.

7 DiracSpinor ui,uf; // e spinors DiracSpinor u_ex; // exchanged e spinor qft++ PolVector epsi,epsf; // photon pol.vecs Klein-Nishina ) (barns) DiracGamma gamma; // gamma^mu θ -1 // s- and u-channel propagators 10 /dcos( σ

Matrix > prop_s; d Matrix > prop_u; Vector4 pi,pf,ki,kf; // 4-momenta

10-2 A loop would then be performed over all values of cos θ (scattering angle in the lab frame) for which -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 the cross section is to be calculated. At each point, cos(θ) the propagators are obtained using the following dσ code: Fig. 3. (Color Online) d cos θ (barns) vs cos θ: Compton scat- tering differential cross section for a 10 MeV incident photon calculated using qft++ (black filled squares) compared with u_ex.SetP4(pi+ki,0.511); the Klein-Nishina equation (red line). See text for details. prop_s = u_ex.Propagator(); u_ex.SetP4(pi-kf,0.511); eral, this is not the case; however, even for very prop_u = u_ex.Propagator(); complicated expressions involving high rank tensors or symmetrization, the qft++ calculations are still very manageable (more complicated examples can be found online [12]). The code is also optimized for The scattering intensity is then obtained by looping performance. The examples given in this paper run over spin projections, Spin m ef,m ei,m gf,m gi, at ∼ 3 kHz, i.e. on a 2.5 GHz processor, one can and calculating the amplitudes given in (23) as compute results at about 3000 kinematic points per second. This package makes it possible for any physi- cist to compare and/or fit a theoretical model to his amp_s = Bar(uf(m_ef))*gamma or her data by coding up the expressions themselves. *conj(epsf(m_gf))*prop_s*gamma It is clear from these examples how this package *epsi(m_gi)*ui(m_ei); could be useful for a partial wave analysis, but it amp_u = Bar(uf(m_ef))*gamma*epsi(m_gi) can also be used for other types of analyses. For ex- *prop_u*gamma*conj(epsf(m_gf)) ample, it can be used to perform numeric checks of *ui(m_ei); analytic calculations. The qft++ package can also be used for cases where analytic solutions are desir- able but not feasible. For example, consider the case To get the cross sections the appropriate scale fac- where an expansion of an expression in powers of 2 tors (α , phase space factors, etc.) must then be some variable, x, is needed but an analytic solution applied. is not available. The qft++ package could be used to Figure 3 shows the differential cross section for evaluate the expression at a large number of values a 10 MeV incident photon calculated using qft++ of x. The coefficients in the expansion could then be compared to the well-known spin-averaged Klein- extracted by fitting the qft++ results. Nishina formula [14]. Both methods give the same The qft++ package is available to all users from results. http://www-meg.phys.cmu.edu/qft++.

6. Discussion Acknowledgments The examples in this paper were chosen because they can also easily be solved analytically, allow- I would like to thank Matt Shepherd for provid- ing for comparisons of the two calculations. In gen- ing a more efficient version of the TensorIndex

8 class. This work was supported by grants from the United States Department of Energy No. DE-FG02- 87ER40315 and the National Science Foundation No. 0653316 through the “Physics at the Informa- tion Frontier” program.

References

[1] R. Mertig, M. Bhm and A. Denner. Comput. Phys. Commun. 64 345 (1991). [2] T. Hahn. Comput. Phys. Commun. 140 418 (2001). [3] J. Fujimoto et al. Comput. Phys. Commun. 153 106 (2003). [4] E. Boos et al. Nucl.Instrum. Meth. A534 250 (2004). [5] M. Williams, Carnegie Mellon University Ph.D. Thesis, (2007). [6] A. Alexandrescu. Modern C++ Design. Addison- Wesley, 2001. Using concepts discussed in Chapter 2. [7] J. J¨arvi,J. Willcock and A. Lumsdaine. Following the enable if family of templates contained in the BOOST libraries. http://www.boost.org. [8] W. Rarita and J. Schwinger. Phys. Rev. 60, 61 (1941). [9] C. Zemach. Phys. Rev. 140, B97 (1965). [10] S.U. Chung. BNL preprint BNL-QGS-02-0900 (2004). [11] A.V. Anisovich et al. J. Phys. G 28, 15-32 (2002). [12] http://www-meg.phys.cmu.edu/qft++ [13] C. Zemach. Phys. Rev. B 133, 1201-1220 (1964). [14] O. Klein and Y. Nishina. Z. Physik 52, 853 (1929).

9