|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcnuphys.magfield.MagneticField
cnuphys.magfield.Torus
public class Torus
The Class Torus.
| Field Summary |
|---|
| Fields inherited from class cnuphys.magfield.MagneticField |
|---|
MAGICNUMBER |
| Method Summary | |
|---|---|
void |
field(float x,
float y,
float z,
float[] result)
Obtain the magnetic field at a given location expressed in Cartesian coordinates. |
static Torus |
fromAsciiFile(java.io.File file)
Obtain a torus object from an ascii file NOT YET IMPLEMENTED. |
static Torus |
fromBinaryFile(java.io.File file)
Obtain a torus object from a binary file, probably "clas12_torus_fieldmap_binary.dat" |
boolean |
isInvertField()
Checks whether the polarity was flipped from what was in the field map--switching outbenders and inbenders. |
boolean |
isZeroField()
Checks whether the field has been set to always return zero-- useful at times for debugging. |
static void |
main(java.lang.String[] arg)
main method used for testing. |
void |
setInvertField(boolean invertField)
Sets whether the polarity is flipped from what was in the field map--switching outbenders and inbenders. |
void |
setZeroField(boolean zeroField)
For debugging you can set the field to always return 0. |
| Methods inherited from class cnuphys.magfield.MagneticField |
|---|
fieldMagnitude, getQ1Coordinate, getQ2Coordinate, getQ3Coordinate, maxFieldMagnitude, setCoordinateNames, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static Torus fromBinaryFile(java.io.File file)
throws java.io.FileNotFoundException
file - the file to read
java.io.FileNotFoundException - the file not found exceptionpublic static Torus fromAsciiFile(java.io.File file)
file - the file to read
public void field(float x,
float y,
float z,
float[] result)
x - the x coordinate in cmy - the y coordinate in cmz - the z coordinate in cmresult - a array holding the retrieved (interpolated) field in kiloGauss. The
0,1 and 2 indices correspond to x, y, and z components.public boolean isInvertField()
true if the field was inverted.public void setInvertField(boolean invertField)
invertField - if set to true the field will be inverted.public boolean isZeroField()
true if the field is set to return zero.public void setZeroField(boolean zeroField)
zeroField - if set to true the field will always return 0.public static void main(java.lang.String[] arg)
arg - command line arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||