real function xsgama(energy) real energy c c /geant321/ commons #include "geant321/gcbank.inc" #include "geant321/gcmate.inc" #include "geant321/gcjloc.inc" #include "geant321/gctrak.inc" C c /gelsig/ variables real *4 sigma real *4 temp !working space integer *4 nmix !number of components in current material real *4 amix !A of mixture component real *4 zmix !Z of mixture component real *4 wmix !weight of mixture component integer *4 i !dummy index c nmix=abs(q(jma+11)) if(nmix.eq.1) then !not a mixture ? c call sigmag(a,z,energy,sigma) if(sigma.eq.0.0) goto 9 sigma=sigma*1000.0 !mb->mub sigma=sigma*6.022e-07*dens/a !convert to cm**-1 c else !a mixture c sigma=0.0 do 1000 i=1,nmix !loop over components of mixture amix=q(jmixt+i) zmix=q(jmixt+1*nmix+i) call sigmag(amix,zmix,energy,temp) temp=temp*1000.0 !mb->mub wmix=q(jmixt+2*nmix+i) sigma=sigma+temp*wmix 1000 continue if(sigma.eq.0.0) return sigma=sigma*6.022e-07*dens/a !convert to cm**-1 c endif !nmix.eq.1 c 9 xsgama = log10(sigma) end