Commit a941a06f authored by adelmann's avatar adelmann 🎗
Browse files

woking on correctors

parent a2add8fa
......@@ -61,7 +61,9 @@ bool Corrector::apply(const Vector_t &R, const Vector_t &centroid, const double
}
void Corrector::initialise(PartBunch *bunch, double &startField, double &endField, const double &scaleFactor) {
endField = startField + getElementLength();
RefPartBunch_m = bunch;
startField_m = startField;
}
void Corrector::finalise()
......@@ -72,9 +74,20 @@ bool Corrector::bends() const {
}
void Corrector::getDimensions(double &zBegin, double &zEnd) const
{ }
{
zBegin = startField_m;
zEnd = startField_m + getElementLength();
}
const string &Corrector::getType() const {
static const string type("Corrector");
return type;
}
void Corrector::SetKickX(double k) {kickX_m = k; }
void Corrector::SetKickY(double k) {kickY_m = k; }
double Corrector::GetKickX() const {return kickX_m; }
double Corrector::GetKickY() const {return kickY_m; }
......@@ -93,6 +93,20 @@ public:
virtual void getDimensions(double &zBegin, double &zEnd) const;
void SetKickX(double k);
void SetKickY(double k);
double GetKickX() const;
double GetKickY() const;
private:
double startField_m;
double kickX_m;
double kickY_m;
protected:
// Not implemented.
......
......@@ -301,7 +301,7 @@ void OpalBeamline::visit(const T &element, Tracker &, PartBunch *bunch) {
double endField;
elptr->initialise(bunch, startField, endField, 1.0);
elements_m.push_back(OpalField(elptr, startField, endField));
msg << element.getType() << " ELEMEDGE=" << startField << endl;
msg << element.getType() << " ELEMEDGE=" << startField << endl;
}
template<> inline
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment