Fork me on GitHub

source: svn/trunk/Utilities/Hector/src/H_SectorDipole.cc@ 655

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

new Hector version

File size: 1.8 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_SectorDipole.cc
20/// \brief Classes aiming at simulating sector dipoles
21
22#include "H_SectorDipole.h"
23#include "H_TransportMatrices.h"
24
25void H_SectorDipole::setMatrix(const float eloss, const float p_mass, const float p_charge) {
26 if (fk !=0 ) element_mat = sdipmat(element_length,fk,eloss,p_mass,p_charge);
27 else {
28 element_mat = driftmat(element_length);
29 if(VERBOSE) cout<<"<H_SectorDipole> WARNING : k0= 0, drift-like dipole (" << name << ") !" << endl;
30 }
31 return ;
32}
33
34H_SectorDipole* H_SectorDipole::clone() const {
35 H_SectorDipole* temp_dip = new H_SectorDipole(name,fs,fk,element_length);
36 temp_dip->setAperture(element_aperture);
37 temp_dip->setX(xpos);
38 temp_dip->setY(ypos);
39 temp_dip->setTX(txpos);
40 temp_dip->setTY(typos);
41 temp_dip->setBetaX(betax);
42 temp_dip->setBetaY(betay);
43 return temp_dip;
44}
45
Note: See TracBrowser for help on using the repository browser.