Changeset 3c40083 in git for external/Hector/H_Aperture.h
- 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_Aperture.h
rf6b9fec r3c40083 2 2 #define _H_Aperture_ 3 3 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 * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 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 */ 21 14 22 15 /// \file H_Aperture.h … … 25 18 // C++ #defines 26 19 #include <string> 27 #include <iostream>28 20 using namespace std; 29 21 30 22 // local #defines 31 enum {NONE=0, RECTANGULAR, ELLIPTIC, CIRCULAR, RECTELLIPSE}; 23 #define NONE 0 24 #define RECTANGULAR 1 25 #define ELLIPTIC 2 26 #define CIRCULAR 3 27 #define RECTELLIPSE 4 32 28 #define NONENAME "None " 33 29 #define RECTANGULARNAME "Rectangle " … … 46 42 H_Aperture(const H_Aperture&); 47 43 H_Aperture& operator=(const H_Aperture&); 48 virtual ~H_Aperture() { }; 49 virtual H_Aperture* clone() const { return new H_Aperture(type_,x1,x2,x3,x4,fx,fy); }; 44 virtual ~H_Aperture() {return;}; 50 45 //@} 51 46 52 47 /// Prints the aperture features 53 //virtual void printProperties() const; 54 void printProperties() const; 48 virtual void printProperties() const; 55 49 /// Draws the aperture shape 56 virtual void draw( const float) const {return;};50 virtual void draw() const {return;}; 57 51 /// Sets the (x,y) position in [m] 58 52 void setPosition(const float,const float); … … 60 54 virtual bool isInside(const float, const float) const; 61 55 /// Returns the (int) type of aperture 62 inline int getType() const {return type _;};56 inline int getType() const {return type;}; 63 57 /// Returns the (string) type of the aperture 64 58 inline const string getTypeString() const { return aptypestring; } … … 67 61 protected: 68 62 /// Aperture shape (either RECTANGULAR or ELLIPTIC or ...) 69 int type_; 63 int type; 64 /// Aperture shape string 65 string aptypestring; 66 70 67 /// Aperture geometrical sizes (length/width or great/small radii) [m] 71 68 //@{ 72 69 float x1, x2, x3, x4; 73 70 //@} 71 74 72 /// Horizontal coordinate of the aperture center [m] (from the nominal beam position). 75 73 //@{ 76 74 float fx, fy; 77 75 //@} 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); 76 /// Sets the name of the aperture from its type. 77 void setApertureString(); 86 78 }; 87 79 88 89 80 #endif
Note:
See TracChangeset
for help on using the changeset viewer.