]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HIJING/hipyset1_35/lu2ent_hijing.F
Catching up to NewIO -> Particle stores all passible PID and their probabilities
[u/mrichter/AliRoot.git] / HIJING / hipyset1_35 / lu2ent_hijing.F
CommitLineData
e74335a4 1* $Id$
2
3C*********************************************************************
4
5 SUBROUTINE LU2ENT_HIJING(IP,KF1,KF2,PECM)
6
7C...Purpose: to store two partons/particles in their CM frame,
8C...with the first along the +z axis.
9#include "lujets_hijing.inc"
10#include "ludat1_hijing.inc"
11#include "ludat2_hijing.inc"
12
13C...Standard checks.
14 MSTU(28)=0
15 IF(MSTU(12).GE.1) CALL LULIST_HIJING(0)
16 IPA=MAX(1,IABS(IP))
17 IF(IPA.GT.MSTU(4)-1) CALL LUERRM_HIJING(21,
18 &'(LU2ENT_HIJING:) writing outside LUJETS_HIJING memory')
19 KC1=LUCOMP_HIJING(KF1)
20 KC2=LUCOMP_HIJING(KF2)
21 IF(KC1.EQ.0.OR.KC2.EQ.0) CALL LUERRM_HIJING(12,
22 &'(LU2ENT_HIJING:) unknown flavour code')
23
24C...Find masses. Reset K, P and V vectors.
25 PM1=0.
26 IF(MSTU(10).EQ.1) PM1=P(IPA,5)
27 IF(MSTU(10).GE.2) PM1=ULMASS_HIJING(KF1)
28 PM2=0.
29 IF(MSTU(10).EQ.1) PM2=P(IPA+1,5)
30 IF(MSTU(10).GE.2) PM2=ULMASS_HIJING(KF2)
31 DO 100 I=IPA,IPA+1
32 DO 100 J=1,5
33 K(I,J)=0
34 P(I,J)=0.
35 100 V(I,J)=0.
36
37C...Check flavours.
38 KQ1=KCHG(KC1,2)*ISIGN(1,KF1)
39 KQ2=KCHG(KC2,2)*ISIGN(1,KF2)
40 IF(KQ1+KQ2.NE.0.AND.KQ1+KQ2.NE.4) CALL LUERRM_HIJING(2,
41 &'(LU2ENT_HIJING:) unphysical flavour combination')
42 K(IPA,2)=KF1
43 K(IPA+1,2)=KF2
44
45C...Store partons/particles in K vectors for normal case.
46 IF(IP.GE.0) THEN
47 K(IPA,1)=1
48 IF(KQ1.NE.0.AND.KQ2.NE.0) K(IPA,1)=2
49 K(IPA+1,1)=1
50
51C...Store partons in K vectors for parton shower evolution.
52 ELSE
53 IF(KQ1.EQ.0.OR.KQ2.EQ.0) CALL LUERRM_HIJING(2,
54 & '(LU2ENT_HIJING:) requested flavours can not develop'//
55 $ 'parton shower')
56 K(IPA,1)=3
57 K(IPA+1,1)=3
58 K(IPA,4)=MSTU(5)*(IPA+1)
59 K(IPA,5)=K(IPA,4)
60 K(IPA+1,4)=MSTU(5)*IPA
61 K(IPA+1,5)=K(IPA+1,4)
62 ENDIF
63
64C...Check kinematics and store partons/particles in P vectors.
65 IF(PECM.LE.PM1+PM2) CALL LUERRM_HIJING(13,
66 &'(LU2ENT_HIJING:) energy smaller than sum of masses')
67 PA=SQRT(MAX(0.,(PECM**2-PM1**2-PM2**2)**2-(2.*PM1*PM2)**2))/
68 &(2.*PECM)
69 P(IPA,3)=PA
70 P(IPA,4)=SQRT(PM1**2+PA**2)
71 P(IPA,5)=PM1
72 P(IPA+1,3)=-PA
73 P(IPA+1,4)=SQRT(PM2**2+PA**2)
74 P(IPA+1,5)=PM2
75
76C...Set N. Optionally fragment/decay.
77 N=IPA+1
78 IF(IP.EQ.0) CALL LUEXEC_HIJING
79
80 RETURN
81 END