Fork me on GitHub

source: git/external/Hector/H_RectangularCollimator.cc@ 43c646a

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 43c646a 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
RevLine 
[3c40083]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*/
[5b822e5]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
[3c40083]26H_RectangularCollimator::H_RectangularCollimator(const double s, const double l) :H_OpticalElement(RCOLLIMATOR,s,0.,l){
27 init();
[5b822e5]28 return;
29}
30
[3c40083]31H_RectangularCollimator::H_RectangularCollimator(const string nameE, const double s, const double l) :H_OpticalElement(nameE,RCOLLIMATOR,s,0.,l){
32 init();
[5b822e5]33 return;
34}
35
[3c40083]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();
[5b822e5]44 }
45
[3c40083]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; }
[5b822e5]48}
49
[3c40083]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);
[5b822e5]53 return ;
54}
Note: See TracBrowser for help on using the repository browser.