Difference between revisions of "OptiM32 HRRL PositronDesign"
Line 106: | Line 106: | ||
A perl script has been written to convert the above list of beamline elements into a G4beamline input file. | A perl script has been written to convert the above list of beamline elements into a G4beamline input file. | ||
+ | |||
+ | the syntax is | ||
+ | |||
+ | perl optim2g4beam.pl HRRL.txt | ||
+ | |||
+ | == creating virtual detectors== | ||
+ | |||
+ | Virtual detector may be created to intercept the particles traveling down the beam pipe to record their momentum and position at specified locations along the beam line. |
Revision as of 23:17, 19 November 2009
Software
Optim32 beamline design software
http://www-bdnew.fnal.gov/pbar/organizationalchart/lebedev/OptiM/optim.htm
G4Beamline
http://www.muonsinc.com/tiki-index.php?page=G4beamline
Quick Start
The instruction below assume you have successfully installed the software above.
Create the *.in files
On the windows machine you can open the file below which represent one design for the HRRL positron source
File:Optim32 HRRL Design Script V1.0.txt
save the above file as HRRL.opt.
The launch the Optim executable by double clicking.
After it is launched click on the "file" menu in the GUI and select the "Open" menu item to choose the file HRRL.opt.
After it is loaded you should see the following below.
If you click on the icon with the symbols (9th button from the end of the tool bar) you can get a plot of the beam dispersion
This is an interactive display. You can adjust values in the loaded text vile and watch their effect on the dispersion. Notice the colored rectangles at the colored rectangles at the bottom of the beta curve sub window. Starting from the left bottom there are 3 read rectangles , a blue rectangle, then 3 red rectangles, a blue rectangle, and finally 3 more red rectangles. The red rectangles are the quadrupoles in the beam line and the blue rectangles are the dipoles. If you click on them their element name will appear in the upper right corner of the dispersion sub window.
If you scroll down the HRRL.opt input file to line which says
begin list
you will se a list of all the elements, the B-field values, their lengths, etc...
If you scroll down to the first quad
q0 L[cm]=13 G[kG/cm]=0.0438324 Tilt[deg]=0
you can move the curser the the B-field value "G[kG/cm]=0.0438324" and increment it while watch the effect on the dispersion plot. You increments it hitting the left and right arrow keys while holding down the "Crtl" key. The value of the increment step is controlled by through the parameters available in the dialog box you get when you select "Steps" from the "Edit" menu.
The above says the quadrupole B-field step size is set to 0.005.
Let's assume you have finished a design and now you would like to simulate the beam line using G4beamline.
Create a text file by selecting "Lattice" from the "View" menu (Alt-L is the shortcut key) and click OK when the dialog box appears below.
Clicking "OK" in the dialog box will cause a text window to open up which looks like the image below.
Save the list of elements to a text file. The text window contains other text you don't need for G4bemline. The following is the text file which was written for this example
N Name S[cm] L[cm] B[kG] G[kG/cm] S[kG/cm/cm] Tilt[deg] Tilt_out BendAng[deg] 1 oD0 4.03293 4.03293 2 q0 17.0329 13 0 0.0338324 0 0 3 oD1 20.5462 3.51326 4 q1 33.5462 13 0 -0.0651436 0 0 5 oD2 39.5285 5.9823 6 q2 52.5285 13 0 0.0449155 0 0 7 oD3 62.18 9.65149 8 gC1 62.18 0 0 Angle[deg]=0 Eff.Length[cm]=0 Tilt[deg]=0 9 bC1 92.18 30 -0.315179 0 0 0 0 -54.1377 10 GC1 92.18 0 0 Angle[deg]=0 Eff.Length[cm]=0 Tilt[deg]=0 11 oD7 108.98 16.8 12 q6 121.98 13 0 -0.0190153 0 0 13 oD8 132.68 10.7 14 q7 145.68 13 0 0.0365559 0 0 15 oD9 158.13 12.45 16 q8 171.13 13 0 -0.0231326 0 0 17 oD10 182.03 10.9 18 gC2 182.03 0 0 Angle[deg]=0 Eff.Length[cm]=0 Tilt[deg]=0 19 bC2 212.03 30 -0.285179 0 0 0 0 -48.9847 20 GC2 212.03 0 0 Angle[deg]=0 Eff.Length[cm]=0 Tilt[deg]=0 21 oD11 242.03 30 22 q9 262.03 20 0 0.0119605 0 0 23 oD12 266.541 4.51061 24 q10 286.541 20 0 -0.00837701 0 0 25 oD13 292.532 5.99133 26 q11 312.532 20 0 0.0031277 0 0 27 oD14 513.032 200.5
- Save the above file under the file HRRL.txt or any simular name
Converting text file for G4beamline
A perl script has been written to convert the above list of beamline elements into a G4beamline input file.
the syntax is
perl optim2g4beam.pl HRRL.txt
creating virtual detectors
Virtual detector may be created to intercept the particles traveling down the beam pipe to record their momentum and position at specified locations along the beam line.