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_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
Note: See TracChangeset for help on using the changeset viewer.