******************************************************************* subroutine raninit * * initialize random number seed * * last modified on: 26/01/15 by: J. Markert ******************************************************************* implicit none #include "geant321/gcflag.inc" #include "slate.inc" INTEGER PID, IP, R1, R2 REAL XDUMMY INTEGER MCGN COMMON /MCGN/ MCGN if (nrndm(1).ne.0 .and. nrndm(2).ne.0) goto 10 ! use seed from RNDM key call getpidip(PID,IP,R1,R2) ! getpidip.h : process id + last digit of ip ! seed_1 seed_2 nrndm(1) = R1 nrndm(2) = R2 10 call grndmq(nrndm(1),nrndm(2),1,'S') ! init Geant generator with seed mcgn = nrndm(1) ! also init seed of cernlib RNDM (used in hrndm1) write(*,*) C--------------------------------------------------------------- C random number initialization check: call grndm(xdummy,1) print *,' ' print *,' *** initial random number:' print *,' nrndm(1) = ',nrndm(1),' nrndm(2) = ',nrndm(2) print *,' first number =',xdummy print *,' ' C -------------------------------------------------------------- return end