Class ZeroProbe
java.lang.Object
cnuphys.magfield.FieldProbe
cnuphys.magfield.ZeroProbe
- All Implemented Interfaces:
IField
-
Field Summary
Fields inherited from class FieldProbe
_field, _name, cosSect, q1Coordinate, q2Coordinate, q3Coordinate, ROOT3OVER2, sinSect, X, Y, Z -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontains(double x, double y, double z) Check whether the field boundaries include the pointvoidfield(float x, float y, float z, float[] result) Obtain the magnetic field at a given location expressed in Cartesian coordinates.floatfieldMagnitude(float x, float y, float z) Get the field magnitude in kiloGauss at a given location expressed in Cartesian coordinates.floatObtain the maximum field magnitude of any point in the map.voidgradient(float x, float y, float z, float[] result) Obtain an approximation for the magnetic field gradient at a given location expressed in Cartesian coordinates.booleanChecks whether the field has been set to always return zero.Methods inherited from class FieldProbe
factory, factory, field, getB1, getB2, getB3, getCompositeIndex, getField, getName, getPhiCoordinate, getPhiMax, getPhiMin, getRCoordinate, getRhoMax, getRhoMin, getSector, getZCoordinate, getZMax, getZMin
-
Constructor Details
-
ZeroProbe
public ZeroProbe()
-
-
Method Details
-
fieldMagnitude
public float fieldMagnitude(float x, float y, float z) Description copied from class:FieldProbeGet the field magnitude in kiloGauss at a given location expressed in Cartesian coordinates.- Specified by:
fieldMagnitudein interfaceIField- Overrides:
fieldMagnitudein classFieldProbe- Parameters:
x- the x coordinate in cmy- the y coordinate in cmz- the z coordinate in cm- Returns:
- the magnitude of the field in kiloGauss.
-
getMaxFieldMagnitude
public float getMaxFieldMagnitude()Description copied from class:FieldProbeObtain the maximum field magnitude of any point in the map.- Specified by:
getMaxFieldMagnitudein interfaceIField- Overrides:
getMaxFieldMagnitudein classFieldProbe- Returns:
- the maximum field magnitude in the units of the map.
-
isZeroField
public boolean isZeroField()Description copied from class:FieldProbeChecks whether the field has been set to always return zero.- Specified by:
isZeroFieldin interfaceIField- Overrides:
isZeroFieldin classFieldProbe- Returns:
trueif the field is set to return zero.
-
gradient
public void gradient(float x, float y, float z, float[] result) Description copied from class:FieldProbeObtain 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:
gradientin interfaceIField- Overrides:
gradientin classFieldProbe- Parameters:
x- the x coordinate in cmy- the y coordinate in cmz- the z coordinate in cmresult- 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:IFieldObtain 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 cmy- the y coordinate in cmz- the z coordinate in cmresult- a float array holding the retrieved field in kiloGauss. The 0,1 and 2 indices correspond to x, y, and z components.
-
contains
public boolean contains(double x, double y, double z) Description copied from class:FieldProbeCheck whether the field boundaries include the point- Specified by:
containsin interfaceIField- Overrides:
containsin classFieldProbe- Parameters:
x- the x coordinate in the map unitsy- the y coordinate in the map unitsz- the z coordinate in the map units- Returns:
trueif the point is included in the boundary of the field
-