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_RectangularCollimator.cc
|
---|
13 | /// \brief R-Collimators for the LHC beamline.
|
---|
14 |
|
---|
15 | // local #includes
|
---|
16 | #include "H_RectangularCollimator.h"
|
---|
17 | #include "H_TransportMatrices.h"
|
---|
18 |
|
---|
19 | void H_RectangularCollimator::init() {
|
---|
20 | // must be in public section
|
---|
21 | setTypeString();
|
---|
22 | setMatrix(0,MP,QP);
|
---|
23 | return;
|
---|
24 | }
|
---|
25 |
|
---|
26 | H_RectangularCollimator::H_RectangularCollimator(const double s, const double l) :H_OpticalElement(RCOLLIMATOR,s,0.,l){
|
---|
27 | init();
|
---|
28 | return;
|
---|
29 | }
|
---|
30 |
|
---|
31 | H_RectangularCollimator::H_RectangularCollimator(const string nameE, const double s, const double l) :H_OpticalElement(nameE,RCOLLIMATOR,s,0.,l){
|
---|
32 | init();
|
---|
33 | return;
|
---|
34 | }
|
---|
35 |
|
---|
36 | void H_RectangularCollimator::printProperties() const {
|
---|
37 | cout << typestring << name;
|
---|
38 | cout << "\t\t at s = " << fs;
|
---|
39 | cout << "\t length = " << element_length;
|
---|
40 | cout<<endl;
|
---|
41 | if(element_aperture->getType()!=NONE) {
|
---|
42 | cout <<"\t aperture type = " << element_aperture->getTypeString();
|
---|
43 | element_aperture->printProperties();
|
---|
44 | }
|
---|
45 |
|
---|
46 | if(element_length<0) { if(VERBOSE) cout<<"\t ERROR : Interpenetration of elements !"<<endl; }
|
---|
47 | if(element_length==0) { if(VERBOSE) cout<<"\t WARNING : 0-length "<< name << " !" << endl; }
|
---|
48 | }
|
---|
49 |
|
---|
50 | void H_RectangularCollimator::setMatrix(const float eloss, const float p_mass, const float p_charge) const {
|
---|
51 | // cout<<"\t WARNING : H_RectangularCollimator matrices not yet implemented ! " << endl;
|
---|
52 | *element_mat = driftmat(element_length);
|
---|
53 | return ;
|
---|
54 | }
|
---|