1 | #include <iostream> |
---|
2 | #include <vector> |
---|
3 | #include <string> |
---|
4 | #include "StandardCollimator.h" |
---|
5 | #include "FlukaCollimator.h" |
---|
6 | #include "MagneticCollimator.h" |
---|
7 | #include "CrystalCollimator.h" |
---|
8 | #include "Particle.h" |
---|
9 | using namespace std; |
---|
10 | |
---|
11 | /* |
---|
12 | ############################################################################################################ |
---|
13 | |
---|
14 | This file is used to test the construction and some aspects of the collimators. |
---|
15 | |
---|
16 | It can also be modified for making new collimator tests. |
---|
17 | |
---|
18 | ############################################################################################################ |
---|
19 | */ |
---|
20 | |
---|
21 | |
---|
22 | int main() |
---|
23 | { |
---|
24 | |
---|
25 | Particle p1; |
---|
26 | Particle ref(0, 0, 0, 0, 0, 0, 0.04, 0.03, 0.02); |
---|
27 | |
---|
28 | double ax(-2.316794521); |
---|
29 | double bx(103.4788975); |
---|
30 | double dx(1.231007397); |
---|
31 | double dpx(0.027602708); |
---|
32 | double by(20.8994661); |
---|
33 | double ay(0.537534425); |
---|
34 | double dy(0); |
---|
35 | double dpy(0); |
---|
36 | srand(time(0)); |
---|
37 | |
---|
38 | |
---|
39 | p1.genpartdist(1, 1, "waterbag", 1.00095, 1.2e-8, 1.2e-8, 0.00011, bx, ax, dx, dpx, by, ay, dy, dpy, 6); |
---|
40 | |
---|
41 | StandardCollimator stdcolli(0.673651882, -2.183766647, 0.05, 0.05, 0, 0, "RECTANGLE", 23.65235333, 93.32238148, 0.021383636, 0, -0.338555786, 0, "RCOLLIMATOR", 0.6, 19.69294239, 19.76251791, "BRCV.51899", 0, 0, 0, 5213.4097, 0, 0, 0, 0, 0, 0, 0, 0, 0, "x", "standard", 0.002, 0.001, 0.1, 0.1, 0.2, 0, 0); |
---|
42 | FlukaCollimator flukacolli(1.288591765, -1.577339513, 0.078, 0.078, 0, 0, "ELLIPSE", 43.26312194, 56.37282712, -0.005548392, 0, -0.242857529, 0, "RCOLLIMATOR", 2, 1.980859479, 2.044620435, "TBSM.11672", 0, 0, 0, 531.7442, 0, 0, 0, 0, 0, 0, 0, 0, 0, "x", "fluka", 0.002, 0.001, 0.1, 0.1, 0.2, 0, 0); |
---|
43 | |
---|
44 | MagneticCollimator magnetcolli(0.735310344, -2.131043701, 0.0425, 0.0204, 0, 0, "RECTANGLE", 24.89598243, 90.02483262, 0.021833793, 0, -0.367904763, 0, "RCOLLIMATOR", 4.3, 2.266614904, 2.306252605, "TIDV.11892", 0, 0, 0, 604.9077, 0, 0, 0, 0, 0, 0, 0, 0, 0, "x", "magnetic", 0.002, 0.001, 0.1, 0.1, 0.2, 0, 0, 2, 0.0001, 574000, 193.6872); |
---|
45 | |
---|
46 | stdcolli.affiche(); |
---|
47 | flukacolli.affiche(); |
---|
48 | magnetcolli.affiche(); |
---|
49 | |
---|
50 | string path; |
---|
51 | |
---|
52 | path = "crossSectionInfos/"; |
---|
53 | |
---|
54 | double Api(178), Zpi(77); |
---|
55 | |
---|
56 | stdcolli.collipassInteraction(p1, ref.Ap0, ref.Zp0, 0.2, 0.6); |
---|
57 | |
---|
58 | |
---|
59 | |
---|
60 | return 0; |
---|
61 | } |
---|