12#ifndef OPALX_Component_HH
13#define OPALX_Component_HH
25template <
class T,
int N>
36 explicit Component(
const std::string& name);
94 virtual bool apply(
const std::shared_ptr<ParticleContainer_t>& pc);
163 virtual void setDesignEnergy(
const double& energy,
bool changeable =
true);
175 virtual void goOnline(
const double& kineticEnergy);
ippl::Vector< T, Dim > Vector_t
BVector Bfield(const Point3D &P) const
Return the field in a point.
virtual ElementType getType() const
Get element type std::string.
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)
Apply to reference particle with position R and momemtum P.
virtual void finalise()=0
virtual const EMField & getField() const =0
Return field.
virtual bool getPotential(const Vector_t< double, 3 > &, const double &, Vector_t< double, 3 > &, double &)
Calculate the four-potential at some position relative to the component.
virtual double getDesignEnergy() const
virtual void trackBunch(PartBunch_t &bunch, const PartData &, bool revBeam, bool revTrack) const
Track a borrowed particle bunch through a non-standard component.
virtual void initialise(PartBunch_t *bunch, double &startField, double &endField)=0
virtual void goOnline(const double &kineticEnergy)
virtual void trackMap(FVps< double, 6 > &map, const PartData &, bool revBeam, bool revTrack) const
Track a map.
virtual EMField & getField()=0
Return field.
virtual void getFieldExtend(double &zBegin, double &zEnd) const =0
Return the field-support extent of the component.
virtual bool bends() const =0
PartBunch_t * RefPartBunch_m
virtual void setDesignEnergy(const double &energy, bool changeable=true)
static const std::vector< double > defaultAperture_m
EBVectors EBfield(const Point3D &P) const
Return the field in a point.
virtual const ElementBase & getDesign() const
Return design element.
EVector Efield(const Point3D &P) const
Return the field in a point.
void setExitFaceSlope(const double &)
virtual bool apply(const std::shared_ptr< ParticleContainer_t > &pc)
Apply to all particles. Kernel launch moved inside the function.
A representation of an electromagnetic field.
Abstract base class for electromagnetic fields.
virtual BVector Bfield(const Point3D &P) const
Get field.
virtual EVector Efield(const Point3D &P) const
Get field.
virtual EBVectors EBfield(const Point3D &P) const
Get field.
An electric field vector.
Container for all per-particle (and per-simulation) fields tracked during OPALX tracking.