28 #ifndef _CLASSIC_FIELDS_SECTORMAGNETICFIELDMAP_HH_
29 #define _CLASSIC_FIELDS_SECTORMAGNETICFIELDMAP_HH_
38 namespace interpolation {
178 void print(std::ostream& out);
225 static std::map<std::string, SectorMagneticFieldMap*>
_fields;
256 std::vector<double>
units,
259 int smoothing_order);
266 static std::vector< std::vector<double> >
readLines
267 (std::string file_name, std::vector<double> units);
271 const std::vector< std::vector<double> > field_points,
276 const std::vector< std::vector<double> > field_points,
281 const std::vector< std::vector<double> > field_points,
285 int smoothing_order);
293 (std::vector<double> field_item1, std::vector<double> field_item2);
double getPhiOffset() const
void setInterpolator(interpolation::VectorMap *interpolator)
item[EANGLE] Entrance edge angle(radians).\item[ROTATION] Rotation of the magnet about its central axis(radians
static const std::string errMsg1
bool getFieldstrength(const Vector_t &R_c, Vector_t &E_c, Vector_t &B_c) const
std::vector< double > units_m
SectorMagneticFieldMap(std::string file_name, std::string symmetry, double length_units, double field_units, int polynomial_order, int smoothing_order)
double getDeltaPhi() const
bool applySymmetry(double *R_temp) const
static void clearFieldCache()
SectorMagneticFieldMap & operator=(const SectorMagneticFieldMap &field)
static interpolation::VectorMap * getInterpolator(const std::vector< std::vector< double > > field_points, interpolation::ThreeDGrid *grid, SectorMagneticFieldMap::symmetry sym)
void setFrequency(double)
void setSymmetry(std::string name)
static interpolation::VectorMap * getInterpolatorPolyPatch(const std::vector< std::vector< double > > field_points, interpolation::ThreeDGrid *grid, SectorMagneticFieldMap::symmetry sym, int poly_order, int smoothing_order)
static bool comparator(std::vector< double > field_item1, std::vector< double > field_item2)
static interpolation::ThreeDGrid * generateGrid(const std::vector< std::vector< double > > field_points, SectorMagneticFieldMap::symmetry sym)
interpolation::VectorMap * interpolator_m
std::string getFieldMapFileName() const
static const double fractionalBBPhiTolerance_m
handles reading sector field maps
bool getFieldDerivative(const Vector_t &R, Vector_t &E, Vector_t &B, const DiffDirection &dir) const
static const int sortOrder_m[3]
static const double floatTolerance_m
double getFrequency() const
static std::vector< std::vector< double > > readLines(std::string file_name, std::vector< double > units)
friend class SectorMagneticFieldMapIO
static std::string SymmetryToString(symmetry sym)
const std::string filename_m
~SectorMagneticFieldMap()
handles field map grids with sector geometry
void print(std::ostream &out)
static symmetry StringToSymmetry(std::string name)
interpolation::VectorMap * getInterpolator()
std::string getSymmetry() const
void Rotate(double *value, double angle)
void setPhiOffset(double dphi)
static std::map< std::string, SectorMagneticFieldMap * > _fields
static bool floatGreaterEqual(double in1, double in2)
void getInfo(Inform *msg)
static interpolation::VectorMap * readMap(std::string file_name, std::vector< double > units, SectorMagneticFieldMap::symmetry sym, int poly_order, int smoothing_order)