Background:
I am trying to simulate compton scattering of ~0.004 GeV photons through a thin Silicon Nitride target in a vacuum. Eventually, I want to simulate detector via scintillation at some arbitrary position from the source but am trying to get a good grip on the physics and use of Fluka first.
Approach:
I defined two regions an ‘upstream’ and ‘downstream’. I set the downstream region to be a distance of 1 cm away from the Silicon nitride target. I made small cylindrical hole in the downstream region that is aligned with the beamaxis to avoid scoring particles that are not scattered.I use the USERDUMP routine to write out the boundary crossing for each photon/electron into the downstream region. I am dumping:
! Count photons JTRACK=7 only if they cross between the two specified regions
if (MREG == region_number_out .and. NEWREG == region_number_in .and. JTRACK == 7) then
WRITE(98,*) ETRACK, ATRACK, XSCO, YSCO, ZSCO
end if
! Now select only electrons - should have a TJrack =3
if (MREG == region_number_out .and. NEWREG == region_number_in .and. JTRACK == 3) then
WRITE(99,*) ETRACK, ATRACK, XSCO, YSCO, ZSCO,
end if
if (MREG == region_number_out .and. NEWREG == region_number_in) then
photon_counter = photon_counter + 1
WRITE(97,*) photon_counter, JTRACK
end if
Given the process of compton scattering is inelastic, and I know the input beam energy, I should be able to calculate the position of an electron or photon give then known position of the scattered photon or electron:
i.e. knowing the scattered photons position and initial energy photon (Ei) makes it possible to calculate the electron position and vice versa. When I do some math I derive the following equation for the electron position (xe, ye) at the detector plane (a distance L away from the interaction point):
and
Problem:
I found that I cannot reproduce the position of the photon or the electrons that are written by the mgdraw routine. Below is an example of he recorded positions of a selection of electrons crossing into the downstream region. I also plot the expected position of electrons calculated from a the photon positions. But they do not overlap!
I observe the same problem for the calculated photon positions.
My problem is that calculated positions are often in the same/similar direction to as the scattered direction particle but I can not predict the position of an electron with a known photon position or vica versa.
Questions:
Overall I am unsure if my mis-understanding of Fluka or the underlying physics is at fault here:
- Is my the mgdraw routing correctly writing the boundary crossing location? and is there a way to filter for electrons/photons that have undergone inelastic scattering / write a flag for particles that have undergone this in the Silicon nitride so I can confirm?
- Why do my predicted positions and recorded for the electron and photon scattering not overlap? I understand that scattering can often be more complex that purely inelastic interactions however, my intuition is that further scattering of the electrons/photons should essentially randomize the position which is not what I observe.
Attachements:
flair input: second_compt.flair (3.9 KB)
mgdraw: comp_mgdraw.f (4.8 KB)
matlab code to reproduce plot: demo_code.txt (4.8 KB)