Fork me on GitHub

Ignore:
Timestamp:
Apr 16, 2014, 3:56:14 PM (10 years ago)
Author:
Pavel Demin
Message:

switch to a more stable Hector version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external/Hector/H_Aperture.h

    r1360 r1365  
    22#define _H_Aperture_
    33
    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*/
    2114
    2215/// \file H_Aperture.h
     
    2518// C++ #defines
    2619#include <string>
    27 #include <iostream>
    2820using namespace std;
    2921
    3022// 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
    3228#define NONENAME        "None       "
    3329#define RECTANGULARNAME "Rectangle  "
     
    4642                H_Aperture(const H_Aperture&);
    4743                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;};
    5045                //@}
    5146
    5247                /// Prints the aperture features
    53                 //virtual void printProperties() const;
    54                 void printProperties() const;
     48                virtual void printProperties() const;
    5549                /// Draws the aperture shape
    56                 virtual void draw(const float) const {return;};
     50                virtual void draw() const {return;};
    5751                /// Sets the (x,y) position in [m]
    5852                void setPosition(const float,const float);
     
    6054                virtual bool isInside(const float, const float) const;
    6155                /// Returns the (int) type of aperture
    62                 inline int getType() const {return type_;};
     56                inline int getType() const {return type;};
    6357                /// Returns the (string) type of the aperture
    6458                inline const string getTypeString() const { return aptypestring; }
     
    6761        protected:
    6862                /// Aperture shape (either RECTANGULAR or ELLIPTIC or ...)
    69                 int type_;
     63                int type;
     64                /// Aperture shape string
     65                string aptypestring;
     66
    7067                /// Aperture geometrical sizes (length/width or great/small radii) [m]
    7168                //@{
    7269                float x1, x2, x3, x4;
    7370                //@}
     71
    7472                /// Horizontal coordinate of the aperture center [m] (from the nominal beam position).
    7573                //@{
    7674                float fx, fy;
    7775                //@}
    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();
    8678};
    8779
    88 
    8980#endif
Note: See TracChangeset for help on using the changeset viewer.