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