Changeset 281 in svn for trunk/Utilities/Hector/src/H_BeamLine.cc
- Timestamp:
- Mar 1, 2009, 3:56:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Hector/src/H_BeamLine.cc
r238 r281 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 */ 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 * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 11 18 12 19 /// \file H_BeamLine.cc … … 39 46 // are opposite to Wille's. See fill() for more details. 40 47 41 H_BeamLine::H_BeamLine(const int si, const float length) : H_AbstractBeamLine(length){ 42 direction = (si >= abs(si)) ? 1 : -1; 43 ips=0; 44 ipx=0; 45 ipy=0; 46 iptx=0; 47 ipty=0; 48 } 49 50 H_BeamLine::H_BeamLine(const H_BeamLine& beam) : H_AbstractBeamLine(beam) { 48 H_BeamLine::H_BeamLine(): H_AbstractBeamLine(), 49 direction(1), ips(0), ipx(0), ipy(0), iptx(0), ipty(0) { 50 } 51 52 H_BeamLine::H_BeamLine(const int si, const float length) : H_AbstractBeamLine(length), 53 direction((si >= abs(si)) ? 1 : -1), ips(0), ipx(0), ipy(0), iptx(0), ipty(0) { 54 } 55 56 H_BeamLine::H_BeamLine(const H_BeamLine& beam) : H_AbstractBeamLine(beam), 57 direction(beam.direction), ips(beam.ips), ipx(beam.ipx), ipy(beam.ipy), iptx(beam.iptx), ipty(beam.ipty) { 58 } 59 60 H_BeamLine& H_BeamLine::operator=(const H_BeamLine& beam) { 61 if(this==&beam) return *this; 62 H_AbstractBeamLine::operator=(beam); // call the mother's operator= 51 63 direction = beam.direction; 52 64 ips = beam.ips; … … 55 67 iptx = beam.iptx; 56 68 ipty = beam.ipty; 57 }58 59 H_BeamLine& H_BeamLine::operator=(const H_BeamLine& beam) {60 if(this==&beam) return *this;61 direction = beam.direction;62 ips = beam.ips;63 ipx = beam.ipx;64 ipy = beam.ipy;65 iptx = beam.iptx;66 ipty = beam.ipty;67 69 return *this; 68 }69 70 void H_BeamLine::findIP(const string& filename) {71 findIP(filename,"IP5");72 return;73 70 } 74 71 … … 125 122 temp[3] = ipty; 126 123 return temp; 127 }128 129 void H_BeamLine::fill(const string& filename) {130 fill(filename,1,"IP5");131 return;132 124 } 133 125
Note:
See TracChangeset
for help on using the changeset viewer.