Septum.h 1.52 KB
Newer Older
gsell's avatar
gsell committed
1 2 3
#ifndef CLASSIC_Septum_HH
#define CLASSIC_Septum_HH

4
#include "AbsBeamline/PluginElement.h"
gsell's avatar
gsell committed
5 6 7 8 9 10

// Class Septum
// ------------------------------------------------------------------------
/// Interface for septum magnet.
//  Class Septum defines the abstract interface for a septum magnet.

11
class Septum: public PluginElement {
gsell's avatar
gsell committed
12 13 14

public:
    /// Constructor with given name.
15
    explicit Septum(const std::string &name);
gsell's avatar
gsell committed
16 17 18

    Septum();
    Septum(const Septum &);
19
    void operator=(const Septum &) = delete;
gsell's avatar
gsell committed
20 21 22
    virtual ~Septum();

    /// Apply visitor to Septum.
23
    virtual void accept(BeamlineVisitor &) const override;
24 25 26 27 28 29
    ///@{ Override implementation of PluginElement
    virtual ElementBase::ElementType getType() const override;
    virtual void initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField) override;
    ///@}
    /// unhide PluginElement::initialise(PartBunchBase<double, 3> *bunch)
    using PluginElement::initialise;
gsell's avatar
gsell committed
30

31 32 33 34
    ///@{ Member variable access
    void   setWidth(double width);
    double getWidth() const;
    ///@}
gsell's avatar
gsell committed
35 36

private:
37 38 39 40
    /// Hook for initialise
    virtual void doInitialise(PartBunchBase<double, 3> *bunch) override;
    /// Record hits when bunch particles pass
    virtual bool doCheck(PartBunchBase<double, 3> *bunch, const int turnnumber, const double t, const double tstep) override;
41 42
    /// Virtual hook for preCheck
    virtual bool doPreCheck(PartBunchBase<double, 3>*) override;
43

44
    ///@{ input geometry positions
gsell's avatar
gsell committed
45
    double width_m;
46
    ///@}
gsell's avatar
gsell committed
47 48
};

49
#endif // CLASSIC_Septum_HH