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 SummaryFieldsFields 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 SummaryModifier 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 cnuphys.magfield.MagneticFieldcomputeMaxField, 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
- 
_addedSolenoidprotected boolean _addedSolenoid
 
- 
- 
Method Details- 
isZeroFieldpublic final boolean isZeroField()Checks whether the field has been set to always return zero.- Specified by:
- isZeroFieldin interface- IMagField
- Overrides:
- isZeroFieldin class- MagneticField
- Returns:
- trueif the field is set to return zero.
 
- 
isActivepublic boolean isActive()Checks this field active.- Specified by:
- isActivein class- MagneticField
- Returns:
- trueif this field is active;
 
- 
isSolenoidAddedpublic boolean isSolenoidAdded()Has part of the solenoid been added in to remove the overlap?- Returns:
- trueif the solenoid was added in.
 
- 
fromBinaryFileObtain 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
 
- 
getPhiMaxpublic double getPhiMax()Get the maximum phi coordinate of the field boundary (deg)- Returns:
- the maximum phi coordinate of the field boundary
 
- 
getPhiMinpublic double getPhiMin()Get the minimum phi coordinate of the field boundary (deg)- Returns:
- the minimum phi coordinate of the field boundary
 
- 
getNameGet the name of the field- Returns:
- the name
 
- 
isFullMappublic boolean isFullMap()Check whether there is an assume 12-fold symmetry- Returns:
- trueif this is a full map
 
- 
toStringGet some data as a string.- Overrides:
- toStringin class- MagneticField
- Returns:
- a string representation.
 
- 
addToFieldpublic void addToField(int compositeIndex, float[] result) Used to add the solenoid into the torus. Experimental!!- Parameters:
- compositeIndex- the composite index
- result- the solenoid field added in
 
- 
printConfigurationPrint the current configuration- Parameters:
- ps- the print stream
 
 
-