-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
44 lines (37 loc) · 981 Bytes
/
main.cpp
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
38
39
40
41
42
43
#include "section.h"
#include "getCorrections.h"
#include "getExperimental.h"
#include <iostream>
#include <iomanip>
#include <fstream>
#include <gsl/gsl_interp.h>
#include <gsl/gsl_deriv.h>
#include "TROOT.h"
#include "TCanvas.h"
#include "TGraph.h"
#include "TFile.h"
//THis is for test
int main(){
double E[401];
double visibleCS[401];
double bornCS[401];
// double vacpol = 1.0112824;
double pars[4] = {1275.1, 185.1, 1.6e-10, 0.28267};
for(int i = 0; i < 401; i++){
E[i] = 1100 + i;
visibleCS[i] = getCorrections(E[i], pars)*0.3894e12;
bornCS[i] = born(E[i]*E[i], pars)*0.3894e12;
std::cout << " " << i + 1 << " " << E[i] << " " << bornCS[i] << std::endl;
}
TFile *f = new TFile("sections.root", "recreate");
TGraph *gr = new TGraph(401, E, visibleCS);
TGraph *gr1 = new TGraph(401, E, bornCS);
gr->SetLineColor(2);
gr->SetLineWidth(3);
gr1->SetLineWidth(3);
gr1->SetLineColor(4);
gr->Write();
gr1->Write();
f->Close();
return 0;
}