// 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 "IFieldMapDescription.hxx" #include "IBLFieldMap.hxx" #include #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, const TVector3* translation, const TRotation* rotation); static IFieldMap* Recreate(const IElementFieldDescription& description); static const char* GetTypeOfDescription(){return IFieldMapDescription::Class()->GetName();} //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 const COMET::IElementFieldDescription* MakeDescription(); private: std::string fFilename; Double_t fScaling; Double_t fGradient; Double_t fTimeOffset; COMET::IBLFieldMap *fMap; Bool_t fIsGood; }; #endif