- some additional information in HIJGLBR
[u/mrichter/AliRoot.git] / HIJING / hijing1_36 / hijing.F
index 9df2e92..9a50bd2 100644 (file)
@@ -321,6 +321,10 @@ C                  ********Initialize for a new event
         NINP=0
        NSG=0
        NCOLT=0
+        NPSPECP=0
+        NNSPECP=0
+        NPSPECT=0
+        NNSPECT=0 
 
 C****  BB IS THE ABSOLUTE VALUE OF IMPACT PARAMETER,BB**2 IS 
 C       RANDOMLY GENERATED AND ITS ORIENTATION IS RANDOMLY SET 
@@ -542,11 +546,20 @@ c
 c**************************
 c
        DO 201 JP=1,IHNT2(1)
+c           write(6,*) JP, NFP(JP,3), NFP(JP,4), NFP(JP,5)
            IF(NFP(JP,5).GT.2) THEN
               NINP=NINP+1
            ELSE IF(NFP(JP,5).EQ.2.OR.NFP(JP,5).EQ.1) THEN
               NELP=NELP+1
            ENDIF
+
+           IF(NFP(JP,5).LE.2) THEN
+              IF (NFP(JP,3) .EQ. 2212) THEN
+                 NPSPECP = NPSPECP + 1
+              ELSE IF (NFP(JP,3) .EQ. 2112) THEN
+                 NNSPECP = NNSPECP + 1
+              ENDIF
+           ENDIF
  201    continue
        DO 202 JT=1,IHNT2(3)
            IF(NFT(JT,5).GT.2) THEN
@@ -554,6 +567,14 @@ c
            ELSE IF(NFT(JT,5).EQ.2.OR.NFT(JT,5).EQ.1) THEN
               NELT=NELT+1
            ENDIF
+
+           IF(NFT(JT,5).LE.2) THEN
+              IF (NFT(JT,3) .EQ. 2212) THEN
+                 NPSPECT = NPSPECT + 1
+              ELSE IF (NFT(JT,3) .EQ. 2112) THEN
+                 NNSPECT = NNSPECT + 1
+              ENDIF
+           ENDIF
  202    continue
 c     
 c*******************************
@@ -601,7 +622,7 @@ C
                IDSTR=92
                IF(IHPR2(21).EQ.0) THEN
                   CALL LUEDIT_HIJING(2)
-               ELSE
+               ELSE IF (NFTP.EQ. 3 .OR. NFTP .EQ. 13) THEN
 351               N_ST=N_ST+1
                   IF(K(N_ST,2).LT.91.OR.K(N_ST,2).GT.93) GO TO  351
                   IDSTR=K(N_ST,2)
@@ -624,11 +645,15 @@ C
                   KATT(NATT,1)=K(I,2)
                   KATT(NATT,2)=20
                   KATT(NATT,4)=K(I,1)
-                  IF(K(I,3).EQ.0 .OR. K(K(I,3),2).EQ.IDSTR) THEN
-                     KATT(NATT,3)=0
-                  ELSE
-                     KATT(NATT,3)=NATT-I+K(I,3)+N_STR-K(K(I,3),4)
-                  ENDIF
+                   IF(K(I,3).EQ.0 ) THEN
+                      KATT(NATT,3)=0
+                   ELSE
+                      IF(K(K(I,3),2).EQ.IDSTR) THEN
+                         KATT(NATT,3)=0
+                      ELSE
+                         KATT(NATT,3)=NATT-I+K(I,3)+N_STR-K(K(I,3),4)
+                      ENDIF
+                   ENDIF
 C       ****** identify the mother particle
                   PATT(NATT,1)=P(I,1)
                   PATT(NATT,2)=P(I,2)
@@ -681,9 +706,12 @@ C
                N_ST=1
                IDSTR=92
 
+               NFTP=NFP(J_JTP,5)
+               IF(NTP.EQ.2) NFTP=10+NFT(J_JTP,5)
+
                IF(IHPR2(21).EQ.0) THEN
                   CALL LUEDIT_HIJING(2)
-               ELSE
+               ELSE IF (NFTP.EQ. 3 .OR. NFTP .EQ. 13) THEN
 381               N_ST=N_ST+1
                   IF(K(N_ST,2).LT.91.OR.K(N_ST,2).GT.93) GO TO  381
                   IDSTR=K(N_ST,2)
@@ -694,8 +722,7 @@ C
                ENDIF
 C              ******** boost back to lab frame(if it was in)
 C
-               NFTP=NFP(J_JTP,5)
-               IF(NTP.EQ.2) NFTP=10+NFT(J_JTP,5)
+
                N_STR=0
                DO 390 I=N_ST,N
                   IF(K(I,2).EQ.IDSTR) THEN