Class Torus

All Implemented Interfaces:
IMagField

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

    • LOGGER

      public static Logger LOGGER
    • _addedSolenoid

      protected boolean _addedSolenoid
  • Method Details

    • isZeroField

      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

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

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

      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

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

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

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

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

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

      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

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