OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
Laser.h
Go to the documentation of this file.
1#ifndef OPALX_Laser_HH
2#define OPALX_Laser_HH
3
5
25class Laser : public Component {
26public:
28 Laser();
29
31 explicit Laser(const std::string& name);
32
34 Laser(const Laser& right);
35
37 ~Laser() override;
38
40 void accept(BeamlineVisitor&) const override;
41
48 void initialise(PartBunch_t* bunch, double& startField, double& endField) override;
49
51 void finalise() override;
52
54 bool bends() const override;
55
57 void getFieldExtend(double& zBegin, double& zEnd) const override;
58
60 ElementType getType() const override;
61
63 int getRequiredNumberOfTimeSteps() const override;
64
66 void setWavelength(double wavelength);
67
69 double getWavelength() const;
70
72 void setPulseEnergy(double pulseEnergy);
73
75 double getPulseEnergy() const;
76
78 void setPulseLength(double pulseLength);
79
81 double getPulseLength() const;
82
84 void setWaistX(double waistX);
85
87 double getWaistX() const;
88
90 void setWaistY(double waistY);
91
93 double getWaistY() const;
94
96 void setDirection(const Vector_t<double, 3>& direction);
97
99 const Vector_t<double, 3>& getDirection() const;
100
102 void setStokes(const Vector_t<double, 3>& stokes);
103
105 const Vector_t<double, 3>& getStokes() const;
106
112 double getPhotonEnergyGeV() const;
113
128 double electronTotalEnergyGeV, const Vector_t<double, 3>& beamDirection) const;
129
144 double electronTotalEnergyGeV, const Vector_t<double, 3>& beamDirection) const;
145
146private:
151 double waistX_m;
152 double waistY_m;
155};
156
157inline int Laser::getRequiredNumberOfTimeSteps() const { return 1; }
158
159#endif // OPALX_Laser_HH
Defines the abstract interface for a single beamline component in the accelerator model.
ippl::Vector< T, Dim > Vector_t
ElementType
Definition ElementBase.h:94
Passive OPALX laser element.
Definition Laser.h:25
void setWavelength(double wavelength)
Set the laser wavelength in m.
Definition Laser.cpp:51
void setDirection(const Vector_t< double, 3 > &direction)
Set the laboratory-frame laser propagation direction.
Definition Laser.cpp:71
double getWaistY() const
Get the vertical waist in m.
Definition Laser.cpp:69
double getWaistX() const
Get the horizontal waist in m.
Definition Laser.cpp:65
Vector_t< double, 3 > stokes_m
Definition Laser.h:154
double getPulseLength() const
Get the pulse duration in s.
Definition Laser.cpp:61
int getRequiredNumberOfTimeSteps() const override
Return the minimum number of time steps required by this passive element.
Definition Laser.h:157
void getFieldExtend(double &zBegin, double &zEnd) const override
Get the longitudinal element extent in the current lattice traversal.
Definition Laser.cpp:44
void accept(BeamlineVisitor &) const override
Accept a beamline visitor through the laser-specific interface.
Definition Laser.cpp:32
Laser()
Construct an unnamed laser element.
Definition Laser.cpp:6
double pulseLength_m
Definition Laser.h:150
double startField_m
Definition Laser.h:147
void setWaistX(double waistX)
Set the horizontal waist in m.
Definition Laser.cpp:63
void setPulseEnergy(double pulseEnergy)
Set the total pulse energy in J.
Definition Laser.cpp:55
Vector_t< double, 3 > direction_m
Definition Laser.h:153
ElementType getType() const override
Return the OPALX element type identifier.
Definition Laser.cpp:49
void setPulseLength(double pulseLength)
Set the pulse duration in s.
Definition Laser.cpp:59
void initialise(PartBunch_t *bunch, double &startField, double &endField) override
Initialize the element for a tracking pass.
Definition Laser.cpp:34
bool bends() const override
Return false because the element has straight reference geometry.
Definition Laser.cpp:42
double getLinearComptonForwardPhotonEnergyGeV(double electronTotalEnergyGeV, const Vector_t< double, 3 > &beamDirection) const
Compute the forward scattered photon energy for linear Compton scattering.
Definition Laser.cpp:87
double waistY_m
Definition Laser.h:152
double getWavelength() const
Get the laser wavelength in m.
Definition Laser.cpp:53
double wavelength_m
Definition Laser.h:148
~Laser() override
Destroy the laser element.
Definition Laser.cpp:30
double getPhotonEnergyGeV() const
Convert the stored laser wavelength to a single-photon energy.
Definition Laser.cpp:77
double getPulseEnergy() const
Get the total pulse energy in J.
Definition Laser.cpp:57
double pulseEnergy_m
Definition Laser.h:149
void setWaistY(double waistY)
Set the vertical waist in m.
Definition Laser.cpp:67
const Vector_t< double, 3 > & getDirection() const
Get the laboratory-frame laser propagation direction.
Definition Laser.cpp:73
double getLinearComptonInvariantX(double electronTotalEnergyGeV, const Vector_t< double, 3 > &beamDirection) const
Compute the linear Compton invariant x for a given beam direction.
Definition Laser.cpp:81
void setStokes(const Vector_t< double, 3 > &stokes)
Set the normalized Stokes polarization vector.
Definition Laser.cpp:75
double waistX_m
Definition Laser.h:151
void finalise() override
Finalize the element after a tracking pass.
Definition Laser.cpp:40
const Vector_t< double, 3 > & getStokes() const
Get the normalized Stokes polarization vector.
Definition Laser.cpp:93