[Clas12_software] Magfield v1.05

David Heddle david.heddle at cnu.edu
Fri Dec 15 11:37:58 EST 2017


*Using Magfield v1.05*




Modifications:

1) Handles full torus maps

2) Allows for the solenoid to be shifted in Z


*Initialization*



To initialize the MagneticField v1.05 package (which if I haven’t screwed
up completely is now checked into the master), call the initialization
method which takes two arguments:



MagneticFields.getInstance().initilizeMagneticFields(

String dataPath, TorusMap torusMap)



Where dataPath is a unix colon “:” separated path of directories that will
be searched for field maps.  TorusMap is an enum, currently defined as



public enum TorusMap {

SYMMETRIC, FULL_025, FULL_050, FULL_075, FULL_100, FULL_125, FULL_150,
FULL_200;



TorusMap.SYMMETRIC is the old 12-fold symmetry map. The others are full
fields (symmetric, but not assumed symmetric) where the number after the
underscore gives the phi step in degrees,  i.e., 0.25 degrees, 0.50
degrees, down to the coarsest map with a 2.00 degree spacing. This enum
will expand in the next version, when we add a new, realistic non-symmetric
map.



You can also initialize with no arguments:



MagneticFields.getInstance().initilizeMagneticFields()



Which uses the defaults:



dataPath = ".:
~/fieldMaps:../../../data:../../data:../data:data:cedbuild/data"



torusMap = TorusMap.SYMMETRIC



this will find the maps (and try to load the old symmetric map) if you put
them in a directory named fieldMaps in your home directory, e.g.


[image: Inline image 2]



NOTE: You do not have to have all the maps; (the sizes are shown for your
amusement, or perhaps horror) it will make available whatever subset of
torus maps it finds.



The original 12-fold symmetric map that we've been using since dinosaurs
roamed the earth is the one named clas12_torus_fieldmap_binary.dat.


*How to get the field maps?*



Not a solved problem. Help. They are too big for git. I have them on a
flash drive in my office.



*Using Different Torus Maps*



To change torus maps, after initialization, call



MagneticFields.getInstance().setTorus(TorusMap tmap)



Where, again, tmap is from the enum



public enum TorusMap {

SYMMETRIC, FULL_025, FULL_050, FULL_075, FULL_100, FULL_125, FULL_150,
FULL_200;



that, again, will expand when we add the realistic map.



For example, to change to the 1.25 degree spacing, call



MagneticFields.getInstance().setTorus(TorusMap.FULL_125);





*Moving the solenoid*



Once the fields are initialized, and assuming it found the solenoid map,
you can move the solenoid in the z direction (because reasons) using



MagneticFields.getInstance().setSolenoidShift(shiftZ)



Where shiftZ is the shift in the z direction in cm. A positive number moves
the solenoid downstream i.e., in the beam direction. A negative number
moves it upstream. An imaginary number moves it to Philadelphia.


That's all.

-- 

*David P. Heddle, Ph.D.Professor of Physics,*


*Graduate Program Coordinator Christopher Newport University Newport News,
VA 23606*

*757.594.8434 (CNU)*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/clas12_software/attachments/20171215/ff8dcec1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 146749 bytes
Desc: not available
URL: <https://mailman.jlab.org/pipermail/clas12_software/attachments/20171215/ff8dcec1/attachment-0001.png>


More information about the Clas12_software mailing list