// AK20110616 Class to implement a 3D field map // Modified from BLCMDfieldmap.cc from G4beamline v2.03 // #ifndef IFieldMap_hh #define IFieldMap_hh 1 #include "IElementField.hxx" #include "IFieldManager.hxx" #include "IBLFieldMap.hxx" #include namespace COMET { class IFieldMap; class IElementField; class IElementFieldDescription; } class COMET::IFieldMap : public COMET::IElementField { public: //Constructor IFieldMap(std::string fieldMapFile, Double_t scaling, Double_t gradient, Double_t timeOffset, TVector3 translation, TRotation rotation); //Destructor ~IFieldMap(); // addFieldValue() adds the field for this map to the values in field[]. // point[] is in global coordinates. void getFieldValue(const Double_t LocalPoint[4], Double_t LocalField[6]) const; Bool_t isGood() {return fIsGood;}; virtual COMET::IHandle MakeDescription(); private: std::string fFilename; Double_t fScaling; Double_t fGradient; Double_t fTimeOffset; COMET::IBLFieldMap *fMap; Bool_t fIsGood; }; #endif