/* ---- Hector the simulator ---- A fast simulator of particles through generic beamlines. J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be http://www.fynu.ucl.ac.be/hector.html Centre de Physique des Particules et de Phénoménologie (CP3) Université Catholique de Louvain (UCL) */ /// \file H_RomanPot.cc /// \brief Roman pot class // local #includes #include "H_RomanPot.h" #include "H_RectangularAperture.h" #include "H_TransportMatrices.h" void H_RomanPot::init() { // must be in public section setTypeString(); setMatrix(0,MP,QP); return; } H_RomanPot::H_RomanPot(const double s, const double app) :H_Drift(s,RP_LENGTH){ type = RP; init(); if(element_aperture) delete element_aperture; element_aperture = new H_RectangularAperture(app,RP_HEIGHT,0,0); } H_RomanPot::H_RomanPot(const string& nameE, const double s, const double app) :H_Drift(nameE,s,RP_LENGTH){ type = RP; init(); if(element_aperture) delete element_aperture; element_aperture = new H_RectangularAperture(app,RP_HEIGHT,0,0); } void H_RomanPot::printProperties() const { cout << typestring << name; cout << "\t\t at s = " << fs; if(element_aperture->getType()!=NONE) { cout <<"\t aperture type = " << element_aperture->getTypeString(); element_aperture->printProperties(); } cout<setAperture(element_aperture); temp_rp->setX(xpos); temp_rp->setY(ypos); temp_rp->setTX(txpos); temp_rp->setTY(typos); temp_rp->setBetaX(betax); temp_rp->setBetaY(betay); return temp_rp; }