Class Torus
java.lang.Object
cnuphys.magfield.MagneticField
cnuphys.magfield.Torus
- All Implemented Interfaces:
IMagField
-
Field Summary
FieldsFields inherited from class 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 TypeMethodDescriptionvoidaddToField(int compositeIndex, float[] result) Used to add the solenoid into the torus.static TorusfromBinaryFile(File file) Obtain a torus object from a binary file, probably "clas12-fieldmap-torus.dat"getName()Get the name of the fielddoubleGet the maximum phi coordinate of the field boundary (deg)doubleGet the minimum phi coordinate of the field boundary (deg)booleanisActive()Checks this field active.booleanCheck whether there is an assume 12-fold symmetrybooleanHas part of the solenoid been added in to remove the overlap?final booleanChecks whether the field has been set to always return zero.voidPrint the current configurationfinal StringtoString()Get some data as a string.Methods inherited from class 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:
isZeroFieldin interfaceIMagField- Overrides:
isZeroFieldin classMagneticField- Returns:
trueif the field is set to return zero.
-
isActive
public boolean isActive()Checks this field active.- Specified by:
isActivein classMagneticField- Returns:
trueif this field is active;
-
isSolenoidAdded
public boolean isSolenoidAdded()Has part of the solenoid been added in to remove the overlap?- Returns:
trueif 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
-
isFullMap
public boolean isFullMap()Check whether there is an assume 12-fold symmetry- Returns:
trueif this is a full map
-
toString
Get some data as a string.- Overrides:
toStringin 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
-