How to put beam profile information extracted from data into Mokka
--
AngelaLucaciTimoce - 22-Oct-2009
If the beam profile in data is not Gaussian (true especially at low energies), it may be important to find a way to correctly simulate the beam profile in Monte Carlo, based on the beam profile obtained from experimental data. A possible way to do this is using the GEANT4
General Particle Source (gps) . Below an example is given for a
15 negative pion run. If you need more information about gps, please have a look
here.
First, you need the beam profile information from data. For this, I use the TBTrack package, which gives me the x and y distributions of the fitted track (from the drift chamber hits) projected at a certain point. I usually set the particle gun at z=-3000 mm, that is just in front of the most upstream drift chambers. So I look at the x and y distributions of the track projected at z=-3000 mm. I take these distributions and give them as input to a small ROOT macro below, which converts the x/y values to number between 0 and 1.
- gps.C: ROOT macro to convert histogram of beam profile from data to numbers from 0 to 1
As output, you'll get the numbers used to bias the x and y positions of the global particle source, which you input to the GEANT4 macro (see example below).
- gps.macro: GEANT4 example macro for use of global particle source
The resulting x-track distribution using a particle gun, with Gaussian smearing, and using a global particle source, are shown below.
If you use the GEANT4 gps and need help, don't hesitate to write me an email. Of if you think the explanations are not good enough, feel free to improve them.
- x-distribution of track projected at z=-3000 mm with global particle source Monte Carlo:
- x-distribution of track projected at z=-3000 mm with Gaussian Monte Carlo: