Fork me on GitHub

source: svn/trunk/Utilities/Hector/src/H_Quadrupole.cc@ 186

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