[5b822e5] | 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 |
|
---|
| 24 | void 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 |
|
---|
| 33 | std::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 | }
|
---|