[Halld-offline] problem with spread of values for particle gun
Richard Jones
richard.t.jones at uconn.edu
Mon Mar 21 15:07:59 EDT 2011
Kei et.al.,
Yes, this is a feature of ffread. This is not a bug, but the way that ffread works. If you add a decimal point it makes it a real, otherwise it is a integer. FFread is a venerable old package from cern's packlib. Let's not rewrite packlib, just learn how it works and use it with its faults and follies.
-Richard J.
On 3/21/2011 2:43 PM, Kei Moriya wrote:
> Dear offliners,
>
> I wanted to let you know that there is a little bug
> when generating particles with a spread in
> momentum and angle with the particle gun.
>
> When generating events with the particle gun,
> I specify the central value of p, theta, and phi,
> along with the full width of each value.
> What I have noticed is that if I specify for
> example
> c particle momentum theta phi delta_momentum delta_theta delta_phi
> KINE 114 5.0 30. 0. 0.5 30 360.
>
> which means generate protons(offset=100+PID=14) with
> p = 5.0 +/- 5
> theta = 30 +/- 15
> phi = 0 +/- 180.
>
> What I have noticed is that the decimal point for
> the momentum values are essential, since without
> the decimal point, the spread becomes 0!
> I assume this is a simple bug of taking the value
> as an int instead of a float.
>
> The plot attachd show the difference when
> a "." is added to delta_momentum so that the
> top plot (with decimal point) has a full width
> of 5 (2.5<p<7.5), while the bottom (without decimal
> point) has no width.
>
> I assume the place to correct this is within
> gukine.F in sim-recon/sim-recon/src/programs/Simulations/HDGeant/
> but I'll let the experts fix this so I don't
> break anything.
>
> One thing that comes as a consequence of this is that
> the plots I showed last week had theta exactly
> at 0.25,0.75,1.25, ... degrees, and NO spread.
> I'm not sure how many other people are using the
> particle gun, but you may want to check that you
> are actually getting a spread in your values.
>
> Kei
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4092 bytes
Desc: S/MIME Cryptographic Signature
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20110321/2c766ee7/attachment.p7s>
More information about the Halld-offline
mailing list