#include "G4ElectricField.hh"
#include"G4ThreeVector.hh"
#include"G4ios.hh"

class LEMuSRCryoField : public G4ElectricField
{
public: 


  LEMuSRCryoField(G4ThreeVector FieldVector);
  LEMuSRCryoField(G4ThreeVector FieldVector,G4double radius,G4double zmin, G4double zmax,G4double mcpv_z);
  ~LEMuSRCryoField();

  G4bool   DoesFieldChangeEnergy() const { return true; }
  // Since an electric field can change track energy
  
  void GetFieldValue(const G4double pos[4], G4double *field) const;
  
  G4bool uniform;


  G4double R;

  
private:
  G4double flength, fpotential, fradius, fzmin, fzmax;


  G4ThreeVector position;
  G4ThreeVector EField;

};
