Fork me on GitHub

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

new Hector version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/Hector/src/H_BeamLine.cc

    r238 r281  
    1 /*
    2 ---- Hector the simulator ----
    3    A fast simulator of particles through generic beamlines.
    4    J. de Favereau, X. Rouby ~~~ hector_devel@cp3.phys.ucl.ac.be
    5 
    6         http://www.fynu.ucl.ac.be/hector.html
    7 
    8    Centre de Physique des Particules et de Phénoménologie (CP3)
    9    Université Catholique de Louvain (UCL)
    10 */
     1  /* * * * * * * * * * * * * * * * * * * * * * * * * * * *
     2 *                                                         *
     3*                   --<--<--  A fast simulator --<--<--     *
     4*                 / --<--<--     of particle   --<--<--     *
     5*  ----HECTOR----<                                          *
     6*                 \ -->-->-- transport through -->-->--     *
     7*                   -->-->-- generic beamlines -->-->--     *
     8*                                                           *
     9* JINST 2:P09005 (2007)                                     *
     10*      X Rouby, J de Favereau, K Piotrzkowski (CP3)         *
     11*       http://www.fynu.ucl.ac.be/hector.html               *
     12*                                                           *
     13* Center for Cosmology, Particle Physics and Phenomenology  *
     14*              Universite catholique de Louvain             *
     15*                 Louvain-la-Neuve, Belgium                 *
     16 *                                                         *
     17   * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    1118
    1219/// \file H_BeamLine.cc
     
    3946// are opposite to Wille's. See fill() for more details.
    4047
    41 H_BeamLine::H_BeamLine(const int si, const float length) : H_AbstractBeamLine(length){
    42         direction = (si >= abs(si)) ? 1 : -1;
    43         ips=0;
    44         ipx=0;
    45         ipy=0;
    46         iptx=0;
    47         ipty=0;
    48 }
    49 
    50 H_BeamLine::H_BeamLine(const H_BeamLine& beam) : H_AbstractBeamLine(beam) {
     48H_BeamLine::H_BeamLine(): H_AbstractBeamLine(),
     49        direction(1), ips(0), ipx(0), ipy(0), iptx(0), ipty(0) {
     50}
     51
     52H_BeamLine::H_BeamLine(const int si, const float length) : H_AbstractBeamLine(length),
     53        direction((si >= abs(si)) ? 1 : -1), ips(0), ipx(0), ipy(0), iptx(0), ipty(0) {
     54}
     55
     56H_BeamLine::H_BeamLine(const H_BeamLine& beam) : H_AbstractBeamLine(beam),
     57        direction(beam.direction), ips(beam.ips), ipx(beam.ipx), ipy(beam.ipy), iptx(beam.iptx), ipty(beam.ipty) {
     58}
     59
     60H_BeamLine& H_BeamLine::operator=(const H_BeamLine& beam) {
     61        if(this==&beam) return *this;
     62        H_AbstractBeamLine::operator=(beam); // call the mother's operator=
    5163        direction = beam.direction;
    5264        ips = beam.ips;
     
    5567        iptx = beam.iptx;
    5668        ipty = beam.ipty;
    57 }
    58 
    59 H_BeamLine& H_BeamLine::operator=(const H_BeamLine& beam) {
    60         if(this==&beam) return *this;
    61         direction = beam.direction;
    62         ips = beam.ips;
    63         ipx = beam.ipx;
    64     ipy = beam.ipy;
    65     iptx = beam.iptx;
    66     ipty = beam.ipty;
    6769        return *this;
    68 }
    69 
    70 void H_BeamLine::findIP(const string& filename) {
    71         findIP(filename,"IP5");
    72         return;
    7370}
    7471
     
    125122        temp[3] = ipty;
    126123        return temp;
    127 }
    128 
    129 void H_BeamLine::fill(const string& filename) {
    130         fill(filename,1,"IP5");
    131         return;
    132124}
    133125
Note: See TracChangeset for help on using the changeset viewer.