Changeset 281 in svn for trunk/Utilities/Hector/include/H_Aperture.h
- Timestamp:
- Mar 1, 2009, 3:56:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Hector/include/H_Aperture.h
r216 r281 2 2 #define _H_Aperture_ 3 3 4 /* 5 ---- Hector the simulator ---- 6 A fast simulator of particles through generic beamlines. 7 J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be 8 9 http://www.fynu.ucl.ac.be/hector.html 10 11 Centre de Physique des Particules et de Phénoménologie (CP3) 12 Université Catholique de Louvain (UCL) 13 */ 4 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * 5 * * 6 * --<--<-- A fast simulator --<--<-- * 7 * / --<--<-- of particle --<--<-- * 8 * ----HECTOR----< * 9 * \ -->-->-- transport through -->-->-- * 10 * -->-->-- generic beamlines -->-->-- * 11 * * 12 * JINST 2:P09005 (2007) * 13 * X Rouby, J de Favereau, K Piotrzkowski (CP3) * 14 * http://www.fynu.ucl.ac.be/hector.html * 15 * * 16 * Center for Cosmology, Particle Physics and Phenomenology * 17 * Universite catholique de Louvain * 18 * Louvain-la-Neuve, Belgium * 19 * * 20 * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 14 21 15 22 /// \file H_Aperture.h … … 18 25 // C++ #defines 19 26 #include <string> 27 #include <iostream> 20 28 using namespace std; 21 29 22 30 // local #defines 23 #define NONE 0 24 #define RECTANGULAR 1 25 #define ELLIPTIC 2 26 #define CIRCULAR 3 27 #define RECTELLIPSE 4 31 enum {NONE=0, RECTANGULAR, ELLIPTIC, CIRCULAR, RECTELLIPSE}; 28 32 #define NONENAME "None " 29 33 #define RECTANGULARNAME "Rectangle " … … 43 47 H_Aperture& operator=(const H_Aperture&); 44 48 virtual ~H_Aperture() { }; 45 virtual H_Aperture* clone() const { return new H_Aperture(type ,x1,x2,x3,x4,fx,fy); };49 virtual H_Aperture* clone() const { return new H_Aperture(type_,x1,x2,x3,x4,fx,fy); }; 46 50 //@} 47 51 48 52 /// Prints the aperture features 49 virtual void printProperties() const; 53 //virtual void printProperties() const; 54 void printProperties() const; 50 55 /// Draws the aperture shape 51 56 virtual void draw(const float scale=1) const {return;}; … … 55 60 virtual bool isInside(const float, const float) const; 56 61 /// Returns the (int) type of aperture 57 inline int getType() const {return type ;};62 inline int getType() const {return type_;}; 58 63 /// Returns the (string) type of the aperture 59 64 inline const string getTypeString() const { return aptypestring; } … … 62 67 protected: 63 68 /// Aperture shape (either RECTANGULAR or ELLIPTIC or ...) 64 int type; 65 /// Aperture shape string 66 string aptypestring; 67 69 int type_; 68 70 /// Aperture geometrical sizes (length/width or great/small radii) [m] 69 71 //@{ 70 72 float x1, x2, x3, x4; 71 73 //@} 72 73 74 /// Horizontal coordinate of the aperture center [m] (from the nominal beam position). 74 75 //@{ 75 76 float fx, fy; 76 77 //@} 77 /// Sets the name of the aperture from its type. 78 void setApertureString(); 78 /// Aperture shape string 79 string aptypestring; 80 // Sets the name of the aperture from its type. 81 //void setApertureString(); 82 /// Gets the name of the aperture from its type. 83 const string getApertureString() const; 84 85 friend std::ostream& operator<< (std::ostream& os, const H_Aperture& ap); 79 86 }; 80 87 88 81 89 #endif
Note:
See TracChangeset
for help on using the changeset viewer.