Class Torus

All Implemented Interfaces:
IMagField

public class Torus extends MagneticField
The Class Torus.
Author:
David Heddle, Nicole Schumacher
  • Field Details Link icon

    • LOGGER Link icon

      public static Logger LOGGER
    • _addedSolenoid Link icon

      protected boolean _addedSolenoid
  • Method Details Link icon

    • isZeroField Link icon

      public final boolean isZeroField()
      Checks whether the field has been set to always return zero.
      Specified by:
      isZeroField in interface IMagField
      Overrides:
      isZeroField in class MagneticField
      Returns:
      true if the field is set to return zero.
    • isActive Link icon

      public boolean isActive()
      Checks this field active.
      Specified by:
      isActive in class MagneticField
      Returns:
      true if this field is active;
    • isSolenoidAdded Link icon

      public boolean isSolenoidAdded()
      Has part of the solenoid been added in to remove the overlap?
      Returns:
      true if the solenoid was added in.
    • fromBinaryFile Link icon

      public static Torus fromBinaryFile(File file) throws FileNotFoundException
      Obtain a torus object from a binary file, probably "clas12-fieldmap-torus.dat"
      Parameters:
      file - the file to read
      Returns:
      the torus object
      Throws:
      FileNotFoundException - the file not found exception
    • getPhiMax Link icon

      public double getPhiMax()
      Get the maximum phi coordinate of the field boundary (deg)
      Returns:
      the maximum phi coordinate of the field boundary
    • getPhiMin Link icon

      public double getPhiMin()
      Get the minimum phi coordinate of the field boundary (deg)
      Returns:
      the minimum phi coordinate of the field boundary
    • getName Link icon

      public String getName()
      Get the name of the field
      Returns:
      the name
    • isFullMap Link icon

      public boolean isFullMap()
      Check whether there is an assume 12-fold symmetry
      Returns:
      true if this is a full map
    • toString Link icon

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

      public void addToField(int compositeIndex, float[] result)
      Used to add the solenoid into the torus. Experimental!!
      Parameters:
      compositeIndex - the composite index
      result - the solenoid field added in
    • printConfiguration Link icon

      public void printConfiguration(PrintStream ps)
      Print the current configuration
      Parameters:
      ps - the print stream