20 const ncomplex s2=sum[(2+n)%3]; \
21 const ncomplex s1=sum[(1+n)%3]; \
22 const ncomplex s10=s21; \
25 || ( fabs(s2.real()*heps)>=fabs(s21.real()) \
26 && fabs(s2.imag()*heps)>=fabs(s21.imag()) ) ) \
29 sump=s1+1./(1./s21-1./s10); \
31 if ( fabs(sump.real()*teps)>=fabs(sump.real()-dv.real()) \
32 && fabs(sump.imag()*teps)>=fabs(sump.imag()-dv.imag()) ) \
57#define EVALUNDEF return std::numeric_limits<double>::signaling_NaN();
58 virtual ncomplex A(
int ep) { EVALUNDEF }
59 virtual ncomplex A(
int ep,
int i) { EVALUNDEF }
60 virtual ncomplex A(
int ep,
int i,
int j) { EVALUNDEF }
61 virtual ncomplex A(
int ep,
int i,
int j,
int k) { EVALUNDEF }
62 virtual ncomplex A(
int ep,
int i,
int j,
int k,
int l) { EVALUNDEF }
63 virtual ncomplex A(
int ep,
int i,
int j,
int k,
int l,
int m) { EVALUNDEF }
65 virtual ncomplex B(
int ep,
int i) { EVALUNDEF; }
66 virtual ncomplex B(
int ep,
int i,
int j) { EVALUNDEF }
67 virtual ncomplex B(
int ep,
int i,
int j,
int k) { EVALUNDEF }
69 virtual ncomplex C(
int ep,
int i) { EVALUNDEF }
76 return ( i<=j ? (i-1)+((j-1)*j)/2 : (j-1)+((i-1)*i)/2 );
81 return (i-1)+((j-1)*j)/2;
87 return ( i<=j ? i+j*(j+1)/2 : j+i*(i+1)/2 );
90 inline static int is(
int i,
int j,
int k)
CONST
93 return (j <= k ? i+ti2[j]+ti3[k] :
is(i,k)+ti3[j]);
96 return (i > k ?
is(j,k)+ti3[i] : j+ti2[i]+ti3[k]);
100 inline static int is(
int i,
int j,
int k,
int l)
CONST
104 return (k <= l ? i+ti2[j]+ti3[k]+ti4[l]
105 :
is(i,j,l)+ti4[k] );
108 return (j > l ?
is(i,k,l)+ti4[j]
109 :
is(i,k)+ti3[j]+ti4[l] );
114 return (i > l ?
is(j,k,l)+ti4[i]
115 :
is(j,k)+ti3[i]+ti4[l] );
118 return (k <= l ? j+ti2[i]+ti3[k]+ti4[l]
119 :
is(i,j,l)+ti4[k] );
132 assert(i <= j && j <= k);
133 return i+ti2[j]+ti3[k];
136 inline static int iss(
int i,
int j,
int k,
int l)
CONST
138 assert(i <= j && j <= k && k <= l);
139 return i+ti2[j]+ti3[k]+ti4[l];
142 inline static int iss(
int i,
int j,
int k,
int l,
int m)
CONST
144 assert(i <= j && j <= k && k <= l && l <= m);
145 return i+ti2[j]+ti3[k]+ti4[l]+ti5[m];
154 static int im3(
int i,
int j,
int k)
CONST;
156 static int signM3ud(
int i,
int j,
int k,
int l,
int m,
int n)
CONST;
160 static void freeidxM3(
int set[],
int free[]);
162 static void Rescale(
double factor);
165 static const unsigned char ti2[8];
166 static const unsigned char ti3[8];
167 static const unsigned char ti4[8];
168 static const unsigned char ti5[8];
204 return j==0 ? 1 :
Cay[
ns(i,j)];
230#ifdef USE_GOLEM_MODE_6
232 #define ix(i) i<psix ? i : i-1
241 virtual ncomplex A(
int ep,
int i,
int j,
int k,
int l,
int m) {
return evalE(ep,
ix(i),
ix(j),
ix(k),
ix(l),
ix(m)); }
245 virtual ncomplex B(
int ep,
int i,
int j,
int k) {
return evalE(ep, 0, 0,
ix(i),
ix(j),
ix(k)); }
301 double M1(
int i,
int l)
PURE;
302 double M2(
int i,
int j,
int l,
int m)
PURE;
303 double M3(
int i,
int j,
int k,
int l,
int m,
int n)
PURE;
305 double gram3(
double p1,
double p2,
double p3)
PURE;
317 double pmaxS4[
DCay-1];
327 enum EvalM {E_None=0,
330 E_I4D4sijk=E_I4D4sijkl+3,
331 E_I3D3stij=E_I4D4sijk+3,
332 E_I4D4sij=E_I3D3stij+3,
333 E_I3D3sti=E_I4D4sij+3,
334 E_I4D4si=E_I3D3sti+3,
337 E_I3D7st=E_I2D6stu+3,
338 E_I2D5stu=E_I3D7st+3,
339 E_I3D6st=E_I2D5stu+3,
340 E_I2D4stu=E_I3D6st+3,
341 E_I3D5st=E_I2D4stu+3,
342 E_I2D3stu=E_I3D5st+3,
343 E_I3D4st=E_I2D3stu+3,
344 E_I3D3stijk=E_I3D4st+3,
345 E_I2D2stui=E_I3D3stijk+3,
346 E_I2D2stuij=E_I2D2stui+3,
347 E_I2D2stu=E_I2D2stuij+3,
348 E_I3D3st=E_I2D2stu+3,
349 E_I4D3sijk=E_I3D3st+3,
350 E_I3D2stij=E_I4D3sijk+3,
351 E_I2Dstui=E_I3D2stij+3,
352 E_I3D2st=E_I2Dstui+2,
355 E_I4D3si=E_I4D3sij+3,
356 E_I3D2sti=E_I4D3si+3,
357 E_I2Dstu=E_I3D2sti+3,
359 E_I4D2sij=E_I3Dsti+3,
370 std::bitset<E_LEN> fEval;
373 static const int DM3=20;
374 double pM3[DM3*(DM3+1)/2];
375 static const int DM2=15;
376 double pM2[DM2*(DM2+1)/2];
377 static const int DM1=6;
378 double pM1[DM1*(DM1+1)/2];
441 void I4sEval(
int ep);
443 void I3stEval(
int ep);
444 void I4DsEval(
int ep);
445 void I4DsiEval(
int ep);
447 void I2stuEval(
int ep);
448 void I3DstEval(
int ep);
449 void I4D2sEval(
int ep);
451 void I4D2siEval(
int ep);
452 void I3DstiEval(
int ep);
453 void I3D2stEval(
int ep);
454 void I4D3sEval(
int ep);
455 void I4D2sijEval(
int ep);
457 void I2DstuEval(
int idx,
int ep,
int s,
int t,
int u,
int m,
int n,
double qsq);
458 void I3D2stiEval(
int ep);
459 void I4D3siEval(
int ep);
460 void I4D3sijEval(
int ep);
462 void I2DstuiEval(
int ep,
int s,
int t,
int u,
int i,
int ip,
double qsq);
463 void I3D2stijEval(
int ep);
464 void I4D3sijkEval(
int ep);
466 void I4D4sEval(
int ep);
467 void I4D4siEval(
int ep);
468 void I3D3stiEval(
int ep);
469 void I4D4sijEval(
int ep);
470 void I2D2stuiEval(
int ep,
int s,
int t,
int u,
int i,
int ip,
double qsq);
471 void I3D3stijEval(
int ep);
472 void I4D4sijkEval(
int ep);
473 void I2D2stuijEval(
int ep,
int s,
int t,
int u,
int i,
int ip,
double qsq);
474 void I3D3stijkEval(
int ep);
475 void I4D4sijklEval(
int ep);
478 void I2D2stuEval(
int idx,
int ep,
int s,
int t,
int u,
int m,
int n,
double qsq);
479 void I3D3stEval(
int ep);
480 void I2D3stuEval(
int idx,
int ep,
int s,
int t,
int u,
int m,
int n,
double qsq);
481 void I3D4stEval(
int ep);
482 void I2D4stuEval(
int idx,
int ep,
int s,
int t,
int u,
int m,
int n,
double qsq);
483 void I3D5stEval(
int ep);
484 void I2D5stuEval(
int idx,
int ep,
int s,
int t,
int u,
int m,
int n,
double qsq);
485 void I3D6stEval(
int ep);
486 void I2D6stuEval(
int idx,
int ep,
int s,
int t,
int u,
int m,
int n,
double qsq);
487 void I3D7stEval(
int ep);
490 ncomplex I2mDstu(
int ep,
int s,
int t,
int u,
int m,
int n);
491 ncomplex I2stui(
int ep,
int s,
int t,
int u,
int i,
int ip);
493 double M4ii(
int u,
int v,
int i)
PURE;
494 double M4ui(
int u,
int v,
int i)
PURE;
495 double M4vi(
int u,
int v,
int i)
PURE;
496 double M4uu(
int u,
int v,
int i)
PURE;
497 double M4vu(
int u,
int v,
int i)
PURE;
498 double M4vv(
int u,
int v,
int i)
PURE;
520 virtual ncomplex A(
int ep,
int i,
int j);
521 virtual ncomplex A(
int ep,
int i,
int j,
int k);
522 virtual ncomplex A(
int ep,
int i,
int j,
int k,
int l);
525 virtual ncomplex B(
int ep,
int i,
int j);
556 virtual ncomplex A(
int ep,
int i,
int j);
557 virtual ncomplex A(
int ep,
int i,
int j,
int k);
569 const int ps, pt, offs;
589 virtual ncomplex A(
int ep,
int i,
int j);
600 const int ps, pt, pu, offs;
615 return idxtbl[(1<<i)|(1<<j)|(1<<k)];
622 return idxtbl[(1<<i)|(1<<j)];
629 int t=(j-i)*(k-j)*(k-i)*(m-l)*(
n-m)*(
n-l);
630 return t==0 ? 0 : 2*(
t>>(
sizeof(int)*8-1))+1;
638 return t==0 ? 0 : 2*(
t>>(
sizeof(int)*8-1))+1;
**********Class see also m_nmax DOUBLE PRECISION m_amel DOUBLE PRECISION m_x2 DOUBLE PRECISION m_alfinv DOUBLE PRECISION m_Xenph INTEGER m_KeyWtm INTEGER m_idyfs DOUBLE PRECISION m_zini DOUBLE PRECISION m_q2 DOUBLE PRECISION m_Wt_KF DOUBLE PRECISION m_WtCut INTEGER m_KFfin *COMMON c_KarLud $ !Input CMS energy[GeV] $ !CMS energy after beam spread beam strahlung[GeV] $ !Beam energy spread[GeV] $ !z boost due to beam spread $ !electron beam mass *ff pair spectrum $ !minimum v
***************************************************************************************Pseudo Class RRes *****************************************************************************************Parameters and physical constants **Maarten sept ************************************************************************DOUBLE PRECISION xsmu **************************************************************************PARTICLE DATA all others are from PDG *Only resonances with known widths into electron pairs are sept ************************************************************************C Declarations C
static Ptr create(const Kinem2 &k, Minor5::Ptr mptr5, int s, int t, int u, int is)
static Ptr create(const Kinem3 &k, Minor5::Ptr mptr5, int s, int t, int is)
static Ptr create(const Kinem4 &k, Minor5::Ptr mptr5, int s, int is)
ncomplex I2stu(int ep, int s, int t, int u)
double M2(int i, int j, int l, int m) PURE
ncomplex I2D2stui(int ep, int s, int t, int u, int i)
ncomplex I4D3sijk(int ep, int s, int i, int j, int k)
ncomplex I4D3s(int ep, int s)
ncomplex I3st(int ep, int s, int t)
ncomplex I2D6stu(int ep, int s, int t, int u)
ncomplex I2D3stu(int ep, int s, int t, int u)
ncomplex I4D2si(int ep, int s, int i)
ncomplex I3D3stijk(int ep, int s, int t, int i, int j, int k)
ncomplex I4D3sij(int ep, int s, int i, int j)
ncomplex I3Dsti(int ep, int s, int t, int i)
ncomplex I3D3sti(int ep, int s, int t, int i)
static Ptr create(const Kinem5 &k)
ncomplex I3D2sti(int ep, int s, int t, int i)
ncomplex I3D2stij(int ep, int s, int t, int i, int j)
ncomplex I4D4sijk(int ep, int s, int i, int j, int k)
ncomplex I4s(int ep, int s)
double M1(int i, int l) PURE
double gram3(double p1, double p2, double p3) PURE
ncomplex I3D6st(int ep, int s, int t)
ncomplex I4D3si(int ep, int s, int i)
ncomplex I3D3st(int ep, int s, int t)
ncomplex I4D2sij(int ep, int s, int i, int j)
ncomplex I4D4sij(int ep, int s, int i, int j)
ncomplex I2D5stu(int ep, int s, int t, int u)
ncomplex I2D2stuij(int ep, int s, int t, int u, int i, int j)
ncomplex I4D4si(int ep, int s, int i)
ncomplex I4Ds(int ep, int s)
ncomplex I2D2stu(int ep, int s, int t, int u)
ncomplex I2Dstui(int ep, int s, int t, int u, int i)
ncomplex I4D4s(int ep, int s)
ncomplex I3D7st(int ep, int s, int t)
ncomplex I4D4sijkl(int ep, int s, int i, int j, int k, int l)
ncomplex I4Dsi(int ep, int s, int i)
ncomplex I2D4stu(int ep, int s, int t, int u)
ncomplex I2Dstu(int ep, int s, int t, int u)
static Ptr create(const Kinem4 &k)
ncomplex I3D5st(int ep, int s, int t)
double M3(int i, int j, int k, int l, int m, int n) PURE
ncomplex I3D4st(int ep, int s, int t)
ncomplex I3D2st(int ep, int s, int t)
ncomplex I3D3stij(int ep, int s, int t, int i, int j)
ncomplex I4D2s(int ep, int s)
ncomplex I3Dst(int ep, int s, int t)
static const double epsir1
static int iss(int i, int j) CONST
static void Rescale(double factor)
static const double seps1
static const unsigned char idxtbl[64]
static int is(int i, int j, int k, int l) CONST
static void freeidxM3(int set[], int free[])
static int is(int i, int j, int k) CONST
static int ns(int i, int j) CONST
static int iss(int i, int j, int k, int l) CONST
static int signM3ud(int i, int j, int k, int l, int m, int n) CONST
static int iss(int i, int j, int k) CONST
static int nss(int i, int j) CONST
static const double deps2
static int im2(int i, int j) CONST
static const double epsir2
static const double seps2
static int is(int i, int j) CONST
static int iss(int i, int j, int k, int l, int m) CONST
static int signM2ud(int i, int j, int l, int m) CONST
static const double deps3
static const double deps1
static int im3(int i, int j, int k) CONST
double Cay[(DCay-1) *(DCay)/2]
double Kay(int i, int j) PURE
std::complex< double > ncomplex