forked from MapCollaboration/NangaParbat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ComputePredictions.cc
37 lines (29 loc) · 927 Bytes
/
ComputePredictions.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// Author: Valerio Bertone: [email protected]
//
#include "NangaParbat/nonpertfunctions.h"
#include "NangaParbat/convolutiontable.h"
#include <apfel/timer.h>
#include <cstring>
//_________________________________________________________________________________
int main(int argc, char* argv[])
{
// Check that the input is correct otherwise stop the code
if (argc < 2 || strcmp(argv[1], "--help") == 0)
{
std::cout << "\nInvalid Parameters:" << std::endl;
std::cout << "Syntax: ./ComputePredictions <table>\n" << std::endl;
exit(-10);
}
// Allocate "Parameterisation" object
NangaParbat::DWS NPFunc{};
// Upload convolution table
NangaParbat::ConvolutionTable ct{argv[1]};
// Timer
apfel::Timer t;
// Get predictions and print them
for (double p : ct.GetPredictions(NPFunc.Function()))
std::cout << std::scientific << p << std::endl;
t.stop();
return 0;
}