1 -- 2 -- Patricia Fasel 3 -- Los Alamos National Laboratory 4 -- 1990 August 5 -- 6 module PhotoElec (photoElec) where 7 8 import GamtebType 9 import Consts 10 import Utils 11 12 photoElec :: Particle -> Probability -> (Particle, Value, Bool) 13 photoElec p prob = 14 if (w' > wgtCut2) 15 then (Part pos dir w' e eIndx cell seed', absorb, False) 16 else -- terminate particle because of weight cutoff 17 if ((w' * fromIntegral cell) < (r1 * wgtCut)) 18 then (Part pos dir w' e eIndx cell seed', absorb, True) 19 else (Part pos dir w'' e eIndx cell seed', absorb, False) 20 where 21 (Part pos dir w e eIndx cell seed) = p 22 (pComp,pPair,pPhot,pTot) = prob 23 (seed', r2) = genRand seed 24 (r1, r3) = genRand r2 25 w' = w * (1 - pPhot/pTot) 26 w'' = wgtCut/fromIntegral cell 27 absorb = w - w'