Commit 7327d849 authored by kraus's avatar kraus

limit length of fringe field such that the entrance and the exit fringe field...

limit length of fringe field such that the entrance and the exit fringe field of the same dipole don't overlap; This fixes #210
parent b1dac7c5
This diff is collapsed.
......@@ -198,6 +198,10 @@ private:
void retrieveDesignEnergy(double startField);
CoordinateSystemTrafo getBeginToEnd_local() const;
void setCSTrafoToEntranceRegion(const CoordinateSystemTrafo &trafo);
void setCSTrafoToExitRegion(const CoordinateSystemTrafo &trafo);
Vector_t transformToEntranceRegion(const Vector_t &R) const;
Vector_t transformToExitRegion(const Vector_t &R) const;
std::string messageHeader_m;
......@@ -285,6 +289,8 @@ private:
CoordinateSystemTrafo beginToEnd_m;
CoordinateSystemTrafo beginToEnd_lcs_m; // local coordinate system
CoordinateSystemTrafo toEntranceRegion_m;
CoordinateSystemTrafo toExitRegion_m;
CoordinateSystemTrafo computeAngleTrafo_m;
double maxAngle_m;
......@@ -389,4 +395,24 @@ CoordinateSystemTrafo Bend::getBeginToEnd_local() const
return beginToEnd_lcs_m;
}
inline
void Bend::setCSTrafoToEntranceRegion(const CoordinateSystemTrafo &trafo) {
toEntranceRegion_m = trafo;
}
inline
void Bend::setCSTrafoToExitRegion(const CoordinateSystemTrafo &trafo) {
toExitRegion_m = trafo;
}
inline
Vector_t Bend::transformToEntranceRegion(const Vector_t &R) const {
return toEntranceRegion_m.transformTo(R);
}
inline
Vector_t Bend::transformToExitRegion(const Vector_t &R) const {
return toExitRegion_m.transformTo(R);
}
#endif // CLASSIC_BEND_H
\ No newline at end of file
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