Fork me on GitHub

source: svn/trunk/Utilities/Hector/src/H_HorizontalKicker.cc@ 176

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

first commit

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