This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / gphys / gdrprt.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:21:24  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.21  by  S.Giani
11 *-- Author :
12       SUBROUTINE GDRPRT(IPART,IMATE,STEP,MPOINT)
13 C.
14 C.    ******************************************************************
15 C.    *                                                                *
16 C.    *  Landau fluctuations and/or delta-rays generation .            *
17 C.    *  print the value of some relevant parameters (see phys 332) :  *
18 C.    *  Tmax, zeta, kapa and the regime for fluctuations              *
19 C.    *                                                                *
20 C.    *             Input parameters                                   *
21 C.    *  IPART   Geant particle number                                 *
22 C.    *  IMATE   Geant material number                                 *
23 C.    *  STEP    cm                                                    *
24 C.    *                                                                *
25 C.    *    ==>Called by : <USER>                                       *
26 C.    *       Author     M.Maire    *********                          *
27 C.    *                                                                *
28 C.    ******************************************************************
29 C.
30 #include "geant321/gcbank.inc"
31 #include "geant321/gconsp.inc"
32 #include "geant321/gcunit.inc"
33 #include "geant321/gcmulo.inc"
34 *
35       PARAMETER (MXPOIN=100)
36       DIMENSION TCUT(5)
37       DIMENSION TKINV(MXPOIN),DEDXMV(MXPOIN),DNTOTV(MXPOIN)
38       CHARACTER REGIME*14,KUNIT*4,NAPART*8,NAMATE*8
39 *
40       PARAMETER (DGEV=0.153536 E-3)
41 *
42 * *** incident particle
43       JPA = LQ(JPART-IPART)
44       CALL UHTOC (IQ(JPA+1),4,NAPART,8)
45       AMASS = Q(JPA+7)
46       CHARG = Q(JPA+8)
47       EAMAS = EMASS/AMASS
48 *
49 * *** material
50       JMA = LQ(JMATE-IMATE)
51       IF(JMA.LE.0.OR.IMATE.GT.IQ(JMATE-2)) THEN
52          WRITE(CHMAIL,10000) IMATE
53          GOTO 999
54       ENDIF
55       CALL UHTOC (IQ(JMA+1),4,NAMATE,8)
56       AMT = Q(JMA+6)
57       ZMT = Q(JMA+7)
58       RO  = Q(JMA+8)
59       JPR = LQ(JMA-4)
60 *
61 * *** mean ionization potential (GeV)
62 *     POTI=16E-9*ZMT**0.9
63       POTI=Q(JPR+9)
64 *
65       CONS = DGEV*CHARG*CHARG*STEP*RO*ZMT/AMT
66 *
67       WRITE (CHMAIL,10200) NAPART,NAMATE,STEP
68       CALL GMAIL(1,0)
69       WRITE (CHMAIL,10100)
70       CALL GMAIL(0,1)
71       WRITE (CHMAIL,10300)
72       CALL GMAIL(0,1)
73 *
74 * *** loop on kinetic energy
75       NPOINT = MIN(MPOINT,MXPOIN)
76       TKINI = ELOW(1)
77       TKEND = ELOW(NEK1)
78       STEPL = (TKEND/TKINI)**(1./(NPOINT-1))
79       TKINV(1) = TKINI
80       DO 10 JTK=2,NPOINT
81          TKINV(JTK) = TKINV(JTK-1)*STEPL
82    10 CONTINUE
83       CALL GFTMAT(IMATE,IPART,'LOSS',NPOINT,TKINV,DEDXMV,TCUT,IXST)
84       CALL GFTMAT(IMATE,IPART,'DRAY',NPOINT,TKINV,DNTOTV,TCUT,IXST)
85       DO 20  I=1,NPOINT
86          TKIN  = TKINV(I)
87          DEDXM = DEDXMV(I)
88          DNTOT = DNTOTV(I)
89          TKM = TKIN/AMASS
90          GAMA = TKM + 1.
91          GAM2 = GAMA**2
92          BTA2 = TKM*(TKM+2.)/GAM2
93 *        maximum transferable energy (gev)
94          TMAX = (2*EMASS*GAM2*BTA2)/(1.+2*GAMA*EAMAS+EAMAS**2)
95          IF(IPART.EQ.3) TMAX=0.5*TMAX
96 *
97 * ***    mean de/dx on material
98          DEGEV = STEP*DEDXM*1.E-3
99          DEPOT = DEGEV/POTI
100 *
101 * ***    total number of delta ray production
102          DNTOT = DNTOT*STEP
103 *
104 * ***    low energy tranfert
105          ZETA = CONS/BTA2
106          DNLOW = ZETA/POTI
107 *
108 * ***    high energy transfert
109          DNHIG = ZETA/TMAX
110 *
111 * ***    regime
112          DNMIN = MIN(DNLOW,DEPOT)
113          IF(DNMIN.GE.50.) THEN
114             IF (DNHIG.GE.10. ) THEN
115                REGIME = 'Gauss'
116             ELSEIF (DNHIG.GE.0.01) THEN
117                REGIME = 'Vavilov'
118             ELSE
119                REGIME = 'Landau'
120             ENDIF
121          ELSE
122             IFREE = 1
123             IF(DNMIN.GE.0.01) THEN
124                REGIME = 'Urban/'
125                IFREE  = 7
126             ENDIF
127             IF(DNMIN.GE.1..AND.DNMIN.LT.30.) THEN
128                REGIME(IFREE:) = 'ASHO/'
129                IFREE  = 12
130             ENDIF
131             REGIME(IFREE:) = 'PAI'
132          ENDIF
133 *
134 * ***    print
135          CALL GEVKEV (TKIN,TKUN,KUNIT)
136          WRITE (CHMAIL,10400) TKUN,KUNIT,DNTOT,DEPOT,DNLOW,DNHIG,
137      +   REGIME
138          CALL GMAIL(0,0)
139    20 CONTINUE
140 *
141 10000 FORMAT(' **** GDRPRT: Material N ',I3,' has not been defined')
142 10100 FORMAT (9X,'For an explication of the ''regimes'' field ',
143      +           'see the GEANT manual')
144 10200 FORMAT (5X,'*** Energy loss straggling for ',A8,' in ',A8,
145      +           ', step ',F8.4,' cm')
146 10300 FORMAT (4X,'   Ekin ','     N d-rays','      dE/I    ',
147      +    '    xi/I    ','   xi/Emax ','    regime')
148 10400 FORMAT (4X,F5.1,A4,4E12.3,4X,A14)
149 *
150   999 END