1#include "CLHEP/GenericFunctions/ClebschGordanCoefficientSet.hh"
7 for (
int i=2;i<=N;i++) retVal*=i;
13 double ClebschGordanCoefficientSet::calcCoefficient(
int l1,
int l2,
int L,
int xm1,
int xm2,
int M) {
15 if (xm1+xm2!=M)
return 0;
21 max = std::max(max,l2+xm2);
22 max = std::max(max,l1-xm1);
23 max = std::max(max,l1+l2-L);
26 for (
int k=0;k<=max;k++) {
31 if (T>=0) term *=
factorial(T);
else skipTerm=
true;
36 if (T>=0) term *=
factorial(T);
else skipTerm=
true;
41 if (T>=0) term *=
factorial(T);
else skipTerm=
true;
46 if (T>=0) term *=
factorial(T);
else skipTerm=
true;
51 if (T>=0) term *=
factorial(T);
else skipTerm=
true;
53 if (!skipTerm) F3+= ((k%2) ? -1:1)/term;