Class TransverseSolenoid

All Implemented Interfaces:
IMagField

public class TransverseSolenoid extends Solenoid
  • Method Details

    • getName

      public String getName()
      Description copied from interface: IMagField
      Get the name of the field
      Specified by:
      getName in interface IMagField
      Overrides:
      getName in class Solenoid
      Returns:
      the name, e.e. "Torus"
    • toString

      public final String toString()
      Get some data as a string.
      Overrides:
      toString in class MagneticField
      Returns:
      a string representation.
    • printConfiguration

      public void printConfiguration(PrintStream ps)
      Print the current configuration
      Specified by:
      printConfiguration in interface IMagField
      Overrides:
      printConfiguration in class Solenoid
      Parameters:
      ps - the print stream
    • isActive

      public boolean isActive()
      Checks this field active.
      Overrides:
      isActive in class Solenoid
      Returns:
      true if this field is active;
    • fromBinaryFile

      public static TransverseSolenoid fromBinaryFile(File file) throws FileNotFoundException
      Obtain a transverse solenoid object from a binary file.
      Parameters:
      file - the file to read
      Returns:
      the transverse solenoid object
      Throws:
      FileNotFoundException - the file not found exception
    • contains

      public boolean contains(double x, double y, double z)
      Checks whether the field boundary contain the given point.
      Specified by:
      contains in interface IMagField
      Overrides:
      contains in class MagneticField
      Parameters:
      x - the x coordinate in cm
      y - the y coordinate in cm
      z - the z coordinate in cm
      Returns:
      true if the field contains the given point