StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
StarGenerator
Tauola1_1_5
SANC
SANCinterface.cxx
1
#include <iostream>
2
#include "SANCtable.h"
3
using
std::cout;
4
5
int
main()
6
{
7
SANCtable
f1(
"table1-1.txt"
),f2(
"table2-2.txt"
);
8
f1.setFlavor(1);
9
f2.setFlavor(2);
10
11
//Uncomment for born-level computation
12
//f1.setBornLevel(true);
13
//f2.setBornLevel(true);
14
15
//Write with fixed precision
16
f1.setFixedLength(8);
17
f2.setFixedLength(8);
18
19
//Set the basic variables. Only needed once before all computation
20
SANCtable::setFlags();
21
//The dimensions must match the tauola interface
22
SANCtable::setDimensions(100,100,100,21);
23
//Define the sqrt mass range for all three data sets
24
SANCtable::setRanges(6,17000,85,110,160,220);
25
26
//Add header and additional information to files
27
if
(!f1.addHeader())
28
{
29
cout<<
"Ranges or dimensions not set.\n"
;
30
return
-1;
31
}
32
if
(!f1.addFile(
"SancLib_v1_02/lib.txt"
))
33
{
34
cout<<
"No info file on electrowek library SANC (file SancLib_v1_02/lib.txt missing).\n"
;
35
return
-1;
36
}
37
38
if
(!f1.addFile(
"var.dump"
))
39
{
40
cout<<
"No initialization variables of SANC (file var.dump missing).\n"
;
41
return
-1;
42
}
43
//Same for the second file
44
if
(!f2.addHeader() || !f2.addFile(
"SancLib_v1_02/lib.txt"
) || !f2.addFile(
"var.dump"
))
45
{
46
cout<<
"Second file I/O operations failed.\n"
;
47
return
-1;
48
}
49
50
//Start computation
51
f1.addRange(1,
true
);
//The first range is a logarithmic range
52
f1.addRange(2);
53
f1.addRange(3);
54
f1.close();
55
56
f2.addRange(1,
true
);
//The first range is a logarithmic range
57
f2.addRange(2);
58
f2.addRange(3);
59
f2.close();
60
return
0;
61
}
SANCtable
Definition:
SANCtable.h:15
Generated by
1.8.5