source: ZHANGProjects/ICOSIM/CPP/trunk/source/testLattice.cc @ 2

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

Initial import

File size: 2.1 KB
Line 
1#include <iostream>
2#include <vector>
3#include <string>
4#include "lattice.h"
5using namespace std;
6
7
8/*
9####################################################################
10
11Test file for the class Lattice.
12
13####################################################################
14*/
15
16int main()
17{
18
19    vector <int> ips;
20
21    Element elt1(-2.316794521, 0.537534425, 0.0712, 0.01725, 0, 0, "RECTANGLE", 103.4788975, 20.8994661, 0.027602708, 0, 1.231007397, 0, "MARKER", 0, 0, 0, "BEGI.10010", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "x");
22
23    Element elt2(2.316066957, -0.534433046, 0.0712, 0.01725, 0, 0, "RECTANGLE", 103.4812508, 20.8903137, -0.027848221, 0, 1.230624298, 0, "QUADRUPOLE", 3.085, 0.004637558, 0.024132382, "QF.10010", 0, 0, 0, 3.085, 0, 0, 0, 0, 0, 0.044535174, 0, 0, 0, "x");
24
25    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);
26
27    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, 0.2, 0, 0);
28
29    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);
30
31    ips.push_back(2);
32    ips.push_back(3);
33    ips.push_back(4);
34
35    Lattice lat(elt1, elt2, stdcolli, flukacolli, magnetcolli, ips);
36
37    cout << "On affiche s: " << lat.reseau[0]->S << ", " << lat.reseau[1]->S << endl;
38
39    cout << "On a " << lat.npart << " particules." << endl;
40
41    Particle p1(1, 1, 1, 1, 1, 1, 1, 1, 1);
42    Particle p2;
43    Particle pref;
44
45    //lat.trackensemblechrom(0);
46
47    return 0;
48}
Note: See TracBrowser for help on using the repository browser.