1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-22 18:28:51 -05:00
This commit is contained in:
hrocho 2018-08-15 17:30:50 +02:00
parent 2be81a4544
commit 53bbcbd446
2 changed files with 29 additions and 2 deletions

View File

@ -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

27
examples/reactions.cpp Normal file
View File

@ -0,0 +1,27 @@
#include "catima/catima.h"
#include "catima/reactions.h"
#include <iostream>
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"<<endl;
for(double t=0.25; t<=5;t+=0.25){
target.thickness(t);
double r = production_rate(45,rcsi, rcso, target);
cout<<t<<"\t"<<r<<endl;
}
return 0;
}