Fork me on GitHub

Changeset 1365 in svn for trunk/external/Hector/H_Beam.h


Ignore:
Timestamp:
Apr 16, 2014, 3:56:14 PM (10 years ago)
Author:
Pavel Demin
Message:

switch to a more stable Hector version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external/Hector/H_Beam.h

    r1360 r1365  
    22#define _H_Beam_
    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    * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     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*/
    2114
    2215/// \file H_Beam.h
     
    3124
    3225// ROOT #includes
    33 #include "TH2F.h"
    34 #include "TGraphErrors.h"
    35 #include "TMultiGraph.h"
    36 #include "TMath.h"
     26////#include "TH2F.h"
     27////#include "TGraphErrors.h"
     28////#include "TMultiGraph.h"
    3729
    3830// local #includes
     
    6355                ~H_Beam();
    6456        //@}
    65         /// Fills the beam with particles in given position/angle/energy        intervals (flat distribution)
    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);
    67 
    6857        /// Fills the beam with particles
    69                 void createBeamParticles(const unsigned int Number_of_particles, const double p_mass=MP, const double p_charge=QP, TRandom* r=gRandom);
     58        //@{
     59                void createBeamParticles(const unsigned int , const double , const double );
     60                void createBeamParticles(const unsigned int);
     61        //@}
    7062        /// Fills the beam with particles with incremental offset and no initial transverse momentum
    7163        //@{
     
    8678                void add(const H_BeamParticle&);
    8779        /// Compute the position of each particle in the beamline
    88                 void computePath(const H_AbstractBeamLine * beamline, const bool NonLinear=false);
     80        //@{   
     81                void computePath(const H_AbstractBeamLine *, const bool);
     82                void computePath(const H_AbstractBeamLine *);
     83        //@}
    8984        // Photon emission by the particle
    90                 void emitGamma(const double gee, const double gq2, const double phimin=0, const double phimax=2*TMath::Pi());
     85        // @{
     86                void emitGamma(const double, const double, const double, const double);
     87                void emitGamma(const double, const double);
     88        //@}
    9189        // Propagates the beam until a given s
    9290                void propagate(const float );
     
    9896        /// Draws the \f$ \beta \f$ function of the beam
    9997        //@{
    100                 TGraphErrors  * getBetaX(const float, const unsigned int);
    101                 TGraphErrors  * getBetaY(const float, const unsigned int);
     98        ////    TGraphErrors  * getBetaX(const float, const unsigned int);
     99        ////    TGraphErrors  * getBetaY(const float, const unsigned int);
    102100        //@}
    103101        /// Returns the position of the beam
     
    108106        /// Returns the emittance \f$ \epsilon \f$ of the beam in x and y
    109107        //@{
    110         inline const float getEmittanceX() const {
    111                         if(!x_disp*tx_disp) cout<<"Warning : Degenerate Beam : x-emittance = 0"<<endl; 
     108                inline const float getEmittanceX() const {
     109                    if(!x_disp*tx_disp) cout<<"Warning : Degenerate Beam : x-emittance = 0"<<endl;     
    112110                        return x_disp * tan(tx_disp/URAD)/URAD;
    113111                }
     
    140138                unsigned int getStoppedNumber(const H_AbstractBeamLine *);
    141139        /// Returns the list of the stopping elements in the beamline
    142                 vector<TVectorD> getStoppingElements(const H_AbstractBeamLine *, vector<H_OpticalElement>&, vector<int>&);
     140                void getStoppingElements(const H_AbstractBeamLine *, vector<H_OpticalElement>&, vector<int>&);
    143141        /// Prints the initial parameters
    144142                void printInitialState() const;
    145143        /// Prints the properties for each particle
    146                 void printProperties() const {cout << *this; return;}
     144                void printProperties() const;
    147145        /// Prints the list of the stopping elements in the beamline
    148146                void printStoppingElements(const vector<H_OpticalElement>&, const vector<int>&) const;
     
    150148                const int getNumberOfBeamParticles() const {return Nparticles;}
    151149        /// Draws the beam profile at a given s
    152                 TH2F * drawProfile(const float);
    153                 TH2F * drawAngleProfile(const float);
     150        ////    TH2F * drawProfile(const float);
    154151        /// Draws the beam width and height
    155152        //@{
    156                 TMultiGraph * drawBeamX(const int) const;
    157                 TMultiGraph * drawBeamY(const int) const ;
     153        ////    TMultiGraph * drawBeamX(const int) const;
     154        ////    TMultiGraph * drawBeamY(const int) const ;
    158155        //@}
    159156
     
    183180        /// Number of particles in this beam
    184181                unsigned int Nparticles;
    185 
    186         friend std::ostream& operator<< (std::ostream& os, const H_Beam& be);
    187182};
    188183
Note: See TracChangeset for help on using the changeset viewer.