Fork me on GitHub

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_HorizontalQuadrupole.cc

    r1360 r1365  
    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    * * * * * * * * * * * * * * * * * * * * * * * * * * * */
     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*/
    1811
    1912/// \file H_HorizontalQuadrupole.cc
    20 /// \brief Classes aiming at simulating horizontal quadrupoles in beamline
     13/// \brief Classes aiming at simulating horizontal kickers in beamline
    2114
    2215// local #includes
    2316#include "H_HorizontalQuadrupole.h"
    2417
    25 void H_HorizontalQuadrupole::setMatrix(const float eloss, const float p_mass, const float p_charge) {
    26         if (fk>0)  { if(VERBOSE) cout<<"<H_HorizontalQuadrupole> ERROR : k1 should be < 0 (" << name << ")!"<<endl; }
    27                 if (fk !=0 ) element_mat = hquadmat(element_length,fk,eloss, p_mass, p_charge);
     18void H_HorizontalQuadrupole::setMatrix(const float eloss, const float p_mass, const float p_charge) const {
     19        if (fk>0)  { if(VERBOSE) cout<<"\t ERROR : k1 should be < 0 for H_HorizontalQuadrupole (" << name << ")!"<<endl; }
     20                if (fk !=0 ) *element_mat = hquadmat(element_length,fk,eloss, p_mass, p_charge);
    2821                else  {
    29                         element_mat = driftmat(element_length);
    30                         if(VERBOSE) cout<<"<H_HorizontalQuadrupole> WARNING : k1= 0 ; drift-like quadrupole (" << name << ") !" << endl;
     22                        *element_mat = driftmat(element_length);
     23                        if(VERBOSE) cout<<"\t WARNING : k1= 0 ; drift-like quadrupole (" << name << ") !" << endl;
    3124                }
    3225        return ;
    3326}
    34 
    35 H_HorizontalQuadrupole* H_HorizontalQuadrupole::clone() const {
    36         H_HorizontalQuadrupole* temp_quad = new H_HorizontalQuadrupole(name,fs,fk,element_length);
    37         temp_quad->setAperture(element_aperture);
    38         temp_quad->setX(xpos);
    39         temp_quad->setY(ypos);
    40         temp_quad->setTX(txpos);
    41         temp_quad->setTY(typos);
    42         temp_quad->setBetaX(betax);
    43         temp_quad->setBetaY(betay);
    44         return temp_quad;
    45 }
Note: See TracChangeset for help on using the changeset viewer.