Class Reference for E1039 Core & Analysis Software
PHField3DCartesian.h
Go to the documentation of this file.
1 #ifndef __PHField3DCartesian_H__
2 #define __PHField3DCartesian_H__
3 
4 #include "PHField.h"
5 
6 #include <boost/tuple/tuple.hpp>
7 
8 #include <map>
9 #include <set>
10 
13 {
14  public:
15  PHField3DCartesian(const std::string &fname, const float magfield_rescale = 1.0);
16  virtual ~PHField3DCartesian();
17 
22  void GetFieldValue(const double Point[4], double *Bfield) const;
23 
25  double GetZMin() const { return zmin; }
26  double GetZMax() const { return zmax; }
27 
28  protected:
29  std::string filename;
30  std::set<double> xvals;
31  std::set<double> yvals;
32  std::set<double> zvals;
33  std::map<boost::tuple<double, double, double>, boost::tuple<double, double, double> > fieldmap;
34  double xmin;
35  double xmax;
36  double ymin;
37  double ymax;
38  double zmin;
39  double zmax;
40  double xstepsize;
41  double ystepsize;
42  double zstepsize;
43  // these are updated in a const method
44  // to cache previous values
45  mutable double xyz[2][2][2][3];
46  mutable double bf[2][2][2][3];
47  mutable double xkey_save;
48  mutable double ykey_save;
49  mutable double zkey_save;
50  mutable int cache_hits;
51  mutable int cache_misses;
52 };
53 
54 #endif // __PHFIELD3D_H
untested code - I don't know if this is being used, drop me a line (with the field) and I test this -...
std::map< boost::tuple< double, double, double >, boost::tuple< double, double, double > > fieldmap
std::set< double > zvals
double xyz[2][2][2][3]
std::set< double > yvals
double GetZMin() const
return the min and max in z
std::set< double > xvals
double bf[2][2][2][3]
PHField3DCartesian(const std::string &fname, const float magfield_rescale=1.0)
void GetFieldValue(const double Point[4], double *Bfield) const
double GetZMax() const
transient DST object for field storage and access
Definition: PHField.h:14