Package cnuphys.magfield
Class Torus
java.lang.Object
cnuphys.magfield.MagneticField
cnuphys.magfield.Torus
- All Implemented Interfaces:
IMagField
The Class Torus.
- Author:
- David Heddle, Nicole Schumacher
-
Field Summary
FieldsFields inherited from class cnuphys.magfield.MagneticField
_interpolate, _scaleFactor, _shiftX, _shiftY, _shiftZ, angularUnit, avgField, field, fieldCoordinateSystem, fieldUnit, gridCoordinateSystem, highTime, lengthUnit, lowTime, MAGICNUMBER, maxField, maxFieldIndex, maxFieldLocation, maxVectorField, MISALIGNTOL, numFieldPoints, q1Coordinate, q2Coordinate, q3Coordinate, reserved3, reserved4, reserved5
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToField
(int compositeIndex, float[] result) Used to add the solenoid into the torus.static Torus
fromBinaryFile
(File file) Obtain a torus object from a binary file, probably "clas12-fieldmap-torus.dat"getName()
Get the name of the fielddouble
Get the maximum phi coordinate of the field boundary (deg)double
Get the minimum phi coordinate of the field boundary (deg)boolean
isActive()
Checks this field active.boolean
Check whether there is an assume 12-fold symmetryboolean
Has part of the solenoid been added in to remove the overlap?final boolean
Checks whether the field has been set to always return zero.void
Print the current configurationfinal String
toString()
Get some data as a string.Methods inherited from class cnuphys.magfield.MagneticField
computeMaxField, contains, fieldMagnitude, getB1, getB2, getB3, getBaseFileName, getBComponent, getCompositeIndex, getCoordinateIndices, getCreationDate, getFakeZMax, getLocation, getMaxFieldMagnitude, getPhiCoordinate, getQ1Coordinate, getQ2Coordinate, getQ3Coordinate, getRCoordinate, getRhoMax, getRhoMin, getScaleFactor, getShiftX, getShiftY, getShiftZ, getXCoordinate, getYCoordinate, getZCoordinate, getZMax, getZMin, isInterpolate, isMisaligned, isMisalignedX, isMisalignedY, isMisalignedZ, maxFieldMagnitude, readBinaryMagneticField, setCoordinateNames, setFakeZMax, setInterpolate, setScaleFactor, setShiftX, setShiftY, setShiftZ, setZeroField, squareMagnitude, vectorField, vectorToString
-
Field Details
-
LOGGER
-
_addedSolenoid
protected boolean _addedSolenoid
-
-
Method Details
-
isZeroField
public final boolean isZeroField()Checks whether the field has been set to always return zero.- Specified by:
isZeroField
in interfaceIMagField
- Overrides:
isZeroField
in classMagneticField
- Returns:
true
if the field is set to return zero.
-
isActive
public boolean isActive()Checks this field active.- Specified by:
isActive
in classMagneticField
- Returns:
true
if this field is active;
-
isSolenoidAdded
public boolean isSolenoidAdded()Has part of the solenoid been added in to remove the overlap?- Returns:
true
if the solenoid was added in.
-
fromBinaryFile
Obtain a torus object from a binary file, probably "clas12-fieldmap-torus.dat"- Parameters:
file
- the file to read- Returns:
- the torus object
- Throws:
FileNotFoundException
- the file not found exception
-
getPhiMax
public double getPhiMax()Get the maximum phi coordinate of the field boundary (deg)- Returns:
- the maximum phi coordinate of the field boundary
-
getPhiMin
public double getPhiMin()Get the minimum phi coordinate of the field boundary (deg)- Returns:
- the minimum phi coordinate of the field boundary
-
getName
Get the name of the field- Returns:
- the name
-
isFullMap
public boolean isFullMap()Check whether there is an assume 12-fold symmetry- Returns:
true
if this is a full map
-
toString
Get some data as a string.- Overrides:
toString
in classMagneticField
- Returns:
- a string representation.
-
addToField
public void addToField(int compositeIndex, float[] result) Used to add the solenoid into the torus. Experimental!!- Parameters:
compositeIndex
- the composite indexresult
- the solenoid field added in
-
printConfiguration
Print the current configuration- Parameters:
ps
- the print stream
-