Class CompositeProbe

java.lang.Object
cnuphys.magfield.FieldProbe
cnuphys.magfield.CompositeProbe
All Implemented Interfaces:
IField
Direct Known Subclasses:
RotatedCompositeProbe

public class CompositeProbe extends FieldProbe
  • Field Details

  • Constructor Details

    • CompositeProbe

      public CompositeProbe(CompositeField field)
      Create a composite probe from a composite field.
      Parameters:
      field - the composite field
  • Method Details

    • field

      public void field(int sector, float x, float y, float z, float[] result)
      Obtain the magnetic field at a given location expressed in Cartesian coordinates for the sector system. The field is returned as a Cartesian vector in kiloGauss.
      Specified by:
      field in interface IField
      Overrides:
      field in class FieldProbe
      Parameters:
      sector - the sector [1..6]
      x - the x sector coordinate in cm
      y - the y sector coordinate in cm
      z - the z sector coordinate in cm
      result - the result is a float array holding the retrieved field in kiloGauss. The 0,1 and 2 indices correspond to x, y, and z components.
    • field

      public void field(float x, float y, float z, float[] result)
      Description copied from interface: IField
      Obtain the magnetic field at a given location expressed in Cartesian coordinates. The field is returned as a Cartesian vector in kiloGauss.
      Parameters:
      x - the x coordinate in cm
      y - the y coordinate in cm
      z - the z coordinate in cm
      result - a float array holding the retrieved field in kiloGauss. The 0,1 and 2 indices correspond to x, y, and z components.
    • isZeroField

      public boolean isZeroField()
      Checks whether the field has been set to always return zero.
      Specified by:
      isZeroField in interface IField
      Overrides:
      isZeroField in class FieldProbe
      Returns:
      true if the field is set to return zero.
    • gradient

      public void gradient(float x, float y, float z, float[] result)
      Obtain an approximation for the magnetic field gradient at a given location expressed in Cartesian coordinates. The field is returned as a Cartesian vector in kiloGauss/cm.
      Specified by:
      gradient in interface IField
      Overrides:
      gradient in class FieldProbe
      Parameters:
      x - the x coordinate in cm
      y - the y coordinate in cm
      z - the z coordinate in cm
      result - a float array holding the retrieved field in kiloGauss. The 0,1 and 2 indices correspond to x, y, and z components.
    • hasTorus

      public boolean hasTorus()
      Check whether we have a torus field
      Returns:
      true if we have a torus
    • hasSolenoid

      public boolean hasSolenoid()
      Check whether we have a solenoid field
      Returns:
      true if we have a solenoid