21 startField_m(right.startField_m),
22 wavelength_m(right.wavelength_m),
23 pulseEnergy_m(right.pulseEnergy_m),
24 pulseLength_m(right.pulseLength_m),
25 waistX_m(right.waistX_m),
26 waistY_m(right.waistY_m),
27 direction_m(right.direction_m),
28 stokes_m(right.stokes_m) {}
ippl::Vector< T, Dim > Vector_t
virtual void visitLaser(const Laser &)=0
Apply the algorithm to a laser element.
PartBunch_t * RefPartBunch_m
virtual double getElementLength() const
Get design length.
Passive OPALX laser element.
void setWavelength(double wavelength)
Set the laser wavelength in m.
void setDirection(const Vector_t< double, 3 > &direction)
Set the laboratory-frame laser propagation direction.
double getWaistY() const
Get the vertical waist in m.
double getWaistX() const
Get the horizontal waist in m.
Vector_t< double, 3 > stokes_m
double getPulseLength() const
Get the pulse duration in s.
void getFieldExtend(double &zBegin, double &zEnd) const override
Get the longitudinal element extent in the current lattice traversal.
void accept(BeamlineVisitor &) const override
Accept a beamline visitor through the laser-specific interface.
Laser()
Construct an unnamed laser element.
void setWaistX(double waistX)
Set the horizontal waist in m.
void setPulseEnergy(double pulseEnergy)
Set the total pulse energy in J.
Vector_t< double, 3 > direction_m
ElementType getType() const override
Return the OPALX element type identifier.
void setPulseLength(double pulseLength)
Set the pulse duration in s.
void initialise(PartBunch_t *bunch, double &startField, double &endField) override
Initialize the element for a tracking pass.
bool bends() const override
Return false because the element has straight reference geometry.
double getLinearComptonForwardPhotonEnergyGeV(double electronTotalEnergyGeV, const Vector_t< double, 3 > &beamDirection) const
Compute the forward scattered photon energy for linear Compton scattering.
double getWavelength() const
Get the laser wavelength in m.
~Laser() override
Destroy the laser element.
double getPhotonEnergyGeV() const
Convert the stored laser wavelength to a single-photon energy.
double getPulseEnergy() const
Get the total pulse energy in J.
void setWaistY(double waistY)
Set the vertical waist in m.
const Vector_t< double, 3 > & getDirection() const
Get the laboratory-frame laser propagation direction.
double getLinearComptonInvariantX(double electronTotalEnergyGeV, const Vector_t< double, 3 > &beamDirection) const
Compute the linear Compton invariant x for a given beam direction.
void setStokes(const Vector_t< double, 3 > &stokes)
Set the normalized Stokes polarization vector.
void finalise() override
Finalize the element after a tracking pass.
const Vector_t< double, 3 > & getStokes() const
Get the normalized Stokes polarization vector.
double labForwardPhotonEnergyGeV(double electronTotalEnergyGeV, double laserPhotonEnergyGeV, const Vector_t< double, 3 > &beamDirection, const Vector_t< double, 3 > &laserDirection)
Forward scattered photon energy in the laboratory frame.
double invariantX(double incomingPhotonEnergyERFGeV)
Compute CAIN's linear-Compton invariant .
double photonEnergyFromWavelengthGeV(double wavelength_m)
Convert a laser wavelength to a single-photon energy.