MpdFieldMapSym3.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. // -------------------------------------------------------------------------
  2. // ----- MpdFieldMapSym3 header file -----
  3. // ----- Created 12/01/04 by M. Al/Turany (CbmField.h) -----
  4. // ----- Redesign 20/02/06 by V. Friese -----
  5. // -------------------------------------------------------------------------
  6. /** MpdFieldMapSym3.h
  7. ** @author M.Al/Turany <m.al-turany@gsi.de>
  8. ** @author V.Friese <v.friese@gsi.de>
  9. ** @since 12.01.2004
  10. ** @version1.0
  11. **
  12. ** Magnetic field map on a 3-D grid with symmetries w.r.t. the three
  13. ** coordinate axes. The map is only stored in the octant x>0, y>0, z>0.
  14. ** The symmetries are:
  15. ** - Bx is antisymmetric in x and symmetric in y and z
  16. ** - By is symmetric in x, y and z
  17. ** - Bz is antisymmetric in x and z and symmetric in y
  18. **
  19. ** Field values are hold and returned in kG.
  20. **/
  21. #ifndef MPDMAGFIELDMAPSYM3_H
  22. #define MPDMAGFIELDMAPSYM3_H 1
  23. #include "MpdFieldMap.h"
  24. class MpdFieldPar;
  25. class MpdFieldMapSym3 : public MpdFieldMap {
  26. public:
  27. /** Default constructor **/
  28. MpdFieldMapSym3();
  29. /** Standard constructor
  30. ** @param name Name of field map
  31. ** @param fileType R = ROOT file, A = ASCII
  32. **/
  33. MpdFieldMapSym3(const char* mapName, const char* fileType = "R");
  34. /** Constructor from MpdFieldPar **/
  35. MpdFieldMapSym3(MpdFieldPar* fieldPar);
  36. /** Destructor **/
  37. virtual ~MpdFieldMapSym3();
  38. /** Get the field components at a certain point
  39. ** @param x,y,z Point coordinates (global) [cm]
  40. ** @value Bx,By,Bz Field components [kG]
  41. **/
  42. virtual Double_t GetBx(Double_t x, Double_t y, Double_t z);
  43. virtual Double_t GetBy(Double_t x, Double_t y, Double_t z);
  44. virtual Double_t GetBz(Double_t x, Double_t y, Double_t z);
  45. /** Determine whether a point is inside the field map
  46. ** @param x,y,z Point coordinates (global) [cm]
  47. ** @param ix,iy,iz (return) Grid cell
  48. ** @param dx,dy,dz (return) Distance from grid point [cm] if inside
  49. ** @value kTRUE if inside map, else kFALSE
  50. **/
  51. virtual Bool_t IsInside(Double_t x, Double_t y, Double_t z,
  52. Int_t& ix, Int_t& iy, Int_t& iz,
  53. Double_t& dx, Double_t& dy, Double_t& dz);
  54. protected:
  55. /** Hemispheres of a point (for temporary use) **/
  56. Double_t fHemiX, fHemiY, fHemiZ; //!
  57. ClassDef(MpdFieldMapSym3,1)
  58. };
  59. #endif