[Halld-mc] EM background warning
Richard Jones
richard.t.jones at uconn.edu
Thu Sep 24 18:35:02 EDT 2009
Blake,
The source generator has to sample a multi-dimensional bremsstrahlung
cross section formula that has to be computed by iteration. To throw
random events with this exact weight would require me to be able to find
the indefinite integral of the cross section and then find its inverse
function -- sounds hard. The easier thing, which I did, is to find a
simple analytical formula that is reasonably close in it shape to the
exact one, which I know how to integrate and invert. So I throw
according to the simplified one, and then reweight the final
distribution by the ratio of the exact and approximate cross sections by
computing their ratio for each event and doing a random discard based on
that ratio. If the approx. function is a good choice, this ratio comes
out close to 1 most of the time, but there are corners of phase space
where the approximation is poor: there the ratio can be orders of
magnitude bigger than its average value. The random discard method
relies on chosing an effective maximum value for the ratio and then
discarding based on a random number cast Unif[0,ratio_max]. In those
rare cases where the ratio comes out bigger than ratio_max, there is a
problem: what to do? What I do is, print the warning message, move
ratio_max to the new maximum, and carry on. Obviously if this happens
too much during the run you will end up with a background energy
distribution that is gradually converging (growing more accurate, but
less numerically efficient) the longer it runs.
My experience is that for reasonable values of the beam threshold and
endpoint energies, the value I chose for ratio_max is good enough that
the changes as ratio_max is adjusted upward will not be statistically
significant. But I left the warning in there anyway. If you see the
warning once per event, or every few events, please let me know and I
will try to figure out what is driving the ratio to diverge for your
simulation conditions.
tmi? you asked...
-Richard J.
Blake Leverington wrote:
> Hi,
>
> I'm looking at the log files from a simulation where I've turned on the
> em background. What does the warning: "Warning from beamgen: freq =
> 0.00022101 greater than freqMaximum=0.0001999999995" indicate? Any ideas?
>
> -Blake
> _______________________________________________
> Halld-mc mailing list
> Halld-mc at jlab.org
> https://mailman.jlab.org/mailman/listinfo/halld-mc
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3639 bytes
Desc: S/MIME Cryptographic Signature
Url : https://mailman.jlab.org/pipermail/halld-mc/attachments/20090924/953df13f/attachment.bin
More information about the Halld-mc
mailing list