Fork me on GitHub

Ignore:
Timestamp:
Mar 1, 2009, 3:56:11 PM (16 years ago)
Author:
Xavier Rouby
Message:

new Hector version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/Hector/include/H_Aperture.h

    r216 r281  
    22#define _H_Aperture_
    33
    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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1421
    1522/// \file H_Aperture.h
     
    1825// C++ #defines
    1926#include <string>
     27#include <iostream>
    2028using namespace std;
    2129
    2230// local #defines
    23 #define NONE        0
    24 #define RECTANGULAR 1
    25 #define ELLIPTIC    2
    26 #define CIRCULAR    3
    27 #define RECTELLIPSE 4
     31enum {NONE=0, RECTANGULAR, ELLIPTIC, CIRCULAR, RECTELLIPSE};
    2832#define NONENAME        "None       "
    2933#define RECTANGULARNAME "Rectangle  "
     
    4347                H_Aperture& operator=(const H_Aperture&);
    4448                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); };
    4650                //@}
    4751
    4852                /// Prints the aperture features
    49                 virtual void printProperties() const;
     53                //virtual void printProperties() const;
     54                void printProperties() const;
    5055                /// Draws the aperture shape
    5156                virtual void draw(const float scale=1) const {return;};
     
    5560                virtual bool isInside(const float, const float) const;
    5661                /// Returns the (int) type of aperture
    57                 inline int getType() const {return type;};
     62                inline int getType() const {return type_;};
    5863                /// Returns the (string) type of the aperture
    5964                inline const string getTypeString() const { return aptypestring; }
     
    6267        protected:
    6368                /// Aperture shape (either RECTANGULAR or ELLIPTIC or ...)
    64                 int type;
    65                 /// Aperture shape string
    66                 string aptypestring;
    67 
     69                int type_;
    6870                /// Aperture geometrical sizes (length/width or great/small radii) [m]
    6971                //@{
    7072                float x1, x2, x3, x4;
    7173                //@}
    72 
    7374                /// Horizontal coordinate of the aperture center [m] (from the nominal beam position).
    7475                //@{
    7576                float fx, fy;
    7677                //@}
    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);
    7986};
    8087
     88
    8189#endif
Note: See TracChangeset for help on using the changeset viewer.