Fork me on GitHub

source: git/external/Hector/H_RectangularCollimator.cc@ 3e4e196

Last change on this file since 3e4e196 was 3c40083, checked in by pavel <pavel@…>, 11 years ago

switch to a more stable Hector version

  • Property mode set to 100644
File size: 1.7 KB
Line 
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
19void H_RectangularCollimator::init() {
20 // must be in public section
21 setTypeString();
22 setMatrix(0,MP,QP);
23 return;
24}
25
26H_RectangularCollimator::H_RectangularCollimator(const double s, const double l) :H_OpticalElement(RCOLLIMATOR,s,0.,l){
27 init();
28 return;
29}
30
31H_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
36void 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
50void 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}
Note: See TracBrowser for help on using the repository browser.