Added constants.h: declaring global variables there and passign to parameters, particles. Included Elastic Scattering

This commit is contained in:
Christian
2018-10-11 10:00:30 +02:00
parent 31049551a9
commit ab2bc174af
8 changed files with 286 additions and 278 deletions
+13 -16
View File
@@ -11,7 +11,7 @@
#include <stdio.h>
#include <math.h>
#include <vector>
#include <deque>
#include <iostream>
#include <fstream>
#include "blitz/array.h"
@@ -30,8 +30,6 @@ public:
Simulation() {
numInjectedParticles = 0;
rngUni.seed(seed);
particleLogger.clear();
outputName = "TestRun";
// Check OutFile already existing? -no-> Create Outfile_1
@@ -49,9 +47,17 @@ protected:
Katrin Kat;
ranlib::Uniform<double> rngUni;
int numInjectedParticles;
std::vector<Particle> particleQueue, newParticles;
std::vector<Particle>::iterator particleQueueIt;
std::deque<Particle> particleQue;
// Simulation Methods
Particle inject();
bool move(Particle *inputParticle);
bool movedOutside(blitz::TinyVector<double,3> loc_m);
int getInteraction(Particle inPutParticle);
/*
// Logging Objects
int step;
std::string outputName;
@@ -59,22 +65,13 @@ protected:
std::vector<Particle>::iterator particleLoggerIt;
std::ofstream outFile;
// Simulation Methods
Particle inject();
blitz::TinyVector<double,3> move(Particle inputParticle,double distance_m);
bool movedOutside(blitz::TinyVector<double,3> loc_m);
blitz::TinyVector<double,3> moveToLocOfDeath(Particle inputParticle);
// Logging Methods
void writeToLogger(Particle inputParticle);
void writeToFile(std::vector<Particle> *particleLogger);
// Cross Sections
double sigmaTot_m2(double Ekin_eV);
double sigmaEla_m2(double Ekin_eV);
double dSigmaEladOmega_m2 (double Ekin_eV, double Theta_rad, double Phi_rad);
*/
};
#endif