From 53bbcbd4469e6b03db97013ce97e9edc6c6df7b1 Mon Sep 17 00:00:00 2001 From: hrocho Date: Wed, 15 Aug 2018 17:30:50 +0200 Subject: [PATCH] examples --- examples/makefile | 4 ++-- examples/reactions.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 examples/reactions.cpp diff --git a/examples/makefile b/examples/makefile index e84edab..9effe4b 100644 --- a/examples/makefile +++ b/examples/makefile @@ -1,8 +1,8 @@ -PROGRAMS=simple dedx example2 materials ls_coefficients +PROGRAMS=simple dedx example2 materials ls_coefficients reactions GCC=g++ -Wall -std=c++14 INCDIR=-I$(CATIMAPATH)/include -LIBDIR=-L$(CATIMAPATH) +LIBDIR=-L$(CATIMAPATH)/lib LIBS=-lcatima diff --git a/examples/reactions.cpp b/examples/reactions.cpp new file mode 100644 index 0000000..b6b3e74 --- /dev/null +++ b/examples/reactions.cpp @@ -0,0 +1,27 @@ +#include "catima/catima.h" +#include "catima/reactions.h" +#include + +using std::cout; +using std::endl; + + +int main(){ + catima::Material target = catima::get_material(4); + target.thickness(1.0); // thickness in g/cm2 + catima::Projectile p(12,6); // define projectile, ie 12C + + double cs = 45; + double rcsi = 870; + double rcso = 860; + + cout<<"C->Be\n"; + cout<<"t(g/cm2)\t rate"<