This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / GEANT321 / fluka / calumv.F
1 *
2 * $Id$
3 *
4 * $Log$
5 * Revision 1.1.1.1  1995/10/24 10:19:54  cernlib
6 * Geant
7 *
8 *
9 #include "geant321/pilot.h"
10 *CMZ :  3.21/02 29/03/94  15.41.41  by  S.Giani
11 *-- Author :
12 *$ CREATE CALUMV.FOR
13 *COPY CALUMV
14 *
15 *=== calumv ===========================================================*
16 *
17       SUBROUTINE CALUMV (N,ITTA)
18  
19 #include "geant321/dblprc.inc"
20 #include "geant321/dimpar.inc"
21 #include "geant321/iounit.inc"
22 *
23 #include "geant321/reac.inc"
24 #include "geant321/redver.inc"
25 #include "geant321/split.inc"
26 *
27 C*** C.M.S.-ENERGY AND REACTION CHANNEL THRESHOLD CALCULATION
28 ****  INTEGER * 2 ICH,IBAR,K1,K2,NZK,NRK
29 **** *,IEII,IKII,NURE
30       COMMON / FKABLT / AM   (110), GA   (110), TAU  (110), ICH   (110),
31      &                  IBAR (110), K1   (110), K2   (110)
32       IRE=NURE(N,ITTA/8+1)
33       IEO=IEII (IRE)+1
34       IEE=IEII (IRE+1)
35       AM1  = AM (N)
36       AM12 = AM1**2
37       AM2  = AM (ITTA)
38       AM22 = AM2**2
39 *  +-------------------------------------------------------------------*
40 *  |  Loop on the momentum/invariant mass tabulation
41       DO 1 IE=IEO,IEE
42          PLAB2=PLABF(IE)**2
43          ELAB=SQRT(AM12+AM22+2.D+00*SQRT(PLAB2+AM12)*AM2)
44          UMO(IE)=ELAB
45     1 CONTINUE
46 *  |
47 *  +-------------------------------------------------------------------*
48       IKO=IKII(IRE)+1
49       IKE=IKII(IRE +1)
50       UMOO=UMO(IEO)
51 *  +-------------------------------------------------------------------*
52 *  |  Loop on the exit channels
53       DO 2 IK=IKO,IKE
54          INRK1=NRK(1,IK)
55          INRK2=NRK(2,IK)
56 *  |  +----------------------------------------------------------------*
57 *  |  |  One resonance exit channel
58          IF (INRK2.LE.0) THEN
59             IF ( GA (INRK1) .GT. ANGLGB ) THEN
60                AM111 = AM(INRK1) - 5.D+00 * GA (INRK1)
61             ELSE
62                AM111 = 0.D+00
63             END IF
64             INRKK=K1(INRK1)
65             AMSS =5.D+00
66             INRKO=K2(INRK1)
67 *  |  |  +-------------------------------------------------------------*
68 *  |  |  |  Loop over the decay channels
69             DO 3 INKK=INRKK,INRKO
70                INZK1=NZK(INKK,1)
71                INZK2=NZK(INKK,2)
72                INZK3=NZK(INKK,3)
73 *  |  |  |  We allow for a width of at least 1 gamma for resonances !!!
74                AMS=AM(INZK1)+AM(INZK2)-GA(INZK1)-GA(INZK2)
75                IF (INZK3 .GT. 0) AMS=AMS+AM(INZK3)-GA(INZK3)
76                IF (AMSS  .GT.AMS) AMSS=AMS
77     3       CONTINUE
78 *  |  |  |
79 *  |  |  +-------------------------------------------------------------*
80             AMS=MAX(AMSS,AM111)
81             IF (AMS.LT.UMO(IEO)) AMS=UMO(IEO)
82             THRESH(IK)=AMS
83          END IF
84 *  |  |
85 *  |  +----------------------------------------------------------------*
86     2 CONTINUE
87 *  |
88 *  +-------------------------------------------------------------------*
89       RETURN
90       END