kinsim uses ROOT and input files from SRIM to perform a Monte-Carlo simulation of the reaction kinematics, including energy loss through the target and the dead layers of the silicon detector. Although designed for the Miniball CD setup, it produces a set of generic histograms of scattering energy vs angle that can be used for any similar setup.
Download the kinsim4.cc file and place it in a folder where ROOT looks for macros. If you do not want to add it to a system folder (wise), then you can update the MacroPath in your .rootrc file to point to a new directory.
Load the script in ROOT and compile it at the same time with:
.L kinsim4.cc+
The main function requires a number of arguments, as follows:
void kinsim4(int Zb, int Zt, double Ab, double At, double thick, double Eb, double dEb = 0.1, double Ex = 1., double res = 0.6, double beam_sigma = 1.5, double cd_dist = 28., bool flat = false, long Nevts = 1.0E+6, string srim_dir = "./srim")
Zb: Proton number of beamZt: Proton number of targetAb: Mass number of beamAt: Mass number of targetthick: Target thickness in mg/cm^2Eb: Beam energy in MeV/udEb: Sigma width of the beam energy in MeV/uEx: Excitiation energy of the inelastic reaction in MeV; use 0 for elastic scatteringres: Intrinsic energy resolution of the silicon detector in %cd_dist: Distance from the target to the CD detector, if using Miniballbeam_sigma: Beam spot size (sigma in mm) assuming Gaussian distribution in x-yflat: Angular distribution of events is constant/flat if this is true, else an arbitrary Coulex like distribution is used (not Rutherford)Nevts: Number of events to simulatesrim_dir: Path to the SRIM output files
You will need corresponding SRIM output files for the following ion/material combinations.
- Projectile in target
- Target in target
- Projectile in silicon
- Target in silicon
The filename format is "X_Y.txt", where X is the isotope name of the incoming ion, e.g. 22Ne, and Y is the isotope name of the material, e.g. 208Pb for the target or simply Si for the silicon dead layers.
Example, 22Ne beam on a 107Ag target, would require the following files (also found in this repository):
- 22Ne_107Ag.txt
- 107Ag_107Ag.txt
- 22Ne_Si.txt
- 107Ag_Si.txt
Files should cover a range of energies from as low as 10 keV (default in SRIM), up to at least the beam energy, but I generally chose 10 GeV as the upper range to keep the files flexible for future use. Some other examples can be found in the source code of MiniballSort at http://github.com/Miniball/MiniballSort/tree/main/srim
A ROOT file is created in the output with a number of historgrams showing the kinematics of the beam and target particles in the laboratory and centre of mass frames.
The simulated energy vs. angle spectrum for the Miniball CD detector is cd_sim.
Each of the 16 strips are projected to 1D energy spectra, useful for calibration purposes, where the expected energy can be extracted from the centroids of the distributions.