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_Marker.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_Marker.cc
     
    3124}
    3225
    33 std::ostream& operator<< (std::ostream& os, const H_Marker& el) {
    34         os << el.typestring << el.name << "\t\t at s = " << el.fs;
    35         if(el.element_aperture->getType()!=NONE) {
    36                 os << *(el.element_aperture) << endl;
     26void H_Marker::printProperties() const {
     27        cout << typestring << name;
     28        cout << "\t\t at s = " << fs << endl;
     29        if(element_aperture->getType()!=NONE) {
     30                cout <<"\t aperture type = " << element_aperture->getTypeString();
     31                element_aperture->printProperties();
    3732        }
    38    return os;
    3933}
    4034
    41 //void H_Marker::setMatrix(const float eloss, const float p_mass, const float p_charge) {
    42 void H_Marker::setMatrix(const float , const float , const float ) {
    43                 element_mat = driftmat(0);
     35void H_Marker::setMatrix(const float eloss, const float p_mass, const float p_charge) const {
     36                *element_mat = driftmat(0);
    4437        return ;
    4538}
    46 
    47 H_Marker* H_Marker::clone() const {
    48         H_Marker* temp_mkr = new H_Marker(name,fs);
    49         temp_mkr->setAperture(element_aperture);
    50         temp_mkr->setX(xpos);
    51         temp_mkr->setY(ypos);
    52         temp_mkr->setTX(txpos);
    53         temp_mkr->setTY(typos);
    54         temp_mkr->setBetaX(betax);
    55         temp_mkr->setBetaY(betay);
    56         return temp_mkr;
    57 }
Note: See TracChangeset for help on using the changeset viewer.