Package cnuphys.magfield
Class ZeroProbe
java.lang.Object
cnuphys.magfield.FieldProbe
cnuphys.magfield.ZeroProbe
- All Implemented Interfaces:
IField
-
Field Summary
Fields inherited from class cnuphys.magfield.FieldProbe
_field, _name, cosSect, q1Coordinate, q2Coordinate, q3Coordinate, ROOT3OVER2, sinSect, X, Y, Z
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(double x, double y, double z) Check whether the field boundaries include the pointvoid
field
(float x, float y, float z, float[] result) Obtain the magnetic field at a given location expressed in Cartesian coordinates.float
fieldMagnitude
(float x, float y, float z) Get the field magnitude in kiloGauss at a given location expressed in Cartesian coordinates.float
Obtain the maximum field magnitude of any point in the map.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.boolean
Checks whether the field has been set to always return zero.Methods inherited from class cnuphys.magfield.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:FieldProbe
Get the field magnitude in kiloGauss at a given location expressed in Cartesian coordinates.- Specified by:
fieldMagnitude
in interfaceIField
- Overrides:
fieldMagnitude
in 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:FieldProbe
Obtain the maximum field magnitude of any point in the map.- Specified by:
getMaxFieldMagnitude
in interfaceIField
- Overrides:
getMaxFieldMagnitude
in classFieldProbe
- Returns:
- the maximum field magnitude in the units of the map.
-
isZeroField
public boolean isZeroField()Description copied from class:FieldProbe
Checks whether the field has been set to always return zero.- Specified by:
isZeroField
in interfaceIField
- Overrides:
isZeroField
in classFieldProbe
- Returns:
true
if the field is set to return zero.
-
gradient
public void gradient(float x, float y, float z, float[] result) Description copied from class:FieldProbe
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 interfaceIField
- Overrides:
gradient
in 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: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 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:FieldProbe
Check whether the field boundaries include the point- Specified by:
contains
in interfaceIField
- Overrides:
contains
in 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:
true
if the point is included in the boundary of the field
-