Changeset 281 in svn for trunk/Utilities/Hector/src/H_EllipticAperture.cc
- Timestamp:
- Mar 1, 2009, 3:56:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Hector/src/H_EllipticAperture.cc
r3 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_EllipticAperture.cc … … 25 32 using namespace std; 26 33 27 H_EllipticAperture::H_EllipticAperture(const float l, const float h, const float posx, const float posy) :H_Aperture(ELLIPTIC,l,h,0,0,posx,posy) { 34 H_EllipticAperture::H_EllipticAperture(const int type, const float l, const float h, const float posx, const float posy) : 35 H_Aperture(type,l,h,0,0,posx,posy) { 36 /// @param type is the aperture type (ELLIPTIC or CIRCULAR) 37 /// @param l, h are the length and height of the elliptic shape 38 /// @param posx, posy are the (x,y) coordinates of the center of the ellipse 39 40 if (type!= ELLIPTIC && type != CIRCULAR) { 41 cout << "Warning: trying to define an EllipticalAperture which is neither elliptical nor circular." << endl; 42 cout << "'Elliptical' type forced\n"; 43 type_ = ELLIPTIC; 44 aptypestring = getApertureString(); 45 } 46 } 47 48 H_EllipticAperture::H_EllipticAperture(const float l, const float h, const float posx, const float posy) : 49 H_Aperture(ELLIPTIC,l,h,0,0,posx,posy) { 28 50 /// @param l, h are the length and height of the elliptic shape 29 51 /// @param posx, posy are the (x,y) coordinates of the center of the ellipse … … 48 70 } 49 71 50 void H_EllipticAperture::printProperties() const{51 cout<< "Aperture shape:" << getTypeString() << ", ellipse axes : "<<x1<<", "<<x2<<endl;52 cout << " \t Center : " << fx << "," <<fy << endl;53 return ;72 std::ostream& operator<< (std::ostream& os, const H_EllipticAperture& ap) { 73 os<< "Aperture shape:" << ap.aptypestring << ", ellipse axes : "<< ap.x1 <<", " << ap.x2 << endl; 74 os << " \t Center : " << ap.fx << "," << ap.fy << endl; 75 return os; 54 76 }
Note:
See TracChangeset
for help on using the changeset viewer.