OpalCyclotron.h 3.29 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
#ifndef OPAL_OpalCyclotron_HH
#define OPAL_OpalCyclotron_HH

// ------------------------------------------------------------------------
// $RCSfile: OpalCyclotron.h,v $
// ------------------------------------------------------------------------
// $Revision: 1.1.1.1 $
// ------------------------------------------------------------------------
// Copyright: see Copyright.readme
// ------------------------------------------------------------------------
//
// Class: OpalCyclotron
//
// ------------------------------------------------------------------------
//
// $Date: 2000/03/27 09:33:39 $
// $Author: Andreas Adelmann $
//
// ------------------------------------------------------------------------

#include "Elements/OpalElement.h"

23
class BoundaryGeometry;
gsell's avatar
gsell committed
24 25 26 27 28 29 30 31 32 33

// Class OpalCyclotron
// ------------------------------------------------------------------------
/// The OpalCyclotron element.

class OpalCyclotron: public OpalElement {

public:

    /// The attributes of class OpalCyclotron.
34
    /// Need to remove common, old TYPE = COMMON, prevents the identification of the fieldmap type in the Cyclotron
35
    /// element issue #84
gsell's avatar
gsell committed
36
    enum {
37
        TYPE,
38 39 40
        GEOMETRY,  // geometry of boundary
        CYHARMON,  // The harmonic number of the cyclotron
        SYMMETRY,  // The symetry of the field
winklehner_d's avatar
winklehner_d committed
41
        RINIT,     // The initial radius [mm]
42 43
        PRINIT,    // The initial radial momentum [pr/p0] []
        PHIINIT,   // The initial phase [deg]
winklehner_d's avatar
winklehner_d committed
44
        ZINIT,     // The initial z coordinate [mm]
45
        PZINIT,    // The initial vertical momentum [pz/p0] []
46 47 48
        RFFREQ,    // First hamonic of the RF system [MHz]
        FMAPFN,    // The filename of the mid-plane fieldmap
        RFMAPFN,   // The filename(s) of the RF fieldmap
49 50
        RFFCFN,    // The filename(s) of coefficients for RF frequency function f(t)
        RFVCFN,    // The filename(s) of coefficients for RF voltage function v(t)
51 52
        BSCALE,    // A scalar to scale the B-field
        ESCALE,    // A scalar to scale the RF field
53 54 55 56 57 58 59 60 61
        RFPHI,     // the initial phase of RF field
        SUPERPOSE, // whether the electric field map are superposed or not
        MINZ,      // minimal vertical extend of the machine
        MAXZ,      // maximal vertical extend of the machine
        MINR,      // minimal radial extend of the machine
        MAXR,      // maximal radial extend of the machine
        FMLOWE,    // minimal energy of the field map
        FMHIGHE,   // maximal energy of the field map
        SPIRAL,    // flag whether or not this is a spiral inflector simulation
62
        TRIMCOILTHRESHOLD, // minimum B-field for which trim coils are applied
63
        TRIMCOIL,  // list of trim coils
gsell's avatar
gsell committed
64 65 66 67 68 69 70 71 72 73 74
        SIZE
    };



    /// Exemplar constructor.
    OpalCyclotron();

    virtual ~OpalCyclotron();

    /// Make clone.
75
    virtual OpalCyclotron *clone(const std::string &name);
gsell's avatar
gsell committed
76 77 78 79 80 81 82 83 84 85 86 87 88 89

    /// Fill in all registered attributes.
    virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag);

    /// Update the embedded CLASSIC cavity.
    virtual void update();

private:

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

    // Clone constructor.
90
    OpalCyclotron(const std::string &name, OpalCyclotron *parent);
adelmann's avatar
adelmann committed
91 92 93

    BoundaryGeometry *obgeo_m;

gsell's avatar
gsell committed
94 95
};

96
#endif // OPAL_OpalCyclotron_HH