oliskir created page: command list authored by Oliver Kirsebom's avatar Oliver Kirsebom
......@@ -4,56 +4,109 @@
```
# Modify the run macro
The run macro file [run.mac](https://git.kern.phys.au.dk/oliskir/VeikonKone/blob/master/run.mac) allows you to modify certain aspects of the simulation. Click [here](https://git.kern.phys.au.dk/oliskir/VeikonKone/wikis/command-list) to see all available commands.
### Verbosity
* /run/verbose 0
* /event/verbose 0
* /tracking/verbose 0
* /process/em/verbose 0
The run macro file [run.mac](https://git.kern.phys.au.dk/oliskir/VeikonKone/blob/master/run.mac) allows you to modify certain aspects of the simulation. Click [here](https://git.kern.phys.au.dk/oliskir/VeikonKone/wikis/command-list) to see all available commands.
### Physics
* /VK/physics/opticalPhysics false
Below, we summarize the most relevant commands.
### Setup
* /VK/detector/volumes/betaDetector true
* /VK/detector/volumes/magnet true
* /VK/detector/volumes/catcherFoil true
* /VK/detector/volumes/shield true
* /VK/storeTrajectoryData false
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
* /VK/field/enable true
* /VK/field/maxbfield 0.48 tesla
### Initialization
* /run/initialize
### Particle source
* /gps/direction 0 0 1
* /gps/position 0 0 30.5 cm
* /gps/particle e-
* /gps/energy 1 MeV
* /gps/ang/type iso
* /gps/ang/mintheta 90 deg
* /gps/ang/maxtheta 180 deg
* /gps/particle e-
* /VK/source/betaSpectrum true
* /VK/source/betaEndPoint 7.00 MeV
* /VK/source/betaMinEnergy 5.00 MeV
* /VK/source/betaMaxEnergy 7.00 MeV
* /gps/energy 1 GeV
* /VK/source/cosmicRayAngDist true
* /VK/source/cosmicRayMinZenithAngle 0 deg
* /VK/source/cosmicRayMaxZenithAngle 90 deg
* /VK/source/diskShapedSource true
* /VK/source/innerDiameter 0 cm
* /VK/source/outerDiameter 60 cm
* /VK/source/surfaceNormal 0 1 0
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
* /VK/output/zeroSuppression true
* /VK/output/openFile output/allowed_Emin4.8MeV.root
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)
### Run simulation
* /run/beamOn 100000
\ No newline at end of file