source: branches/start/MagicSoft/Simulation/Corsika/Mmcs/mucoul.f@ 20115

Last change on this file since 20115 was 286, checked in by harald, 25 years ago
This is the start point for further developments of the Magic Monte Carlo Simulation written by Jose Carlos Gonzales. Now it is under control of one CVS repository for the whole collaboration. Everyone should use this CVS repository for further developments.
File size: 3.9 KB
Line 
1 SUBROUTINE MUCOUL(OMEGA,DENS,VSCAT)
2
3C-----------------------------------------------------------------------
4C MU(ON) COUL(OMB SCATTERING OF SINGLE SCATTERING EVENTS)
5C
6C TREATES SINGLE COULOMB SCATTERING FOR MUONS IN SMALL ANGLE
7C APPROXIMATION.
8C THIS SUBROUTINE IS IN ANALOGY WITH SUBROUTINE GMCOUL
9C (AUTHOR: G. LYNCH, LBL) OF GEANT321
10C SEE CERN PROGRAM LIBRARY LONG WRITEUP W5013
11C THIS SUBROUTINE IS CALLED FROM UPDATE
12C ARGUMENTS:
13C OMEGA = NUMBER OF SCATTERINGS FOR THE STEP
14C DENS = LOCAL DENSITY
15C VSCAT = SCATTERING ANGLE
16C
17C REDESIGN: D. HECK IK3 FZK KARLSRUHE
18C-----------------------------------------------------------------------
19
20 IMPLICIT NONE
21*KEEP,CONST.
22 COMMON /CONST/ PI,PI2,OB3,TB3,ENEPER
23 DOUBLE PRECISION PI,PI2,OB3,TB3,ENEPER
24*KEEP,MUMULT.
25 COMMON /MUMULT/ CHC,OMC,FMOLI
26 DOUBLE PRECISION CHC,OMC
27 LOGICAL FMOLI
28*KEEP,PAM.
29 COMMON /PAM/ PAMA,SIGNUM
30 DOUBLE PRECISION PAMA(6000),SIGNUM(6000)
31*KEEP,PARPAR.
32 COMMON /PARPAR/ CURPAR,SECPAR,PRMPAR,OUTPAR,C,
33 * E00,E00PN,PTOT0,PTOT0N,THICKH,ITYPE,LEVL
34 DOUBLE PRECISION CURPAR(14),SECPAR(14),PRMPAR(14),OUTPAR(14),
35 * C(50),E00,E00PN,PTOT0,PTOT0N,THICKH
36 INTEGER ITYPE,LEVL
37*KEEP,PARPAE.
38 DOUBLE PRECISION GAMMA,COSTHE,PHI,H,T,X,Y,CHI,BETA,GCM,ECM
39 EQUIVALENCE (CURPAR(2),GAMMA), (CURPAR(3),COSTHE),
40 * (CURPAR(4), PHI ), (CURPAR(5), H ),
41 * (CURPAR(6), T ), (CURPAR(7), X ),
42 * (CURPAR(8), Y ), (CURPAR(9), CHI ),
43 * (CURPAR(10),BETA), (CURPAR(11),GCM ),
44 * (CURPAR(12),ECM )
45*KEEP,RANDPA.
46 COMMON /RANDPA/ FAC,U1,U2,RD,NSEQ,ISEED,KNOR
47 DOUBLE PRECISION FAC,U1,U2
48 REAL RD(3000)
49 INTEGER ISEED(103,10),NSEQ
50 LOGICAL KNOR
51*KEEP,RUNPAR.
52 COMMON /RUNPAR/ FIXHEI,THICK0,HILOECM,HILOELB,
53 * STEPFC,NRRUN,NSHOW,PATAPE,MONIIN,
54 * MONIOU,MDEBUG,NUCNUC,
55 * CETAPE,
56 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
57 * N1STTR,MDBASE,
58 * DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
59 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
60 * ,GHEISH,GHESIG
61 COMMON /RUNPAC/ DSN,HOST,USER
62 DOUBLE PRECISION FIXHEI,THICK0,HILOECM,HILOELB
63 REAL STEPFC
64 INTEGER NRRUN,NSHOW,PATAPE,MONIIN,MONIOU,MDEBUG,NUCNUC,
65 * SHOWNO,ISHW,NOPART,NRECS,NBLKS,MAXPRT,NDEBDL,
66 * N1STTR,MDBASE
67 INTEGER CETAPE
68 CHARACTER*79 DSN
69 CHARACTER*20 HOST,USER
70
71 LOGICAL DEBDEL,DEBUG,FDECAY,FEGS,FIRSTI,FIXINC,FIXTAR,
72 * FIX1I,FMUADD,FNKG,FPRINT,FDBASE
73 * ,GHEISH,GHESIG
74*KEND.
75
76 DOUBLE PRECISION DENS,OMCF,OMEGA,OMEGA0,PHIS,SUMX,SUMY,
77 * THET,THMIN2,VSCAT
78 INTEGER I,NSCMX,NSCA
79 DATA OMCF/1.167D0/,NSCMX/50/
80C-----------------------------------------------------------------------
81
82 IF ( DEBUG ) WRITE(MDEBUG,*)'MUCOUL: OMEGA=',SNGL(OMEGA),
83 * ' DENS=',SNGL(DENS)
84
85C COMPUTE NUMBER OF SCATTERS (POISSON DISTR. WITH MEAN OMEGA0)
86 OMEGA0 = OMCF*OMEGA
87 CALL MPOISS (OMEGA0,NSCA)
88 IF ( NSCA .LE. 0 ) THEN
89 VSCAT = 0.D0
90 RETURN
91 ENDIF
92 NSCA = MIN(NSCA,NSCMX)
93 CALL RMMAR(RD,2*NSCA,1)
94
95C THMIN2 IS THE SCREENING ANGLE
96 THMIN2 = CHC**2/( OMCF*OMC * (PAMA(5)*BETA*GAMMA)**2 )
97
98 SUMX = 0.D0
99 SUMY = 0.D0
100 DO 12 I = 1,NSCA
101 THET = SQRT( THMIN2*((1./RD(I)) - 1.) )
102 PHIS = PI2 * RD(NSCA+I)
103 SUMX = SUMX + THET*COS(PHIS)
104 SUMY = SUMY + THET*SIN(PHIS)
105 12 CONTINUE
106 VSCAT = SQRT(SUMX**2 + SUMY**2)
107
108 RETURN
109 END
Note: See TracBrowser for help on using the repository browser.