00001 // AK20110616 Class to implement a 3D field map 00002 // Modified from BLCMDfieldmap.cc from G4beamline v2.03 00003 // 00004 #ifndef MyFieldMap_hh 00005 #define MyFieldMap_hh 1 00006 00007 #include "G4LogicalVolume.hh" 00008 00009 #include "MyElementField.hh" 00010 #include "MyGlobalField.hh" 00011 #include "MyBLFieldMap.hh" 00012 00013 class MyFieldMap : public MyElementField { 00014 public: 00015 //Constructor 00016 MyFieldMap(G4String fieldMapFile, G4double current, G4double gradient, 00017 G4double timeOffset, G4LogicalVolume* fieldVolume); 00018 00019 //Destructor 00020 ~MyFieldMap(); 00021 00022 // addFieldValue() adds the field for this map to the values in field[]. 00023 // point[] is in global coordinates. 00024 void addFieldValue(const G4double point[4], G4double field[6]) const; 00025 00026 // Set rotation matrix of placed instance 00027 void setRot(G4RotationMatrix * aRotMat); 00028 00030 virtual G4double getMaxLength() { return fMaxLength; } 00031 00033 virtual G4double getMaxWidth() { return fMaxWidth; } 00034 00036 virtual G4double getMaxHeight() { return fMaxHeight; } 00037 00038 private: 00039 G4RotationMatrix *fRotation; 00040 G4double fCurrent; 00041 G4double fGradient; 00042 G4double fTimeOffset; 00043 MyBLFieldMap *fMap; 00044 00045 G4double fMaxLength; 00046 G4double fMaxWidth; 00047 G4double fMaxHeight; 00048 00049 }; 00050 #endif