source: ZHANGProjects/ICOSIM/CPP/trunk/source/crystal.cc @ 17

Last change on this file since 17 was 15, checked in by zhangj, 10 years ago

(1) Modify the bug to connect to the Fortran files. (2) Fix the bug of the definition type of the random functions used in Fortran file crystal_dan_FINAL....f.

File size: 1.7 KB
Line 
1#include <iostream>
2#include <cmath>
3
4#include "crystal.h"
5using namespace std;
6
7
8
9//==================================Constructeurs, destructeur====================================
10
11Crystal::Crystal(int C_orient, int IS, double C_xmax, double C_ymax, double Cry_length, double Rcurv)
12    : miscut(miscut), Rcurv(Rcurv), Cry_length(Cry_length), C_xmax(C_xmax), C_ymax(C_ymax), Alayer(Alayer), IS(IS), C_orient(C_orient), ZN(ZN), NAM(NAM)
13{
14
15    //Some usefull parameters !!
16
17    Alayer = 0;
18
19    cry_bend = (Cry_length / Rcurv); //total bending angle for this crystal;
20    s_length = Rcurv * (sin(cry_bend)); // projected length [m]
21    xmax = C_xmax ;
22    L_chan = Cry_length; //Careful : the channeling length is the length of the particle trajectory, not the long. one
23    tchan = cry_bend;
24    ymin = -C_ymax / 2 ;
25    ymax =  C_ymax / 2;
26
27    ZN = 1;
28    NAM = 1;
29    miscut = 0;
30
31   
32    //the same as the variables in "crystal_dan_FINAL_VERSION_CHvsVR.f" @ 08/2014
33    DLAI[0] = 1.6;
34    DLAI[1] = 0.57;
35    DLAI[2] = 2.2;
36    DLAI[3] = 1.0;
37    SAI[0] = 42.0;
38    SAI[1] = 140.0;
39    SAI[2] = 42.0;
40    SAI[3] = 50.0;
41    DLRI[0] = 0.09336;
42    DLRI[1] = 0.0035;
43    DLRI[2] = 0.188;
44    DLRI[3] = 0.023;
45    DLYI[0] = 0.455;
46    DLYI[1] = 0.096;
47    DLYI[2] = 0.400;
48    DLYI[3] = 0.162;
49    AI[0] = 0.96e-7;
50    AI[1] = 0.56e-7;
51    AI[2] = 0.63e-7;
52    AI[3] = 1.0e-7;
53    DES[0] = 0.56;
54    DES[1] = 3.0;
55    DES[2] = 0.6;
56    DES[3] = 1.0;
57    eUm[0] = 21.34;
58    eUm[1] = 21.0;
59    eUm[2] = 21.0;
60    eUm[3] = 21.0;
61   
62   
63 
64   
65   
66
67}
68
69/*
70void Crystal::afficheCrystal(){
71
72 cout << "Here is the implicit parameters : " <<endl;
73 cout << "L_chan:" << L_chan << endl;
74 cout << "tchan:" << tchan << endl;
75
76}
77*/
78
Note: See TracBrowser for help on using the repository browser.