28#ifndef ENDFIELDMODEL_ASYMMETRICENGE_H_
29#define ENDFIELDMODEL_ASYMMETRICENGE_H_
58 const std::vector<double> aEnd,
68 std::ostream&
print(std::ostream& out)
const;
71 inline double function(
double x,
int n)
const;
86 inline std::shared_ptr<Enge>
getEngeEnd()
const;
89 inline void setEngeEnd(std::shared_ptr<Enge> eEnd);
107 void rescale(
double scaleFactor);
Calculate the AsymmetricEnge function (e.g.
std::shared_ptr< Enge > getEngeStart() const
Get the enge function for the magnet entrance.
void setEngeEnd(std::shared_ptr< Enge > eEnd)
Set the enge function for the magnet exit.
double getCentreLength() const
Centre length is the average of x0End and x0Start.
double getEndLength() const
End length is the average of lambdaEnd and lambdaStart.
std::ostream & print(std::ostream &out) const
Print a human-readable description of the end field model.
AsymmetricEnge()
Default constructor.
double getX0End() const
Return x0End, offset of the end Enge.
AsymmetricEnge * clone() const
Inheritable copy constructor.
void setX0Start(double x0)
Set x0Start, offset of the start Enge.
double function(double x, int n) const
Return the value of enge at some point x.
void setEngeStart(std::shared_ptr< Enge > eStart)
Set the enge function for the magnet entrance.
double getX0Start() const
Return x0Start, offset of the start Enge.
std::shared_ptr< Enge > getEngeEnd() const
Get the enge function for the magnet exit.
void setX0End(double x0)
Set x0End, offset of the end Enge.
void rescale(double scaleFactor)
Rescale the Enge to a new length scale.
std::shared_ptr< Enge > engeEnd_m
void setMaximumDerivative(size_t n)
Setup the Enge recursion for derivatives.
std::shared_ptr< Enge > engeStart_m
static void setEngeDiffIndices(size_t n)
Recursively calculate the indices for Enge and H.