#ifndef OAEMFIELD_ISOLENOIDFIELD_HXX #define OAEMFIELD_ISOLENOIDFIELD_HXX #include "IElementField.hxx" #include "IFieldManager.hxx" #include "ISolenoidFieldDescription.hxx" #include "IBLCoil.hxx" #include #include #include #include namespace COMET{ class ISolenoidField; } /// ISolenoidField is based on SolenoidField from G4beamline with major /// modifications class COMET::ISolenoidField : public COMET::IElementField { public: // Constructor ISolenoidField( double current, double coilInnerRadius, double coilOuterRadius, double coilLFullength, const TVector3* translation, const TRotation* rotation, int verbose=0 , double maxR=0 , double maxZ=0, int nSheets=0 , double tolerance=0.01); // Construct from a previous description object static ISolenoidField* Recreate(const IElementFieldDescription& description); static const char* GetTypeOfDescription(){return ISolenoidFieldDescription::Class()->GetName();} // Destructor ~ISolenoidField(); /// addFieldValue() adds the field for this solenoid into field[]. /// Calls coil->addField() after converting to relative coords. /// point[] is in global coordinates. void getFieldValue(const double LocalPoint[4], double LocalField[6]) const; /// Make a persistable IDatum with all the details to describe this element of the field virtual const COMET::IElementFieldDescription* MakeDescription(); /// Return the directory that should contain all cache files std::string GetCacheDirectory()const; private: COMET::IBLCoil *fCoil; double fCurrent; double fLength; double fOuterRadius; double fInnerRadius; }; #endif // OAEMFIELD_ISOLENOIDFIELD_HXX