[1365] | 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
|
---|
[1360] | 5 |
|
---|
[1365] | 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 |
|
---|
[1360] | 12 | /// \file H_RomanPot.cc
|
---|
| 13 | /// \brief Roman pot class
|
---|
| 14 |
|
---|
| 15 | // local #includes
|
---|
| 16 | #include "H_RomanPot.h"
|
---|
| 17 | #include "H_RectangularAperture.h"
|
---|
| 18 | #include "H_TransportMatrices.h"
|
---|
| 19 |
|
---|
| 20 | void H_RomanPot::init() {
|
---|
| 21 | // must be in public section
|
---|
| 22 | setTypeString();
|
---|
| 23 | setMatrix(0,MP,QP);
|
---|
| 24 | return;
|
---|
| 25 | }
|
---|
| 26 |
|
---|
[1365] | 27 | H_RomanPot::H_RomanPot(const double s, const double app) :H_OpticalElement(RP,s,0.,RP_LENGTH){
|
---|
[1360] | 28 | init();
|
---|
[1365] | 29 | H_RectangularAperture* rapp = new H_RectangularAperture(app,RP_HEIGHT,0,0);
|
---|
| 30 | setAperture(rapp);
|
---|
[1360] | 31 | }
|
---|
| 32 |
|
---|
[1365] | 33 | H_RomanPot::H_RomanPot(const string nameE, const double s, const double app) :H_OpticalElement(nameE,RP,s,0.,RP_LENGTH){
|
---|
[1360] | 34 | init();
|
---|
[1365] | 35 | H_RectangularAperture* rapp = new H_RectangularAperture(app,RP_HEIGHT,0,0);
|
---|
| 36 | setAperture(rapp);
|
---|
[1360] | 37 | }
|
---|
| 38 |
|
---|
[1365] | 39 | void H_RomanPot::printProperties() const {
|
---|
| 40 | cout << typestring << name;
|
---|
| 41 | cout << "\t\t at s = " << fs;
|
---|
| 42 | if(element_aperture->getType()!=NONE) {
|
---|
| 43 | cout <<"\t aperture type = " << element_aperture->getTypeString();
|
---|
| 44 | element_aperture->printProperties();
|
---|
| 45 | }
|
---|
| 46 |
|
---|
| 47 | cout<<endl;
|
---|
[1360] | 48 | }
|
---|
| 49 |
|
---|
[1365] | 50 | void H_RomanPot::setMatrix(const float eloss, const float p_mass, const float p_charge) const {
|
---|
| 51 | *element_mat = driftmat(0);
|
---|
[1360] | 52 | return ;
|
---|
| 53 | }
|
---|