Line | |
---|
1 | /*
|
---|
2 | ---- Hector the simulator ----
|
---|
3 | A fast simulator of particles through generic beamlines.
|
---|
4 | J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
|
---|
5 |
|
---|
6 | http://www.fynu.ucl.ac.be/hector.html
|
---|
7 |
|
---|
8 | Centre de Physique des Particules et de Phénoménologie (CP3)
|
---|
9 | Université Catholique de Louvain (UCL)
|
---|
10 | */
|
---|
11 |
|
---|
12 | /// \file H_Marker.cc
|
---|
13 | /// \brief Class defining a marker in the beamline (e.g. for interaction point)
|
---|
14 |
|
---|
15 | // local includes
|
---|
16 | #include "H_Marker.h"
|
---|
17 | #include "H_TransportMatrices.h"
|
---|
18 |
|
---|
19 | void H_Marker::init() {
|
---|
20 | // must be in public section
|
---|
21 | setTypeString();
|
---|
22 | setMatrix(0,MP,QP);
|
---|
23 | return;
|
---|
24 | }
|
---|
25 |
|
---|
26 | void H_Marker::printProperties() const {
|
---|
27 | cout << typestring << name;
|
---|
28 | cout << "\t\t at s = " << fs << endl;
|
---|
29 | if(element_aperture->getType()!=NONE) {
|
---|
30 | cout <<"\t aperture type = " << element_aperture->getTypeString();
|
---|
31 | element_aperture->printProperties();
|
---|
32 | }
|
---|
33 | }
|
---|
34 |
|
---|
35 | void H_Marker::setMatrix(const float eloss, const float p_mass, const float p_charge) {
|
---|
36 | element_mat = driftmat(0);
|
---|
37 | return ;
|
---|
38 | }
|
---|
39 |
|
---|
40 | H_Marker* H_Marker::clone() const {
|
---|
41 | H_Marker* temp_mkr = new H_Marker(name,fs);
|
---|
42 | temp_mkr->setAperture(element_aperture);
|
---|
43 | temp_mkr->setX(xpos);
|
---|
44 | temp_mkr->setY(ypos);
|
---|
45 | temp_mkr->setTX(txpos);
|
---|
46 | temp_mkr->setTY(typos);
|
---|
47 | temp_mkr->setBetaX(betax);
|
---|
48 | temp_mkr->setBetaY(betay);
|
---|
49 | return temp_mkr;
|
---|
50 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.