Run a simulation
./VKRun run.mac
Modify the run macro
The run macro file run.mac allows you to modify certain aspects of the simulation. In order to view all the available commands, simply do
./VKRun
PreInit> /control/manual /VK/
Below, we summarize the most relevant commands.
Setup
You can add/remove the following four parts of the setup: (1) The beta detector, (2) the magnet, (3) the catcher foil and (4) the shield. To add all four parts do:
/VK/detector/volumes/betaDetector true
/VK/detector/volumes/magnet true
/VK/detector/volumes/catcherFoil true
/VK/detector/volumes/shield true
To remove any of the parts, simply change the status from true
to false
.
Note that adding/removing the magnet does not in any way affect the magnetic field.
Magnetic Field
You can enable/disable the magnetic field and scale the magnetic field strength with these two commands:
/VK/field/enable true
/VK/field/maxbfield 0.48 tesla
(the second command sets the maximum field strength to 0.48 Tesla)
Output
Open the output file:
/VK/output/openFile test.root
If you want to save disk space, you can enable zero suppression. This ensures that events only get saved, if a detector receives a hit:
/VK/output/zeroSuppression true
By default, only the energy deposited in the detectors is saved. However, if you also want to save information about particle trajectories, you can you this command:
/VK/storeTrajectoryData true
Particle source
Set particle type:
/gps/particle e-
Set fixed initial energy:
/gps/energy 1 MeV
Or, use energy distribution corresponding to an allowed beta transition:
/VK/source/betaSpectrum true
/VK/source/betaEndPoint 7.00 MeV
If you wish, you can restrict the energy range with:
/VK/source/betaMinEnergy 5.00 MeV
/VK/source/betaMaxEnergy 6.00 MeV
Set starting point:
/gps/position 0 0 30.5 cm
Set fixed initial direction
/gps/direction 0 0 1
Or, use an isotropic angular distribution
/gps/ang/type iso
You can also restrict the angular range with:
/gps/ang/mintheta 90 deg
/gps/ang/maxtheta 180 deg
If you want to simulate cosmic-ray muons, you can use this angular distribution:
/VK/source/cosmicRayAngDist true
Again, it is possible to restrict the range of angles:
/VK/source/cosmicRayMinZenithAngle 0 deg
/VK/source/cosmicRayMaxZenithAngle 90 deg
Finally, there are commands to specify an extended source distribution:
/VK/source/diskShapedSource true
/VK/source/innerDiameter 0 cm
/VK/source/outerDiameter 60 cm
/VK/source/surfaceNormal 0 1 0
Run the simulation
/run/initialize
/run/beamOn 1000
(the second command sets the number of simulated events to 1000 and starts the simulation)