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 SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionCell3D(FieldProbe probe) Create a 3D cell (for Torus and Transverse solenoid)
- 
Method SummaryModifier and TypeMethodDescriptionvoidcalculate(double q1, double q2, double q3, float[] result) Calculate the field in kGbooleancontained(double q1, double q2, double q3) Check whether the cell boundaries (not the map boundaries) include the pointvoidtrilinear(double q1, double q2, double q3, float[] result) Calculate the field in kG by trilinear interpolation
- 
Field Details- 
q1Minpublic double q1Min
- 
q1Maxpublic double q1Max
- 
q2Minpublic double q2Min
- 
q2Maxpublic double q2Max
- 
q3Minpublic double q3Min
- 
q3Maxpublic double q3Max
 
- 
- 
Constructor Details- 
Cell3DCreate a 3D cell (for Torus and Transverse solenoid)- Parameters:
- probe- the magnetic probe
 
 
- 
- 
Method Details- 
containedpublic 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 rectangular
- q2- rho (cm) for cylindrical, y (cm) for rectangular
- q3- z (cm) for cylindrical or rectangular
- Returns:
- trueif the point is inside the boundary of the cell
 
- 
trilinearpublic void trilinear(double q1, double q2, double q3, float[] result) Calculate the field in kG by trilinear interpolation- Parameters:
- phi- the phi coordinate in degrees
- rho- the rho coordinate in cm
- z- the z component in cm
- result- the field in kG
 
- 
calculatepublic void calculate(double q1, double q2, double q3, float[] result) Calculate the field in kG- Parameters:
- phi- the phi coordinate in degrees
- rho- the rho coordinate in cm
- z- the z coordinate int cm
- result- the field in kG
 
 
-