Package cnuphys.magfield
Class Cell3D
java.lang.Object
cnuphys.magfield.Cell3D
Cells are used by the probes. 3D cells for the torus, 2D cells for the
solenoid.
- Author:
- heddle
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCell3D
(FieldProbe probe) Create a 3D cell (for Torus and Transverse solenoid) -
Method Summary
Modifier and TypeMethodDescriptionvoid
calculate
(double q1, double q2, double q3, float[] result) Calculate the field in kGboolean
contained
(double q1, double q2, double q3) Check whether the cell boundaries (not the map boundaries) include the pointvoid
trilinear
(double q1, double q2, double q3, float[] result) Calculate the field in kG by trilinear interpolation
-
Field Details
-
q1Min
public double q1Min -
q1Max
public double q1Max -
q2Min
public double q2Min -
q2Max
public double q2Max -
q3Min
public double q3Min -
q3Max
public double q3Max
-
-
Constructor Details
-
Cell3D
Create a 3D cell (for Torus and Transverse solenoid)- Parameters:
probe
- the magnetic probe
-
-
Method Details
-
contained
public boolean contained(double q1, double q2, double q3) Check whether the cell boundaries (not the map boundaries) include the point- Parameters:
q1
- phi in deg for cylindrical, x (cm) for rectangularq2
- rho (cm) for cylindrical, y (cm) for rectangularq3
- z (cm) for cylindrical or rectangular- Returns:
true
if the point is inside the boundary of the cell
-
trilinear
public void trilinear(double q1, double q2, double q3, float[] result) Calculate the field in kG by trilinear interpolation- Parameters:
phi
- the phi coordinate in degreesrho
- the rho coordinate in cmz
- the z component in cmresult
- the field in kG
-
calculate
public void calculate(double q1, double q2, double q3, float[] result) Calculate the field in kG- Parameters:
phi
- the phi coordinate in degreesrho
- the rho coordinate in cmz
- the z coordinate int cmresult
- the field in kG
-