OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
LieMapper.h
Go to the documentation of this file.
1 #ifndef OPAL_LieMapper_HH
2 #define OPAL_LieMapper_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: LieMapper.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: LieMapper
13 //
14 // ------------------------------------------------------------------------
15 //
16 // $Date: 2000/03/27 09:33:36 $
17 // $Author: Andreas Adelmann $
18 //
19 // ------------------------------------------------------------------------
20 
21 #include "Algorithms/Mapper.h"
23 
24 class BMultipoleField;
25 class PlanarArcGeometry;
26 
27 
28 // Class LieMapper
29 // ------------------------------------------------------------------------
31 // All maps are factored in ascending Dragt-Finn order.
32 // [p]
33 // Phase space coordinates numbering:
34 // [tab 3 b]
35 // [row]number [&]name [&]unit [/row]
36 // [row]0 [&]$x$ [&]metres [/row]
37 // [row]1 [&]$p_x/p_r$ [&]1 [/row]
38 // [row]2 [&]$y$ [&]metres [/row]
39 // [row]3 [&]$p_y/p_r$ [&]1 [/row]
40 // [row]4 [&]$v*delta_t$ [&]metres [/row]
41 // [row]5 [&]$delta_p/p_r$ [&]1 [/row]
42 // [/tab][p]
43 // Where $p_r$ is the constant reference momentum defining the reference
44 // frame velocity, $m$ is the rest mass of the particles, and $v$ is the
45 // instantaneous velocity of the particle.
46 // [p]
47 // Other units used:
48 // [tab 2 b]
49 // [row]quantity [&]unit [/row]
50 // [row]reference momentum [&]electron-volts [/row]
51 // [row]velocity [&]metres/second [/row]
52 // [row]accelerating voltage [&]volts [/row]
53 // [row]separator voltage [&]volts [/row]
54 // [row]frequencies [&]hertz [/row]
55 // [row]phase lags [&]$2*pi$ [/row]
56 // [/tab][p]
57 // All elements are represented by maps for finite-length elements.
58 // Several important pieces are still MISSING from this algorithm.
59 
60 class LieMapper: public AbstractMapper {
61 
62 public:
63 
65  // The beam line to be tracked is "bl".
66  // The particle reference data are taken from "data".
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  LieMapper(const Beamline &bl, const PartData &data,
70  bool backBeam, bool backTrack, int order);
71 
72  virtual ~LieMapper();
73 
75  virtual void getMap(LinearMap<double, 6> &) const;
76 
78  virtual void getMap(FVps<double, 6> &) const;
79 
81  virtual void getMap(DragtFinnMap<3> &) const;
82 
84  virtual void setMap(const LinearMap<double, 6> &);
85 
87  virtual void setMap(const FVps<double, 6> &);
88 
90  virtual void setMap(const DragtFinnMap<3> &);
91 
92 
94  virtual void visitBeamBeam(const BeamBeam &);
95 
97  virtual void visitBeamStripping(const BeamStripping &);
98 
100  virtual void visitCCollimator(const CCollimator &);
101 
103  virtual void visitComponent(const Component &);
104 
106  virtual void visitCorrector(const Corrector &);
107 
109  virtual void visitDegrader(const Degrader &);
110 
112  virtual void visitDiagnostic(const Diagnostic &);
113 
115  virtual void visitDrift(const Drift &);
116 
118  virtual void visitFlexibleCollimator(const FlexibleCollimator &);
119 
121  virtual void visitLambertson(const Lambertson &);
122 
124  virtual void visitMarker(const Marker &);
125 
127  virtual void visitMonitor(const Monitor &);
128 
130  virtual void visitMultipole(const Multipole &);
131 
133  virtual void visitPatch(const Patch &);
134 
136  virtual void visitProbe(const Probe &);
137 
139  virtual void visitRBend(const RBend &);
140 
142  virtual void visitRFCavity(const RFCavity &);
143 
145  virtual void visitRFQuadrupole(const RFQuadrupole &);
146 
148  virtual void visitSBend(const SBend &);
149 
151  virtual void visitSeparator(const Separator &);
152 
154  virtual void visitSeptum(const Septum &);
155 
157  virtual void visitSolenoid(const Solenoid &);
158 
160  virtual void visitParallelPlate(const ParallelPlate &);
161 
163  virtual void visitCyclotronValley(const CyclotronValley &);
164 
165 private:
166 
167  // Not implemented.
168  LieMapper();
169  LieMapper(const LieMapper &);
170  void operator=(const LieMapper &);
171 
172  // Apply drift length.
173  // Propagate current map through a drift.
174  void applyDrift(double length);
175 
176  // Transforms fringing fields.
177  void applyEntranceFringe(double edge, double curve,
178  const BMultipoleField &field, double scale);
179  void applyExitFringe(double edge, double curve,
180  const BMultipoleField &field, double scale);
181 
183  // Propagate current map through a geometric transformation.
184  // Linear approximation for the time being.
185  virtual void applyTransform(const Euclid3D &, double refLength = 0.0);
186 
187  // The Lie map being accumulated.
189 
190  // The desired map order.
191  int itsOrder;
192 };
193 
194 #endif // OPAL_LieMapper_HH
Build transfer map.
virtual void visitSeptum(const Septum &)
Apply the algorithm to a Septum.
Definition: LieMapper.cpp:415
virtual ~LieMapper()
Definition: LieMapper.cpp:73
virtual void visitFlexibleCollimator(const FlexibleCollimator &)
Apply the algorithm to a flexible collimator.
Definition: LieMapper.cpp:164
Build a Lie-algebraic map using a finite-length lens for each elements.
Definition: LieMapper.h:60
Interface for septum magnet.
Definition: Septum.h:11
void applyEntranceFringe(double edge, double curve, const BMultipoleField &field, double scale)
Definition: LieMapper.cpp:464
Interface for electrostatic separator.
Definition: Separator.h:33
Interface for beam position monitors.
Definition: Monitor.h:41
Interface for RF Quadrupole.
Definition: RFQuadrupole.h:30
A simple arc in the XZ plane.
virtual void visitParallelPlate(const ParallelPlate &)
Apply the algorithm to a ParallelPlate.
Definition: LieMapper.cpp:302
virtual void setMap(const LinearMap< double, 6 > &)
Reset the linear part of the accumulated map for restart.
Definition: LieMapper.cpp:92
Interface for RF cavity.
Definition: ParallelPlate.h:36
Particle reference data.
Definition: PartData.h:38
Interface for general corrector.
Definition: Corrector.h:35
virtual void visitCCollimator(const CCollimator &)
Apply the algorithm to a Collimator.
Definition: LieMapper.cpp:115
Abstract collimator.
Definition: RBend.h:73
Interface for beam diagnostics.
Definition: Diagnostic.h:32
Interface for a marker.
Definition: Marker.h:32
DragtFinnMap< 3 > itsMap
Definition: LieMapper.h:188
virtual void visitLambertson(const Lambertson &)
Apply the algorithm to a Lambertson.
Definition: LieMapper.cpp:168
Interface for drift space.
Definition: Drift.h:33
virtual void visitBeamStripping(const BeamStripping &)
Apply the algorithm to a BeamStripping.
Definition: LieMapper.cpp:111
virtual void visitComponent(const Component &)
Apply the algorithm to a Component.
Definition: LieMapper.cpp:120
virtual void visitRFCavity(const RFCavity &)
Apply the algorithm to a RFCavity.
Definition: LieMapper.cpp:310
Interface for general multipole.
Definition: Multipole.h:46
void applyDrift(double length)
Definition: LieMapper.cpp:444
virtual void visitCorrector(const Corrector &)
Apply the algorithm to a Corrector.
Definition: LieMapper.cpp:125
virtual void visitDiagnostic(const Diagnostic &)
Apply the algorithm to a Diagnostic.
Definition: LieMapper.cpp:154
Interface for probe.
Definition: Probe.h:16
virtual void visitMultipole(const Multipole &)
Apply the algorithm to a Multipole.
Definition: LieMapper.cpp:184
virtual void visitRBend(const RBend &)
Apply the algorithm to a RBend.
Definition: LieMapper.cpp:231
void applyExitFringe(double edge, double curve, const BMultipoleField &field, double scale)
Definition: LieMapper.cpp:474
Interface for cyclotron collimator.
Definition: CCollimator.h:13
Displacement and rotation in space.
Definition: Euclid3D.h:68
Abstract beam-beam interaction.
Definition: BeamBeam.h:37
Definition: SBend.h:68
virtual void visitProbe(const Probe &)
Apply the algorithm to a Probe.
Definition: LieMapper.cpp:226
Interface for cyclotron valley.
virtual void visitSolenoid(const Solenoid &)
Apply the algorithm to a Solenoid.
Definition: LieMapper.cpp:421
Interface for solenoids.
Definition: Solenoid.h:36
An abstract sequence of beam line components.
Definition: Beamline.h:37
The magnetic field of a multipole.
virtual void visitRFQuadrupole(const RFQuadrupole &)
Apply the algorithm to a RFQuadrupole.
Definition: LieMapper.cpp:332
virtual void visitCyclotronValley(const CyclotronValley &)
Apply the algorithm to a CyclotronValley.
Definition: LieMapper.cpp:306
Interface for RF cavity.
Definition: RFCavity.h:37
Abstract collimator.
Definition: Degrader.h:37
virtual void applyTransform(const Euclid3D &, double refLength=0.0)
Apply transform.
Definition: LieMapper.cpp:484
virtual void visitBeamBeam(const BeamBeam &)
Apply the algorithm to a BeamBeam.
Definition: LieMapper.cpp:107
Interface for a geometric patch.
Definition: Patch.h:34
virtual void visitSeparator(const Separator &)
Apply the algorithm to a Separator.
Definition: LieMapper.cpp:392
virtual void visitMarker(const Marker &)
Apply the algorithm to a Marker.
Definition: LieMapper.cpp:174
Interface for a single beam element.
Definition: Component.h:51
virtual void visitDrift(const Drift &)
Apply the algorithm to a Drift.
Definition: LieMapper.cpp:160
int itsOrder
Definition: LieMapper.h:191
virtual void visitPatch(const Patch &)
Apply the algorithm to a Patch.
Definition: LieMapper.cpp:222
virtual void visitSBend(const SBend &)
Apply the algorithm to a SBend.
Definition: LieMapper.cpp:338
virtual void visitMonitor(const Monitor &)
Apply the algorithm to a Monitor.
Definition: LieMapper.cpp:179
virtual void getMap(LinearMap< double, 6 > &) const
Return the linear part of the accumulated map.
Definition: LieMapper.cpp:77
virtual void visitDegrader(const Degrader &)
Apply the algorithm to a Degrader.
Definition: LieMapper.cpp:149
void operator=(const LieMapper &)
Interface for a Lambertson septum.
Definition: Lambertson.h:33