OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
MapIntegrator.h
Go to the documentation of this file.
1 #ifndef CLASSIC_MapIntegrator_HH
2 #define CLASSIC_MapIntegrator_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: MapIntegrator.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: MapIntegrator
13 //
14 // ------------------------------------------------------------------------
15 // Class category: Algorithms
16 // ------------------------------------------------------------------------
17 //
18 // $Date: 2000/03/27 09:32:33 $
19 // $Author: fci $
20 //
21 // ------------------------------------------------------------------------
22 
24 
25 template <class T, unsigned Dim>
26 class PartBunchBase;
27 class PartData;
28 class OpalParticle;
29 
30 template <class T, int N> class FVps;
31 
32 
33 // Class MapIntegrator
34 // ------------------------------------------------------------------------
36 // An abstract base class for all integrators capable of tracking a
37 // transfer map through a beam element.
38 // Implements some default behaviour for such integrators.
39 
40 
42 
43 public:
44 
45  explicit MapIntegrator(ElementBase *);
46  MapIntegrator(const MapIntegrator &right);
47  virtual ~MapIntegrator();
48 
49 
51  virtual void accept(BeamlineVisitor &visitor) const;
52 
54  virtual MapIntegrator *clone() const = 0;
55 
57  // The particle is stored in [b]part[/b].
58  // The particle reference data are taken from [b]data[/b].
59  // If [b]revBeam[/b] is true, the beam runs from s = C to s = 0.
60  // If [b]revTrack[/b] is true, we track against the beam.
61  virtual void trackParticle(OpalParticle &part, const PartData &,
62  bool revBeam, bool revTrack) const;
63 
65  // The bunch is stored in [b]bunch[/b].
66  // The particle reference data are taken from [b]data[/b].
67  // If [b]revBeam[/b] is true, the beam runs from s = C to s = 0.
68  // If [b]revTrack[/b] is true, we track against the beam.
69  virtual void trackBunch(PartBunchBase<double, 3> *, const PartData &,
70  bool revBeam, bool revTrack) const;
71 
73  // The map is stored in [b]map[/b].
74  // The particle reference data are taken from [b]data[/b].
75  // If [b]revBeam[/b] is true, the beam runs from s = C to s = 0.
76  // If [b]revTrack[/b] is true, we track against the beam.
77  virtual void trackMap(FVps<double, 6> &, const PartData &,
78  bool revBeam, bool revTrack) const;
79 
80 private:
81 
82  // Not implemented.
83  MapIntegrator();
84  void operator=(const MapIntegrator &);
85 
86  // Return the map for this MapIntegrator.
87  virtual void getMap(FVps<double, 6> &, const PartData &,
88  bool revBeam, bool revTrack) const = 0;
89 };
90 
91 #endif // CLASSIC_MapIntegrator_HH
Interface for basic beam line object.
Definition: ElementBase.h:128
virtual void trackMap(FVps< double, 6 > &, const PartData &, bool revBeam, bool revTrack) const
Track a map.
Particle reference data.
Definition: PartData.h:38
virtual MapIntegrator * clone() const =0
Make a clone.
Class: DataSink.
Definition: OpalData.h:29
virtual void getMap(FVps< double, 6 > &, const PartData &, bool revBeam, bool revTrack) const =0
void operator=(const MapIntegrator &)
virtual void trackBunch(PartBunchBase< double, 3 > *, const PartData &, bool revBeam, bool revTrack) const
Track a particle bunch.
virtual void accept(BeamlineVisitor &visitor) const
Apply visitor.
Integrate particle.
Abstract algorithm.
OpalParticle position.
Definition: OpalParticle.h:38
virtual ~MapIntegrator()
Vector truncated power series in n variables.
virtual void trackParticle(OpalParticle &part, const PartData &, bool revBeam, bool revTrack) const
Track a particle.
Integrate a map.
Definition: MapIntegrator.h:41