Fork me on GitHub

source: svn/trunk/Utilities/Hector/src/H_Dipole.cc@ 213

Last change on this file since 213 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_Dipole.cc
13/// \brief Class aiming at simulating LHC beam dipoles
14
15//local includes
16#include "H_Dipole.h"
17
18void H_Dipole::init() {
19 // needed for call from R- and S-Dipoles constructor
20 // must be in public section
21 element_mat.ResizeTo(MDIM,MDIM);
22 setTypeString();
23 if (fk !=0 ) setMatrix(0,MP,QP);
24 return;
25}
26
27void H_Dipole::printProperties() const {
28 cout << typestring;
29 cout << name;
30 cout<<"\t at s = "<< fs;
31 cout<<"\t length = "<< element_length;
32 cout<<"\t k0 = "<<fk;
33 cout<<endl;
34 if(element_aperture->getType()!=NONE) {
35 cout <<"\t aperture type = " << element_aperture->getTypeString();
36 element_aperture->printProperties();
37 }
38
39 if(element_length<0) { if(VERBOSE) cout<<"<H_Dipole> ERROR : Interpenetration of elements !"<<endl; }
40 if(element_length==0) { if(VERBOSE) cout<<"<H_Dipole> WARNING : 0-length "<< name << " !" << endl; }
41}
Note: See TracBrowser for help on using the repository browser.