OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Integrator.h
Go to the documentation of this file.
1 #ifndef CLASSIC_Integrator_HH
2 #define CLASSIC_Integrator_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: Integrator.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: Integrator
13 //
14 // ------------------------------------------------------------------------
15 // Class category: AbsBeamline
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:31 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
25 
26 template <class T, unsigned Dim>
27 class PartBunchBase;
28 class PartData;
29 class OpalParticle;
30 
31 template <class T, int N> class FVps;
32 
33 
34 // Class Integrator
35 // ------------------------------------------------------------------------
37 // Integrator is a pure abstract class. It forms the base class for all
38 // special propagators through an element or a beam line. If present, it
39 // overrides a complete Component or Beamline object.
40 
41 class Integrator: public ElementBase {
42 
43 public:
44 
45  explicit Integrator(ElementBase *);
46  Integrator(const Integrator &rhs);
47  virtual ~Integrator();
48 
50  inline ElementBase *getElement() const;
51 
53  // The whole structure depending on [b]this[/b] is marked as sharable.
54  // After this call a [b]copyStructure()[/b] call reuses the element.
55  virtual void makeSharable();
56 
58  // The first argument describes the particle's phase space position,
59  // the second argument describes the particle's momentum and mass,
60  // [b]revBeam[/b] true, means that the beam runs backwards, and
61  // [b]revTrack[/b] true, means that we track against the beam.
62  virtual void trackParticle(OpalParticle &, const PartData &,
63  bool revBeam, bool revTrack) const = 0;
64 
66  // The first argument describes the particles in the bunch,
67  // the second argument describes the reference momentum and mass,
68  // [b]revBeam[/b] true, means that the beam runs backwards, and
69  // [b]revTrack[/b] true, means that we track against the beam.
70  virtual void trackBunch(PartBunchBase<double, 3> *, const PartData &,
71  bool revBeam, bool revTrack) const = 0;
72 
74  // The first argument describes the map to be tracked,
75  // the second argument describes the reference momentum and mass,
76  // [b]revBeam[/b] true, means that the beam runs backwards, and
77  // [b]revTrack[/b] true, means that we track against the beam.
78  virtual void trackMap(FVps<double, 6> &, const PartData &,
79  bool revBeam, bool revTrack) const = 0;
80 
81 protected:
82 
85 
86 private:
87 
88  // Not implemented.
89  Integrator();
90  void operator=(const Integrator &);
91 };
92 
93 
94 // Implementation.
95 // ------------------------------------------------------------------------
96 
98  return &*itsElement;
99 }
100 
101 #endif // CLASSIC_Integrator_HH
Interface for basic beam line object.
Definition: ElementBase.h:128
ElementBase * getElement() const
Return the embedded element.
Definition: Integrator.h:97
virtual void makeSharable()
Set sharable flag.
Definition: Integrator.cpp:42
virtual void trackMap(FVps< double, 6 > &, const PartData &, bool revBeam, bool revTrack) const =0
Track a map.
Particle reference data.
Definition: PartData.h:38
Class: DataSink.
Definition: OpalData.h:29
Pointer< ElementBase > itsElement
Pointer to the replaced element.
Definition: Integrator.h:84
virtual ~Integrator()
Definition: Integrator.cpp:38
void operator=(const Integrator &)
virtual void trackParticle(OpalParticle &, const PartData &, bool revBeam, bool revTrack) const =0
Track a particle.
Base class for special integrators.
Definition: Integrator.h:41
OpalParticle position.
Definition: OpalParticle.h:38
Vector truncated power series in n variables.
virtual void trackBunch(PartBunchBase< double, 3 > *, const PartData &, bool revBeam, bool revTrack) const =0
Track a particle bunch.