Changeset 3c40083 in git for external/Hector/H_Quadrupole.cc
- Timestamp:
- Apr 16, 2014, 3:56:14 PM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- 64a4950
- Parents:
- f6b9fec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
external/Hector/H_Quadrupole.cc
rf6b9fec r3c40083 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 * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 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 */ 18 11 19 12 /// \file H_Quadrupole.cc … … 25 18 // needed for call from H- and V-Quadrupoles constructor 26 19 // must be in public section 27 element_mat.ResizeTo(MDIM,MDIM);28 20 setTypeString(); 29 21 setMatrix(0,MP,QP); … … 31 23 } 32 24 33 std::ostream& operator<< (std::ostream& os, const H_Quadrupole& el) { 34 os << el.typestring << el.name << "\t at s = " << el.fs << "\t length = " << el.element_length << "\t k1 = " << el.fk <<endl; 35 if(el.element_aperture->getType()!=NONE) { 36 os << *(el.element_aperture) << endl; 25 void H_Quadrupole::printProperties() const{ 26 cout << typestring; 27 cout << name; 28 cout << "\t at s = " << fs; 29 cout << "\t length = " << element_length; 30 cout << "\t k1 = " << fk; 31 cout<<endl; 32 if(element_aperture->getType()!=NONE) { 33 cout <<"\t aperture type = " << element_aperture->getTypeString(); 34 element_aperture->printProperties(); 37 35 } 38 36 39 if(el.element_length<0 && VERBOSE) os<<"<H_Quadrupole> ERROR : Interpenetration of elements !"<<endl; 40 else if(el.element_length==0 && VERBOSE) os<<"<H_Quadrupole> WARNING : 0-length "<< el.typestring << " !" << endl; 41 return os; 37 if(element_length<0) { if(VERBOSE) cout<<"\t ERROR : Interpenetration of elements !"<<endl; } 38 if(element_length==0) { if(VERBOSE) cout<<"\t WARNING : 0-length "<< typestring << " !" << endl; } 42 39 }
Note:
See TracChangeset
for help on using the changeset viewer.