[1360] | 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_Kicker.cc
|
---|
| 20 | /// \brief Classes aiming at simulating kickers in LHC beamline.
|
---|
| 21 |
|
---|
| 22 | // local #includes
|
---|
| 23 | #include "H_OpticalElement.h"
|
---|
| 24 | #include "H_Kicker.h"
|
---|
| 25 |
|
---|
| 26 | void H_Kicker::init() {
|
---|
| 27 | // needed for call from H- and V-Kickers constructor
|
---|
| 28 | // must be in public section
|
---|
| 29 | setTypeString();
|
---|
| 30 | if (fk !=0 ) {
|
---|
| 31 | setMatrix(0,MP,QP);
|
---|
| 32 | }
|
---|
| 33 | return;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | std::ostream& operator<< (std::ostream& os, const H_Kicker& el) {
|
---|
| 37 | os << el.typestring << el.name <<"\t at s = "<< el.fs <<"\t length = "<< el.element_length;
|
---|
| 38 | os<<"\t k0 = "<< el.fk <<endl;
|
---|
| 39 | if(el.element_aperture->getType()!=NONE) {
|
---|
| 40 | os << *(el.element_aperture) << endl;
|
---|
| 41 | }
|
---|
| 42 |
|
---|
| 43 | if(el.element_length<0 && VERBOSE) os<<"<H_Kicker> ERROR : Interpenetration of elements !"<<endl;
|
---|
| 44 | else if(el.element_length==0 && VERBOSE) os<<"<H_Kicker> WARNING : 0-length "<< el.name << " !" << endl;
|
---|
| 45 | return os;
|
---|
| 46 | }
|
---|