Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SQField3DCartesian.h
Go to the documentation of this file.
1 #ifndef __SQField3DCartesian_H__
2 #define __SQField3DCartesian_H__
3 
4 #include "PHField.h"
5 
6 #include <TVector3.h>
7 
8 #include <vector>
9 #include <string>
10 #include <set>
11 
13 {
14 public:
15  SQField3DCartesian(const std::string& fname, const float magfield_rescale = 1.0);
16  virtual ~SQField3DCartesian();
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 
29  int GetGlobalIndex(int xIdx, int yIdx, int zIdx) const;
30 
31 protected:
32  class FieldPoint
33  {
34  public:
35  double x;
36  double y;
37  double z;
38  TVector3 B;
39  };
40 
41  std::string filename;
42  std::set<double> xvals;
43  std::set<double> yvals;
44  std::set<double> zvals;
45  std::vector<FieldPoint> fpoints;
46 
47  int xsteps;
48  int ysteps;
49  int zsteps;
50  double xmin;
51  double xmax;
52  double ymin;
53  double ymax;
54  double zmin;
55  double zmax;
56  double xstepsize;
57  double ystepsize;
58  double zstepsize;
59 
60  double fieldstr;
61 };
62 
63 #endif // __SQField3D_H
std::set< double > yvals
SQField3DCartesian(const std::string &fname, const float magfield_rescale=1.0)
std::vector< FieldPoint > fpoints
std::set< double > zvals
std::set< double > xvals
transient DST object for field storage and access
Definition: PHField.h:13
void GetFieldValue(const double Point[4], double *Bfield) const
double GetZMax() const
int GetGlobalIndex(int xIdx, int yIdx, int zIdx) const
return the index of the global index based on the local index
double GetZMin() const
return the min and max in z