OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
BeamBeam.h
Go to the documentation of this file.
1 #ifndef CLASSIC_BeamBeam_HH
2 #define CLASSIC_BeamBeam_HH
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: BeamBeam.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.1.1.1 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: BeamBeam
13 // Defines the abstract interface for a beam-beam interaction.
14 //
15 // ------------------------------------------------------------------------
16 // Class category: AbsBeamline
17 // ------------------------------------------------------------------------
18 //
19 // $Date: 2000/03/27 09:32:31 $
20 // $Author: fci $
21 //
22 // ------------------------------------------------------------------------
23 
24 #include "AbsBeamline/Component.h"
25 
26 
27 class Matrix3D;
28 class Vector3D;
29 
30 
31 // Class BeamBeam
32 // ------------------------------------------------------------------------
34 // Class BeamBeam defines the abstract interface for beam-beam interactions.
35 
36 
37 class BeamBeam: public Component {
38 
39 public:
40 
42  explicit BeamBeam(const std::string &name);
43 
44  BeamBeam();
45  BeamBeam(const BeamBeam &right);
46  virtual ~BeamBeam();
47 
49  virtual void accept(BeamlineVisitor &) const;
50 
52  // Return the number of particles times the particle charge in the
53  // opposite bunch. Units are proton charges.
54  virtual double getBunchCharge() const = 0;
55 
57  // Return the moment matrix for the opposite bunch
58  // (the matrix of second momenta). Units are square metres.
59  virtual const Matrix3D &getBunchMoment() const = 0;
60 
62  // Return the displacement vector for position of opposite bunch.
63  // Units are metres.
64  virtual const Vector3D &getBunchDisplacement() const = 0;
65 
66  virtual void initialise(PartBunchBase<double, 3> *bunch, double &startField, double &endField);
67 
68  virtual void finalise();
69 
70  virtual bool bends() const;
71 
72  virtual ElementBase::ElementType getType() const;
73 
74  virtual void getDimensions(double &zBegin, double &zEnd) const;
75 
76 private:
77 
78  // Not implemented.
79  void operator=(const BeamBeam &);
80 };
81 
82 #endif // CLASSIC_BeamBeam_HH
virtual const Matrix3D & getBunchMoment() const =0
Get moments.
virtual void accept(BeamlineVisitor &) const
Apply visitor to BeamBeam.
Definition: BeamBeam.cpp:47
void operator=(const BeamBeam &)
BeamBeam()
Definition: BeamBeam.cpp:28
virtual void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField)
Definition: BeamBeam.cpp:51
virtual ~BeamBeam()
Definition: BeamBeam.cpp:43
virtual void finalise()
Definition: BeamBeam.cpp:55
virtual double getBunchCharge() const =0
Get bunch charge.
virtual bool bends() const
Definition: BeamBeam.cpp:58
virtual void getDimensions(double &zBegin, double &zEnd) const
Definition: BeamBeam.cpp:62
Abstract beam-beam interaction.
Definition: BeamBeam.h:37
3-dimensional matrix.
Definition: Matrix3D.h:33
virtual const Vector3D & getBunchDisplacement() const =0
Get displacement.
A 3-dimension vector.
Definition: Vector3D.h:31
virtual ElementBase::ElementType getType() const
Get element type std::string.
Definition: BeamBeam.cpp:67
const std::string name
Interface for a single beam element.
Definition: Component.h:51
Abstract algorithm.