Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:15:42

0001 C****************************************************************************
0002 C          Program # 1 from Comp. Phys. Commun. 83 (1994) 307
0003 C                  by M. Gyulassy and X-.N. Wang
0004 C             Modified by V.Uzhinsky, CERN, Oct. 2003   
0005 C***************************************************************************
0006 
0007       CHARACTER FRAME*8,PROJ*8,TARG*8
0008 
0009       DIMENSION DNDPT(50), DNDY(50)
0010 
0011       COMMON/HIPARNT/HIPR1(100),IHPR2(50),HINT1(100),IHNT2(50)
0012       SAVE  /HIPARNT/
0013 
0014 C....information of produced particles:
0015 
0016       COMMON/HIMAIN1/NATT,EATT,JATT,NT,NP,N0,N01,N10,N11
0017       SAVE  /HIMAIN1/
0018 
0019       COMMON/HIMAIN2/KATT(130000,4),PATT(130000,4)
0020       SAVE  /HIMAIN2/
0021 C
0022 C....information of produced partons:
0023 
0024       COMMON/HIJJET1/NPJ(300),KFPJ(300,500),PJPX(300,500),PJPY(300,500)
0025      &               ,PJPZ(300,500),PJPE(300,500),PJPM(300,500)
0026      &               ,NTJ(300),KFTJ(300,500),PJTX(300,500),PJTY(300,500)
0027      &               ,PJTZ(300,500),PJTE(300,500),PJTM(300,500)
0028       SAVE  /HIJJET1/
0029 
0030       COMMON/HIJJET2/NSG,NJSG(900),IASG(900,3),K1SG(900,100)
0031      &         ,K2SG(900,100),PXSG(900,100),PYSG(900,100),PZSG(900,100)
0032      &         ,PESG(900,100),PMSG(900,100)
0033       SAVE  /HIJJET2/
0034 C 
0035       COMMON/HISTRNG/NFP(300,15),PP(300,15),NFT(300,15),PT(300,15)
0036       SAVE  /HISTRNG/
0037 
0038       COMMON/RANSEED/NSEED                                     
0039       SAVE  /RANSEED/                                          
0040 
0041       NSEED=0                                                 
0042 
0043       do k=1,50
0044         DNDPT(K)=0.
0045         DNDY(K) =0.
0046       enddo
0047 
0048       FRAME='CMS'
0049       
0050       write(6,*)'===================================================='
0051       write(6,*)'  Calculation of transverse momentum and rapidity   '
0052       write(6,*)'       distributions of charged particles in        '
0053       write(6,*)'hh-, hA- and AA-collisions at fixed impact parameter'
0054       write(6,*)'    Calculation will be performed in CM System      '
0055       write(6,*)'===================================================='
0056 
0057       write(6,*)
0058       write(6,*)'Enter the energy per NN-collision (GeV)'
0059       read(5,*)  EFRM
0060 
0061       write(6,*)   
0062       write(6,*)'Enter a type of the "projectile" particle'
0063       write(6,*)
0064       write(6,*)' P proton,            PBAR anti-proton,'
0065       write(6,*)' N neutron,           NBAR anti-neutron,'
0066       write(6,*)' PI+ - positive pion, PI- negative pion,'
0067       write(6,*)' K+ positive kaon,    K- negative kaon'
0068       write(6,*)
0069       write(6,*)' A - nucleus --------------------------'
0070 
0071       read(5,1) PROJ
0072 1     format(A8)
0073     
0074       if(PROJ.ne.'A') then
0075         IAP=1
0076         if(PROJ.eq.'P'   ) IZP= 1
0077         if(PROJ.eq.'PBAR') IZP=-1
0078         if(PROJ.eq.'N'   ) IZP= 0
0079         if(PROJ.eq.'NBAR') IZP= 0
0080         if(PROJ.eq.'PI+' ) IZP= 1
0081         if(PROJ.eq.'PI-' ) IZP=-1
0082         if(PROJ.eq.'K+'  ) IZP= 1
0083         if(PROJ.eq.'K-'  ) IZP=-1
0084       else
0085         write(6,*)
0086         write(6,*)'Enter mass number and charge of the proj. nucleus'
0087         read(5,*)  IAP, IZP
0088       endif
0089 
0090       write(6,*)
0091       write(6,*)'Enter a type of the "target" particle (same notations)'
0092       read(5,1) TARG
0093 
0094       if(TARG.ne.'A') then
0095         IAT=1
0096         if(TARG.eq.'P'   ) IZT= 1
0097         if(TARG.eq.'PBAR') IZT=-1
0098         if(TARG.eq.'N'   ) IZT= 0
0099         if(TARG.eq.'NBAR') IZT= 0
0100         if(TARG.eq.'PI+' ) IZT= 1
0101         if(TARG.eq.'PI-' ) IZT=-1
0102         if(TARG.eq.'K+'  ) IZT= 1
0103         if(TARG.eq.'K-'  ) IZT=-1
0104       else
0105         write(6,*)
0106         write(6,*)'Enter mass number and charge of the target nucleus'
0107         read(5,*)  IAT, IZT
0108       endif
0109       
0110       write(6,*)
0111       write(6,*)'Enter number of events'
0112 
0113       read(5,*)  N_EVENT
0114 
0115       CALL HIJSET(EFRM,FRAME,PROJ,TARG,IAP,IZP,IAT,IZT)
0116 
0117       write(6,*)' Simulation of interactions with'             
0118       write(6,*)                                               
0119       write(6,*)' Proj = ',PROJ,' and  Targ = ',TARG            
0120       write(6,*)' IAP  =',IAP  ,'            IAT  =',IAT       
0121       write(6,*)' IZP  =',IZP  ,'            IZT  =',IZT       
0122       write(6,*)                                               
0123       write(6,*)' Reference frame -   ',FRAME                  
0124       write(6,*)' ENERGY            ',EFRM,' (GeV)'                     
0125       write(6,*)' Number of generated events -',N_event       
0126       write(6,*)                                               
0127 
0128       if(PROJ.eq.'A'.or.TARG.eq.'A') then
0129         write(6,*)'Enter Min. and Max. values of impact parameter (fm)'
0130         read(5,*)  BMIN, BMAX
0131       else
0132         BMIN=0.0
0133         BMAX=0.0
0134       endif
0135 
0136       DO 2000 J=1,N_EVENT
0137 
0138         write(6,*)' Event # ',J,' ------------------------------'
0139 
0140         CALL HIJING(FRAME,BMIN,BMAX)
0141 C
0142 C....calculate rapidity and transverse momentum distributions of
0143 C....produced charged particles:  
0144 
0145         DO 1000 I=1,NATT
0146 
0147 C....exclude beam nucleons as produced particles:
0148 
0149           if(KATT(I,2).EQ.0 .OR. KATT(I,2).EQ.10) GO TO 1000
0150 
0151 C....select charged particles only:
0152 
0153           IF(LUCHGE(KATT(I,1)) .EQ. 0) GO TO 1000
0154 
0155           PTR=SQRT(PATT(I,1)**2+PATT(I,2)**2)
0156           IF (PTR .GE. 10.0) GO TO 100
0157 
0158           IPT=1+PTR/0.2
0159           DNDPT(IPT)=DNDPT(IPT)+1.0/FLOAT(N_EVENT)/0.2/2.0/PTR
0160 
0161 100       Y=0.5*LOG((PATT(I,4)+PATT(I,3))/(PATT(I,4)-PATT(I,3)))
0162           IF(ABS(Y) .GE. 10.0) GO TO 1000
0163 
0164           IY=1+ABS(Y)/0.2
0165           DNDY(IY)=DNDY(IY)+1.0/FLOAT(N_EVENT)/0.2/2.0
0166 1000    CONTINUE
0167 2000  CONTINUE
0168 
0169 C....print out the rapidity and transverse momentum distributions:
0170 
0171       do k=1,50
0172         WRITE(6,2)0.2*(K-1),DNDPT(K),DNDY(K)
0173 2       format(1x,f5.1,2(2x,e11.4))
0174       enddo
0175 
0176       STOP
0177       END    
0178 
0179       FUNCTION RAN(NSEED)                                      
0180       RAN=RLU(NSEED)                                           
0181       RETURN                                                   
0182       END