G4HRS Simulation Package
G4HRS is a G4 Simulation used to simulate transport from idealized targets through the HRSs
Build the simulation code with these commands:
mkdir build cd build
( on ifarm source softenv.csh 2.1 )
cmake ../ make gitinfo make
Once the executable is built, you will have to copy from src/fields/PREX_septumFieldMap_1320A-m2.dat into build
Note from Tyler on running
I attached the macro that was used for the PREX results I've shown the past couple weeks. I recall that you worked extensively with qsim in the past, so I assume you're familiar with the G4 macro structure. I'll just mention some of the settings you might want to adjust.
sepmom, hrsmom, beamene
These are the momentum setting of the septum, the momentum setting of the HRS, and the beam energy, respectively. sepmom and hrsmom simply scale the septum/HRS fields up/down relative to the energy they were tuned at (1 GeV). beamene changes the beam energy. In theory, these momentum settings don't have to be the same, but I can't imagine a situation where you would want that. To run in CREX mode you can just change these all to 2.22 GeV.
This specifies the overall tune of the septum/HRS. Specifying "PREXII" selects the tune I presented last week/this week. Specifying the tune "CREX" is identical, but with a 5% increase to the septum current. If desired you can also adjust the septum current and magnet settings individually using the commands:
/g4hrs/septumcur 497.6 A /g4hrs/quad1 0.167238 T /g4hrs/quad2 -0.212595 T /g4hrs/dipole -0.4042 T /g4hrs/quad3 -0.333719 T
This sets the minimum energy required to keep tracking a particle. If you run in CREX mode with E = 2.22 GeV, you'll probably want to increase this to improve efficiency.
Target thickness, should be 0.5 mm for PREX and 0.6 cm for CREX
Sets the target position relative to the pivot offset. The pivot offset has been updated to include the -5 cm shift for PREX-II/CREX, so from now on the target position should be 0.
Can choose from Pb208, C12, Ca48, Ca40, and Vacuum
Beam current, should be 70 uA for PREX and 150 uA for CREX.
Raster size in x, y. Should be (4 mm, 4 mm) for PREX and (1 mm, 4 mm) for CREX.
These are the commands I think you'll be most likely to adjust - See the example macros on Github
/g4hrs/kryptonite TRUE /g4hrs/snake 49 /g4hrs/hrssetup 4 /g4hrs/sepangle 5.0 deg /g4hrs/hrsangle 12.5 deg /g4hrs/sepmom 0.95 GeV /g4hrs/hrsmom 0.95 GeV /g4hrs/tune PREXII /g4hrs/minEkill 0.85 GeV /run/initialize /g4hrs/targlen 0.5 mm /g4hrs/targpos 0. cm /g4hrs/targmat Pb208 /g4hrs/beamcurr 70e-6 A /g4hrs/beamene 0.95 GeV /g4hrs/oldras FALSE /g4hrs/rasx 4.0 mm /g4hrs/rasy 4.0 mm /g4hrs/gen elastic /g4hrs/thmin 1.0 deg /g4hrs/thmax 9.0 deg /g4hrs/phmin -50.0 deg /g4hrs/phmax 50.0 deg /g4hrs/filename g4hrs_prexII.root /run/beamOn 1000000