#include #include "stdlib.h" #include "partcrys.h" using namespace std; /*This class describes the particule in the crystal. It has as attribute the 8-dimensional coordinates */ class SimCrys { public: //==================Constructeurs, destructeur========================================= SimCrys(Crystal crys, Partcrys part); ~SimCrys() {}; Crystal crys; Partcrys part; //double moy; //POUR faire varier la moyenne de la gaussienne aussi !!!!! //Basic function to update some data if needed void bases(SimCrys& sim); //First function that determins if the particule crosses the crystal. bool cross(SimCrys& sim); //IF the first function is true, this function will determin if the particule is in the amorphous layer. bool layer(SimCrys& sim); // IF the function layer is true, this function will determin the critical parameters and some other usefull parameters. void parameters(SimCrys& sim); //IF the theta particule is less than the theta critique then this function give the effect of the particule (in the part of channeling) void channel(SimCrys& sim); //IF the theta particule is not less than the theta critique then this function give the effect of the particule (in the part of volume reflexion) void reflection(SimCrys& sim); //THE GENERAL FUNCTION OF THE TEST THAT REGROUP ALL THE PREVIOUS FUNCTIONS!!!! void general(SimCrys& sim, const int& pas, string outputpath, double Mirror, double C_rotation, double C_aperture, double C_offset, double C_tilt, double Crystal_tilt); /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //WE WRITE SOME FUNCTIONS IMPORTANT FUNCTION NOW /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //The next function descris the movement of the particule in amorphous and returns the position.!!!! void move_am(int IS, int NAM, double DZ, double DEI, double DLY, double DLR, double& xp, double& yp, double& PC); // The next function generate un random number between 0 and 1!!!!!!!!!!!!!!! double random(); //The next function generate a random number uniformely between -500 and 1000 murad!!! double random_dist(); //// The next function generate un random number from a gaussian distribution with mean 0 and variance 1 !!!!!!!!!!!!!!! double random_gauss(); double random_gauss_cut(); //The next function generate a random number from a gaussian distribution with mean 0 and ecart-type of 500!!!!! double random_gauss_dist(/*SimCrys& sim //POUR faire varier la moyenne de la gaussienne aussi !!!!!*/); /////////////////////////////**********************************+++++++++++++++++++++++++ double random_gauss_dist_409(); //////////////////////////////********************************++++++++++++++++++++++++++++++ //the next function show the crystal parameters. void affiche(); //write output in the file "crystal_output.out" void file_out(const int& pas, string outputpath); //open the output file from icosim!! void open_file(SimCrys& sim); //initate some para with the used of the previous function. void initiate(SimCrys& sim); };