[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_RectangularCollimator.cc
|
---|
| 20 | /// \brief R-Collimators for the LHC beamline.
|
---|
| 21 |
|
---|
| 22 | // local #includes
|
---|
| 23 | #include "H_RectangularCollimator.h"
|
---|
| 24 | #include "H_TransportMatrices.h"
|
---|
| 25 |
|
---|
| 26 | void H_RectangularCollimator::init() {
|
---|
| 27 | // must be in public section
|
---|
| 28 | setTypeString();
|
---|
| 29 | setMatrix(0,MP,QP);
|
---|
| 30 | return;
|
---|
| 31 | }
|
---|
| 32 |
|
---|
| 33 | H_RectangularCollimator::H_RectangularCollimator(const double s, const double l) :H_Drift(s,l){
|
---|
| 34 | type = RCOLLIMATOR;
|
---|
| 35 | init();
|
---|
| 36 | return;
|
---|
| 37 | }
|
---|
| 38 |
|
---|
| 39 | H_RectangularCollimator::H_RectangularCollimator(const string& nameE, const double s, const double l) :H_Drift(nameE,s,l){
|
---|
| 40 | type = RCOLLIMATOR;
|
---|
| 41 | init();
|
---|
| 42 | return;
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | std::ostream& operator<< (std::ostream& os, const H_RectangularCollimator& el) {
|
---|
| 46 | os << el.typestring << el.name << "\t\t at s = " << el.fs << "\t length = " << el.element_length <<endl;
|
---|
| 47 | if(el.element_aperture->getType()!=NONE) {
|
---|
| 48 | os << *(el.element_aperture) << endl;
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | if(el.element_length<0 && VERBOSE) os <<"<H_RectangularCollimator> ERROR : Interpenetration of elements !"<<endl;
|
---|
| 52 | else if(el.element_length==0 && VERBOSE) os <<"<H_RectangularCollimator> WARNING : 0-length "<< el.name << " !" << endl;
|
---|
| 53 | return os;
|
---|
| 54 | }
|
---|
| 55 |
|
---|
| 56 | //void H_RectangularCollimator::setMatrix(const float eloss, const float p_mass, const float p_charge) {
|
---|
| 57 | void H_RectangularCollimator::setMatrix(const float , const float , const float ) {
|
---|
| 58 | element_mat = driftmat(element_length);
|
---|
| 59 | return ;
|
---|
| 60 | }
|
---|
| 61 |
|
---|
| 62 | H_RectangularCollimator* H_RectangularCollimator::clone() const {
|
---|
| 63 | H_RectangularCollimator* temp_coll = new H_RectangularCollimator(name,fs,element_length);
|
---|
| 64 | temp_coll->setAperture(element_aperture);
|
---|
| 65 | temp_coll->setX(xpos);
|
---|
| 66 | temp_coll->setY(ypos);
|
---|
| 67 | temp_coll->setTX(txpos);
|
---|
| 68 | temp_coll->setTY(typos);
|
---|
| 69 | temp_coll->setBetaX(betax);
|
---|
| 70 | temp_coll->setBetaY(betay);
|
---|
| 71 | return temp_coll;
|
---|
| 72 | }
|
---|
| 73 |
|
---|