Fork me on GitHub

source: git/external/Hector/H_VerticalQuadrupole.cc@ f6b9fec

ImprovedOutputFile Timing dual_readout llp
Last change on this file since f6b9fec was 5b822e5, checked in by pavel <pavel@…>, 10 years ago

add Hector module

  • Property mode set to 100644
File size: 2.0 KB
RevLine 
[5b822e5]1 /* * * * * * * * * * * * * * * * * * * * * * * * * * * *
2 * *
3* --<--<-- A fast simulator --<--<-- *
4* / --<--<-- of particle --<--<-- *
5* ----HECTOR----< *
6* \ -->-->-- transport through -->-->-- *
7* -->-->-- generic beamlines -->-->-- *
8* *
9* JINST 2:P09005 (2007) *
10* X Rouby, J de Favereau, K Piotrzkowski (CP3) *
11* http://www.fynu.ucl.ac.be/hector.html *
12* *
13* Center for Cosmology, Particle Physics and Phenomenology *
14* Universite catholique de Louvain *
15* Louvain-la-Neuve, Belgium *
16 * *
17 * * * * * * * * * * * * * * * * * * * * * * * * * * * */
18
19/// \file H_VerticalQuadrupole.cc
20/// \brief Vertically focussing quadrupoles
21
22// local #includes
23#include "H_VerticalQuadrupole.h"
24
25void H_VerticalQuadrupole::setMatrix(const float eloss, const float p_mass, const float p_charge) {
26 if (fk<0) { if(VERBOSE) cout<<"<H_VerticalQuadrupole> ERROR : k1 should be > 0 for H_VerticalQuadrupole (" << name << ")!"<<endl; }
27 if (fk !=0 ) element_mat = vquadmat(element_length,fk,eloss, p_mass,p_charge);
28 else {
29 element_mat = driftmat(element_length);
30 if(VERBOSE) cout<<"<H_VerticalQuadrupole> WARNING : k1= 0, drift-like quadrupole (" << name << ") !" << endl;
31 }
32 return ;
33}
34
35H_VerticalQuadrupole* H_VerticalQuadrupole::clone() const {
36 H_VerticalQuadrupole* temp_quad = new H_VerticalQuadrupole(name,fs,fk,element_length);
37 temp_quad->setAperture(element_aperture);
38 temp_quad->setX(xpos);
39 temp_quad->setY(ypos);
40 temp_quad->setTX(txpos);
41 temp_quad->setTY(typos);
42 temp_quad->setBetaX(betax);
43 temp_quad->setBetaY(betay);
44 return temp_quad;
45}
Note: See TracBrowser for help on using the repository browser.