MollerMagnetFieldMap.hh

Go to the documentation of this file.
00001 //=============================================================================
00002 // 
00003 //   ---------------------------
00004 //  | Doxygen File Information |
00005 //  ---------------------------
00006 /**
00007  
00008    \file MollerMagnetFieldMap.hh
00009    $Revision: 1.2 $ 
00010    $Date: 2005/12/27 19:25:23 $
00011    \author Klaus Hans Grimm
00012      
00013 */
00014 //=============================================================================
00015 // 
00016 //=============================================================================
00017 // 
00018 //   ---------------------------
00019 //  | Doxygen Class Information |
00020 //  ---------------------------
00021 /**
00022    \class MollerMagnetFieldMap
00023     
00024    \brief Reads the field maps and interpolates the field value for any space point.
00025 
00026    The field read-in, grid initialization, various "checking" routines and field
00027    interpolation are performed in this class.
00028     
00029  */
00030 //=============================================================================
00031 //
00032 //=============================================================================
00033 //   -----------------------
00034 //  | CVS File Information |
00035 //  -----------------------
00036 // 
00037 //  Last Update:      $Author: grimm $
00038 //  Update Date:      $Date: 2005/12/27 19:25:23 $
00039 //  CVS/RCS Revision: $Revision: 1.2 $
00040 //  Status:           $State: Exp $
00041 // 
00042 // ===================================
00043 //  CVS Revision Log at end of file !!
00044 // ===================================
00045 // 
00046 //=============================================================================
00047 
00048 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00049 #ifndef MollerMagnetFieldMap_h
00050 #define MollerMagnetFieldMap_h 
00051 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00052 
00053 // system includes
00054 #include <vector>
00055 
00056 // geant4 includes
00057 #include "Geant4_include.hh" 
00058 
00059 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00060 class MollerMagnetFieldMap : public G4MagneticField
00061 {
00062 public:
00063 
00064    MollerMagnetFieldMap();
00065   
00066   virtual ~MollerMagnetFieldMap();
00067 
00068   void GetFieldValue( const   G4double Point[4], G4double *Bfield ) const;  
00069   void GetFieldValueFromGridCell( const  G4int GridPoint_R, 
00070           const  G4int GridPoint_Phi, 
00071           const  G4int GridPoint_Z, 
00072           G4double *BFieldGridValue ) const;
00073 
00074   void InitializeGrid();
00075   void ReadFieldMap(const char* filename);
00076   void PrintFieldCheck(const char* filename);
00077   void PrintGridCheck(const char* filename);
00078 
00079   void SetFieldMap_RMin      ( G4double Rmin      ) { rMinFromMap    = Rmin;      }
00080   void SetFieldMap_RMax      ( G4double Rmax      ) { rMaxFromMap    = Rmax;      }
00081   void SetFieldMap_RStepsize ( G4double Rstepsize ) { gridstepsize_r = Rstepsize; }
00082 
00083   void SetFieldMap_ZMin      ( G4double Zmin      ) { zMinFromMap    = Zmin;      }
00084   void SetFieldMap_ZMax      ( G4double Zmax      ) { zMaxFromMap    = Zmax;      }
00085   void SetFieldMap_ZStepsize ( G4double Zstepsize ) { gridstepsize_z = Zstepsize; }
00086 
00087   void SetFieldMap_PhiMin      ( G4double Phimin      ) { phiMinFromMap    = Phimin;      }
00088   void SetFieldMap_PhiMax      ( G4double Phimax      ) { phiMaxFromMap    = Phimax;      }
00089   void SetFieldMap_PhiStepsize ( G4double Phistepsize ) { gridstepsize_phi = Phistepsize; }
00090 
00091 private:
00092   G4int nGridPointsInR;
00093   G4int nGridPointsInPhi;
00094   G4int nGridPointsInZ;  
00095 
00096   G4double rMinFromMap;
00097   G4double rMaxFromMap;
00098    
00099   G4double phiMinFromMap;
00100   G4double phiMaxFromMap;
00101    
00102   G4double zMinFromMap;
00103   G4double zMaxFromMap;
00104    
00105   G4double gridstepsize_r;
00106   G4double gridstepsize_phi;
00107   G4double gridstepsize_z;
00108 
00109 
00110   G4double Unit_Length;
00111   G4double Unit_Angle;
00112   G4double Unit_Bfield; // units of field map 
00113 
00114 // Storage space for the table
00115   std::vector< std::vector< std::vector< G4double > > > BFieldGridData_X;
00116   std::vector< std::vector< std::vector< G4double > > > BFieldGridData_Y;
00117   std::vector< std::vector< std::vector< G4double > > > BFieldGridData_Z;
00118 
00119   G4double fZoffset;
00120   G4bool   invertX, invertY, invertZ;
00121 
00122   G4ThreeVector* BField_ANSYS;
00123   
00124   G4double BFieldScalingFactor;
00125 
00126   //  G4double sectorcentrephi;
00127 
00128 };
00129 
00130 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
00131 
00132 #endif
00133 
00134 //=======================================================================================
00135 //   -----------------------
00136 //  | CVS File Information |
00137 //  -----------------------
00138 // 
00139 //      $Revisions$  
00140 //      $Log: MollerMagnetFieldMap.hh,v $
00141 //      Revision 1.2  2005/12/27 19:25:23  grimm
00142 //      - Redesign of Doxygen header containing CVS info like revision and date
00143 //      - Added CVS revision log at the end of file
00144 //
00145 // 
00146 

Generated on 16 Jun 2013 for mollersim by  doxygen 1.6.1