00001 /* BDSIM code. 00002 00003 */ 00004 00005 #include "G4MagneticField.hh" 00006 #include "globals.hh" 00007 #include "G4RotationMatrix.hh" 00008 #include "G4VPhysicalVolume.hh" 00009 00010 #ifndef BDSMagField_h 00011 #define BDSMagField_h 00012 00013 class BDSMagField : public G4MagneticField 00014 { 00015 public: 00016 00017 // mandatory members 00018 00019 BDSMagField(); 00020 00021 ~BDSMagField(); 00022 00023 virtual G4bool DoesFieldChangeEnergy() const; 00024 00025 virtual void GetFieldValue(const G4double Point[4],G4double *Bfield ) const; 00026 00027 // create a field mesh in the global coordinates after the placement is known 00028 virtual void Prepare(G4VPhysicalVolume *referenceVolume); 00029 00030 // aux members 00031 00032 void SetOriginRotation(G4RotationMatrix rot); 00033 void SetOriginTranslation(G4ThreeVector trans); 00034 00035 public: 00036 virtual G4bool GetHasNPoleFields(); 00037 virtual G4bool GetHasUniformField(); 00038 virtual G4bool GetHasFieldMap(); 00039 00040 G4RotationMatrix rotation; 00041 G4ThreeVector translation; 00042 00043 }; 00044 00045 00046 #endif