Monte Carlo of Ghost Tracks, a check of the formula with finite search window
Formula for probability that a background hit is found when picking the closest hit in a search window radius R.
solving the integral gives:
Projected track error onto the detector surface
Surface density of background hits
To do the Monte Carlo check
Let s be 1 and scale everything accordingly. If done right and we change s it should not change result
to scale from our nominal s
s and r with units, to have numbers in the region of the MVD values
scaling factor to get rid of the units
number of events to throw background. If L gets too small then increase Nb
Adjust the size of the throw window to give the right surface density of background hits
L/s should be > 6
The L/s > 6 makes sure that the Gaussian is completely contained in the Monte Carlo window, or at least to 3 sigma.
Number of tracks to throw
True hit on the detector relative to the projected track location.
Vector of true hit distances from the projected track location
Search window chosen. Can check for various window sizes
Pick true hits within the search window
The true hits in the search window
Throw background hits Nb times and if one or more shows up inside the true hit radius, set output to 1
Look at true hits in the window and count number of times that a background hit is closer to the origin. Divide by total number of events including those outside the search window.
This is the Monte Carlo determined probability of getting a background hit when picking the closest hit.
Probability of background hit by formula
Probability of background hit found by MC
Fraction of true hits lying in the search window