Class CompositeProbe
java.lang.Object
cnuphys.magfield.FieldProbe
cnuphys.magfield.CompositeProbe
- All Implemented Interfaces:
IField
- Direct Known Subclasses:
RotatedCompositeProbe
-
Field Summary
FieldsFields inherited from class FieldProbe
_field, _name, cosSect, q1Coordinate, q2Coordinate, q3Coordinate, ROOT3OVER2, sinSect, X, Y, Z -
Constructor Summary
ConstructorsConstructorDescriptionCompositeProbe(CompositeField field) Create a composite probe from a composite field. -
Method Summary
Modifier and TypeMethodDescriptionvoidfield(float x, float y, float z, float[] result) Obtain the magnetic field at a given location expressed in Cartesian coordinates.voidfield(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.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.booleanCheck whether we have a solenoid fieldbooleanhasTorus()Check whether we have a torus fieldbooleanChecks whether the field has been set to always return zero.Methods inherited from class FieldProbe
contains, factory, factory, fieldMagnitude, getB1, getB2, getB3, getCompositeIndex, getField, getMaxFieldMagnitude, getName, getPhiCoordinate, getPhiMax, getPhiMin, getRCoordinate, getRhoMax, getRhoMin, getSector, getZCoordinate, getZMax, getZMin
-
Field Details
-
probes
-
-
Constructor Details
-
CompositeProbe
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:
fieldin interfaceIField- Overrides:
fieldin classFieldProbe- Parameters:
sector- the sector [1..6]x- the x sector coordinate in cmy- the y sector coordinate in cmz- the z sector coordinate in cmresult- 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: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.
-
isZeroField
public boolean isZeroField()Checks 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) 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:
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.
-
hasTorus
public boolean hasTorus()Check whether we have a torus field- Returns:
trueif we have a torus
-
hasSolenoid
public boolean hasSolenoid()Check whether we have a solenoid field- Returns:
trueif we have a solenoid
-