C++ Interface to Tauola
SANCtable.h
1#include <iostream>
2#include <fstream>
3#include <complex>
4using namespace std;
5
6extern "C"
7{
8 void upup_(int *L1,int *L2, int *L3,int *L4,double *s,double *t,double *u,int *iz,double *har,double *hai);
9 void downdown_(int *L1,int *L2, int *L3,int *L4,double *s,double *t,double *u,int *iz,double *har,double *hai);
10 void flagset_(int *iqedx,int *iewx,int *ibornx,int *gfschemex,int *ifggx,double *ncx,double *fcx,double *tlmu2x);
11 void paraget_(double *mtax, double *conhcx, double *pix);
12 void printconsts_(int *pmg);
13}
14
15class SANCtable
16{
17//-----------------------------------------------------------------------------
18//-STATIC PART-----------------------------------------------------------------
19//-----------------------------------------------------------------------------
20public:
21 static void setDimensions(int n1, int n2, int n3, int nc);
22 static void setRanges(double sn1, double sx1, double sn2, double sx2, double sn3, double sx3);
23 static void setFlags();
24private:
25 static int ns1,ns2,ns3,ncos;
26 static double smin1,smax1,smin2,smax2,smin3,smax3;
27 static int iqed,iew,iborn,gfscheme,ifgg;
28 static double nc,fc,tlmu2;
29//-----------------------------------------------------------------------------
30//-----------------------------------------------------------------------------
31//-----------------------------------------------------------------------------
32public:
33 SANCtable():flav(1),born(false),isOpen(false) {}
34 SANCtable(const char *filename):flav(1),born(false) { open(filename); }
35 void setFixedLength(int prc=8);
36 void setBornLevel(bool bn) { born=bn; }
37 void setFlavor(int flv) { flav=flv; }
38 bool addHeader();
39 bool addFile(const char *name);
40 void addRange(int rangeNo,bool isLog=false);
41 void open(const char *name);
42 void close();
43 ~SANCtable() { if(isOpen) close(); }
44protected:
45 bool isOpen,born;
46 int flav;
47private:
48 double Rcalc(int flav, double sloop,double costhetloop);
49 double R[4][4];
50 ofstream f;
51};