Fork me on GitHub

source: svn/trunk/Utilities/Hector/src/H_VerticalKicker.cc@ 280

Last change on this file since 280 was 3, checked in by Xavier Rouby, 16 years ago

first commit

File size: 1.1 KB
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_VerticalKicker.cc
13/// \brief Classes aiming at simulating vertical kickers in the beamline
14
15// fk [rad] for kickers !!!!
16
17// local #includes
18#include "H_VerticalKicker.h"
19#include "H_TransportMatrices.h"
20
21void H_VerticalKicker::setMatrix(const float eloss, const float p_mass, const float p_charge) {
22 extern int kickers_on;
23 if(kickers_on) {
24 element_mat = vkickmat(element_length,fk,eloss,p_mass,p_charge);
25 } else{
26 element_mat = driftmat(element_length);
27 }
28 return ;
29}
30
31H_VerticalKicker* H_VerticalKicker::clone() const {
32 H_VerticalKicker* temp_kick = new H_VerticalKicker(name,fs,fk,element_length);
33 temp_kick->setAperture(element_aperture);
34 temp_kick->setX(xpos);
35 temp_kick->setY(ypos);
36 temp_kick->setTX(txpos);
37 temp_kick->setTY(typos);
38 temp_kick->setBetaX(betax);
39 temp_kick->setBetaY(betay);
40 return temp_kick;
41}
42
43
Note: See TracBrowser for help on using the repository browser.