Changeset 281 in svn for trunk/Utilities/Hector/include/H_AbstractBeamLine.h
- Timestamp:
- Mar 1, 2009, 3:56:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Utilities/Hector/include/H_AbstractBeamLine.h
r216 r281 2 2 #define _H_AbstractBeamLine_ 3 3 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 * * * * * * * * * * * * * * * * * * * * * * * * * * * */ 8 21 9 http://www.fynu.ucl.ac.be/hector.html10 11 Centre de Physique des Particules et de Phï¿œnomï¿œnologie (CP3)12 Universitï¿œ Catholique de Louvain (UCL)13 */14 22 15 23 /// \file H_AbstractBeamLine.h 16 24 /// \brief Class aiming at simulating the LHC beamline. 17 25 /// 18 /// Units : angles [ ï¿œrad], distances [ï¿œm], energies [GeV], c=[1].26 /// Units : angles [urad], distances [um], energies [GeV], c=[1]. 19 27 20 28 /// default length of the beam line … … 39 47 40 48 public: 41 void init(const float );42 49 /// Constructors, destructor and operator 43 50 //@{ … … 50 57 //@} 51 58 /// Adds an element to the beamline 52 //@{53 59 void add(H_OpticalElement *); 54 void add(H_OpticalElement &);55 //@}56 60 /// Returns the (float) length of the beamline 57 inlinefloat getLength() const { return beam_length;};61 const float getLength() const { return beam_length;}; 58 62 /// 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();}; 60 64 /// Returns the transport matrix for the whole beam 61 65 const TMatrix getBeamMatrix() const; … … 124 128 125 129 private: 126 /// list of all optics elements, including drifts127 vector<H_OpticalElement*> elements;128 130 /// list of matrices, 1 matrix = the transport till the end of each element 129 131 vector<TMatrix> matrices; 130 132 /// 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; 132 136 /// 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&); 134 140 135 141 protected: 142 void init(const float ); 136 143 /// total length of the beamline 137 144 float beam_length; 145 friend std::ostream& operator<< (std::ostream& os, const H_AbstractBeamLine& be); 138 146 }; 139 147
Note:
See TracChangeset
for help on using the changeset viewer.