Fork me on GitHub

source: git/external/Hector/H_HorizontalKicker.cc@ c526439

ImprovedOutputFile Timing dual_readout llp
Last change on this file since c526439 was 5b822e5, checked in by pavel <pavel@…>, 11 years ago

add Hector module

  • Property mode set to 100644
File size: 1.9 KB
Line 
1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * *
3* --<--<-- A fast simulator --<--<-- *
4* / --<--<-- of particle --<--<-- *
5* ----HECTOR----< *
6* \ -->-->-- transport through -->-->-- *
7* -->-->-- generic beamlines -->-->-- *
8* *
9* JINST 2:P09005 (2007) *
10* X Rouby, J de Favereau, K Piotrzkowski (CP3) *
11* http://www.fynu.ucl.ac.be/hector.html *
12* *
13* Center for Cosmology, Particle Physics and Phenomenology *
14* Universite catholique de Louvain *
15* Louvain-la-Neuve, Belgium *
16 * *
17 * * * * * * * * * * * * * * * * * * * * * * * * * * * */
18
19/// \file H_HorizontalKicker.cc
20/// \brief Classes aiming at simulating horizontal kickers in beamline
21
22// fk [rad] for kickers !!!!
23
24// local #includes
25#include "H_HorizontalKicker.h"
26#include "H_TransportMatrices.h"
27
28int kickers_on = 0;
29
30void H_HorizontalKicker::setMatrix(const float eloss, const float p_mass, const float p_charge) {
31 extern int kickers_on;
32 if(kickers_on) {
33 element_mat = hkickmat(element_length,fk,eloss,p_mass,p_charge);
34 } else {
35 element_mat = driftmat(element_length);
36 }
37 return ;
38}
39
40H_HorizontalKicker* H_HorizontalKicker::clone() const {
41 H_HorizontalKicker* temp_kick = new H_HorizontalKicker(name,fs,fk,element_length);
42 temp_kick->setAperture(element_aperture);
43 temp_kick->setX(xpos);
44 temp_kick->setY(ypos);
45 temp_kick->setTX(txpos);
46 temp_kick->setTY(typos);
47 temp_kick->setBetaX(betax);
48 temp_kick->setBetaY(betay);
49 return temp_kick;
50}
51
Note: See TracBrowser for help on using the repository browser.