1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-23 02:38:51 -05:00
catima/examples/reactions.cpp
2018-08-15 17:30:50 +02:00

28 lines
613 B
C++

#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;
}