ThinTracker.h 4.47 KB
Newer Older
gsell's avatar
gsell committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
#ifndef CLASSIC_ThinTracker_HH
#define CLASSIC_ThinTracker_HH

// ------------------------------------------------------------------------
// $RCSfile: ThinTracker.h,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Class: ThinTracker
//
// ------------------------------------------------------------------------
// Class category: Algorithms
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:32:33 $
// $Author: fci $
//
// ------------------------------------------------------------------------

#include "Algorithms/Tracker.h"

class BMultipoleField;
class PartBunch;
class PlanarArcGeometry;


// Class ThinTracker
// ------------------------------------------------------------------------
/// Track with thin lens algorithm.
//  The visitor class for tracking a bunch of particles through a beamline
//  using a thin-lens approximation for all elements.
//  [P]
//  Approximations used:
//  [UL]
//  [LI]All active elements are represented as thin lenses, sandwiched
//    between two drifts, each half of the element length.
//  [LI]Drifts are handled with a second-order approximation.
//  [LI]Geometric transformations ignore rotations about transverse axes
//    and translations along the design orbit and truncate after second order.
//  [/UL]

class ThinTracker: public Tracker {

public:

    /// Constructor.
    //  The beam line to be tracked is [b]bl[/b].
    //  The particle reference data are taken from [b]data[/b].
    //  The particle bunch tracked is initially empty.
    //  If [b]revBeam[/b] is true, the beam runs from s = C to s = 0.
    //  If [b]revTrack[/b] is true, we track against the beam.
    ThinTracker(const Beamline &bl, const PartData &data,
                bool revBeam, bool revTrack);

    /// Constructor.
    //  The beam line to be tracked is [b]bl[/b].
    //  The particle reference data are taken from [b]data[/b].
    //  The particle bunch tracked is taken from [b]bunch[/b].
    //  If [b]revBeam[/b] is true, the beam runs from s = C to s = 0.
    //  If [b]revTrack[/b] is true, we track against the beam.
frey_m's avatar
frey_m committed
64
    ThinTracker(const Beamline &bl, PartBunch *bunch,
gsell's avatar
gsell committed
65 66 67 68 69 70 71 72 73 74 75 76 77
                const PartData &data, bool revBeam, bool revTrack);

    virtual ~ThinTracker();

    /// Apply algorithm to BeamBeam.
    virtual void visitBeamBeam(const BeamBeam &);

    /// Apply algorithm to Collimator.
    virtual void visitCollimator(const Collimator &);

    /// Apply algorithm to Corrector.
    virtual void visitCorrector(const Corrector &);

adelmann's avatar
adelmann committed
78 79 80
    /// Apply the algorithm to a drift.
    virtual void visitDegrader(const Degrader &);

gsell's avatar
gsell committed
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
    /// Apply algorithm to Diagnostic.
    virtual void visitDiagnostic(const Diagnostic &);

    /// Apply algorithm to Drift.
    virtual void visitDrift(const Drift &);

    /// Apply algorithm to Lambertson.
    virtual void visitLambertson(const Lambertson &);

    /// Apply algorithm to Marker.
    virtual void visitMarker(const Marker &);

    /// Apply algorithm to Monitor.
    virtual void visitMonitor(const Monitor &);

    /// Apply algorithm to Multipole.
    virtual void visitMultipole(const Multipole &);

    /// Apply algorithm to Probe.
    virtual void visitProbe(const Probe &);

    /// Apply algorithm to RBend.
    virtual void visitRBend(const RBend &);

    /// Apply algorithm to RFCavity.
    virtual void visitRFCavity(const RFCavity &);

    /// Apply algorithm to RFQuadrupole.
    virtual void visitRFQuadrupole(const RFQuadrupole &);

    /// Apply algorithm to SBend.
    virtual void visitSBend(const SBend &);

    /// Apply algorithm to Separator.
    virtual void visitSeparator(const Separator &);

    /// Apply algorithm to Septum.
    virtual void visitSeptum(const Septum &);

    /// Apply algorithm to Solenoid.
    virtual void visitSolenoid(const Solenoid &);

    /// Apply algorithm to Solenoid.
    virtual void visitParallelPlate(const ParallelPlate &);

    /// Apply the algorithm to a CyclotronValley.
    virtual void visitCyclotronValley(const CyclotronValley &);

private:

    // Not implemented.
    ThinTracker();
    ThinTracker(const ThinTracker &);
    void operator=(const ThinTracker &);

    // Apply a drift length.
    // Approximate method to gain speed.
    void applyDrift(double length);
};

#endif // CLASSIC_ThinTracker_HH