Package cnuphys.magfield
Interface IMagField
- All Known Implementing Classes:
CompositeField
,MagneticField
,RotatedCompositeField
,Solenoid
,StandardSolenoid
,Torus
,TransverseSolenoid
public interface IMagField
-
Method Summary
Modifier and TypeMethodDescriptionboolean
contains
(double x, double y, double z) Checks whether the field boundary contain the given point.float
getB1
(int index) Get B1 at a given index.float
getB2
(int index) Get B2 at a given index.float
getB3
(int index) Get B3 at a given index.float
Obtain the maximum field magnitude of any point in the map.getName()
Get the name of the fielddouble
Get the scale factorboolean
Checks whether the field has been set to always return zero.void
Print the current configuration
-
Method Details
-
isZeroField
boolean isZeroField()Checks whether the field has been set to always return zero.- Returns:
true
if the field is set to return zero.
-
getB1
float getB1(int index) Get B1 at a given index.- Parameters:
index
- the index into the field buffer.- Returns:
- the B1 at the given index.
-
getB2
float getB2(int index) Get B2 at a given index.- Parameters:
index
- the index into the field buffer.- Returns:
- the B2 at the given index.
-
getB3
float getB3(int index) Get B3 at a given index.- Parameters:
index
- the index into the field buffer.- Returns:
- the B3 at the given index.
-
getName
String getName()Get the name of the field- Returns:
- the name, e.e. "Torus"
-
getMaxFieldMagnitude
float getMaxFieldMagnitude()Obtain the maximum field magnitude of any point in the map.- Returns:
- the maximum field magnitude in the units of the map.
-
getScaleFactor
double getScaleFactor()Get the scale factor- Returns:
- the scale factor
-
printConfiguration
Print the current configuration- Parameters:
ps
- the print stream
-
contains
boolean contains(double x, double y, double z) Checks whether the field boundary contain the given point.- Parameters:
x
- the x coordinate in cmy
- the y coordinate in cmz
- the z coordinate in cm- Returns:
true
if the field contains the given point
-