00001 #include <iostream>
00002 #include <fstream>
00003 #include <complex>
00004 using namespace std;
00005
00006 extern "C"
00007 {
00008 void upup_(int *L1,int *L2, int *L3,int *L4,double *s,double *t,double *u,int *iz,double *har,double *hai);
00009 void downdown_(int *L1,int *L2, int *L3,int *L4,double *s,double *t,double *u,int *iz,double *har,double *hai);
00010 void flagset_(int *iqedx,int *iewx,int *ibornx,int *gfschemex,int *ifggx,double *ncx,double *fcx,double *tlmu2x);
00011 void paraget_(double *mtax, double *conhcx, double *pix);
00012 void printconsts_(int *pmg);
00013 }
00014
00015 class SANCtable
00016 {
00017
00018
00019
00020 public:
00021 static void setDimensions(int n1, int n2, int n3, int nc);
00022 static void setRanges(double sn1, double sx1, double sn2, double sx2, double sn3, double sx3);
00023 static void setFlags();
00024 private:
00025 static int ns1,ns2,ns3,ncos;
00026 static double smin1,smax1,smin2,smax2,smin3,smax3;
00027 static int iqed,iew,iborn,gfscheme,ifgg;
00028 static double nc,fc,tlmu2;
00029
00030
00031
00032 public:
00033 SANCtable():flav(1),born(false),isOpen(false) {}
00034 SANCtable(char *filename):flav(1),born(false) { open(filename); }
00035 void setFixedLength(int prc=8);
00036 void setBornLevel(bool bn) { born=bn; }
00037 void setFlavor(int flv) { flav=flv; }
00038 bool addHeader();
00039 bool addFile(char *name);
00040 void addRange(int rangeNo,bool isLog=false);
00041 void open(char *name);
00042 void close();
00043 ~SANCtable() { if(isOpen) close(); }
00044 protected:
00045 bool isOpen,born;
00046 int flav;
00047 private:
00048 double Rcalc(int flav, double sloop,double costhetloop);
00049 double R[4][4];
00050 ofstream f;
00051 };