Re: Modified source.f sub routine

From: Mary Chin <mary.chin_at_cern.ch>
Date: Tue, 29 Nov 2011 20:23:40 +0100

Hello,

In your source routine, the lines for sampling the relative
proton-pion-kaon proportions are embedded in the IF (LFIRST) conditional.
That means those lines are only executed once, during the first-call
initialization, which I don't think is what you want. Please move your
insertions out of that IF(LFIRST)...END level.

By the way, the lines
        IF (RANDUM.LE.0.61) THEN
            IPTYPE=13.0
        ELSEIF (RANDUM.GT.0.61.AND.RANDUM.LE.0.96) THEN
            IPTYPE=1.0
        ELSEIF (RANDUM.GT.0.96) THEN
            IPTYPE=15.0
        END IF

could well be simplified, removing redundancy:
        IF (RANDUM.LE.0.61) THEN
            IPTYPE=13.0
        ELSEIF (RANDUM.LE.0.96) THEN
            IPTYPE=1.0
        ELSE
            IPTYPE=15.0
        END IF

because there is no point testing again for conditions
already tested. This saves some CPU resources.

To test whether your modification works ok, it is probably easier to
increase the 4% temporarily for testing purposes. If it works all right
for, say, a 35%-45%-20% split, it is highly unlikely that it will not work
for 35%-61%-4%.

:) mary

On Tue, 29 Nov 2011, sujoy_at_veccal.ernet.in wrote:

> Dear Fluka experts,
>
> I have modified the source.f subroutine to fire a mixture of particles.
> It consists of Protons (35%), Pions+(61%) and Kaons+(4%), with all having
> momentum of 120 GeV/c.
> To check, whether it is working properly, I have made a small input file,
> where I score all these particles
> at the boundary using USRBDX detector. Unfortunately I am seeing Pions+ as 66
> % and the rest as protons.
> I am not able to see the small contribution from Kaons. Moreover, I am not
> sure of its working. I will be obliged,
> if someone can help me in correcting the error. I am attaching the modified
> routine and the input file for reference.
>
> With Regards,
> S. Chatterjee
>
>
>
Received on Wed Nov 30 2011 - 15:17:59 CET

This archive was generated by hypermail 2.2.0 : Wed Nov 30 2011 - 15:18:00 CET