Adding macros to create Calibration objects
[u/mrichter/AliRoot.git] / HIJING / hijing1_36 / attflv.F
1 * $Id$
2 C
3 C
4 C
5         SUBROUTINE ATTFLV(ID,IDQ,IDQQ)
6 C
7         SAVE
8         IF(ABS(ID).LT.100) THEN
9                 NSIGN=1
10                 IDQ=ID/100
11                 IDQQ=-ID/10+IDQ*10
12                 IF(ABS(IDQ).EQ.3) NSIGN=-1
13                 IDQ=NSIGN*IDQ
14                 IDQQ=NSIGN*IDQQ
15                 IF(IDQ.LT.0) THEN
16                         ID0=IDQ
17                         IDQ=IDQQ
18                         IDQQ=ID0
19                 ENDIF
20                 RETURN
21         ENDIF
22 C               ********return ID of quark(IDQ) and anti-quark(IDQQ)
23 C                       for pions and kaons
24 c
25 C       Return LU ID for quarks and diquarks for proton(ID=2212) 
26 C       anti-proton(ID=-2212) and nuetron(ID=2112)
27 C       LU ID for d=1,u=2, (ud)0=2101, (ud)1=2103, 
28 C       (dd)1=1103,(uu)1=2203.
29 C       Use SU(6)  weight  proton=1/3d(uu)1 + 1/6u(ud)1 + 1/2u(ud)0
30 C                         nurtron=1/3u(dd)1 + 1/6d(ud)1 + 1/2d(ud)0
31
32         IDQ=2
33         IF(ABS(ID).EQ.2112) IDQ=1
34         IDQQ=2101
35         X=RLU_HIJING(0)
36         IF(X.LE.0.5) GO TO 30
37         IF(X.GT.0.666667) GO TO 10
38         IDQQ=2103
39         GO TO 30
40 10      IDQ=1
41         IDQQ=2203
42         IF(ABS(ID).EQ.2112) THEN
43                 IDQ=2
44                 IDQQ=1103
45         ENDIF
46 30      IF(ID.LT.0) THEN
47                 ID00=IDQQ
48                 IDQQ=-IDQ
49                 IDQ=-ID00
50         ENDIF
51         RETURN
52         END