IAP GITLAB

DPMINI.f 5.26 KB
Newer Older
Tanguy Pierog's avatar
Tanguy Pierog committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

      SUBROUTINE DPMINI(Lesdpm,Loudpm,Ifdpm,Pinp,Idpmvr,Idpmhk,Idpmfs)
 
C***********************************************************************
C                                                                      *
C     Version September 2001      by   Stefan Roesler                  *
C                                                                      *
C     Last change  10-Nov-15           Alfredo Ferrari                 *
C                                                                      *
C     This subroutine is part of the FLUKA interface to DPMJET 3,      *
C     new version (labelled 3.10 for convenience) after A.Fedynitch    *
C     work                                                             *
C     Initialization of DPMJET 3 event generation.                     *
C                                                                      *
C                                                                      *
C     argument list (FLUKA control card: codewd = dpmjet)              *
C                                                                      *
C          LESDPM  dpmjet input follows at the bottom of Fluka input   *
C                  file and a second start card is required in this    *
C                  case                                                *
C          LOUDPM  logical unit number for dpmjet output               *
C          IFDPM   this flag indicates if (and at what level?) we      *
C                  expect dpmjet output                                *
C                  for dpmjet-3 just on/off
C                                                                      *
C          PINP    initial FLUKA beam momentum to indicate maximum     *
C                  available energy in the considered system           *
C          IDPMVR  output flag indicating service is rendered by       *
C                  dpmjet-3                                            *
C          IDPMHK  carry over the dpmet(2/3) event common block size   *
C                  to enable important cross check since we have in    *
C                  principle 3 actual copies of it                     *
C          IDPMFS  string fusion flag                                  *
C                                                                      *
C***********************************************************************
C
 
C      IMPLICIT DOUBLE PRECISION (A-H,O-Z)
C      SAVE
 
41
#ifdef FOR_FLUKA
Tanguy Pierog's avatar
Tanguy Pierog committed
42 43 44 45 46
      INCLUDE '(DBLPRC)'
      INCLUDE '(DIMPAR)'
      INCLUDE '(IOUNIT)'
      INCLUDE '(BEAMCM)'
      INCLUDE '(IOIOCM)'
47 48 49 50 51 52
#else
      INCLUDE 'DBLPRC'
      INCLUDE 'DIMPAR'
      INCLUDE 'IOUNIT'
      INCLUDE 'BEAMCM'
      INCLUDE 'IOIOCM'
53
#endif
Tanguy Pierog's avatar
Tanguy Pierog committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
 
      DOUBLE PRECISION epn , Pinp , xdumb , xlim1 , xlim2 , xlim3
      INTEGER ibin , idp , IDPmev , Idpmfs , Idpmhk , Idpmvr , Ifdpm , 
     &        iglau , iglaub , IHEhad , IHEnuc , IHIjpr , IHMapr , 
     &        IHMata , Lesdpm , Loudpm , ninp , npchar , npmass
      INTEGER ntchar , ntmass
 
C emulsion treatment
      INCLUDE 'inc/dtcomp'
 
      INCLUDE 'inc/dtevt1'
C event flag
      INCLUDE 'inc/dtevno'
C Glauber formalism: flags and parameters for statistics
      INCLUDE 'inc/dtglgp'
C flags for input different options
      INCLUDE 'inc/dtflg1'
C
      INCLUDE 'inc/pydat1'
 
C histogram indices for Fluka-interface related statistics
C     CHARACTER*72 HEADER
      DIMENSION xdumb(40)
      COMMON /DTFLHX/ IHMapr , IHMata , IHIjpr , IHEnuc , IHEhad , 
     &                IDPmev
 
      INCLUDE 'inc/dtflka'
 
C
C Redirect Dpmjet and Pythia output and turn on/off output
C
      Idpmhk = NMXHKK
      Idpmvr = 310
      LPRi = Ifdpm
 
      LOUt = Loudpm
      MSTu(11) = Loudpm
C
C Flag for special settings needed to run the code as event
C  generator in Fluka (do not change !)
C
      ITRspt = 1
      IEMul = 0
      IFUsion = Idpmfs
      epn = Pinp                !---> should we  * 1.5
      npmass = IPRoa            !
      npchar = IPRoz            !---> last two are taken out of FLUKA common
C
C Special settings if no Dpmjet input follows the Fluka input
C
      IF ( Lesdpm.EQ.0 ) THEN
         ninp = -1
      ELSE
         ninp = 0
      END IF
 
C
C Initialization of Dpmjet
C
Cc
Cc ---------------------------------------------------------------------
 
      iglaub = 0
 
      CALL DT_INIT(ninp,epn,npmass,npchar,ntmass,ntchar,idp,iglau)
      CALL DT_STATIS(1)
 
Cc ---------------------------------------------------------------------
Cc
C     CALL DT_DTUINI(NINP,EPN,NPMASS,NPCHAR,NTMASS,NTCHAR,IDP,IEMU)
      NEVent = 0
C
 
 
 
      IF ( LPRi.LT.3 ) RETURN
C
C Initialization of histograms
C
      IDPmev = 0
C  mass number of projectile and target nuclei
      xlim1 = 0.5D0
      xlim2 = 200.5D0
      xlim3 = 0D0
      ibin = INT(xlim2-xlim1)
      CALL DT_NEWHGR(xlim1,xlim2,xlim3,xdumb,ibin,IHMapr)
      CALL DT_NEWHGR(xlim1,xlim2,xlim3,xdumb,ibin,IHMata)
C  index of projectile hadrons
      CALL DT_NEWHGR(xlim1,xlim2,xlim3,xdumb,ibin,IHIjpr)
C  energy of projectile nuclei and hadrons
      xlim1 = 5.0D0
      xlim2 = PBEam
C     write(0,*) ' -pbeam-',pbeam
      xlim3 = 0.D0
      ibin = -200
      CALL DT_NEWHGR(xlim1,xlim2,xlim3,xdumb,ibin,IHEnuc)
      CALL DT_NEWHGR(xlim1,xlim2,xlim3,xdumb,ibin,IHEhad)
C
 
C=== End of subroutine Dpmini =========================================*
      END SUBROUTINE