Drift.h 2 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
#ifndef CLASSIC_Drift_HH
#define CLASSIC_Drift_HH

// ------------------------------------------------------------------------
// $RCSfile: Drift.h,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Class: Drift
//   Defines the abstract interface for a drift space.
//
// ------------------------------------------------------------------------
// Class category: AbsBeamline
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:32:31 $
// $Author: fci $
//
// ------------------------------------------------------------------------

#include "AbsBeamline/Component.h"



// Class Drift
// ------------------------------------------------------------------------
/// Interface for drift space.
//  Class Drift defines the abstract interface for a drift space.

class Drift: public Component {

public:

    /// Constructor with given name.
38
    explicit Drift(const std::string &name);
gsell's avatar
gsell committed
39 40 41 42 43 44

    Drift();
    Drift(const Drift &right);
    virtual ~Drift();

    /// Apply visitor to Drift.
45
    virtual void accept(BeamlineVisitor &) const override;
gsell's avatar
gsell committed
46

47
    virtual void initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) override;
gsell's avatar
gsell committed
48

49
    virtual void finalise() override;
gsell's avatar
gsell committed
50

51
    virtual bool bends() const override;
gsell's avatar
gsell committed
52

53
    virtual ElementBase::ElementType getType() const override;
gsell's avatar
gsell committed
54

55
    virtual void getDimensions(double &zBegin, double &zEnd) const override;
gsell's avatar
gsell committed
56

57
    //set number of slices for map tracking
snuverink_j's avatar
snuverink_j committed
58
    void setNSlices(const std::size_t& nSlices); // Philippe was here
59

snuverink_j's avatar
snuverink_j committed
60 61
    //set number of slices for map tracking
    std::size_t getNSlices() const; // Philippe was here
62

gsell's avatar
gsell committed
63 64 65
private:

    double startField_m;
66
    std::size_t nSlices_m;
gsell's avatar
gsell committed
67 68 69 70 71

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

72
#endif // CLASSIC_Drift_HH