1#ifndef OPALX_Solenoid_HH
2#define OPALX_Solenoid_HH
36 explicit Solenoid(
const std::string& name);
47 virtual bool apply(
const std::shared_ptr<ParticleContainer_t>& pc)
override;
98 virtual double getBz()
const = 0;
101 void setKS(
double ks);
118 virtual bool bends()
const override;
121 virtual void goOnline(
const double& kineticEnergy)
override;
144 virtual void getFieldExtend(
double& zBegin,
double& zEnd)
const override;
Defines the abstract interface for a single beamline component in the accelerator model.
ippl::Vector< T, Dim > Vector_t
Rigid spatial transform between a parent frame and a local frame.
virtual double getElementLength() const
Get design length.
Abstract base class for all field maps. It acts as a factory for creating specific field map types ba...
Quaternion storage and rotation algebra used by OPALX geometry code.
Abstract class for a solenoid magnet.
virtual double getBz() const =0
Get solenoid field Bz.
virtual CoordinateSystemTrafo getEdgeToBegin() const override
Get the coordinate transformation to the begin of the element.
double scaleError_m
Scale error multiplier.
void setFast(bool fast)
Set the fast flag.
double endField_m
End point of the field support in the local chart.
virtual void initialise(PartBunch_t *bunch, double &startField, double &endField) override
initialise the solenoid element
virtual void getElementDimensions(double &zBegin, double &zEnd) const override
Return the nominal body extent of the solenoid.
virtual void getFieldExtend(double &zBegin, double &zEnd) const override
Return the local field-support interval of the solenoid.
double startField_m
Starting point of the field.
virtual void goOffline() override
Free field map and go offline.
virtual void goOnline(const double &kineticEnergy) override
Load field map and go online.
virtual void finalise() override
bool fast_m
Fast tracking flag.
virtual CoordinateSystemTrafo getEdgeToEnd() const override
Get the coordinate transformation to the end of the element.
bool getFast() const
Get the fast flag.
virtual bool bends() const override
void setDKS(double ks)
Set the strength scaling error dks.
Fieldmap * fieldmap_m
Fieldmap pointer.
virtual ElementType getType() const override
Get the element type.
std::string filename_m
Name of the field map file.
virtual bool isInside(const Vector_t< double, 3 > &r) const override
Check if position r is inside the field map.
bool getSupportEnvelope(double &horizontalRadius, double &verticalRadius) const
Get a finite transverse support envelope for placement/export.
virtual bool applyToReferenceParticle(const Vector_t< double, 3 > &R, const Vector_t< double, 3 > &P, const double &t, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B) override
Apply to reference particle with position R and momemtum P.
void setKS(double ks)
Set the strength scaling factor ks.
virtual bool apply(const std::shared_ptr< ParticleContainer_t > &pc) override
apply the solenoid field to all particles in the bunch
void setFieldMapFN(std::string fn)
Assign the field filename.
void operator=(const Solenoid &)
virtual void accept(BeamlineVisitor &) const override
Apply visitor to Solenoid.
double scale_m
Scale multiplier.