SANCinterface.cxx

00001 #include <iostream>
00002 #include "SANCtable.h"
00003 using std::cout;
00004 
00005 int main()
00006 {
00007         SANCtable f1("table1-1.txt"),f2("table2-2.txt");
00008         f1.setFlavor(1);
00009         f2.setFlavor(2);
00010 
00011         //Uncomment for born-level computation
00012         //f1.setBornLevel(true);
00013         //f2.setBornLevel(true);
00014 
00015         //Write with fixed precision
00016         f1.setFixedLength(8);
00017         f2.setFixedLength(8);
00018 
00019         //Set the basic variables. Only needed once before all computation
00020         SANCtable::setFlags();
00021         //The dimensions must match the tauola interface
00022         SANCtable::setDimensions(100,100,100,21);
00023         //Define the sqrt mass range for all three data sets
00024         SANCtable::setRanges(6,17000,85,110,160,220);
00025 
00026         //Add header and additional information to files
00027         if(!f1.addHeader())
00028         {
00029                 cout<<"Ranges or dimensions not set.\n";
00030                 return -1;
00031         }
00032         if(!f1.addFile("SancLib_v1_02/lib.txt"))
00033         {
00034                 cout<<"No info file on electrowek library SANC (file SancLib_v1_02/lib.txt missing).\n";
00035                 return -1;
00036         }
00037 
00038         if(!f1.addFile("var.dump"))
00039         {
00040                 cout<<"No initialization variables of SANC (file var.dump missing).\n";
00041                 return -1;
00042         }
00043         //Same for the second file
00044         if(!f2.addHeader() || !f2.addFile("SancLib_v1_02/lib.txt") || !f2.addFile("var.dump"))
00045         {
00046                 cout<<"Second file I/O operations failed.\n";
00047                 return -1;
00048         }
00049 
00050         //Start computation
00051         f1.addRange(1,true); //The first range is a logarithmic range
00052         f1.addRange(2);
00053         f1.addRange(3);
00054         f1.close();
00055 
00056         f2.addRange(1,true); //The first range is a logarithmic range
00057         f2.addRange(2);
00058         f2.addRange(3);
00059         f2.close();
00060         return 0;
00061 }
Generated on Sun Oct 20 20:24:10 2013 for C++InterfacetoTauola by  doxygen 1.6.3