Fork me on GitHub

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

new Hector version

File:
1 edited

Legend:

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

    r216 r281  
    22#define _H_OpticalElement_
    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_OpticalElement.h
     
    3643
    3744        // type #defines
    38 #define DRIFT        1
    39 #define RDIPOLE      2
    40 #define SDIPOLE      3
    41 #define VQUADRUPOLE  4
    42 #define HQUADRUPOLE  5
    43 #define VKICKER      6
    44 #define HKICKER      7
    45 #define RCOLLIMATOR  8
    46 #define ECOLLIMATOR  9
    47 #define CCOLLIMATOR 10
    48 #define RP          11
    49 #define IP          12
    50 #define MARKER      13
     45enum {DRIFT=1, RDIPOLE, SDIPOLE, VQUADRUPOLE, HQUADRUPOLE, VKICKER, HKICKER, RCOLLIMATOR, ECOLLIMATOR, CCOLLIMATOR, RP, IP, MARKER};
    5146
    5247        // typestring[30] #defines
     
    8277                //@}
    8378                ///     Prints the element features
    84                 virtual void printProperties() const ;
     79                virtual void printProperties() const { cout << *this; return;};
    8580                ///     Shows the element transport matrix
    8681                void showMatrix() const ;
     
    9085                void setAperture(const H_Aperture*);
    9186                ///     Ordering operator acting on the s coordinate
    92                 inline bool operator>(const H_OpticalElement tocomp) const {if(fs>tocomp.getS()) { return true; } else { return false; }};
     87                inline bool operator>(const H_OpticalElement& tocomp) const {return ( fs>tocomp.getS() ); };
    9388                ///     Ordering operator acting on the s coordinate
    94                 inline bool operator<(const H_OpticalElement tocomp) const {if(fs<tocomp.getS()) { return true; } else { return false; }};
     89                inline bool operator<(const H_OpticalElement& tocomp) const {return ( fs<tocomp.getS() ); };
    9590                ///     Copy operator
    9691                H_OpticalElement& operator=(const H_OpticalElement&);
     
    178173                //@}
    179174                virtual H_OpticalElement* clone() const { return new H_OpticalElement();};
    180                 TVectorD getHitPosition(TVectorD, double, double, double);
     175                TVectorD getHitPosition(const TVectorD& , const double, const double, const double);
    181176
    182177
     
    210205                virtual void setTypeString() {return;};
    211206                /// Optical element transport matrix.
    212             virtual void setMatrix(const float, const float, const float) { cout<<"dummy setmatrix"<<endl; return;};
     207                virtual void setMatrix(const float, const float, const float) { cout<<"dummy setmatrix"<<endl; return;};
    213208                /// Optical element transport matrix.
    214209                TMatrix element_mat;
    215210                /// Optical element aperture.
    216211                H_Aperture* element_aperture;
     212
     213        friend std::ostream& operator<< (std::ostream& os, const H_OpticalElement& el);
    217214};
    218215
Note: See TracChangeset for help on using the changeset viewer.