Fork me on GitHub

source: svn/trunk/Utilities/Hector/src/H_RectangularDipole.cc@ 91

Last change on this file since 91 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_RectangularDipole.cc
13/// \brief Classes aiming at simulating LHC beam rectangular dipoles
14
15#include "H_RectangularDipole.h"
16#include "H_TransportMatrices.h"
17
18void H_RectangularDipole::setMatrix(const float eloss, const float p_mass, const float p_charge) {
19 if (fk !=0 ) element_mat = rdipmat(element_length,fk,eloss,p_mass,p_charge);
20 else {
21 element_mat = driftmat(element_length);
22 if(VERBOSE) cout<<"<H_RectangularDipole> WARNING : k0= 0, drift-like dipole (" << name << ") !" << endl;
23 }
24 return ;
25}
26
27H_RectangularDipole* H_RectangularDipole::clone() const {
28 H_RectangularDipole* temp_dip = new H_RectangularDipole(name,fs,fk,element_length);
29 temp_dip->setAperture(element_aperture);
30 temp_dip->setX(xpos);
31 temp_dip->setY(ypos);
32 temp_dip->setTX(txpos);
33 temp_dip->setTY(typos);
34 temp_dip->setBetaX(betax);
35 temp_dip->setBetaY(betay);
36 return temp_dip;
37}
38
Note: See TracBrowser for help on using the repository browser.