Fork me on GitHub

Changeset 281 in svn for trunk/Utilities/Hector/include


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

new Hector version

Location:
trunk/Utilities/Hector/include
Files:
27 edited

Legend:

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

    r216 r281  
    22#define _H_AbstractBeamLine_
    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
     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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    821
    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 */
    1422
    1523/// \file H_AbstractBeamLine.h
    1624/// \brief Class aiming at simulating the LHC beamline.
    1725///
    18 /// Units : angles [ï¿œrad], distances [ï¿œm], energies [GeV], c=[1].
     26/// Units : angles [urad], distances [um], energies [GeV], c=[1].
    1927
    2028        /// default length of the beam line
     
    3947
    4048        public:
    41                 void init(const float );
    4249                ///     Constructors, destructor and operator
    4350                //@{
     
    5057                //@}
    5158                ///     Adds an element to the beamline
    52                 //@{
    5359                void add(H_OpticalElement *);
    54                 void add(H_OpticalElement &);
    55                 //@}
    5660                ///     Returns the (float) length of the beamline
    57                 inline float getLength() const { return beam_length;};
     61                const float getLength() const { return beam_length;};
    5862                ///     Returns the (int) number of optics element of the beamline, including drifts
    59                 inline int getNumberOfElements() const { return (int)elements.size();};
     63                const unsigned int getNumberOfElements() const { return elements.size();};
    6064                ///     Returns the transport matrix for the whole beam
    6165                const TMatrix getBeamMatrix() const;
     
    124128
    125129        private:
    126                 /// list of all optics elements, including drifts
    127                 vector<H_OpticalElement*> elements;
    128130                /// list of matrices, 1 matrix = the transport till the end of each element
    129131                vector<TMatrix> matrices;
    130132                /// transport matrix for the whole beam
    131                 TMatrix beam_mat;                       
     133                TMatrix beam_mat;
     134                /// list of all optics elements, including drifts
     135                vector<H_OpticalElement*> elements;
    132136                /// Orderting method for the vector of H_OpticalElement*
    133                 struct ordering{ bool operator()(H_OpticalElement* el1, H_OpticalElement* el2) const { return (*el1 < *el2);}};
     137                struct ordering{ bool operator()(const H_OpticalElement* el1, const H_OpticalElement* el2) const {return (*el1 < *el2);}};
     138                // private method for copying the contents of "elements"
     139                void cloneElements(const H_AbstractBeamLine&);
    134140
    135141        protected:
     142                void init(const float );
    136143                /// total length of the beamline
    137144                float beam_length;
     145        friend std::ostream& operator<< (std::ostream& os, const H_AbstractBeamLine& be);
    138146};
    139147
  • 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
  • trunk/Utilities/Hector/include/H_Beam.h

    r236 r281  
    22#define _H_Beam_
    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_Beam.h
     
    2734#include "TGraphErrors.h"
    2835#include "TMultiGraph.h"
     36#include "TMath.h"
    2937
    3038// local #includes
     
    5664        //@}
    5765        /// Fills the beam with particles in given position/angle/energy        intervals (flat distribution)
    58                 //void particleGun(const unsigned int Number_of_particles, const float E_min, const float E_max, const float fs_min, const float fs_max, const float fx_min, const float fx_max, const float fy_min, const float fy_max, const float tx_min, const float tx_max, const float ty_min, const float ty_max, const float p_mass, const double p_charge);
    59                 void particleGun(const unsigned int Number_of_particles, const float E_min=BE, const float E_max=BE, const float fs_min=0, const float fs_max=0, const float fx_min=0, const float fx_max=0, const float fy_min=0, const float fy_max=0, const float tx_min=-pi/2., const float tx_max=pi/2., const float ty_min=-pi/2., const float ty_max=pi/2., const float p_mass=MP, const double p_charge=QP, const bool flat = true);
     66                void particleGun(const unsigned int Number_of_particles, const float E_min=BE, const float E_max=BE, const float fs_min=0, const float fs_max=0, const float fx_min=0, const float fx_max=0, const float fy_min=0, const float fy_max=0, const float tx_min=-TMath::Pi()/2., const float tx_max=TMath::Pi()/2., const float ty_min=-TMath::Pi()/2., const float ty_max=TMath::Pi()/2., const float p_mass=MP, const double p_charge=QP, const bool flat = true, TRandom* r=gRandom);
    6067
    6168        /// Fills the beam with particles
    62         //@{
    63                 void createBeamParticles(const unsigned int , const double , const double );
    64                 void createBeamParticles(const unsigned int);
    65         //@}
     69                void createBeamParticles(const unsigned int Number_of_particles, const double p_mass=MP, const double p_charge=QP, TRandom* r=gRandom);
    6670        /// Fills the beam with particles with incremental offset and no initial transverse momentum
    6771        //@{
     
    8286                void add(const H_BeamParticle&);
    8387        /// Compute the position of each particle in the beamline
    84         //@{   
    85                 void computePath(const H_AbstractBeamLine *, const bool);
    86                 void computePath(const H_AbstractBeamLine *);
    87         //@}
     88                void computePath(const H_AbstractBeamLine * beamline, const bool NonLinear=false);
    8889        // Photon emission by the particle
    89         // @{
    90                 void emitGamma(const double, const double, const double, const double);
    91                 void emitGamma(const double, const double);
    92         //@}
     90                void emitGamma(const double gee, const double gq2, const double phimin=0, const double phimax=2*TMath::Pi());
    9391        // Propagates the beam until a given s
    9492                void propagate(const float );
     
    146144                void printInitialState() const;
    147145        /// Prints the properties for each particle
    148                 void printProperties() const;
     146                void printProperties() const {cout << *this; return;}
    149147        /// Prints the list of the stopping elements in the beamline
    150148                void printStoppingElements(const vector<H_OpticalElement>&, const vector<int>&) const;
     
    186184                unsigned int Nparticles;
    187185
    188         static const float pi = 3.14159265358979312;
     186        friend std::ostream& operator<< (std::ostream& os, const H_Beam& be);
    189187};
    190188
  • trunk/Utilities/Hector/include/H_BeamLine.h

    r216 r281  
    22#define _H_BeamLine_
    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_BeamLine.h
     
    3239        ///     Constructors and destructor
    3340        //@{
    34                 H_BeamLine():H_AbstractBeamLine() {direction=1; ips=0; };
     41                H_BeamLine();
    3542                H_BeamLine(const H_BeamLine& );
    3643                H_BeamLine(const int, const float);
     
    3946        //@
    4047                ///     Finds the IP position (s) from the MAD table. Should be "IP5" or "IP1".
    41                 //@{
    42                 void findIP(const string&);
    43                 void findIP(const string&, const string&);
    44                 //@}
     48                void findIP(const string& filename, const string& ipname="IP5");
    4549                ///     Reader for the external MAD table
    46                 //@{
    47                 void fill(const string&);
    48                 void fill(const string&, const int, const string& );
    49                 //@}
     50                void fill(const string& filename, const int dir=1, const string& ipname="IP5");
    5051                ///     Returns the IP position (s)
    51                 double getIP() {return ips;};
     52                double getIP() const {return ips;};
    5253                ///             Returns positions and angles of beam at IP
    5354                double* getIPProperties();
  • trunk/Utilities/Hector/include/H_BeamLineParser.h

    r216 r281  
    22#define _H_BeamLineParser_
    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_BeamLineParser.h
  • trunk/Utilities/Hector/include/H_BeamParticle.h

    r237 r281  
    22#define _H_BeamParticle_
    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_BeamParticle.h
     
    2734#include "TVectorD.h"
    2835#include "TLorentzVector.h"
     36#include "TRandom3.h"
    2937
    3038// local #includes
     
    3947
    4048        public:
    41                 void init();
    4249                /// Constructors and Destructor
    4350                //@{
     
    4956                //@}
    5057                /// Smears the (x,y) coordinates of the particle [\f$ \mu m \f$]
    51                 void smearPos(const double, const double);
    52                 /// Smears the (x,y) coordinates of the particle (using default values in parameters.h)
    53                 void smearPos();
     58                void smearPos(const double dx=SX,const double dy=SY, TRandom* r=gRandom);
    5459                /// Smears the (x,y) angular coordinates of the particle [\f$ \mu rad \f$]
    55                 void smearAng(const double, const double);
    56                 /// Smears the (x,y) angular coordinates of the particle (using default values in parameters.h)
    57                 void smearAng();
     60                void smearAng(const double tx=STX, const double ty=STY, TRandom* r=gRandom);
    5861                /// Smears the Energy of the particle [GeV]
    59                 void smearE(const double);
    60                 /// Smears the Energy of the particle (using default values in parameters.h)
    61                 void smearE();
     62                void smearE(const double erre=SBE, TRandom* r=gRandom);
    6263                /// Smears the longitudinal position of the particle [\f$ \mu m \f$]
    63                 void smearS(const double);
    64                 /// Smears the longitudinal position of the particle (using default values in parameters.h)
    65                 void smearS();
     64                void smearS(const double errs=SS, TRandom* r=gRandom);
    6665                /// Sets the energy [GeV].
    6766                void setE(const double);
     
    7372                void setPosition(const double , const double , const double , const double , const double );
    7473                /// Returns the particle mass [GeV]
    75                 double getM() const {return mp;};
     74                const double getM() const {return mp;};
    7675                /// Returns the particle charge [e]
    77                 double getQ() const {return qp;};
     76                const double getQ() const {return qp;};
    7877                /// Returns the current x coordinate [\f$ \mu \f$m]
    79                 double getX() const {return fx;};
     78                const double getX() const {return fx;};
    8079                /// Returns the current y coordinate [\f$ \mu \f$m]
    81                 double getY() const {return fy;};
     80                const double getY() const {return fy;};
    8281                /// Returns the current s coordinate [m]
    83                 inline double getS() const {return fs;};
     82                const double getS() const {return fs;};
    8483                /// Returns the current \f$ \theta_x \f$ angular coordinate [\f$ \mu \f$rad]
    85                 double getTX() const {return thx;};
     84                const double getTX() const {return thx;};
    8685                /// Returns the current \f$ \theta_y \f$ angular coordinate [\f$ \mu \f$rad]
    87                 double getTY() const {return thy;};
     86                const double getTY() const {return thy;};
    8887                /// Returns the current particle energy [GeV]
    89                 inline double getE() const {return energy;};
     88                const double getE() const {return energy;};
    9089                /// Returns all the positions
    9190                vector<TVectorD> getPositions() const {return positions;};
    92                 bool isPhysical() const {return isphysical;};
     91                const bool isPhysical() const {return isphysical;};
    9392                /// \brief Simulates the emission of a photon in a random direction
    9493                ///
     
    9998                /// \f$ Q^{2}_{max} = -2 * \big( \frac{M_{p} E_{\gamma}}{p_{1}+p_{2}} \big) \big[ 1 + \frac{E^{2}_{1} + E^{2}_{2} - M^{2}_{p} }{ E_{1} E_{2} + p_{1} p_{2}} \big]    \f$
    10099                //@{
    101                 void emitGamma(const double, const double, const double, const double);
    102                 void emitGamma(const double, const double);
     100                void emitGamma(const double gee, const double gq2, const double phimin=0, const double phimax=2*TMath::Pi());
    103101                //@}
    104102                /// uses Pythia to generate some inelastic pp->pX collision as background
     
    120118                const TVectorD * getPosition(const int ) const;
    121119                /// Prints the properties of the particle
    122                 void printProperties() const;
     120                void printProperties() const {cout << *this; return;};
    123121                /// Prints the phase vector of the particle
    124122                void printV() const;
     
    126124                const H_OpticalElement * getStoppingElement() const;
    127125                /// Checks if the particle has been stopped in any element of the beamline
    128                 bool stopped(const H_AbstractBeamLine *);
     126                const bool stopped(const H_AbstractBeamLine *);
    129127                /// Returns the StopPosition vector
    130128                inline const TVectorD * getStopPosition() const { return stop_position; };
     
    134132                /// Returns the particle path in the beamline
    135133                TGraph * getPath(const int , const int ) const;
    136                 /// Computes the position of the particle at the end of each element of the beam, without non linear effects
    137                 void computePath(const H_AbstractBeamLine *);
    138134                /// Computes the position of the particle at the end of each element of the beam.
    139                 void computePath(const H_AbstractBeamLine *, const bool);
     135                void computePath(const H_AbstractBeamLine * beam, const bool NonLinear=true);
    140136                /// Computes the position of the particle at the end of each element of the beam.
    141                 void computePath(const H_AbstractBeamLine &, const bool);
     137                void computePath(const H_AbstractBeamLine & beam, const bool NonLinear=true);
    142138                /// Clears H_BeamParticle::positions but keeps the initial vector.
    143139                void resetPath();
    144140
    145141        private:
     142                void init();
    146143                /// Particle mass [GeV]
    147144                double mp;
     
    175172                void addPosition(const double , const double , const double , const double , const double );
    176173
    177                 static const float pi = 3.14159265358979312;
     174        friend std::ostream& operator<< (std::ostream& os, const H_BeamParticle& p);
    178175};
    179176#endif
  • trunk/Utilities/Hector/include/H_CircularAperture.h

    r216 r281  
    22#define _H_CircularAperture_
    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_CircularAperture.h
     
    2633                /// Constructors and destructor
    2734                //@{
    28                 H_CircularAperture():H_EllipticAperture(0,0,0,0) {type = CIRCULAR; setApertureString();}
    29                 H_CircularAperture(const float, const float, const float);
     35                H_CircularAperture():H_EllipticAperture(CIRCULAR,0,0,0,0) {};
     36                H_CircularAperture(const float r, const float posx, const float posy) : H_EllipticAperture(CIRCULAR,r,r,posx,posy) {};
     37                /// @param r is the radius of the circular shape
     38                /// @param posx, posy are the (x,y) coordinates of the center of the circle
    3039                ~H_CircularAperture() {};
    3140                H_CircularAperture* clone() const;
    3241                //@}
    33                 virtual void printProperties() const;
     42        friend std::ostream& operator<< (std::ostream& os, const H_CircularAperture& ap);
    3443};
    3544
  • trunk/Utilities/Hector/include/H_Dipole.h

    r216 r281  
    22/// \brief Class aiming at simulating LHC beam dipoles.
    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#ifndef _H_Dipole_
     
    3037                //@}
    3138                /// Prints the properties of the element
    32                 virtual void printProperties() const;
     39                virtual void printProperties() const { cout << *this; return;};
    3340                virtual H_Dipole* clone() const =0;
    3441                void init();
     
    3744                virtual void setTypeString() =0;
    3845                virtual void setMatrix(const float, const float, const float) = 0;
    39        
     46   
     47        friend std::ostream& operator<< (std::ostream& os, const H_Dipole& el);
    4048};
    4149
  • trunk/Utilities/Hector/include/H_Drift.h

    r216 r281  
    22#define _H_Drift_
    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_Drift.h
     
    3037                ~H_Drift() { };
    3138        //@}
    32                 virtual void printProperties() const;
    3339                void init();
     40                virtual void printProperties() const { cout << *this; return;};
    3441                H_Drift* clone() const;
    3542
     
    3744                virtual void setTypeString() {typestring = DRIFTNAME;};
    3845                virtual void setMatrix(const float, const float, const float) ;
     46        friend std::ostream& operator<< (std::ostream& os, const H_Drift& el);
    3947};
    4048
  • trunk/Utilities/Hector/include/H_EllipticAperture.h

    r216 r281  
    22#define _H_EllipticAperture_
    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_EllipticAperture.h
     
    2633                //@{
    2734                H_EllipticAperture():H_Aperture(ELLIPTIC,0,0,0,0,0,0) {}
     35                H_EllipticAperture(const int, const float, const float, const float, const float);
    2836                H_EllipticAperture(const float, const float, const float, const float);
    2937                ~H_EllipticAperture() {};
     
    3442                /// Draws the aperture shape.
    3543                virtual void draw(const float scale=1) const;
    36                 virtual void printProperties() const;
     44        friend std::ostream& operator<< (std::ostream& os, const H_EllipticAperture& ap);
    3745};
    3846
  • trunk/Utilities/Hector/include/H_HorizontalKicker.h

    r216 r281  
     1#ifndef _H_HorizontalKicker_
     2#define _H_HorizontalKicker_
     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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     21
    122/// \file H_HorizontalKicker.h
    223/// \brief Classes aiming at simulating horizontal kickers in beamline.
    324///
    425/// fk [rad] for kickers !!!!
    5 
    6 /*
    7 ---- Hector the simulator ----
    8    A fast simulator of particles through generic beamlines.
    9    J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
    10 
    11         http://www.fynu.ucl.ac.be/hector.html
    12 
    13    Centre de Physique des Particules et de Phénoménologie (CP3)
    14    Université Catholique de Louvain (UCL)
    15 */
    16 
    17 #ifndef _H_HorizontalKicker_
    18 #define _H_HorizontalKicker_
    1926
    2027// local #includes
  • trunk/Utilities/Hector/include/H_HorizontalQuadrupole.h

    r216 r281  
    22#define _H_HorizontalQuadrupole_
    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_HorizontalQuadrupole.h
  • trunk/Utilities/Hector/include/H_Kicker.h

    r216 r281  
     1#ifndef _H_Kicker_
     2#define _H_Kicker_
     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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     21
    122/// \file H_Kicker.h
    223/// \brief Classes aiming at simulating kickers in LHC beamline.
    324/// fk [rad] for kickers !!!!
    4 
    5 /*
    6 ---- Hector the simulator ----
    7    A fast simulator of particles through generic beamlines.
    8    J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
    9 
    10         http://www.fynu.ucl.ac.be/hector.html
    11 
    12    Centre de Physique des Particules et de Phénoménologie (CP3)
    13    Université Catholique de Louvain (UCL)
    14 */
    15 
    16 #ifndef _H_Kicker_
    17 #define _H_Kicker_
    1825
    1926// local #includes
     
    3138                virtual ~H_Kicker() {};
    3239        //@}
    33         /// prints the kicker properties
    34                 virtual void printProperties() const;
    3540                virtual H_Kicker* clone() const = 0;
     41                virtual void printProperties() const { cout << *this; return;};
    3642                void init();
    3743
     
    3945                virtual void setTypeString() = 0;
    4046                virtual void setMatrix(const float, const float, const float) = 0;
     47        friend std::ostream& operator<< (std::ostream& os, const H_Kicker& el);
    4148};
    4249
  • trunk/Utilities/Hector/include/H_Marker.h

    r216 r281  
    22#define _H_Marker_
    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_Marker.h
     
    3037                ~H_Marker() { };
    3138        //@}
    32                 virtual void printProperties() const;
    3339                H_Marker* clone() const ;
    3440                void init();
     
    3743                virtual void setTypeString() {typestring = MARKERNAME;};
    3844                virtual void setMatrix(const float , const float, const float) ;
     45        friend std::ostream& operator<< (std::ostream& os, const H_Marker& el);
    3946};
    4047
  • 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
  • trunk/Utilities/Hector/include/H_Parameters.h

    r235 r281  
    22#define _Hector_parameters_
    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         J.~de Favereau, X.~Rouby and K.~Piotrzkowski,
    11         Hector, a fast simulator for the transport of particles in beamlines,
    12         JINST 2, P09005 (2007)
    13         arXiv:0707.1198 [physics.acc-ph]
    14 
    15    Centre de Physique des Particules et de Phénoménologie (CP3)
    16    Université Catholique de Louvain (UCL)
    17 */
     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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1821
    1922/// \file H_Parameters.h
  • trunk/Utilities/Hector/include/H_Quadrupole.h

    r216 r281  
    22#define _H_Quadrupole_
    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_Quadrupole.h
     
    3037                virtual ~H_Quadrupole() {};
    3138        //@}   
    32                 virtual void printProperties() const;
    3339                virtual H_Quadrupole* clone() const =0 ;
     40                virtual void printProperties() const { cout << *this; return;};
    3441                void init();
    3542
     
    3845                virtual void setMatrix(const float, const float, const float) = 0;
    3946               
     47        friend std::ostream& operator<< (std::ostream& os, const H_Quadrupole& el);
    4048};
    4149
  • trunk/Utilities/Hector/include/H_RecRPObject.h

    r3 r281  
    22#define _H_RecRPObject_
    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_RecRPObject.h
     
    2229#define NOT_YET_COMPUTED -666
    2330
     31/// Reconstruction of parameters at IP using measurements with roman pots
    2432class H_RecRPObject {
    2533        public:
    2634                H_RecRPObject();
    27                 H_RecRPObject(const float, const float, H_AbstractBeamLine* );
     35                H_RecRPObject(const float, const float, const H_AbstractBeamLine* );
    2836                H_RecRPObject(const H_RecRPObject&);
    2937                H_RecRPObject& operator=(const H_RecRPObject&);
    30                 ~H_RecRPObject() {if(f_1) delete f_1; if(f_2) delete f_2; if(g_1) delete g_1; if(g_2) delete g_2; if(d_1) delete d_1; if(d_2) delete d_2; if(k_1) delete k_1; if(k_2) delete k_2; if(l_1) delete l_1; if(l_2) delete l_2; };
     38                ~H_RecRPObject() {delete f_1; delete f_2; delete g_1; delete g_2;
     39                                  delete d_1; delete d_2; delete k_1; delete k_2;
     40                                  delete l_1; delete l_2;
     41                                  delete thebeam;};
    3142
    3243                inline float getX1() const {return x1;};
     
    6475                TF1* k_1, *k_2;
    6576                TF1* l_1, *l_2;
     77        friend std::ostream& operator<< (std::ostream& os, const H_RecRPObject& rp);
    6678};
    6779
  • trunk/Utilities/Hector/include/H_RectEllipticAperture.h

    r216 r281  
    22#define _H_RectEllipticAperture_
    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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     21
    422/// \file H_RectEllipticAperture.h
    523/// \brief Defines the Rect-Elliptic aperture of beamline elements.
    6 
    7 /*
    8 ---- Hector the simulator ----
    9    A fast simulator of particles through generic beamlines.
    10    J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
    11 
    12         http://www.fynu.ucl.ac.be/hector.html
    13 
    14    Centre de Physique des Particules et de Phénoménologie (CP3)
    15    Université Catholique de Louvain (UCL)
    16 */
    1724
    1825// local #includes
     
    3037                H_RectEllipticAperture* clone() const;
    3138                //@}
    32                 virtual void printProperties() const;
    3339                /// Checks whether the point is inside the aperture or not
    3440                virtual bool isInside(const float, const float) const;
    3541                /// Draws the aperture shape.
    3642                virtual void draw(const float scale=1) const;
     43        friend std::ostream& operator<< (std::ostream& os, const H_RectEllipticAperture& ap);
    3744};
    3845
  • trunk/Utilities/Hector/include/H_RectangularAperture.h

    r216 r281  
    22#define _H_RectangularAperture_
    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_RectangularAperture.h
     
    3441                /// Draws the aperture shape.
    3542                virtual void draw(const float scale=1) const;
    36                 virtual void printProperties() const;
     43        friend std::ostream& operator<< (std::ostream& os, const H_RectangularAperture& ap);
    3744};
    3845
  • trunk/Utilities/Hector/include/H_RectangularCollimator.h

    r216 r281  
    22#define _H_RectangularCollimator_
    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_RectangularCollimator.h
     
    3037                ~H_RectangularCollimator() {};
    3138        //@}
    32                 virtual void printProperties() const;
    3339                H_RectangularCollimator* clone() const;
    3440                void init();
     
    3642                virtual void setTypeString() {typestring=RCOLLIMATORNAME;};
    3743                virtual void setMatrix(const float, const float, const float) ;
    38 
     44       
     45        friend std::ostream& operator<< (std::ostream& os, const H_RectangularCollimator& el);
    3946};
    4047
  • trunk/Utilities/Hector/include/H_RectangularDipole.h

    r216 r281  
    22#define _H_RectangularDipole_
    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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     21
    422/// \file H_RectangularDipole.h
    523/// \brief Classes aiming at simulating LHC beam rectangular dipoles.
    6 
    7 /*
    8 ---- Hector the simulator ----
    9    A fast simulator of particles through generic beamlines.
    10    J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
    11 
    12         http://www.fynu.ucl.ac.be/hector.html
    13 
    14    Centre de Physique des Particules et de Phénoménologie (CP3)
    15    Université Catholique de Louvain (UCL)
    16 */
    1724
    1825#include "H_Dipole.h"
  • trunk/Utilities/Hector/include/H_RomanPot.h

    r216 r281  
    22#define _H_RomanPot_
    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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     21
    422/// \file H_RomanPot.h
    523/// \brief Roman pot class
    6 
    7 /*
    8 ---- Hector the simulator ----
    9    A fast simulator of particles through generic beamlines.
    10    J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
    11 
    12         http://www.fynu.ucl.ac.be/hector.html
    13 
    14    Centre de Physique des Particules et de Phénoménologie (CP3)
    15    Université Catholique de Louvain (UCL)
    16 */
    1724
    1825// local #includes
     
    3239                ~H_RomanPot() {};
    3340        //@}
    34                 virtual void printProperties() const;
    3541                H_RomanPot* clone() const ;
    3642                void init();
     
    3844                virtual void setTypeString() {typestring=RPNAME;};
    3945                virtual void setMatrix(const float, const float, const float) ;
    40 
     46        friend std::ostream& operator<< (std::ostream& os, const H_RomanPot& el);
    4147};
    4248
  • trunk/Utilities/Hector/include/H_SectorDipole.h

    r216 r281  
    1 /// \file H_SectorDipole.h
    2 /// \brief Classes aiming at simulating sector dipoles.
    3 
    41#ifndef _H_SectorDipole_
    52#define _H_SectorDipole_
    63
    7 /*
    8 ---- Hector the simulator ----
    9    A fast simulator of particles through generic beamlines.
    10    J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
     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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1121
    12         http://www.fynu.ucl.ac.be/hector.html
    13 
    14    Centre de Physique des Particules et de Phénoménologie (CP3)
    15    Université Catholique de Louvain (UCL)
    16 */
     22/// \file H_SectorDipole.h
     23/// \brief Classes aiming at simulating sector dipoles.
    1724
    1825#include "H_Dipole.h"
     
    2633                H_SectorDipole():H_Dipole(SDIPOLE,0.,0.,0.) {init();}
    2734                H_SectorDipole(const double s, const double k, const double l) :H_Dipole(SDIPOLE,s,k,l){init();}
    28                 H_SectorDipole(const string nameE, const double s, const double k, const double l) :H_Dipole(nameE,SDIPOLE,s,k,l){init();}
     35                H_SectorDipole(const string& nameE, const double s, const double k, const double l) :H_Dipole(nameE,SDIPOLE,s,k,l){init();}
    2936                ~H_SectorDipole() {};
    3037                //@}
  • trunk/Utilities/Hector/include/H_TransportMatrices.h

    r3 r281  
    22#define _H_TransportMatrices_
    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_TransportMatrices.h
  • trunk/Utilities/Hector/include/H_VerticalKicker.h

    r216 r281  
    22#define _H_VerticalKicker_
    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_VerticalKicker.h
     
    3037                H_VerticalKicker():H_Kicker(VKICKER,0.,0.,0.) {init();}
    3138                H_VerticalKicker(const double s, const double k, const double l) :H_Kicker(VKICKER,s,k,l){init();}
    32                 H_VerticalKicker(const string nameE, const double s, const double k, const double l) :H_Kicker(nameE,VKICKER,s,k,l){init();}
     39                H_VerticalKicker(const string& nameE, const double s, const double k, const double l) :H_Kicker(nameE,VKICKER,s,k,l){init();}
    3340                ~H_VerticalKicker() {};
    3441        //@}
  • trunk/Utilities/Hector/include/H_VerticalQuadrupole.h

    r216 r281  
    22#define _H_VerticalQuadrupole_
    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
     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   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    821
    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 */
    1422
    1523/// \file H_VerticalQuadrupole.h
     
    2735                H_VerticalQuadrupole():H_Quadrupole(VQUADRUPOLE,0.,0.,0.) {init();}
    2836                H_VerticalQuadrupole(const double s, const double k, const double l):H_Quadrupole(VQUADRUPOLE,s,k,l) {init();}
    29                 H_VerticalQuadrupole(string nameE, const double s, const double k, const double l):H_Quadrupole(nameE,VQUADRUPOLE,s,k,l) {init();}
    30                 ~H_VerticalQuadrupole() {};
    31         //@}
    32                 H_VerticalQuadrupole* clone() const ;
    33         private:
     37                H_VerticalQuadrupole(const string& nameE, const double s, const double k, const double l):H_Quadrupole(nameE,VQUADRUPOLE,s,k,l) {init();}
     38        ~H_VerticalQuadrupole() {};
     39//@}
     40        H_VerticalQuadrupole* clone() const ;
     41private:
    3442                virtual void setTypeString() {typestring = VQUADRUPOLENAME;} ;
    3543                virtual void setMatrix(const float, const float, const float) ;
Note: See TracChangeset for help on using the changeset viewer.