ADPlusPlus/ad++.cpp
2022-10-12 18:24:52 -04:00

41 lines
1.0 KiB
C++

#include "ad++.h"
int main(int argc, char **argv){
TApplication theApp("App",&argc,argv);
//========================== User input
double energy_keV = 832;
double detRadius_cm = 2;
double targetDistance_cm = 20;
double detThickness_cm = 10;
std::vector<std::vector<double>> data = { { 150.00, 2441.44, 122},
{ 131.75, 2580.11, 129},
{ 90.00, 4652.08, 232},
{ 48.75, 3023.17, 151} };
const int Ji = 5;
const int Jf = 4;
double sigma = 1;
//======================================
//=============================== Fit a, delta at once
TGraphErrors * gExp = fitAD(data, energy_keV, detRadius_cm, targetDistance_cm, detThickness_cm, Ji, Jf);
//=============================== Old AD code way
fitOldAD(data, energy_keV, detRadius_cm, targetDistance_cm, detThickness_cm, Ji, Jf, sigma);
printf("===================== Crtl+C to end.\n");
theApp.Run();
return 0;
}