Fork me on GitHub

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

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

new Hector version

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_Quadrupole.cc
20/// \brief Classes aiming at simulating LHC beam quadrupoles.
21
22#include "H_Quadrupole.h"
23
24void H_Quadrupole::init() {
25 // needed for call from H- and V-Quadrupoles constructor
26 // must be in public section
27 element_mat.ResizeTo(MDIM,MDIM);
28 setTypeString();
29 setMatrix(0,MP,QP);
30 return;
31}
32
33std::ostream& operator<< (std::ostream& os, const H_Quadrupole& el) {
34 os << el.typestring << el.name << "\t at s = " << el.fs << "\t length = " << el.element_length << "\t k1 = " << el.fk <<endl;
35 if(el.element_aperture->getType()!=NONE) {
36 os << *(el.element_aperture) << endl;
37 }
38
39 if(el.element_length<0 && VERBOSE) os<<"<H_Quadrupole> ERROR : Interpenetration of elements !"<<endl;
40 else if(el.element_length==0 && VERBOSE) os<<"<H_Quadrupole> WARNING : 0-length "<< el.typestring << " !" << endl;
41 return os;
42}
Note: See TracBrowser for help on using the repository browser.