Adding macros to create Calibration objects
[u/mrichter/AliRoot.git] / HIJING / hijing1_36 / hijini.F
1 * $Id$
2 C            
3 C
4 C
5         SUBROUTINE HIJINI
6 #define BLANKET_SAVE
7 #include "hiparnt.inc"
8 #include "histrng.inc"
9 #include "hijjet1.inc"
10 #include "hijjet2.inc"
11 #include "hijjet4.inc"
12         SAVE
13 C****************Reset the momentum of initial particles************
14 C             and assign flavors to the proj and targ string       *
15 C*******************************************************************
16         NSG=0
17         NDR=0
18         IPP=2212
19         IPT=2212
20         IF(IHNT2(5).NE.0) IPP=IHNT2(5)
21         IF(IHNT2(6).NE.0) IPT=IHNT2(6)
22 C               ********in case the proj or targ is a hadron.
23 C
24         DO 100 I=1,IHNT2(1)
25         PP(I,1)=0.0
26         PP(I,2)=0.0
27         PP(I,3)=SQRT(HINT1(1)**2/4.0-HINT1(8)**2)
28         PP(I,4)=HINT1(1)/2
29         PP(I,5)=HINT1(8)
30         PP(I,6)=0.0
31         PP(I,7)=0.0
32         PP(I,8)=0.0
33         PP(I,9)=0.0
34         PP(I,10)=0.0
35         NFP(I,3)=IPP
36         NFP(I,4)=IPP
37         NFP(I,5)=0
38         NFP(I,6)=0
39         NFP(I,7)=0
40         NFP(I,8)=0
41         NFP(I,9)=0
42         NFP(I,10)=0
43         NFP(I,11)=0
44         NPJ(I)=0
45         IF(I.GT.ABS(IHNT2(2))) NFP(I,3)=2112
46         CALL ATTFLV(NFP(I,3),IDQ,IDQQ)
47         NFP(I,1)=IDQ
48         NFP(I,2)=IDQQ
49         NFP(I,15)=-1
50         IF(ABS(IDQ).GT.1000.OR.(ABS(IDQ*IDQQ).LT.100.AND.
51      &          RLU_HIJING(0).LT.0.5)) NFP(I,15)=1
52         PP(I,14)=ULMASS_HIJING(IDQ)
53         PP(I,15)=ULMASS_HIJING(IDQQ)
54 100     CONTINUE
55 C
56         DO 200 I=1,IHNT2(3)
57         PT(I,1)=0.0
58         PT(I,2)=0.0
59         PT(I,3)=-SQRT(HINT1(1)**2/4.0-HINT1(9)**2)
60         PT(I,4)=HINT1(1)/2.0
61         PT(I,5)=HINT1(9)
62         PT(I,6)=0.0
63         PT(I,7)=0.0
64         PT(I,8)=0.0
65         PT(I,9)=0.0
66         PT(I,10)=0.0
67         NFT(I,3)=IPT
68         NFT(I,4)=IPT
69         NFT(I,5)=0
70         NFT(I,6)=0
71         NFT(I,7)=0
72         NFT(I,8)=0
73         NFT(I,9)=0
74         NFT(I,10)=0
75         NFT(I,11)=0
76         NTJ(I)=0
77         IF(I.GT.ABS(IHNT2(4))) NFT(I,3)=2112
78         CALL ATTFLV(NFT(I,3),IDQ,IDQQ)
79         NFT(I,1)=IDQ
80         NFT(I,2)=IDQQ
81         NFT(I,15)=1
82         IF(ABS(IDQ).GT.1000.OR.(ABS(IDQ*IDQQ).LT.100.AND.
83      &                  RLU_HIJING(0).LT.0.5)) NFT(I,15)=-1
84         PT(I,14)=ULMASS_HIJING(IDQ)
85         PT(I,15)=ULMASS_HIJING(IDQQ)
86 200     CONTINUE
87         RETURN
88         END